3 my $wordlist = 'wordlist.eng.inc.pl';
5 title => 'words cheat sheet',
7 description => "Visual words",
16 grid: auto-flow dense / repeat(auto-fit, minmax(200px, 1fr));
24 box-sizing: border-box;
27 display: inline-block;
30 figure:hover ~ ul figure,
31 figure:hover ~ ul figcaption {
35 figure:hover ~ ul figcaption {
36 background: rgba(255, 255, 255, .5);
40 transition: all .5s ease-in;
42 li.parent:hover > figure > figcaption,
43 figure:hover > figcaption {
47 transform: translate(50%, 50%);
48 margin-left: -60%; /* keep width */
59 Zie ook <a href="/dieren">dieren</a>.
63 my $table = do $wordlist or die $@ // $!;
67 my ($imgname) = $name =~ /^([\w -]+)/;
68 $name =~ s/\w{4} [^aoeuiyc\W] [rl]?+ \K (?= [^aoeuiy\W] [rl]? [aoeuiy] \w)/­/gx;
69 $name =~ s{/(.*)}{ <small>($1)</small>}g;
70 my $hidden = $name =~ s/\?$//;
72 $name = "<q>$name</q>" if $name =~ s/\?$//;
73 $name = "<figcaption>$name</figcaption>";
75 if ($imgname and -e ($img = "data/word/eng/$imgname.jpg")) {
76 $name .= sprintf '<img src="/%s" alt="%s" />', $img, $imgname;
78 return sprintf '<figure%s>%s</figure>', $hidden && !exists $get{v} && ' hidden', $name;
84 printf '<li%s>', defined $table->{$row} && ' class="parent"';
86 printimgs(@{$_}) for $table->{$row} // ();
92 printimgs(@{$table->{''}});