]> iEval git - plack-app-gruntmaster.git/blame - lib/Gruntmaster/Page/CSS.pm
Modernize templates
[plack-app-gruntmaster.git] / lib / Gruntmaster / Page / CSS.pm
CommitLineData
7dc32473
MG
1package Gruntmaster::Page::CSS;
2
3use 5.014000;
4use strict;
5use warnings;
6use Gruntmaster::Page::Base;
7our @ISA = qw/Gruntmaster::Page::Base/;
8our $VERSION = '0.001';
9
10use File::Slurp qw/read_file/;
11use CSS::Minifier::XS qw/minify/;
12
13sub generate{
14 my ($self, $format, $logger, $theme) = @_;
15 debug $logger => "theme is $theme";
16 my $css = read_file "css/themes/$theme.css";
17 $css .= read_file $_ for <css/*.css>;
18 [200, ['Content-Type' => 'text/css', 'Cache-Control' => 'max-age=604800'], [minify $css] ]
19}
20
21sub variants{ [[css => 1, 'text/css', undef, undef, undef, undef]] }
22
231
This page took 0.024723 seconds and 4 git commands to generate.