~mdw
/
tgal
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
b0e94d8
)
mason/dhandler (.contact): Report the number of subfolders and images.
author
Mark Wooding
<mdw@distorted.org.uk>
Thu, 15 Jun 2023 16:29:58 +0000
(17:29 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Thu, 15 Jun 2023 16:30:28 +0000
(17:30 +0100)
mason/dhandler
patch
|
blob
|
blame
|
history
diff --git
a/mason/dhandler
b/mason/dhandler
index
94c39cc
..
44ab7ed
100755
(executable)
--- a/
mason/dhandler
+++ b/
mason/dhandler
@@
-85,12
+85,14
@@
Failed to find ‘<% $path |h %>’.
my $size = "medthumb";
my %tn;
my $size = "medthumb";
my %tn;
+ my (%nd, %nf);
for my $f (@$ff)
{ $tn{$f} = TrivGal::Image->new($path . $f->name)->scale($size); }
for my $d (@$dd) {
my $p = join_paths $path, $d->name;
my ($ddd, $fff, $iii);
($ddd, $fff, $iii) = listdir join_paths $IMGROOT, $p;
for my $f (@$ff)
{ $tn{$f} = TrivGal::Image->new($path . $f->name)->scale($size); }
for my $d (@$dd) {
my $p = join_paths $path, $d->name;
my ($ddd, $fff, $iii);
($ddd, $fff, $iii) = listdir join_paths $IMGROOT, $p;
+ $nd{$d} = @$ddd; $nf{$d} = @$fff;
DIR: for (;;) {
if (defined $iii) {
my $index = join_paths $p, $iii->name;
DIR: for (;;) {
if (defined $iii) {
my $index = join_paths $p, $iii->name;
@@
-120,9
+122,13
@@
Failed to find ‘<% $path |h %>’.
<h2>Subfolders</h2>
<div class="gallery <% $size %>">
% for my $d (@$dd) {
<h2>Subfolders</h2>
<div class="gallery <% $size %>">
% for my $d (@$dd) {
+% my $count = "";
+% $count .= "$nd{$d}/" if $nd{$d};
+% $count .= "$nf{$d}" if $nf{$d};
<& .thumbnail, target => $d->name, comment => $d->comment,
tn => $tn{$d}, size => $size,
<& .thumbnail, target => $d->name, comment => $d->comment,
tn => $tn{$d}, size => $size,
- caption => $m->interp->apply_escapes($d->name, "h") &>\
+ caption =>
+ $m->interp->apply_escapes($d->name, "h") . " [$count]" &>\
% }
</div>
% }
% }
</div>
% }