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,20 +248,50 @@
hyphens: auto; hyphens: auto;
} }
@media (prefers-color-scheme: dark) { @keyframes disco {
:root{ from {
--sht-background: var(--ctp-macchiato-base); filter: sepia(50%) hue-rotate(0deg) saturate(200%);
--sht-color: var(--ctp-macchiato-text); }
--sht-link: var(--ctp-macchiato-blue); to {
--sht-link-followed: var(--ctp-macchiato-lavender); filter: sepia(50%) hue-rotate(360deg) saturate(200%);
--sht-link-hover: var(--ctp-macchiato-sky); }
--sht-accent: var(--ctp-macchiato-lavender); }
--sht-accent-bright: var(--ctp-macchiato-mauve);
--sht-selection: var(--ctp-macchiato-surface2); .disco {
--sht-crust: var(--ctp-macchiato-crust); animation: disco 1s linear infinite;
} }
@media (prefers-color-scheme: dark) {
:root{
--sht-background: var(--ctp-macchiato-base);
--sht-color: var(--ctp-macchiato-text);
--sht-link: var(--ctp-macchiato-blue);
--sht-link-followed: var(--ctp-macchiato-lavender);
--sht-link-hover: var(--ctp-macchiato-sky);
--sht-accent: var(--ctp-macchiato-lavender);
--sht-accent-bright: var(--ctp-macchiato-mauve);
--sht-selection: var(--ctp-macchiato-surface2);
--sht-crust: var(--ctp-macchiato-crust);
}
} }
</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>