瀏覽代碼

ui correction

master
azri 3 週之前
父節點
當前提交
f86862501f

二進制
src/assets/fonts/ProximaNova-Regular.otf 查看文件


二進制
src/assets/images/amberlogo.png 查看文件


二進制
src/assets/images/amberlogofooter.png 查看文件


二進制
src/assets/images/newsletterwallpaper.jpg 查看文件


+ 7
- 5
src/components/Carousel/Carousel.jsx 查看文件

@@ -32,6 +32,7 @@ const Carousel = () => {
32 32
         alignItems: "center",
33 33
         justifyContent: "center",
34 34
         width: "100%",
35
+        objectPosition:"top center",
35 36
         height: "100vh",
36 37
         overflow: "hidden",
37 38
       }}
@@ -45,13 +46,14 @@ const Carousel = () => {
45 46
           sx={{
46 47
             width: "100%",
47 48
             height: "100%",
48
-            objectFit: "cover",
49
+            objectFit:"cover",
50
+            objectPosition:"center center",
49 51
             display: index === currentIndex ? "block" : "none",
50 52
           }}
51 53
         />
52 54
       ))}
53 55
 
54
-      <IconButton
56
+      {/* <IconButton
55 57
         onClick={handlePrev}
56 58
         sx={{
57 59
           position: "absolute",
@@ -64,9 +66,9 @@ const Carousel = () => {
64 66
         }}
65 67
       >
66 68
         <ArrowBackIosIcon />
67
-      </IconButton>
69
+      </IconButton> */}
68 70
 
69
-      <IconButton
71
+      {/* <IconButton
70 72
         onClick={handleNext}
71 73
         sx={{
72 74
           position: "absolute",
@@ -79,7 +81,7 @@ const Carousel = () => {
79 81
         }}
80 82
       >
81 83
         <ArrowForwardIosIcon />
82
-      </IconButton>
84
+      </IconButton> */}
83 85
     </Box>
84 86
   );
85 87
 };

+ 7
- 4
src/components/CategoryList/CategoryList.jsx 查看文件

@@ -14,15 +14,13 @@ const CategoryList = ({ productType }) => {
14 14
       setCategorys([...categorys, ...data])
15 15
     })
16 16
 
17
-
18
-
19 17
   }, [])
20 18
 
21 19
 
