Steuerkram/src/Views/layout/nav.php

87 lines
4.8 KiB
PHP

<?php
$path = $currentPath ?? '/';
function navActive(string $prefix, string $current): string {
return str_starts_with($current, $prefix) ? ' active' : '';
}
?>
<aside class="sidebar">
<div class="sidebar-brand"><img src="/static/favicon/web-app-manifest-512x512.png" alt="" style="height:1.1em;width:auto;vertical-align:middle;margin-right:.4em;" />Steuer<span>kram</span></div>
<div class="sidebar-section">
<div class="sidebar-label">Übersicht</div>
<nav>
<a href="/dashboard" class="<?= navActive('/dashboard', $path) ?>">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/></svg>
Dashboard
</a>
</nav>
</div>
<div class="sidebar-section">
<div class="sidebar-label">Belege &amp; Buchungen</div>
<nav>
<a href="/belege" class="<?= navActive('/belege', $path) ?>">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14,2 14,8 20,8"/></svg>
Belege
</a>
<a href="/journal" class="<?= navActive('/journal', $path) ?>">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 6h16M4 10h16M4 14h16M4 18h16"/></svg>
Buchungsjournal
</a>
<a href="/suppliers" class="<?= navActive('/suppliers', $path) ?>">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 7H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z"/><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"/></svg>
Lieferanten
</a>
</nav>
</div>
<div class="sidebar-section">
<div class="sidebar-label">Ausgangsrechnungen</div>
<nav>
<a href="/invoices" class="<?= navActive('/invoices', $path) ?>">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="5" width="20" height="14" rx="2"/><line x1="2" y1="10" x2="22" y2="10"/></svg>
Rechnungen
</a>
<a href="/customers" class="<?= navActive('/customers', $path) ?>">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>
Kunden
</a>
</nav>
</div>
<div class="sidebar-section">
<div class="sidebar-label">Steuerauswertungen</div>
<nav>
<a href="/tax/ustva" class="<?= navActive('/tax/ustva', $path) ?>">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 14l6-6"/><circle cx="9.5" cy="9.5" r=".5" fill="currentColor"/><circle cx="14.5" cy="14.5" r=".5" fill="currentColor"/><path d="M21 12c0 4.97-4.03 9-9 9s-9-4.03-9-9 4.03-9 9-9 9 4.03 9 9z"/></svg>
UStVA
</a>
<a href="/tax/euer" class="<?= navActive('/tax/euer', $path) ?>">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="22,12 18,12 15,21 9,3 6,12 2,12"/></svg>
EÜR
</a>
</nav>
</div>
<div class="sidebar-section">
<div class="sidebar-label">Verwaltung</div>
<nav>
<a href="/useradmin" class="<?= navActive('/useradmin', $path) ?>">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><line x1="19" y1="8" x2="19" y2="14"/><line x1="22" y1="11" x2="16" y2="11"/></svg>
Benutzer
</a>
<a href="/settings" class="<?= navActive('/settings', $path) ?>">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="3"/><path d="M19.07 4.93l-1.41 1.41M4.93 4.93l1.41 1.41M19.07 19.07l-1.41-1.41M4.93 19.07l1.41-1.41M12 2v2M12 20v2M2 12h2M20 12h2"/></svg>
Einstellungen
</a>
</nav>
</div>
<div style="margin-top:auto;padding:1rem;">
<form method="POST" action="/logout">
<button type="submit" style="width:100%;background:transparent;border:1px solid #475569;color:var(--color-nav-text);border-radius:var(--radius);padding:.4rem .75rem;cursor:pointer;font-size:.85rem;">
Abmelden
</button>
</form>
</div>
</aside>