Implemented conditional snowflakes
This commit is contained in:
10
package-lock.json
generated
10
package-lock.json
generated
@@ -10,6 +10,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"framer-motion": "^11.0.0",
|
"framer-motion": "^11.0.0",
|
||||||
"lucide-react": "^0.300.0",
|
"lucide-react": "^0.300.0",
|
||||||
|
"luxon": "^3.7.2",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-icons": "^5.5.0",
|
"react-icons": "^5.5.0",
|
||||||
@@ -1858,6 +1859,15 @@
|
|||||||
"react": "^16.5.1 || ^17.0.0 || ^18.0.0"
|
"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": {
|
"node_modules/merge2": {
|
||||||
"version": "1.4.1",
|
"version": "1.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"framer-motion": "^11.0.0",
|
"framer-motion": "^11.0.0",
|
||||||
"lucide-react": "^0.300.0",
|
"lucide-react": "^0.300.0",
|
||||||
|
"luxon": "^3.7.2",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-icons": "^5.5.0",
|
"react-icons": "^5.5.0",
|
||||||
|
|||||||
10
src/App.jsx
10
src/App.jsx
@@ -5,6 +5,7 @@ import {Hero} from './sections/Hero';
|
|||||||
import {Projects} from './sections/Projects';
|
import {Projects} from './sections/Projects';
|
||||||
import {Team} from './sections/Team';
|
import {Team} from './sections/Team';
|
||||||
import Snowfall from 'react-snowfall'
|
import Snowfall from 'react-snowfall'
|
||||||
|
import { DateTime } from 'luxon';
|
||||||
|
|
||||||
export default function LiquidDevelopment() {
|
export default function LiquidDevelopment() {
|
||||||
return (
|
return (
|
||||||
@@ -19,9 +20,12 @@ export default function LiquidDevelopment() {
|
|||||||
pointerEvents: 'none',
|
pointerEvents: 'none',
|
||||||
zIndex: 9999,
|
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>
|
</div>
|
||||||
|
|
||||||
<Navbar/>
|
<Navbar/>
|
||||||
|
|||||||
Reference in New Issue
Block a user