From 48dbc6380b652606fc31f8a11b28b48b8d5d238f Mon Sep 17 00:00:00 2001 From: teddit Date: Fri, 4 Dec 2020 22:33:40 +0100 Subject: [PATCH] display domain name --- dist/css/styles.css | 8 ++++++++ inc/processJsonPost.js | 1 + views/post.pug | 3 +++ 3 files changed, 12 insertions(+) diff --git a/dist/css/styles.css b/dist/css/styles.css index 5388a7e..122638d 100644 --- a/dist/css/styles.css +++ b/dist/css/styles.css @@ -774,6 +774,11 @@ input[type="submit"]:hover, color: var(--linkcolor); float: left; } +#post .title .domain { + color: gray; + font-size: 12px; + margin-left: 10px; +} #post .submitted { font-size: small; color: #686868; @@ -1360,6 +1365,9 @@ code { #search form { width: 240px; } + .comment { + padding-left: 2.5%; + } .comment details summary::-webkit-details-marker, .comment details summary::marker { font-size: 1.25rem; diff --git a/inc/processJsonPost.js b/inc/processJsonPost.js index 3021bc0..291fc04 100644 --- a/inc/processJsonPost.js +++ b/inc/processJsonPost.js @@ -25,6 +25,7 @@ module.exports = function(fetch) { url: post.url, ups: post.ups, id: post.id, + domain: post.domain, comments: null, has_media: false, media: null, diff --git a/views/post.pug b/views/post.pug index 08d30b2..6dbfdad 100644 --- a/views/post.pug +++ b/views/post.pug @@ -23,6 +23,7 @@ html .title a(href="" + localize(post.url) + "") h2 #{cleanTitle(post.title)} + span(class="domain") (#{post.domain}) p.submitted span(title="" + toUTCString(post.created) + "") submitted #{timeDifference(post.created)} by a(href="/u/" + post.author + "") @@ -32,6 +33,7 @@ html .title a(href="" + localize(post.crosspost.permalink) + "") h2 #{cleanTitle(post.crosspost.title)} + span(class="domain") (#{post.domain}) .num_comments | #{post.crosspost.num_comments} comments .score @@ -86,6 +88,7 @@ html .title a(href="" + post.media.embed_src + "", target="_blank") p #{cleanTitle(post.media.title)} + span(class="domain") (#{post.domain}) .video-holder a(href="" + post.media.embed_src + "", target="_blank") img(src="" + post.media.thumbnail + "")