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-left: 15px;
margin-top: 8px; margin-top: 8px;
} }
.green {
color: green !important;
}
input[type="submit"], input[type="submit"],
.btn { .btn {
padding: 3px; padding: 3px;

View File

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

View File

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