2018-09-02 19:41:33 +00:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="de">
|
|
|
|
|
<head>
|
|
|
|
|
<title><%= stash('title') // 'travelynx' %></title>
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2019-05-03 19:13:22 +00:00
|
|
|
|
<meta name="description" content="Checkin-Service und Verspätungslog für Bahnfahrten">
|
2018-10-07 09:46:08 +00:00
|
|
|
|
<meta name="theme-color" content="#673ab7">
|
2019-05-11 09:52:47 +00:00
|
|
|
|
<meta name="apple-mobile-web-app-title" content="Travelynx">
|
2019-05-29 16:10:45 +00:00
|
|
|
|
% while (my ($key, $value) = each %{stash('twitter') // {}}) {
|
|
|
|
|
<meta name="twitter:<%= $key %>" content="<%= $value %>">
|
|
|
|
|
% }
|
2020-09-21 18:31:08 +00:00
|
|
|
|
% while (my ($key, $value) = each %{stash('opengraph') // {}}) {
|
|
|
|
|
<meta property="og:<%= $key %>" content="<%= $value %>">
|
|
|
|
|
% }
|
2024-04-23 15:14:06 +00:00
|
|
|
|
% my $av = 'v72'; # asset version
|
2019-05-11 09:52:47 +00:00
|
|
|
|
<link rel="icon" type="image/png" href="/static/<%= $av %>/icons/icon-16x16.png" sizes="16x16">
|
|
|
|
|
<link rel="icon" type="image/png" href="/static/<%= $av %>/icons/icon-32x32.png" sizes="32x32">
|
|
|
|
|
<link rel="icon" type="image/png" href="/static/<%= $av %>/icons/icon-96x96.png" sizes="96x96">
|
2022-10-07 20:17:10 +00:00
|
|
|
|
<link rel="apple-touch-icon" href="/static/<%= $av %>/icons/touch-icon-120x120.png">
|
|
|
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/static/<%= $av %>/icons/touch-icon-180x180.png">
|
|
|
|
|
<link rel="apple-touch-icon" sizes="152x152" href="/static/<%= $av %>/icons/touch-icon-152x152.png">
|
|
|
|
|
<link rel="apple-touch-icon" sizes="167x167" href="/static/<%= $av %>/icons/touch-icon-167x167.png">
|
2019-05-03 19:02:24 +00:00
|
|
|
|
<link rel="manifest" href="/static/<%= $av %>/manifest.json">
|
2019-05-18 06:23:59 +00:00
|
|
|
|
% if (session('theme') and session('theme') eq 'dark') {
|
|
|
|
|
%= stylesheet "/static/${av}/css/dark.min.css", id => 'theme'
|
|
|
|
|
% }
|
|
|
|
|
% else {
|
|
|
|
|
%= stylesheet "/static/${av}/css/light.min.css", id => 'theme'
|
|
|
|
|
% }
|
2019-05-16 13:02:17 +00:00
|
|
|
|
<script>
|
2019-05-18 06:23:59 +00:00
|
|
|
|
function addStyleSheet(name, id) {
|
|
|
|
|
var path = '/static/<%=$av%>/css/' + name + '.min.css';
|
|
|
|
|
var old = document.getElementById(id);
|
|
|
|
|
if (old && (old.href != path)) {
|
|
|
|
|
old.href = path;
|
|
|
|
|
document.cookie = 'theme=' + name;
|
|
|
|
|
}
|
2019-05-16 13:02:17 +00:00
|
|
|
|
}
|
2019-05-16 14:10:53 +00:00
|
|
|
|
var otherTheme = {
|
2019-05-18 06:23:59 +00:00
|
|
|
|
'dark': 'light',
|
|
|
|
|
'light': 'dark',
|
|
|
|
|
};
|
|
|
|
|
var currentTheme = localStorage.getItem('theme');
|
|
|
|
|
if (!otherTheme.hasOwnProperty(currentTheme)) {
|
|
|
|
|
currentTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
|
|
|
}
|
|
|
|
|
addStyleSheet(currentTheme, 'theme');
|
2019-05-16 13:02:17 +00:00
|
|
|
|
</script>
|
2019-03-07 17:36:11 +00:00
|
|
|
|
%= stylesheet "/static/${av}/css/material-icons.css"
|
2019-11-15 23:01:50 +00:00
|
|
|
|
% if (stash('with_map')) {
|
|
|
|
|
%= stylesheet "/static/${av}/leaflet/leaflet.css"
|
|
|
|
|
% }
|
2019-05-04 06:30:05 +00:00
|
|
|
|
%= javascript "/static/${av}/js/jquery-3.4.1.min.js"
|
2019-03-07 17:36:11 +00:00
|
|
|
|
%= javascript "/static/${av}/js/materialize.min.js"
|
2023-07-23 09:25:45 +00:00
|
|
|
|
% my $min = ".min";
|
|
|
|
|
% if (app->mode eq 'development') {
|
|
|
|
|
% $min = q{};
|
|
|
|
|
% }
|
|
|
|
|
%= javascript "/static/${av}/js/travelynx-actions${min}.js"
|
2018-10-07 09:35:47 +00:00
|
|
|
|
% if (stash('with_geolocation')) {
|
2023-07-23 09:25:45 +00:00
|
|
|
|
%= javascript "/static/${av}/js/geolocation${min}.js"
|
2018-10-07 09:35:47 +00:00
|
|
|
|
% }
|
2019-04-13 08:43:05 +00:00
|
|
|
|
% if (stash('with_autocomplete')) {
|
2023-08-26 07:17:28 +00:00
|
|
|
|
%= javascript "/dyn/${av}/autocomplete.js", defer => undef
|
2019-04-13 08:43:05 +00:00
|
|
|
|
% }
|
2019-11-15 23:01:50 +00:00
|
|
|
|
% if (stash('with_map')) {
|
|
|
|
|
%= javascript "/static/${av}/leaflet/leaflet.js"
|
|
|
|
|
% }
|
2018-09-02 19:41:33 +00:00
|
|
|
|
</head>
|
2023-06-04 16:21:36 +00:00
|
|
|
|
% my $acc = is_user_authenticated() && current_user();
|
2018-09-02 19:41:33 +00:00
|
|
|
|
<body>
|
|
|
|
|
|
2019-05-06 16:14:30 +00:00
|
|
|
|
<div class="navbar-fixed">
|
|
|
|
|
<nav class="deep-purple">
|
|
|
|
|
<div class="nav-wrapper container">
|
2020-01-25 16:01:35 +00:00
|
|
|
|
<a href="/" class="brand-logo left"><span class="ca">tr</span><span class="cb">av</span><span class="cc">e</span><span class="cd">ly</span><span class="ce">nx</span></a>
|
2019-05-06 16:14:30 +00:00
|
|
|
|
<ul id="nav-mobile" class="right">
|
|
|
|
|
<li class="loading">
|
|
|
|
|
<div class="preloader-wrapper small" style="margin-top: 0.5em; margin-bottom: -1em;">
|
|
|
|
|
<div class="spinner-layer spinner-blue-only">
|
|
|
|
|
<div class="circle-clipper left">
|
|
|
|
|
<div class="circle"></div>
|
|
|
|
|
</div><div class="gap-patch">
|
|
|
|
|
<div class="circle"></div>
|
|
|
|
|
</div><div class="circle-clipper right">
|
|
|
|
|
<div class="circle"></div>
|
|
|
|
|
</div>
|
2019-05-06 16:07:53 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-05-06 16:14:30 +00:00
|
|
|
|
</li>
|
2023-06-04 16:21:36 +00:00
|
|
|
|
% if ($acc) {
|
2020-11-21 09:53:01 +00:00
|
|
|
|
<li class="<%= navbar_class('/history') %>"><a href='/history' title="Vergangene Zugfahrten"><i class="material-icons" aria-label="Vergangene Zugfahrten">history</i></a></li>
|
2023-06-04 16:21:36 +00:00
|
|
|
|
<li class="<%= navbar_class('/account') %>"><a href="/account" title="Account"><i class="material-icons" aria-label="Account"><%= $acc->{notifications} ? 'notifications' : 'account_circle' %></i></a></li>
|
2019-05-06 16:14:30 +00:00
|
|
|
|
% }
|
|
|
|
|
% else {
|
2020-11-21 09:53:01 +00:00
|
|
|
|
<li class="<%= navbar_class('/about') %>"><a href='/about' title="Über Travelynx"><i class="material-icons" aria-label="Über Travelynx">info_outline</i></a></li>
|
2019-05-06 16:14:30 +00:00
|
|
|
|
% }
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</nav>
|
|
|
|
|
</div>
|
2018-09-02 19:41:33 +00:00
|
|
|
|
|
2019-04-13 16:59:46 +00:00
|
|
|
|
% if (app->mode eq 'development') {
|
|
|
|
|
<div class="container">
|
|
|
|
|
<div class="row">
|
2019-05-16 13:02:17 +00:00
|
|
|
|
<div class="col s12 caution-color white-text">
|
2019-04-13 16:59:46 +00:00
|
|
|
|
Development Mode – Datenbank: <%= app->config->{db}->{database} %>
|
|
|
|
|
@ <%= app->config->{db}->{host} %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
% }
|
|
|
|
|
|
2023-03-19 11:20:30 +00:00
|
|
|
|
% if (app->config->{announcement}) {
|
|
|
|
|
<div class="container">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col s12 caution-color white-text">
|
|
|
|
|
%= app->config->{announcement}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
% }
|
|
|
|
|
|
2018-09-02 19:41:33 +00:00
|
|
|
|
<div class="container">
|
2023-06-04 16:21:36 +00:00
|
|
|
|
% if ($acc and $acc->{deletion_requested}) {
|
|
|
|
|
%= include '_deletion_note', timestamp => $acc->{deletion_requested}
|
2019-03-12 20:49:26 +00:00
|
|
|
|
% }
|
2018-09-02 19:41:33 +00:00
|
|
|
|
%= content
|
2023-07-07 20:26:31 +00:00
|
|
|
|
<div class="row" style="margin-top: 5em;">
|
|
|
|
|
<div class="col s12 center-align grey-text">
|
|
|
|
|
<a href="/about">travelynx</a> v<%= $version // '???' %>
|
|
|
|
|
<span style="margin-left: 0.5em; margin-right: 0.5em;">–</span>
|
|
|
|
|
<a href="/impressum">Impressum</a>
|
|
|
|
|
<span style="margin-left: 0.5em; margin-right: 0.5em;">–</span>
|
|
|
|
|
<a href="/impressum">Datenschutz</a>
|
|
|
|
|
<span style="margin-left: 0.5em; margin-right: 0.5em;">–</span>
|
|
|
|
|
<a href="/legend">Legende</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-03-23 14:23:26 +00:00
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col s12 center-align grey-text config">
|
|
|
|
|
Farbschema:
|
|
|
|
|
<a onClick="javascript:setTheme('light')">hell</a>
|
|
|
|
|
·
|
|
|
|
|
<a onClick="javascript:setTheme('dark')">dunkel</a>
|
|
|
|
|
·
|
|
|
|
|
<a onClick="javascript:setTheme('default')">automatisch</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2018-09-02 19:41:33 +00:00
|
|
|
|
</div>
|
2019-05-03 18:43:46 +00:00
|
|
|
|
<script>
|
|
|
|
|
if ('serviceWorker' in navigator) {
|
|
|
|
|
window.addEventListener('load', () => {
|
2019-05-18 06:29:21 +00:00
|
|
|
|
navigator.serviceWorker.register('/service-worker.js');
|
2019-05-03 18:43:46 +00:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
2018-09-02 19:41:33 +00:00
|
|
|
|
</body>
|
|
|
|
|
</html>
|