package Gruntmaster::Page::CSS;

use 5.014000;
use strict;
use warnings;
use Gruntmaster::Page::Base;
our @ISA = qw/Gruntmaster::Page::Base/;
our $VERSION = '0.001';

use File::Slurp qw/read_file/;
use CSS::Minifier::XS qw/minify/;

sub generate{
	my ($self, $format, $logger, $theme) = @_;
	debug $logger => "theme is $theme";
	my $css = read_file "css/themes/$theme.css";
	$css .= read_file $_ for <css/*.css>;
	[200, ['Content-Type' => 'text/css', 'Cache-Control' => 'max-age=604800'], [minify $css] ]
}

sub variants{ [[css => 1, 'text/css', undef, undef, undef, undef]] }

1
