-:>
-<h1>Words</h1>
-
-<p>
-Under construction.
-Zie ook <a href="/dieren">dieren</a>.
-</p>
-
-<:
-my $table = do $wordlist or die $@ // $!;
-
-sub showimg {
- my ($id, $name) = @_;
- my ($imgname) = $name =~ m{^([^/]+)};
- $name =~ s/\w{4} [^aoeuiyc\W] [rl]?+ \K (?= [^aoeuiy\W] [rl]? [aoeuiy] \w)/­/gx;
- ($name, my @morenames) = split m{/}, $name;
- $name =~ s{\( ([^/]+) \)}{<small>$1</small>}x;
- $name .= " <small>($_)</small>" for @morenames;
- my $hidden = $name =~ s/\?$//;
- $name = "<q>$name</q>" if $name =~ s/\?$//;
- $name = "<figcaption>$name</figcaption>";
-
- if ($id and -e (my $img = "data/word/en/$id.jpg")) {
- $name .= sprintf '<img src="/%s" alt="%s" />', $img, $imgname;
- }
- return sprintf '<figure%s>%s</figure>', $hidden && !exists $get{v} && ' hidden', $name;
-}
-
-sub printimgs {
- say '<ul>';
- for my $row (@_) {
- my ($id, $level, $title) = split /:/, $row, 3;
- my @type;
- push @type, 'parent' if defined $table->{$id};
- push @type, 'large' if $level =~ s/c$//;
- push @type, 'level'.($level || 0);
- printf '<li%s>', @type ? sprintf ' class="%s"', join ' ', @type : '';
- print showimg($id, $title) if $level <= $limit;
- printimgs(@{$_}) for $table->{$id} // ();
- print '</li>';
- }
- say '</ul>';