From: Mischa POSLAWSKY Date: Sat, 13 Jun 2015 02:40:28 +0000 (+0200) Subject: sc: version-specific page metadata X-Git-Tag: v1.8~166 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/3978c7991a5172d9753094770f24b56cca85d91b sc: version-specific page metadata Adapt headers and description to requested game version. --- diff --git a/sc.plp b/sc.plp index 55dbd09..3252cf3 100644 --- a/sc.plp +++ b/sc.plp @@ -1,37 +1,49 @@ <(common.inc.plp)><: -my $scver = 'bw'; +my %scver = ( + id => 'bw', + name => 'Brood War', + patch => 'version≥1.08', + title => 'starcraft', + game => 'StarCraft', + major => 1, +); + if ($ENV{PATH_INFO} and $ENV{PATH_INFO} eq '/2') { - my $scver = 'hots'; + %scver = ( + id => 'hots', + name => 'Heart of the Swarm', + patch => 'patch 2.1.3 BU', + title => 'starcraft2', + game => 'StarCraft II', + major => 2, + ); } -my $datafile = "sc-units-$scver.inc.pl"; +my $datafile = "sc-units-$scver{id}.inc.pl"; Html({ - title => 'starcraft unit cheat sheet', - version => 'v1.0', + title => "$scver{title} unit cheat sheet", + version => 'v1.1', description => [ - 'Reference of StarCraft unit properties,' - . ' comparing various statistics of all the units in Brood War' + "Reference of $scver{game} unit properties," + . " comparing various statistics of all the units in $scver{name}" . ' including costs, damage, defense, speed, ranges, and abilities.', ], - keywords => [qw' + keywords => [ + qw' starcraft game unit statistics stats comparison table sheet cheat reference software attributes properties - '], + ', + $scver{major} < 2 ? qw' bw broodwar brood war ' : qw' starcraft2 hots ', + ], stylesheet => [qw'light'], raw => '', data => [$datafile], }); -:> -

StarCraft units

- -

-Unit properties as seen or measured in Brood War -version≥1.08. -

+print "

$scver{game} units

\n\n"; +print "

Unit properties as seen or measured in $scver{name}\n$scver{patch}.\n

\n\n"; -<: sub coltoggle { my ($name, $id) = @_; return sprintf(