From 21643b053d8d4097f7bb51463a1562738b82892d Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 2 Sep 2018 21:41:33 +0200 Subject: Initial commit --- templates/checkin.html.ep | 47 ++++++++++++++++++++++++++++++ templates/checkout.html.ep | 31 ++++++++++++++++++++ templates/departures.html.ep | 49 +++++++++++++++++++++++++++++++ templates/landingpage.html.ep | 61 +++++++++++++++++++++++++++++++++++++++ templates/layouts/default.html.ep | 29 +++++++++++++++++++ 5 files changed, 217 insertions(+) create mode 100644 templates/checkin.html.ep create mode 100644 templates/checkout.html.ep create mode 100644 templates/departures.html.ep create mode 100644 templates/landingpage.html.ep create mode 100644 templates/layouts/default.html.ep (limited to 'templates') diff --git a/templates/checkin.html.ep b/templates/checkin.html.ep new file mode 100644 index 0000000..96cd80f --- /dev/null +++ b/templates/checkin.html.ep @@ -0,0 +1,47 @@ +% if ($error) { +
+
+
+
+ I am Error +

<%= $error %>

+
+
+ % if (param('station')) { + Zurück zu den Abfahrten + % } + % else { + Zur Hauptseite + % } +
+
+
+% } +% else { +
+
+
+
+ Eingecheckt in <%= $train->line %> +

Abfahrt um <%= $train->sched_departure->strftime('%H:%M') %> + % if ($train->departure_delay) { + +<%= $train->departure_delay %> + % } +

+
+
+
+
+
+
+ Weitere Route: +
    + % for my $station ($train->route_post) { +
  • <%= $station %> + (hier auschecken) +
  • + % } +
+
+
+% } diff --git a/templates/checkout.html.ep b/templates/checkout.html.ep new file mode 100644 index 0000000..1b5a4f2 --- /dev/null +++ b/templates/checkout.html.ep @@ -0,0 +1,31 @@ +% if ($error) { +
+
+
+
+ I am Error +

<%= $error %>

+
+
+ Ohne Echtzeitdaten auschecken + % if (param('station')) { + Zurück zu den Abfahrten + % } + % else { + Zur Hauptseite + % } +
+
+
+% } +% else { +
+
+
+
+ Erfolgreich ausgecheckt +
+
+
+
+% } diff --git a/templates/departures.html.ep b/templates/departures.html.ep new file mode 100644 index 0000000..bbe0149 --- /dev/null +++ b/templates/departures.html.ep @@ -0,0 +1,49 @@ +
+
+ % my $status = $self->get_user_status; + % if ($status->{checked_in}) { +
+
+ Aktuell eingecheckt +

In <%= $status->{train_type} %> <%= $status->{train_no} %> + ab <%= $status->{station_name} %>

+
+ +
+ % } +
+
+
+ + + + + + + + + + % for my $result (@{$results}) { + + + + + + % } + +
ZugAbfahrt
+ + <%= $result->line %> + + + + <%= $result->destination %> + + <%= $result->departure->strftime('%H:%M') %> + % if ($result->departure_delay) { + (+<%= $result->departure_delay %>) + % } +
+
diff --git a/templates/landingpage.html.ep b/templates/landingpage.html.ep new file mode 100644 index 0000000..2190862 --- /dev/null +++ b/templates/landingpage.html.ep @@ -0,0 +1,61 @@ +
+
+ % my $status = $self->get_user_status; + % if ($status->{checked_in}) { +
+
+ Hallo, <%= $self->get_user_name %>! +

Du bist gerade eingecheckt in + <%= $status->{train_type} %> <%= $status->{train_no} %> + ab <%= $status->{station_name} %>.

+

Auschecken? +

    + % my $is_after = 0; + % for my $station (@{$status->{route_after}}) { +
  • <%= $station %>
  • + % } +
+

+
+
+ % } + % else { +
+
+ Hallo, <%= $self->get_user_name %>! +

Du bist gerade nicht eingecheckt.

+
+
+ % } +
+
+

Bisherige Fahrten

+
+ + + + + + + + + + + % for my $travel (get_user_travels()) { + % if ($travel->{completed}) { + + + + + % if ($travel->{rt_arrival} and $travel->{rt_departure}) { + + % } + % else { + + % } + + % } + % } + + + diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep new file mode 100644 index 0000000..5e0091c --- /dev/null +++ b/templates/layouts/default.html.ep @@ -0,0 +1,29 @@ + + + + <%= stash('title') // 'travelynx' %> + + + %= stylesheet '/static/css/materialize.min.css' + %= stylesheet '/static/css/material-icons.css' + %= stylesheet '/static/css/local.css' + %= javascript '/static/js/jquery-2.2.4.min.js' + %= javascript '/static/js/materialize.min.js' + + + + + +
+ %= content +
+ + + -- cgit v1.2.3
DatumZugStreckeDauer
<%= $travel->{sched_departure}->strftime('%d.%m.%Y') %><%= $travel->{type} %> <%= $travel->{line} // $travel->{no} %><%= $travel->{from_name} %> → <%= $travel->{to_name} %><%= ($travel->{rt_arrival}->epoch - $travel->{rt_departure}->epoch) / 60 %> min?