keyboard/altgr: order index by subpage categories
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 23 Jan 2024 22:44:05 +0000 (23:44 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 29 Jan 2024 17:16:03 +0000 (18:16 +0100)
keyboard/altgr/apl.eng.inc.pl
keyboard/altgr/eurkey.eng.inc.pl
keyboard/altgr/index.inc.plp
keyboard/altgr/ipa.eng.inc.pl
keyboard/altgr/macos-abc.eng.inc.pl
keyboard/altgr/macos.eng.inc.pl
keyboard/altgr/msx.eng.inc.pl
keyboard/altgr/spacecadet.eng.inc.pl
keyboard/altgr/ukext.eng.inc.pl
keyboard/altgr/windows.eng.inc.pl

index 6675fc4dfb61ecdac66e32693814d005e87b8d4a..81dcd0c28bf9585806a1f3d845c41c61c2713855 100644 (file)
@@ -101,6 +101,7 @@ $groups->{flag}{ext} = ['extended', 'optional operators not available in all var
        %{$groups},
        version => '1.0',
        title => 'APL',
+       category => 'specialised',
        intro => join("\n",
                'Resulting <a href="/charset">Unicode</a> characters',
                'of a typical <a href="/apl">APL</a> keyboard layout',
index a57a3ae288253c1f35ad0a95d19f03177b9f4ae7..a0b9ea21cbb7918c036256bb43d446a8913f1d30 100644 (file)
@@ -279,6 +279,7 @@ my %rows = (
        },
        version => '1.0',
        title => 'EurKEY',
+       category => 'latin',
        intro => join("\n",
                'Third-party proposal <a href="https://eurkey.steffen.bruentjen.eu/">EurKEY</a>',
                '<abbr title="last updated 2017-05-15">v1.3</abbr> by Steffen Brüntjen',
index 75c2cc382bced54cd0f6ea4061863ae65673099e..e4ed3d87324f55ad25f061033ae6a1902737eab1 100644 (file)
@@ -34,11 +34,13 @@ img {
 with AltGr or similar modifier keys.</p>
 
 <section class="gallery"><:
-for my $inc (@incs) {
-       $inc =~ s/\Q.inc.pl\E$//;
+my %idx = map {s/\Q.inc.pl\E$//; ($_ => eval{ Data($_) })} @incs;
+for my $inc (sort {
+       $idx{$a}{category} cmp $idx{$b}{category} || $a cmp $b
+} keys %idx) {
        print '<figure>';
        printf '<a href="/%s">', $inc =~ s/\.eng$//r;
-       if (my $table = eval { Data($inc) }) {
+       if ($table = $idx{$inc}) {
                if (my $img = $table->{image}) {
                        EscapeHTML $name = $table->{imagealt} // $img =~ m{.*/([^/.]*)};
                        print qq{<img src="/$img" alt="$name" />};
index e211335a0075acd8c77451a2c3ed770905b626ef..4fc3cd590bf9d1306d128bb8ef3b937a5e74516e 100644 (file)
@@ -125,6 +125,7 @@ my %rows = (
        %{ kbmodes(\%rows) },
        version => '1.0',
        title => 'UCL phonetic',
+       category => 'specialised',
        intro => join("\n",
                'Unicode Phonetic Keyboard',
                '<abbr title="dated 2009-06-28">v1.10</abbr> by Mark Huckvale',
index 133f84c5edba74433e95077578590bde173a45b9..e936009c122f33e6431a1fded2c468e914af5faa 100644 (file)
@@ -196,6 +196,7 @@ my %rows = (
        },
        version => '1.0',
        title => 'ABC option',
+       category => 'latin/macos',
        intro => join("\n",
                'Resulting <a href="/unicode">selection</a> of <a href="/charset">Unicode</a> characters',
                "while pressing ⌥ Option (Alt) with Apple's ABC Extended",
index 0d0718d24dd6de8234d30b9ca1d5299f0726af14..35d4447641017ac18555b64de94c6885e146e214 100644 (file)
@@ -104,6 +104,7 @@ my %rows = (
        %{ kbchars(\%rows) },
        version => '1.3',
        title => 'US option',
+       category => 'latin/windows',
        intro => join("\n",
                'Resulting <a href="/unicode">selection</a> of <a href="/charset">Unicode</a> characters',
                "while pressing ⌥ Option (Alt) with Apple's US (or US International) layout",
index d52a38df779f852213c1eb8904af354dbba1a5a5..7bf52965ac608559143ead8b774cc1bee376e457 100644 (file)
@@ -98,6 +98,7 @@ $groups->{flag}{ext} = ['anachrone', 'expected uppercase variants if allowed by
        %{ $groups },
        version => '1.1',
        title => 'msx code',
+       category => 'legacy/latin',
        intro => join("\n",
                'Resulting <a href="/unicode">selection</a> of equivalent <a href="/charset">Unicode</a> characters',
                "when the <em>code</em> key is pressed on an MSX home computer",
index 6805d53962c2b8a22d104750f099d80a3ee9bc11..75e2948b3a9f9215d4df343823c35eb748d1d37e 100644 (file)
@@ -93,6 +93,7 @@ my %rows = (
        %{ kbchars(\%rows) },
        version => '1.0',
        title => 'Space Cadet',
+       category => 'legacy',
        intro => join("\n",
                'Apparent <a href="/charset">glyphs</a> available',
                'on the 1978 Symbolics Space Cadet keyboard',
index 303648c0b80f87b0f053b9d8b749dbef5d222327..04181c45bfd838e227019a059347e939a135d634 100644 (file)
@@ -104,6 +104,7 @@ $rows{']'} = $rows{'#'};
 +{
        %{ kbchars(\%rows) },
        title => 'UK-extended',
+       category => 'latin',
        version => '1.0',
        intro => join("\n",
                "A Chrome OS extension",
index fc2f5d7a25e572e3c5a7363656d2a27529ce1705..252884dc9c978700ae516b1dbb0b4544a10ed324 100644 (file)
@@ -68,6 +68,7 @@ $groups->{flag}{ext} = ['xkb', 'unofficial extensions added in Linux (Gnome, KDE
 +{
        %{$groups},
        title => 'Windows AltGr',
+       category => 'latin/windows',
        version => '1.4',
        intro => join("\n",
                'Resulting <a href="/unicode">selection</a> of <a href="/charset">Unicode</a> characters',