X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/cb397bfc503077962ce48f6dccb8fa8b6460ec0a..133e96335267b12bb7e97d9bbe551a3a043bd32a:/latin.plp?ds=inline
diff --git a/latin.plp b/latin.plp
index e0bb689..578d858 100644
--- a/latin.plp
+++ b/latin.plp
@@ -2,7 +2,7 @@
Html({
title => 'latin alphabet cheat sheet',
- version => '1.3',
+ version => '1.7',
description => [
],
keywords => [qw'
@@ -17,76 +17,9 @@ Html({
:>
@@ -110,25 +47,45 @@ or 'mercan) letters AâZ.
Also see related alphabets
and font comparison.
-
-
<:
-use List::Util qw( pairs );
-
-my @table = do 'writing-latn.inc.pl';
-if ($! or $@) {
- Alert("Table data not found", $@ || $!);
+my $table = Data('writing-latn');
+{
+ say '
';
+ say '\n";
}
-else {
- my %VOWELCOLS = (map { ($_ => 1) } 0, 4, 8, 14, 20, 24);
- say '
';
- for my $row (pairs @table) {
- my ($title, $cells) = @{$row};
- printf '', (lc $title) =~ s/<[^>]+>//gr =~ s/\s+/-/gr;
- say '', $title;
+
+my %VOWELCOLS = (map { ($_ => 1) } 0, 4, 8, 14, 20, 24);
+say '';
+say '';
+printtr('order');
+say '';
+printtr('default');
+say " ";
+
+sub printtr {
+ for my $id (@_) {
+ my $info = $table->{$id};
+
+ if (ref $info eq 'ARRAY') {
+ printtr(@{$info});
+ next;
+ }
+
+ printf ' |
', $id;
+ my $th = 'th';
+ $th .= sprintf ' title="%s"', $_ for $info->{title} || ();
+ say "<$th>", $info->{name} // ucfirst $id;
+
my $colspan = 1;
my $col = 0;
- for (@{$cells}) {
+ for (@{ $info->{list} }) {
$col++;
if ($_ eq '>') {
$colspan++;
@@ -155,11 +112,11 @@ else {
say;
}
}
- say "
\n";
}
-:>
-
+:>
-
+