Html({
title => 'latin alphabet cheat sheet',
- version => '1.3',
+ version => '1.7',
description => [
],
keywords => [qw'
:>
<style>
- td {
- vertical-align: top;
- white-space: nowrap;
- }
- th {
- width: auto !important;
- }
-
td svg {
vertical-align: middle;
}
}
.sample {
- vertical-align: middle;
text-align: left;
padding: 1px 0.3em;
- white-space: normal;
+ }
+ td.sample {
+ width: auto;
+ }
+ th {
+ white-space: nowrap; /* prevent resize by sample */
}
</style>
Also see <a href="/writing">related alphabets</a>
and <a href="/chars/abc">font comparison</a>.</p>
-<div>
-
<:
-use List::Util qw( pairs );
-
-my @table = do 'writing-latn.inc.pl';
-if ($! or $@) {
- Alert("Table data not found", $@ || $!);
-}
-else {
+my $table = Data('writing-latn');
+{
+ say '<div>';
say '<style>';
- for my $row (pairs @table) {
- my ($id, $info) = @{$row};
+ while (my ($id, $info) = each %$table) {
+ ref $info eq 'HASH' or next;
my $style = $info->{style} or next;
ref $style or $style = [$style];
say "\t", !/^@/ && "#$id ", $_ for @{$style};
}
say "</style>\n";
+}
- my %VOWELCOLS = (map { ($_ => 1) } 0, 4, 8, 14, 20, 24);
- say '<table class="glyphs">';
- say '<thead><tr><th># <small>ASCII − 64</small>';
- print '<td>', $_ for 1 .. 26;
- say '</thead>';
-
- for my $row (pairs @table) {
- my ($id, $info) = @{$row};
+my %VOWELCOLS = (map { ($_ => 1) } 0, 4, 8, 14, 20, 24);
+say '<table class="glyphs">';
+say '<thead>';
+printtr('order');
+say '</thead>';
+printtr('default');
+say "</table></div>";
+
+sub printtr {
+ for my $id (@_) {
+ my $info = $table->{$id};
+
+ if (ref $info eq 'ARRAY') {
+ printtr(@{$info});
+ next;
+ }
printf '<tr id="%s">', $id;
- say '<th>', $info->{title} // ucfirst $id;
+ my $th = 'th';
+ $th .= sprintf ' title="%s"', $_ for $info->{title} || ();
+ say "<$th>", $info->{name} // ucfirst $id;
my $colspan = 1;
my $col = 0;
say;
}
}
- say "</table>\n";
}
-:></div>
-
+:>
<script type="text/javascript" src="/latinsample.js"></script>
-<script type="text/javascript"> prependinput(document.getElementById('intro')) </script>
+<script type="text/javascript"><!--
+ prependinput(document.getElementById('intro'));
+//--></script>