This commit is contained in:
2025-11-21 01:56:02 +01:00
parent 1f77464e1f
commit 732733b9da
11 changed files with 195 additions and 11 deletions

View File

@@ -38,6 +38,41 @@ $host = $_SERVER['HTTP_HOST'] ?? '';
<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">
<?php
// CSS im Header
foreach ($GLOBALS['page_styles'] as $style) {
if ($style['pos'] !== 'header') {
continue;
}
$href = $style['href'];
if (!empty($style['version'])) {
$href .= (str_contains($href, '?') ? '&' : '?') . 'v=' . urlencode($style['version']);
}
echo '<link rel="stylesheet" href="' . htmlspecialchars($href) . '">' . PHP_EOL;
}
// Scripts im Header
foreach ($GLOBALS['page_header_scripts'] as $script) {
$src = $script['src'];
if (!empty($script['version'])) {
$src .= (str_contains($src, '?') ? '&' : '?') . 'v=' . urlencode($script['version']);
}
$attr = '';
if ($script['async']) {
$attr .= ' async';
} elseif ($script['defer']) {
$attr .= ' defer';
}
if ($script['type']) {
$attr .= ' type="' . htmlspecialchars($script['type']) . '"';
}
echo '<script src="' . htmlspecialchars($src) . '"' . $attr . '></script>' . PHP_EOL;
}
?>
<!-- Tailwind (Dev) -->
<script src="https://cdn.tailwindcss.com"></script>