From: Mischa POSLAWSKY Date: Tue, 13 Oct 2009 03:53:35 +0000 (+0000) Subject: cc: alternate stylesheets X-Git-Tag: v1.3~118 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/90bfe9a4d5cb83c325d989f260c1e1e1f6c74427 cc: alternate stylesheets --- diff --git a/cc.plp b/cc.plp index 08a2341..2162668 100644 --- a/cc.plp +++ b/cc.plp @@ -15,7 +15,13 @@ $header{content_type} = 'text/html; charset=utf-8'; country code cheat sheet - +<: + my %styles = map {$_ => $_} qw(dark mono red); + our $style = exists $get{style} && $styles{$get{style}} || 'light'; + printf(qq{\n}, + $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "/$_.css", $_ + ) for keys %styles; +:> @@ -34,7 +40,7 @@ sub quote { { printf ''; - print ''; + print ''; for my $section (qw{thead}) { print "<$section>
↱"; print '', $_ for 'a' .. 'z'; @@ -89,11 +95,11 @@ sub quote { africa europe asia - oceania antarctica + oceania south america north america - reserved + reserved user-assigned
diff --git a/dark.css b/dark.css index 732a563..878c560 100644 --- a/dark.css +++ b/dark.css @@ -70,6 +70,7 @@ th, td { td.X {background: #000} /* unidentified */ td.Xr {background: #111} /* reverse */ +td.Co {background: #181111} /* private */ /* implementation-based alternatives */ td.di-b {background: #411} /* bmp */ @@ -79,6 +80,15 @@ td.di-a {background: #131} /* ascii */ td.di-rare {background: #181818} /* disfavoured */ td.di-invalid {background: #222} /* impossible */ +/* continents */ +td.c-af {background: #1C1C00} +td.c-eu {background: #221400} +td.c-as {background: #200} +td.c-oc {background: #102} +td.c-aa {background: #012} +td.c-sa {background: #001A1A} +td.c-na {background: #001800} + .glyphs tbody td:hover {color: #000} .glyphs tbody td:hover small {color: #FFF} diff --git a/mono.css b/mono.css index 30f878a..432b12b 100644 --- a/mono.css +++ b/mono.css @@ -21,6 +21,8 @@ body ul.keys li.new { border-color: #888; } +td.Co {background: #FFF} /* private */ + /* code syntax */ #source pre { color: #444 } .sy-comment { color: #888; text-shadow: #888 0 0 1em } @@ -33,3 +35,12 @@ body ul.keys li.new { .sy-error { font-weight: bold; background-color: #000; color: #FFF } .sy-todo { background-color: #CCC } +/* continents */ +td.c-af {background: #000; color: #FFF} +td.c-eu {background: #333; color: #FFF} +td.c-as {background: #666; color: #FFF} +td.c-aa {background: #999; color: #FFF} +td.c-oc {background: #BBB} +td.c-sa {background: #999} +td.c-na {background: #666} + diff --git a/red.css b/red.css index 85938a9..5f9c06c 100644 --- a/red.css +++ b/red.css @@ -61,6 +61,32 @@ dt.pm, dt.mv, color: #FF0; } /* mode link */ +td.X { /* unidentified */ + background: #000; + border-color: #800; + border-width: 1px; +} +th, td, td.Co { + background: #000; + border-color: #300; + border-width: 1px 0 0 1px; /* no precedence */ +} +td.Co {background: #200 } /* private */ +tbody, colgroup, th { + background: #800 !important; + border: 1px solid #800; +} + +/* continents */ +td.c-af {background: #100; color: #FFF} +td.c-eu {background: #300; color: #FFF} +td.c-as {background: #500; color: #FFF} +td.c-aa {background: #400; color: #8BC} +td.c-oc {background: #100; color: #8BC} +td.c-sa {background: #100; color: #DD6} +td.c-na {background: #300; color: #DD6} +td.X:hover {background: #800; color: #FF0} + /* code syntax */ .sy-comment { color: #888 } .sy-constant { color: #C88 }