1 <: # included from keyboard.plp
5 my @incs = glob 'keyboard/altgr/*.eng.inc.pl';
8 title => "altgr keyboard cheat sheets",
11 "Overview of alternate keyboard modes,",
12 "offering extended Unicode characters if a modifier key",
13 "(such as AltGr or option) is pressed.",
16 sheet cheat reference overview keyboard altgr option
18 stylesheet => [qw( light dark circus mono red )],
19 data => ['keyboard/altgr/index.inc.plp', @incs],
31 <h1>Extended keyboards</h1>
33 <p>Representative images of available layouts
34 with AltGr or similar modifier keys.</p>
36 <section class="gallery"><:
37 my %idx = map {s/\Q.inc.pl\E$//; ($_ => eval{ Data($_) })} @incs;
39 $idx{$a}{category} cmp $idx{$b}{category} || $a cmp $b
42 printf '<a href="/%s">', $inc =~ s/\.eng$//r;
43 if ($table = $idx{$inc}) {
44 if (my $img = $table->{image}) {
45 EscapeHTML $name = $table->{imagealt} // $img =~ m{.*/([^/.]*)};
46 print qq{<img src="/$img" alt="$name" />};
48 $inc = $table->{title};
50 printf '<figcaption>%s</figcaption>', $inc;