From d3df2a6eb82eab6d3164e9da4c8c7c243764c5bc Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 13 Dec 2013 13:52:20 +0100 Subject: infoscreen: playing around with vw (viewport-width based font sizes) --- cgi/index.pl | 8 ++++++-- cgi/templates/infoscreen.html.ep | 16 +++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/cgi/index.pl b/cgi/index.pl index fd00b9f..d579b4d 100644 --- a/cgi/index.pl +++ b/cgi/index.pl @@ -178,7 +178,8 @@ sub get_filtered_departures { if ( ( @grep_line and not( any { $line =~ $_ } @grep_line ) ) or ( @grep_platform and not( $platform ~~ \@grep_platform ) ) - or ( $line =~ m{ ^ (RB | RE | IC | EC) }x ) ) + or ( $opt{hide_regional} and $line =~ m{ ^ (RB | RE | IC | EC) }x ) + ) { next; } @@ -294,6 +295,7 @@ sub render_html { backend => scalar $self->param('backend'), filter_line => scalar $self->param('line'), filter_platform => scalar $self->param('platform'), + hide_regional => ( $template eq 'infoscreen' ? 0 : 1 ), ); my @departures = make_infoboard_lines( @@ -332,9 +334,10 @@ sub render_json { city => $self->stash('city'), stop => $self->stash('stop'), backend => scalar $self->param('backend'), + cache_expiry => 60, filter_line => scalar $self->param('line'), filter_platform => scalar $self->param('platform'), - cache_expiry => 60, + hide_regional => 1, ); my @departures = make_infoboard_lines( no_lines => scalar $self->param('no_lines'), @@ -373,6 +376,7 @@ sub render_image { backend => scalar $self->param('backend'), filter_line => scalar $self->param('line'), filter_platform => scalar $self->param('platform'), + hide_regional => 0, ); my @departures = make_infoboard_lines( diff --git a/cgi/templates/infoscreen.html.ep b/cgi/templates/infoscreen.html.ep index d1bcc68..b3aa2ec 100644 --- a/cgi/templates/infoscreen.html.ep +++ b/cgi/templates/infoscreen.html.ep @@ -54,7 +54,7 @@ color:#FFFFFF; background-color:#666666; font-weight:bold; - font-size:28px; + font-size:2.3vw; padding:3px 8px 2px 5px; position:absolute; top:7px; @@ -85,7 +85,7 @@ div.displayclean li .route { color:#444444; - font-size:21px; + font-size:1.575vw; position:absolute; top:5px; left:10em; @@ -94,7 +94,7 @@ div.displayclean li .dest { color:#000000; font-weight:bold; - font-size:46px; + font-size:3.45vw; position:absolute; top:23px; left:4.5em; @@ -102,7 +102,7 @@ div.displayclean li .countdown { color:#000000; - font-size:48px; + font-size:3.5vw; position:absolute; right:5px; bottom:2px; @@ -110,7 +110,7 @@ div.displayclean li .header { color:#000000; - font-size:55px; + font-size:4.125vw; font-weight:bold; padding-top:8px; border-width-top:0; @@ -123,14 +123,14 @@ } div.displayclean li .countdown .delay { - font-size:38px; + font-size: 2.85vw; color:#FF0000; padding-right:7px; } div.displayclean li .time { color:#000000; - font-size:24px; + font-size: 1.7vw; position:absolute; right:5px; top:5px; @@ -217,7 +217,9 @@ %= $departure->line +% if ($departure->lineref) { %= $departure->lineref->route +% } %= $departure->destination -- cgit v1.2.3