common include for setup and stylesheet output
[sheet.git] / cc.plp
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>