Implemented conditional snowflakes

This commit is contained in:
2026-01-16 15:36:19 +01:00
parent bc47a53a07
commit 689518f666
3 changed files with 18 additions and 3 deletions

10
package-lock.json generated
View File

@@ -10,6 +10,7 @@
"dependencies": {
"framer-motion": "^11.0.0",
"lucide-react": "^0.300.0",
"luxon": "^3.7.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^5.5.0",
@@ -1858,6 +1859,15 @@
"react": "^16.5.1 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/luxon": {
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/luxon/-/luxon-3.7.2.tgz",
"integrity": "sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==",
"license": "MIT",
"engines": {
"node": ">=12"
}
},
"node_modules/merge2": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",

View File

@@ -11,6 +11,7 @@
"dependencies": {
"framer-motion": "^11.0.0",
"lucide-react": "^0.300.0",
"luxon": "^3.7.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^5.5.0",

View File

@@ -5,6 +5,7 @@ import {Hero} from './sections/Hero';
import {Projects} from './sections/Projects';
import {Team} from './sections/Team';
import Snowfall from 'react-snowfall'
import { DateTime } from 'luxon';
export default function LiquidDevelopment() {
return (
@@ -19,9 +20,12 @@ export default function LiquidDevelopment() {
pointerEvents: 'none',
zIndex: 9999,
}}>
<Snowfall
snowflakeCount={80}
/>
{(() => {
const now = DateTime.now();
return (now.month === 11 && now.day >= 15) ||
(now.month === 12) ||
(now.month === 1);
})() && <Snowfall snowflakeCount={80} />}
</div>
<Navbar/>