Files
usbcheck.it/partials/structure/layout_end.php
2025-11-21 01:56:02 +01:00

53 lines
1.2 KiB
PHP

<?php
// public/partials/layout_end.php
?>
</main>
<!-- FOOTER -->
<?php
tpl('footer');
?>
</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>
</body>
</html>