|
1 | 1 | /** @jsxImportSource @theme-ui/core */ |
2 | | -import ShapeLeft from "../assets/shape-left.png"; |
3 | | -import ShapeRight from "../assets/shape-right.png"; |
4 | | -import { Container, Box, Heading, Text, Image, Button } from "theme-ui"; |
5 | | -import BannerImg from "../assets/homepage_photo.jpg"; |
| 2 | +import { Container, Box, Heading, Text, Button } from "theme-ui"; |
| 3 | +import Lottie from "lottie-react"; |
| 4 | +import RobotAnimation from "../assets/robot-hero.json"; |
6 | 5 | import KeyFeature from "../components/KeyFeature/key-feature"; |
7 | 6 | import Services from "../components/services/service"; |
| 7 | +import Testimonials from "../components/Testimonials"; |
8 | 8 |
|
9 | 9 | export default function Home() { |
10 | 10 | return ( |
11 | 11 | <section sx={styles.banner} id="home"> |
12 | 12 | <Container sx={styles.banner.container}> |
| 13 | + {/* Left - Content */} |
13 | 14 | <Box sx={styles.banner.contentBox}> |
14 | 15 | <Heading as="h4" variant="heroPrimary"> |
15 | | - Robotics Club, Pashchimanchal Campus, Lamachaur, Pokhara. |
| 16 | + Robotics Club, Pashchimanchal Campus, Pokhara. |
16 | 17 | </Heading> |
17 | 18 | <Text as="p" variant="heroSecondary"> |
18 | | - We are a team of multiple disciples teamed up to continue and |
19 | | - improve the culture of innovation, creative learning and teaching |
20 | | - with extracurricular activities around campus. |
| 19 | + We are a team of passionate students working to promote innovation, creative learning, |
| 20 | + and technical growth through engaging activities beyond the classroom. |
21 | 21 | </Text> |
22 | 22 | <Button variant="primary">Explore</Button> |
23 | 23 | </Box> |
24 | | - <Box sx={styles.banner.imageBox}> |
25 | | - <Image src={BannerImg.src} alt="banner" /> |
| 24 | + |
| 25 | + {/* Right - Animation */} |
| 26 | + <Box sx={styles.banner.animationBox}> |
| 27 | + <Lottie |
| 28 | + animationData={RobotAnimation} |
| 29 | + loop |
| 30 | + style={{ width: "auto", maxWidth: "20000px", height: "auto" }} |
| 31 | + /> |
26 | 32 | </Box> |
27 | 33 | </Container> |
28 | 34 | <KeyFeature /> |
29 | | - <Services /> |
| 35 | + {/* <Services /> */} |
| 36 | + < Testimonials /> |
30 | 37 | </section> |
31 | 38 | ); |
32 | 39 | } |
33 | 40 |
|
34 | 41 | const styles = { |
35 | 42 | banner: { |
36 | | - pt: ["140px", "145px", "155px", "170px", null, null, "180px", "215px"], |
| 43 | + pt: ["120px", "130px", "140px", "150px", "180px"], |
37 | 44 | pb: [2, null, 0, null, 2, 0, null, 5], |
38 | 45 | position: "relative", |
39 | 46 | zIndex: 2, |
40 | 47 |
|
41 | 48 | container: { |
42 | | - minHeight: "inherit", |
43 | 49 | display: "flex", |
44 | | - flexDirection: "row", |
45 | | - justifyContent: "center", |
| 50 | + flexDirection: ["column", "column", "row"], |
| 51 | + justifyContent: "space-between", |
| 52 | + alignItems: "center", |
| 53 | + px: [3, 4, 5], |
| 54 | + gap: [4, 5, 6], |
46 | 55 | }, |
| 56 | + |
47 | 57 | contentBox: { |
48 | | - width: ["100%", "90%", "535px", null, "57%", "60%", "68%", "60%"], |
49 | | - mx: "auto", |
50 | | - textAlign: "center", |
51 | | - mb: ["40px", null, null, null, null, 7], |
| 58 | + flex: "1", |
| 59 | + textAlign: ["center", "center", "center"], |
| 60 | + maxWidth: ["100%", "90%", "50%"], |
| 61 | + mb: ["30px", "40px", 0], |
52 | 62 | }, |
53 | | - imageBox: { |
| 63 | + |
| 64 | + animationBox: { |
| 65 | + flex: "1", |
| 66 | + display: "flex", |
54 | 67 | justifyContent: "center", |
55 | | - textAlign: "center", |
56 | | - display: "inline-flex", |
57 | | - mb: [0, null, -6, null, null, "-40px", null, -3], |
58 | | - img: { |
59 | | - position: "relative", |
60 | | - height: [200, "auto"], |
61 | | - }, |
| 68 | + alignItems: "center", |
| 69 | + maxWidth: ["100%", "100%", "50%"], |
62 | 70 | }, |
63 | 71 | }, |
64 | 72 | }; |
0 commit comments