- sub (/css/:theme) {
- my $theme = $_{theme};
- return NOT_FOUND unless -e "css/themes/$theme.css";
- my $css = read_file "css/themes/$theme.css";
- $css .= read_file $_ for <css/*.css>;
- my @headers = ('X-Forever' => 1, 'Cache-Control' => 'public, max-age=604800', 'Content-Type' => 'text/css; charset=utf-8');
- [200, \@headers, [development ? $css : CSS::Minifier::XS::minify $css]]
- },
-
- sub (/js.js) {
- my $js;
- $js .= read_file $_ for <js/*.js>;
- my @headers = ('X-Forever' => 1, 'Cache-Control' => 'public, max-age=604800', 'Content-Type' => 'application/javascript; charset=utf-8');
- [200, \@headers, [development ? $js : JavaScript::Minifier::XS::minify $js]]
- },
-