mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-12-01 13:09:26 +01:00
88621b9ecd
the setting was auto and the browser had a dark theme.
99 lines
3.9 KiB
Plaintext
99 lines
3.9 KiB
Plaintext
doctype html
|
|
html
|
|
head
|
|
title saved
|
|
include includes/head.pug
|
|
body(class=""+ (user_preferences.theme === 'auto' ? 'dark' : user_preferences.theme) + "")
|
|
include includes/topbar.pug
|
|
if json === null
|
|
h1 No saved posts
|
|
else
|
|
header
|
|
a(href="/", class="main")
|
|
h1 teddit
|
|
.bottom
|
|
a(href="/saved", class="subreddit")
|
|
h2 saved
|
|
#links.sr
|
|
if json.links.length === 0
|
|
p No saved posts
|
|
else
|
|
each link in json.links
|
|
.link
|
|
.upvotes
|
|
.arrow
|
|
span #{kFormatter(link.ups)}
|
|
.arrow.down
|
|
.image
|
|
if link.images
|
|
if link.is_self_link
|
|
a(href="" + link.permalink + "")
|
|
img(src="" + link.images.thumb + "", alt="")
|
|
else
|
|
a(href=""+ link.url +"", rel="noopener noreferrer")
|
|
img(src="" + link.images.thumb + "", alt="")
|
|
else
|
|
a(href="" + link.permalink + "")
|
|
.no-image no image
|
|
.entry
|
|
.title
|
|
if link.is_self_link
|
|
a(href="" + link.permalink + "")
|
|
h2(class="" + (link.stickied ? 'green' : '') + "") #{cleanTitle(link.title)}
|
|
!= link.link_flair
|
|
span (#{link.domain})
|
|
else
|
|
a(href="" + link.url + "", rel="noopener noreferrer")
|
|
h2(class="" + (link.stickied ? 'green' : '') + "") #{cleanTitle(link.title)}
|
|
!= link.link_flair
|
|
span (#{link.domain})
|
|
.meta
|
|
p.submitted submitted
|
|
span(title="" + toUTCString(link.created) + "") #{timeDifference(link.created)} by
|
|
if link.author === '[deleted]'
|
|
span(class="deleted") [deleted]
|
|
else
|
|
a(href="/u/" + link.author + "")
|
|
| #{link.author}
|
|
!= link.user_flair
|
|
p.to to
|
|
a(href="/r/" + link.subreddit + "")
|
|
| #{link.subreddit}
|
|
if link.stickied
|
|
span(class="green") stickied
|
|
.links
|
|
if link.over_18
|
|
span.tag.nsfw NSFW
|
|
if link.selftext_html
|
|
details
|
|
summary
|
|
.line
|
|
.line
|
|
.line
|
|
.selftext
|
|
!= unescape(link.selftext_html)
|
|
if (link.images && link.images.preview)
|
|
style.
|
|
details.preview-container img {
|
|
width: 100% !important;
|
|
height: auto !important;
|
|
max-width: none !important;
|
|
max-height: none !important;
|
|
opacity: 0;
|
|
}
|
|
details.preview-container[open][data-url="#{link.images.preview}"] .preview {
|
|
width: 100%;
|
|
height: auto;
|
|
background-image: url('#{link.images.preview}');
|
|
background-repeat: no-repeat;
|
|
background-size: contain;
|
|
}
|
|
details.preview-container(data-url="" + link.images.preview + "")
|
|
summary
|
|
span ▶
|
|
.preview
|
|
img(src=""+ link.images.thumb +"", alt="")
|
|
a(href="" + link.permalink + "", class="comments") #{link.num_comments} comments
|
|
a(href="/unsave/" + link.id + "") unsave
|
|
include includes/footer.pug
|