writing: declare utf8 source of perl includes
[sheet.git] / sc.plp
diff --git a/sc.plp b/sc.plp
index cd07f24738ee01855005f40e3caeac490da6b36c..23d29ec7d87f69478348f2738679faaf7f8e9df3 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -28,6 +28,7 @@ Unit properties as seen or measured in Brood War
                border-collapse: separate;
                border-spacing: 0;
                margin: 0 auto;
+               white-space: nowrap;
        }
        .units th, .units td {
                border: 0;
@@ -51,10 +52,6 @@ Unit properties as seen or measured in Brood War
                margin: 0;
                text-align: center;
        }
-       .units th.cat {
-               font-size: 70%;
-               text-transform: uppercase;
-       }
        .units thead th, .units tfoot th {
                font-size: 70%;
                font-weight: normal;
@@ -106,12 +103,9 @@ Unit properties as seen or measured in Brood War
                text-align: right;
        }
 
-       .legend dl {
-               text-align: left;
-               -moz-column-width: 20em;
-               -webkit-column-width: 20em;
-       }
        .legend dt {
+               float: none;
+               text-align: left;
                margin-top: 1ex;
                font-weight: bold;
        }
@@ -120,11 +114,19 @@ Unit properties as seen or measured in Brood War
        }
        .legend dd {
                text-indent: -1em;
-               margin-left: 2em;
+               margin-left: 1em;
                break-before: avoid;
-               break-inside: avoid;
                -webkit-column-break-before: avoid;
        }
+
+       .units, .legend {
+               display: table-cell;
+       }
+       .legend {
+               min-width: 15em;
+               padding-left: 2em;
+               text-align: left;
+       }
 </style>
 
 <:
@@ -140,8 +142,8 @@ sub coltoggle {
 <thead><tr>
        <th></th>
        <th><:= coltoggle('name', '') :></th>
-       <th class="val min"><img src="minerals.png" alt="min"></th>
-       <th class="val gas"><img src="gas.png" alt="gas"></th>
+       <th class="val min"><img src="/minerals.png" alt="min"></th>
+       <th class="val gas"><img src="/gas.png" alt="gas"></th>
        <th class="val time"><:= coltoggle(qw'build cost') :></th>
        <th class="unit" colspan="2"><:= coltoggle(qw'size size') :></th>
        <th class="val unit-hp">HP</th>
@@ -154,7 +156,6 @@ sub coltoggle {
        <th class="val unit-speed">speed</th>
        <th class="unit-magic">specials</th>
 </tr></thead>
-<tbody>
 <:
 sub showrange {
        my ($row, @elements) = @_;
@@ -254,7 +255,7 @@ sub showrange {
        my ($race, $cat) = ('', '');
        for (@rows) {
                $race = $_->{race},
-               printf '</tbody><tbody id="%s"><tr class="race"><th colspan="18"><h2>%s</h2>'."\n", $race, ucfirst $race
+               printf '<tbody id="%s"><tr class="race"><th colspan="18"><h2>%s</h2>'."\n", $race, ucfirst $race
                        if $grouped and $race ne $_->{race};
                $_->{cat} = $_->{race} if not $grouped;
                my $sizechar = [qw/? s m l/]->[$_->{size}];
@@ -269,10 +270,10 @@ sub showrange {
                        '<td class="val unit">' . join('',
                                $_->{unit} ? $_->{unit} == .5 ? '½' : $_->{unit} : '&nbsp;',
                                defined $_->{organic} && sprintf(
-                                       '<img class="unit-%s" src="s%s.png" alt="%s">',
+                                       '<span class="unit-%s" title="%s">%s</span>',
                                        $_->{organic} ? 'o' : 'u',
-                                       $_->{race} . ($_->{organic} ? 'o' : ''),
-                                       $_->{organic} ? 'o' : 'm'
+                                       $_->{organic} ? 'organic' : 'mechanic',
+                                       $_->{organic} ? 'o' : 'm',
                                ),
                        ),
                        '<td class="val unit-hp">' . $_->{hp},
@@ -307,7 +308,6 @@ sub showrange {
                }
        }
 :>
-</tbody>
 </table>
 
 <div class="legend">