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

@@ -9,6 +9,41 @@
?>
</div>
<?php
// CSS im Footer (falls benötigt)
foreach ($GLOBALS['page_styles'] as $style) {
if ($style['pos'] !== 'footer') {
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 Footer
foreach ($GLOBALS['page_footer_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;
}
?>
<!-- Globale JS-Dateien -->
<script src="/assets/js/lang.js"></script>