Browse Source

change font and newsletter

master
azri 1 week ago
parent
commit
cba0d37dac

+ 0
- 3
src/App.js View File

3
 import Home from './pages/Home';
3
 import Home from './pages/Home';
4
 import Cart from './pages/Cart';
4
 import Cart from './pages/Cart';
5
 import Login from './pages/Login';
5
 import Login from './pages/Login';
6
-import Newsletter from './pages/Newsletter';
7
 import Products from './pages/Products';
6
 import Products from './pages/Products';
8
 import Product from './pages/Products/Product';
7
 import Product from './pages/Products/Product';
9
 import Checkout from './pages/Checkout';
8
 import Checkout from './pages/Checkout';
62
             <Route path=':pid' element={<Product />} />
61
             <Route path=':pid' element={<Product />} />
63
 
62
 
64
           </Route>
63
           </Route>
65
-
66
-          <Route path='/newsletter' element={<Newsletter />} />
67
           <Route path='/cart' element={<Cart />} />
64
           <Route path='/cart' element={<Cart />} />
68
           <Route path='/checkout' element={<Checkout />} />
65
           <Route path='/checkout' element={<Checkout />} />
69
 
66
 

BIN
src/assets/fonts/BigCaslonFB-Regular.ttf View File


+ 14
- 4
src/components/ImageView/ImageView.jsx View File

47
             }}
47
             }}
48
             onClick={handleZoomToggle}
48
             onClick={handleZoomToggle}
49
           >
49
           >
50
-            <img
50
+            <Box
51
               src={previewImage}
51
               src={previewImage}
52
+              component="img"
52
               alt="Preview"
53
               alt="Preview"
53
-              style={{
54
-                width: "70%",
54
+              sx={{
55
+                width:{
56
+                  xs:"100%",
57
+                  sm:"100%",
58
+                  md:"70%"
59
+                },
55
                 height: "auto",
60
                 height: "auto",
56
                 display: "block",
61
                 display: "block",
57
                 margin: "auto auto"
62
                 margin: "auto auto"
66
             sx={{
71
             sx={{
67
               display: "flex",
72
               display: "flex",
68
               flexDirection: "row",
73
               flexDirection: "row",
69
-              justifyContent: "center",
74
+              justifyContent: {
75
+                xs:"left",
76
+                sm:"left",
77
+                md:"center"
78
+              },
79
+              flexWrap:"wrap",
70
               padding: 2,
80
               padding: 2,
71
               gap: 2
81
               gap: 2
72
             }}
82
             }}

+ 3
- 2
src/components/Navbar/Navbar.jsx View File

109
   const swiperRef = useRef(null); // Create a ref for the Swiper instance
109
   const swiperRef = useRef(null); // Create a ref for the Swiper instance
110
   const [showHeader, setShowHeader] = useState(true);
110
   const [showHeader, setShowHeader] = useState(true);
111
   const [isAtTop, setIsAtTop] = useState(false);
111
   const [isAtTop, setIsAtTop] = useState(false);
112
+  const [isProductPage, setIsProductPage] = useState(false);
112
   const [lastScrollPos, setLastScrollPos] = useState(0);
113
   const [lastScrollPos, setLastScrollPos] = useState(0);
113
   const [language, setLanguage] = useState('English');
114
   const [language, setLanguage] = useState('English');
114
   const dispatch = useDispatch();
115
   const dispatch = useDispatch();
330
                   xl:10
331
                   xl:10
331
                 },
332
                 },
332
                 display: {
333
                 display: {
333
-                  xs: "none",
334
-                  md: "none",
334
+                  xs: (isProductPage) ? "flex" : "none",
335
+                  md: (isProductPage) ? "flex" : "none",
335
                   lg: "flex"
336
                   lg: "flex"
336
                 },
337
                 },
337
               }}
338
               }}

+ 25
- 13
src/components/NewsLetter/NewsLetter.jsx View File

