git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e06a2e0
)
dieren: hidden images as easter eggs
author
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 23 Nov 2019 15:06:41 +0000
(16:06 +0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 6 May 2020 01:18:07 +0000
(
03:18
+0200)
dieren.plp
patch
|
blob
|
history
diff --git
a/dieren.plp
b/dieren.plp
index cb2039195780ea5fdbc1cb6db583b6ed460f3de0..42ca5eccb85ec6b73514ef2d63438e2360399f7d 100644
(file)
--- a/
dieren.plp
+++ b/
dieren.plp
@@
-21,6
+21,15
@@
img {
vertical-align: bottom;
width: 100%;
}
vertical-align: bottom;
width: 100%;
}
+img[hidden] {
+ transition: opacity 1s 0s;
+ display: inline;
+ opacity: 0;
+}
+img[hidden]:hover {
+ opacity: 1;
+ transition-delay: 2s;
+}
</style>
EOT
});
</style>
EOT
});
@@
-60,11
+69,16
@@
for my $name (@table) {
next;
}
print qq{<td title="$name">};
next;
}
print qq{<td title="$name">};
+ my $hidden = $name =~ s/\?$//;
if (-e (my $img = "data/dieren/$name.jpg")) {
printf '<img src="/%s"', $img;
printf ' alt="%s"', -l $img ? readlink($img) =~ s/\.jpg$//r : $name;
if (-e (my $img = "data/dieren/$name.jpg")) {
printf '<img src="/%s"', $img;
printf ' alt="%s"', -l $img ? readlink($img) =~ s/\.jpg$//r : $name;
+ print ' hidden' if $hidden;
print ' />';
}
print ' />';
}
+ elsif (!$hidden) {
+ print $name;
+ }
print '</td>';
}
say '</tr></table>';
print '</td>';
}
say '</tr></table>';