Skip to content

Commit fed57e3

Browse files
committed
feat: party mode
1 parent 68c3e78 commit fed57e3

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

src/components/CommandPalette.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,15 @@ const CommandPalette = ({ isOpen, setIsOpen, openGenericModal, toggleDigitalRain
166166
addToast({ title: 'Colors Inverted', message: 'Welcome to the upside down!', duration: 2000 });
167167
}
168168
break;
169+
case 'partyMode':
170+
if (document.body.classList.contains('party-mode')) {
171+
document.body.classList.remove('party-mode');
172+
addToast({ title: 'Party Over', message: 'Party\'s over...', duration: 2000 });
173+
} else {
174+
document.body.classList.add('party-mode');
175+
addToast({ title: 'Let\'s Party!', message: 'Boots and cats and boots and cats!', duration: 2000 });
176+
}
177+
break;
169178
case 'showTime': {
170179
openGenericModal('Current Time', <LiveClock />);
171180
break;

src/hooks/useSearchableData.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ const useSearchableData = () => {
105105
{ title: 'Her Daim', type: 'command', commandId: 'herDaim' },
106106
{ title: 'Do a Barrel Roll', type: 'command', commandId: 'doBarrelRoll' },
107107
{ title: 'Toggle Invert Colors', type: 'command', commandId: 'toggleInvertColors' },
108+
{ title: 'Party Mode', type: 'command', commandId: 'partyMode' },
108109
];
109110

110111
setItems([...staticRoutes, ...customCommands, ...allPosts, ...allProjects, ...allLogs, ...allApps]);

src/index.css

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,3 +238,40 @@ body.invert-mode::after {
238238
backdrop-filter: invert(1) hue-rotate(180deg);
239239
pointer-events: none;
240240
}
241+
242+
@keyframes disco-backdrop {
243+
0% { backdrop-filter: hue-rotate(0deg); }
244+
100% { backdrop-filter: hue-rotate(360deg); }
245+
}
246+
247+
body.party-mode::before {
248+
content: '';
249+
position: fixed;
250+
top: 0;
251+
left: 0;
252+
right: 0;
253+
bottom: 0;
254+
z-index: 9998;
255+
backdrop-filter: hue-rotate(0deg);
256+
pointer-events: none;
257+
animation: disco-backdrop 2s linear infinite;
258+
}
259+
260+
/* Retro Mode */
261+
html.retro-mode::before {
262+
content: " ";
263+
display: block;
264+
position: fixed;
265+
top: 0;
266+
left: 0;
267+
bottom: 0;
268+
right: 0;
269+
background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
270+
z-index: 10000;
271+
background-size: 100% 2px, 3px 100%;
272+
pointer-events: none;
273+
}
274+
275+
html.retro-mode body {
276+
text-shadow: 1px 0 2px rgba(255,0,0,0.7), -1px 0 2px rgba(0,255,255,0.7);
277+
}

0 commit comments

Comments
 (0)