52 lines
1.8 KiB
PHP
52 lines
1.8 KiB
PHP
<?php
|
|
$app = app();
|
|
$isLoggedIn = isset($_SESSION['user_id']);
|
|
$isDebug = defined('APP_DEBUG') && APP_DEBUG === true;
|
|
?>
|
|
<header class="site-header">
|
|
<div class="container nav-row">
|
|
<div class="brand">
|
|
<img data-logo-img src="/assets/bilder/logo_male.png" alt="Papa-Kind-Treff Logo" class="brand__logo">
|
|
<div class="brand__text">
|
|
<span class="brand__name">Papa-Kind-Treff</span>
|
|
<span class="brand__tag">Väter vernetzen</span>
|
|
</div>
|
|
</div>
|
|
<nav class="nav-links" aria-label="Hauptmenü">
|
|
<a href="/">Start</a>
|
|
<a href="/#events">Events</a>
|
|
<a href="/#profil">Profil</a>
|
|
<a href="/#faq">FAQ</a>
|
|
</nav>
|
|
<div class="nav-actions">
|
|
<?php if ($isLoggedIn): ?>
|
|
<a class="btn ghost" href="/dashboard">Dashboard</a>
|
|
<a class="btn ghost" href="/logout">Logout</a>
|
|
<?php if ($isDebug): ?>
|
|
<a class="btn ghost" href="/debug">Debug</a>
|
|
<?php endif; ?>
|
|
<?php else: ?>
|
|
<a class="btn ghost" href="/login">Anmelden</a>
|
|
<a class="btn" href="/register">Kostenlos registrieren</a>
|
|
<?php endif; ?>
|
|
<button class="menu-toggle" aria-label="Menü öffnen">☰</button>
|
|
</div>
|
|
</div>
|
|
<div class="mobile-menu" id="mobileMenu">
|
|
<a href="/">Start</a>
|
|
<a href="/#events">Events</a>
|
|
<a href="/#profil">Profil</a>
|
|
<a href="/#faq">FAQ</a>
|
|
<?php if ($isLoggedIn): ?>
|
|
<a class="btn ghost" href="/dashboard">Dashboard</a>
|
|
<a class="btn block" href="/logout">Logout</a>
|
|
<?php if ($isDebug): ?>
|
|
<a class="btn ghost block" href="/debug">Debug</a>
|
|
<?php endif; ?>
|
|
<?php else: ?>
|
|
<a class="btn ghost" href="/login">Anmelden</a>
|
|
<a class="btn block" href="/register">Kostenlos registrieren</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
</header>
|