22 20
   return (
23 21
     <Box sx={{ flexGrow: 1, mt: 10 }}>
24 22
 
25
-      {categorys.length > 0 && <Typography variant="h4" sx={{ textAlign: "center", mb: 5, fontWeight: "bolder" }}>SHOP BY CATEGORY</Typography>}
23
+      {categorys.length > 0 && <Typography variant="h4" sx={{ textAlign: "center", mb: 5}}>SHOP BY CATEGORY</Typography>}
26 24
 
27 25
       <Box
28 26
         display="flex"
@@ -33,13 +31,18 @@ const CategoryList = ({ productType }) => {
33 31
       >
34 32
         {categorys.map((label, index) => (
35 33
           <Button 
34
+           sx={{
35
+            py:2,
36
+            px:4,
37
+            
38
+           }}
36 39
             onClick={()=>{
37 40
               sessionStorage.removeItem('amber-select-collection')
38 41
               sessionStorage.setItem('amber-select-category', label)
39 42
               window.location.href = "/products" 
40 43
             }}
41 44
             key={index} variant="contained" color="primary">
42
-            {label}
45
+            <Typography variant="body1" sx={{fontWeight:"bold"}}>{label}</Typography>
43 46
           </Button>
44 47
         ))}
45 48
         

+ 1
- 1
src/components/CollectionList/CollectionList.jsx 查看文件

@@ -20,7 +20,7 @@ const CollectionList = ({ productType }) => {
20 20
   return (
21 21
     <Box sx={{ flexGrow: 1, mt: 10 }}>
22 22
 
23
-      { collections.length > 0 && <Typography variant="h4" sx={{textAlign:"center", mb:5, fontWeight:"bolder"}}>COLLECTIONS</Typography>}
23
+      { collections.length > 0 && <Typography variant="h4" sx={{textAlign:"center", mb:5}}>COLLECTIONS</Typography>}
24 24
 
25 25
       <Grid container spacing={2}>
26 26
 

+ 4
- 3
src/components/Footer/Footer.jsx 查看文件

@@ -1,6 +1,6 @@
1 1
 import React from 'react';
2 2
 import { Box, Typography, TextField, Button, InputAdornment } from '@mui/material';
3
-import logoSrc from "../../assets/svg/logofooter.svg";
3
+import logoSrc from "../../assets/images/amberlogofooter.png";
4 4
 import Grid from '@mui/material/Grid2';
5 5
 
6 6
 const Footer = () => {
@@ -20,7 +20,8 @@ const Footer = () => {
20 20
       <img src={logoSrc} alt="Logo"
21 21
         style={{
22 22
           width: 150,
23
-          height: 50,
23
+          height: 23,
24
+          marginBottom: 25
24 25
         }}
25 26
       />
26 27
 
@@ -103,7 +104,7 @@ const Footer = () => {
103 104
               InputProps={{
104 105
                 startAdornment: (
105 106
                   <InputAdornment position="end">
106
-                    <Button variant='contained' sx={{ mr: 2 }}>
107
+                    <Button variant='contained' sx={{position:"absolute", right:0, height:"100%" }}>
107 108
                       Subscribe
108 109
                     </Button>
109 110
                   </InputAdornment>

+ 2
- 2
src/components/Navbar/Navbar.jsx 查看文件

@@ -8,7 +8,7 @@ import Header from "../Header";
8 8
 import SearchIcon from "@mui/icons-material/Search";
9 9
 import LocalMallIcon from '@mui/icons-material/LocalMall';
10 10
 import AccountCircleIcon from "@mui/icons-material/AccountCircle";
11
-import logoSrc from "../../assets/svg/logo.svg";
11
+import logoSrc from "../../assets/images/amberlogo.png";
12 12
 import { styled } from '@mui/material/styles';
13 13
 import { MenuItem, Select, FormControl, Badge, Typography } from '@mui/material';
14 14
 import MobileNav from "./components/MobileNav";
@@ -161,7 +161,7 @@ const Navbar = () => {
161 161
               <img src={logoSrc} alt="Logo"
162 162
                 style={{
163 163
                   width: 150,
164
-                  height: 50,
164
+                  height: 25,
165 165
                 }} />
166 166
             </a>
167 167
           </Box>

+ 2
- 2
src/components/Navbar/components/MobileNav/MobileNav.jsx 查看文件

@@ -1,6 +1,6 @@
1 1
 import React from "react";
2 2
 import { Drawer, Box, List, ListItem, ListItemButton, ListItemText } from "@mui/material";
3
-import logoSrc from "../../../../assets/svg/logo.svg";
3
+import logoSrc from "../../../../assets/images/amberlogo.png";
4 4
 
5 5
 const MobileNav = ({ open, onClose, menu = [] }) => {
6 6
   return (
@@ -30,7 +30,7 @@ const MobileNav = ({ open, onClose, menu = [] }) => {
30 30
             alt="Logo"
31 31
             style={{
32 32
               width: 150,
33
-              height: 50,
33
+              height: 25,
34 34
             }}
35 35
           />
36 36
         </a>

+ 10
- 2
src/components/NewsLetter/NewsLetter.jsx 查看文件

@@ -1,4 +1,5 @@
1 1
 import React from 'react';
2
+import bgImage from "../../assets/images/newsletterwallpaper.jpg"
2 3
 import { Box, Button, TextField, InputAdornment, Typography } from '@mui/material';
3 4
 
4 5
 
@@ -11,6 +12,7 @@ const NewsLetter = () => {
11 12
         width: '100%',
12 13
         height: 0,
13 14
         paddingTop: '600px', // This sets the height based on top padding
15
+        backgroundImage:`url(${bgImage})`,
14 16
         overflow: 'hidden',
15 17
         display: "flex"
16 18
       }}
@@ -50,9 +52,15 @@ const NewsLetter = () => {
50 52
                   <Button
51 53
                     variant="contained"
52 54
                     color="primary"
53
-                    sx={{ height: "100%", borderTopLeftRadius: 0, borderBottomLeftRadius: 0 }}
55
+                    sx={{ 
56
+                      height: "100%", 
57
+                      borderTopLeftRadius: 0, 
58
+                      borderBottomLeftRadius: 0,
59
+                      position:"absolute",
60
+                      right:0
61
+                    }}
54 62
                   >
55
-                    Send
63
+                    Subscribe
56 64
                   </Button>
57 65
                 </InputAdornment>
58 66
               )

+ 25
- 10
src/components/ProductList/ProductList.jsx 查看文件

@@ -124,10 +124,10 @@ const ProductList = ({ size = 99999 }) => {
124 124
         (product) => {
125 125
 
126 126
           if(collection == 'all'){
127
-            debugger
127
+            
128 128
             return product.productType === productType
129 129
           } else {
130
-            debugger
130
+            
131 131
             return product.productType === productType && product.collections.nodes.some(data => data.title === collection)
132 132
           }
133 133
 
@@ -162,7 +162,7 @@ const ProductList = ({ size = 99999 }) => {
162 162
   const renderProduct = (id, img_url, title, collection, price, currency, extra_desc) => {
163 163
 
164 164
     return (
165
-      <Grid item size={{ xs: 6, sm: 6, md: 3 }}>
165
+      <Grid item size={{ xs: 6, sm: 6, md: 4 }}>
166 166
         <Box
167 167
           onClick={() => { window.location.href = `/products/${id}` }}
168 168
           sx={{
@@ -188,16 +188,16 @@ const ProductList = ({ size = 99999 }) => {
188 188
           </Button> */}
189 189
 
190 190
           <Box sx={{ py: 5 }}>
191
-            <Typography variant="body2" >
191
+            <Typography variant="body1" sx={{fontWeight:"400", mb:1}}>
192 192
               {collection}
193 193
             </Typography>
194
-            <Typography variant="h5" sx={{ fontWeight: "bolder" }}>
194
+            <Typography variant="h4" sx={{ fontWeight: "bolder", mb:1 }}>
195 195
               {title}
196 196
             </Typography>
197
-            <Typography variant="body" >
197
+            <Typography variant="body1" sx={{fontWeight:"400", mb:1}}>
198 198
               {`${currency} ${parseFloat(price).toFixed(2)}`}
199 199
             </Typography>
200
-            <Typography variant="body2" sx={{ mt: 2 }}>
200
+            <Typography variant="body1" sx={{ mt: 2 }}>
201 201
               {extra_desc}
202 202
             </Typography>
203 203
           </Box>
@@ -214,7 +214,7 @@ const ProductList = ({ size = 99999 }) => {
214 214
         sx={{
215 215
           display: "flex",
216 216
           justifyContent: "space-between",
217
-          py:1,
217
+          py:0,
218 218
           flexDirection:{
219 219
             xs:"column",
220 220
             sm:"row",
@@ -249,7 +249,12 @@ const ProductList = ({ size = 99999 }) => {
249 249
               onChange={(event) => {
250 250
                 setCategory(event.target.value);
251 251
               }}
252
-              input={<BootstrapInput />}
252
+              sx={{
253
+                '& .MuiSelect-select':{
254
+                  border:"none"
255
+                }
256
+              }}
257
+              input={<BootstrapInput  />}
253 258
               name="type"
254 259
             >
255 260
               <MenuItem value={'all'}>All</MenuItem>
@@ -264,6 +269,11 @@ const ProductList = ({ size = 99999 }) => {
264 269
               onChange={(event) => {
265 270
                 setCollection(event.target.value);
266 271
               }}
272
+              sx={{
273
+                '& .MuiSelect-select':{
274
+                  border:"none"
275
+                }
276
+              }}
267 277
               input={<BootstrapInput />}
268 278
               name="type"
269 279
             >
@@ -279,6 +289,11 @@ const ProductList = ({ size = 99999 }) => {
279 289
               onChange={(event) => {
280 290
                 setSort(event.target.value);
281 291
               }}
292
+              sx={{
293
+                '& .MuiSelect-select':{
294
+                  border:"none"
295
+                }
296
+              }}
282 297
               input={<BootstrapInput />}
283 298
               name="sort"
284 299
             >
@@ -293,7 +308,7 @@ const ProductList = ({ size = 99999 }) => {
293 308
 
294 309
       {/* LIST */}
295 310
       <Box sx={{ mb: 5 }}>
296
-        <Grid container spacing={1} columns={12}>
311
+        <Grid container spacing={0.3} columns={12}>
297 312
           {filteredProducts.map((product, index) => {
298 313
 
299 314
             let { id, title, compareAtPriceRange, images, collections } = product

+ 5
- 5
src/components/ProductSelected/ProductSelected.jsx 查看文件

@@ -43,17 +43,17 @@ const ProductSelected = () => {
43 43
             NEW
44 44
           </Button> */}
45 45
 
46
-          <Box sx={{ py: 5 }}>
47
-            <Typography variant="body2" >
46
+          <Box sx={{ pb: 5, pt:3 }}>
47
+            <Typography variant="body1" sx={{fontWeight:"400", mb:1}}>
48 48
               {collection}
49 49
             </Typography>
50
-            <Typography variant="h5" sx={{ fontWeight: "bolder" }}>
50
+            <Typography variant="h5" sx={{ fontWeight: "bolder", mb:1}}>
51 51
               {title}
52 52
             </Typography>
53
-            <Typography variant="body" >
53
+            <Typography variant="body1" sx={{fontWeight:"400"}}>
54 54
               {`${currency} ${parseFloat(price).toFixed(2)}`}
55 55
             </Typography>
56
-            <Typography variant="body2" sx={{ mt: 2 }}>
56
+            <Typography variant="body1" sx={{ mt: 2 }}>
57 57
               {extra_desc}
58 58
             </Typography>
59 59
           </Box>

+ 2
- 3
src/components/SocialMedia/SocialMedia.jsx 查看文件

@@ -16,9 +16,8 @@ const SocialMedia = () => {
16 16
       sx={{
17 17
         display: 'flex',
18 18
         flexDirection: { xs: 'column', sm: 'row' }, // Stack on small screens
19
-        justifyContent: { xs: 'center', sm: 'space-around' }, // Adjust spacing
20
-        alignItems: 'center',
21
-        gap: { xs: 2, sm: 5 }, // Smaller gap on small screens
19
+        justifyContent: 'center',
20
+        gap: 8,
22 21
         padding: 2,
23 22
         py: 4,
24 23
         borderTop: '1px solid #CFCFCF',

+ 9
- 2
src/index.css 查看文件

@@ -1,4 +1,7 @@
1
-
1
+@font-face {
2
+  font-family: 'Proxima-Nova';
3
+  src: url(./assets/fonts/ProximaNova-Regular.otf);
4
+}
2 5
 
3 6
 /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
4 7
 
@@ -24,6 +27,7 @@
24 27
   
25 28
   body {
26 29
     margin: 0;
30
+    font-family: 'Proxima-Nova', sans-serif;
27 31
   }
28 32
   
29 33
   /**
@@ -348,4 +352,7 @@
348 352
   
349 353
   [hidden] {
350 354
     display: none;
351
-  }
355
+  }
356
+
357
+
358
+

+ 2
- 2
src/pages/Home.jsx 查看文件

@@ -68,7 +68,7 @@ const Home = () => {
68 68
         lg: 750,
69 69
       }} />
70 70
 
71
-      <Box sx={{
71
+      {/* <Box sx={{
72 72
         px: {
73 73
           xs: 2,
74 74
           md: 12,
@@ -98,7 +98,7 @@ const Home = () => {
98 98
           </Grid>
99 99
         </Box>
100 100
 
101
-      </Box>
101
+      </Box> */}
102 102
 
103 103
       <NewsLetter />
104 104
 

Loading…
取消
儲存