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