Skip to content

Commit 4c324df

Browse files
committed
update: Features page
1 parent 5550b03 commit 4c324df

File tree

1 file changed

+64
-42
lines changed

1 file changed

+64
-42
lines changed

src/pages/Features.jsx

+64-42
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import {Container, Sheet, styled, Typography} from '@mui/joy'
1+
import {Container, Stack, Sheet, Typography, Divider} from '@mui/joy'
22
import Header from "../components/Header.jsx"
33
import _ from 'lodash'
4+
import {motion} from "framer-motion"
45

56
const RandomColor = () => {
67
const colors = [
@@ -31,50 +32,71 @@ const Features = () => {
3132
'Tip Suggestions: Access conversation starters with ease.'
3233
]
3334

34-
const AnimatedTypography = styled(Typography)(() => ({
35-
"&:hover": {
36-
animation: "focusInContractBck 1s"
37-
},
38-
"@keyframes focusInContractBck": {
39-
"0%": {
40-
letterSpacing: "1em",
41-
"&::-webkit-transform": "translateZ(300px)",
42-
transform: "translateZ(300px)",
43-
"&::-webkit-filter": "blur(12px)",
44-
filter: "blur(12px)",
45-
opacity: "0"
46-
},
47-
"100%": {
48-
"&::-webkit-transform": "translateZ(12px)",
49-
transform: "translateZ(12px)",
50-
"&::-webkit-filter": "blur(0)",
51-
filter: "blur(0)",
52-
opacity: "1"
53-
}
54-
}
55-
}))
56-
5735
return (
5836
<>
5937
<Header/>
60-
<Typography level="h1">Features</Typography>
61-
{features.map((feature, index) => {
62-
return <Sheet key={index} sx={{
63-
display: "flex",
64-
alignItems: "center",
65-
height: 600,
66-
backgroundColor: RandomColor,
67-
filter: `brightness(${_.random(0.70, 1.30, true)})`
68-
}}>
69-
<Container sx={{height: 200}}>
70-
<AnimatedTypography level="title-lg" sx={{fontSize: 40}}>
71-
{feature}
72-
</AnimatedTypography>
73-
</Container>
74-
</Sheet>
75-
})}
38+
<Sheet>
39+
<Container sx={{height: {xs: 150, md: 250}}}>
40+
<Stack sx={{
41+
height: "100%",
42+
alignItems: "center",
43+
flexDirection: "column",
44+
justifyContent: "center",
45+
gap: 2
46+
}}>
47+
<Typography level="h1" sx={{fontSize: {xs: "2rem", md: "3rem"}}}>Features</Typography>
48+
<Divider/>
49+
</Stack>
50+
</Container>
51+
{features.map((feature, index) => {
52+
return <>
53+
<Sheet key={index} sx={{
54+
display: "flex",
55+
alignItems: "center",
56+
height: {xs: 300, md: 500},
57+
backgroundColor: RandomColor,
58+
p: {xs: 2, md: 2},
59+
filter: `brightness(${_.random(0.90, 1.30, true)})`,
60+
61+
}}>
62+
<Container>
63+
<motion.div
64+
initial={{
65+
filter: `blur(2px)`,
66+
opacity: 0,
67+
scale: 0.5,
68+
rotate: _.random(-10, 10),
69+
x: _.random(-250, 250)
70+
}}
71+
whileInView={{
72+
filter: "blur(0)",
73+
opacity: 1,
74+
scale: 1,
75+
rotate: 0,
76+
x: _.random(-20, 20)
77+
}}
78+
transition={{
79+
duration: 1.1, scale: {
80+
type: "spring",
81+
damping: _.random(5, 12),
82+
stiffness: _.random(90, 110),
83+
restDelta: 0.001,
84+
mass: _.random(1, 1.4),
85+
velocity: _.random(1.5, 2.5)
86+
}
87+
}}
88+
>
89+
<Typography level="title-lg" sx={{fontSize: {xs: 25, md: 40}}}>
90+
{feature}
91+
</Typography>
92+
</motion.div>
93+
</Container>
94+
</Sheet>
95+
</>
96+
})}
97+
</Sheet>
7698
</>
77-
);
78-
};
99+
)
100+
}
79101

80102
export default Features;

0 commit comments

Comments
 (0)