language
'],
data => [$wordlist],
- raw => <<'EOT',
+ raw => (exists $get{q} && <<'EOT')
+<style>
+.gallery figure {
+ grid-row: span 1 !important;
+ grid-column: span 1 !important;
+}
+.gallery figcaption {
+ /* keep hover position */
+ right: 50%;
+ bottom: 50%;
+ transform: translate(50%, 50%);
+ /* hide */
+ visibility: hidden;
+ font-size: 0 !important;
+}
+.gallery figure:active > figcaption {
+ visibility: visible;
+ font-size: 175% !important;
+}
+</style>
+EOT
+ . <<'EOT',
<style>
body {
margin: 8px 1px;
<p>
Under construction.
Zie ook <a href="/dieren">dieren</a>.
+<a href="?q">Omit translations</a> to test.
</p>
<:
my ($id, $name) = @_;
my ($imgname) = $name =~ m{^([^/]+)};
$name =~ s/\w{4} [^aoeuiyc\W] [rl]?+ \K (?= [^aoeuiy\W] [rl]? [aoeuiy] \w)/­/gx;
- $name =~ s{/(.*)}{ <small>($1)</small>}g;
+ ($name, my @morenames) = split m{/}, $name;
+ $name =~ s{\( ([^/]+) \)}{<small>$1</small>}x;
+ $name .= " <small>($_)</small>" for @morenames;
my $hidden = $name =~ s/\?$//;
$name = "<q>$name</q>" if $name =~ s/\?$//;
$name = "<figcaption>$name</figcaption>";
}
say '<section class="gallery">';
-printimgs($table->{''}->[0]);
+if (exists $get{q}) {
+ my @rows = map {@$_} values %{$table}; # flatten categories
+ @rows = sort { rand <=> .5 } @rows;
+ $table = {};
+ printimgs(@rows);
+}
+else {
+ printimgs($Request || $table->{''}->[0]);
+}
say '</section>';