Skip to content

Commit 7dc5381

Browse files
feat:setup banner
1 parent 38389ca commit 7dc5381

File tree

11 files changed

+124
-23
lines changed

11 files changed

+124
-23
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/App.tsx

+8-7
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ const App = () => {
1515
return (
1616
<BrowserRouter>
1717
<CssBaseline />
18-
<Routes>
19-
<Route element={<Layout />}>
20-
<Route path='/' element={<Navigate to='/dashboard' replace />} />
21-
<Route path='/dashboard' element={<Dashboard />} />
22-
</Route>
23-
</Routes>
24-
<ThemeProvider theme={theme}></ThemeProvider>
18+
<ThemeProvider theme={theme}>
19+
<Routes>
20+
<Route element={<Layout />}>
21+
<Route path='/' element={<Navigate to='/dashboard' replace />} />
22+
<Route path='/dashboard' element={<Dashboard />} />
23+
</Route>
24+
</Routes>
25+
</ThemeProvider>
2526
</BrowserRouter>
2627
);
2728
};

src/components/Navbar/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { AppBar, Box, IconButton, Link, Toolbar } from '@mui/material';
22
import React from 'react';
33
import FlexBetween from '../FlexBetween';
4-
import logo from '../../assets/logo.png';
4+
import logo from '/assets/logo.png';
55
import { Link as RouterLink } from 'react-router-dom';
66

77
/* ASSETS */
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.banner-main__title {
2+
}
3+
4+
.banner-main__desc {
5+
}
6+
7+
.banner-box {
8+
width: 643px;
9+
height: 443px;
10+
border-radius: 10px;
11+
display: flex;
12+
flex-direction: column;
13+
justify-content: flex-start;
14+
padding: 1.5rem 2.5rem;
15+
position: absolute;
16+
bottom: 150px;
17+
right: 60px;
18+
}

src/scenes/Dashboard/index.tsx

+80-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,86 @@
11
import React from 'react';
2+
import { Box, Button, Typography, useTheme } from '@mui/material';
3+
4+
import './dashboard.styles.css';
25

36
const Dashboard = () => {
4-
return <div>Dashboard</div>;
7+
const theme = useTheme();
8+
const classes = {
9+
bannerContainer: {
10+
height: '1007.93px',
11+
background: "url('/assets/heroImage.png')",
12+
backgroundRepeat: 'no-repeat',
13+
backgroundSize: 'cover',
14+
backgroundPosition: 'center',
15+
opacity: '0.85',
16+
position: 'relative',
17+
zIndex: 1,
18+
},
19+
bannerAdv: {
20+
letterSpacing: '3px',
21+
fontWeight: '600',
22+
fontSize: '16px',
23+
'&.MuiTypography-subtitle1': {},
24+
},
25+
bannerTitle: {
26+
color: '#B88E2F',
27+
fontSize: '52px',
28+
fontStyle: 'normal',
29+
fontWeight: '700',
30+
lineHeight: '65px',
31+
'&.MuiTypography-h6': {},
32+
},
33+
bannerDesc: {
34+
width: '546px',
35+
fontSize: '18px',
36+
fontWeight: '500',
37+
lineHeight: '24px',
38+
letterSpacing: '1.2px',
39+
m: '1rem 0',
40+
'&.MuiTypography-body1': {},
41+
},
42+
button: {
43+
backgroundColor: theme.palette.secondary.main,
44+
color: theme.palette.primary.main,
45+
p: '1.7rem 4rem',
46+
width: '190px',
47+
height: '24px',
48+
textAlign: 'center',
49+
borderRadius: 'none',
50+
'&:hover': {
51+
backgroundColor: theme.palette.secondary[400],
52+
color: theme.palette.primary.main,
53+
},
54+
},
55+
};
56+
return (
57+
<Box component='main' sx={classes.bannerContainer}>
58+
<Box
59+
display='flex'
60+
flexDirection='column'
61+
gap='1.5rem'
62+
className='banner-box'
63+
sx={{ backgroundColor: theme.palette.secondary[100] }}
64+
>
65+
<Box width='559px'>
66+
<Typography variant='subtitle1' sx={classes.bannerAdv}>
67+
New Arrival
68+
</Typography>
69+
<Typography variant='h6' sx={classes.bannerTitle}>
70+
Discover Our New Collection
71+
</Typography>
72+
<Typography variant='body1' className='banner-main__desc' sx={classes.bannerDesc}>
73+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec
74+
ullamcorper mattis.
75+
</Typography>
76+
</Box>
77+
78+
<Button variant='contained' size='small' sx={classes.button}>
79+
Buy Now
80+
</Button>
81+
</Box>
82+
</Box>
83+
);
584
};
685

786
export default Dashboard;

src/scenes/Layout/index.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ const Layout = () => {
1010
<FlexBetween>
1111
<Navbar />
1212
</FlexBetween>
13-
<Container maxWidth='xl'>
14-
<Outlet />
15-
</Container>
13+
<Outlet />
1614
<Footer />
1715
</Box>
1816
);

src/styles/global.css

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
box-sizing: border-box;
99
}
1010

11+
:root {
12+
--primary: '#B88E2F';
13+
--font-color: '#333';
14+
}
15+
1116
html,
1217
body {
1318
width: 100%;

src/styles/theme.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ const shades = {
2828
900: '#333333',
2929
},
3030
secondary: {
31-
100: '#cecfd1',
32-
200: '#9d9fa3',
33-
300: '#6b6e76',
34-
400: '#3a3e48',
35-
500: '#090e1a',
36-
600: '#070b15',
37-
700: '#050810',
38-
800: '#04060a',
39-
900: '#020305',
31+
100: '#FFF3E3',
32+
200: '#e3d2ac',
33+
300: '#d4bb82',
34+
400: '#c6a559',
35+
500: '#b88e2f',
36+
600: '#937226',
37+
700: '#6e551c',
38+
800: '#4a3913',
39+
900: '#251c09',
4040
},
4141
};
4242

@@ -50,11 +50,11 @@ export const themeSettings = (mode: PaletteMode) => {
5050
? {
5151
primary: {
5252
...shades.primary,
53-
main: shades.primary[400],
53+
main: shades.primary[200],
5454
},
5555
secondary: {
5656
...shades.secondary,
57-
main: shades.secondary[400],
57+
main: shades.secondary[500],
5858
},
5959
}
6060
: {

0 commit comments

Comments
 (0)