sc: apply html paging to 404 errors
[sheet.git] / sc.plp
diff --git a/sc.plp b/sc.plp
index c929c9abfb1a4032d516a8167015799a9bd5787e..042719abfc79cab58320c5e1393abf11d004acb5 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -24,8 +24,8 @@ my %scvers = (
 
 $Request ||= 'bw';
 $Request = 'lotv' if $Request eq '2';
-my %scver = %{ $scvers{$Request} }
-       or Abort("Requested version $Request not available", '404 unknown');
+my %scver = %{ $scvers{$Request} // {} }
+       or Html(), Abort("Requested version <q>$Request</q> not available", '404 request not found');
 
 my $datafile = "sc-units-$Request.inc.pl";
 
@@ -45,7 +45,7 @@ Html({
                $scver{major} < 2 ? qw' bw broodwar brood war ' :
                qw' starcraft2 lotv hots wol ',
        ],
-       stylesheet => [qw'light'],
+       stylesheet => [qw( light dark )],
        raw => '<link rel="stylesheet" type="text/css" media="all" href="/sc.css?1.2">',
        data => [$datafile],
 });