Kaynağa Gözat

change font and newsletter

master
azri 1 hafta önce
ebeveyn
işleme
cba0d37dac

+ 0
- 3
src/App.js Dosyayı Görüntüle

@@ -3,7 +3,6 @@ import { BrowserRouter, Routes, Route } from 'react-router-dom';
3 3
 import Home from './pages/Home';
4 4
 import Cart from './pages/Cart';
5 5
 import Login from './pages/Login';
6
-import Newsletter from './pages/Newsletter';
7 6
 import Products from './pages/Products';
8 7
 import Product from './pages/Products/Product';
9 8
 import Checkout from './pages/Checkout';
@@ -62,8 +61,6 @@ function App() {
62 61
             <Route path=':pid' element={<Product />} />
63 62
 
64 63
           </Route>
65
-
66
-          <Route path='/newsletter' element={<Newsletter />} />
67 64
           <Route path='/cart' element={<Cart />} />
68 65
           <Route path='/checkout' element={<Checkout />} />
69 66
 

BIN
src/assets/fonts/BigCaslonFB-Regular.ttf Dosyayı Görüntüle


+ 14
- 4
src/components/ImageView/ImageView.jsx Dosyayı Görüntüle

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

+ 3
- 2
src/components/Navbar/Navbar.jsx Dosyayı Görüntüle

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

+ 25
- 13
src/components/NewsLetter/NewsLetter.jsx Dosyayı Görüntüle

@@ -12,9 +12,11 @@ const NewsLetter = () => {
12 12
         width: '100%',
13 13
         height: 0,
14 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 18
         overflow: 'hidden',
17
-        display: "flex"
19
+        display: "flex",
18 20
       }}
19 21
     >
20 22
       <Box
@@ -33,13 +35,13 @@ const NewsLetter = () => {
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 41
           px: 15,
40 42
           py: 10,
41
-          textAlign:"center", 
42
-          color:"black" 
43
+          textAlign: "center",
44
+          color: "black"
43 45
         }}>
44 46
 
45 47
           <Typography variant='h3'>
@@ -52,19 +54,29 @@ const NewsLetter = () => {
52 54
             label="Enter your email address"
53 55
             variant="outlined"
54 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 68
             InputProps={{
57 69
               endAdornment: (
58 70
                 <InputAdornment position="end">
59 71
                   <Button
60 72
                     variant="contained"
61 73
                     color="primary"
62
-                    sx={{ 
63
-                      height: "100%", 
64
-                      borderTopLeftRadius: 0, 
74
+                    sx={{
75
+                      height: "100%",
76
+                      borderTopLeftRadius: 0,
65 77
                       borderBottomLeftRadius: 0,
66
-                      position:"absolute",
67
-                      right:0
78
+                      position: "absolute",
79
+                      right: 0
68 80
                     }}
69 81
                   >
70 82
                     Subscribe

+ 1
- 0
src/components/PageTitle/PageTitle.jsx Dosyayı Görüntüle

@@ -36,6 +36,7 @@ const PageTitle = ({title = "", image = null}) => {
36 36
       {/* Title */}
37 37
       <Typography
38 38
         variant="h3"
39
+        className="main-title"
39 40
         sx={{
40 41
           position: "relative",
41 42
           zIndex: 2,

+ 11
- 9
src/components/ProductDetails/ProductDetails.jsx Dosyayı Görüntüle

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

+ 12
- 5
src/components/ProductType/ProductType.jsx Dosyayı Görüntüle

@@ -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, link, img_url}) => {
4
+const ProductType = ({ title, img_url }) => {
5 5
   return (
6 6
     <Box
7 7
       sx={{
@@ -11,7 +11,7 @@ const ProductType = ({title, link, img_url}) => {
11 11
         paddingTop: '600px', // This sets the height based on top padding
12 12
         backgroundImage: `url(${img_url})`,
13 13
         overflow: 'hidden',
14
-        backgroundSize:'cover',
14
+        backgroundSize: 'cover',
15 15
         backgroundPosition: 'center center'
16 16
       }}
17 17
     >
@@ -30,10 +30,17 @@ const ProductType = ({title, link, img_url}) => {
30 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 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 44
           SHOP NOW
38 45
         </Button>
39 46
       </Box>

+ 10
- 0
src/index.css Dosyayı Görüntüle

@@ -3,6 +3,11 @@
3 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 11
 /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
7 12
 
8 13
 /* Document
@@ -385,6 +390,11 @@
385 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 398
 /*LOADER*/
389 399
 /* HTML: <div class="loader"></div> */
390 400
 .loader {

+ 3
- 3
src/pages/Home.jsx Dosyayı Görüntüle

@@ -62,13 +62,13 @@ const Home = () => {
62 62
         <Box sx={{ flexGrow: 1, mt: 5 }}>
63 63
           <Grid container spacing={2}>
64 64
             <Grid size={12}>
65
-              <ProductType title={'CLOTHING'} link={'/collection/clothing'} img_url={AmberClothing}/>
65
+              <ProductType title={'Apparel'} img_url={AmberClothing}/>
66 66
             </Grid>
67 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 69
             </Grid>
70 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 72
             </Grid>
73 73
           </Grid>
74 74
         </Box>

+ 0
- 9
src/pages/Newsletter.jsx Dosyayı Görüntüle

@@ -1,9 +0,0 @@
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 Dosyayı Görüntüle

@@ -58,15 +58,7 @@ const Product = () => {
58 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 63
         <Grid size={{ xs: 12, md: 6 }}>
72 64
           <Box sx={{ paddingRight: 1 }}>

Loading…
İptal
Kaydet