From 0dab483a1742be825a194d4bf1663ac94c9c3e4f Mon Sep 17 00:00:00 2001 From: teddit Date: Sat, 4 Sep 2021 14:35:49 +0200 Subject: [PATCH] fix video duration CSS --- static/css/styles.css | 21 +++++++++++++++++++++ views/components/link.pug | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index 5e88733..6174b0d 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -378,6 +378,18 @@ footer a { max-height: 80px; float: left; text-align: center; + position: relative; +} +#links .link .image .duration { + left: 0; + background: gray; + position: absolute; + background-color: rgba(0,0,0,0.6); + color: white; + bottom: 0px; + font-size: var(--sm-font); + width: 100%; + text-align: center; } #links .link .image img { width: auto; @@ -1049,6 +1061,15 @@ footer a { font-size: var(--sm-font); margin-bottom: 4px; } +#user .entries .link .image a span { + bottom: 0; + background: #0000005e; + left: 0; + width: 100%; + text-align: center; + color: white; + font-size: var(--sm-font); +} #user .entries .link .image img { max-width: 80px; } diff --git a/views/components/link.pug b/views/components/link.pug index 7772cee..69a6617 100644 --- a/views/components/link.pug +++ b/views/components/link.pug @@ -9,12 +9,12 @@ a(href="" + link.permalink + "") img(src="" + link.images.thumb + "", alt="") if link.duration - span #{secondsToMMSS(link.duration)} + span.duration #{secondsToMMSS(link.duration)} else a(href=""+ link.url +"", rel="noopener noreferrer") img(src="" + link.images.thumb + "", alt="") if link.duration - span #{secondsToMMSS(link.duration)} + span.duration #{secondsToMMSS(link.duration)} else a(href="" + link.permalink + "") .no-image no image