add subreddit stickies

This commit is contained in:
teddit 2020-12-04 18:10:33 +01:00
parent c4098a418f
commit d07a400884
3 changed files with 8 additions and 2 deletions

3
dist/css/styles.css vendored
View File

@ -430,6 +430,9 @@ header .tabmenu li.active a {
margin-left: 15px;
margin-top: 8px;
}
.green {
color: green !important;
}
input[type="submit"],
.btn {
padding: 3px;

View File

@ -70,6 +70,7 @@ module.exports = function() {
ups: data.ups,
upvote_ratio: data.upvote_ratio,
url: data.url,
stickied: data.stickied,
is_self_link: is_self_link,
subreddit_front: subreddit_front,
before: before,

View File

@ -82,11 +82,11 @@ html
.title
if link.is_self_link
a(href="" + link.permalink + "")
h2 #{cleanTitle(link.title)}
h2(class="" + (link.stickied ? 'green' : '') + "") #{cleanTitle(link.title)}
span (#{link.domain})
else
a(href="" + link.url + "")
h2 #{cleanTitle(link.title)}
h2(class="" + (link.stickied ? 'green' : '') + "") #{cleanTitle(link.title)}
span (#{link.domain})
.meta
p.submitted submitted
@ -96,6 +96,8 @@ html
p.to to
a(href="/r/" + link.subreddit + "")
| #{link.subreddit}
if link.stickied
span(class="green") stickied
p.comments
a(href="" + link.permalink + "", class="comments")
| #{link.num_comments} comments