Skip to content

Commit

Permalink
feat: add HomePage
Browse files Browse the repository at this point in the history
- Implement Hero and add it to hompage
- Implement Footer and add it to homepage
- add hero-section image to public dir

fixs #22
  • Loading branch information
ahmad-kashkoush committed Nov 2, 2024
1 parent 761c736 commit 7ac5b3d
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 0 deletions.
Binary file added public/images/hero-section-img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions src/components/Shared/Footer.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { Box, Container, Link, Typography } from '@mui/material';
import { Link as RouterLink } from "react-router-dom";
import { GitHub } from '@mui/icons-material';
const Footer = () => {
return (
<Box
py={4}
bgcolor="black"
color="white"
textAlign="center"
component="footer"
>
<Container maxWidth="md">
<Typography variant="h6" component="div" gutterBottom>
Connect with Us
</Typography>
<Box display="flex" justifyContent="center" alignItems="center" gap={4}>
{/* TODO: Add link to about-us page */}
<Link
underline="hover"
component={RouterLink}
to="/"
color="inherit"
>
About us
</Link>
<Link
underline="hover"
href="https://github.com/activecourses/Upwork-Clone-Front"
color="inherit"

>
<GitHub />
</Link>
</Box>
<Typography variant="body2" color="inherit" mt={2}>
© {new Date().getFullYear()}{" "}
<Link href="https://github.com/activecourses">
Active courses
</Link>
. All rights reserved.
</Typography>
</Container>
</Box>
)
}

export default Footer
66 changes: 66 additions & 0 deletions src/components/home/Hero.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { Box, Button, Container, Typography } from "@mui/material";
import { Link as RouterLink } from "react-router-dom";
const Hero = () => {
return (
<Container
component="section"
sx={{
display: "flex",
justifyContent: "space-between",
alignItems: "flex-start",
flex: "1",
gap: "1rem",
marginTop: "5rem",
}}
>
<Box
sx={{
display: "flex",
flexDirection: "column",
gap: "1rem",
"@media (max-width: 1040px)": {
justifyContent: "center",
alignItems: "center",
textAlign: "center",
},
}}
>
<Typography component="h1" variant="h2">
Get it done with a freelancer
</Typography>
<Typography component="p">
Our digital marketing agency helps businesses grow and succeed online
through a range of services including SEO, PPC, social media
marketing, and content creation.
</Typography>
<Button
sx={{
width: "30%",
color: "white",
padding: ".5rem 1rem",
}}
>
<RouterLink style={{ color: "white", textDecoration: "none" }} to="/">
Get started
</RouterLink>
</Button>
</Box>
<Box
sx={{
"@media (max-width: 1040px)": {
display: "none",
},
}}
>
<img
style={{
width: "100%",
height: "100%",
}}
src="./images/hero-section-img.png"
/>
</Box>
</Container>
);
};
export default Hero;
20 changes: 20 additions & 0 deletions src/components/home/HomePage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Box } from "@mui/material";
import Footer from "../Shared/Footer";
import Hero from "./Hero";

/** TODO:
* ✅ non-user navbar
* add homepage body
*
*/
const HomePage = () => {
return (
<Box display="flex" flexDirection="column" flex="1">
<Hero />
<Footer />
</Box>
);
};


export default HomePage;

0 comments on commit 7ac5b3d

Please sign in to comment.