Skip to content

Commit

Permalink
Merge pull request #25 from Robinatus/sticky-fix
Browse files Browse the repository at this point in the history
fixed Sticky Post Fähnchen werden nicht angezeigt
  • Loading branch information
Scarwolf authored Jul 18, 2020
2 parents b5470eb + 39c890c commit 487d79e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/module/FilterMarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,14 @@ export default class FilterMarks {

// Handle stream-view
p.View.Stream.Main.prototype.buildItem = function (item) {
let content = `<a class="silent ${item.promoted > 1000000000 ? 'sticky ' : ''}thumb filter ${_this.displayLabelStream ? FilterMarks.getFilter(item) : ''}" id="item-${item.id}" href="${this.baseURL + item.id}"><img src="${item.thumb}"/>`;
let content = `<a class="silent thumb filter ${_this.displayLabelStream ? FilterMarks.getFilter(item) : ''}" id="item-${item.id}" href="${this.baseURL + item.id}"><img src="${item.thumb}"/> ${item.promoted > 1000000000 ? '<div class="sticky-badge"></div>' : ''}`;

if (_this.displayBenisStream) {
content += `<span class="benis-info ${item.up - item.down > 0 ? 'up' : 'down'}">${item.up - item.down}</span></a>`;
}
else {
content += '</a>';
}
return content;
};

Expand Down
6 changes: 6 additions & 0 deletions src/style/filterMarks.less
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@
}
}

> .sticky-badge {
&:after {
z-index: 5;
}
}

&:hover > .benis-info {
display: inline;
}
Expand Down

0 comments on commit 487d79e

Please sign in to comment.