add easter egg
This commit is contained in:
parent
00da1376ca
commit
4384cf300b
1 changed files with 42 additions and 12 deletions
30
index.html
30
index.html
|
@ -248,6 +248,19 @@
|
|||
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) {
|
||||
:root{
|
||||
--sht-background: var(--ctp-macchiato-base);
|
||||
|
@ -262,6 +275,23 @@
|
|||
}
|
||||
}
|
||||
</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>
|
||||
<body>
|
||||
<main>
|
||||
|
|
Loading…
Reference in a new issue