index: release v1.18 with only altgr index linked
[sheet.git] / digits.plp
index bc435932e622727cbf2307330c018b19a3af494e..a55b49a8ca6b8af706aa6e617021e4940ea3047b 100644 (file)
@@ -13,6 +13,11 @@ Html({
        )],
        stylesheet => [qw( light dark circus mono red )],
        data => [qw'writing-digits.inc.pl'],
        )],
        stylesheet => [qw( light dark circus mono red )],
        data => [qw'writing-digits.inc.pl'],
+       raw => <<'EOT',
+<style>
+th:first-child { min-width: 10em }
+</style>
+EOT
 });
 
 :>
 });
 
 :>
@@ -24,7 +29,6 @@ in various <a href="/writing">writing systems</a>.</p>
 <div>
 
 <:
 <div>
 
 <:
-use List::Util qw( pairs );
 use Shiar_Sheet::FormatChar 1.08;
 my $glyphs = Shiar_Sheet::FormatChar->new;
 unless (exists $get{v}) {
 use Shiar_Sheet::FormatChar 1.08;
 my $glyphs = Shiar_Sheet::FormatChar->new;
 unless (exists $get{v}) {
@@ -33,21 +37,23 @@ unless (exists $get{v}) {
        $glyphs->{style} = 'univer';
 }
 
        $glyphs->{style} = 'univer';
 }
 
-my $scriptname = do 'writing-script.inc.pl';
-$_ = qq{<a href="/latin">$_</a>} for $scriptname->{latn} || ();
+my $scriptname = eval { Data('writing-script') };
+$_ = showlink($_, "/latin") for $scriptname->{latn} || ();
 
 
-my @table = do "writing-digits.inc.pl";
-die "Table data not found: $_\n" for $@ || $! || ();
+my $table = Data("writing-digits");
 
 
-say $glyphs->tabletag;
-for my $row (pairs @table) {
-       my ($id, $info) = @{$row};
-       my $title = $info->{title} // $scriptname->{$id} || $id;
-       print $glyphs->row([ ".>$title", @{$info->{list}} ]);
+sub printtable {
+       say '<div class=section>', $glyphs->tabletag;
+       for my $id (@_) {
+               my $info = $table->{$id};
+               my $title = $info->{title} // $scriptname->{$id} || $id;
+               print $glyphs->row([ ".>$title", @{$info->{list}} ]);
+       }
+       say '</table></div>';
 }
 }
-say '</table>';
 
 
-:></div>
+printtable(@{ $table->{$_} }) for @{ $table->{default} };
 
 
-<hr>
+say "</div>\n";
+say for '<hr/>', $glyphs->legend;