1
- import { Container , Sheet , styled , Typography } from '@mui/joy'
1
+ import { Container , Stack , Sheet , Typography , Divider } from '@mui/joy'
2
2
import Header from "../components/Header.jsx"
3
3
import _ from 'lodash'
4
+ import { motion } from "framer-motion"
4
5
5
6
const RandomColor = ( ) => {
6
7
const colors = [
@@ -31,50 +32,71 @@ const Features = () => {
31
32
'Tip Suggestions: Access conversation starters with ease.'
32
33
]
33
34
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
-
57
35
return (
58
36
< >
59
37
< 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 >
76
98
</ >
77
- ) ;
78
- } ;
99
+ )
100
+ }
79
101
80
102
export default Features ;
0 commit comments