feat: Add barrel roll easter egg

This commit is contained in:
Jesse Wierzbinski 2024-07-22 21:50:20 +02:00
parent 9b75c25fa0
commit 76d28e04a3
No known key found for this signature in database
2 changed files with 24 additions and 0 deletions

View file

@ -301,6 +301,21 @@ const SearchInput = forwardRef<
autocompleteState.status === "stalled" ? "pr-11" : "pr-4", autocompleteState.status === "stalled" ? "pr-11" : "pr-4",
)} )}
{...inputProps} {...inputProps}
onInput={(event) => {
if (
event.currentTarget.value
.toLowerCase()
.includes("barrel roll")
) {
event.currentTarget.value = "";
document.body.classList.add("animate-roll");
setTimeout(
() =>
document.body.classList.remove("animate-roll"),
2000,
);
}
}}
onKeyDown={(event) => { onKeyDown={(event) => {
if ( if (
event.key === "Escape" && event.key === "Escape" &&

View file

@ -52,6 +52,15 @@ export default {
7.5: "0.075", 7.5: "0.075",
15: "0.15", 15: "0.15",
}, },
animation: {
roll: "roll 2s 1 ease-in-out",
},
keyframes: {
roll: {
"0%": { transform: "rotate(0deg)" },
"100%": { transform: "rotate(360deg)" },
},
},
}, },
}, },
plugins: [typographyPlugin, headlessuiPlugin], plugins: [typographyPlugin, headlessuiPlugin],