common include for setup and stylesheet output
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 18 Oct 2009 17:57:40 +0000 (17:57 +0000)
committerMischa POSLAWSKY <perl@shiar.org>
Sun, 18 Oct 2009 18:19:21 +0000 (18:19 +0000)
21 files changed:
base.css
cc.plp
charset.plp
circus.css
common.inc.plp [new file with mode: 0644]
dark.css
digraphs.plp
index.plp
light.css [new file with mode: 0644]
mono.css
mplayer.plp
mutt.plp
nethack.plp
readline.plp
red.css
source.plp
termcol.plp
terse.css
unicode.plp
vim.plp
vimperator.plp

index b56604553895f31032df0d794bfbb014a5e23b12..5958cedf3208567c16325b1e02b953012770c589 100644 (file)
--- a/base.css
+++ b/base.css
@@ -1,9 +1,3 @@
-/* media features */
-
-@import url(terse.css) all and (max-width: 80em);
-
-@import url(mono.css) all and (monochrome);
-
 /* general */
 
 body {
diff --git a/cc.plp b/cc.plp
index afd10edcffb242df0f9e96df96d123957e28ad95..847324176763bdaa7e675c47c1fe363f48f4e688 100644 (file)
--- a/cc.plp
+++ b/cc.plp
@@ -1,12 +1,5 @@
-<:
-use utf8;
-use strict;
-use warnings;
-use open IO => ':utf8';
-
-our $VERSION = 'v1.0';
-
-$header{content_type} = 'text/html; charset=utf-8';
+<(common.inc.plp)><:
+       our $VERSION = 'v1.0';
 
 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
@@ -15,13 +8,7 @@ $header{content_type} = 'text/html; charset=utf-8';
 <head>
 <meta http-equiv="content-type" content="<:= $header{content_type} :>">
 <title>country code cheat sheet</title>
-<link rel="stylesheet" type="text/css" media="all" href="/base.css"><:
-       my %styles = map {$_ => $_} qw(dark mono red);
-       our $style = exists $get{style} && $styles{$get{style}} || 'light';
-       printf(qq{\n<link rel="%s" type="text/css" media="all" href="%s" title="%s">},
-               $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "/$_.css", $_
-       ) for keys %styles;
-:>
+<:= stylesheet(qw'light dark mono red') :>
 </head>
 
 <body>
index 73f93772f26738c1fbb37304d465841ebbe73388..29e7e23c5fb6030271b9f5dc57105aca7aed1003 100644 (file)
@@ -1,12 +1,5 @@
-<:
-use utf8;
-use strict;
-use warnings;
-use open IO => ':utf8';
-
-our $VERSION = 'v1.0';
-
-$header{content_type} = 'text/html; charset=utf-8';
+<(common.inc.plp)><:
+       our $VERSION = 'v1.0';
 
 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
@@ -15,7 +8,7 @@ $header{content_type} = 'text/html; charset=utf-8';
 <head>
 <meta http-equiv="content-type" content="<:= $header{content_type} :>">
 <title>charset cheat sheet</title>
-<link rel="stylesheet" type="text/css" media="all" href="/base.css">
+<:= stylesheet(qw'light') :>
 </head>
 
 <body id="charset">
index a6e77b79bc099b43d209a14c53290ff0d1bf8b89..fef9ef211c796ac35a2d6d88fc1086120f7a4572 100644 (file)
@@ -1,3 +1,6 @@
+@import url(base.css);
+@import url(terse.css) all and (max-width: 80em);
+
 .pm {background: #8F8} /* motion */
 .po {background: #BF6} /* window */
 .co {background: #FF6} /* command */
diff --git a/common.inc.plp b/common.inc.plp
new file mode 100644 (file)
index 0000000..576e39c
--- /dev/null
@@ -0,0 +1,21 @@
+<:
+use utf8;
+use strict;
+use warnings;
+no  warnings 'qw';  # you know what you doing
+no  warnings 'uninitialized';  # save some useless checks for more legible code
+use open IO => ':utf8';
+
+our $style;
+
+$header{content_type} = 'text/html; charset=utf-8';
+
+sub stylesheet {
+       my %styles = map {$_ => $_} @_;
+       $style = exists $get{style} && $styles{$get{style}} || $_[0];
+       return join "\n", map { sprintf(
+               '<link rel="%s" type="text/css" media="all" href="%s" title="%s">',
+               $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "/$_.css", $_
+       ) } @_;
+}
+
index 878c560b92ebbd215d336381c256a7c952c982bc..aa3c7d05a2172dc29886c8e554a6603808f5c9bb 100644 (file)
--- a/dark.css
+++ b/dark.css
@@ -1,3 +1,6 @@
+@import url(base.css);
+@import url(terse.css) all and (max-width: 80em);
+
 body {
        background: #000;
        color: #CCC;
index d44a7fa5dd1ae7f9f988aa4e368133437b153cff..5192c250d9a2a9f0206f6ed74d59d7b87b121a91 100644 (file)
@@ -1,13 +1,5 @@
-<:
-use utf8;
-use strict;
-use warnings;
-no  warnings 'qw';  # to quote or not to quote, that is the question
-use open IO => ':utf8';
-
-our $VERSION = 'v1.0';
-
-$header{content_type} = 'text/html; charset=utf-8';
+<(common.inc.plp)><:
+       our $VERSION = 'v1.0';
 
 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
@@ -16,13 +8,7 @@ $header{content_type} = 'text/html; charset=utf-8';
 <head>
 <meta http-equiv="content-type" content="<:= $header{content_type} :>">
 <title>digraph cheat sheet</title>
-<link rel="stylesheet" type="text/css" media="all" href="/base.css"><:
-       my %styles = map {$_ => $_} qw(dark circus mono red terse);
-       our $style = exists $get{style} && $styles{$get{style}} || 'light';
-       printf(qq{\n<link rel="%s" type="text/css" media="all" href="%s" title="%s">},
-               $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "$_.css", $_
-       ) for keys %styles;
-:>
+<:= stylesheet(qw'light') :>
 </head>
 
 <body id="digraphs">
index 21186125e0062fb2d77c61a537edff0610cc7476..096a6b5f9549a6c151583091692bb76b233da33a 100644 (file)
--- a/index.plp
+++ b/index.plp
@@ -1,11 +1,5 @@
-<:
-use utf8;
-use strict;
-use warnings;
-
-our $VERSION = 'v1.0';
-
-$header{content_type} = "text/html; charset=utf-8";
+<(common.inc.plp)><:
+       our $VERSION = 'v1.0';
 
 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
@@ -13,8 +7,8 @@ $header{content_type} = "text/html; charset=utf-8";
 
 <head>
 <meta http-equiv="content-type" content="<:= $header{content_type} :>">
-<title>vi cheat sheet</title>
-<link rel="stylesheet" type="text/css" media="all" href="base.css">
+<title>cheat sheets</title>
+<:= stylesheet(qw'light dark') :>
 <style type="text/css">
        ul {
                margin-bottom: 1ex;
diff --git a/light.css b/light.css
new file mode 100644 (file)
index 0000000..ae05d24
--- /dev/null
+++ b/light.css
@@ -0,0 +1,3 @@
+@import url(base.css);
+@import url(terse.css) all and (max-width: 80em);
+@import url(mono.css) all and (monochrome);
index 432b12b5540ca19dbe8a362f41077840d847dc97..826a7dab08883fa070a9f244ba3e7ac27bcea448 100644 (file)
--- a/mono.css
+++ b/mono.css
@@ -1,3 +1,6 @@
+@import url(base.css);
+@import url(terse.css) all and (max-width: 80em);
+
 body dl.legend-options dt {background: #EEE}
 
 body .pm {background: #FFF}   /* motion */
index a916b00d5165f394aacd0cf89f848d89a215ab63..9d7028d8d0fa461ed744a5d82929275f73f8c5b9 100644 (file)
@@ -1,34 +1,23 @@
-<:
-use utf8;
-use strict;
-use warnings;
-no  warnings 'qw';  # you know what you doing
-no  warnings 'uninitialized';  # save some useless checks for more legible code
-
-use Shiar_Sheet::KeySigns qw(%sign);
+<(common.inc.plp)><:
+       use Shiar_Sheet::KeySigns qw(%sign);
 
-our $VERSION = 'v1.0';
+       our $VERSION = 'v1.0';
 
-$header{content_type} = "text/html; charset=$sign{charset}";
+       $header{content_type} = "text/html; charset=$sign{charset}";
 
 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 
 <head>
-<title>mplayer cheat sheet</title>
 <meta http-equiv="content-type" content="<:= $header{content_type} :>">
-<link rel="stylesheet" type="text/css" media="all" href="base.css">
+<title>mplayer cheat sheet</title>
+<:= stylesheet(qw'light dark circus mono red terse') :>
 <!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->
 <!--[if lte IE 7]><style> .help dl.legend dd {float:none} </style><![endif]--><:
-       my %styles = map {$_ => $_} qw(dark circus mono red terse);
-       our $style = exists $get{style} && $styles{$get{style}} || 'light';
-       printf(qq{\n<link rel="%s" type="text/css" media="all" href="%s" title="%s">},
-               $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "$_.css", $_
-       ) for keys %styles;
-
        our $showkeys = exists $get{keys} && $get{keys} ne '0';
-       print "\n".'<style type="text/css"> .no {visibility:hidden} </style>' unless $showkeys;
+       print "\n".'<style type="text/css"> .no {visibility:hidden} </style>'
+               unless $showkeys;
        print "\n".'<style type="text/css"> .no, .alias {opacity:.5} </style>'
                if $showkeys and $get{keys} eq 'ghost';
 :>
index 22dcf3beedb450fe9b3c68004859bb07033a18eb..cd90e86e4f79f19a686b5d34f2155adb6c5a6d69 100644 (file)
--- a/mutt.plp
+++ b/mutt.plp
@@ -1,34 +1,23 @@
-<:
-use utf8;
-use strict;
-use warnings;
-no  warnings 'qw';  # you know what you doing
-no  warnings 'uninitialized';  # save some useless checks for more legible code
-
-use Shiar_Sheet::KeySigns qw(%sign);
+<(common.inc.plp)><:
+       use Shiar_Sheet::KeySigns qw(%sign);
 
-our $VERSION = 'v1.0';
+       our $VERSION = 'v1.0';
 
-$header{content_type} = "text/html; charset=$sign{charset}";
+       $header{content_type} = "text/html; charset=$sign{charset}";
 
 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 
 <head>
-<title>mutt cheat sheet</title>
 <meta http-equiv="content-type" content="<:= $header{content_type} :>">
-<link rel="stylesheet" type="text/css" media="all" href="base.css">
+<title>mutt cheat sheet</title>
+<:= stylesheet(qw'light dark circus mono red terse') :>
 <!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->
 <!--[if lte IE 7]><style> .help dl.legend dd {float:none} </style><![endif]--><:
-       my %styles = map {$_ => $_} qw(dark circus mono red terse);
-       our $style = exists $get{style} && $styles{$get{style}} || 'light';
-       printf(qq{\n<link rel="%s" type="text/css" media="all" href="%s" title="%s">},
-               $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "$_.css", $_
-       ) for keys %styles;
-
        our $showkeys = exists $get{keys} && $get{keys} ne '0';
-       print "\n".'<style type="text/css"> .no {visibility:hidden} </style>' unless $showkeys;
+       print "\n".'<style type="text/css"> .no {visibility:hidden} </style>'
+               unless $showkeys;
        print "\n".'<style type="text/css"> .no, .alias {opacity:.5} </style>'
                if $showkeys and $get{keys} eq 'ghost';
 :>
index 8e5ffa60568c0f0d185b32f5bd899984b3ed8816..c10c70cfd2bb81a3fa80ae5c36bf4747afa4bd1a 100644 (file)
@@ -1,15 +1,9 @@
-<:
-use utf8;
-use strict;
-use warnings;
-no  warnings 'qw';  # you know what you doing
-no  warnings 'uninitialized';  # save some useless checks for more legible code
-
-use Shiar_Sheet::KeySigns qw(%sign);
+<(common.inc.plp)><:
+       use Shiar_Sheet::KeySigns qw(%sign);
 
-our $VERSION = 'v1.0';
+       our $VERSION = 'v1.0';
 
-$header{content_type} = "text/html; charset=$sign{charset}";
+       $header{content_type} = "text/html; charset=$sign{charset}";
 
 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
@@ -18,17 +12,12 @@ $header{content_type} = "text/html; charset=$sign{charset}";
 <head>
 <meta http-equiv="content-type" content="<:= $header{content_type} :>">
 <title>nethack cheat sheet</title>
-<link rel="stylesheet" type="text/css" media="all" href="base.css">
+<:= stylesheet(qw'light dark circus mono red terse') :>
 <!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->
 <!--[if lte IE 7]><style> .help dl.legend dd {float:none} </style><![endif]--><:
-       my %styles = map {$_ => $_} qw(dark circus mono red terse);
-       our $style = exists $get{style} && $styles{$get{style}} || 'light';
-       printf(qq{\n<link rel="%s" type="text/css" media="all" href="%s" title="%s">},
-               $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "$_.css", $_
-       ) for keys %styles;
-
        our $showkeys = exists $get{keys} && $get{keys} ne '0';
-       print "\n".'<style type="text/css"> .no {visibility:hidden} </style>' unless $showkeys;
+       print "\n".'<style type="text/css"> .no {visibility:hidden} </style>'
+               unless $showkeys;
        print "\n".'<style type="text/css"> .no, .alias {opacity:.5} </style>'
                if $showkeys and $get{keys} eq 'ghost';
 :>
index 81421628e44370262bff8f1f771c527be53a6544..e1e3f109b21255801a9ed11284c215257cdf5297 100644 (file)
@@ -1,15 +1,9 @@
-<:
-use utf8;
-use strict;
-use warnings;
-no  warnings 'qw';  # you know what you doing
-no  warnings 'uninitialized';  # save some useless checks for more legible code
-
-use Shiar_Sheet::KeySigns qw(%sign);  # dependant on $get{ascii}
+<(common.inc.plp)><:
+       use Shiar_Sheet::KeySigns qw(%sign);  # dependant on $get{ascii}
 
-our $VERSION = 'v1.0';
+       our $VERSION = 'v1.0';
 
-$header{content_type} = "text/html; charset=$sign{charset}";
+       $header{content_type} = "text/html; charset=$sign{charset}";
 
 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
@@ -18,17 +12,12 @@ $header{content_type} = "text/html; charset=$sign{charset}";
 <head>
 <meta http-equiv="content-type" content="<:= $header{content_type} :>">
 <title>readline cheat sheet</title>
-<link rel="stylesheet" type="text/css" media="all" href="base.css">
+<:= stylesheet(qw'light dark circus mono red terse') :>
 <!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->
 <!--[if lte IE 7]><style> .help dl.legend dd {float:none} </style><![endif]--><:
-       my %styles = map {$_ => $_} qw(dark circus mono red terse);
-       our $style = exists $get{style} && $styles{$get{style}} || 'light';
-       printf(qq{\n<link rel="%s" type="text/css" media="all" href="%s" title="%s">},
-               $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "$_.css", $_
-       ) for keys %styles;
-
        our $showkeys = exists $get{keys} && $get{keys} ne '0';
-       print "\n".'<style type="text/css"> .no {visibility:hidden} </style>' unless $showkeys;
+       print "\n".'<style type="text/css"> .no {visibility:hidden} </style>'
+               unless $showkeys;
        print "\n".'<style type="text/css"> .no, .alias {opacity:.5} </style>'
                if $showkeys and $get{keys} eq 'ghost';
 :>
diff --git a/red.css b/red.css
index 5f9c06cf96ef7c449d848906cda4448e0ae448f6..d1e1060517d7532b45000f07f2f39d93f025d708 100644 (file)
--- a/red.css
+++ b/red.css
@@ -1,3 +1,5 @@
+@import url(base.css);
+
 body {
        background: #000;
        color: #CCC;
index 5359dbe01e37224b0f263e28be4d2714dcc6dccf..d87497988eb120811232f86b0b0fafd1dfafa37e 100644 (file)
@@ -1,11 +1,5 @@
-<:
-use utf8;
-use strict;
-use warnings;
-
-our $VERSION = 'v1.0';
-
-$header{content_type} = "text/html; charset=utf-8";
+<(common.inc.plp)><:
+       our $VERSION = 'v1.0';
 
 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
@@ -14,13 +8,7 @@ $header{content_type} = "text/html; charset=utf-8";
 <head>
 <meta http-equiv="content-type" content="<:= $header{content_type} :>">
 <title>sheet page source code</title>
-<link rel="stylesheet" type="text/css" media="all" href="/base.css"><:
-       my %styles = map {$_ => $_} qw(dark mono red);
-       our $style = exists $get{style} && $styles{$get{style}} || 'light';
-       printf(qq{\n<link rel="%s" type="text/css" media="all" href="%s" title="%s">},
-               $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "/$_.css", $_
-       ) for keys %styles;
-:>
+<:= stylesheet(qw'light dark mono red') :>
 </head>
 
 <body id="source">
index 9e9ad19858df894915ec08ef981db9b803e13683..321ea63ab4828999f8b24af5951094fb11abe18f 100644 (file)
@@ -1,13 +1,7 @@
-<:
-use utf8;
-use strict;
-use warnings;
-use open IO => ':utf8';
-use List::Util 'min';
-
-our $VERSION = 'v1.0';
+<(common.inc.plp)><:
+       use List::Util 'min';
 
-$header{content_type} = 'text/html; charset=utf-8';
+       our $VERSION = 'v1.0';
 
 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
@@ -16,7 +10,7 @@ $header{content_type} = 'text/html; charset=utf-8';
 <head>
 <title>terminal colour cheat sheet</title>
 <meta http-equiv="content-type" content="utf-8">
-<link rel="stylesheet" type="text/css" media="all" href="/base.css">
+<:= stylesheet(qw'light') :>
 </head>
 
 <body id="colour">
index 502bb5fbddfbd23fe87dfabcdac75d65aa3119d3..b286da6257fdde8e185b9bca4450635a7acb8d4c 100644 (file)
--- a/terse.css
+++ b/terse.css
@@ -1,3 +1,5 @@
+@import url(base.css);
+
 body ul.keys li {
        position: relative; /* hides overflow */
        width: 4.5em;
index 7207b03c224326127aa1e863e01487e0a9ad9880..ac631704979da9c6db8303200b04b71a467f708b 100644 (file)
@@ -1,13 +1,5 @@
-<:
-use utf8;
-use strict;
-use warnings;
-no  warnings 'qw';  # that's not a comment, it's a NUMBER SIGN
-use open IO => ':utf8';
-
-our $VERSION = 'v1.0';
-
-$header{content_type} = 'text/html; charset=utf-8';
+<(common.inc.plp)><:
+       our $VERSION = 'v1.0';
 
 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
@@ -16,13 +8,7 @@ $header{content_type} = 'text/html; charset=utf-8';
 <head>
 <meta http-equiv="content-type" content="utf-8">
 <title>digraph cheat sheet</title>
-<link rel="stylesheet" type="text/css" media="all" href="/base.css"><:
-       my %styles = map {$_ => $_} qw(dark circus mono red terse);
-       our $style = exists $get{style} && $styles{$get{style}} || 'light';
-       printf(qq{\n<link rel="%s" type="text/css" media="all" href="%s" title="%s">},
-               $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "$_.css", $_
-       ) for keys %styles;
-:>
+<:= stylesheet(qw'light dark') :>
 </head>
 
 <body id="unicode">
diff --git a/vim.plp b/vim.plp
index 8c666e94a5c6eee9469d3e29f2fa3fc0e99f06a3..cd855bf32131f8e3391be9d48e1c2eb2595f1ca2 100644 (file)
--- a/vim.plp
+++ b/vim.plp
@@ -1,15 +1,9 @@
-<:
-use utf8;
-use strict;
-use warnings;
-no  warnings 'qw';  # you know what you doing
-no  warnings 'uninitialized';  # save some useless checks for more legible code
-
-use Shiar_Sheet::KeySigns qw(%sign);  # dependant on $get{ascii}
+<(common.inc.plp)><:
+       use Shiar_Sheet::KeySigns qw(%sign);  # dependant on $get{ascii}
 
-our $VERSION = 'v1.2';
+       our $VERSION = 'v1.2';
 
-$header{content_type} = "text/html; charset=$sign{charset}";
+       $header{content_type} = "text/html; charset=$sign{charset}";
 
 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
@@ -18,17 +12,12 @@ $header{content_type} = "text/html; charset=$sign{charset}";
 <head>
 <meta http-equiv="content-type" content="<:= $header{content_type} :>">
 <title>vi cheat sheet</title>
-<link rel="stylesheet" type="text/css" media="all" href="base.css">
+<:= stylesheet(qw'light dark circus mono red terse') :>
 <!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->
 <!--[if lte IE 7]><style> .help dl.legend dd {float:none} </style><![endif]--><:
-       my %styles = map {$_ => $_} qw(dark circus mono red terse);
-       our $style = exists $get{style} && $styles{$get{style}} || 'light';
-       printf(qq{\n<link rel="%s" type="text/css" media="all" href="%s" title="%s">},
-               $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "$_.css", $_
-       ) for keys %styles;
-
        our $showkeys = exists $get{keys} && $get{keys} ne '0';
-       print "\n".'<style type="text/css"> .no {visibility:hidden} </style>' unless $showkeys;
+       print "\n".'<style type="text/css"> .no {visibility:hidden} </style>'
+               unless $showkeys;
        print "\n".'<style type="text/css"> .no, .alias {opacity:.5} </style>'
                if $showkeys and $get{keys} eq 'ghost';
 :>
index fe1080b7e4566d9bef5fd3f28ae263af47fda29e..3bc4d3b6f2604ddc1936cee45dd8b0feecba91cc 100644 (file)
@@ -1,34 +1,23 @@
-<:
-use utf8;
-use strict;
-use warnings;
-no  warnings 'qw';  # you know what you doing
-no  warnings 'uninitialized';  # save some useless checks for more legible code
-
-use Shiar_Sheet::KeySigns qw(%sign);
+<(common.inc.plp)><:
+       use Shiar_Sheet::KeySigns qw(%sign);
 
-our $VERSION = 'v1.0';
+       our $VERSION = 'v1.0';
 
-$header{content_type} = "text/html; charset=$sign{charset}";
+       $header{content_type} = "text/html; charset=$sign{charset}";
 
 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 
 <head>
-<title>vimperator cheat sheet</title>
 <meta http-equiv="content-type" content="<:= $header{content_type} :>">
-<link rel="stylesheet" type="text/css" media="all" href="base.css">
+<title>vimperator cheat sheet</title>
+<:= stylesheet(qw'light dark circus mono red terse') :>
 <!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->
 <!--[if lte IE 7]><style> .help dl.legend dd {float:none} </style><![endif]--><:
-       my %styles = map {$_ => $_} qw(dark circus mono red terse);
-       our $style = exists $get{style} && $styles{$get{style}} || 'light';
-       printf(qq{\n<link rel="%s" type="text/css" media="all" href="%s" title="%s">},
-               $_ eq $style ? 'stylesheet' : 'alternate stylesheet', "$_.css", $_
-       ) for keys %styles;
-
        our $showkeys = exists $get{keys} && $get{keys} ne '0';
-       print "\n".'<style type="text/css"> .no {visibility:hidden} </style>' unless $showkeys;
+       print "\n".'<style type="text/css"> .no {visibility:hidden} </style>'
+               unless $showkeys;
        print "\n".'<style type="text/css"> .no, .alias {opacity:.5} </style>'
                if $showkeys and $get{keys} eq 'ghost';
 :>