From: Marius Gavrilescu Date: Tue, 11 Feb 2014 07:16:13 +0000 (+0200) Subject: Make CSS/JS links end with .css/.js X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=f06ba039d6685a04782dad33e2772ea004b863d3;p=plack-app-gruntmaster.git Make CSS/JS links end with .css/.js --- diff --git a/js/90-custom.js b/js/90-custom.js index 3759c1b..750aaa1 100644 --- a/js/90-custom.js +++ b/js/90-custom.js @@ -1,7 +1,7 @@ (function(){ 'use strict'; function set_style(name){ - $('#stylesheet').attr("href", "/css/" + name); + $('#stylesheet').attr("href", "/css/" + name + ".css"); localStorage.setItem("theme", name); } diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index 63aa12f..a071101 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -58,8 +58,8 @@ BEGIN{ my $word = qr,(\w+),a; my $ct = qr,(?:\/ct/$word)?,a; - get qr,/css/$word, => 'CSS'; - get qr,/js, => 'JS'; + get qr,/css/$word\.css, => 'CSS'; + get qr,/js\.js, => 'JS'; get qr,/ct/, => 'Ct'; get qr,/ct/$word/, => 'Ct::Entry'; diff --git a/tmpl/header.en b/tmpl/header.en index 5ca7976..c4f51f6 100644 --- a/tmpl/header.en +++ b/tmpl/header.en @@ -3,8 +3,8 @@ - - + +