diff --git a/components/Search.tsx b/components/Search.tsx index 364848c..0163d39 100644 --- a/components/Search.tsx +++ b/components/Search.tsx @@ -301,6 +301,21 @@ const SearchInput = forwardRef< autocompleteState.status === "stalled" ? "pr-11" : "pr-4", )} {...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) => { if ( event.key === "Escape" && diff --git a/tailwind.config.ts b/tailwind.config.ts index 3a1a20a..922e84d 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -52,6 +52,15 @@ export default { 7.5: "0.075", 15: "0.15", }, + animation: { + roll: "roll 2s 1 ease-in-out", + }, + keyframes: { + roll: { + "0%": { transform: "rotate(0deg)" }, + "100%": { transform: "rotate(360deg)" }, + }, + }, }, }, plugins: [typographyPlugin, headlessuiPlugin],