Skip to content

Commit

Permalink
Merge pull request #76 from derula/change-portrait-clickarea
Browse files Browse the repository at this point in the history
Added border / caption to "change portrait" link.
  • Loading branch information
derula authored Sep 10, 2017
2 parents 0a87432 + 4b631fc commit 90b3253
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
22 changes: 21 additions & 1 deletion public/assets/mod.css
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,26 @@ div#tabs-ooc_notes .column_two { display:none; }
max-height: 200px;
}

.changePortrait {
position: relative;
display: inline-block;
border-radius: 6px;
line-height: 0;
min-width: 120px;
min-height: 1.5em;
overflow: hidden;
}

.changePortrait:before {
content: 'change portrait';
line-height: 1.5em;
background: rgba(0, 0, 0, 0.5);
position: absolute;
display: table-cell;
width: 100%;
bottom: 0;
}

/* Tabs */

#tabs {
Expand Down Expand Up @@ -240,7 +260,7 @@ input[type="password"], dialog input[type="text"] {
font-size: 0.8em;
}

.ui-widget-content, .ui-widget.ui-widget-content {
.ui-widget-content, .ui-widget.ui-widget-content, .changePortrait {
border:1px solid #999;
}

Expand Down
2 changes: 1 addition & 1 deletion public/assets/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $(() => {
});
const portrait = $('.portrait');
portrait.wrap(
$('<a>', {href: '#'}).click((e) => {
$('<a>', {href: '#', class: 'changePortrait'}).click((e) => {
let oldVal = portrait.attr('src');
if (oldVal === defaultPortrait) {
oldVal = '';
Expand Down

0 comments on commit 90b3253

Please sign in to comment.