3 my $wordlist = 'wordlist.eng.inc.pl';
5 title => 'words cheat sheet',
7 description => "Visual words",
32 display: inline-block;
35 figure:hover ~ ul figure,
36 figure:hover ~ ul figcaption {
40 figure:hover ~ ul figcaption {
41 background: rgba(255, 255, 255, .5);
45 transition: all .5s ease-in;
47 li.parent:hover > figure > figcaption,
48 figure:hover > figcaption {
52 transform: translate(50%, 50%);
53 margin-left: -60%; /* keep width */
64 Zie ook <a href="/dieren">dieren</a>.
68 my $table = do $wordlist or die $@ // $!;
72 my ($img) = $name =~ /^([\w -]+)/;
73 $name =~ s/\w{4} [^aoeuiyc\W] [rl]?+ \K (?= [^aoeuiy\W] [rl]? [aoeuiy] \w)/­/gx;
74 $name =~ s{/(.*)}{ <small>($1)</small>}g;
75 my $hidden = $name =~ s/\?$//;
77 $name = "<q>$name</q>" if $name =~ s/\?$//;
79 if ($img and -e ($img = "data/word/eng/$img.jpg")) {
80 my $alt = -l $img && readlink($img) =~ s/\.jpg$//r;
87 $name = "<figcaption>$name</figcaption>";
88 $name .= sprintf '<img src="/%s" alt="%s" />', $img, $alt;
91 $name = "<figcaption>$name?</figcaption>";
93 return sprintf '<figure%s>%s</figure>', $hidden && !exists $get{v} && ' hidden', $name;
99 printf '<li%s>', defined $table->{$row} && ' class="parent"';
101 printimgs(@{$_}) for $table->{$row} // ();
107 printimgs(@{$table->{''}});