12
         width: '100%',
12
         width: '100%',
13
         height: 0,
13
         height: 0,
14
         paddingTop: '600px', // This sets the height based on top padding
14
         paddingTop: '600px', // This sets the height based on top padding
15
-        backgroundImage:`url(${bgImage})`,
15
+        backgroundImage: `url(${bgImage})`,
16
+        backgroundSize:"cover",
17
+        backgroundPosition: 'center center',
16
         overflow: 'hidden',
18
         overflow: 'hidden',
17
-        display: "flex"
19
+        display: "flex",
18
       }}
20
       }}
19
     >
21
     >
20
       <Box
22
       <Box
33
         }}
35
         }}
34
       >
36
       >
35
 
37
 
36
-        <Box sx={{ 
37
-          width: {xs:"80%", md:"40%"}, 
38
-          backgroundColor: "rgba(255,255,255, 0.5)", 
38
+        <Box sx={{
39
+          width: { xs: "80%", md: "40%" },
40
+          backgroundColor: "rgba(255,255,255, 0.5)",
39
           px: 15,
41
           px: 15,
40
           py: 10,
42
           py: 10,
41
-          textAlign:"center", 
42
-          color:"black" 
43
+          textAlign: "center",
44
+          color: "black"
43
         }}>
45
         }}>
44
 
46
 
45
           <Typography variant='h3'>
47
           <Typography variant='h3'>
52
             label="Enter your email address"
54
             label="Enter your email address"
53
             variant="outlined"
55
             variant="outlined"
54
             fullWidth
56
             fullWidth
