3 my $wordlist = 'wordlist.inc.pl';
5 title => 'words cheat sheet',
7 description => "Visual words",
32 figure:hover ~ ul figure,
33 figure:hover ~ ul figcaption {
37 figure:hover ~ ul figcaption {
38 background: rgba(255, 255, 255, .5);
42 transition: all .5s ease-in;
44 li.parent:hover > figure > figcaption,
45 figure:hover > figcaption {
49 transform: translate(50%, 50%);
50 margin-left: -60%; /* keep width */
61 Zie ook <a href="/dieren">dieren</a>.
65 my %table = do 'wordlist.inc.pl' or die $@ // $!;
69 my ($img) = $name =~ /^([\w-]+)/;
70 $name =~ s/\w{4} [^aoeuiyc\W] [rl]?+ \K (?= [^aoeuiy\W] [rl]? [aoeuiy] \w)/­/gx;
72 my $hidden = $name =~ s/\?$//;
74 $name = "<q>$name</q>" if $name =~ s/\?$//;
76 if ($img and -e ($img = "data/word/$img.jpg")) {
77 my $alt = -l $img && readlink($img) =~ s/\.jpg$//r;
84 $name = "<figcaption>$name</figcaption>";
85 $name .= sprintf '<img src="/%s" alt="%s" />', $img, $alt;
88 $name = "<figcaption>$name?</figcaption>";
90 return sprintf '<figure%s>%s</figure>', $hidden && !exists $get{v} && ' hidden', $name;
96 printf '<li%s>', defined $table->{$row} && ' class="parent"';
98 printimgs(@{$_}) for $table->{$row} // ();
104 printimgs(@{$table->{''}});