diff options
author | Daniel Friesel <derf@finalrewind.org> | 2013-12-13 11:29:58 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2013-12-13 11:29:58 +0100 |
commit | 046ad7edaf090715a37289494434081cd04a8c0c (patch) | |
tree | 46ae0035bc8a12dcefaad52d84e28968e53cfa3c /cgi/index.pl | |
parent | d2f73f38c32960c59a97eedd4a3a975fa22b6814 (diff) |
start work on infoscreen template
Diffstat (limited to 'cgi/index.pl')
-rw-r--r-- | cgi/index.pl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cgi/index.pl b/cgi/index.pl index d43e2b2..fd00b9f 100644 --- a/cgi/index.pl +++ b/cgi/index.pl @@ -1,6 +1,7 @@ #!/usr/bin/env perl use Mojolicious::Lite; use Cache::File; +use utf8; use DateTime; use DateTime::Format::Strptime; @@ -283,8 +284,9 @@ sub make_infoboard_lines { } sub render_html { - my $self = shift; - my $color = $self->param('color') || '255,208,0'; + my $self = shift; + my $color = $self->param('color') || '255,208,0'; + my $template = $self->param('template') || 'display'; my ( $raw_departures, $errstr ) = get_filtered_departures( city => $self->stash('city'), @@ -311,11 +313,13 @@ sub render_html { } $self->render( - 'display', + $template, title => "vrr-fakedisplay v${VERSION}", color => [ split( qr{,}, $color ) ], departures => \@departures, + raw => $raw_departures, scale => $self->param('scale') || '4.3', + version => $VERSION, ); return; |