% for my $d (@$dd) {
% my ($ddd, $fff, $iii) = listdir $real . "/" . $d->name;
% my $tn;
-% if ($iii) { $tn = join_paths $path, $d->name . "/" . $iii->name; }
+% if ($iii) { $tn = join_paths $path, $d->name, $iii->name; }
% else { $tn = undef; }
<& .thumbnail, target => $d->name . "/", img => $tn,
caption => $m->interp->apply_escapes($d->name, "h"),
% if (defined $img) { $tn = scaled "thumb", $img; }
% else { $tn = "$STATICURL/folder.svg"; }
% if ($focus) {
- <div class=thumb id=focusthumb>
- <img class=thumb src="<% $tn |u %>">
- <div class=caption><span class=name><% $caption %></span></div>
+ <figure class=thumb id=focusthumb>
+ <img class=thumb load=lazy src="<% $tn |u %>">
+ <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>
+ <img class=thumb load=lazy src="<% $tn |u %>">
+ <figcaption>
<span class=name><% $caption %></span>
% if (defined $comment) {
<span class=comment><% $comment %></span>
% }
- </div>
+ </figcaption>
</a>
% }
- </div>
+ </figure>
%
<%args>
$target