Skip to content
Snippets Groups Projects
Commit a3b9d771 authored by zh393's avatar zh393
Browse files

Revert "added lia's changes"

This reverts commit 87849f35.
parent 87849f35
No related branches found
No related tags found
1 merge request!4Added Banner.mov video
......@@ -4,7 +4,7 @@ import { Switch, Route } from "react-router-dom"
import Home from "./pages/home/Home"
import Results from "./pages/results/Results"
import Recipe from "./pages/recipe/Recipe.js"
import AboutUs from "./pages/about-us/about-us"
function App() {
return (
......@@ -13,7 +13,6 @@ function App() {
<Route exact path="/"><Home /></Route>
<Route path="/results"><Results /></Route>
<Route path="/recipe/:id"><Recipe /></Route>
<Route path="/about"><AboutUs /></Route>
</Switch>
</div>
)
......
import React from 'react'
function AboutUs() {
return (
<><h1>About Us</h1><h2>Data Statement</h2><p>Group L is committed to protecting the privacy and accuracy of confidential information to the extent possible, subject to provisions of state and federal law. Other than as required by laws that guarantee public access to certain types of information, or in response to subpoenas or other legal instruments that authorize access, personally-identifiable information is not actively shared. In particular, we do not re-distribute or sell personal information collected on our website.</p></>
)
}
export default AboutUs;
\ No newline at end of file
......@@ -3,14 +3,9 @@ import Heading from "./components/Heading"
import Form from "./components/Form"
import Container from "@mui/material/Container";
import { Box } from '@mui/system';
import Banner from "./components/Banner";
import Hamburger from "./components/Hamburger";
function Home() {
return (
<>
<Hamburger />
<Banner />
<Container maxWidth="sm">
<Box sx={{ my: 20 }}>
<Heading
......@@ -23,7 +18,6 @@ function Home() {
<Form />
</Box>
</Container>
</>
)
}
......
.videoWrapper {
position: relative;
padding-bottom: 5%; /* 16:9 */
height: 0;
}
.videoWrapper video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
\ No newline at end of file
import React from "react"
import styles from "./Banner.css";
function Banner() {
return <div className={styles.videoWrapper}>
<video autoPlay muted className={styles.video}>
<source src="banner.mov" type="video/mp4" />
</video>
</div>
}
export default Banner;
\ No newline at end of file
import React, { useState } from "react";
import { Link } from "react-router-dom";
import styles from "./Hamburger.module.css";
const Hamburger = () => {
const [translatePosition, setTranslatePosition] = useState({
transform: "translateX(-100%)",
});
const [open, setOpen] = useState(false);
const handleTranslate = () => {
console.log("onClick...");
if (!open) {
setTranslatePosition({
transform: "translateX(0)",
});
setOpen(!open);
} else {
setTranslatePosition({
transform: "translateX(-100%)",
});
setOpen(!open);
}
};
return (
<div className={styles.navContainer}>
<button className={styles.button} onClick={() => handleTranslate(!open)}>
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6"
fill="black"
viewBox="0 0 24 24"
stroke="currentColor"
style={{ color: "black", width: "20px" }}
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M4 6h16M4 12h16M4 18h16"
/>
</svg>
</button>
<div className={styles.leftSidebar} style={translatePosition}>
<button
className={styles.closeButton}
onClick={() => handleTranslate(!open)}
>
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
className={styles.closeButtonSVG}
style={{ color: "black", width: "20px" }}
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M6 18L18 6M6 6l12 12"
/>
</svg>
</button>
<Link to="/" className={styles.link}>
Home
</Link>
<Link to="/about" className={styles.link}>
About Us
</Link>
</div>
</div>
);
};
export default Hamburger;
\ No newline at end of file
.navContainer {
width: 100%;
background: transparent;
}
.button {
background: transparent;
outline: none;
border: none;
cursor: pointer;
position: absolute;
top: 20px;
left: 20px;
z-index: 10;
}
.leftSidebar {
display: flex;
flex-direction: column;
background: white;
width: 20%;
justify-content: start;
position: fixed;
padding: 40px 20px;
height: 100vh;
z-index: 20;
box-shadow: 0 8px 30px rgb(0, 0, 0, 0.12);
transition: all 0.3s ease-in-out;
/* transform: translateX(-100%); */
}
.link {
box-shadow: rgba(50, 50, 105, 0.15) 0px 2px 5px 0px,
rgba(0, 0, 0, 0.05) 0px 1px 1px 0px;
padding: 10px 20px;
border-radius: 5px;
margin-bottom: 20px;
text-decoration: none;
color: black;
}
.closeButton {
background: none;
border: none;
outline: none;
cursor: pointer;
}
.closeButtonSVG {
position: absolute;
right: 10px;
top: 10px;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment