Skip to content

Commit 381ef79

Browse files
committed
feat: add a mp4 demo for section3; #50
1 parent 53c5b95 commit 381ef79

File tree

3 files changed

+38
-2
lines changed

3 files changed

+38
-2
lines changed

public/video/tiger.mp4

35.8 MB
Binary file not shown.

src/components/HomePageComponents/Section3.tsx

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
2-
import { Typography, Box, Button, IconButton } from "@mui/material";
2+
import { Typography, Box, Button, IconButton, Dialog } from "@mui/material";
33
import { Colors } from "design/theme";
44
import React from "react";
5+
import { useState } from "react";
56

67
interface Section3Props {
78
scrollToNext: () => void;
89
}
910

1011
const Section3: React.FC<Section3Props> = ({ scrollToNext }) => {
12+
const [open, setOpen] = useState(false);
13+
14+
const handleOpen = () => setOpen(true);
15+
const handleClose = () => setOpen(false);
16+
1117
return (
1218
<Box
1319
sx={{
@@ -89,7 +95,9 @@ const Section3: React.FC<Section3Props> = ({ scrollToNext }) => {
8995
alignItems: "center",
9096
mt: { xs: 4, md: 2 },
9197
mb: { xs: 8, md: 0 },
98+
cursor: "pointer",
9299
}}
100+
onClick={handleOpen}
93101
>
94102
<img
95103
src={`${process.env.PUBLIC_URL}/img/3cards_vertical.png`}
@@ -100,6 +108,34 @@ const Section3: React.FC<Section3Props> = ({ scrollToNext }) => {
100108
}}
101109
></img>
102110
</Box>
111+
112+
{/* video dialog */}
113+
<Dialog open={open} onClose={handleClose} maxWidth="md" fullWidth>
114+
<Box sx={{ p: 2 }}>
115+
{/* <Box sx={{ position: "relative", paddingTop: "56.25%", height: 0 }}>
116+
<iframe
117+
src="https://www.youtube.com/watch?v=ZI-HntdeVas" // Replace with actual video URL
118+
title="Demo Video"
119+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
120+
allowFullScreen
121+
style={{
122+
position: "absolute",
123+
top: 0,
124+
left: 0,
125+
width: "100%",
126+
height: "100%",
127+
border: "none",
128+
}}
129+
></iframe> */}
130+
<video controls style={{ width: "100%", borderRadius: "8px" }}>
131+
<source
132+
src={`${process.env.PUBLIC_URL}/video/tiger.mp4`}
133+
type="video/mp4"
134+
/>
135+
Your browser does not support the video tag.
136+
</video>
137+
</Box>
138+
</Dialog>
103139
{/* </Box> */}
104140

105141
{/* Scroll Arrow to Section4 */}

src/pages/Home.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ const Home: React.FC = () => {
139139
src={`${process.env.PUBLIC_URL}/img/section4_workflow.png`}
140140
alt="workflow of the website"
141141
style={{
142-
width: "80%",
142+
width: "45%",
143143
height: "auto",
144144
padding: "2rem",
145145
position: "relative",

0 commit comments

Comments
 (0)