mason/dhandler, static/tgal.css: Use `figure' and `figcaption' elements.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 18 Dec 2021 14:00:51 +0000 (14:00 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 25 Dec 2021 16:09:18 +0000 (16:09 +0000)
mason/dhandler
static/tgal.css

index 887bd59..13731e1 100755 (executable)
@@ -238,22 +238,22 @@ Failed to find &lsquo;<% $path |h %>&rsquo;.
 % if (defined $img) { $tn = scaled "thumb", $img; }
 % else { $tn = "$STATICURL/folder.svg"; }
 % if ($focus) {
-  <div class=thumb id=focusthumb>
+  <figure class=thumb id=focusthumb>
     <img class=thumb src="<% $tn |u %>">
-    <div class=caption><span class=name><% $caption %></span></div>
+    <figcaption><span class=name><% $caption %></span></figcaption>
 % } else {
-  <div class=thumb>
+  <figure class=thumb>
     <a class=thumb href="<% $target |u %>">
       <img class=thumb src="<% $tn |u %>">
-      <div class=caption>
+      <figcaption>
        <span class=name><% $caption %></span>
 % if (defined $comment) {
        <span class=comment><% $comment %></span>
 % }
-      </div>
+      </figcaption>
     </a>
 % }
-  </div>
+  </figure>
 %
 <%args>
        $target
index efb8220..de367ed 100644 (file)
@@ -80,7 +80,7 @@ div.gallery {
        text-align: center;
 }
 
-div.thumb {
+figure.thumb {
        display: inline-block;
        vertical-align: top;
        width: 228px;
@@ -103,12 +103,12 @@ div.comment {
        margin-top: 2ex; margin-bottom: 2ex;
 }
 
-div.caption {
+figure.thumb figcaption {
        display: block;
        width: 228px;
 }
-div.caption span.name { font-family: sans-serif; }
-div.caption span.comment { font-style: italic; margin-inline-start: 1em; }
+figcaption span.name { font-family: sans-serif; }
+figcaption span.comment { font-style: italic; margin-inline-start: 1em; }
 
 div.viewnav {
        flex-grow: 1; flex-basis: 0;