sc: spread related data over second line on small screens
[sheet.git] / sc.plp
diff --git a/sc.plp b/sc.plp
index c7aec309352f933ba9c2348fd7fe56aac4e320a9..0a4101821ff6d35f33d2a50b11a0e2d4c4ea9088 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -103,12 +103,12 @@ sub coltoggle {
 :><table class="units">
 <thead><tr>
        <th><:= coltoggle(exists $get{order} ? 'race' : 'source' => '') :></th>
 :><table class="units">
 <thead><tr>
        <th><:= coltoggle(exists $get{order} ? 'race' : 'source' => '') :></th>
-       <th><:= coltoggle(name => 'name') :></th>
+       <th class="unit-name"><:= coltoggle(name => 'name') :></th>
        <th class="val min" title=minerals><:= coltoggle(cost => 'cost') :></th>
        <th class="val gas">gas</th>
        <th class="val time"><:= coltoggle(build => 'build') :></th>
        <th class="unit" colspan="2"><:= coltoggle(qw'size size') :></th>
        <th class="val min" title=minerals><:= coltoggle(cost => 'cost') :></th>
        <th class="val gas">gas</th>
        <th class="val time"><:= coltoggle(build => 'build') :></th>
        <th class="unit" colspan="2"><:= coltoggle(qw'size size') :></th>
-       <th class="unit" colspan="2">attr</th>
+       <th class="unit unit-attr" colspan="2">attr</th>
        <th class="val unit-hp"><:= coltoggle(HP => 'hp') :></th>
        <th class="val unit-shield">shield</th>
        <th class="val unit-armor" title="armor">⛨</th>
        <th class="val unit-hp"><:= coltoggle(HP => 'hp') :></th>
        <th class="val unit-shield">shield</th>
        <th class="val unit-armor" title="armor">⛨</th>
@@ -290,7 +290,7 @@ sub showrangeint {
                                ),
                                defined $_->{size} && sprintf('⌀%.1f ', $_->{size}),
                        ),
                                ),
                                defined $_->{size} && sprintf('⌀%.1f ', $_->{size}),
                        ),
-                       sprintf('<td class="val unit%s">%s',
+                       sprintf('<td class="val unit unit-pop%s">%s',
                                defined $_->{pop} && $_->{pop} < 0 && ' unit-supply',
                                defined $_->{pop} && $_->{pop} == .5 ? '½' : $_->{pop},
                        ),
                                defined $_->{pop} && $_->{pop} < 0 && ' unit-supply',
                                defined $_->{pop} && $_->{pop} == .5 ? '½' : $_->{pop},
                        ),
@@ -349,10 +349,10 @@ sub showrangeint {
                                && qq'<span class="unit unit-jump" title="$_->{attr}->{jump}">↕</span>',
                        '<td class="unit-magic">' . showmagic($_),
                        !$_->{attack}->[1] ? () : (
                                && qq'<span class="unit unit-jump" title="$_->{attr}->{jump}">↕</span>',
                        '<td class="unit-magic">' . showmagic($_),
                        !$_->{attack}->[1] ? () : (
-                               '<tr><td colspan=12>', showattack($_, 1), '<td colspan=3>'
+                               '<tr><th class="cat" colspan="2"><td colspan=10>', showattack($_, 1), '<td colspan=3>'
                        ),
                        !$_->{attack}->[2] ? () : (
                        ),
                        !$_->{attack}->[2] ? () : (
-                               '<tr><td colspan=12>', showattack($_, 2), '<td colspan=3>'
+                               '<tr><th class="cat" colspan="2"><td colspan=10>', showattack($_, 2), '<td colspan=3>'
                        ),
                        "\n"
                );
                        ),
                        "\n"
                );