first commit
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
$brandSubtitle = match ($page) {
|
||||
'dashboard' => 'Statistiken und Verlauf',
|
||||
'track' => 'Tag erfassen und bewerten',
|
||||
'archive' => 'Rueckblick auf vergangene Tage',
|
||||
'options' => 'Logik, Sicherheit und Accounts',
|
||||
'login' => 'Geschuetzter Zugang',
|
||||
'setup' => 'Erstkonfiguration',
|
||||
default => 'Stimmungstracker',
|
||||
};
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?= e($pageTitle) ?> · Mood</title>
|
||||
<link rel="stylesheet" href="/assets/css/app.css">
|
||||
<script defer src="/assets/js/app.js"></script>
|
||||
</head>
|
||||
<body class="app-body page-<?= e($page) ?>">
|
||||
<div class="aurora aurora-one"></div>
|
||||
<div class="aurora aurora-two"></div>
|
||||
<div class="shell">
|
||||
<?php if ($authUser !== null): ?>
|
||||
<aside class="sidebar glass-panel">
|
||||
<div class="brand-block">
|
||||
<div class="brand-mark">M</div>
|
||||
<div>
|
||||
<p class="eyebrow">mood.hnz.io</p>
|
||||
<h1>Mood</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav class="main-nav" aria-label="Hauptnavigation">
|
||||
<a class="<?= is_active_path('/') ? 'active' : '' ?>" href="/">Dashboard</a>
|
||||
<a class="<?= is_active_path('/track') ? 'active' : '' ?>" href="/track">Tracken</a>
|
||||
<a class="<?= is_active_path('/archive') ? 'active' : '' ?>" href="/archive">Archiv</a>
|
||||
<a class="<?= is_active_path('/options') ? 'active' : '' ?>" href="/options">Optionen</a>
|
||||
</nav>
|
||||
|
||||
<div class="sidebar-footer">
|
||||
<div class="user-chip">
|
||||
<span class="user-chip__name"><?= e($authUser['username']) ?></span>
|
||||
<span class="user-chip__role"><?= !empty($authUser['is_admin']) ? 'Admin' : 'Nutzer' ?></span>
|
||||
</div>
|
||||
<form method="post" action="/logout">
|
||||
<?= csrf_field() ?>
|
||||
<button class="ghost-button" type="submit">Abmelden</button>
|
||||
</form>
|
||||
</div>
|
||||
</aside>
|
||||
<?php endif; ?>
|
||||
|
||||
<main class="content">
|
||||
<?php if ($authUser !== null): ?>
|
||||
<header class="topbar glass-panel">
|
||||
<div>
|
||||
<p class="eyebrow"><?= e($brandSubtitle) ?></p>
|
||||
<h2><?= e($pageTitle) ?></h2>
|
||||
</div>
|
||||
<div class="topbar__meta">
|
||||
<span class="meta-pill"><?= e(date('d.m.Y')) ?></span>
|
||||
<span class="meta-pill"><?= e($authUser['username']) ?></span>
|
||||
</div>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php foreach ($flashes as $flash): ?>
|
||||
<div class="flash flash-<?= e($flash['type']) ?> glass-panel"><?= e($flash['message']) ?></div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?= $content ?>
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user