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;
34 @media (min-width: 600px) and (min-height: 400px) {
35 p + ul > li:first-child > figure {
41 figure:hover ~ ul figure,
42 figure:hover ~ ul figcaption {
46 figure:hover ~ ul figcaption {
47 background: rgba(255, 255, 255, .5);
51 transition: all .5s ease-in;
53 li.parent:hover > figure > figcaption,
54 figure:hover > figcaption {
58 transform: translate(50%, 50%);
59 margin-left: -60%; /* keep width */
70 Zie ook <a href="/dieren">dieren</a>.
74 my $table = do $wordlist or die $@ // $!;
78 my ($imgname) = $name =~ /^([\w -]+)/;
79 $name =~ s/\w{4} [^aoeuiyc\W] [rl]?+ \K (?= [^aoeuiy\W] [rl]? [aoeuiy] \w)/­/gx;
80 $name =~ s{/(.*)}{ <small>($1)</small>}g;
81 my $hidden = $name =~ s/\?$//;
83 $name = "<q>$name</q>" if $name =~ s/\?$//;
84 $name = "<figcaption>$name</figcaption>";
86 if ($imgname and -e ($img = "data/word/eng/$imgname.jpg")) {
87 $name .= sprintf '<img src="/%s" alt="%s" />', $img, $imgname;
89 return sprintf '<figure%s>%s</figure>', $hidden && !exists $get{v} && ' hidden', $name;
96 push @type, 'parent' if defined $table->{$row};
97 push @type, 'large' if $row =~ /^\*/;
98 printf '<li%s>', @type ? sprintf ' class="%s"', join ' ', @type : '';
99 print showimg($row =~ s/^\*//r);
100 printimgs(@{$_}) for $table->{$row} // ();
106 printimgs(@{$table->{''}});