fixes for styling, performance and meta data

This commit is contained in:
teddit 2020-12-30 22:51:20 +01:00
parent 0f3494711c
commit 2e2ad7acad
7 changed files with 40 additions and 36 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -543,7 +543,7 @@ footer a {
margin-left: 8px; margin-left: 8px;
} }
#links .link .entry .title span { #links .link .entry .title span {
color: #888; color: #757575;
font-size: x-small; font-size: x-small;
display: inline-block; display: inline-block;
padding-left: 13px; padding-left: 13px;
@ -564,12 +564,12 @@ footer a {
#links .link .entry .meta { #links .link .entry .meta {
float: left; float: left;
width: 100%; width: 100%;
color: #888; color: #757575;
font-size: x-small; font-size: x-small;
margin-top: 2px; margin-top: 2px;
} }
#links .link .entry .meta a { #links .link .entry .meta a {
color: #369; color: #737373;
padding-left: 3px; padding-left: 3px;
padding-right: 3px; padding-right: 3px;
} }

View File

@ -61,20 +61,20 @@ html
each link in json.links each link in json.links
.link .link
.upvotes .upvotes
div.arrow .arrow
span #{kFormatter(link.ups)} span #{kFormatter(link.ups)}
div.arrow.down .arrow.down
.image .image
if(link.images) if(link.images)
if link.is_self_link if link.is_self_link
a(href="" + link.permalink + "") a(href="" + link.permalink + "")
img(src=""+ link.images.thumb +"", alt="") img(src=""+ link.images.thumb +"", alt="")
else else
a(href="" + link.url + "") a(href="" + link.url + "", rel="noopener noreferrer")
img(src=""+ link.images.thumb +"", alt="") img(src=""+ link.images.thumb +"", alt="")
else else
a(href="" + link.permalink + "") a(href="" + link.permalink + "")
.no-image .no-image no image
.entry .entry
.title .title
if link.is_self_link if link.is_self_link
@ -82,7 +82,7 @@ html
h2 #{cleanTitle(link.title)} h2 #{cleanTitle(link.title)}
span (#{link.domain}) span (#{link.domain})
else else
a(href="" + link.url + "") a(href="" + link.url + "", rel="noopener noreferrer")
h2 #{cleanTitle(link.title)} h2 #{cleanTitle(link.title)}
span (#{link.domain}) span (#{link.domain})
.meta .meta
@ -102,9 +102,10 @@ html
a(href="" + link.permalink + "", class="comments") a(href="" + link.permalink + "", class="comments")
| #{link.num_comments} comments | #{link.num_comments} comments
#search #search
p search
form(action="/r/all/search", method="GET") form(action="/r/all/search", method="GET")
input(type="text", name="q", id="q", placeholder="search") div
label(for="q") search
input(type="text", name="q", id="q", placeholder="search")
div div
label(for="nsfw") include NSFW results label(for="nsfw") include NSFW results
input(type="checkbox", name="nsfw", id="nsfw", checked="checked") input(type="checkbox", name="nsfw", id="nsfw", checked="checked")

View File

@ -30,7 +30,7 @@ html
span #{kFormatter(post.ups)} span #{kFormatter(post.ups)}
div.arrow.down div.arrow.down
.title .title
a(href="" + post.url + "") a(href="" + post.url + "", rel="noopener noreferrer")
h2 #{cleanTitle(post.title)} h2 #{cleanTitle(post.title)}
!= post.link_flair != post.link_flair
span(class="domain") (#{post.domain}) span(class="domain") (#{post.domain})
@ -48,7 +48,7 @@ html
if post.crosspost.is_crosspost === true if post.crosspost.is_crosspost === true
.crosspost .crosspost
.title .title
a(href="" + post.crosspost.permalink + "") a(href="" + post.crosspost.permalink + "", rel="noopener noreferrer")
h2 #{cleanTitle(post.crosspost.title)} h2 #{cleanTitle(post.crosspost.title)}
span(class="domain") (#{post.domain}) span(class="domain") (#{post.domain})
.num_comments .num_comments
@ -79,7 +79,7 @@ html
a(href="" + post.media.source + "") a(href="" + post.media.source + "")
img(src=""+ post.media.source +"") img(src=""+ post.media.source +"")
p Embed URL: p Embed URL:
a(href="" + post.media.embed_src + "", target="_blank") a(href="" + post.media.embed_src + "", target="_blank", rel="noopener noreferrer")
p #{post.media.embed_src} p #{post.media.embed_src}
else else
.video .video
@ -107,11 +107,11 @@ html
if post.media.source === 'YouTube' if post.media.source === 'YouTube'
.video .video
.title .title
a(href="" + post.media.embed_src + "", target="_blank") a(href="" + post.media.embed_src + "", target="_blank", rel="noopener noreferrer")
p #{cleanTitle(post.media.title)} p #{cleanTitle(post.media.title)}
span(class="domain") (#{post.domain}) span(class="domain") (#{post.domain})
.video-holder .video-holder
a(href="" + post.media.embed_src + "", target="_blank") a(href="" + post.media.embed_src + "", target="_blank", rel="noopener noreferrer")
img(src="" + post.media.thumbnail + "") img(src="" + post.media.thumbnail + "")
div(class="youtube-info") div(class="youtube-info")
p YouTube video info: p YouTube video info:
@ -121,19 +121,19 @@ html
if post.media.source === 'external' if post.media.source === 'external'
if post.images if post.images
.image .image
a(href="" + post.media.embed_src + "", target="_blank") a(href="" + post.media.embed_src + "", target="_blank", rel="noopener noreferrer")
img(src="" + post.images.source + "", alt="") img(src="" + post.images.source + "", alt="")
if !post.media.embed_src.startsWith("https://twitter.com") if !post.media.embed_src.startsWith("https://twitter.com")
p p
| source: | source:
a(href="" + post.media.embed_src + "", target="_blank") a(href="" + post.media.embed_src + "", target="_blank", rel="noopener noreferrer")
p(class="source-url") #{post.media.embed_src} p(class="source-url") #{post.media.embed_src}
else else
.video .video
a(href="" + post.media.source + "") a(href="" + post.media.source + "")
img(src="" + post.media.source + "") img(src="" + post.media.source + "")
p Embed URL: p Embed URL:
a(href="" + post.media.embed_src + "", target="_blank") a(href="" + post.media.embed_src + "", target="_blank", rel="noopener noreferrer")
p #{post.media.embed_src} p #{post.media.embed_src}
else else
.video .video

View File

@ -7,7 +7,9 @@ html
include includes/topbar.pug include includes/topbar.pug
#search.sr.search-page #search.sr.search-page
form(action="/r/" + subreddit + "/search", method="GET") form(action="/r/" + subreddit + "/search", method="GET")
input(type="text", name="q", id="q", placeholder="search", value=""+ q +"") div
label(for="q") search
input(type="text", name="q", id="q", placeholder="search", value=""+ q +"")
div div
label(for="restrict_sr") limit my search to r/#{subreddit} label(for="restrict_sr") limit my search to r/#{subreddit}
if restrict_sr === 'on' if restrict_sr === 'on'
@ -98,14 +100,14 @@ html
each post in json.posts each post in json.posts
.link .link
.upvotes .upvotes
div.arrow .arrow
span #{kFormatter(post.ups)} span #{kFormatter(post.ups)}
div.arrow.down .arrow.down
.image .image
a(href="" + post.permalink + "") a(href="" + post.permalink + "", rel="noopener noreferrer")
div.no-image .no-image no image
.title .title
a(href="" + post.permalink + "") #{cleanTitle(post.title)} a(href="" + post.permalink + "", rel="noopener noreferrer") #{cleanTitle(post.title)}
.meta .meta
p.submitted(title="" + toUTCString(post.created) + "") submitted #{timeDifference(post.created)} by p.submitted(title="" + toUTCString(post.created) + "") submitted #{timeDifference(post.created)} by
//- I believe finding posts by deleted authors is impossible //- I believe finding posts by deleted authors is impossible

View File

@ -92,11 +92,11 @@ html
a(href="" + link.permalink + "") a(href="" + link.permalink + "")
img(src="" + link.images.thumb + "", alt="") img(src="" + link.images.thumb + "", alt="")
else else
a(href=""+ link.url +"") a(href=""+ link.url +"", rel="noopener noreferrer")
img(src="" + link.images.thumb + "", alt="") img(src="" + link.images.thumb + "", alt="")
else else
a(href="" + link.permalink + "") a(href="" + link.permalink + "")
.no-image .no-image no image
.entry .entry
.title .title
if link.is_self_link if link.is_self_link
@ -105,7 +105,7 @@ html
!= link.link_flair != link.link_flair
span (#{link.domain}) span (#{link.domain})
else else
a(href="" + link.url + "") a(href="" + link.url + "", rel="noopener noreferrer")
h2(class="" + (link.stickied ? 'green' : '') + "") #{cleanTitle(link.title)} h2(class="" + (link.stickied ? 'green' : '') + "") #{cleanTitle(link.title)}
!= link.link_flair != link.link_flair
span (#{link.domain}) span (#{link.domain})
@ -136,9 +136,10 @@ html
a(href="/r/" + subreddit + "/" + sortby + "?t=" + (past ? past : '') + "&after=" + json.info.after + "") next a(href="/r/" + subreddit + "/" + sortby + "?t=" + (past ? past : '') + "&after=" + json.info.after + "") next
#sidebar #sidebar
#search.sr #search.sr
p search
form(action="/r/" + subreddit + "/search", method="GET") form(action="/r/" + subreddit + "/search", method="GET")
input(type="text", name="q", id="q", placeholder="search") div
label(for="q") search
input(type="text", name="q", id="q", placeholder="search")
div div
label(for="restrict_sr") limit my search to r/#{subreddit} label(for="restrict_sr") limit my search to r/#{subreddit}
input(type="checkbox", name="restrict_sr", id="restrict_sr", checked="checked") input(type="checkbox", name="restrict_sr", id="restrict_sr", checked="checked")

View File

@ -65,20 +65,20 @@ html
if post.type === 't3' if post.type === 't3'
.entry.t3 .entry.t3
.upvotes .upvotes
div.arrow .arrow
span #{kFormatter(post.ups)} span #{kFormatter(post.ups)}
div.arrow.down .arrow.down
.image .image
if post.thumbnail !== 'self' if post.thumbnail !== 'self'
a(href="" + post.permalink + "") a(href="" + post.permalink + "", rel="noopener noreferrer")
img(src="" + post.thumbnail + "", alt="") img(src="" + post.thumbnail + "", alt="")
if post.duration if post.duration
span #{secondsToMMSS(post.duration)} span #{secondsToMMSS(post.duration)}
else else
a(href="" + post.permalink + "") a(href="" + post.permalink + "", rel="noopener noreferrer")
div.no-image .no-image no image
.title .title
a(href="" + post.permalink + "") #{cleanTitle(post.title)} a(href="" + post.permalink + "", rel="noopener noreferrer") #{cleanTitle(post.title)}
.meta .meta
p.submitted(title="" + toUTCString(post.created) + "") submitted #{timeDifference(post.created)} p.submitted(title="" + toUTCString(post.created) + "") submitted #{timeDifference(post.created)}
| by | by
@ -93,7 +93,7 @@ html
.entry .entry
.meta .meta
.title .title
a(href="" + post.url + "") #{cleanTitle(post.link_title)} a(href="" + post.url + "", rel="noopener noreferrer") #{cleanTitle(post.link_title)}
.author .author
p by p by
if post.link_author === '[deleted]' if post.link_author === '[deleted]'