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

View File

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

View File

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

View File

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

View File

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

View File

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