Commit 07a5d91d authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Start work on clean (soon-to-be oeffi-like) display

parent 6c8d494d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ sub handle_request {
	$self->stash( title      => 'db-fakedisplay' );
	$self->stash( version    => $VERSION );

	if ( not( $template ~~ [qw[multi single]] ) ) {
	if ( not( $template ~~ [qw[clean multi single]] ) ) {
		$template = 'multi';
	}

+55 −0
Original line number Diff line number Diff line
% if (@{$departures}) {

<div class="displayclean">
% my $i = 0;
% for my $departure (@{$departures}) {
% $i++;

<div class="display <% if (($i % 2) == 0) { %> separator<% } %>">

<div class="train">
%= $departure->{train}
</div>

<div class="destination">
%= $departure->{destination}
</div>

<div class="platform">
%= $departure->{platform}
</div>

<div class="time">
%= $departure->{time}
</div>

<div class="via">
% my $via_max = @{$departure->{via}};
% my $via_cur = 0;
% for my $stop (@{$departure->{via}}) {
% $via_cur++;
<span><%= $stop %><% if ($via_cur < $via_max) { %> - <% } %></span>
% }
</div>

% if ($departure->{info}) {
<div class="info">
%= $departure->{info}
</div>
% }

</div> <!-- display -->

% }

</div> <!-- outer -->

% }
% else {

<p>
DB-Fakedisplay displays the next departures at a DB station, just like the big
LC display in the station itself.
</p>

% }
+69 −1
Original line number Diff line number Diff line
@@ -20,6 +20,74 @@
	}
% }

	div.displayclean div.display {
		font-family: Sans-Serif;
		position: relative;
		margin-bottom: 0;
		margin-top: 0;
		padding-top: 0;
		padding-bottom: 0;
		width: 100%;
		height: 4.4em;
	}

	div.displayclean div.display div {
		overflow: hidden;
		position: absolute;
		height: 100%;
	}

	div.displayclean div.time {
		left: 0;
		top: 10%;
		height: 1em;
		font-size: 150%;
	}

	div.displayclean div.train {
		left: 0;
		width: 42%;
		color: #000000;
		font-size: 200%;
		font-weight: bold;
		text-align: right;
	}

	div.displayclean div.via {
		top: 57%;
		left: 44%;
	}

	div.displayclean div.via span {
		margin-right: 0.4em;
		font-size: 95%;
		color: #333333;
	}

	div.displayclean div.destination {
		left: 44%;
		width: 78%;
		font-size: 200%;
	}

	div.displayclean div.platform {
		right: 0;
		font-size: 200%;
	}

	div.displayclean div.info {
		left: 0;
		top: 57%;
		width: 44%;
		font-size: 80%;
		line-height: 150%;
		color: #dd0000;
	}

	div.displayclean div.separator {
		border-bottom: 0.1em solid #000066;
	}

	div.displaymulti {
		border: 0.2em solid #000066;
		width: 55em;
@@ -280,7 +348,7 @@
      display type
    </div>
    <div>
      %= select_field mode => [['combined' => 'multi'], ['platform' => 'single']]
      %= select_field mode => [['combined' => 'multi'], ['platform' => 'single'], ['non-DB' => 'clean']]
    </div>
  </div>
  <div class="field">