From 682883c393a571b058b75bc2e493f5722945a448 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 15 Jun 2024 03:36:55 +0200 Subject: [PATCH] common: global style options without page exceptions Assume site-wide support now, as selected by client media regardless of given page availability. --- apl.plp | 1 - base.plp | 1 - browser.plp | 1 - chars.plp | 1 - charset.plp | 1 - codec.plp | 1 - common.inc.plp | 6 ++---- countries.plp | 1 - digits.plp | 1 - digraphs.plp | 1 - font.plp | 1 - keyboard.plp | 1 - keyboard/altgr/index.inc.plp | 1 - latin.plp | 1 - perl.plp | 1 - sample.plp | 1 - sc.plp | 1 - shell.plp | 1 - source.plp | 1 - termcol.plp | 1 - unicode.plp | 1 - writing.plp | 1 - 22 files changed, 2 insertions(+), 25 deletions(-) diff --git a/apl.plp b/apl.plp index 302a55d..349376e 100644 --- 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', ', }); diff --git a/common.inc.plp b/common.inc.plp index 4bc68a6..ff84a9a 100644 --- a/common.inc.plp +++ b/common.inc.plp @@ -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} }, ( '', ); - $meta->{stylesheet} = stylesheet($meta->{stylesheet}); + $meta->{stylesheet} = stylesheet(); if (my $img = $meta->{image}) { my $proto = sprintf('http%s://', !!$ENV{HTTPS} && 's'); diff --git a/countries.plp b/countries.plp index efd2f25..c11a3e8 100644 --- a/countries.plp +++ b/countries.plp @@ -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'], }); diff --git a/digits.plp b/digits.plp index a55b49a..ea44418 100644 --- a/digits.plp +++ b/digits.plp @@ -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',