3 my $wordlist = 'wordlist.eng.inc.pl';
4 my $limit = $get{v} // (exists $get{v} ? 4 : 3);
7 title => 'words cheat sheet',
9 description => "Visual words",
18 grid: auto-flow dense / repeat(auto-fit, minmax(200px, 1fr));
26 box-sizing: border-box;
29 display: inline-block;
36 @media (min-width: 600px) and (min-height: 400px) {
37 p + ul > li:first-child > figure {
43 figure:hover ~ ul figure,
44 figure:hover ~ ul figcaption {
48 figure:hover ~ ul figcaption {
49 background: rgba(255, 255, 255, .5);
53 transition: all .5s ease-in;
55 li.parent:hover > figure > figcaption,
56 figure:hover > figcaption {
60 transform: translate(50%, 50%);
61 margin-left: -60%; /* keep width */
71 Zie ook <a href="/dieren">dieren</a>.
75 my $table = do $wordlist or die $@ // $!;
79 my ($imgname) = $name =~ /^([\w -]+)/;
80 $name =~ s/\w{4} [^aoeuiyc\W] [rl]?+ \K (?= [^aoeuiy\W] [rl]? [aoeuiy] \w)/­/gx;
81 $name =~ s{/(.*)}{ <small>($1)</small>}g;
82 my $hidden = $name =~ s/\?$//;
84 $name = "<q>$name</q>" if $name =~ s/\?$//;
85 $name = "<figcaption>$name</figcaption>";
87 if ($imgname and -e ($img = "data/word/eng/$imgname.jpg")) {
88 $name .= sprintf '<img src="/%s" alt="%s" />', $img, $imgname;
90 return sprintf '<figure%s>%s</figure>', $hidden && !exists $get{v} && ' hidden', $name;
96 my ($level, $mark, $title) = split /([a-z]*):/, $row, 2;
98 push @type, 'parent' if defined $table->{$row};
99 push @type, 'large' if $mark;
100 push @type, 'level'.($level || 0);
101 printf '<li%s>', @type ? sprintf ' class="%s"', join ' ', @type : '';
102 print showimg($title) if $level <= $limit;
103 printimgs(@{$_}) for $table->{$row} // ();
109 printimgs(@{$table->{''}});