10 data => [qw'apl.inc.pl'],
13 .target tbody td:nth-child(4) ~ td,
14 :target tbody td:nth-child(4) ~ td {
17 .target tbody td[title]::after,
18 :target tbody td[title]::after {
19 content: ': ' attr(title);
27 use Shiar_Sheet::FormatChar;
28 my $glyphs = Shiar_Sheet::FormatChar->new;
29 my $ops = Data('apl');
35 <table class="mapped" onclick="this.classList.toggle('target')">
36 <col><colgroup span=3><colgroup span=2>
42 <td title="unified/Dyalog key combination">⎈
43 <td><a href="/digraphs" title="digraph">di</a><td>html
44 <td title="…B">monadic
45 <td title="A…B">dyadic
49 for my $op (@{$ops}) {
55 my ($chr, $dyad, $monad) = @{$op};
56 ($chr, my $altkey) = split /\n/, $chr;
57 my $codepoint = ord $chr;
58 my $ascii = $codepoint <= 127;
59 my $info = $glyphs->glyph_info($codepoint);
60 my ($class, $name, $mnem, $entity, $string) = @{$info};
62 printf '<tr><th title="%2$s">%s', $chr, EscapeHTML($name || '?'), $class;
63 printf '<td class="%s">%s', @{$_} for (
64 [$ascii ? 'l5' : defined $altkey ? 'l4' : 'l3', $altkey],
65 [defined $mnem ? $class =~ /\bu-di\b/ ? 'l4' : 'l3' : $ascii ? 'l5' : 'l1',
66 EscapeHTML($mnem) // sprintf('%s%0*X', $codepoint < 256 ? (x => 2) : (u => 4), $codepoint)],
67 [defined $entity ? 'l4' : $ascii ? 'l5' : 'l1', $entity // "#$codepoint"],
71 map { defined ? (!!$_->[1] && qq( title="$_->[1]"), $_->[0]) : (' class=Xi', '') }
72 $_ && [map { EscapeHTML($_) } split /\n/, $_, 2]
81 say for '<hr/>', $glyphs->legend;