115 lines
4 KiB
Text
115 lines
4 KiB
Text
<!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">
|
||
<meta name="description" content="Checkin-Service und Verspätungslog für Bahnfahrten">
|
||
<meta name="theme-color" content="#673ab7">
|
||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||
<meta name="apple-mobile-web-app-title" content="Travelynx">
|
||
% my $av = 'v20'; # asset version
|
||
<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">
|
||
<link rel="apple-touch-icon" href="/static/<%= $av %>/icons/icon-120x120.png">
|
||
<link rel="apple-touch-icon" sizes="180x180" href="/static/<%= $av %>/icons/icon-180x180.png">
|
||
<link rel="apple-touch-icon" sizes="152x152" href="/static/<%= $av %>/icons/icon-152x152.png">
|
||
<link rel="apple-touch-icon" sizes="167x167" href="/static/<%= $av %>/icons/icon-167x167.png">
|
||
<link rel="manifest" href="/static/<%= $av %>/manifest.json">
|
||
<script>
|
||
function addStyleSheet(path) {
|
||
var st = document.createElement('link');
|
||
st.href = path;
|
||
st.rel = 'stylesheet';
|
||
document.head.appendChild(st);
|
||
}
|
||
|
||
if (window.matchMedia('(prefers-color-scheme: dark').matches) {
|
||
addStyleSheet("/static/<%= $av %>/css/dark.min.css");
|
||
} else {
|
||
addStyleSheet("/static/<%= $av %>/css/light.min.css");
|
||
}
|
||
</script>
|
||
<noscript>
|
||
%= stylesheet "/static/${av}/css/light.min.css"
|
||
</noscript>
|
||
%= stylesheet "/static/${av}/css/material-icons.css"
|
||
%= stylesheet "/static/${av}/css/local.css"
|
||
%= javascript "/static/${av}/js/jquery-3.4.1.min.js"
|
||
%= javascript "/static/${av}/js/materialize.min.js"
|
||
%= javascript "/static/${av}/js/travelynx-actions.min.js"
|
||
% if (stash('with_geolocation')) {
|
||
%= javascript "/static/${av}/js/geolocation.min.js"
|
||
% }
|
||
% if (stash('with_autocomplete')) {
|
||
%= javascript "/static/${av}/js/autocomplete.min.js"
|
||
% }
|
||
</head>
|
||
<body>
|
||
|
||
<div class="navbar-fixed">
|
||
<nav class="deep-purple">
|
||
<div class="nav-wrapper container">
|
||
<a href="/" class="brand-logo left">travelynx</a>
|
||
<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>
|
||
</div>
|
||
</div>
|
||
</li>
|
||
% if (is_user_authenticated()) {
|
||
<li class="<%= navbar_class('/history') %>"><a href='/history' title="History"><i class="material-icons">history</i></a></li>
|
||
<li class="<%= navbar_class('/account') %>"><a href="/account" title="Account"><i class="material-icons">account_circle</i></a></li>
|
||
% }
|
||
% else {
|
||
<li class="<%= navbar_class('/about') %>"><a href='/about' title="About"><i class="material-icons">info_outline</i></a></li>
|
||
% }
|
||
</ul>
|
||
</div>
|
||
</nav>
|
||
</div>
|
||
|
||
% if (app->mode eq 'development') {
|
||
<div class="container">
|
||
<div class="row">
|
||
<div class="col s12 caution-color white-text">
|
||
Development Mode – Datenbank: <%= app->config->{db}->{database} %>
|
||
@ <%= app->config->{db}->{host} %>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
% }
|
||
|
||
<div class="container">
|
||
% if (is_user_authenticated()) {
|
||
% my $acc = current_user();
|
||
% if ($acc and $acc->{deletion_requested}) {
|
||
%= include '_deletion_note', timestamp => $acc->{deletion_requested}
|
||
% }
|
||
% }
|
||
%= content
|
||
</div>
|
||
|
||
<script>
|
||
if ('serviceWorker' in navigator) {
|
||
window.addEventListener('load', () => {
|
||
navigator.serviceWorker.register('/service-worker.js')
|
||
.then((reg) => {
|
||
console.log('Service worker registered.', reg);
|
||
});
|
||
});
|
||
}
|
||
</script>
|
||
|
||
</body>
|
||
</html>
|