Files
0xa0.dev/inc/footer.php
T
2026-09-22 19:28:00 +02:00

31 lines
1.2 KiB
PHP

<?php
$build = trim((string) @file_get_contents(__DIR__ . '/../build.txt'));
$build = preg_match('/[0-9a-f]{7,40}/i', $build, $m) ? $m[0] : ($build ?: 'dev');
?>
<?php require_once __DIR__ . '/buttons.php'; ?>
</main>
<footer>
<div class="buttons88x31">
<?= render_buttons_88x31() ?>
</div>
<small>&copy; <?= date('Y') ?> · build: <a href="<?= htmlspecialchars(REPO_URL) ?>"><?= htmlspecialchars($build) ?></a></small>
</footer>
<?php require_once __DIR__ . '/backgrounds.php'; $bgs = bg_styles(); ?>
<?php if (count($bgs) > 1): ?>
<script>
/* Unlabelled: press b to flick through the backgrounds without reloading.
Not persisted -- the server picks a fresh one on every load anyway. */
(function () {
var all = <?= json_encode($bgs) ?>, root = document.documentElement;
document.addEventListener('keydown', function (e) {
if (e.key !== 'b' || e.metaKey || e.ctrlKey || e.altKey) return;
var t = e.target;
if (t && (t.tagName === 'INPUT' || t.tagName === 'TEXTAREA' || t.isContentEditable)) return;
root.dataset.bg = all[(all.indexOf(root.dataset.bg) + 1) % all.length];
});
})();
</script>
<?php endif; ?>
</body>
</html>