add easter egg

This commit is contained in:
Shannon Sterz 2024-12-31 10:40:47 +01:00
parent 00da1376ca
commit 4384cf300b

View file

@ -248,6 +248,19 @@
hyphens: auto; hyphens: auto;
} }
@keyframes disco {
from {
filter: sepia(50%) hue-rotate(0deg) saturate(200%);
}
to {
filter: sepia(50%) hue-rotate(360deg) saturate(200%);
}
}
.disco {
animation: disco 1s linear infinite;
}
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root{ :root{
--sht-background: var(--ctp-macchiato-base); --sht-background: var(--ctp-macchiato-base);
@ -262,6 +275,23 @@
} }
} }
</style> </style>
<script>
let status = 0;
let code = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65];
window.onkeydown = function(key) {
if (key.keyCode === code[status]) {
status++;
if (status === code.length) {
status = 0;
document.body.classList.add('disco');
}
} else {
status = 0;
}
};
</script>
</head> </head>
<body> <body>
<main> <main>