]> git.plutz.net Git - rawnet/commitdiff
clickable video thumbnail
authorPaul Hänsch <paul@plutz.net>
Wed, 13 Oct 2021 15:55:53 +0000 (17:55 +0200)
committerPaul Hänsch <paul@plutz.net>
Wed, 13 Oct 2021 15:55:53 +0000 (17:55 +0200)
page_channel.sh
rawnet.css

index 8d1d1837fc2018d4765cc748c730746ad9745d32..ff7fa21e976bde465713e633a951d654c19f9d7f 100755 (executable)
@@ -172,10 +172,12 @@ w_video(){
     thumb="${_BASE}/video/${CHANNEL_ID}/${VIDEO_ID}_thumb.jpg"
     [ "$NAME" = \\ ] && NAME="(Unnamed Video)"
     printf '[div .video .thumb
-              [h3 [a href="%s/channel/%s/%s/" . %s]]
-              [figure [img src="%s" alt=""]]
-              [span .duration . %i:%02i]
-              [div .description . %s]
+              [a href="%s/channel/%s/%s/"
+                [h3 . %s]
+                [figure [img src="%s" alt=""]]
+                [span .duration . %i:%02i]
+                [div .description . %s]
+              ]
             ]' "$_BASE" "$CHANNEL_ID" "$VIDEO_ID" \
                "$(HTML "${VIDEO_NAME:-(Unnamed Video)}")" \
                "$thumb" \
index d034a6d056dabe22b19822a98b1883cee317fb27..99bb014059b0fc81a1bb435bb48e12c0af442b2d 100644 (file)
@@ -151,6 +151,13 @@ body.channels main .channel > .description h2 {
 @media(min-width:  84em) { .channel > .description, .video.thumb, .newvideo { max-width: 19%; } }
 @media(min-width: 104em) { .channel > .description, .video.thumb, .newvideo { max-width: 19em; } }
 
+.video.thumb > a {
+  display: block;
+  color: inherit;
+  font-style: inherit;
+  text-decoration: inherit;
+}
+
 .video.thumb figure {
   position: absolute; top: 0;
   height: 11em; width: 100%;