Skip to content

Commit

Permalink
fixed Sticky Post Fähnchen
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinReinecke committed Jul 17, 2020
1 parent 7b6fc65 commit 39c890c
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 39c890c

Please sign in to comment.