<: # included from keyboard.plp
use 5.014;
use warnings;
+use utf8;
my @incs = glob 'keyboard/altgr/*.eng.inc.pl';
.keys.big.cmp tbody {
font-size: 150%;
}
+@media (max-width: 48em) {
+ .keys.big.cmp tbody {
+ font-size: 100%;
+ }
+ .keys.big.cmp tbody a {
+ white-space: normal;
+ }
+}
.keys.cmp tbody {
display: table-row-group;
}
text-align: right;
}
+@font-face {
+ font-family: osicons;
+ src: url(/osicon.ttf);
+}
+.icon {
+ font-family: osicons;
+}
+.keys.cmp tbody .ni {
+ font-size: 80%;
+ padding: 0 .2em;
+}
+
.graph {
display: block;
line-height: 1ex;
require Shiar_Sheet::Keyboard;
use List::Util qw( uniq max );
+my %caticon = (
+ legacy => qq{<span class=icon title="deprecated">\N{TOP HAT}</span>},
+ windows => qq{<span class=icon title="Windows">\x{1FA9F}</span>}, # \N{WINDOW}
+ macos => qq{<span class=icon title="MacOS">\N{RED APPLE}</span>},
+ xorg => qq{<span class=icon title="Xorg">\N{PENGUIN}</span>},
+);
+
printf '<section class="%s">', @sample ? 'section' : 'gallery';
if (@sample) {
print '<table class="big keys cmp">';
- print '<thead><tr><th>';
+ print '<thead><tr><th colspan=2>';
print "<th>$_" for @sample;
say '</tr></thead>';
}
my $keys = Shiar_Sheet::Keyboard->new($table);
for my $mode ($keys->{mode} ? sort keys %{ $keys->{mode} } : '') {
my %inventory;
- $inventory{ s/ (?!ext).*//r }++ for values %{ $keys->{def}{$mode} };
+ $inventory{$_}++ for grep { /^g[2-9]/ } map { s/ (?!ext).*//r }
+ values %{ $keys->{def}{$mode} };
print '<span class=graph>';
print "<label>$_</label>" for $keys->{key}{$mode} =~ s/\s.*//r || ();
for my $g (sort keys %inventory) {
}
say '</span>';
}
- $keys->print_key('', $_, $keys->{def}{''}{$_} // 'ni') for @sample;
+ print "\t<td class=ni>";
+ print join ' ', map { $caticon{$_} // () } split m{/}, $keys->{category};
+ say '';
+ $keys->print_key('', $_, ($keys->{def}{''}{$_} // 'ni') =~ s/ mode\S*//r)
+ for @sample;
say '</tr>';
}
}