latin: style exceptions in row definitions
[sheet.git] / latin.plp
index 58c103f3f74dda9ead95c6e4e545e72876a1e239..25d8b1027e2185e35872df02bb740c97f7d4d643 100644 (file)
--- a/latin.plp
+++ b/latin.plp
@@ -17,83 +17,17 @@ Html({
 
 :>
 <style>
-       @font-face {
-               font-family: Suetterlin; /* R. G. Arens */
-               src: url("/suetterlin.ttf");
-       }
-       #suetterlin td { font-family: Suetterlin }
-       #ita2 td,
-       #tap td,
-       #shorttap td {
-               white-space: normal;
-               word-spacing: 5em; /* force line break between words */
-       }
-       #tap td,
-       #shorttap td {
-               line-height: 1ex;
-       }
-       #ita2 td {
-               font-size: 50%;
-       }
-       #cards td {
-               font-family: Symbola, "DejaVu Sans", serif, sans;
-       }
-       #pigpen {
-               stroke-linecap: square;
-       }
-       #nyctographs,
-       #roman {
-               stroke-linecap: round;
-               stroke-linejoin: round;
-       }
        td {
+               vertical-align: top;
                white-space: nowrap;
        }
        th {
                width: auto !important;
        }
 
-       .sample {
+       td svg {
                vertical-align: middle;
-               text-align: left;
-               padding: 1px 0.3em;
-       }
-       #roman .sample span {
-               margin-right: -10px;
-       }
-       #tap .sample,
-       #shorttap .sample {
-               font-size: 80%;
-       }
-       #ita2 .sample,
-       #tap .sample,
-       #shorttap .sample {
-               word-spacing: 0;
-       }
-       #ita2 .sample span,
-       #tap .sample span,
-       #shorttap .sample span {
-               margin-right: 1ex;
-               white-space: nowrap;
        }
-       #sutton .sample span,
-       #maritime .sample span,
-       #morse .sample span {
-               margin-right: 0.5ex;
-       }
-       #pigpen .sample svg {
-               margin-right: 0.1em;
-       }
-       #nyctographs .sample svg {
-               background: rgba(0,0,0, .1);
-               padding: 0.1em;
-               margin-right: 0.2em;
-       }
-       #unistrokes svg path {
-               stroke-linecap: round;
-               stroke-linejoin: round;
-       }
-
        svg path:not([fill]) {
                stroke: currentColor;
                fill: none;
@@ -102,11 +36,10 @@ Html({
                fill: currentColor;
        }
 
-       td {
-               vertical-align: top;
-       }
-       td svg {
+       .sample {
                vertical-align: middle;
+               text-align: left;
+               padding: 1px 0.3em;
        }
 </style>
 
@@ -127,6 +60,15 @@ if ($! or $@) {
        Alert("Table data not found", $@ || $!);
 }
 else {
+       say '<style>';
+       for my $row (pairs @table) {
+               my ($id, $info) = @{$row};
+               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>';