From 063523ed4d4ab70e54956a934b7b52519ae8d1c6 Mon Sep 17 00:00:00 2001 From: amrw Date: Sun, 30 Jan 2022 20:42:29 +0100 Subject: [PATCH] Improve how long source URLs are displayed --- static/css/styles.css | 8 ++++++++ views/post.pug | 9 +++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index 6174b0d..ac0f412 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -749,6 +749,14 @@ footer a { #post .submitted span { margin-left: 5px; } +#post .source-details { + float: left; + margin: 10px 0 10px 30px; +} +#post .source-details summary:hover { + color: var(--linkcolor); + text-decoration: underline; +} #post .comments { float: left; width: 100%; diff --git a/views/post.pug b/views/post.pug index fe80f5b..57e6028 100644 --- a/views/post.pug +++ b/views/post.pug @@ -163,10 +163,11 @@ html 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", rel="noopener noreferrer") - p(class="source-url") #{post.media.embed_src} + details(class="source-details") + summary Source + p + 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 + "")