summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.pl1
-rw-r--r--public/mobile.css23
-rw-r--r--templates/layouts/default.html.ep4
3 files changed, 28 insertions, 0 deletions
diff --git a/index.pl b/index.pl
index 52f7851..1197fc5 100644
--- a/index.pl
+++ b/index.pl
@@ -684,4 +684,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..bd03fb4
--- /dev/null
+++ b/public/mobile.css
@@ -0,0 +1,23 @@
+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/layouts/default.html.ep b/templates/layouts/default.html.ep
index f7c9622..ff7fe41 100644
--- a/templates/layouts/default.html.ep
+++ b/templates/layouts/default.html.ep
@@ -3,12 +3,16 @@
<head>
<title><%= stash('title') // 'db-infoscreen' %></title>
<meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
% if ($self->stash('refresh_interval')) {
<meta http-equiv="refresh" content="<%= $self->stash('refresh_interval') %>"/>
% }
%= stylesheet '/default.css'
+% if ($self->browser->mobile) {
+ %= stylesheet '/mobile.css'
+% }
%= javascript '/jquery-1.10.2.min.js'
%= javascript '/collapse.js'
%= javascript '/marquee.js'