From 84b32b28e9f1da6576e4864a0f374b341a2c9920 Mon Sep 17 00:00:00 2001 From: marudor Date: Thu, 16 May 2019 16:10:53 +0200 Subject: Further color improvements --- templates/_cancelled.html.ep | 2 +- templates/_checked_in.html.ep | 6 +++--- templates/_checked_out.html.ep | 4 ++-- templates/_deletion_note.html.ep | 2 +- templates/_history_stats.html.ep | 2 +- templates/_invalid_input.html.ep | 2 +- templates/_public_status_card.html.ep | 6 +++--- templates/account.html.ep | 2 +- templates/change_mail.html.ep | 2 +- templates/departures.html.ep | 4 ++-- templates/edit_journey.html.ep | 4 ++-- templates/exception.html.ep | 2 +- templates/journey.html.ep | 2 +- templates/layouts/default.html.ep | 16 +++++++++++++++- templates/login.html.ep | 10 +++++----- templates/not_found.html.ep | 2 +- templates/recover_password.html.ep | 2 +- templates/webhooks.html.ep | 4 ++-- 18 files changed, 44 insertions(+), 30 deletions(-) (limited to 'templates') diff --git a/templates/_cancelled.html.ep b/templates/_cancelled.html.ep index d35c849..585d2ad 100644 --- a/templates/_cancelled.html.ep +++ b/templates/_cancelled.html.ep @@ -1,4 +1,4 @@ -
+
Zugausfall dokumentieren

Prinzipiell wärest du nun eingecheckt in diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep index 3030325..d51097e 100644 --- a/templates/_checked_in.html.ep +++ b/templates/_checked_in.html.ep @@ -1,4 +1,4 @@ -

+
Eingecheckt in <%= $journey->{train_type} %> <%= $journey->{train_no} %> @@ -31,8 +31,8 @@ Ankunft in mehr als zwei Stunden % }
-
-
+
+

