keyboard/altgr/index: osicon font to render actual os logos
[sheet.git] / keyboard / altgr / index.inc.plp
index 7966426ed2ee2ec0c9b5f15dee1b3a7d4f1a65bb..c47bfeb1c67d19dc53b03ce713f58dc610c69bae 100644 (file)
@@ -47,6 +47,18 @@ Html({
        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;
@@ -98,10 +110,10 @@ require Shiar_Sheet::Keyboard;
 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';
@@ -148,8 +160,8 @@ for my $inc (sort {
                        }
                        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;
                say '</tr>';