Further color improvements
This commit is contained in:
parent
87e74ca90d
commit
84b32b28e9
31 changed files with 79 additions and 63 deletions
1
public/static/css/dark.js
Normal file
1
public/static/css/dark.js
Normal file
|
@ -0,0 +1 @@
|
|||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([,function(e,t,r){}]);
|
4
public/static/css/dark.min.css
vendored
4
public/static/css/dark.min.css
vendored
File diff suppressed because one or more lines are too long
1
public/static/css/light.js
Normal file
1
public/static/css/light.js
Normal file
|
@ -0,0 +1 @@
|
|||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){}]);
|
2
public/static/css/light.min.css
vendored
2
public/static/css/light.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -11,10 +11,6 @@ td.cancelled {
|
|||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
a.unmarked {
|
||||
color: rgba(0, 0, 0, 0.87);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2.92rem;
|
||||
margin: 1.9466666667rem 0 1.168rem 0;
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
var validThemes = ['dark.min', 'light.min'];
|
||||
var currentTheme = localStorage.getItem('theme');
|
||||
if (!validThemes.includes(currentTheme)) {
|
||||
currentTheme = window.matchMedia('(prefers-color-scheme: dark').matches ? 'dark.min' : 'light.min';
|
||||
}
|
||||
addStyleSheet(currentTheme, 'theme');
|
||||
|
||||
function toggleTheme() {
|
||||
currentTheme = currentTheme === 'dark.min' ? 'light.min' : 'dark.min';
|
||||
localStorage.setItem('theme', currentTheme);
|
||||
addStyleSheet(currentTheme, 'theme');
|
||||
}
|
1
public/static/js/theme.min.js
vendored
1
public/static/js/theme.min.js
vendored
|
@ -1 +0,0 @@
|
|||
var validThemes=["dark.min","light.min"],currentTheme=localStorage.getItem("theme");function toggleTheme(){currentTheme="dark.min"===currentTheme?"light.min":"dark.min",localStorage.setItem("theme",currentTheme),addStyleSheet(currentTheme,"theme")}validThemes.includes(currentTheme)||(currentTheme=window.matchMedia("(prefers-color-scheme: dark").matches?"dark.min":"light.min"),addStyleSheet(currentTheme,"theme");
|
10
sass/package-lock.json
generated
10
sass/package-lock.json
generated
|
@ -6464,16 +6464,6 @@
|
|||
"get-stdin": "^4.0.1"
|
||||
}
|
||||
},
|
||||
"style-loader": {
|
||||
"version": "0.23.1",
|
||||
"resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.23.1.tgz",
|
||||
"integrity": "sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"loader-utils": "^1.1.0",
|
||||
"schema-utils": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"stylehacks": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz",
|
||||
|
|
|
@ -2,6 +2,7 @@ $customColors: (
|
|||
'caution': $error-color,
|
||||
'info': $info-color,
|
||||
'contrast': $off-black,
|
||||
'success': $success-color,
|
||||
);
|
||||
|
||||
@each $name, $color in $customColors {
|
||||
|
@ -16,3 +17,15 @@ $customColors: (
|
|||
html {
|
||||
background-color: $bg-color;
|
||||
}
|
||||
|
||||
a.unmarked {
|
||||
color: $off-black;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
li {
|
||||
a {
|
||||
color: $off-black;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@ $info-color: color('yellow', 'darken-4');
|
|||
$off-black: color('shades', 'white');
|
||||
|
||||
$primary-color: color('materialize-red', 'darken-2');
|
||||
$secondary-color: color('teal', 'darken-2');
|
||||
$secondary-color: color('cyan', 'darken-2');
|
||||
$link-color: color('light-blue', 'darken-1');
|
||||
$collection-link-color: color('teal', 'darken-4');
|
||||
$collection-link-color: color('cyan', 'darken-4');
|
||||
$success-color: color('green', 'darken-2');
|
||||
$error-color: color('red', 'darken-2');
|
||||
$input-border-color: $off-black;
|
||||
|
|
|
@ -3,6 +3,13 @@
|
|||
@import '../../node_modules/materialize-css/sass/materialize.scss';
|
||||
@import '../common/index.scss';
|
||||
|
||||
.progress.travel-progress {
|
||||
background-color: color('purple', 'lighten-1');
|
||||
& > .determinate {
|
||||
background-color: color('purple', 'darken-1');
|
||||
}
|
||||
}
|
||||
|
||||
html {
|
||||
background-color: $bg-color;
|
||||
}
|
||||
|
|
|
@ -2,3 +2,10 @@
|
|||
@import 'variables.scss';
|
||||
@import '../../node_modules/materialize-css/sass/materialize.scss';
|
||||
@import '../common/index.scss';
|
||||
|
||||
.progress.travel-progress {
|
||||
background-color: color('purple', 'lighten-4');
|
||||
& > .determinate {
|
||||
background-color: color('purple', 'darken-3');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
set -x
|
||||
|
||||
for file in autocomplete geolocation travelynx-actions theme; do
|
||||
for file in autocomplete geolocation travelynx-actions; do
|
||||
uglifyjs public/static/js/${file}.js -c -m > public/static/js/${file}.min.js
|
||||
done
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="card yellow lighten-4">
|
||||
<div class="card info-color">
|
||||
<div class="card-content">
|
||||
<span class="card-title">Zugausfall dokumentieren</span>
|
||||
<p>Prinzipiell wärest du nun eingecheckt in
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="card autorefresh blue-grey lighten-5">
|
||||
<div class="card autorefresh">
|
||||
<div class="card-content">
|
||||
<i class="material-icons small right sync-failed-marker grey-text" style="display: none;">sync_problem</i>
|
||||
<span class="card-title">Eingecheckt in <%= $journey->{train_type} %> <%= $journey->{train_no} %></span>
|
||||
|
@ -31,8 +31,8 @@
|
|||
Ankunft in mehr als zwei Stunden
|
||||
% }
|
||||
</div>
|
||||
<div class="progress purple lighten-4" style="height: 1ex;">
|
||||
<div class="determinate purple darken-3" style="width: <%= sprintf('%.2f', 100 * ($journey->{journey_completion} // 0)); %>%;"></div>
|
||||
<div class="progress " style="height: 1ex;">
|
||||
<div class="determinate" style="width: <%= sprintf('%.2f', 100 * ($journey->{journey_completion} // 0)); %>%;"></div>
|
||||
</div>
|
||||
</p>
|
||||
% if ($journey->{arr_name}) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="card grey darken-4">
|
||||
<div class="card-content white-text">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<span class="card-title">Ausgecheckt</span>
|
||||
<p>Aus <%= $journey->{train_type} %> <%= $journey->{train_no} %>
|
||||
bis <a href="/s/<%= $journey->{arr_ds100} %>"><%= $journey->{arr_name} %></a></p>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card red darken-4">
|
||||
<div class="card caution-color">
|
||||
<div class="card-content white-text">
|
||||
<span class="card-title">Account wird gelöscht</span>
|
||||
<p>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
% if (@{$stats->{inconsistencies}}) {
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card red darken-4">
|
||||
<div class="card caution-color">
|
||||
<div class="card-content white-text">
|
||||
<i class="material-icons small right">warning</i>
|
||||
<span class="card-title">Inkonsistente Reisedaten</span>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card red darken-4">
|
||||
<div class="card caution-color">
|
||||
<div class="card-content white-text">
|
||||
% if ($invalid eq 'csrf') {
|
||||
<span class="card-title">Ungültiger CSRF-Token</span>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
% if ($journey->{checked_in}) {
|
||||
<div class="card white autorefresh">
|
||||
<div class="card autorefresh">
|
||||
<div class="card-content">
|
||||
<i class="material-icons small right sync-failed-marker grey-text" style="display: none;">sync_problem</i>
|
||||
<span class="card-title"><%= $name %> ist unterwegs</span>
|
||||
|
@ -80,8 +80,8 @@
|
|||
</div>
|
||||
% }
|
||||
% else {
|
||||
<div class="card grey darken-4 autorefresh">
|
||||
<div class="card-content white-text">
|
||||
<div class="card autorefresh">
|
||||
<div class="card-content">
|
||||
<i class="material-icons small right sync-failed-marker grey-text" style="display: none;">sync_problem</i>
|
||||
<span class="card-title"><%= $name %> ist gerade nicht eingecheckt</span>
|
||||
<p>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
% if (my $success = flash('success')) {
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card green darken-4">
|
||||
<div class="card success-color">
|
||||
<div class="card-content white-text">
|
||||
% if ($success eq 'mail') {
|
||||
<span class="card-title">Mail-Adresse geändert</span>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
% if (stash('success')) {
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card green darken-4">
|
||||
<div class="card success-color">
|
||||
<div class="card-content white-text">
|
||||
<span class="card-title">Mail-Änderung wird durchgeführt</span>
|
||||
<p>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<div class="col s12">
|
||||
% my $status = $self->get_user_status;
|
||||
% if ($status->{checked_in}) {
|
||||
<div class="card grey darken-4">
|
||||
<div class="card-content white-text">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<span class="card-title">Aktuell eingecheckt</span>
|
||||
<p>In <%= $status->{train_type} %> <%= $status->{train_no} %>
|
||||
ab <%= $status->{dep_name} %></p>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
% if ($error and $error eq 'notfound') {
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card red darken-4">
|
||||
<div class="card caution-color">
|
||||
<div class="card-content white-text">
|
||||
<span class="card-title">Fehler</span>
|
||||
<p>Zugfahrt nicht gefunden.</p>
|
||||
|
@ -15,7 +15,7 @@
|
|||
% if ($error) {
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card red darken-4">
|
||||
<div class="card caution-color">
|
||||
<div class="card-content white-text">
|
||||
<span class="card-title">Ungültige Eingabe</span>
|
||||
<p><%= $error %></p>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card red darken-4">
|
||||
<div class="card caution-color">
|
||||
<div class="card-content white-text">
|
||||
<span class="card-title">500 Internal Server Error</span>
|
||||
<p>Das hätte nicht passieren sollen.</p>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
% if ($error) {
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card red darken-4">
|
||||
<div class="card caution-color">
|
||||
<div class="card-content white-text">
|
||||
<span class="card-title">Fehler</span>
|
||||
<p>Zugfahrt nicht gefunden.</p>
|
||||
|
|
|
@ -31,9 +31,23 @@
|
|||
st.rel = 'stylesheet';
|
||||
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');
|
||||
}
|
||||
</script>
|
||||
%= javascript "/static/${av}/js/theme.min.js"
|
||||
<noscript>
|
||||
%= stylesheet "/static/${av}/css/light.min.css"
|
||||
</noscript>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
% if (my $user = current_user()) {
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card grey darken-4">
|
||||
<div class="card-content white-text">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<span class="card-title">Hallo, <%= $user->{name} %>!</span>
|
||||
<p>
|
||||
Du bist bereits angemeldet. Falls du mehrere Accounts hast
|
||||
|
@ -27,8 +27,8 @@
|
|||
<div class="row">
|
||||
<div class="col s12">
|
||||
% if ($from eq 'register') {
|
||||
<div class="card grey darken-4">
|
||||
<div class="card-content white-text">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<span class="card-title">Bitte warten</span>
|
||||
<p>Ein Verifizierungslink wurde an die von dir angegebene
|
||||
Mail-Adresse geschickt. Sobald du diesen angeklickt hast,
|
||||
|
@ -37,7 +37,7 @@
|
|||
</div>
|
||||
% }
|
||||
% elsif ($from eq 'verification') {
|
||||
<div class="card green darken-4">
|
||||
<div class="card success-color">
|
||||
<div class="card-content white-text">
|
||||
<span class="card-title">Account freigeschaltet</span>
|
||||
<p>Du kannst dich nun anmelden.</p>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card red darken-4">
|
||||
<div class="card caution-color">
|
||||
<div class="card-content white-text">
|
||||
<span class="card-title">404 Not Found</span>
|
||||
<p>Diese Seite gibt es hier nicht.</p>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
% if (stash('success')) {
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card green darken-4">
|
||||
<div class="card success-color">
|
||||
<div class="card-content white-text">
|
||||
<span class="card-title">Passwort-Reset wird durchgeführt</span>
|
||||
<p>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<div class="row">
|
||||
<div class="col s12">
|
||||
% if ($hook->{errored}) {
|
||||
<div class="card red darken-4">
|
||||
<div class="card caution-color">
|
||||
<div class="card-content white-text">
|
||||
<span class="card-title">Web-Hook fehlerhaft</span>
|
||||
<p><%= $hook->{output} %></p>
|
||||
|
@ -16,7 +16,7 @@
|
|||
</div>
|
||||
% }
|
||||
% else {
|
||||
<div class="card green darken-4">
|
||||
<div class="card success-color">
|
||||
<div class="card-content white-text">
|
||||
<span class="card-title">Web-Hook erfolgreich getestet</span>
|
||||
<p><%= $hook->{output} %></p>
|
||||
|
|
Loading…
Reference in a new issue