Files
usbcheck.it/partials/structure/layout_start.php
2025-11-20 23:02:15 +01:00

59 lines
1.7 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
// public/partials/layout_start.php
// Erwartet (vor require):
// - $lang (de|en|it|fr) bereits validiert
// - $pageTitle (string)
// - $pageDescription (string, optional)
// - $userInitials (optional, kann null sein)
// Fallbacks:
if (!isset($lang) || !in_array($lang, ['de', 'en', 'it', 'fr'], true)) {
$lang = 'en';
}
if (!isset($pageTitle) || !is_string($pageTitle) || $pageTitle === '') {
$pageTitle = 'usbcheck.it';
}
if (!isset($pageDescription) || !is_string($pageDescription)) {
$pageDescription = '';
}
// Kann später genutzt werden, falls du host-spezifische Sachen brauchst
$host = $_SERVER['HTTP_HOST'] ?? '';
?>
<!DOCTYPE html>
<html lang="<?= htmlspecialchars($lang) ?>">
<head>
<meta charset="UTF-8">
<title><?= htmlspecialchars($pageTitle) ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php if ($pageDescription !== ''): ?>
<meta name="description" content="<?= htmlspecialchars($pageDescription) ?>">
<?php endif; ?>
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Montserrat:wght@600;700;800&display=swap" rel="stylesheet">
<!-- Tailwind (Dev) -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Eigenes CSS -->
<link rel="stylesheet" href="/assets/css/main.css">
</head>
<body class="bg-brand-bg text-brand-text font-sans antialiased scroll-smooth">
<div class="min-h-screen flex flex-col">
<!-- HEADER -->
<?php
tpl('header'); // structure/header.php
?>
<!-- MAIN CONTENT -->
<main class="flex-1">
s