DK2/templates/layouts/basic.php

47 lines
1.2 KiB
PHP
Raw Permalink Normal View History

2024-09-27 18:45:33 -05:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dragon Knight</title>
2024-11-13 20:53:05 -06:00
<link rel="stylesheet" href="/assets/css/basic.css">
2024-10-10 19:14:14 -05:00
<script src="/assets/scripts/htmx.js"></script>
2024-09-27 18:45:33 -05:00
</head>
<body>
2024-11-13 20:53:05 -06:00
<header id="basic-header">
<img src="/assets/img/dk.png" alt="Dragon Knight" width="480">
2024-10-03 12:02:32 -05:00
</header>
2024-09-27 18:45:33 -05:00
2024-11-13 20:53:05 -06:00
<main id="basic-main">
<?= render($view, $data) ?>
2024-10-03 12:02:32 -05:00
</main>
2024-11-13 20:53:05 -06:00
<footer id="basic-footer">
&copy; <?= date('Y') ?> Dragon Knight
2024-10-03 12:02:32 -05:00
</footer>
2024-10-03 16:25:25 -05:00
<script type="module">
import Tooltip from '/assets/scripts/tooltip.js';
2024-10-24 18:23:55 -05:00
Tooltip.init({
removalDelay: 0
});
2024-10-03 16:25:25 -05:00
</script>
<script>
// Get all elements with data-alert-close attribute; when clicked, delete parent element
document.querySelectorAll('[alert-close]').forEach(function (el) {
el.addEventListener('click', function () {
el.parentNode.remove();
});
});
// Get all elements with a data-auto-close attribute; after x seconds, delete the element
document.querySelectorAll('[auto-close]').forEach(function (el) {
setTimeout(function () {
el.remove();
}, el.getAttribute('auto-close'));
});
</script>
2024-09-27 18:45:33 -05:00
</body>
</html>