summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-05-07 17:32:02 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2019-05-07 17:33:15 +0200
commita5427163ced9f99044813058ddf62548debc673c (patch)
tree7bbd7efd42d497e1f6aff542d2c9284353620c3d /templates
parent012169b095c2cb115cbf77707af4304a6e4a1f61 (diff)
app: Use AJAX, not HTTP Refresh for auto-reload2.0.2
Diffstat (limited to 'templates')
-rw-r--r--templates/app.html.ep6
-rw-r--r--templates/layouts/default.html.ep4
2 files changed, 8 insertions, 2 deletions
diff --git a/templates/app.html.ep b/templates/app.html.ep
index 462f27e..79a462a 100644
--- a/templates/app.html.ep
+++ b/templates/app.html.ep
@@ -1,5 +1,6 @@
% if (@{$departures}) {
+% if (not param('ajax')) {
% if (param('dark')) {
<div class="app appdark">
% }
@@ -21,6 +22,7 @@
<div class="mfooter"></div>
</div>
<ul>
+% } # not param('ajax')
% my $i = 0;
% my $dt_now = DateTime->now;
% for my $departure (@{$departures}) {
@@ -158,12 +160,14 @@
</li>
% }
+% if (not param('ajax')) {
</ul>
</div> <!-- app -->
+% }
% }
-% else {
+% elsif (not param('ajax')) {
<div class="container">
<div class="error"><strong>Keine Abfahrten gefunden.</strong>
diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep
index 0e9f4c5..f256db6 100644
--- a/templates/layouts/default.html.ep
+++ b/templates/layouts/default.html.ep
@@ -17,7 +17,7 @@
<meta http-equiv="refresh" content="<%= $self->stash('refresh_interval') %>"/>
% }
- % my $av = 'v11'; # asset version
+ % my $av = 'v12'; # asset version
%= stylesheet "/static/${av}/default.css"
%= stylesheet "/static/${av}/jquery-ui.min.css"
% my $force_mobile = param('force_mobile') // stash('force_mobile');
@@ -58,7 +58,9 @@ Bitte eine Station aus der Liste auswählen</div>
% }
</div>
+<div class="content">
%= content
+</div>
% if (not stash('hide_opts')) {
<div class="container">