55
-            sx={{ backgroundColor: "white", my:4 }}
57
+            sx={{
58
+              backgroundColor: "white",
59
+              my: 4,
60
+              '& .MuiInputLabel-root': {
61
+                fontSize: {
62
+                  xs: "12px",
63
+                  sm: "12px",
64
+                  md: "16px"
65
+                },
66
+              },
67
+            }}
56
             InputProps={{
68
             InputProps={{
57
               endAdornment: (
69
               endAdornment: (
58
                 <InputAdornment position="end">
70
                 <InputAdornment position="end">
59
                   <Button
71
                   <Button
60
                     variant="contained"
72
                     variant="contained"
61
                     color="primary"
73
                     color="primary"
62
-                    sx={{ 
63
-                      height: "100%", 
64
-                      borderTopLeftRadius: 0, 
74
+                    sx={{
75
+                      height: "100%",
76
+                      borderTopLeftRadius: 0,
65
                       borderBottomLeftRadius: 0,
77
                       borderBottomLeftRadius: 0,
66
-                      position:"absolute",
67
-                      right:0
78
+                      position: "absolute",
79
+                      right: 0
68
                     }}
80
                     }}
69
                   >
81
                   >
70
                     Subscribe
82
                     Subscribe

+ 1
- 0
src/components/PageTitle/PageTitle.jsx View File

36
       {/* Title */}
36
       {/* Title */}
37
       <Typography
37
       <Typography
38
         variant="h3"
38
         variant="h3"
39
+        className="main-title"
39
         sx={{
40
         sx={{
40
           position: "relative",
41
           position: "relative",
41
           zIndex: 2,
42
           zIndex: 2,

+ 11
- 9
src/components/ProductDetails/ProductDetails.jsx View File

40
     if (!isEmptyObject(product)) {
40
     if (!isEmptyObject(product)) {
41
 
41
 
42
       console.log("Product: ", product)
42
       console.log("Product: ", product)
43
-      
43
+
44
 
44
 
45
       let productVariants = product?.variants
45
       let productVariants = product?.variants
46
 
46
 
47
       // get all variant type
47
       // get all variant type
48
       if (!productVariants || productVariants?.length == 0) return
48
       if (!productVariants || productVariants?.length == 0) return
49
-      
49
+
50
       // we want to get the title for each variant
50
       // we want to get the title for each variant
51
       const uniqueOptions = {};
51
       const uniqueOptions = {};
52
       productVariants.forEach(variant => {
52
       productVariants.forEach(variant => {
53
-        
53
+
54
         variant.selectedOptions.forEach(option => {
54
         variant.selectedOptions.forEach(option => {
55
           if (!uniqueOptions[option.name]) {
55
           if (!uniqueOptions[option.name]) {
56
             uniqueOptions[option.name] = new Set();
56
             uniqueOptions[option.name] = new Set();
107
 
107
 
108
   const handleVariantClick = (name, value) => {
108
   const handleVariantClick = (name, value) => {
109
 
109
 
110
-    
110
+
111
 
111
 
112
     setVariantSelection({ ...variantSelection, [name]: value })
112
     setVariantSelection({ ...variantSelection, [name]: value })
113
 
113
 
135
         }
135
         }
136
       }
136
       }
137
 
137
 
138
-      debugger
139
-
140
-
141
       return newVariantSelection
138
       return newVariantSelection
142
 
139
 
143
     })
140
     })
229
         </Box>
226
         </Box>
230
 
227
 
231
         {/* Section 2: Variants */}
228
         {/* Section 2: Variants */}
232
-        <Box>
229
+        <Box >
233
 
230
 
234
           {variants.map(({ name, options }, index) => {
231
           {variants.map(({ name, options }, index) => {
235
 
232
 
239
                   {name}
236
                   {name}
240
                 </Typography>
237
                 </Typography>
241
 
238
 
242
-                <Box display="flex" gap={2} sx={{ mb: 2 }}>
239
+                <Box sx={{
240
+                  display: "flex",
241
+                  flexWrap: "wrap",
242
+                  
243
+                  mb: 2
244
+                }} gap={2}>
243
                   {options?.map((value) => (
245
                   {options?.map((value) => (
244
                     <Button
246
                     <Button
245
                       key={value}
247
                       key={value}

+ 12
- 5
src/components/ProductType/ProductType.jsx View File

1
 import React from 'react';
1
 import React from 'react';
2
 import { Box, Button, Typography } from '@mui/material';
2
 import { Box, Button, Typography } from '@mui/material';
3
 
3
 
4
-const ProductType = ({title, link, img_url}) => {
4
+const ProductType = ({ title, img_url }) => {
5
   return (
5
   return (
6
     <Box
6
     <Box
7
       sx={{
7
       sx={{
11
         paddingTop: '600px', // This sets the height based on top padding
11
         paddingTop: '600px', // This sets the height based on top padding
12
         backgroundImage: `url(${img_url})`,
12
         backgroundImage: `url(${img_url})`,
13
         overflow: 'hidden',
13
         overflow: 'hidden',
14
-        backgroundSize:'cover',
14
+        backgroundSize: 'cover',
15
         backgroundPosition: 'center center'
15
         backgroundPosition: 'center center'
16
       }}
16
       }}
17
     >
17
     >
30
           color: '#fff', // Text and button color for visibility
30
           color: '#fff', // Text and button color for visibility
31
         }}
31
         }}
32
       >
32
       >
33
-        <Typography variant="h5" gutterBottom sx={{fontWeight:"600", letterSpacing:7}}>
34
-          {title}
33
+        <Typography variant="h5" gutterBottom sx={{ fontWeight: "600", letterSpacing: 7 }}>
34
+          {title?.toUpperCase()}
35
         </Typography>
35
         </Typography>
36
-        <Button variant="contained" color="primary" onClick={()=>{ window.location.href = link }}>
36
+        <Button
37
+          variant="contained"
38
+          color="primary"
39
+          onClick={() => {
40
+            sessionStorage.setItem('amber-select-product-type', title)
41
+            sessionStorage.removeItem('amber-select-collection')
42
+            window.location.href = '/products'
43
+          }}>
37
           SHOP NOW
44
           SHOP NOW
38
         </Button>
45
         </Button>
39
       </Box>
46
       </Box>

+ 10
- 0
src/index.css View File

3
   src: url(./assets/fonts/ProximaNova-Regular.otf);
3
   src: url(./assets/fonts/ProximaNova-Regular.otf);
4
 }
4
 }
5
 
5
 
6
+@font-face {
7
+  font-family: 'BigCalson';
8
+  src: url(./assets/fonts/BigCaslonFB-Regular.ttf);
9
+}
10
+
6
 /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
11
 /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
7
 
12
 
8
 /* Document
13
 /* Document
385
   scrollbar-color: #95AAC5 #FFF; /* Thumb color and track color */
390
   scrollbar-color: #95AAC5 #FFF; /* Thumb color and track color */
386
 }
391
 }
387
 
392
 
393
+.main-title{
394
+  font-family: 'BigCalson' !important;
395
+  font-weight: 100;
396
+}
397
+
388
 /*LOADER*/
398
 /*LOADER*/
389
 /* HTML: <div class="loader"></div> */
399
 /* HTML: <div class="loader"></div> */
390
 .loader {
400
 .loader {

+ 3
- 3
src/pages/Home.jsx View File

62
         <Box sx={{ flexGrow: 1, mt: 5 }}>
62
         <Box sx={{ flexGrow: 1, mt: 5 }}>
63
           <Grid container spacing={2}>
63
           <Grid container spacing={2}>
64
             <Grid size={12}>
64
             <Grid size={12}>
65
-              <ProductType title={'CLOTHING'} link={'/collection/clothing'} img_url={AmberClothing}/>
65
+              <ProductType title={'Apparel'} img_url={AmberClothing}/>
66
             </Grid>
66
             </Grid>
67
             <Grid size={{xs:12, md:6}}>
67
             <Grid size={{xs:12, md:6}}>
68
-              <ProductType title={'BEAUTY'} link={'/collection/beauty'} img_url={AmberBeautyWallpaper}/>
68
+              <ProductType title={'Beauty'} img_url={AmberBeautyWallpaper}/>
69
             </Grid>
69
             </Grid>
70
             <Grid size={{xs:12, md:6}}>
70
             <Grid size={{xs:12, md:6}}>
71
-              <ProductType title={'HOME'} link={'/collection/home'} img_url={AmberHomeWallpaper} />
71
+              <ProductType title={'Home'} img_url={AmberHomeWallpaper} />
72
             </Grid>
72
             </Grid>
73
           </Grid>
73
           </Grid>
74
         </Box>
74
         </Box>

+ 0
- 9
src/pages/Newsletter.jsx View File

1
-import React from 'react'
2
-
3
-const Newsletter = () => {
4
-  return (
5
-    <div>Newsletter</div>
6
-  )
7
-}
8
-
9
-export default Newsletter

+ 1
- 9
src/pages/Products/Product.jsx View File

58
         lg: 10
58
         lg: 10
59
       }
59
       }
60
     }}>
60
     }}>
61
-      <Grid container spacing={0} sx={{ mt: 15, mb:5 }}>
62
-
63
-        <Grid size={12} sx={{ backgroundColor: "#000", textAlign:"center", display:{xs:"block", md:"none"} }}>
64
-          <img src={logoSrc} alt="Logo"
65
-            style={{
66
-              width: 150,
67
-              height: 50
68
-            }} />
69
-        </Grid>
61
+      <Grid container spacing={0} sx={{ mt: 10, mb:5 }}>
70
 
62
 
71
         <Grid size={{ xs: 12, md: 6 }}>
63
         <Grid size={{ xs: 12, md: 6 }}>
72
           <Box sx={{ paddingRight: 1 }}>
64
           <Box sx={{ paddingRight: 1 }}>

Loading…
Cancel
Save