From f06ba039d6685a04782dad33e2772ea004b863d3 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Tue, 11 Feb 2014 09:16:13 +0200 Subject: [PATCH] Make CSS/JS links end with .css/.js --- js/90-custom.js | 2 +- lib/Plack/App/Gruntmaster.pm | 4 ++-- tmpl/header.en | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) 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 @@ - - + +