From 75d5a9234353d50d90f853175bf9af5b41d42044 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 11 Aug 2019 20:14:55 +0200 Subject: use asset versioning --- templates/display.html.ep | 5 +++-- templates/exception.html.ep | 3 ++- templates/infoscreen.html.ep | 9 +++++---- templates/main.html.ep | 7 ++++--- templates/not_found.html.ep | 3 ++- 5 files changed, 16 insertions(+), 11 deletions(-) (limited to 'templates') diff --git a/templates/display.html.ep b/templates/display.html.ep index 4cf52a2..5a98e1a 100644 --- a/templates/display.html.ep +++ b/templates/display.html.ep @@ -3,8 +3,9 @@ <%= $title %> - %= stylesheet '/static/display.css' - %= javascript '/static/jquery-2.1.1.min.js' + % my $av = 'v1'; # asset version + %= stylesheet "/static/${av}/css/display.css" + %= javascript '/static/js/jquery-2.1.1.min.js' diff --git a/templates/exception.html.ep b/templates/exception.html.ep index 2312586..aea4c40 100644 --- a/templates/exception.html.ep +++ b/templates/exception.html.ep @@ -4,7 +4,8 @@ vrr-infoscreen - %= stylesheet '/static/main.css' + % my $av = 'v1'; # asset version + %= stylesheet "/static/${av}/css/main.css" diff --git a/templates/infoscreen.html.ep b/templates/infoscreen.html.ep index d634a93..a2f92e6 100644 --- a/templates/infoscreen.html.ep +++ b/templates/infoscreen.html.ep @@ -8,12 +8,13 @@ % } - %= stylesheet '/static/infoscreen.css' + % my $av = 'v1'; # asset version + %= stylesheet "/static/${av}/css/infoscreen.css" % if ($self->browser->mobile) { - %= stylesheet '/static/mobile.css' + %= stylesheet "/static/${av}/css/mobile.css" % } - %= javascript '/static/jquery-2.1.1.min.js' - %= javascript '/static/collapse.js' + %= javascript '/static/js/jquery-2.1.1.min.js' + %= javascript "/static/${av}/js/collapse.js" diff --git a/templates/main.html.ep b/templates/main.html.ep index 1c539fb..3c18b49 100644 --- a/templates/main.html.ep +++ b/templates/main.html.ep @@ -4,9 +4,10 @@ <%= $title %> - %= stylesheet '/static/main.css' - %= javascript '/static/jquery-2.1.1.min.js' - %= javascript '/static/image.js' + % my $av = 'v1'; # asset version + %= stylesheet "/static/${av}/css/main.css" + %= javascript '/static/js/jquery-2.1.1.min.js' + %= javascript "/static/${av}/js/image.js" diff --git a/templates/not_found.html.ep b/templates/not_found.html.ep index 1fada6c..98bb664 100644 --- a/templates/not_found.html.ep +++ b/templates/not_found.html.ep @@ -4,7 +4,8 @@ vrr-infoscreen - %= stylesheet '/static/main.css' + % my $av = 'v1'; # asset version + %= stylesheet "/static/${av}/css/main.css" -- cgit v1.2.3