Introduce multiple thumbnail strips, and select one in a sensible way.
[tgal] / mason / dhandler
index 011c561..813e637 100755 (executable)
@@ -107,7 +107,7 @@ Failed to find &lsquo;<% $path |h %>&rsquo;.
 %
 % if (@$dd) {
 <h2>Subfolders</h2>
-%   for my $size (qw{bigthumb}) {
+%   for my $size (qw{medthumb}) {
 <div class="gallery <% $size %>">
 %     for my $d (@$dd) {
   <& .thumbnail, target => $d->name . "/", comment => $d->comment,
@@ -120,7 +120,7 @@ Failed to find &lsquo;<% $path |h %>&rsquo;.
 %
 % if (@$ff) {
 <h2>Images</h2>
-%   for my $size (qw{bigthumb}) {
+%   for my $size (qw{medthumb}) {
 <div class="gallery <% $size %>">
 %     for my $f (@$ff) {
   <& .thumbnail, target => $f->name, comment => $f->comment,
@@ -200,7 +200,7 @@ Failed to find &lsquo;<% $path |h %>&rsquo;.
 </div>
 %
 % my %img = map { $_ => TrivGal::Image->new($dir . "/" . $_->name) } @$ff;
-% for my $size (qw{bigthumb}) {
+% for my $size (qw{smallthumb medthumb bigthumb}) {
 <div class="thumbstrip <% $size %>">
 %   for my $f (@$ff) {
   <& .thumbnail, target => $f->name, img => $img{$f}, size => $size,
@@ -251,7 +251,7 @@ Failed to find &lsquo;<% $path |h %>&rsquo;.
 % if (defined $img) { $tn = $img->scale($size); }
 % else { $tn = "$STATICURL/folder.svg"; }
 % if ($focus) {
-  <figure class="thumb <% $size %>" id=focusthumb>
+  <figure class="thumb focusthumb <% $size %>">
     <img class="thumb <% $size %>" load=lazy src="<% $tn |u %>">
     <figcaption><span class=name><% $caption %></span></figcaption>
 % } else {