diff options
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | lib/DBInfoscreen.pm | 1 | ||||
-rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 1 | ||||
-rw-r--r-- | public/static/default.css | 17 | ||||
-rw-r--r-- | public/static/mobile.css | 18 | ||||
-rw-r--r-- | templates/layouts/default.html.ep | 7 |
6 files changed, 25 insertions, 20 deletions
@@ -20,7 +20,6 @@ Dependencies * perl >= 5.10 * Cache::File (part of the Cache module) * Mojolicious - * Mojolicious::Plugin::BrowserDetect * Travel::Status::DE::DBWagenreihung >= 0.00 * Travel::Status::DE::DeutscheBahn >= 2.03 * Travel::Status::DE::IRIS >= 1.21 diff --git a/lib/DBInfoscreen.pm b/lib/DBInfoscreen.pm index af952c2..422a25d 100644 --- a/lib/DBInfoscreen.pm +++ b/lib/DBInfoscreen.pm @@ -242,7 +242,6 @@ sub startup { ); $self->types->type( json => 'application/json; charset=utf-8' ); - $self->plugin('browser_detect'); } diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index ed5f2d1..c13ed48 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -798,6 +798,7 @@ sub handle_request { $template eq 'single' or $template eq 'multi' ), + force_mobile => ( $template eq 'app' ), ); } return; diff --git a/public/static/default.css b/public/static/default.css index 1b8780a..6f2f603 100644 --- a/public/static/default.css +++ b/public/static/default.css @@ -1,3 +1,7 @@ +body { + margin: 0; +} + html { font-family: Sans-Serif; } @@ -7,6 +11,19 @@ a { text-decoration: none; } +p, +div.about, +div.input-field, +div.notes { + max-width: 94%; + margin-left: auto; + margin-right: auto; +} + +p { + text-align: justify; +} + div.app { border-width:1px 2px; width:100%; diff --git a/public/static/mobile.css b/public/static/mobile.css index 17d9539..c57246c 100644 --- a/public/static/mobile.css +++ b/public/static/mobile.css @@ -1,5 +1,7 @@ -body { - margin: 0; +div.app { + max-width: 60em; + margin-left: auto; + margin-right: auto; } div.app > ul > li { @@ -9,15 +11,3 @@ div.app > ul > li { div.app 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 7649be5..ee12097 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -13,8 +13,8 @@ % my $av = 'v8'; # asset version %= stylesheet "/static/${av}/default.css" %= stylesheet "/static/${av}/jquery-ui.min.css" -% my $force_mobile = param('force_mobile') // -1; -% if ($force_mobile == 1 or ($self->browser->mobile and $force_mobile != 0)) { +% my $force_mobile = param('force_mobile') // stash('force_mobile'); +% if ($force_mobile) { %= stylesheet "/static/${av}/mobile.css" % } %if (stash('load_marquee')) { @@ -199,8 +199,7 @@ Bitte eine Station aus der Liste auswählen</div> <ul> <li>Diese Seite kann gerne als iframe in eigene Infoscreens o.ä. eingebunden werden. Für eine kleine Ansicht (z.B. iframe in einer normalen Website) bitte das - "App"-Frontend verwenden (und vorerst den Parameter <span style="font-family: monospace;">force_mobile=1</span> - hinzufügen, das ist bald aber nicht mehr nötig). Für eine große Ansicht + "App"-Frontend verwenden. Für eine große Ansicht (z.B. als alleinstehender Infoscreen) gibt es das "Infoscreen"-Frontend.</li> <li>Die Parameter <span style="font-family: monospace;">mode=json&version=3</span> (alternativ auch <span style="font-family: |