common: global style options without page exceptions
authorMischa POSLAWSKY <perl@shiar.org>
Sat, 15 Jun 2024 01:36:55 +0000 (03:36 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 28 Aug 2024 21:41:39 +0000 (23:41 +0200)
Assume site-wide support now, as selected by client media regardless of
given page availability.

22 files changed:
apl.plp
base.plp
browser.plp
chars.plp
charset.plp
codec.plp
common.inc.plp
countries.plp
digits.plp
digraphs.plp
font.plp
keyboard.plp
keyboard/altgr/index.inc.plp
latin.plp
perl.plp
sample.plp
sc.plp
shell.plp
source.plp
termcol.plp
unicode.plp
writing.plp

diff --git a/apl.plp b/apl.plp
index 302a55d5d0af890c5eb8328fb9bb1d5aeafdd50e..349376e5734d45066cb1375a9674a73648beebe4 100644 (file)
--- a/apl.plp
+++ b/apl.plp
@@ -7,7 +7,6 @@ Html({
        ],
        keywords => [qw'
        '],
-       stylesheet => [qw'light circus dark red'],
        data => [qw'apl.inc.pl'],
        raw => <<'EOT',
 <style>
index a68a71ff6e1c5c30c0ce1bedb956fc4a75ba5f8d..be5a61183b513031873b5bc852f615351234f10b 100644 (file)
--- a/base.plp
+++ b/base.plp
@@ -9,7 +9,6 @@ Html({
        keywords => [qw'
                sheet cheat reference software overview summary help keyboard map unicode
        '],
-       stylesheet => [qw'light dark circus mono red'],
 });
 
 my @cols = (2, 6, 8, 9, 10, 12, 16, 18, 20);
index 6d75d4a35dc2023297707a09827bef847fff17aa..c32e808445eac2a1b3de582a5db0c1ae4dcf6012 100644 (file)
@@ -14,7 +14,6 @@ Html({
                html html5 css css3 svg javascript js dom mobile
                ie internet explorer firefox chrome safari webkit opera
        '],
-       stylesheet => [qw'circus dark mono red light'],
        data => ['data/browser/support.inc.pl'],
 });
 
index 91df3b83d817fd0640bc2c407a7b336292a0ec69..1723699019cde15f50e7a4fc608a59d9d8befd9a 100644 (file)
--- a/chars.plp
+++ b/chars.plp
@@ -6,7 +6,6 @@ Html({
        keywords => [qw'
                unicode glyph char character reference common ipa symbol sign mark table digraph
        '],
-       stylesheet => [qw'light dark mono circus red'],
        data => [qw( data/unicode-cover.inc.pl data/font data/unicode-char.inc.pl )],
        raw => <<'EOT',
 <style>
index f5b934cbd68f164ead19a2a16457673bc8214aaf..d832d653c17807ee466fd7c0b5ebfbaf978928b1 100644 (file)
@@ -15,7 +15,6 @@ Html({
                charset codepage unicode ascii utf8 latin glyph character encoding
                reference common overview table
        '],
-       (stylesheet => [qw'light dark']) x !$mode,
        data => [qw(
                charset.inc.pl charset-encoding.inc.pl
                charset-unicode.inc.pl charset-ucplanes.inc.pl charset-utf8.inc.pl
index f13b93ac198d545bbdcc5d12ab2a5eb35bc16867..1aeaa3ba9d8cf6708f0a6148bd6f6b8fccbc6db5 100644 (file)
--- a/codec.plp
+++ b/codec.plp
@@ -14,7 +14,6 @@ Html({
        version => '1.1',
        description => $info->{intro},
        keywords => [@{ $info->{keywords} // [] }, qw' feature comparison support benchmark '],
-       stylesheet => [qw'light circus dark red'],
        data => ["codec-$page.inc.pl"],
        raw => '<style>td,th {width:8%} tbody th {white-space:nowrap}</style>',
 });
index 4bc68a67ba10379fe6041fb19d1a70a060afb7d0..ff84a9ac191e950dcbe88e33fc590b79b4b7561d 100644 (file)
@@ -54,8 +54,7 @@ our $style;
 $header{content_type} = 'text/html; charset=utf-8';
 
 sub stylesheet {
-       my ($avail) = @_;
-       my @avail = ref $avail eq 'ARRAY' ? @{$avail} : $avail or return;
+       my @avail = qw( light dark circus mono red );
        my %styles = map {$_ => $_} @avail;
 
        if (defined( my $setstyle = $get{style} )) {
@@ -127,7 +126,6 @@ sub Html {
        }
 
        # default fallbacks
-       $meta->{stylesheet} ||= [qw( light dark circus mono red )];
        $meta->{charset} ||= 'utf-8';
        $meta->{lang} ||= 'en';
 
@@ -143,7 +141,7 @@ sub Html {
        unshift @{ $meta->{raw} }, (
                '<link rel="stylesheet" type="text/css" media="all" href="/light.css?1.20">',
        );
-       $meta->{stylesheet} = stylesheet($meta->{stylesheet});
+       $meta->{stylesheet} = stylesheet();
 
        if (my $img = $meta->{image}) {
                my $proto = sprintf('http%s://', !!$ENV{HTTPS} && 's');
index efd2f256407351c0c88973d6d165ccc398e56d32..c11a3e8c6192f1d013b64726eff98aa4d4700829 100644 (file)
@@ -6,7 +6,6 @@ Html({
        description =>
                "Table of ISO-3166-1 country codes with the names of reserved territories.",
        keywords => [qw'country code cc tld cctld continent territory land table'],
-       stylesheet => [qw'light dark circus mono red'],
        data => ['data/countries.inc.pl'],
 });
 
index a55b49a8ca6b8af706aa6e617021e4940ea3047b..ea44418702c2ab512e6e284c8c6b5604960fe674 100644 (file)
@@ -11,7 +11,6 @@ Html({
                script glyph unicode writing comparison list character
                history sample test language multilingual
        )],
-       stylesheet => [qw( light dark circus mono red )],
        data => [qw'writing-digits.inc.pl'],
        raw => <<'EOT',
 <style>
index 0fb9223267cdf23fc448a79ee0630b76f17eb40b..65d2a3bc99ec1673f7f0cdd1b2f352310e2fb023 100644 (file)
@@ -18,7 +18,6 @@ Html({
                digraph mnemonic compose composition pair
                character char glyph table unicode vim
        '],
-       stylesheet => [qw'light dark'],
        data => ["data/$include.json"],
 });
 
index d7892626e8b9792bcbce4cff5362339cdf738948..d69903ee7ec5af6a1834d8e00fd2ba53f28ca586 100644 (file)
--- a/font.plp
+++ b/font.plp
@@ -9,7 +9,6 @@ Html({
                unicode font glyph char character support overview cover coverage
                script block symbol sign mark reference table
        )],
-       stylesheet => [qw( light dark mono circus red )],
        data => [qw( data/unicode-cover.inc.pl )],
 });
 
index 3a40a4d22bf9b64a0525fa5403b0481a3a7b407f..551591080cbae47c1b0b341e3579fa981bbd35bf 100644 (file)
@@ -33,7 +33,6 @@ Html({
                sheet cheat reference overview keyboard control commands shortkey
        '],
        image => $info->{image},
-       stylesheet => [qw( light dark circus mono red )],
        data => ["$include.inc.pl"],
        raw => \@keystyle,
 });
index c6accc7669958fa79fd273e60ec06dae8414a54c..bf11415b5928f68105d7b39e718c570a1e08288b 100644 (file)
@@ -18,7 +18,6 @@ Html({
                sheet cheat reference overview keyboard altgr option
        '],
        image => "$dirbase/thumb/ibm-m.jpg",
-       stylesheet => [qw( light dark circus mono red )],
        data => ["$dirbase/index.inc.plp", "$indexfile.inc.pl"],
        raw => <<'.',
 <style>
index 578d858f73c2b14890ce2a720763a18e9654f8b5..e2f52dc7806859a40cee093a098e5148f183502b 100644 (file)
--- a/latin.plp
+++ b/latin.plp
@@ -11,7 +11,6 @@ Html({
                secret cursive fraktur blind braille morse deaf asl hand
                barcode bar color semaphore flag
        '],
-       stylesheet => [qw( light dark red mono )],
        data => ['writing-latn.inc.pl'],
 });
 
index cdfe47f333648cdf9c9c6c0261cdc8e8cc0f9df4..d6dfd9dcff1a3ee9dc47a693d79fb5a03c255f32 100644 (file)
--- a/perl.plp
+++ b/perl.plp
@@ -8,7 +8,6 @@ Html({
                sheet cheat overview summary
        '],
        image => 'data/camels.jpg',
-       stylesheet => [qw'light dark red'],
        data => ['perl.inc.pl'],
 });
 
index 36ad2b424e995697c25e7a6602e94b8c18cb0158..f7d06c9bcf97b32cb40f2284c3d28f4c2a44a4be 100644 (file)
@@ -5,7 +5,6 @@ my $textinc = 'sample.txt';
 Html({
        title => "unicode sampler",
        version => '2.1',
-       stylesheet => [qw'light dark mono red'],
        data => [$textinc],
        image => 'sample.png',
 });
diff --git a/sc.plp b/sc.plp
index 753ea4c68089c1145d53f85a9021fa3a0d55610b..255d28fd9fb33c44d6f163838675d0280f4e22ae 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -52,7 +52,6 @@ Html({
                $scver{major} < 2 ? qw' bw broodwar brood war ' :
                qw' starcraft2 lotv hots wol ',
        ],
-       stylesheet => [qw( light dark mono )],
        raw => '<link rel="stylesheet" type="text/css" media="all" href="/sc.css?1.3">',
        data => ["$datafile.inc.pl"],
 });
index 75ea57e2ddc97953f612724ad7ad283a04a4678d..23ff52647486a91b313253dc3b3b4ad36d184349 100644 (file)
--- a/shell.plp
+++ b/shell.plp
@@ -4,7 +4,6 @@ use List::Util qw(sum max first);
 Html({
        title => 'Shell compatibility cheat sheet',
        version => '1.0',
-       stylesheet => [qw'circus dark mono red light'],
        data => ['shell.inc.pl'],
 });
 
index 81b340886240d263439fde095a222862cf031a2d..7385218e05444826e641bf38d782aeb534481706 100644 (file)
@@ -37,7 +37,6 @@ Html({
        keywords => [qw'
                sheet cheat source code perl plp html agpl
        '],
-       stylesheet => [qw'light dark mono red'],
        data => [$source =~ m{\A($incname)\z}],
 });
 
index f76e293a31e3dcfbf4173abcfe3efe352f138569..a02ba35d0a634b49fa5cc060bcf6bdb5a4433357 100644 (file)
@@ -31,7 +31,6 @@ Html({
                ansi vt100 8bit 4bit cga ega vga rgb hsv game emulator display
        '],
        data => ['termcol.inc.pl'],
-       stylesheet => [qw'light dark'],
 });
 
 my @draw = map { [$_, s/\W+\z//] } grep { $_ } split m(/),
index a7d545992ac5247af24276413ddf29df8db3098e..ffee44f386fbb0c6a5d154458fa678aff8dd3191 100644 (file)
@@ -10,7 +10,6 @@ Html({
        keywords => [qw'
                unicode glyph char character reference common ipa symbol sign mark table digraph
        '],
-       stylesheet => [qw'light dark mono circus red'],
        data => [qw( unicode-table.inc.pl data/unicode-char.inc.pl )],
 });
 
index dfd78a4a77835f5943dd039b9a5abcc23dbc709d..56910829af1442f10e92e1ffb970aa431ec350bd 100644 (file)
@@ -14,7 +14,6 @@ Html({
                writing script glyph unicode character letter comparison history
                alphabet sample test language multilingual
        )],
-       stylesheet => [qw'light circus dark red mono'],
        data => ["$include.inc.pl"],
 });