ist so
This commit is contained in:
@@ -1,17 +1,25 @@
|
||||
<?php
|
||||
// public/partials/header.php
|
||||
|
||||
// Wenn $navAnchors NICHT gesetzt ist → leeres Array (keine Anchors)
|
||||
// Aktuelle Domain + Protokoll
|
||||
$scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
|
||||
$host = $_SERVER['HTTP_HOST'] ?? 'usbcheck.it';
|
||||
$baseUrl = $scheme . '://' . $host;
|
||||
|
||||
// Wenn $navAnchors NICHT gesetzt ist → leeres Array
|
||||
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">
|
||||
|
||||
<!-- Logo -->
|
||||
<div class="flex items-center gap-3">
|
||||
<a href="/?lang=<?= htmlspecialchars($lang) ?>" class="flex items-center gap-3">
|
||||
<img src="https://staging.usbcheck.it/assets/img/logo_slogan.png" alt="usbcheck.it Logo" class="h-9 w-auto">
|
||||
<img src="<?= $baseUrl ?>/assets/img/logo_slogan.png"
|
||||
alt="usbcheck.it Logo"
|
||||
class="h-9 w-auto">
|
||||
|
||||
<div class="hidden sm:flex flex-col leading-tight">
|
||||
<span class="font-heading font-bold text-sm uppercase tracking-[0.18em] text-brand-muted">
|
||||
@@ -27,14 +35,14 @@ if (!isset($navAnchors) || !is_array($navAnchors)) {
|
||||
<!-- Navigation -->
|
||||
<div class="flex items-center gap-6">
|
||||
|
||||
<nav class="md:flex items-center gap-6 text-xs font-medium text-brand-muted uppercase tracking-[0.18em]">
|
||||
<?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>
|
||||
<nav class="md:flex items-center gap-6 text-xs font-medium text-brand-muted uppercase tracking-[0.18em]">
|
||||
<?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"
|
||||
@@ -86,6 +94,7 @@ if (!isset($navAnchors) || !is_array($navAnchors)) {
|
||||
aria-label="Mein Konto">
|
||||
<span><?= strtoupper(substr($userInitials ?? 'U', 0, 2)) ?></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user