egg: konami-kode + ascii-hilsen til view-source-folket
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
428df33cf5
commit
0f9667252d
@@ -19,6 +19,17 @@ interface Props {
|
||||
const { title, description, image, type, publishedTime, modifiedTime, tags, jsonLd } = Astro.props;
|
||||
---
|
||||
<!doctype html>
|
||||
<Fragment set:html={`<!--
|
||||
_ ____ ____ _____ ____
|
||||
/ \\ / ___| / ___| ____| _ \\
|
||||
/ _ \\ \\___ \\| | _| _| | |_) |
|
||||
/ ___ \\ ___) | |_| | |___| _ <
|
||||
/_/ \\_\\____/ \\____|_____|_| \\_\\
|
||||
|
||||
Hej, kildekode-læser. Du er min slags.
|
||||
Statisk Astro, ingen frameworks, self-hosted på Proxmox.
|
||||
Prøv Cmd/Ctrl+K — eller den gamle kode: op op ned ned venstre højre venstre højre B A.
|
||||
-->`} />
|
||||
<html lang={SITE.lang}>
|
||||
<head>
|
||||
<script is:inline>
|
||||
@@ -52,5 +63,24 @@ const { title, description, image, type, publishedTime, modifiedTime, tags, json
|
||||
</main>
|
||||
<Footer />
|
||||
<Palette />
|
||||
<script is:inline>
|
||||
// Konami-koden: ↑↑↓↓←→←→BA → terminal-tema + en lille rulle. En klassiker skal æres.
|
||||
(() => {
|
||||
if (window.__konami) return; window.__konami = true;
|
||||
const seq = ['ArrowUp','ArrowUp','ArrowDown','ArrowDown','ArrowLeft','ArrowRight','ArrowLeft','ArrowRight','b','a'];
|
||||
let pos = 0;
|
||||
document.addEventListener('keydown', (e) => {
|
||||
pos = e.key === seq[pos] ? pos + 1 : (e.key === seq[0] ? 1 : 0);
|
||||
if (pos !== seq.length) return;
|
||||
pos = 0;
|
||||
document.documentElement.dataset.theme = 'terminal';
|
||||
localStorage.setItem('theme', 'terminal');
|
||||
document.body.animate(
|
||||
[{ transform: 'rotate(0)' }, { transform: 'rotate(360deg)' }],
|
||||
{ duration: 900, easing: 'ease-in-out' });
|
||||
console.log('%c> adgang givet. velkommen til terminalen.', 'color:#4bff7e;font-family:monospace;font-size:14px');
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user