From 75a26a81de56b186ec17434323b3945332cee613 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 25 Oct 2015 19:48:15 +0100 Subject: mobile support for app/infoscreen frontend --- index.pl | 1 + public/mobile.css | 24 ++++++++++++++++++++++++ templates/infoscreen.html.ep | 4 ++++ 3 files changed, 29 insertions(+) create mode 100644 public/mobile.css diff --git a/index.pl b/index.pl index df3e870..225b84b 100644 --- a/index.pl +++ b/index.pl @@ -629,4 +629,5 @@ app->config( ); app->types->type( json => 'application/json; charset=utf-8' ); +app->plugin('browser_detect'); app->start(); diff --git a/public/mobile.css b/public/mobile.css new file mode 100644 index 0000000..efa6023 --- /dev/null +++ b/public/mobile.css @@ -0,0 +1,24 @@ +body { + margin: 0; +} + +div.displayclean > ul > li { + font-size: 35%; +} + +div.displayclean li .moreinfo { + font-size: 2.6em; +} + +p, +div.input-field, +div.notes { + max-width: 94%; + margin-left: auto; + margin-right: auto; +} + +p { + text-align: justify; +} + diff --git a/templates/infoscreen.html.ep b/templates/infoscreen.html.ep index af567b1..b0ba1fc 100644 --- a/templates/infoscreen.html.ep +++ b/templates/infoscreen.html.ep @@ -3,11 +3,15 @@ <%= $title %> + % if ($self->stash('refresh_interval')) { % } %= stylesheet '/infoscreen.css' + % if ($self->browser->mobile) { + %= stylesheet '/mobile.css' + % } %= javascript '/jquery-2.1.1.min.js' %= javascript '/collapse.js' -- cgit v1.2.3