% if ($journey->{arr_name}) { diff --git a/templates/_checked_out.html.ep b/templates/_checked_out.html.ep index 1b6113a..9c7ff48 100644 --- a/templates/_checked_out.html.ep +++ b/templates/_checked_out.html.ep @@ -1,5 +1,5 @@ -
-
+
+
Ausgecheckt

Aus <%= $journey->{train_type} %> <%= $journey->{train_no} %> bis <%= $journey->{arr_name} %>

diff --git a/templates/_deletion_note.html.ep b/templates/_deletion_note.html.ep index 89cf271..5be2f99 100644 --- a/templates/_deletion_note.html.ep +++ b/templates/_deletion_note.html.ep @@ -1,6 +1,6 @@
-
+
Account wird gelöscht

diff --git a/templates/_history_stats.html.ep b/templates/_history_stats.html.ep index 715fa1a..8197ed1 100644 --- a/templates/_history_stats.html.ep +++ b/templates/_history_stats.html.ep @@ -1,7 +1,7 @@ % if (@{$stats->{inconsistencies}}) {

-
+
warning Inkonsistente Reisedaten diff --git a/templates/_invalid_input.html.ep b/templates/_invalid_input.html.ep index ad01c15..4cebf29 100644 --- a/templates/_invalid_input.html.ep +++ b/templates/_invalid_input.html.ep @@ -1,6 +1,6 @@
-
+
% if ($invalid eq 'csrf') { Ungültiger CSRF-Token diff --git a/templates/_public_status_card.html.ep b/templates/_public_status_card.html.ep index d19cb9f..0863723 100644 --- a/templates/_public_status_card.html.ep +++ b/templates/_public_status_card.html.ep @@ -1,5 +1,5 @@ % if ($journey->{checked_in}) { -
+
<%= $name %> ist unterwegs @@ -80,8 +80,8 @@
% } % else { -
-
+
+
<%= $name %> ist gerade nicht eingecheckt

diff --git a/templates/account.html.ep b/templates/account.html.ep index b0e60cb..2c58a7b 100644 --- a/templates/account.html.ep +++ b/templates/account.html.ep @@ -5,7 +5,7 @@ % if (my $success = flash('success')) {

-
+
% if ($success eq 'mail') { Mail-Adresse geändert diff --git a/templates/change_mail.html.ep b/templates/change_mail.html.ep index 65d3d8d..4f9108a 100644 --- a/templates/change_mail.html.ep +++ b/templates/change_mail.html.ep @@ -5,7 +5,7 @@ % if (stash('success')) {
-
+
Mail-Änderung wird durchgeführt

diff --git a/templates/departures.html.ep b/templates/departures.html.ep index fb917f3..3c9638e 100644 --- a/templates/departures.html.ep +++ b/templates/departures.html.ep @@ -2,8 +2,8 @@

% my $status = $self->get_user_status; % if ($status->{checked_in}) { -
-
+
+
Aktuell eingecheckt

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

diff --git a/templates/edit_journey.html.ep b/templates/edit_journey.html.ep index c37adba..06338f6 100644 --- a/templates/edit_journey.html.ep +++ b/templates/edit_journey.html.ep @@ -2,7 +2,7 @@ % if ($error and $error eq 'notfound') {
-
+
Fehler

Zugfahrt nicht gefunden.

@@ -15,7 +15,7 @@ % if ($error) {
-
+
Ungültige Eingabe

<%= $error %>

diff --git a/templates/exception.html.ep b/templates/exception.html.ep index e4daf9a..290efc5 100644 --- a/templates/exception.html.ep +++ b/templates/exception.html.ep @@ -1,6 +1,6 @@
-
+
500 Internal Server Error

Das hätte nicht passieren sollen.

diff --git a/templates/journey.html.ep b/templates/journey.html.ep index 76e7f79..cd2b04e 100644 --- a/templates/journey.html.ep +++ b/templates/journey.html.ep @@ -1,7 +1,7 @@ % if ($error) {
-
+
Fehler

Zugfahrt nicht gefunden.

diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index 54f9e1f..a512314 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -32,8 +32,22 @@ document.head.appendChild(st); } } + var otherTheme = { + 'dark.min': 'light.min', + 'light.min': 'dark.min', +}; +var currentTheme = localStorage.getItem('theme'); +if (!otherTheme.hasOwnProperty(currentTheme)) { + currentTheme = window.matchMedia('(prefers-color-scheme: dark').matches ? 'dark.min' : 'light.min'; +} +addStyleSheet(currentTheme, 'theme'); + +function toggleTheme() { + currentTheme = otherTheme[currentTheme] || 'light.min'; + localStorage.setItem('theme', currentTheme); + addStyleSheet(currentTheme, 'theme'); +} - %= javascript "/static/${av}/js/theme.min.js" diff --git a/templates/login.html.ep b/templates/login.html.ep index 474f165..a5aa8e3 100644 --- a/templates/login.html.ep +++ b/templates/login.html.ep @@ -1,8 +1,8 @@ % if (my $user = current_user()) {
-
-
+
+
Hallo, <%= $user->{name} %>!

Du bist bereits angemeldet. Falls du mehrere Accounts hast @@ -27,8 +27,8 @@

% if ($from eq 'register') { -
-
+
+
Bitte warten

Ein Verifizierungslink wurde an die von dir angegebene Mail-Adresse geschickt. Sobald du diesen angeklickt hast, @@ -37,7 +37,7 @@

% } % elsif ($from eq 'verification') { -
+
Account freigeschaltet

Du kannst dich nun anmelden.

diff --git a/templates/not_found.html.ep b/templates/not_found.html.ep index de0d533..c2bc09f 100644 --- a/templates/not_found.html.ep +++ b/templates/not_found.html.ep @@ -1,6 +1,6 @@
-
+
404 Not Found

Diese Seite gibt es hier nicht.

diff --git a/templates/recover_password.html.ep b/templates/recover_password.html.ep index a3332c3..c56ffe2 100644 --- a/templates/recover_password.html.ep +++ b/templates/recover_password.html.ep @@ -5,7 +5,7 @@ % if (stash('success')) {
-
+
Passwort-Reset wird durchgeführt

diff --git a/templates/webhooks.html.ep b/templates/webhooks.html.ep index b782823..930732d 100644 --- a/templates/webhooks.html.ep +++ b/templates/webhooks.html.ep @@ -8,7 +8,7 @@

% if ($hook->{errored}) { -
+
Web-Hook fehlerhaft

<%= $hook->{output} %>

@@ -16,7 +16,7 @@
% } % else { -
+
Web-Hook erfolgreich getestet

<%= $hook->{output} %>

-- cgit v1.2.3