├── .gitignore
├── LICENSE
├── README.md
├── package-lock.json
├── package.json
├── public
└── index.html
└── src
├── App.js
├── assets
├── About.png
├── Contact.png
├── Home.png
├── pexels-alex-staudinger-1732414.jpg
├── pexels-binyamin-mellish-186078.png
└── pexels-pixabay-271816.jpg
├── components
├── Content.jsx
├── Details.jsx
├── DrawerItem.jsx
├── Footer
│ ├── Footer.jsx
│ ├── FooterLink.jsx
│ └── FooterTitle.jsx
├── Gallery.jsx
├── GetInTouch.jsx
├── GetStarted.jsx
├── Header.jsx
├── Navbar.jsx
├── Paragraph.jsx
└── Title.jsx
├── index.js
└── pages
├── About.js
├── Contact.js
└── Home.js
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Alessandra Do Couto
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Landing Page Template com React JS e Material UI :dart:
2 |
3 | Site: https://hbsales.onrender.com/
4 |
5 | 
6 |
7 |
8 | 
9 |
10 | 
11 |
12 |
13 |
14 | ## Índice
15 |
16 | - [Sobre](https://github.com/alessandradocouto/landing-page-template-reactjs#sobre)
17 | - [Aprendizados](https://github.com/alessandradocouto/landing-page-template-reactjs#aprendizados)
18 | - [Dependências](https://github.com/alessandradocouto/landing-page-template-reactjs#dependências)
19 |
20 |
21 |
22 | ## Sobre
23 |
24 | Landing page Template em React JS feita para desenvolvedores/designs que querem criar rapidamente uma landing page profissional para seus projetos open source.
25 |
26 |
27 | ## Aprendizados
28 |
29 | :heavy_check_mark: React Router v6+ no DOM
30 |
31 | No App.js
32 |
33 | `import {BrowserRouter, Routes, Route} from react-router-dom';`
34 |
35 | O componente **Navbar** tem elementos que se repetem em todas as páginas e tem elementos que estão em 'Routes', logo fica dentro de 'BrowserRouter'.
36 |
37 | ```
38 |
39 |
40 |
41 | } />
42 | } />
43 | } />
44 |
45 |
46 | ```
47 |
48 | Dentro da pasta pages :file_folder: e no arquivo :page_with_curl: Home.js
49 |
50 | ```
51 | const Home = () => {
52 | return (
53 | <>
54 |
55 |
56 |
57 | >
58 |
59 | )
60 | }
61 | ```
62 |
63 |
64 | Dentro do componente **Navbar**:
65 |
66 | ```
67 | import { Link } from 'react-router-dom';
68 |
69 | const itemList = [
70 | {
71 | text: "Home",
72 | to: "/"
73 | },
74 | {
75 | text: "About",
76 | to: "/about"
77 | },
78 | {
79 | text: "Contact",
80 | to: "/contact"
81 | }
82 | ];
83 |
84 |
85 | const Navbar = () => {
86 |
87 | return (
88 |
96 |
97 |
102 | HBSales
103 |
104 |
105 |
106 | {itemList.map( ( item ) => {
107 | const { text } = item;
108 | return(
109 |
110 |
119 |
120 |
121 |
122 | )
123 | })}
124 |
125 |
126 |
127 | )
128 | }
129 |
130 | export default Navbar;
131 | ```
132 |
133 |
134 |
135 | :heavy_check_mark: Utilização de sx e breakpoints em Material UI
136 |
137 | O que é [sx](https://mui.com/system/getting-started/the-sx-prop/)?
138 |
139 | A propriedade sx permite que você trabalhe com um superconjunto de CSS que empacota todas as funções de estilo expostas em @mui/system. Você pode especificar qualquer CSS válido usando este suporte, bem como muitas propriedades com reconhecimento de tema que são exclusivas do MUI System.
140 |
141 |
142 | ```
143 |
144 | sx={{
145 | px: 4,
146 | }}
147 |
148 |
149 |
150 |
151 | sx={{
152 | order: {xs: 4, sm: 4, md: 3}
153 | }}
154 |
155 | ```
156 |
157 |
158 | :heavy_check_mark: Uso de Componentes reutilizáveis em React;
159 |
160 | Conteúdo do componente Title:
161 |
162 | ```
163 | import { Typography } from '@mui/material'
164 | import React from 'react'
165 |
166 | const Title = ({ text, textAlign }) => {
167 | return (
168 |
176 | {text}
177 |
178 | )
179 | }
180 |
181 | export default Title;
182 | ```
183 |
184 |
185 | :heavy_check_mark: Utilização de Styled-Components com Material UI
186 |
187 | Personlizar o 'Box'
188 |
189 | ```
190 | const ListMenu = styled(List)(({ theme }) => ({
191 | display: 'none',
192 | [theme.breakpoints.up("sm")] : {
193 | display: "flex",
194 | },
195 | }));
196 | ```
197 |
198 |
199 |
200 | :heavy_check_mark: Design responsivo e mobile first;
201 |
202 | [Uso de Grid no Material UI](https://mui.com/material-ui/react-grid/)
203 |
204 | ```react
205 |
206 |
211 |
212 | ```
213 |
214 |
215 | :heavy_check_mark: Uso de Menu mobile com MUI (Drawer)
216 |
217 | [Drawer para usod e menu Mobile/Hamburguer](https://mui.com/material-ui/react-drawer/)
218 |
219 |
220 |
221 |
222 | ## Dependências
223 |
224 | - [Material UI v5](https://www.npmjs.com/package/@mui/material) - Pacotes de utilidades de CSS para layouts.
225 |
226 | ` npm install @mui/material @emotion/react @emotion/styled `
227 |
228 |
229 | - [react router v6+]("react-router-dom": "^6.6.1") - Pacote para usar React Router em aplicativos Web.
230 |
231 | `npm i react-router-dom`
232 |
233 |
234 | - [react responsive carousel v3.2+](https://www.npmjs.com/package/react-responsive-carousel) - Carousel responsivo e customizável para galeria de iamgens.
235 |
236 | `npm i react-responsive-carousel`
237 |
238 |
239 | - [react animation](https://www.npmjs.com) - Animação de Componentes
240 |
241 |
242 | ##
243 |
244 | ### Clonar o repositorio:
245 |
246 | `git clone https://github.com/nome-usuario/nome-projeto.git`
247 |
248 | ### Instalar dependências
249 |
250 | `npm install`
251 |
252 | ### Rodar aplicação
253 |
254 | `npm start`
255 |
256 | Abra o link [http://localhost:3000](http://localhost:3000)
257 |
258 | ### Criar pasta build
259 |
260 | `npm run build`
261 |
262 | ### Testar aplicação:
263 |
264 | `npm test`
265 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "landing-page-reactjs-materialui",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@emotion/react": "^11.10.5",
7 | "@emotion/styled": "^11.10.5",
8 | "@mui/icons-material": "^5.11.0",
9 | "@mui/material": "^5.11.2",
10 | "@testing-library/jest-dom": "^5.16.5",
11 | "@testing-library/react": "^13.4.0",
12 | "@testing-library/user-event": "^13.5.0",
13 | "react": "^18.2.0",
14 | "react-dom": "^18.2.0",
15 | "react-responsive-carousel": "^3.2.23",
16 | "react-router-dom": "^6.6.1",
17 | "react-scripts": "5.0.1",
18 | "web-vitals": "^2.1.4"
19 | },
20 | "scripts": {
21 | "start": "react-scripts start",
22 | "build": "react-scripts build",
23 | "test": "react-scripts test",
24 | "eject": "react-scripts eject"
25 | },
26 | "eslintConfig": {
27 | "extends": [
28 | "react-app",
29 | "react-app/jest"
30 | ]
31 | },
32 | "browserslist": {
33 | "production": [
34 | ">0.2%",
35 | "not dead",
36 | "not op_mini all"
37 | ],
38 | "development": [
39 | "last 1 chrome version",
40 | "last 1 firefox version",
41 | "last 1 safari version"
42 | ]
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 |
15 |
21 | HBSales - New home buying experience for you
22 |
23 |
24 |
25 |
26 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/src/App.js:
--------------------------------------------------------------------------------
1 | import React from'react';
2 | //rotas
3 | import {BrowserRouter, Routes, Route} from 'react-router-dom';
4 | //pages
5 | import Home from './pages/Home';
6 | import About from './pages/About';
7 | import Contact from './pages/Contact';
8 | //componentes
9 | import Navbar from './components/Navbar';
10 | import Footer from './components/Footer/Footer';
11 |
12 | function App() {
13 | return (
14 | <>
15 |
16 |
17 |
18 | } />
19 | } />
20 | } />
21 |
22 |
23 |
24 | >
25 | );
26 | }
27 |
28 | export default App;
--------------------------------------------------------------------------------
/src/assets/About.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alessandradocouto/landing-page-template-reactjs/40cf57ed0c949dce82d47e494a9bae3fed0d5ab9/src/assets/About.png
--------------------------------------------------------------------------------
/src/assets/Contact.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alessandradocouto/landing-page-template-reactjs/40cf57ed0c949dce82d47e494a9bae3fed0d5ab9/src/assets/Contact.png
--------------------------------------------------------------------------------
/src/assets/Home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alessandradocouto/landing-page-template-reactjs/40cf57ed0c949dce82d47e494a9bae3fed0d5ab9/src/assets/Home.png
--------------------------------------------------------------------------------
/src/assets/pexels-alex-staudinger-1732414.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alessandradocouto/landing-page-template-reactjs/40cf57ed0c949dce82d47e494a9bae3fed0d5ab9/src/assets/pexels-alex-staudinger-1732414.jpg
--------------------------------------------------------------------------------
/src/assets/pexels-binyamin-mellish-186078.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alessandradocouto/landing-page-template-reactjs/40cf57ed0c949dce82d47e494a9bae3fed0d5ab9/src/assets/pexels-binyamin-mellish-186078.png
--------------------------------------------------------------------------------
/src/assets/pexels-pixabay-271816.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alessandradocouto/landing-page-template-reactjs/40cf57ed0c949dce82d47e494a9bae3fed0d5ab9/src/assets/pexels-pixabay-271816.jpg
--------------------------------------------------------------------------------
/src/components/Content.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import {
3 | Grid,
4 | Typography,
5 | IconButton,
6 | Card,
7 | CardContent,
8 | } from "@mui/material";
9 | // icons
10 | import SportsGymnasticsIcon from '@mui/icons-material/SportsGymnastics';
11 | import LocalParkingIcon from '@mui/icons-material/LocalParking';
12 | import ArrowCircleRightRoundedIcon from '@mui/icons-material/ArrowCircleRightRounded';
13 | import FastfoodOutlinedIcon from '@mui/icons-material/FastfoodOutlined';
14 | import PoolOutlinedIcon from '@mui/icons-material/PoolOutlined';
15 | import WifiPasswordIcon from '@mui/icons-material/WifiPassword';
16 | // components
17 | import Title from './Title'
18 | import Paragraph from './Paragraph'
19 |
20 |
21 | const Content = () => {
22 | return (
23 |
33 |
36 |
42 |
43 |
51 | Property facilities
52 |
53 |
54 |
64 |
65 |
66 |
67 |
78 |
79 |
80 |
83 |
84 |
92 | gym
93 |
94 |
95 |
96 |
97 |
98 |
99 |
110 |
111 |
112 |
115 |
116 |
124 | parking
125 |
126 |
127 |
128 |
129 |
130 |
135 |
146 |
147 |
150 |
151 |
152 |
153 |
154 |
155 |
166 |
167 |
168 |
171 |
172 |
180 | local dining
181 |
182 |
183 |
184 |
185 |
186 |
187 |
199 |
200 |
201 |
204 |
205 |
213 | swimming pool
214 |
215 |
216 |
217 |
218 |
219 |
220 |
231 |
232 |
233 |
236 |
237 |
245 | Internet
246 |
247 |
248 |
249 |
250 |
251 | );
252 | }
253 |
254 | export default Content
--------------------------------------------------------------------------------
/src/components/Details.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import {
3 | Box,
4 | Button,
5 | Stack,
6 | TextField
7 | } from '@mui/material'
8 | import Title from './Title'
9 | import Paragraph from './Paragraph'
10 |
11 | const Details = () => {
12 |
13 | const handleSubmit = (event) => {
14 | event.preventDefault();
15 | const data = new FormData(event.currentTarget);
16 | console.log({
17 | email: data.get('email'),
18 | phone: data.get('phone'),
19 | });
20 | }
21 |
22 |
23 | return (
24 |
34 |
40 |
49 |
50 |
58 |
68 |
78 |
98 |
99 |
100 | )
101 | }
102 |
103 | export default Details;
--------------------------------------------------------------------------------
/src/components/DrawerItem.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState } from 'react'
2 | import {
3 | styled,
4 | useTheme,
5 | Drawer,
6 | Divider,
7 | List,
8 | IconButton,
9 | ListItem,
10 | ListItemIcon,
11 | ListItemText,
12 | } from '@mui/material'
13 | // rotas
14 | import { Link } from 'react-router-dom';
15 | // icons
16 | import EmailIcon from '@mui/icons-material/Email';
17 | import HomeIcon from '@mui/icons-material/Home';
18 | import InfoIcon from '@mui/icons-material/Info';
19 | import MenuIcon from '@mui/icons-material/Menu';
20 | import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
21 | import ChevronRightIcon from '@mui/icons-material/ChevronRight';
22 |
23 | const drawerWidth = 240;
24 |
25 | const DrawerHeader = styled('div')(({ theme }) => ({
26 | display: 'flex',
27 | alignItems: 'center',
28 | padding: theme.spacing(0, 5),
29 | ...theme.mixins.toolbar,
30 | justifyContent: 'flex-start',
31 | }));
32 |
33 | //rotas
34 | const itemList = [
35 | {
36 | text: "Home",
37 | icon: ,
38 | to: "/"
39 | },
40 | {
41 | text: "About",
42 | icon: ,
43 | to: "/about"
44 | },
45 | {
46 | text: "Contact",
47 | icon: ,
48 | to: "/contact"
49 | }
50 | ];
51 |
52 |
53 | const DrawerItem = () => {
54 |
55 | const theme = useTheme();
56 | const [open, setOpen] = useState(false);
57 | const handleDrawerOpen = () => {
58 | setOpen(true);
59 | };
60 |
61 | const handleDrawerClose = () => {
62 | setOpen(false);
63 | };
64 |
65 | return (
66 | <>
67 |
74 |
75 |
76 |
77 |
89 |
90 |
91 | {theme.direction === 'rtl' ? : }
92 |
93 |
94 |
95 |
96 | {itemList.map( ( item ) => {
97 | const { text } = item;
98 | return(
99 |
111 |
119 | {item.icon}
120 |
121 |
122 |
123 | )
124 | })}
125 |
126 |
127 | >
128 | )
129 | }
130 |
131 | export default DrawerItem;
--------------------------------------------------------------------------------
/src/components/Footer/Footer.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import {
3 | Box,
4 | Stack,
5 | styled,
6 | Typography,
7 | } from '@mui/material'
8 | import Link from '@mui/material/Link';
9 | import FooterTitle from './FooterTitle'
10 | import FooterLink from './FooterLink'
11 | import FacebookIcon from '@mui/icons-material/Facebook';
12 | import InstagramIcon from '@mui/icons-material/Instagram';
13 |
14 | const Footer = () => {
15 |
16 | const StackColumn = styled(Stack) (() => ({
17 | flexDirection: 'column',
18 | justifyContent: 'flex-start',
19 | alignItems: 'center',
20 | flex: 1,
21 | gap: 8,
22 | textAlign: 'center',
23 | }));
24 |
25 | const BoxRow = styled(Box) (({ theme }) => ({
26 | display: 'flex',
27 | flexDirection: 'row',
28 | backgroundColor: '#ededed',
29 | flex: 1,
30 | [theme.breakpoints.down('sm')]: {
31 | flexDirection: 'column',
32 | gap: 30,
33 | }
34 | }));
35 |
36 | return (
37 |
38 |
45 |
46 |
47 |
50 |
53 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
80 |
88 |
89 |
90 |
98 |
99 |
100 |
101 |
105 | © 2022 HBSales Inc.
106 |
107 |
108 |
109 | )
110 | }
111 |
112 | export default Footer
--------------------------------------------------------------------------------
/src/components/Footer/FooterLink.jsx:
--------------------------------------------------------------------------------
1 | import { Link } from '@mui/material'
2 | import React from 'react'
3 |
4 | const FooterLink = ({ text }) => {
5 | return (
6 |
21 | {text}
22 |
23 | )
24 | }
25 |
26 | export default FooterLink
--------------------------------------------------------------------------------
/src/components/Footer/FooterTitle.jsx:
--------------------------------------------------------------------------------
1 | import { Typography } from '@mui/material'
2 | import React from 'react'
3 |
4 | const FooterTitle = ({ text }) => {
5 | return (
6 |
15 | { text }
16 |
17 | )
18 | }
19 |
20 | export default FooterTitle
--------------------------------------------------------------------------------
/src/components/Gallery.jsx:
--------------------------------------------------------------------------------
1 | import React,{ useState } from 'react'
2 | // mui
3 | import {
4 | Typography,
5 | Box,
6 | Stack,
7 | } from "@mui/material";
8 | // carousel
9 | import "react-responsive-carousel/lib/styles/carousel.min.css";
10 | import { Carousel } from "react-responsive-carousel";
11 | // components
12 | import Title from './Title'
13 | import Paragraph from './Paragraph'
14 |
15 |
16 | const Gallery = () => {
17 |
18 | const [currentIndex, setCurrentIndex] = useState();
19 |
20 | const imageData = [
21 | {
22 | alt: 'image1',
23 | url: 'https://images.pexels.com/photos/259751/pexels-photo-259751.jpeg?cs=srgb&dl=pexels-pixabay-259751.jpg&fm=jpg'
24 | },
25 | {
26 | alt: 'image2',
27 | url: 'https://images.pexels.com/photos/5411784/pexels-photo-5411784.jpeg?cs=srgb&dl=pexels-andrea-davis-5411784.jpg&fm=jpg'
28 | },
29 | {
30 | alt: "image3",
31 | url: 'https://images.pexels.com/photos/356809/pexels-photo-356809.jpeg?cs=srgb&dl=pexels-daniel-frank-356809.jpg&fm=jpg'
32 | },
33 | {
34 | alt: "image4",
35 | url: 'https://images.pexels.com/photos/6267516/pexels-photo-6267516.jpeg?cs=srgb&dl=pexels-get-lost-mike-6267516.jpg&fm=jpg'
36 | },
37 | {
38 | alt: "image5",
39 | url: 'https://images.pexels.com/photos/667838/pexels-photo-667838.jpeg?cs=srgb&dl=pexels-huseyn-kamaladdin-667838.jpg&fm=jpg'
40 | },
41 | ];
42 |
43 | const renderSlides = imageData.map((image) => (
44 |
45 |

46 |
47 | ));
48 |
49 |
50 | const handleChange = (index) => {
51 | setCurrentIndex(index);
52 | }
53 |
54 | return (
55 |
65 |
71 |
77 |
85 | Rooms Gallery
86 |
87 |
97 |
98 |
99 |
103 |
115 | {renderSlides}
116 |
117 |
118 |
119 | )
120 | }
121 |
122 | export default Gallery
--------------------------------------------------------------------------------
/src/components/GetInTouch.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import {
3 | Button,
4 | Stack,
5 | } from '@mui/material'
6 | import Title from './Title'
7 | import Paragraph from './Paragraph'
8 | import { Link } from 'react-router-dom'
9 |
10 | const GetInTouch = () => {
11 |
12 | return (
13 |
23 |
29 |
40 |
61 |
62 |
63 | )
64 | }
65 |
66 | export default GetInTouch;
--------------------------------------------------------------------------------
/src/components/GetStarted.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import {
3 | Box,
4 | Grid,
5 | styled,
6 | Typography,
7 | } from '@mui/material'
8 | import Title from './Title'
9 | // img
10 | import imgDetail from '../assets/pexels-alex-staudinger-1732414.jpg';
11 | import imgDetail2 from '../assets/pexels-pixabay-271816.jpg';
12 |
13 |
14 | const GetStarted = () => {
15 |
16 | const CustomGridItem = styled(Grid) ({
17 | display: 'flex',
18 | flexDirection: 'column',
19 | justifyContent: 'center',
20 | })
21 |
22 | const CustomTypography = styled(Typography) ({
23 | fontSize: '1.1rem',
24 | textAlign: 'start',
25 | lineHeight: '1.5',
26 | color: '#515151',
27 | marginTop: '1.5rem',
28 | })
29 |
30 | return (
31 |
32 |
39 |
43 |
48 |
54 |
55 | Listing are updated continuously so you
56 | won't miss out on homes that just hit
57 | market until you find your perfect home.
58 |
59 |
60 |
61 |
62 |
63 |
64 |
69 |
70 |
71 |
76 |
81 |
82 |
83 |
88 |
93 |
100 |
101 | Our verified partner Agents are local experts who
102 | earn an average of 4.8/5 stars from buyers and sellers.
103 |
104 |
105 |
106 |
107 | )
108 | }
109 |
110 | export default GetStarted;
--------------------------------------------------------------------------------
/src/components/Header.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { Box, Button, styled, Typography } from "@mui/material";
3 | import { Link } from 'react-router-dom'
4 | //img
5 | import headerImg from '../assets/pexels-binyamin-mellish-186078.png'
6 |
7 | const Header = () => {
8 |
9 | const CustomBox = styled(Box) (({ theme }) => ({
10 | minHeight: '80vh',
11 | display: 'flex',
12 | justifyContent: 'center',
13 | // tamanhos
14 | gap: theme.spacing(2),
15 | paddingTop: theme.spacing(10),
16 | // cor de fundo
17 | backgroundColor: 'orange',
18 | [theme.breakpoints.down('md')]: {
19 | flexDirection: 'column',
20 | alignItems: 'center',
21 | textAlign: 'center',
22 | }
23 | }));
24 |
25 | const BoxText = styled(Box) (({ theme }) => ({
26 | flex: '1',
27 | paddingLeft: theme.spacing(8),
28 | [theme.breakpoints.down('md')]: {
29 | flex: '2',
30 | textAlign: 'center',
31 | paddingLeft: theme.spacing(2),
32 | paddingRight: theme.spacing(2),
33 | },
34 | }));
35 |
36 |
37 | return (
38 |
39 | {/* Box text */}
40 |
43 |
51 | We'll build house of your dream
52 |
53 |
54 |
63 | We have 9000 more review and our customers
64 | trust on out property and quality products.
65 |
66 |
67 |
68 |
90 |
115 |
116 |
117 |
118 | ({
119 | [theme.breakpoints.down('md')]:{
120 | flex: '1',
121 | paddingTop: '30px',
122 | alignSelf: 'center',
123 | },
124 | [theme.breakpoints.up('md')]:{
125 | flex: '2',
126 | alignSelf: 'flex-end',
127 | },
128 | })}
129 | >
130 |
138 |
139 |
140 |
141 | )
142 | }
143 |
144 | export default Header
--------------------------------------------------------------------------------
/src/components/Navbar.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import {
3 | AppBar,
4 | Toolbar,
5 | Box,
6 | List,
7 | ListItem,
8 | Typography,
9 | styled,
10 | ListItemButton,
11 | ListItemText,
12 | } from '@mui/material';
13 | // menu
14 | import DrawerItem from './DrawerItem';
15 | // rotas
16 | import { Link } from 'react-router-dom';
17 |
18 |
19 | // personalizacao
20 | const StyledToolbar = styled(Toolbar) ({
21 | display: 'flex',
22 | justifyContent: 'space-between',
23 | });
24 |
25 | const ListMenu = styled(List)(({ theme }) => ({
26 | display: 'none',
27 | [theme.breakpoints.up("sm")] : {
28 | display: "flex",
29 | },
30 | }));
31 |
32 | //rotas
33 | const itemList = [
34 | {
35 | text: "Home",
36 | to: "/"
37 | },
38 | {
39 | text: "About",
40 | to: "/about"
41 | },
42 | {
43 | text: "Contact",
44 | to: "/contact"
45 | }
46 | ];
47 |
48 |
49 | const Navbar = () => {
50 |
51 | return (
52 |
60 |
61 |
66 | HBSales
67 |
68 |
69 |
70 |
71 |
72 | {itemList.map( ( item ) => {
73 | const { text } = item;
74 | return(
75 |
76 |
85 |
86 |
87 |
88 | )
89 | })}
90 |
91 |
92 |
93 | )
94 | }
95 |
96 | export default Navbar;
97 |
--------------------------------------------------------------------------------
/src/components/Paragraph.jsx:
--------------------------------------------------------------------------------
1 | import { Typography } from '@mui/material'
2 | import React from 'react'
3 |
4 | const Paragraph = ({ text, maxWidth, mx, textAlign }) => {
5 | return (
6 |
15 | {text}
16 |
17 | )
18 | }
19 |
20 | export default Paragraph
--------------------------------------------------------------------------------
/src/components/Title.jsx:
--------------------------------------------------------------------------------
1 | import { Typography } from '@mui/material'
2 | import React from 'react'
3 |
4 | const Title = ({ text, textAlign }) => {
5 | return (
6 |
14 | {text}
15 |
16 | )
17 | }
18 |
19 | export default Title
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom/client';
3 | import App from './App';
4 |
5 | const root = ReactDOM.createRoot(document.getElementById('root'));
6 | root.render(
7 |
8 |
9 |
10 | );
--------------------------------------------------------------------------------
/src/pages/About.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Content from '../components/Content';
3 | import Gallery from '../components/Gallery';
4 |
5 | const About = () => {
6 | return (
7 | <>
8 |
9 |
10 | >
11 | )
12 | }
13 |
14 | export default About
--------------------------------------------------------------------------------
/src/pages/Contact.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import Details from '../components/Details';
3 |
4 | const Contact = () => {
5 | return (
6 |
7 | )
8 | }
9 |
10 | export default Contact
--------------------------------------------------------------------------------
/src/pages/Home.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import GetInTouch from '../components/GetInTouch';
3 | import GetStarted from '../components/GetStarted';
4 | import Header from '../components/Header';
5 |
6 | const Home = () => {
7 | return (
8 | <>
9 |
10 |
11 |
12 | >
13 |
14 | )
15 | }
16 |
17 | export default Home
--------------------------------------------------------------------------------