This commit is contained in:
2025-11-20 00:37:26 +01:00
parent b3efc18325
commit 52b28d29c3
3 changed files with 55 additions and 48 deletions

View File

@@ -1,3 +0,0 @@
<?php
echo "bin ein fake";

View File

@@ -9,6 +9,13 @@ $userInitials = null;
// Seitentitel & Description für das Layout
$pageTitle = 'usbcheck.it Test USB-Sticks';
$pageDescription = 'Prüfe deine USB-Sticks auf Geschwindigkeit, Integrität und mögliche Fakes direkt im Browser.';
$navAnchors = [
[ 'href' => '#how', 'key' => 'nav_how' ],
[ 'href' => '#problem', 'key' => 'nav_problem' ],
[ 'href' => '#features', 'key' => 'nav_features' ],
[ 'href' => '#security', 'key' => 'nav_security' ],
[ 'href' => '#faq', 'key' => 'nav_faq' ],
];
// Layout-Start (Head, Body, Header, <main>)
require __DIR__ . '/partials/layout_start.php';

View File

@@ -1,5 +1,10 @@
<?php
// public/partials/header.php
// Wenn $navAnchors NICHT gesetzt ist → leeres Array (keine Anchors)
if (!isset($navAnchors) || !is_array($navAnchors)) {
$navAnchors = [];
}
?>
<header class="sticky top-0 z-40 border-b border-brand-border/70 backdrop-blur bg-brand-bg/85">
<div class="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8 flex items-center justify-between h-16">
@@ -23,54 +28,52 @@
<div class="flex items-center gap-6">
<nav class="hidden md:flex items-center gap-6 text-xs font-medium text-brand-muted uppercase tracking-[0.18em]">
<a href="#how" class="hover:text-brand-primary transition-colors" data-i18n="nav_how"></a>
<a href="#problem" class="hover:text-brand-primary transition-colors" data-i18n="nav_problem"></a>
<a href="#features" class="hover:text-brand-primary transition-colors" data-i18n="nav_features"></a>
<a href="#security" class="hover:text-brand-primary transition-colors" data-i18n="nav_security"></a>
<a href="#faq" class="hover:text-brand-primary transition-colors" data-i18n="nav_faq"></a>
<?php foreach ($navAnchors as $item): ?>
<a href="<?= htmlspecialchars($item['href']) ?>"
class="hover:text-brand-primary transition-colors"
data-i18n="<?= htmlspecialchars($item['key']) ?>">
</a>
<?php endforeach; ?>
</nav>
<div class="relative">
<button id="langCurrent"
type="button"
class="flex items-center gap-1 text-xs uppercase tracking-[0.18em] text-brand-muted hover:text-brand-primary transition">
<span id="langCurrentLabel"><?= strtoupper($lang) ?></span>
<svg class="w-3 h-3 opacity-70" viewBox="0 0 20 20" aria-hidden="true">
<path d="M5 7l5 6 5-6" fill="currentColor" />
</svg>
</button>
<div id="langMenu"
class="hidden absolute right-0 mt-2 w-20 rounded-xl bg-brand-surface border border-brand-border shadow-lg py-1 text-xs">
<button type="button"
class="lang-pill flex items-center gap-2 w-full text-left px-3 py-1.5 uppercase tracking-[0.18em] text-brand-muted hover:text-brand-primary hover:bg-brand-bg/60"
data-lang="de">
<span class="text-base">🇩🇪</span>
<span>DE</span>
</button>
<button type="button"
class="lang-pill flex items-center gap-2 w-full text-left px-3 py-1.5 uppercase tracking-[0.18em] text-brand-muted hover:text-brand-primary hover:bg-brand-bg/60"
data-lang="en">
<span class="text-base">🇬🇧</span>
<span>EN</span>
</button>
<button type="button"
class="lang-pill flex items-center gap-2 w-full text-left px-3 py-1.5 uppercase tracking-[0.18em] text-brand-muted hover:text-brand-primary hover:bg-brand-bg/60"
data-lang="it">
<span class="text-base">🇮🇹</span>
<span>IT</span>
</button>
<button type="button"
class="lang-pill flex items-center gap-2 w-full text-left px-3 py-1.5 uppercase tracking-[0.18em] text-brand-muted hover:text-brand-primary hover:bg-brand-bg/60"
data-lang="fr">
<span class="text-base">🇫🇷</span>
<span>FR</span>
</button>
</div>
</div>
<div class="relative">
<button id="langCurrent"
type="button"
class="flex items-center gap-1 text-xs uppercase tracking-[0.18em] text-brand-muted hover:text-brand-primary transition">
<span id="langCurrentLabel"><?= strtoupper($lang) ?></span>
<svg class="w-3 h-3 opacity-70" viewBox="0 0 20 20" aria-hidden="true">
<path d="M5 7l5 6 5-6" fill="currentColor" />
</svg>
</button>
<div id="langMenu"
class="hidden absolute right-0 mt-2 w-20 rounded-xl bg-brand-surface border border-brand-border shadow-lg py-1 text-xs">
<button type="button"
class="lang-pill flex items-center gap-2 w-full text-left px-3 py-1.5 uppercase tracking-[0.18em] text-brand-muted hover:text-brand-primary hover:bg-brand-bg/60"
data-lang="de">
<span class="text-base">🇩🇪</span>
<span>DE</span>
</button>
<button type="button"
class="lang-pill flex items-center gap-2 w-full text-left px-3 py-1.5 uppercase tracking-[0.18em] text-brand-muted hover:text-brand-primary hover:bg-brand-bg/60"
data-lang="en">
<span class="text-base">🇬🇧</span>
<span>EN</span>
</button>
<button type="button"
class="lang-pill flex items-center gap-2 w-full text-left px-3 py-1.5 uppercase tracking-[0.18em] text-brand-muted hover:text-brand-primary hover:bg-brand-bg/60"
data-lang="it">
<span class="text-base">🇮🇹</span>
<span>IT</span>
</button>
<button type="button"
class="lang-pill flex items-center gap-2 w-full text-left px-3 py-1.5 uppercase tracking-[0.18em] text-brand-muted hover:text-brand-primary hover:bg-brand-bg/60"
data-lang="fr">
<span class="text-base">🇫🇷</span>
<span>FR</span>
</button>
</div>
</div>
<!-- Login Button / Avatar -->
<button id="loginButton"