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