.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;
use List::Util qw( uniq max );
my %caticon = (
- legacy => "\N{TOP HAT}",
- windows => "\x{1FA9F}", # \N{WINDOW}
- macos => "\N{RED APPLE}",
- xorg => "\N{PENGUIN}",
+ 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';
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>';
}
- print "\t<th>";
- print join '<br>', map { $caticon{$_} // () } split m{/}, $keys->{category};
+ print "\t<td class=ni>";
+ print join ' ', map { $caticon{$_} // () } split m{/}, $keys->{category};
say '';
- $keys->print_key('', $_, $keys->{def}{''}{$_} // 'ni') for @sample;
+ $keys->print_key('', $_, ($keys->{def}{''}{$_} // 'ni') =~ s/ mode\S*//r)
+ for @sample;
say '</tr>';
}
}