-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathLandingImage.jsx
More file actions
116 lines (111 loc) · 3.59 KB
/
LandingImage.jsx
File metadata and controls
116 lines (111 loc) · 3.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
"use client";
import { Button, Card, Container, Stack, Typography } from "@mui/material";
import { TypeAnimation } from "react-type-animation";
import {Article, CalendarMonthOutlined, CameraAlt} from "@mui/icons-material";
import { useEffect, useState } from "react";
import { MeshContainer } from "./MeshContainer/MeshContainer";
function LandingImage() {
const [timeLeft, setTimeLeft] = useState(calculateTimeDiff());
function calculateTimeDiff() {
return new Date(new Date(2025, 2, 22) - new Date());
}
useEffect(() => {
const i = setInterval(() => {
setTimeLeft(calculateTimeDiff());
}, 1000);
return () => clearInterval(i);
}, []); //dependency, if end changes remount
return (
<MeshContainer>
<Container
sx={{
height: "100%",
width: "100%",
display: "flex",
flexDirection: "column",
justifyContent: "space-around",
minHeight: "60vh",
}}
>
<img src={"/HackHPI_white.svg"} width={"150rem"} alt={"HackHPI Logo"} />
<div>
<Typography sx={{ color: "white" }} variant={"h2"} component={"h1"}>
Agriculture, Climate & Tech
</Typography>
<Typography variant={"h4"} component={"h2"}>
<TypeAnimation
preRenderFirstString={true}
sequence={[
500,
"Revolutionize ",
500,
"Revolutionize food chains", // initially rendered starting point
1000,
"Revolutionize crop management", // initially rendered starting point,
1000,
"Revolutionize farming tech", // initially rendered starting point
1000,
//`See you in ${Math.round(timeLeft / (24 * 60 * 60 * 1000))} Days!`,
//`Thank you for joining us!`,
// 10000,
]}
speed={50}
repeat={Infinity}
/>
</Typography>
</div>
<Stack direction={"row"} spacing={3} useFlexGap flexWrap="wrap">
<Button
variant={"contained"}
sx={{
borderWidth: "1rem",
width: "13rem",
height: "3.5rem",
fontSize: "1rem",
}}
color={"primary"}
startIcon={<CameraAlt />}
onClick={() =>
// document.getElementById("signupForm").scrollIntoView({
document.getElementById("images").scrollIntoView({
behavior: "smooth",
block: "start",
inline: "nearest",
})
}
>
{/* Registration */}
Photo Gallery
</Button>
<Card
sx={{ height: "3.5rem", justifyContent: "center", display: "flex" }}
>
<Stack
direction={"row"}
alignItems={"center"}
display={"flex"}
sx={{
height: "100%",
paddingRight: "1.25rem",
paddingLeft: "1.25rem",
}}
spacing={2}
>
<CalendarMonthOutlined
sx={{ fontSize: "1.5rem", color: "text.disabled" }}
/>
<Typography
sx={{ fontSize: "1rem" }}
color={"text.disabled"}
noWrap
>
10th - 11th April 2026
</Typography>
</Stack>
</Card>
</Stack>
</Container>
</MeshContainer>
);
}
export default LandingImage;