Snow click and flake amount fix

This commit is contained in:
mrfry 2020-12-26 16:17:55 +01:00
parent dd97c7cbeb
commit 0c69bf931f

View file

@ -33,18 +33,20 @@ export default function Layout(props) {
setWindowSize([window.innerWidth, window.innerHeight]) setWindowSize([window.innerWidth, window.innerHeight])
}) })
}, []) }, [])
const snowflakeCount = (windowSize[0] + windowSize[1]) / 8
return ( return (
<div> <div>
<div <div
style={{ style={{
pointerEvents: 'none',
zIndex: 900, zIndex: 900,
position: 'fixed', position: 'fixed',
width: `${windowSize[0]}px`, width: `${windowSize[0]}px`,
height: `${windowSize[1]}px`, height: `${windowSize[1]}px`,
}} }}
> >
<Snowfall snowflakeCount={300} /> <Snowfall snowflakeCount={snowflakeCount} />
</div> </div>
<div className="sidebar"> <div className="sidebar">
<div className="headercontainer"> <div className="headercontainer">