Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,24 @@ const AboutUs = lazy(() => import('./components/AboutUs/AboutUs'));
// import Register from './components/Forms/Register';
// import ComingSoon from './components/Home/ComingSoon';

let partyMode: boolean = false;
const konamiCode = ['ArrowUp', 'ArrowUp', 'ArrowDown', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowLeft', 'ArrowRight', 'b', 'a', 'Enter'];
let pressedKeys: string[] = [];

document.addEventListener('keydown', (event) => {
pressedKeys.push(event.key);
pressedKeys = pressedKeys.slice(-konamiCode.length);
if (JSON.stringify(pressedKeys) === JSON.stringify(konamiCode)) {
partyMode = !partyMode;
const all = document.querySelectorAll('*');
all.forEach(element => {
if (partyMode) {element.classList.add('party-mode');}
else {element.classList.remove('party-mode');}
})
}
});


export default function App() {

const { isAuthenticated, user, setAuth } = useAuth();
Expand Down
18 changes: 17 additions & 1 deletion frontend/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
box-sizing: border-box;
margin: 0;
padding: 0;
overflow: hidden;
}

html, body {
Expand All @@ -21,4 +20,21 @@ button {
display: flex;
flex-direction: column;
position: relative;
}

.party-mode {
width: 100px;
height: 100px;
animation: spin 3.4s linear infinite;
}

@keyframes spin {
from {
transform: rotate(0deg);
filter: hue-rotate(0deg);
}
to {
transform: rotate(360deg);
filter: hue-rotate(360deg);
}
}