Parcourir la source

temp feature home

master
azri il y a 1 mois
Parent
révision
5a0c054832

BIN
src/assets/images/amberBeautyWallpaper.jpg Voir le fichier


BIN
src/assets/images/amberClothing.jpg Voir le fichier


+ 6
- 3
src/components/ProductType/ProductType.jsx Voir le fichier

@@ -1,7 +1,7 @@
1 1
 import React from 'react';
2 2
 import { Box, Button, Typography } from '@mui/material';
3 3
 
4
-const ProductType = ({title}) => {
4
+const ProductType = ({title, link, img_url}) => {
5 5
   return (
6 6
     <Box
7 7
       sx={{
@@ -9,7 +9,10 @@ const ProductType = ({title}) => {
9 9
         width: '100%',
10 10
         height: 0,
11 11
         paddingTop: '600px', // This sets the height based on top padding
12
+        backgroundImage: `url(${img_url})`,
12 13
         overflow: 'hidden',
14
+        backgroundSize:'cover',
15
+        backgroundPosition: 'center center'
13 16
       }}
14 17
     >
15 18
       <Box
@@ -27,10 +30,10 @@ const ProductType = ({title}) => {
27 30
           color: '#fff', // Text and button color for visibility
28 31
         }}
29 32
       >
30
-        <Typography variant="h4" gutterBottom>
33
+        <Typography variant="h5" gutterBottom sx={{fontWeight:"600", letterSpacing:7}}>
31 34
           {title}
32 35
         </Typography>
33
-        <Button variant="contained" color="primary">
36
+        <Button variant="contained" color="primary" onClick={()=>{ window.location.href = link }}>
34 37
           SHOP NOW
35 38
         </Button>
36 39
       </Box>

+ 7
- 3
src/pages/Home.jsx Voir le fichier

@@ -14,6 +14,10 @@ import NewsLetter from '../components/NewsLetter';
14 14
 
15 15
 import ProductService from "../services/ProductService"
16 16
 
17
+import AmberHomeWallpaper from "../assets/images/titleBg.jpg";
18
+import AmberBeautyWallpaper from "../assets/images/amberBeautyWallpaper.jpg";
19
+import AmberClothing from "../assets/images/amberClothing.jpg"
20
+
17 21
 const Home = () => {
18 22
 
19 23
   React.useEffect(()=>{
@@ -84,13 +88,13 @@ const Home = () => {
84 88
         <Box sx={{ flexGrow: 1, mt: 10 }}>
85 89
           <Grid container spacing={2}>
86 90
             <Grid size={12}>
87
-              <ProductType title={'CLOTHING'}/>
91
+              <ProductType title={'CLOTHING'} link={'/collection/clothing'} img_url={AmberClothing}/>
88 92
             </Grid>
89 93
             <Grid size={{xs:12, md:6}}>
90
-              <ProductType title={'BEAUTY'}/>
94
+              <ProductType title={'BEAUTY'} link={'/collection/beauty'} img_url={AmberBeautyWallpaper}/>
91 95
             </Grid>
92 96
             <Grid size={{xs:12, md:6}}>
93
-              <ProductType title={'HOME'}/>
97
+              <ProductType title={'HOME'} link={'/collection/home'} img_url={AmberHomeWallpaper} />
94 98
             </Grid>
95 99
           </Grid>
96 100
         </Box>

Chargement…
Annuler
Enregistrer