feat: Added a low power mode

- added a lower power mode that reduces cpu load by disabling hero animations
This commit is contained in:
2026-02-23 07:44:53 +05:30
parent 8f1215f9d4
commit 246e1c7688
4 changed files with 37 additions and 7 deletions

View File

@@ -19,6 +19,7 @@ export default function App() {
const [mousePos, setMousePos] = useState({ x: 0, y: 0 });
const [hasClickedThemePill, setHasClickedThemePill] = useState(false);
const [showThemePillTooltip, setShowThemePillTooltip] = useState(false);
const [cpuModeEnabled, setCpuModeEnabled] = useState(false);
// Update CSS variables for dynamic theming
useEffect(() => {
@@ -65,7 +66,7 @@ export default function App() {
}, [showThemePillTooltip]);
return (
<div className="min-h-screen bg-(--bg-base) text-(--text-main) font-mono selection:bg-(--color-accent) selection:text-[var(--bg-base)] relative overflow-x-hidden">
<div className="min-h-screen bg-(--bg-base) text-(--text-main) font-mono selection:bg-(--color-accent) selection:text-(--bg-base) relative overflow-x-hidden">
{/* <svg className="hidden">
<filter id="noiseFilter">
@@ -75,7 +76,7 @@ export default function App() {
<div className="fixed inset-0 z-0 pointer-events-none opacity-[0.04]" style={{ filter: 'url(#noiseFilter)' }} />
{/* Blueprint Dot Grid Background */}
<div className="fixed inset-0 dot-grid z-0 pointer-events-none opacity-50" />
<div className={`fixed inset-0 dot-grid z-0 pointer-events-none opacity-50 ${cpuModeEnabled ? 'dot-grid-static' : ''}`} />
{/* Subtle mouse glow */}
<div
@@ -87,7 +88,10 @@ export default function App() {
<CatEasterEgg />
<div className="relative z-10 max-w-5xl mx-auto px-6 py-12 flex flex-col gap-16">
<NavigationBar />
<NavigationBar
cpuModeEnabled={cpuModeEnabled}
onCpuModeToggle={() => setCpuModeEnabled(prev => !prev)}
/>
<HeroSection
activeThemeName={activeTheme.name}
hasClickedThemePill={hasClickedThemePill}
@@ -96,6 +100,7 @@ export default function App() {
setHasClickedThemePill(true);
setShowThemePillTooltip(true);
}}
cpuModeEnabled={cpuModeEnabled}
/>
<SystemOverviewSection />
<div className="grid grid-cols-1 gap-12 md:grid-cols-7">