latin: common styling for tap code rows
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 2 Apr 2017 14:05:53 +0000 (16:05 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 24 Apr 2017 18:25:54 +0000 (20:25 +0200)
latin.plp
writing-latn.inc.pl

index 8c2bef5a32019d82b639f0c48ff57c1b80407666..6d23534414ceef6883a09bc46508b0eb9c17ae1c 100644 (file)
--- a/latin.plp
+++ b/latin.plp
@@ -22,6 +22,10 @@ Html({
                src: url("/suetterlin.ttf");
        }
        #sütterlin td { font-family: Suetterlin }
                src: url("/suetterlin.ttf");
        }
        #sütterlin td { font-family: Suetterlin }
+       #tap-code td,
+       #tap-simplified td {
+               line-height: 1ex;
+       }
 
        svg path:not([fill]) {
                stroke: currentColor;
 
        svg path:not([fill]) {
                stroke: currentColor;
@@ -58,7 +62,7 @@ else {
                my ($title, $cells) = @{$row};
                printf '<tr id="%s">', (lc $title) =~ s/<[^>]+>//gr =~ s/\s+/-/gr;
                say '<th>', $title;
                my ($title, $cells) = @{$row};
                printf '<tr id="%s">', (lc $title) =~ s/<[^>]+>//gr =~ s/\s+/-/gr;
                say '<th>', $title;
-               print /^<td/ ? $_ : "\t<td>$_\n" for @{$cells};
+               say "\t", '<td>' x !/^<td/, $_ for @{$cells};
        }
        say "</table>\n";
 }
        }
        say "</table>\n";
 }
index 018a632f8de3ecccd4a67436d7fdc9b181aa58a9..0ce54d37a91f08ce838856c313b3ce5f458be0c2 100644 (file)
@@ -3,7 +3,7 @@ use utf8;
 sub disptap {
        return map {
                m/\A(-?)(\d)(\d)/;
 sub disptap {
        return map {
                m/\A(-?)(\d)(\d)/;
-               sprintf('<td style="line-height:1ex"%s>%s<br>%s</td>',
+               sprintf('<td%s>%s<br>%s',
                        ' class=ex' x !!$1,
                        '·' x $2, '·' x $3,
                );
                        ' class=ex' x !!$1,
                        '·' x $2, '·' x $3,
                );