summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-10-21 10:20:11 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-10-21 10:20:11 +0200
commit37ff6ea7cbf4f4b2b180b0a67f0f6c87cc4c8534 (patch)
tree54befaeb59058e329a4d619c9042089da9944455 /templates
parent178d8322caf9a30b2c7fd31ae12a599e1821afbb (diff)
defer script loading
Diffstat (limited to 'templates')
-rw-r--r--templates/layouts/default.html.ep9
1 files changed, 8 insertions, 1 deletions
diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep
index 18ee9e4..bf7a937 100644
--- a/templates/layouts/default.html.ep
+++ b/templates/layouts/default.html.ep
@@ -15,6 +15,7 @@
% if ($force_mobile == 1 or ($self->browser->mobile and $force_mobile != 0)) {
%= stylesheet '/static/mobile.css'
% }
+ %if (stash('load_marquee')) {
%= javascript '/static/jquery-1.10.2.min.js'
%= javascript '/static/jquery-ui.min.js'
%= javascript '/static/autocomplete.js'
@@ -23,8 +24,14 @@
%= javascript begin
$(function () { $('marquee').marquee() });
% end
+ % } else {
+ %= javascript '/static/jquery-1.10.2.min.js', defer => undef
+ %= javascript '/static/jquery-ui.min.js', defer => undef
+ %= javascript '/static/autocomplete.js', defer => undef
+ %= javascript '/static/collapse.js', defer => undef
+ % }
% if (stash('with_geolocation')) {
- %= javascript '/static/geolocation.js'
+ %= javascript '/static/geolocation.js', defer => undef
% }
</head>
<body style="<%= (stash('hide_opts') ? 'margin: 0; padding: 0;' : q{}) %>