diff options
-rw-r--r-- | lib/DBInfoscreen.pm | 34 | ||||
-rw-r--r-- | lib/DBInfoscreen/Controller/Wagenreihung.pm | 61 | ||||
-rw-r--r-- | public/static/css/dark.min.css | 2 | ||||
-rw-r--r-- | public/static/css/light.min.css | 2 | ||||
-rw-r--r-- | public/static/css/material-icons.css | 8 | ||||
l--------- | public/static/v43 (renamed from public/static/v41) | 0 | ||||
-rw-r--r-- | sass/app.scss | 9 | ||||
-rw-r--r-- | share/dbdb_wagen.json | 47 | ||||
-rw-r--r-- | templates/_wagon.html.ep | 11 | ||||
-rw-r--r-- | templates/layouts/app.html.ep | 2 | ||||
-rw-r--r-- | templates/layouts/legacy.html.ep | 2 | ||||
-rw-r--r-- | templates/wagen.html.ep | 17 | ||||
-rw-r--r-- | templates/wagenreihung.html.ep | 2 | ||||
-rw-r--r-- | templates/zugbildung_db.html.ep | 2 |
14 files changed, 186 insertions, 13 deletions
diff --git a/lib/DBInfoscreen.pm b/lib/DBInfoscreen.pm index 54078ea..a0e027d 100644 --- a/lib/DBInfoscreen.pm +++ b/lib/DBInfoscreen.pm @@ -123,6 +123,13 @@ sub startup { } ); + $self->attr( + dbdb_wagon => sub { + return JSON->new->utf8->decode( + scalar read_file('share/dbdb_wagen.json') ); + } + ); + $self->helper( hafas => sub { my ($self) = @_; @@ -166,6 +173,32 @@ sub startup { ); $self->helper( + wagon_image => sub { + my ( $self, $train_type, $wagon_type, $uic ) = @_; + my $ret; + if ( $train_type =~ m{IC(?!E)} + and $wagon_type + =~ m{ ^ [AB] R? k? [ipv] m m? b? d? s? z f? $ }x ) + { + $ret = $wagon_type; + } + elsif ( not $uic ) { + return; + } + elsif ( $train_type =~ m{ICE [12]} and $wagon_type !~ m{^I} ) { + $ret = substr( $uic, 5, 4 ); + } + elsif ( $train_type =~ m{ICE 4} ) { + $ret = substr( $uic, 4, 5 ); + } + if ( $ret and $self->app->dbdb_wagon->{$ret} ) { + return $ret; + } + return; + } + ); + + $self->helper( 'handle_no_results' => sub { my ( $self, $backend, $station, $errstr ) = @_; @@ -418,6 +451,7 @@ sub startup { $r->get('/_wr/:train/:departure')->to('wagenreihung#wagenreihung'); $r->get('/wr/:train')->to('wagenreihung#zugbildung_db'); + $r->get('/w/:wagon')->to('wagenreihung#wagen'); $r->get('/_ajax_mapinfo/:tripid/:lineno')->to('map#ajax_route'); $r->get('/map/:tripid/:lineno')->to('map#route'); diff --git a/lib/DBInfoscreen/Controller/Wagenreihung.pm b/lib/DBInfoscreen/Controller/Wagenreihung.pm index 4707d03..073d762 100644 --- a/lib/DBInfoscreen/Controller/Wagenreihung.pm +++ b/lib/DBInfoscreen/Controller/Wagenreihung.pm @@ -5,6 +5,8 @@ package DBInfoscreen::Controller::Wagenreihung; # SPDX-License-Identifier: BSD-2-Clause use Mojo::Base 'Mojolicious::Controller'; +use Mojo::JSON qw(decode_json encode_json); +use Mojo::Util qw(b64_encode b64_decode); use utf8; @@ -99,6 +101,7 @@ sub wagenreihung { wr_error => scalar $@, train_no => $train, wr => undef, + wref => undef, hide_opts => 1, ); } @@ -114,6 +117,14 @@ sub wagenreihung { } } + my $wref = { + tt => $wr->train_type, + tn => $train, + s => $wr->station_name, + p => $wr->platform + }; + $wref = b64_encode( encode_json($wref) ); + $self->render( 'wagenreihung', wr_error => undef, @@ -121,6 +132,7 @@ sub wagenreihung { map { $wr->train_type . ' ' . $_ } $wr->train_numbers ), train_no => $train, wr => $wr, + wref => $wref, hide_opts => 1, ); } @@ -133,6 +145,7 @@ sub wagenreihung { wr_error => scalar $err, train_no => $train, wr => undef, + wref => undef, hide_opts => 1, ); } @@ -140,4 +153,52 @@ sub wagenreihung { } +sub wagen { + my ($self) = @_; + my $wagon_id = $self->stash('wagon'); + my $wagon_no = $self->param('n'); + my $section = $self->param('s'); + my $wref = $self->param('r'); + + if ( not $self->app->dbdb_wagon->{$wagon_id} ) { + $self->render( + 'not_found', + message => "Keine Daten zu Wagentyp \"${wagon_id}\" vorhanden", + hide_opts => 1 + ); + return; + } + + eval { $wref = decode_json( b64_decode($wref) ); }; + if ($@) { + $wref = {}; + } + + $wref->{wn} = $wagon_no; + $wref->{ws} = $section; + + my $wagon_file + = "https://lib.finalrewind.org/dbdb/db_wagen/${wagon_id}.png"; + + my $title = "Wagen $wagon_id"; + + if ( $wref->{tt} and $wref->{tn} ) { + $title = sprintf( '%s %s', $wref->{tt}, $wref->{tn} ); + if ($wagon_no) { + $title .= " Wagen $wagon_no"; + } + else { + $title .= " Wagen $wagon_id"; + } + } + + $self->render( + 'wagen', + title => $title, + wagon_file => $wagon_file, + wref => $wref, + hide_opts => 1, + ); +} + 1; diff --git a/public/static/css/dark.min.css b/public/static/css/dark.min.css index d2b7732..a5059dc 100644 --- a/public/static/css/dark.min.css +++ b/public/static/css/dark.min.css @@ -1 +1 @@ -body{margin:0;color:#fff;background-color:#101010}html{font-family:Sans-Serif}a{color:#99f;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.content{width:100%;margin:0}.wagonorder{position:relative;width:100%;height:100ex}.wagonorder .section{position:absolute;left:1em;width:2em;text-align:center}.wagonorder .wagon{position:absolute;left:3em;min-width:6em;border:1px solid #999;padding-left:0.2em;padding-right:0.2em}.wagonorder .wagon~.wagon{border-top:none}.wagonorder .firstclass{background-color:#330}.wagonorder .powercar{background-color:#222}.wagonorder .wagon .material-icons{color:#bbb}.wagonorder .wagon .direction{position:absolute;left:0.2em;bottom:0;right:0;text-align:center;color:#bbb}.wagonorder .nondestwagon{border-style:dashed}.wagonorder .details{position:absolute;padding-top:0.5ex;left:10em;right:0em}.wagonorder .details .type{display:inline-block;width:5em;color:#bbb}.wagonorder .details .uicunknown{color:#999}.wagonorder .details .uicexchange{margin-right:0.2em;color:#999}.wagonorder .details .uiccountry{margin-right:0.2em;color:#999}.wagonorder .details .uic5{margin-right:0.2em;color:#999}.wagonorder .details .uic56{color:#bbb;font-weight:bold}.wagonorder .details .uic78{margin-right:0.2em;color:#bbb;font-weight:bold}.wagonorder .details .uic78::before{content:"-"}.wagonorder .details .uictype{margin-right:0.2em;color:#bbb;font-weight:bold}.wagonorder .details .uicno{color:#bbb}.wagonorder .details .uiccheck{color:#999}.wagonorder .details .uiccheck::before{content:"-"}div.app{border-width:1px 2px;width:100%;margin-bottom:5em}div.app>ul{position:relative;width:100%;list-style-type:none;margin:0;padding:0}div.app>ul>li{min-height:7em;display:block;width:100%;position:relative;cursor:pointer;border-bottom:1px solid #999;background-color:#101010}div.app li .line{font-size:2.7em;position:absolute;bottom:5px;left:2px;max-width:6em;max-height:3ex;overflow:hidden}div.app .trainsubtype{font-weight:normal;font-size:70%;position:relative;vertical-align:baseline;top:-0.6ex;left:-0.5ex}div.app li .line .trainno{font-weight:normal}div.app li .line .trainno_sub{font-weight:normal;font-size:0.6em;text-align:center;margin-top:-0.2em}div.app li .sbahn .trainno_sub{font-weight:normal;font-size:0.5em;text-align:center;margin-top:-0.25em}div.app li .lineinfo{color:#fff;font-size:2em;position:absolute;top:0px;left:2px}div.app .replacement{color:#afa}div.app .replaced{color:#faa}div.app .sbahn{font-weight:bold;border-radius:30px;padding:3px 6px 2px 6px;background-color:#151}div.app .bahn,div.app .fern,div.app .ext{font-weight:bold;border-radius:5px;padding:3px 5px 2px 5px}div.app .bahn{background-color:#333}div.app .fern{background-color:#511}div.app .ext{border:2px solid #333}div.app li .route{background-color:transparent;font-size:2.1em;position:absolute;top:1px;left:7.7em;height:1.2em;width:70%;overflow:hidden;color:#ddd}div.app li .info{color:#f77;background-color:transparent;font-size:2.1em;position:absolute;top:1px;left:7.7em;height:1.2em;width:70%;overflow:hidden}div.app .moreinfo{font-size:2.1em;position:fixed;left:0;right:0;bottom:0em;z-index:5;overflow:auto;cursor:default;background-color:#101010}div.app .moreinfo .mheader,div.app .moreinfo .mfooter{max-width:50em;margin-left:auto;margin-right:auto}div.app .collapsed-moreinfo{display:none}div.app .expanded-moreinfo{display:block}div.app .moreinfo .mheader{text-align:center;font-size:120%;padding-top:0.5em;padding-bottom:0.5em;padding-left:1em;padding-right:1em;border-bottom:0.1em dashed #cccccc}div.app .moreinfo .mfooter{padding-top:0.5em;padding-left:1em;padding-right:1em}div.app .moreinfo .dataline{font-size:120%;width:100%;display:flex;justify-content:space-between;margin-bottom:1em}div.app .moreinfo .dataline>div{width:33%}div.app .moreinfo .departure{text-align:right}div.app .moreinfo .platform{text-align:center}div.app .moreinfo .arrival{display:inline-block;text-align:right}div.app .moreinfo .loading{text-align:center;width:100%;color:#888888}div.app .moreinfo .minfo{color:#f77}div.app .moreinfo .verbose{margin-bottom:1em}div.app .moreinfo .mroute .important-stop{color:#fff}div.app .moreinfo .mroute .generic-stop{color:#bbb}div.app .moreinfo .mroute .additional-stop{color:#7f7}div.app .moreinfo .mroute .cancelled-stop{color:#f77}div.app .moreinfo .db-attr{margin-bottom:1em}div.app .moreinfo .db-attr span{margin-right:0.5em}div.app li .dest{background-color:transparent;font-size:4em;position:absolute;top:0.62em;left:4em;bottom:0px;width:70%;overflow:hidden;color:#fff}div.app li .origin{background-color:transparent;font-size:4em;position:absolute;top:0.62em;left:4em;bottom:0px;width:70%;overflow:hidden;color:#bbb}div.app li .origin:before{content:"von "}div.app li.cancelled{background-color:#512f00}div.app li .countdown{background-color:transparent;font-size:3em;position:absolute;right:5px;bottom:2px;padding-left:0.2em;color:#fff}div.app li .header{color:#fff;font-size:2em;font-weight:bold;padding-top:8px;border-width-top:0;display:block;text-align:center}div.app li .head{border-bottom-width:0}div.app li .countdown .delay{font-size:1em;color:#f77;background-color:transparent;padding-right:7px}div.app li .countdown .undelay{font-size:1em;color:#7f7;padding-right:7px}div.app li .countdown .delaynorm{font-size:0.9em;color:#d99;padding-right:7px}div.app li .countdown .undelaynorm{font-size:0.9em;color:#9d9;padding-right:7px}div.app li .countdown .platform{font-weight:bold}div.app li .countdown .changed-platform{color:#f77}div.app li .time{background-color:transparent;font-size:2.3em;position:absolute;right:5px;top:4px;padding-left:0.2em;color:#fff}div.app span.delayed{color:#f77;background-color:transparent}ul.ui-autocomplete{max-height:20em;overflow-x:hidden;overflow-y:auto}div.geolocation{text-align:center}div.candidatestatus{text-align:center;color:#999999}div.candidatelist a{display:block;text-decoration:none;font-size:1.4em;padding-top:0.3em;text-align:center;border-bottom:1px solid #999999}div.candidatelist a .distance:after{content:" km"}div.candidatelist a .distance{font-size:0.6em;color:#999999;padding-top:0.2em;padding-bottom:0.3em}div.about{margin-top:2em;font-family:Sans-Serif;color:#bbb}div.about a{color:#99f;text-decoration:none}.notice{padding:15px;margin-bottom:20px;border:1px solid #bce8f1;border-radius:4px;color:#31708f;background-color:#d9edf7;margin-left:auto;margin-right:auto}.warning{padding:15px;margin-bottom:20px;border:1px solid #faebcc;border-radius:4px;color:#8a6d3b;background-color:#fcf8e3;margin-left:auto;margin-right:auto}.error{padding:15px;margin-bottom:20px;border:1px solid #ebccd1;border-radius:4px;color:#a94442;background-color:#f2dede;margin-left:auto;margin-right:auto}.error .errcode{font-family:Monospace;margin-top:2em;font-size:100%;color:#aaaaaa}.container{max-width:60em;margin-left:auto;margin-right:auto}pre{margin-bottom:2em}span.optional,span.notes{color:#bbb}.moresettings-header{cursor:pointer}.moresettings-header-collapsed:before{content:"▹ "}.moresettings-header-expanded:before{content:"▿ "}.moresettings-collapsed{display:none}.moresettings-expanded{display:block}.developers-header{cursor:pointer}.developers-header-collapsed:before{content:"▹ "}.developers-header-expanded:before{content:"▿ "}.developers-collapsed{display:none}.developers-expanded{display:block}div.break{height:1em}div.field{margin-top:0.3em;margin-bottom:0.6em}.disabledbutton{display:inline-block;vertical-align:baseline;border-radius:4px;border:1px solid #cccccc;box-shadow:none;padding:0.9ex;margin-right:1em}.smallbutton{display:inline-block;vertical-align:baseline;border-radius:4px;border:1px solid #2e6da4;transition:background-color .3s;color:#fff;background-color:#337ab7;cursor:pointer;box-shadow:none;padding:0.9ex;margin-right:1em}.smallbutton .material-icons,.disabledbutton .material-icons{display:block;float:left;margin-right:0.5ex}input,select,.button{display:inline-block;width:60em;max-width:100%;min-height:1.8em;border-radius:4px;color:#fff;background-color:#101010;border:1px solid #444;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);font-size:90%;text-align:center;vertical-align:middle}input[type="text"]{width:59em;padding-left:0.5em;padding-right:0.5em;text-align:left;box-sizing:border-box}select{min-height:2em}input[type="checkbox"]{width:1.5em;box-shadow:none}input[type="submit"],.button{transition:background-color .3s;color:#fff;background-color:#337ab7;border-color:#2e6da4;cursor:pointer;box-shadow:none;padding-top:0.9ex;padding-bottom:0.9ex}.button{padding-top:1.1ex;padding-bottom:0}input[type="submit"]:active,input[type="submit"]:focus,input[type="submit"]:hover,.button:active,.button:focus,.button:hover,.smallbutton:active,.smallbutton:focus,.smallbutton:hover{color:#fff;background-color:#286090;border-color:#204d74}input[type="submit"]:active,.button:active{box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.button-light{color:#ddd;background-color:#101010;border-color:#444}.button-light:active,.button-light:focus,.button-light:hover{color:#ddd;background-color:#111;border-color:#333}div.notes{margin-top:2em}div.notes ul{margin-top:1em}div.app{max-width:60em;margin-left:auto;margin-right:auto}.navbar-fixed{position:relative;z-index:997}.navbar-fixed nav{position:fixed}nav{box-shadow:0 2px 2px 0 rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12),0 1px 5px 0 rgba(0,0,0,0.2)}nav{width:100%;overflow:hidden}nav a{color:#fff}nav .nav-wrapper{position:relative;height:100%}nav i,nav i.material-icons{display:block;font-size:24px}nav .brand-logo{position:absolute;display:inline-block;padding-left:0.5rem}nav ul{margin:0;padding-left:0;list-style-type:none}nav ul li{transition:background-color .3s;float:left;padding:0;list-style-type:none;background-color:#00838f}nav ul a{transition:background-color .3s;font-size:1rem;color:#fff;display:block;padding:0 15px;cursor:pointer}@media only screen and (max-width: 600px){div.app>ul>li{font-size:35%}div.navbar-fixed{height:56px}.moreinfo{top:56px}nav{height:56px;line-height:56px}nav .brand-logo{font-size:1.5rem}nav .nav-wrapper i{height:56px;line-height:56px}}@media only screen and (min-width: 600px){div.app>ul>li{font-size:40%}div.navbar-fixed{height:64px}.moreinfo{top:64px}nav{height:64px;line-height:64px}nav .brand-logo{font-size:2.1rem}nav .nav-wrapper i{height:64px;line-height:64px}}div.app .moreinfo{font-size:100%} +body{margin:0;color:#fff;background-color:#101010}html{font-family:Sans-Serif}a{color:#99f;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.content{width:100%;margin:0}.copyright{margin-top:1em;color:#999}.wagonorder{position:relative;width:100%;height:100ex}.wagonorder .section{position:absolute;left:1em;width:2em;text-align:center}.wagonorder .wagon{position:absolute;left:3em;min-width:6em;border:1px solid #999;padding-left:0.2em;padding-right:0.2em}.wagonorder .wagon~.wagon{border-top:none}.wagonorder .firstclass{background-color:#330}.wagonorder .powercar{background-color:#222}.wagonorder .wagon .material-icons{color:#bbb}.wagonorder .wagon .direction{position:absolute;left:0.2em;bottom:0;right:0;text-align:center;color:#bbb}.wagonorder .nondestwagon{border-style:dashed}.wagonorder .details{position:absolute;padding-top:0.5ex;left:10em;right:0em}.wagonorder .details .type{display:inline-block;width:5em;color:#bbb}.wagonorder .details a.type{color:#99f}.wagonorder .details .uicunknown{color:#999}.wagonorder .details .uicexchange{margin-right:0.2em;color:#999}.wagonorder .details .uiccountry{margin-right:0.2em;color:#999}.wagonorder .details .uic5{margin-right:0.2em;color:#999}.wagonorder .details .uic56{color:#bbb;font-weight:bold}.wagonorder .details .uic78{margin-right:0.2em;color:#bbb;font-weight:bold}.wagonorder .details .uic78::before{content:"-"}.wagonorder .details .uictype{margin-right:0.2em;color:#bbb;font-weight:bold}.wagonorder .details .uicno{color:#bbb}.wagonorder .details .uiccheck{color:#999}.wagonorder .details .uiccheck::before{content:"-"}div.app{border-width:1px 2px;width:100%;margin-bottom:5em}div.app>ul{position:relative;width:100%;list-style-type:none;margin:0;padding:0}div.app>ul>li{min-height:7em;display:block;width:100%;position:relative;cursor:pointer;border-bottom:1px solid #999;background-color:#101010}div.app li .line{font-size:2.7em;position:absolute;bottom:5px;left:2px;max-width:6em;max-height:3ex;overflow:hidden}div.app .trainsubtype{font-weight:normal;font-size:70%;position:relative;vertical-align:baseline;top:-0.6ex;left:-0.5ex}div.app li .line .trainno{font-weight:normal}div.app li .line .trainno_sub{font-weight:normal;font-size:0.6em;text-align:center;margin-top:-0.2em}div.app li .sbahn .trainno_sub{font-weight:normal;font-size:0.5em;text-align:center;margin-top:-0.25em}div.app li .lineinfo{color:#fff;font-size:2em;position:absolute;top:0px;left:2px}div.app .replacement{color:#afa}div.app .replaced{color:#faa}div.app .sbahn{font-weight:bold;border-radius:30px;padding:3px 6px 2px 6px;background-color:#151}div.app .bahn,div.app .fern,div.app .ext{font-weight:bold;border-radius:5px;padding:3px 5px 2px 5px}div.app .bahn{background-color:#333}div.app .fern{background-color:#511}div.app .ext{border:2px solid #333}div.app li .route{background-color:transparent;font-size:2.1em;position:absolute;top:1px;left:7.7em;height:1.2em;width:70%;overflow:hidden;color:#ddd}div.app li .info{color:#f77;background-color:transparent;font-size:2.1em;position:absolute;top:1px;left:7.7em;height:1.2em;width:70%;overflow:hidden}div.app .moreinfo{font-size:2.1em;position:fixed;left:0;right:0;bottom:0em;z-index:5;overflow:auto;cursor:default;background-color:#101010}div.app .moreinfo .mheader,div.app .moreinfo .mfooter{max-width:50em;margin-left:auto;margin-right:auto}div.app .collapsed-moreinfo{display:none}div.app .expanded-moreinfo{display:block}div.app .moreinfo .mheader{text-align:center;font-size:120%;padding-top:0.5em;padding-bottom:0.5em;padding-left:1em;padding-right:1em;border-bottom:0.1em dashed #cccccc}div.app .moreinfo .mfooter{padding-top:0.5em;padding-left:1em;padding-right:1em}div.app .moreinfo .dataline{font-size:120%;width:100%;display:flex;justify-content:space-between;margin-bottom:1em}div.app .moreinfo .dataline>div{width:33%}div.app .moreinfo .departure{text-align:right}div.app .moreinfo .platform{text-align:center}div.app .moreinfo .arrival{display:inline-block;text-align:right}div.app .moreinfo .loading{text-align:center;width:100%;color:#888888}div.app .moreinfo .minfo{color:#f77}div.app .moreinfo .verbose{margin-bottom:1em}div.app .moreinfo .mroute .important-stop{color:#fff}div.app .moreinfo .mroute .generic-stop{color:#bbb}div.app .moreinfo .mroute .additional-stop{color:#7f7}div.app .moreinfo .mroute .cancelled-stop{color:#f77}div.app .moreinfo .db-attr{margin-bottom:1em}div.app .moreinfo .db-attr span{margin-right:0.5em}div.app li .dest{background-color:transparent;font-size:4em;position:absolute;top:0.62em;left:4em;bottom:0px;width:70%;overflow:hidden;color:#fff}div.app li .origin{background-color:transparent;font-size:4em;position:absolute;top:0.62em;left:4em;bottom:0px;width:70%;overflow:hidden;color:#bbb}div.app li .origin:before{content:"von "}div.app li.cancelled{background-color:#512f00}div.app li .countdown{background-color:transparent;font-size:3em;position:absolute;right:5px;bottom:2px;padding-left:0.2em;color:#fff}div.app li .header{color:#fff;font-size:2em;font-weight:bold;padding-top:8px;border-width-top:0;display:block;text-align:center}div.app li .head{border-bottom-width:0}div.app li .countdown .delay{font-size:1em;color:#f77;background-color:transparent;padding-right:7px}div.app li .countdown .undelay{font-size:1em;color:#7f7;padding-right:7px}div.app li .countdown .delaynorm{font-size:0.9em;color:#d99;padding-right:7px}div.app li .countdown .undelaynorm{font-size:0.9em;color:#9d9;padding-right:7px}div.app li .countdown .platform{font-weight:bold}div.app li .countdown .changed-platform{color:#f77}div.app li .time{background-color:transparent;font-size:2.3em;position:absolute;right:5px;top:4px;padding-left:0.2em;color:#fff}div.app span.delayed{color:#f77;background-color:transparent}ul.ui-autocomplete{max-height:20em;overflow-x:hidden;overflow-y:auto}div.geolocation{text-align:center}div.candidatestatus{text-align:center;color:#999999}div.candidatelist a{display:block;text-decoration:none;font-size:1.4em;padding-top:0.3em;text-align:center;border-bottom:1px solid #999999}div.candidatelist a .distance:after{content:" km"}div.candidatelist a .distance{font-size:0.6em;color:#999999;padding-top:0.2em;padding-bottom:0.3em}div.about{margin-top:2em;font-family:Sans-Serif;color:#bbb}div.about a{color:#99f;text-decoration:none}.notice{padding:15px;margin-bottom:20px;border:1px solid #bce8f1;border-radius:4px;color:#31708f;background-color:#d9edf7;margin-left:auto;margin-right:auto}.warning{padding:15px;margin-bottom:20px;border:1px solid #faebcc;border-radius:4px;color:#8a6d3b;background-color:#fcf8e3;margin-left:auto;margin-right:auto}.error{padding:15px;margin-bottom:20px;border:1px solid #ebccd1;border-radius:4px;color:#a94442;background-color:#f2dede;margin-left:auto;margin-right:auto}.error .errcode{font-family:Monospace;margin-top:2em;font-size:100%;color:#aaaaaa}.container{max-width:60em;margin-left:auto;margin-right:auto}pre{margin-bottom:2em}span.optional,span.notes{color:#bbb}.moresettings-header{cursor:pointer}.moresettings-header-collapsed:before{content:"▹ "}.moresettings-header-expanded:before{content:"▿ "}.moresettings-collapsed{display:none}.moresettings-expanded{display:block}.developers-header{cursor:pointer}.developers-header-collapsed:before{content:"▹ "}.developers-header-expanded:before{content:"▿ "}.developers-collapsed{display:none}.developers-expanded{display:block}div.break{height:1em}div.field{margin-top:0.3em;margin-bottom:0.6em}.disabledbutton{display:inline-block;vertical-align:baseline;border-radius:4px;border:1px solid #cccccc;box-shadow:none;padding:0.9ex;margin-right:1em}.smallbutton{display:inline-block;vertical-align:baseline;border-radius:4px;border:1px solid #2e6da4;transition:background-color .3s;color:#fff;background-color:#337ab7;cursor:pointer;box-shadow:none;padding:0.9ex;margin-right:1em}.smallbutton .material-icons,.disabledbutton .material-icons{display:block;float:left;margin-right:0.5ex}input,select,.button{display:inline-block;width:60em;max-width:100%;min-height:1.8em;border-radius:4px;color:#fff;background-color:#101010;border:1px solid #444;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);font-size:90%;text-align:center;vertical-align:middle}input[type="text"]{width:59em;padding-left:0.5em;padding-right:0.5em;text-align:left;box-sizing:border-box}select{min-height:2em}input[type="checkbox"]{width:1.5em;box-shadow:none}input[type="submit"],.button{transition:background-color .3s;color:#fff;background-color:#337ab7;border-color:#2e6da4;cursor:pointer;box-shadow:none;padding-top:0.9ex;padding-bottom:0.9ex}.button{padding-top:1.1ex;padding-bottom:0}input[type="submit"]:active,input[type="submit"]:focus,input[type="submit"]:hover,.button:active,.button:focus,.button:hover,.smallbutton:active,.smallbutton:focus,.smallbutton:hover{color:#fff;background-color:#286090;border-color:#204d74}input[type="submit"]:active,.button:active{box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.button-light{color:#ddd;background-color:#101010;border-color:#444}.button-light:active,.button-light:focus,.button-light:hover{color:#ddd;background-color:#111;border-color:#333}div.notes{margin-top:2em}div.notes ul{margin-top:1em}div.app{max-width:60em;margin-left:auto;margin-right:auto}.navbar-fixed{position:relative;z-index:997}.navbar-fixed nav{position:fixed}nav{box-shadow:0 2px 2px 0 rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12),0 1px 5px 0 rgba(0,0,0,0.2)}nav{width:100%;overflow:hidden}nav a{color:#fff}nav .nav-wrapper{position:relative;height:100%}nav i,nav i.material-icons{display:block;font-size:24px}nav .brand-logo{position:absolute;display:inline-block;padding-left:0.5rem}nav ul{margin:0;padding-left:0;list-style-type:none}nav ul li{transition:background-color .3s;float:left;padding:0;list-style-type:none;background-color:#00838f}nav ul a{transition:background-color .3s;font-size:1rem;color:#fff;display:block;padding:0 15px;cursor:pointer}@media only screen and (max-width: 600px){div.app>ul>li{font-size:35%}div.navbar-fixed{height:56px}.moreinfo{top:56px}nav{height:56px;line-height:56px}nav .brand-logo{font-size:1.5rem}nav .nav-wrapper i{height:56px;line-height:56px}}@media only screen and (min-width: 600px){div.app>ul>li{font-size:40%}div.navbar-fixed{height:64px}.moreinfo{top:64px}nav{height:64px;line-height:64px}nav .brand-logo{font-size:2.1rem}nav .nav-wrapper i{height:64px;line-height:64px}}div.app .moreinfo{font-size:100%} diff --git a/public/static/css/light.min.css b/public/static/css/light.min.css index 62ed4a3..2d047ba 100644 --- a/public/static/css/light.min.css +++ b/public/static/css/light.min.css @@ -1 +1 @@ -body{margin:0;color:#000;background-color:#fff}html{font-family:Sans-Serif}a{color:#009;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.content{width:100%;margin:0}.wagonorder{position:relative;width:100%;height:100ex}.wagonorder .section{position:absolute;left:1em;width:2em;text-align:center}.wagonorder .wagon{position:absolute;left:3em;min-width:6em;border:1px solid #999;padding-left:0.2em;padding-right:0.2em}.wagonorder .wagon~.wagon{border-top:none}.wagonorder .firstclass{background-color:#ff9}.wagonorder .powercar{background-color:#ccc}.wagonorder .wagon .material-icons{color:#666}.wagonorder .wagon .direction{position:absolute;left:0.2em;bottom:0;right:0;text-align:center;color:#666}.wagonorder .nondestwagon{border-style:dashed}.wagonorder .details{position:absolute;padding-top:0.5ex;left:10em;right:0em}.wagonorder .details .type{display:inline-block;width:5em;color:#666}.wagonorder .details .uicunknown{color:#999}.wagonorder .details .uicexchange{margin-right:0.2em;color:#999}.wagonorder .details .uiccountry{margin-right:0.2em;color:#999}.wagonorder .details .uic5{margin-right:0.2em;color:#999}.wagonorder .details .uic56{color:#666;font-weight:bold}.wagonorder .details .uic78{margin-right:0.2em;color:#666;font-weight:bold}.wagonorder .details .uic78::before{content:"-"}.wagonorder .details .uictype{margin-right:0.2em;color:#666;font-weight:bold}.wagonorder .details .uicno{color:#666}.wagonorder .details .uiccheck{color:#999}.wagonorder .details .uiccheck::before{content:"-"}div.app{border-width:1px 2px;width:100%;margin-bottom:5em}div.app>ul{position:relative;width:100%;list-style-type:none;margin:0;padding:0}div.app>ul>li{min-height:7em;display:block;width:100%;position:relative;cursor:pointer;border-bottom:1px solid #999;background-color:#fff}div.app li .line{font-size:2.7em;position:absolute;bottom:5px;left:2px;max-width:6em;max-height:3ex;overflow:hidden}div.app .trainsubtype{font-weight:normal;font-size:70%;position:relative;vertical-align:baseline;top:-0.6ex;left:-0.5ex}div.app li .line .trainno{font-weight:normal}div.app li .line .trainno_sub{font-weight:normal;font-size:0.6em;text-align:center;margin-top:-0.2em}div.app li .sbahn .trainno_sub{font-weight:normal;font-size:0.5em;text-align:center;margin-top:-0.25em}div.app li .lineinfo{color:#000;font-size:2em;position:absolute;top:0px;left:2px}div.app .replacement{color:#060}div.app .replaced{color:#600}div.app .sbahn{font-weight:bold;border-radius:30px;padding:3px 6px 2px 6px;background-color:#95d79f}div.app .bahn,div.app .fern,div.app .ext{font-weight:bold;border-radius:5px;padding:3px 5px 2px 5px}div.app .bahn{background-color:#eee}div.app .fern{background-color:#fdd}div.app .ext{border:2px solid #eee}div.app li .route{background-color:transparent;font-size:2.1em;position:absolute;top:1px;left:7.7em;height:1.2em;width:70%;overflow:hidden;color:#444}div.app li .info{color:red;background-color:transparent;font-size:2.1em;position:absolute;top:1px;left:7.7em;height:1.2em;width:70%;overflow:hidden}div.app .moreinfo{font-size:2.1em;position:fixed;left:0;right:0;bottom:0em;z-index:5;overflow:auto;cursor:default;background-color:#fff}div.app .moreinfo .mheader,div.app .moreinfo .mfooter{max-width:50em;margin-left:auto;margin-right:auto}div.app .collapsed-moreinfo{display:none}div.app .expanded-moreinfo{display:block}div.app .moreinfo .mheader{text-align:center;font-size:120%;padding-top:0.5em;padding-bottom:0.5em;padding-left:1em;padding-right:1em;border-bottom:0.1em dashed #cccccc}div.app .moreinfo .mfooter{padding-top:0.5em;padding-left:1em;padding-right:1em}div.app .moreinfo .dataline{font-size:120%;width:100%;display:flex;justify-content:space-between;margin-bottom:1em}div.app .moreinfo .dataline>div{width:33%}div.app .moreinfo .departure{text-align:right}div.app .moreinfo .platform{text-align:center}div.app .moreinfo .arrival{display:inline-block;text-align:right}div.app .moreinfo .loading{text-align:center;width:100%;color:#888888}div.app .moreinfo .minfo{color:red}div.app .moreinfo .verbose{margin-bottom:1em}div.app .moreinfo .mroute .important-stop{color:#000}div.app .moreinfo .mroute .generic-stop{color:#666}div.app .moreinfo .mroute .additional-stop{color:#090}div.app .moreinfo .mroute .cancelled-stop{color:#c00}div.app .moreinfo .db-attr{margin-bottom:1em}div.app .moreinfo .db-attr span{margin-right:0.5em}div.app li .dest{background-color:transparent;font-size:4em;position:absolute;top:0.62em;left:4em;bottom:0px;width:70%;overflow:hidden;color:#000}div.app li .origin{background-color:transparent;font-size:4em;position:absolute;top:0.62em;left:4em;bottom:0px;width:70%;overflow:hidden;color:#666}div.app li .origin:before{content:"von "}div.app li.cancelled{background-color:#ffe7d0}div.app li .countdown{background-color:transparent;font-size:3em;position:absolute;right:5px;bottom:2px;padding-left:0.2em;color:#000}div.app li .header{color:#000;font-size:2em;font-weight:bold;padding-top:8px;border-width-top:0;display:block;text-align:center}div.app li .head{border-bottom-width:0}div.app li .countdown .delay{font-size:1em;color:red;background-color:transparent;padding-right:7px}div.app li .countdown .undelay{font-size:1em;color:#060;padding-right:7px}div.app li .countdown .delaynorm{font-size:0.9em;color:#b33;padding-right:7px}div.app li .countdown .undelaynorm{font-size:0.9em;color:#383;padding-right:7px}div.app li .countdown .platform{font-weight:bold}div.app li .countdown .changed-platform{color:red}div.app li .time{background-color:transparent;font-size:2.3em;position:absolute;right:5px;top:4px;padding-left:0.2em;color:#000}div.app span.delayed{color:red;background-color:transparent}ul.ui-autocomplete{max-height:20em;overflow-x:hidden;overflow-y:auto}div.geolocation{text-align:center}div.candidatestatus{text-align:center;color:#999999}div.candidatelist a{display:block;text-decoration:none;font-size:1.4em;padding-top:0.3em;text-align:center;border-bottom:1px solid #999999}div.candidatelist a .distance:after{content:" km"}div.candidatelist a .distance{font-size:0.6em;color:#999999;padding-top:0.2em;padding-bottom:0.3em}div.about{margin-top:2em;font-family:Sans-Serif;color:#666}div.about a{color:#009;text-decoration:none}.notice{padding:15px;margin-bottom:20px;border:1px solid #bce8f1;border-radius:4px;color:#31708f;background-color:#d9edf7;margin-left:auto;margin-right:auto}.warning{padding:15px;margin-bottom:20px;border:1px solid #faebcc;border-radius:4px;color:#8a6d3b;background-color:#fcf8e3;margin-left:auto;margin-right:auto}.error{padding:15px;margin-bottom:20px;border:1px solid #ebccd1;border-radius:4px;color:#a94442;background-color:#f2dede;margin-left:auto;margin-right:auto}.error .errcode{font-family:Monospace;margin-top:2em;font-size:100%;color:#aaaaaa}.container{max-width:60em;margin-left:auto;margin-right:auto}pre{margin-bottom:2em}span.optional,span.notes{color:#666}.moresettings-header{cursor:pointer}.moresettings-header-collapsed:before{content:"▹ "}.moresettings-header-expanded:before{content:"▿ "}.moresettings-collapsed{display:none}.moresettings-expanded{display:block}.developers-header{cursor:pointer}.developers-header-collapsed:before{content:"▹ "}.developers-header-expanded:before{content:"▿ "}.developers-collapsed{display:none}.developers-expanded{display:block}div.break{height:1em}div.field{margin-top:0.3em;margin-bottom:0.6em}.disabledbutton{display:inline-block;vertical-align:baseline;border-radius:4px;border:1px solid #cccccc;box-shadow:none;padding:0.9ex;margin-right:1em}.smallbutton{display:inline-block;vertical-align:baseline;border-radius:4px;border:1px solid #2e6da4;transition:background-color .3s;color:#fff;background-color:#337ab7;cursor:pointer;box-shadow:none;padding:0.9ex;margin-right:1em}.smallbutton .material-icons,.disabledbutton .material-icons{display:block;float:left;margin-right:0.5ex}input,select,.button{display:inline-block;width:60em;max-width:100%;min-height:1.8em;border-radius:4px;color:#000;background-color:#fff;border:1px solid #ccc;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);font-size:90%;text-align:center;vertical-align:middle}input[type="text"]{width:59em;padding-left:0.5em;padding-right:0.5em;text-align:left;box-sizing:border-box}select{min-height:2em}input[type="checkbox"]{width:1.5em;box-shadow:none}input[type="submit"],.button{transition:background-color .3s;color:#fff;background-color:#337ab7;border-color:#2e6da4;cursor:pointer;box-shadow:none;padding-top:0.9ex;padding-bottom:0.9ex}.button{padding-top:1.1ex;padding-bottom:0}input[type="submit"]:active,input[type="submit"]:focus,input[type="submit"]:hover,.button:active,.button:focus,.button:hover,.smallbutton:active,.smallbutton:focus,.smallbutton:hover{color:#fff;background-color:#286090;border-color:#204d74}input[type="submit"]:active,.button:active{box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.button-light{color:#333;background-color:#fff;border-color:#ccc}.button-light:active,.button-light:focus,.button-light:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}div.notes{margin-top:2em}div.notes ul{margin-top:1em}div.app{max-width:60em;margin-left:auto;margin-right:auto}.navbar-fixed{position:relative;z-index:997}.navbar-fixed nav{position:fixed}nav{box-shadow:0 2px 2px 0 rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12),0 1px 5px 0 rgba(0,0,0,0.2)}nav{width:100%;overflow:hidden}nav a{color:#fff}nav .nav-wrapper{position:relative;height:100%}nav i,nav i.material-icons{display:block;font-size:24px}nav .brand-logo{position:absolute;display:inline-block;padding-left:0.5rem}nav ul{margin:0;padding-left:0;list-style-type:none}nav ul li{transition:background-color .3s;float:left;padding:0;list-style-type:none;background-color:#00838f}nav ul a{transition:background-color .3s;font-size:1rem;color:#fff;display:block;padding:0 15px;cursor:pointer}@media only screen and (max-width: 600px){div.app>ul>li{font-size:35%}div.navbar-fixed{height:56px}.moreinfo{top:56px}nav{height:56px;line-height:56px}nav .brand-logo{font-size:1.5rem}nav .nav-wrapper i{height:56px;line-height:56px}}@media only screen and (min-width: 600px){div.app>ul>li{font-size:40%}div.navbar-fixed{height:64px}.moreinfo{top:64px}nav{height:64px;line-height:64px}nav .brand-logo{font-size:2.1rem}nav .nav-wrapper i{height:64px;line-height:64px}}div.app .moreinfo{font-size:100%} +body{margin:0;color:#000;background-color:#fff}html{font-family:Sans-Serif}a{color:#009;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.content{width:100%;margin:0}.copyright{margin-top:1em;color:#999}.wagonorder{position:relative;width:100%;height:100ex}.wagonorder .section{position:absolute;left:1em;width:2em;text-align:center}.wagonorder .wagon{position:absolute;left:3em;min-width:6em;border:1px solid #999;padding-left:0.2em;padding-right:0.2em}.wagonorder .wagon~.wagon{border-top:none}.wagonorder .firstclass{background-color:#ff9}.wagonorder .powercar{background-color:#ccc}.wagonorder .wagon .material-icons{color:#666}.wagonorder .wagon .direction{position:absolute;left:0.2em;bottom:0;right:0;text-align:center;color:#666}.wagonorder .nondestwagon{border-style:dashed}.wagonorder .details{position:absolute;padding-top:0.5ex;left:10em;right:0em}.wagonorder .details .type{display:inline-block;width:5em;color:#666}.wagonorder .details a.type{color:#009}.wagonorder .details .uicunknown{color:#999}.wagonorder .details .uicexchange{margin-right:0.2em;color:#999}.wagonorder .details .uiccountry{margin-right:0.2em;color:#999}.wagonorder .details .uic5{margin-right:0.2em;color:#999}.wagonorder .details .uic56{color:#666;font-weight:bold}.wagonorder .details .uic78{margin-right:0.2em;color:#666;font-weight:bold}.wagonorder .details .uic78::before{content:"-"}.wagonorder .details .uictype{margin-right:0.2em;color:#666;font-weight:bold}.wagonorder .details .uicno{color:#666}.wagonorder .details .uiccheck{color:#999}.wagonorder .details .uiccheck::before{content:"-"}div.app{border-width:1px 2px;width:100%;margin-bottom:5em}div.app>ul{position:relative;width:100%;list-style-type:none;margin:0;padding:0}div.app>ul>li{min-height:7em;display:block;width:100%;position:relative;cursor:pointer;border-bottom:1px solid #999;background-color:#fff}div.app li .line{font-size:2.7em;position:absolute;bottom:5px;left:2px;max-width:6em;max-height:3ex;overflow:hidden}div.app .trainsubtype{font-weight:normal;font-size:70%;position:relative;vertical-align:baseline;top:-0.6ex;left:-0.5ex}div.app li .line .trainno{font-weight:normal}div.app li .line .trainno_sub{font-weight:normal;font-size:0.6em;text-align:center;margin-top:-0.2em}div.app li .sbahn .trainno_sub{font-weight:normal;font-size:0.5em;text-align:center;margin-top:-0.25em}div.app li .lineinfo{color:#000;font-size:2em;position:absolute;top:0px;left:2px}div.app .replacement{color:#060}div.app .replaced{color:#600}div.app .sbahn{font-weight:bold;border-radius:30px;padding:3px 6px 2px 6px;background-color:#95d79f}div.app .bahn,div.app .fern,div.app .ext{font-weight:bold;border-radius:5px;padding:3px 5px 2px 5px}div.app .bahn{background-color:#eee}div.app .fern{background-color:#fdd}div.app .ext{border:2px solid #eee}div.app li .route{background-color:transparent;font-size:2.1em;position:absolute;top:1px;left:7.7em;height:1.2em;width:70%;overflow:hidden;color:#444}div.app li .info{color:red;background-color:transparent;font-size:2.1em;position:absolute;top:1px;left:7.7em;height:1.2em;width:70%;overflow:hidden}div.app .moreinfo{font-size:2.1em;position:fixed;left:0;right:0;bottom:0em;z-index:5;overflow:auto;cursor:default;background-color:#fff}div.app .moreinfo .mheader,div.app .moreinfo .mfooter{max-width:50em;margin-left:auto;margin-right:auto}div.app .collapsed-moreinfo{display:none}div.app .expanded-moreinfo{display:block}div.app .moreinfo .mheader{text-align:center;font-size:120%;padding-top:0.5em;padding-bottom:0.5em;padding-left:1em;padding-right:1em;border-bottom:0.1em dashed #cccccc}div.app .moreinfo .mfooter{padding-top:0.5em;padding-left:1em;padding-right:1em}div.app .moreinfo .dataline{font-size:120%;width:100%;display:flex;justify-content:space-between;margin-bottom:1em}div.app .moreinfo .dataline>div{width:33%}div.app .moreinfo .departure{text-align:right}div.app .moreinfo .platform{text-align:center}div.app .moreinfo .arrival{display:inline-block;text-align:right}div.app .moreinfo .loading{text-align:center;width:100%;color:#888888}div.app .moreinfo .minfo{color:red}div.app .moreinfo .verbose{margin-bottom:1em}div.app .moreinfo .mroute .important-stop{color:#000}div.app .moreinfo .mroute .generic-stop{color:#666}div.app .moreinfo .mroute .additional-stop{color:#090}div.app .moreinfo .mroute .cancelled-stop{color:#c00}div.app .moreinfo .db-attr{margin-bottom:1em}div.app .moreinfo .db-attr span{margin-right:0.5em}div.app li .dest{background-color:transparent;font-size:4em;position:absolute;top:0.62em;left:4em;bottom:0px;width:70%;overflow:hidden;color:#000}div.app li .origin{background-color:transparent;font-size:4em;position:absolute;top:0.62em;left:4em;bottom:0px;width:70%;overflow:hidden;color:#666}div.app li .origin:before{content:"von "}div.app li.cancelled{background-color:#ffe7d0}div.app li .countdown{background-color:transparent;font-size:3em;position:absolute;right:5px;bottom:2px;padding-left:0.2em;color:#000}div.app li .header{color:#000;font-size:2em;font-weight:bold;padding-top:8px;border-width-top:0;display:block;text-align:center}div.app li .head{border-bottom-width:0}div.app li .countdown .delay{font-size:1em;color:red;background-color:transparent;padding-right:7px}div.app li .countdown .undelay{font-size:1em;color:#060;padding-right:7px}div.app li .countdown .delaynorm{font-size:0.9em;color:#b33;padding-right:7px}div.app li .countdown .undelaynorm{font-size:0.9em;color:#383;padding-right:7px}div.app li .countdown .platform{font-weight:bold}div.app li .countdown .changed-platform{color:red}div.app li .time{background-color:transparent;font-size:2.3em;position:absolute;right:5px;top:4px;padding-left:0.2em;color:#000}div.app span.delayed{color:red;background-color:transparent}ul.ui-autocomplete{max-height:20em;overflow-x:hidden;overflow-y:auto}div.geolocation{text-align:center}div.candidatestatus{text-align:center;color:#999999}div.candidatelist a{display:block;text-decoration:none;font-size:1.4em;padding-top:0.3em;text-align:center;border-bottom:1px solid #999999}div.candidatelist a .distance:after{content:" km"}div.candidatelist a .distance{font-size:0.6em;color:#999999;padding-top:0.2em;padding-bottom:0.3em}div.about{margin-top:2em;font-family:Sans-Serif;color:#666}div.about a{color:#009;text-decoration:none}.notice{padding:15px;margin-bottom:20px;border:1px solid #bce8f1;border-radius:4px;color:#31708f;background-color:#d9edf7;margin-left:auto;margin-right:auto}.warning{padding:15px;margin-bottom:20px;border:1px solid #faebcc;border-radius:4px;color:#8a6d3b;background-color:#fcf8e3;margin-left:auto;margin-right:auto}.error{padding:15px;margin-bottom:20px;border:1px solid #ebccd1;border-radius:4px;color:#a94442;background-color:#f2dede;margin-left:auto;margin-right:auto}.error .errcode{font-family:Monospace;margin-top:2em;font-size:100%;color:#aaaaaa}.container{max-width:60em;margin-left:auto;margin-right:auto}pre{margin-bottom:2em}span.optional,span.notes{color:#666}.moresettings-header{cursor:pointer}.moresettings-header-collapsed:before{content:"▹ "}.moresettings-header-expanded:before{content:"▿ "}.moresettings-collapsed{display:none}.moresettings-expanded{display:block}.developers-header{cursor:pointer}.developers-header-collapsed:before{content:"▹ "}.developers-header-expanded:before{content:"▿ "}.developers-collapsed{display:none}.developers-expanded{display:block}div.break{height:1em}div.field{margin-top:0.3em;margin-bottom:0.6em}.disabledbutton{display:inline-block;vertical-align:baseline;border-radius:4px;border:1px solid #cccccc;box-shadow:none;padding:0.9ex;margin-right:1em}.smallbutton{display:inline-block;vertical-align:baseline;border-radius:4px;border:1px solid #2e6da4;transition:background-color .3s;color:#fff;background-color:#337ab7;cursor:pointer;box-shadow:none;padding:0.9ex;margin-right:1em}.smallbutton .material-icons,.disabledbutton .material-icons{display:block;float:left;margin-right:0.5ex}input,select,.button{display:inline-block;width:60em;max-width:100%;min-height:1.8em;border-radius:4px;color:#000;background-color:#fff;border:1px solid #ccc;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);font-size:90%;text-align:center;vertical-align:middle}input[type="text"]{width:59em;padding-left:0.5em;padding-right:0.5em;text-align:left;box-sizing:border-box}select{min-height:2em}input[type="checkbox"]{width:1.5em;box-shadow:none}input[type="submit"],.button{transition:background-color .3s;color:#fff;background-color:#337ab7;border-color:#2e6da4;cursor:pointer;box-shadow:none;padding-top:0.9ex;padding-bottom:0.9ex}.button{padding-top:1.1ex;padding-bottom:0}input[type="submit"]:active,input[type="submit"]:focus,input[type="submit"]:hover,.button:active,.button:focus,.button:hover,.smallbutton:active,.smallbutton:focus,.smallbutton:hover{color:#fff;background-color:#286090;border-color:#204d74}input[type="submit"]:active,.button:active{box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.button-light{color:#333;background-color:#fff;border-color:#ccc}.button-light:active,.button-light:focus,.button-light:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}div.notes{margin-top:2em}div.notes ul{margin-top:1em}div.app{max-width:60em;margin-left:auto;margin-right:auto}.navbar-fixed{position:relative;z-index:997}.navbar-fixed nav{position:fixed}nav{box-shadow:0 2px 2px 0 rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12),0 1px 5px 0 rgba(0,0,0,0.2)}nav{width:100%;overflow:hidden}nav a{color:#fff}nav .nav-wrapper{position:relative;height:100%}nav i,nav i.material-icons{display:block;font-size:24px}nav .brand-logo{position:absolute;display:inline-block;padding-left:0.5rem}nav ul{margin:0;padding-left:0;list-style-type:none}nav ul li{transition:background-color .3s;float:left;padding:0;list-style-type:none;background-color:#00838f}nav ul a{transition:background-color .3s;font-size:1rem;color:#fff;display:block;padding:0 15px;cursor:pointer}@media only screen and (max-width: 600px){div.app>ul>li{font-size:35%}div.navbar-fixed{height:56px}.moreinfo{top:56px}nav{height:56px;line-height:56px}nav .brand-logo{font-size:1.5rem}nav .nav-wrapper i{height:56px;line-height:56px}}@media only screen and (min-width: 600px){div.app>ul>li{font-size:40%}div.navbar-fixed{height:64px}.moreinfo{top:64px}nav{height:64px;line-height:64px}nav .brand-logo{font-size:2.1rem}nav .nav-wrapper i{height:64px;line-height:64px}}div.app .moreinfo{font-size:100%} diff --git a/public/static/css/material-icons.css b/public/static/css/material-icons.css index 270719f..2df6cd4 100644 --- a/public/static/css/material-icons.css +++ b/public/static/css/material-icons.css @@ -2,12 +2,12 @@ font-family: 'Material Icons'; font-style: normal; font-weight: 400; - src: url(/static/v42/fonts/MaterialIcons-Regular.eot); /* For IE6-8 */ + src: url(/static/v43/fonts/MaterialIcons-Regular.eot); /* For IE6-8 */ src: local('Material Icons'), local('MaterialIcons-Regular'), - url(/static/v42/fonts/MaterialIcons-Regular.woff2) format('woff2'), - url(/static/v42/fonts/MaterialIcons-Regular.woff) format('woff'), - url(/static/v42/fonts/MaterialIcons-Regular.ttf) format('truetype'); + url(/static/v43/fonts/MaterialIcons-Regular.woff2) format('woff2'), + url(/static/v43/fonts/MaterialIcons-Regular.woff) format('woff'), + url(/static/v43/fonts/MaterialIcons-Regular.ttf) format('truetype'); } .material-icons { diff --git a/public/static/v41 b/public/static/v43 index 945c9b4..945c9b4 120000 --- a/public/static/v41 +++ b/public/static/v43 diff --git a/sass/app.scss b/sass/app.scss index 0227a92..26a1a56 100644 --- a/sass/app.scss +++ b/sass/app.scss @@ -36,6 +36,11 @@ div.content { margin: 0; } +.copyright { + margin-top: 1em; + color: $fg3; +} + .wagonorder { position: relative; width: 100%; @@ -100,6 +105,10 @@ div.content { color: $fg2; } +.wagonorder .details a.type { + color: $link-color; +} + .wagonorder .details .uicunknown { color: $fg3; } diff --git a/share/dbdb_wagen.json b/share/dbdb_wagen.json new file mode 100644 index 0000000..44ac3ec --- /dev/null +++ b/share/dbdb_wagen.json @@ -0,0 +1,47 @@ +{ +"08120": true, +"14120": true, +"18120": true, +"24120": true, +"24123": true, +"24125": true, +"24128": true, +"48120": true, +"58120": true, +"64120": true, +"8010": true, +"8014": true, +"8018": true, +"8020": true, +"8023": true, +"8026": true, +"8027": true, +"8028": true, +"8029": true, +"8031": true, +"8040": true, +"8050": true, +"8053": true, +"8060": true, +"8063": true, +"8066": true, +"x8070": true, +"8080": true, +"88120": true, +"98120": true, +"xApmmz": true, +"ARkimbz": true, +"ARkimmbz": true, +"Avmmz": true, +"Avmz": true, +"Bimmdzf": true, +"Bpmbz": true, +"Bpmmbdz": true, +"Bpmmbdzf": true, +"Bpmmbz": true, +"Bpmmdz": true, +"Bpmmz": true, +"Bvmmsz": true, +"Bvmmz": true, +"xBvmsz": true +} diff --git a/templates/_wagon.html.ep b/templates/_wagon.html.ep index 95b1c2e..a9221bd 100644 --- a/templates/_wagon.html.ep +++ b/templates/_wagon.html.ep @@ -50,9 +50,14 @@ </div> <div class="details" style=" top: <%= $wagon->{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%;"> - <span class="type"> -%= $wagon->type - </span> +% if (my $img = wagon_image($type, $wagon->type, $wagon->uic_id)) { + <a class="type" href="/w/<%= $img %>?n=<%= $wagon->number // '' %>&s=<%= $wagon->section %>&r=<%= $wref %>"><%= $wagon->type %></a> +% } +% else { + <span class="type"> +%= $wagon->type + </span> +% } % my $uic_id = $wagon->uic_id; % if (length($uic_id) != 12) { <span class="uicunknown"><%= $uic_id %></span> diff --git a/templates/layouts/app.html.ep b/templates/layouts/app.html.ep index e45a4dd..b776d21 100644 --- a/templates/layouts/app.html.ep +++ b/templates/layouts/app.html.ep @@ -18,7 +18,7 @@ <meta http-equiv="refresh" content="<%= $self->stash('refresh_interval') %>"/> % } - % my $av = 'v42'; # asset version + % my $av = 'v43'; # asset version % if (session('theme') and session('theme') eq 'dark' or param('dark')) { %= stylesheet "/static/${av}/css/dark.min.css", id => 'theme' % } diff --git a/templates/layouts/legacy.html.ep b/templates/layouts/legacy.html.ep index 1ea4b67..a861488 100644 --- a/templates/layouts/legacy.html.ep +++ b/templates/layouts/legacy.html.ep @@ -17,7 +17,7 @@ <meta http-equiv="refresh" content="<%= $self->stash('refresh_interval') %>"/> % } - % my $av = 'v42'; # asset version + % my $av = 'v43'; # asset version %= stylesheet "/static/${av}/css/default.css" %= stylesheet "/static/${av}/css/material-icons.css" %= stylesheet "/static/${av}/css/jquery-ui.min.css" diff --git a/templates/wagen.html.ep b/templates/wagen.html.ep new file mode 100644 index 0000000..49a7274 --- /dev/null +++ b/templates/wagen.html.ep @@ -0,0 +1,17 @@ +<div class="container"> + <div> + <a href="<%= $wagon_file %>"><img src="<%= $wagon_file %>" style="width: 100%;"></a> + </div> + <p> + % if ($wref->{s} and $wref->{p} and $wref->{ws}) { + Position in <%= $wref->{s} %>: Gleis <%= $wref->{p} %> Abschnitt <%= $wref->{ws} %> + % } + % elsif ($wref->{s} and $wref->{p}) { + <%= $wref->{s} %> Gleis <%= $wref->{p} %> + % } + </p> + <p class="copyright"> + Abbildung © Seemanngrafik d.i.p. im Auftrag der Deutschen Bahn AG, + lizensiert unter CC-BY-4.0 + </p> +</div> diff --git a/templates/wagenreihung.html.ep b/templates/wagenreihung.html.ep index 512c30c..38987a9 100644 --- a/templates/wagenreihung.html.ep +++ b/templates/wagenreihung.html.ep @@ -60,7 +60,7 @@ % } % } % for my $wagon ($wr->wagons) { -%= include '_wagon', direction => $wr->direction, wagon => $wagon; +%= include '_wagon', direction => $wr->direction, wagon => $wagon, type => $wr->train_subtype // 'IC', wref => $wref; % } </div> <!-- <div> diff --git a/templates/zugbildung_db.html.ep b/templates/zugbildung_db.html.ep index 0eb43e3..096ac0b 100644 --- a/templates/zugbildung_db.html.ep +++ b/templates/zugbildung_db.html.ep @@ -13,7 +13,7 @@ <div class="container"> <div class="wagonorder"> % for my $wagon (@{$wagons // []}) { -%= include '_wagon', direction => undef, wagon => $wagon; +%= include '_wagon', direction => undef, wagon => $wagon, type => $zb->{type}, wref => ''; % } </div> <div> |