Bläddra i källkod

done mobile view

master
azri 6 dagar sedan
förälder
incheckning
5bbfe458d5

+ 5
- 5
src/components/BillingForm/BillingForm.jsx Visa fil

@@ -169,7 +169,7 @@ const BillingForm = () => {
169 169
         p: 2,
170 170
         mb: 10
171 171
       }}>
172
-        <Grid size={6}>
172
+        <Grid size={{xs:12, md:6}} sx={{mb:{xs:10, md:0}}}>
173 173
           <Typography variant="body2" sx={{ fontWeight: "bold", mb: 5 }}>SHIPPING ADDRESS</Typography>
174 174
           <Box sx={{ display: "flex", flexDirection: "column" }}>
175 175
             <Typography variant="body2" sx={{ fontWeight: "400" }}>Mr. David Olson</Typography>
@@ -181,7 +181,7 @@ const BillingForm = () => {
181 181
             <Link sx={{ color: "black", textDecoration: "underline", fontSize: 15 }}>CHANGE SHIPPING ADDRESS</Link>
182 182
           </Box>
183 183
         </Grid>
184
-        <Grid size={6}>
184
+        <Grid size={{xs:12, md:6}}>
185 185
           <Typography variant="body2" sx={{ fontWeight: "bold", mb: 5 }}>BILLING ADDRESS</Typography>
186 186
           <Box sx={{ display: "flex", flexDirection: "column" }}>
187 187
             <Typography variant="body2" sx={{ fontWeight: "400" }}>Mr. David Olson</Typography>
@@ -204,13 +204,13 @@ const BillingForm = () => {
204 204
         p: 2,
205 205
         mb: 10
206 206
       }}>
207
-        <Grid size={6}>
207
+        <Grid size={{xs:12, md:6}} sx={{mb:{xs:10, md:0}}}>
208 208
           <Typography variant="body2" sx={{ fontWeight: "bold", mb: 5 }}>EXPRESS DELIVERY (Free)</Typography>
209 209
           <Box sx={{ display: "flex", flexDirection: "column" }}>
210 210
             <Typography variant="body2" sx={{ fontWeight: "400" }}>Delivered in 3-4 business days</Typography>
211 211
           </Box>
212 212
         </Grid>
213
-        <Grid size={6}>
213
+        <Grid size={{xs:12, md:6}}>
214 214
           <Typography variant="body2" sx={{ fontWeight: "bold", mb: 5 }}>BILLING ADDRESS</Typography>
215 215
           <Box sx={{ display: "flex", flexDirection: "column" }}>
216 216
             <Typography variant="body2" sx={{ fontWeight: "400", mb: 5 }}>Caibre Premium Packaging</Typography>
@@ -228,7 +228,7 @@ const BillingForm = () => {
228 228
         p: 2,
229 229
         mb: 5
230 230
       }}>
231
-        <Grid size={6}>
231
+        <Grid size={{xs:12, md:6}}>
232 232
           <Typography variant="body2" sx={{ fontWeight: "400", mb: 5 }}>PAYMENT METHOD</Typography>
233 233
           <Grid container spacing={2}>
234 234
 

+ 5
- 4
src/components/ConfirmOrder/ConfirmOrder.jsx Visa fil

@@ -161,10 +161,10 @@ const ConfirmOrder = () => {
161 161
 
162 162
       <Box>
163 163
         <Grid container>
164
-          <Grid size={6} sx={{ borderRight: "1px solid rgba(0,0,0,0.2)" }}>
164
+          <Grid size={{xs:12, md:6}} sx={{ borderRight: "1px solid rgba(0,0,0,0.2)", mb:{xs:2, md:0} }}>
165 165
             <Typography variant='body1' sx={{ fontWeight: "500", mb: 5 }}>PAYMENT METHOD</Typography>
166
-            <Box sx={{ display: "flex", flexDirection: "row" }}>
167
-              <Typography variant='body2' sx={{ mr: 5 }}>PAYMENT METHOD</Typography>
166
+            <Box sx={{ display: "flex", flexDirection: {xs:"column", md:"row"} }}>
167
+              <Typography variant='body2' sx={{ mr: 5 }}>Credit Card Number</Typography>
168 168
               <Typography variant="body2" sx={{ display: 'flex' }}>
169 169
                 {[...Array(12)].map((_, index) => (
170 170
                   <FiberManualRecordIcon sx={{ fontSize: 'inherit', verticalAlign: 'middle', mr: ((index + 1) % 4 == 0) ? 2 : 0 }} />
@@ -173,8 +173,9 @@ const ConfirmOrder = () => {
173 173
               </Typography>
174 174
             </Box>
175 175
           </Grid>
176
-          <Grid size={6}>
176
+          <Grid size={{xs:12, md:6}} sx={{pl:{xs:0, md:2}, pb:2}}>
177 177
             <Typography variant='body1' sx={{ fontWeight: "500", mb: 5 }}>SHIPPING DETAILS</Typography>
178
+            <Typography variant='body2' sx={{mb:3}}>Your will receive your order in 3-4 business days</Typography>
178 179
             <Button
179 180
               variant="contained"
180 181
               color="common.black"

+ 4
- 2
src/components/Feature/Feature.jsx Visa fil

@@ -17,10 +17,12 @@ const Feature = () => {
17 17
     <Box
18 18
       sx={{
19 19
         display: 'flex',
20
+        flexDirection: { xs: 'column', sm: 'row' }, // Stack on small screens, horizontal on larger screens
20 21
         justifyContent: 'space-between',
21 22
         alignItems: 'center',
22 23
         padding: 2,
23
-        mt:5
24
+        mt: 5,
25
+        gap: { xs: 4, sm: 0 }, // Add spacing between items on smaller screens
24 26
       }}
25 27
     >
26 28
       {features.map((feature, index) => (
@@ -32,7 +34,7 @@ const Feature = () => {
32 34
             alignItems: 'center',
33 35
             textAlign: 'center',
34 36
             flex: 1,
35
-            borderRight: index < features.length - 1 ? '1px solid #CFCFCF' : 'none', // Add right border except for the last item
37
+            borderRight: { sm: index < features.length - 1 ? '1px solid #CFCFCF' : 'none' }, // Only show right border on larger screens
36 38
             padding: 2,
37 39
           }}
38 40
         >

+ 2
- 2
src/components/Filter/Filter.jsx Visa fil

@@ -84,7 +84,7 @@ const Filter = () => {
84 84
                     </Select>
85 85
                 </FormControl>
86 86
 
87
-                <FormControl sx={{ m: 1, display:"flex", flexDirection:"row" }} variant="standard">
87
+                <FormControl sx={{ m: 1, display:{xs:"none", sm:"none", md:"flex" }, flexDirection:"row" }} variant="standard">
88 88
                     <Typography variant="body2" sx={{mr:1, my:"auto"}}>Sort By</Typography>
89 89
                     <Select
90 90
                         labelId="demo-customized-select-label"
@@ -99,7 +99,7 @@ const Filter = () => {
99 99
                     </Select>
100 100
                 </FormControl>
101 101
 
102
-                <FormControl sx={{ m: 1, display:"flex", flexDirection:"row" }} variant="standard">
102
+                <FormControl sx={{ m: 1, display:{xs:"none", sm:"none", md:"flex" }, flexDirection:"row" }} variant="standard">
103 103
                     <Typography variant="body2" sx={{mr:1, my:"auto"}}>Show</Typography>
104 104
                     <Select
105 105
                         labelId="demo-customized-select-label"

+ 10
- 5
src/components/Footer/Footer.jsx Visa fil

@@ -9,13 +9,18 @@ const Footer = () => {
9 9
       sx={{
10 10
         backgroundColor: 'background.default',
11 11
         mb: 10,
12
-        mt: 15
12
+        mt: 15,
13
+        px:{
14
+          xs:2,
15
+          md:12,
16
+          lg:20
17
+        }
13 18
       }}
14 19
     >
15 20
 
16 21
       <Grid container spacing={2} justifyContent="space-evenly">
17 22
 
18
-        <Grid item xs={12} sm={6} md={3} sx={{ position: "relative" }}>
23
+        <Grid item size={{xs:12, sm:6, md:3}} sx={{ position: "relative" }}>
19 24
 
20 25
           <Typography variant="h5" sx={{
21 26
             color: 'primary.main', // Use primary color
@@ -34,7 +39,7 @@ const Footer = () => {
34 39
           <Typography variant="body2" sx={{ maxWidth: 250 }}><span style={{ fontWeight: "bold" }}>Address:</span> Lot G-77, Wangsa Walk Mall, Wangsa Avenue, No.9, Jalan Wangsa Perdana 1, Bandar Wangsa Maju, 53300 Kuala Lumpur, Malaysia</Typography>
35 40
         </Grid>
36 41
 
37
-        <Grid item xs={12} sm={6} md={3}>
42
+        <Grid item size={{xs:12, sm:6, md:3}}>
38 43
           <Typography variant="body1" sx={{ fontWeight: "bold", mb: 4 }}>
39 44
             Get Help
40 45
           </Typography>
@@ -57,7 +62,7 @@ const Footer = () => {
57 62
           </nav>
58 63
         </Grid>
59 64
 
60
-        <Grid item xs={12} sm={6} md={3}>
65
+        <Grid item size={{xs:12, sm:6, md:3}}>
61 66
           <Typography variant="body1" sx={{ fontWeight: "bold", mb: 4 }}>
62 67
             Popular Categories
63 68
           </Typography>
@@ -82,7 +87,7 @@ const Footer = () => {
82 87
 
83 88
 
84 89
 
85
-        <Grid item xs={12} sm={6} md={3}>
90
+        <Grid item size={{xs:12, sm:6, md:3}}>
86 91
           <Typography variant="body1" sx={{ fontWeight: "bold", mb: 4 }}>
87 92
             Let’s stay in touch
88 93
           </Typography>

+ 72
- 39
src/components/Navbar/Navbar.jsx Visa fil

@@ -14,10 +14,11 @@ import logoSrc from "../../assets/svg/logo.svg";
14 14
 import { styled } from '@mui/material/styles';
15 15
 import { MenuItem, Select, FormControl, Badge } from '@mui/material';
16 16
 import MobileNav from "./components/MobileNav";
17
-import { TrainRounded } from "@mui/icons-material";
18
-
19
-
20
-
17
+import MenuIcon from "@mui/icons-material/Menu";
18
+import CategoryIcon from '@mui/icons-material/Category';
19
+import HomeIcon from '@mui/icons-material/Home';
20
+import BrushIcon from '@mui/icons-material/Brush';
21
+import LoyaltyIcon from '@mui/icons-material/Loyalty';
21 22
 
22 23
 const LanguageSelect = styled(Select)(({ theme }) => ({
23 24
   backgroundColor: 'black',
@@ -57,6 +58,35 @@ const Navbar = () => {
57 58
   const [lastScrollPos, setLastScrollPos] = useState(0);
58 59
   const [language, setLanguage] = useState('English');
59 60
 
61
+  const [open, setOpen] = React.useState(false);
62
+
63
+  const toggleDrawer = (newOpen) => () => {
64
+    setOpen(newOpen);
65
+  };
66
+
67
+  const navItem = [
68
+    {
69
+      title: "DISCOVER",
70
+      link: "/products",
71
+      icon: <CategoryIcon />
72
+    },
73
+    {
74
+      title: "HOME",
75
+      link: "/",
76
+      icon: <HomeIcon />
77
+    },
78
+    {
79
+      title: "BEAUTY",
80
+      link: "/products",
81
+      icon: <BrushIcon />
82
+    },
83
+    {
84
+      title: "SALE",
85
+      link: "/products",
86
+      icon: <LoyaltyIcon />
87
+    }
88
+  ]
89
+
60 90
   const handleChange = (event) => {
61 91
     setLanguage(event.target.value);
62 92
   };
@@ -83,8 +113,8 @@ const Navbar = () => {
83 113
       <AppBar position="fixed"
84 114
         sx={{
85 115
           backgroundColor: {
86
-            xs: "rgba(0,0,0,0)",
87
-            md: "rgba(0,0,0,0.9)",
116
+            xs: showHeader ? "rgba(0,0,0,0)" : "background.black",// somehow the logic for scrolling header is the same so I just gonna use showHeader state
117
+            md: "rgba(0,0,0,0.9)", 
88 118
             lg: "background.black"
89 119
           },
90 120
           boxShadow: {
@@ -109,10 +139,10 @@ const Navbar = () => {
109 139
 
110 140
           {/* Left Section: Logo */}
111 141
           <Box sx={{
112
-            display:{
113
-              xs:"none",
114
-              md:"none",
115
-              lg:"block"
142
+            display: {
143
+              xs: "none",
144
+              md: "none",
145
+              lg: "block"
116 146
             }
117 147
           }}>
118 148
             <img src={logoSrc} alt="Logo"
@@ -122,6 +152,30 @@ const Navbar = () => {
122 152
               }} />
123 153
           </Box>
124 154
 
155
+          {/* SIDEBAR BUTTON */}
156
+          <Box sx={{
157
+            display: {
158
+              xs: "block",
159
+              md: "block",
160
+              lg: "none"
161
+            }
162
+          }}>
163
+
164
+            <IconButton
165
+              onClick={() => setOpen(true)}
166
+              sx={{
167
+                backgroundColor: "transparent",
168
+                color: "white",
169
+                "&:hover": {
170
+                  backgroundColor: "rgba(0, 0, 0, 0.1)",
171
+                },
172
+              }}
173
+            >
174
+              <MenuIcon fontSize="large" />
175
+            </IconButton>
176
+
177
+          </Box>
178
+
125 179
           {/* Center Section: Nav Items */}
126 180
           <Box
127 181
             sx={{
@@ -134,38 +188,16 @@ const Navbar = () => {
134 188
               gap: 2,
135 189
             }}
136 190
           >
137
-            <Button
138
-              color="inherit"
139
-              onClick={() => {
140
-                window.location.href = "/products";
141
-              }}
142
-            >
143
-              DISCOVER
144
-            </Button>
145
-            <Button
146
-              color="inherit"
147
-              onClick={() => {
148
-                window.location.href = "/";
149
-              }}
150
-            >
151
-              HOME
152
-            </Button>
153
-            <Button
154
-              color="inherit"
155
-              onClick={() => {
156
-                window.location.href = "/products";
157
-              }}
158
-            >
159
-              BEAUTY
160
-            </Button>
161
-            <Button
191
+
192
+            {navItem.map(({ title, link }) => (<Button
162 193
               color="inherit"
163 194
               onClick={() => {
164
-                window.location.href = "/products";
195
+                window.location.href = link;
165 196
               }}
166 197
             >
167
-              SALE
168
-            </Button>
198
+              {title}
199
+            </Button>))}
200
+
169 201
           </Box>
170 202
 
171 203
           {/* Right Section: Search and Profile */}
@@ -213,7 +245,8 @@ const Navbar = () => {
213 245
 
214 246
         </Toolbar>
215 247
       </AppBar>
216
-      {/* <MobileNav open={true} menu={[]}/> */}
248
+
249
+      <MobileNav open={open} menu={navItem} onClose={()=>{setOpen(false)}} />
217 250
     </>
218 251
   );
219 252
 };

+ 7
- 19
src/components/Navbar/components/MobileNav/MobileNav.jsx Visa fil

@@ -1,14 +1,12 @@
1 1
 import React from "react";
2 2
 import { Drawer, Box, List, ListItem, ListItemButton, ListItemIcon, ListItemText, Divider } from "@mui/material";
3
-import logoSrc from "../../assets/svg/logo.svg";
4
-import InboxIcon from "@mui/icons-material/Inbox";
5
-import MailIcon from "@mui/icons-material/Mail";
3
+import logoSrc from "../../../../assets/svg/logo.svg";
6 4
 
7
-const MobileNav = ({ open, menu = [] }) => {
5
+const MobileNav = ({ open, onClose, menu = [] }) => {
8 6
   return (
9 7
     <Drawer
10 8
       open={open}
11
-      onClose={() => {}}
9
+      onClose={onClose}
12 10
       sx={{
13 11
         "& .MuiDrawer-paper": {
14 12
           backgroundColor: "black",
@@ -24,7 +22,6 @@ const MobileNav = ({ open, menu = [] }) => {
24 22
           justifyContent: "center",
25 23
           alignItems: "center",
26 24
           height: 80,
27
-          borderBottom: "1px solid white",
28 25
         }}
29 26
       >
30 27
         <img
@@ -40,8 +37,8 @@ const MobileNav = ({ open, menu = [] }) => {
40 37
       {/* Main Navigation */}
41 38
       <Box sx={{ width: 250 }} role="presentation">
42 39
         <List>
43
-          {menu.map((text, index) => (
44
-            <ListItem key={text} disablePadding>
40
+          {menu.map(({title, link, icon}) => (
41
+            <ListItem key={title} disablePadding>
45 42
               <ListItemButton
46 43
                 sx={{
47 44
                   color: "white",
@@ -51,17 +48,8 @@ const MobileNav = ({ open, menu = [] }) => {
51 48
                   },
52 49
                 }}
53 50
               >
54
-                <ListItemIcon
55
-                  sx={{
56
-                    color: "white",
57
-                    "&:hover": {
58
-                      color: "black",
59
-                    },
60
-                  }}
61
-                >
62
-                  {index % 2 === 0 ? <InboxIcon /> : <MailIcon />}
63
-                </ListItemIcon>
64
-                <ListItemText primary={text} />
51
+                {icon}
52
+                <ListItemText sx={{ml:2}} primary={title} />
65 53
               </ListItemButton>
66 54
             </ListItem>
67 55
           ))}

+ 1
- 1
src/components/NewsLetter/NewsLetter.jsx Visa fil

@@ -31,7 +31,7 @@ const NewsLetter = () => {
31 31
         }}
32 32
       >
33 33
 
34
-        <Box sx={{ width: "35%", backgroundColor: "rgba(255,255,255, 0.5)", padding: 10, textAlign:"center", color:"black" }}>
34
+        <Box sx={{ width: {xs:"80%", md:"35%"}, backgroundColor: "rgba(255,255,255, 0.5)", padding: 10, textAlign:"center", color:"black" }}>
35 35
 
36 36
           <Typography variant='h3'>
37 37
             Let's Stay in touch

+ 1
- 1
src/components/ProductHistoryList/ProductHistoryList.jsx Visa fil

@@ -69,7 +69,7 @@ const ProductHistoryList = () => {
69 69
   return (
70 70
     <Box sx={{ mb: 5 }}>
71 71
       <Grid container spacing={1} columns={12}>
72
-        {images.map((image, index) => (<Grid item size={2} key={index}>
72
+        {images.map((image, index) => (<Grid item size={{xs:12, md:2}} key={index}>
73 73
           <Box
74 74
             sx={{
75 75
               overflow: 'hidden',

+ 2
- 6
src/components/ProductList/ProductList.jsx Visa fil

@@ -2,9 +2,7 @@ import React from 'react';
2 2
 import { Box, Typography, Button } from '@mui/material';
3 3
 import Grid from '@mui/material/Grid2';
4 4
 
5
-const ProductList = ({ size }) => {
6
-
7
-
5
+const ProductList = ({ size = 99999 }) => {
8 6
 
9 7
   const images = [
10 8
     {
@@ -64,7 +62,7 @@ const ProductList = ({ size }) => {
64 62
 
65 63
           if (index < size) {
66 64
 
67
-            return <Grid item size={4} key={index}>
65
+            return <Grid item size={{xs:6, sm:6, md:3}} key={index}>
68 66
               <Box
69 67
                 onClick={()=>{ window.location.href = `/products/${image.id}` }}
70 68
                 sx={{
@@ -104,8 +102,6 @@ const ProductList = ({ size }) => {
104 102
                 </Box>
105 103
               </Box>
106 104
             </Grid>
107
-
108
-
109 105
           }
110 106
 
111 107
         })}

+ 6
- 4
src/components/ProductSelected/ProductSelected.jsx Visa fil

@@ -1,11 +1,9 @@
1 1
 import React from 'react';
2
-import { Box, Typography, Button } from '@mui/material';
2
+import { Box, Typography, Button, useMediaQuery } from '@mui/material';
3 3
 import Grid from '@mui/material/Grid2';
4 4
 
5 5
 const ProductSelected = () => {
6 6
 
7
-
8
-
9 7
   const images = [
10 8
     {
11 9
       url: 'https://via.placeholder.com/300',
@@ -37,10 +35,14 @@ const ProductSelected = () => {
37 35
     }
38 36
   ];
39 37
 
38
+  const isMobileScreen = useMediaQuery((theme) => theme.breakpoints.down('sm'))
39
+
40
+  const displayedImages = isMobileScreen ? images.slice(0, 2) : images;
41
+
40 42
   return (
41 43
     <Box sx={{ mb: 5 }}>
42 44
       <Grid container spacing={1} columns={12}>
43
-        {images.map((image, index) => (<Grid item size={3} key={index}>
45
+        {displayedImages.map((image, index) => (<Grid item size={{ xs: 6, md: 3 }} key={index}>
44 46
           <Box
45 47
             sx={{
46 48
               overflow: 'hidden',

+ 1
- 1
src/components/ProductSuggestion/ProductSuggestion.jsx Visa fil

@@ -39,7 +39,7 @@ const ProductSuggestion = () => {
39 39
   return (
40 40
     <Box sx={{ mb: 5 }}>
41 41
       <Grid container spacing={1} columns={12}>
42
-        {images.map((image, index) => (<Grid item size={3} key={index}>
42
+        {images.map((image, index) => (<Grid item size={{xs:12, md:3}} key={index}>
43 43
           <Box
44 44
             sx={{
45 45
               overflow: 'hidden',

+ 42
- 12
src/components/ShippingForm/ShippingForm.jsx Visa fil

@@ -43,8 +43,17 @@ const ShippingForm = () => {
43 43
       }}
44 44
     >
45 45
       <Grid container>
46
-
47
-        <Grid item size={6} sx={{ gap: 3, display: 'flex', flexDirection: 'column' }}>
46
+        {/* Left Column */}
47
+        <Grid
48
+          item
49
+          size={{ xs: 12, md: 6 }}
50
+          sx={{
51
+            gap: 3,
52
+            display: 'flex',
53
+            flexDirection: 'column',
54
+            order: { xs: 2, md: 1 }, // Flip order on xs
55
+          }}
56
+        >
48 57
           <FieldContainer label="Title">
49 58
             <TextField variant="outlined" fullWidth required />
50 59
           </FieldContainer>
@@ -67,18 +76,35 @@ const ShippingForm = () => {
67 76
           </FieldContainer>
68 77
         </Grid>
69 78
 
70
-        <Grid item size={6} sx={{ gap: 3, display: 'flex', flexDirection: 'column', px: 4, height: "100%" }}>
71
-
79
+        {/* Right Column */}
80
+        <Grid
81
+          item
82
+          size={{ xs: 12, md: 6 }}
83
+          sx={{
84
+            gap: 3,
85
+            display: 'flex',
86
+            flexDirection: 'column',
87
+            px: { xs: 0, md: 5 },
88
+            height: '100%',
89
+            py: { xs: 3, md: 0 },
90
+            order: { xs: 1, md: 2 }, // Flip order on xs
91
+          }}
92
+        >
72 93
           <Grid
73 94
             container
74 95
             spacing={2}
75
-            sx={{ position: 'relative', width: '100%', backgroundColor: '#F7FBFF', textAlign: 'center' }}
96
+            sx={{
97
+              position: 'relative',
98
+              width: '100%',
99
+              backgroundColor: '#F7FBFF',
100
+              textAlign: 'center',
101
+            }}
76 102
           >
77 103
             {/* First Section */}
78 104
             <Grid
79 105
               item
80 106
               size={12}
81
-              sx={{ px: 5, py: 3, borderBottom: '1px solid #ddd', mx: "auto" }}
107
+              sx={{ px: 5, py: 3, borderBottom: '1px solid #ddd', mx: 'auto' }}
82 108
             >
83 109
               <Typography variant="h6" sx={{ fontWeight: 500 }}>
84 110
                 SHIPPING RESTRICTIONS AND DUTIES MAY APPLY
@@ -86,18 +112,22 @@ const ShippingForm = () => {
86 112
             </Grid>
87 113
 
88 114
             {/* Second Section */}
89
-            <Grid item size={12} sx={{ px: 5, py: 3, mx: "auto" }}>
115
+            <Grid item size={12} sx={{ px: 5, py: 3, mx: 'auto' }}>
90 116
               <Typography variant="h6" sx={{ fontWeight: 500 }}>
91 117
                 NEED HELP?
92 118
               </Typography>
93
-              <Typography variant="body2" sx={{ mb: 1 }}>CALL US: +44 (0)10 2345 6789</Typography>
94
-              <Typography variant="body2" sx={{ mb: 1 }}>EMAIL CUSTOMER CARE | SHIPPING INFORMATION</Typography>
95
-              <Typography variant="body2" sx={{ mb: 1 }}>RETURNS & EXCHANGES</Typography>
119
+              <Typography variant="body2" sx={{ mb: 1 }}>
120
+                CALL US: +44 (0)10 2345 6789
121
+              </Typography>
122
+              <Typography variant="body2" sx={{ mb: 1 }}>
123
+                EMAIL CUSTOMER CARE | SHIPPING INFORMATION
124
+              </Typography>
125
+              <Typography variant="body2" sx={{ mb: 1 }}>
126
+                RETURNS & EXCHANGES
127
+              </Typography>
96 128
             </Grid>
97 129
           </Grid>
98
-
99 130
         </Grid>
100
-
101 131
       </Grid>
102 132
 
103 133
       <FieldContainer label="Address Line 1">

+ 6
- 5
src/components/SocialMedia/SocialMedia.jsx Visa fil

@@ -15,13 +15,14 @@ const SocialMedia = () => {
15 15
     <Box
16 16
       sx={{
17 17
         display: 'flex',
18
-        justifyContent: 'center',
18
+        flexDirection: { xs: 'column', sm: 'row' }, // Stack on small screens
19
+        justifyContent: { xs: 'center', sm: 'space-around' }, // Adjust spacing
19 20
         alignItems: 'center',
20
-        gap: 5,
21
+        gap: { xs: 2, sm: 5 }, // Smaller gap on small screens
21 22
         padding: 2,
22 23
         py: 4,
23
-        borderTop:"1px solid #CFCFCF",
24
-        borderBottom:"1px solid #CFCFCF"
24
+        borderTop: '1px solid #CFCFCF',
25
+        borderBottom: '1px solid #CFCFCF',
25 26
       }}
26 27
     >
27 28
       {socialMedia.map((media, index) => (
@@ -29,7 +30,7 @@ const SocialMedia = () => {
29 30
           key={index}
30 31
           sx={{
31 32
             display: 'flex',
32
-            flexDirection: 'row',
33
+            flexDirection: { xs: 'column', sm: 'row' }, // Stack icon and text on small screens
33 34
             alignItems: 'center',
34 35
             gap: 1,
35 36
           }}

+ 1
- 0
src/components/VideoAds/VideoAds.jsx Visa fil

@@ -10,6 +10,7 @@ const VideoAds = ({ video_url, height, width }) => {
10 10
         overflow: 'hidden',
11 11
         width: width || '100%',
12 12
         height: height || '300px',
13
+        
13 14
       }}
14 15
     >
15 16
       <video

+ 24
- 8
src/pages/Cart.jsx Visa fil

@@ -40,20 +40,32 @@ const Cart = () => {
40 40
 
41 41
   return (
42 42
     <>
43
-      <Box sx={{ px: 24, my: 10 }}>
43
+      <Box sx={{
44
+        px: {
45
+          xs: 2,
46
+          md: 12,
47
+          lg: 20
48
+        },
49
+        mb: {
50
+          xs: 0,
51
+          md: 5,
52
+          lg: 10
53
+        },
54
+        mt:10
55
+      }}>
44 56
 
45 57
 
46 58
         {/* Header */}
47
-        <Grid container spacing={2} alignItems="center" sx={{ mb: 5 }}>
59
+        <Grid container spacing={2} alignItems="center" sx={{ mb: 5, flexDirection: { xs: 'column-reverse', lg: 'row' } }}> 
48 60
 
49 61
           {/* Type */}
50
-          <Grid item size={2}>
62
+          <Grid item size={{xs:12, lg:2}}>
51 63
             <Typography variant="body2">
52
-              <p>Mens Fashion <span style={{ fontWeight: "bold", marginLeft: 10, display: "inline-block" }}>Shopping Bag</span></p>
64
+              <p>Mens Fashion <span style={{ fontWeight: "bold", display: "inline-block" }}>Shopping Bag</span></p>
53 65
             </Typography>
54 66
           </Grid>
55 67
 
56
-          <Grid item size={4} offset={{ xs: 3 }}>
68
+          <Grid item size={{xs:12, md:4}}>
57 69
             <Typography variant="h5" sx={{ fontWeight: "bold" }}>
58 70
               SHOPPING BAG
59 71
             </Typography>
@@ -135,7 +147,7 @@ const Cart = () => {
135 147
         {/* INVOICES */}
136 148
         <Grid container spacing={2} sx={{ mb: 5 }}>
137 149
 
138
-          <Grid item size={3} sx={{ ml: "auto" }}>
150
+          <Grid item size={{xs:12, sm:4, md:3}} sx={{ ml: "auto" }}>
139 151
             <Box
140 152
               display="flex"
141 153
               justifyContent="space-between"
@@ -178,18 +190,22 @@ const Cart = () => {
178 190
 
179 191
         {/* BUY NOW */}
180 192
         <Box sx={{ mb: 15 }}>
181
-          <Box sx={{ display: "flex", justifyContent: "space-between", alignItems: "center" }}>
193
+          <Box sx={{ display: "flex", justifyContent: "space-between", alignItems: "center", flexDirection:{xs:"column-reverse", md:"row" } }}>
182 194
             <Typography variant='body2'><span style={{ fontWeight: "bolder" }}>NEED HELP?</span> CALL US: +44 (0)10 2345 6789 | EMAIL CUSTOMER CARE | SHIPPING INFORMATION | RETURNS & EXCHANGES</Typography>
183 195
             <Button
184 196
               variant="contained"
185 197
               color="common.black"
186
-              onClick={()=>{window.location.href = "/checkout"}}
198
+              onClick={() => { window.location.href = "/checkout" }}
187 199
               sx={{
188 200
                 backgroundColor: (theme) => theme.palette.common.black,
189 201
                 color: "white",
190 202
                 textTransform: "none",
191 203
                 px: 8,
192 204
                 py: 2,
205
+                mb: {
206
+                  xs:5,
207
+                  md:0
208
+                },
193 209
                 "&:hover": {
194 210
                   backgroundColor: (theme) => theme.palette.grey[900],
195 211
                 },

+ 58
- 11
src/pages/Checkout.jsx Visa fil

@@ -1,5 +1,5 @@
1 1
 import React, { useState } from 'react'
2
-import { Box, Button, IconButton, TextField, Typography } from '@mui/material'
2
+import { Box, Typography, Link } from '@mui/material'
3 3
 import SocialMedia from '../components/SocialMedia'
4 4
 import Feature from '../components/Feature'
5 5
 import LoginForm from '../components/LoginForm'
@@ -13,9 +13,22 @@ import Grid from '@mui/material/Grid2';
13 13
 const Checkout = () => {
14 14
 
15 15
   const [content, setContent] = useState(0);
16
+  const [showLoginForm, setShowLoginForm] = useState(true);
16 17
 
17 18
   return (
18
-    <Box sx={{ px: 24, my: 10 }}>
19
+    <Box sx={{
20
+      px: {
21
+        xs: 2,
22
+        md: 12,
23
+        lg: 20
24
+      },
25
+      mb: {
26
+        xs: 0,
27
+        md: 5,
28
+        lg: 10
29
+      },
30
+      mt: 10
31
+    }}>
19 32
 
20 33
       {/* Header */}
21 34
       <Grid container spacing={2} sx={{ mb: 5 }}>
@@ -50,32 +63,64 @@ const Checkout = () => {
50 63
       {/* Content */}
51 64
       {(content == 0) && <Grid container sx={{ mb: 5 }}>
52 65
 
53
-        <Grid item size={6} sx={{ borderRight: "1px solid rgba(0,0,0,0.2)", borderBottom: "1px solid rgba(0,0,0,0.2)", py: 4, textAlign: "center" }}>
66
+        <Grid item size={{ xs: 12, md: 6 }} sx={{ borderRight: "1px solid rgba(0,0,0,0.2)", borderBottom: "1px solid rgba(0,0,0,0.2)", py: 4, textAlign: "center", display: { xs: "none", md: "block" } }}>
54 67
 
55 68
           <Typography variant="body1" sx={{ fontWeight: "500" }}>EXISTING CUSTOMER</Typography>
56 69
 
57 70
         </Grid>
58 71
 
59
-        <Grid item size={6} sx={{ textAlign: "center", py: 4, borderBottom: "1px solid rgba(0,0,0,0.2)" }}>
72
+        <Grid item size={{ xs: 12, md: 6 }} sx={{ textAlign: "center", py: 4, borderBottom: "1px solid rgba(0,0,0,0.2)", display: { xs: "none", md: "block" } }}>
60 73
 
61 74
           <Typography variant="body1" sx={{ fontWeight: "500" }}>NEW CUSTOMER</Typography>
62 75
 
63 76
         </Grid>
64 77
 
65
-        <Grid item size={6} sx={{ borderRight: "1px solid rgba(0,0,0,0.2)", py: 4, textAlign: "center", px: 8 }}>
78
+        <Grid
79
+          item
80
+          size={{ xs: 12, md: 6 }}
81
+          sx={{
82
+            borderRight: { xs: "none", md: "1px solid rgba(0,0,0,0.2)" },
83
+            py: 4,
84
+            textAlign: "center",
85
+            px: 8,
86
+            display: {
87
+              xs: showLoginForm ? "block" : "none",
88
+              md: "block"
89
+            }
90
+          }}>
91
+
92
+          <Typography variant="h6" sx={{ fontWeight: "500", mb: 3, display: { xs: "block", md: "none" } }}>EXISTING CUSTOMER</Typography>
66 93
 
67 94
           <Typography variant="body2">Make purchases faster using previously saved details. Track previous orders and easily request returns from the website.</Typography>
68 95
 
69 96
           <LoginForm />
70 97
 
98
+          <Typography variant="body1" sx={{ fontWeight: "400", mt: 5, display: { xs: "block", md: "none" } }}>Didnt have any Account? <Link onClick={() => { setShowLoginForm(false) }} sx={{ textDecoration: "underline" }}> here</Link> to subcribe now.</Typography>
99
+
100
+
71 101
         </Grid>
72 102
 
73
-        <Grid item size={6} sx={{ textAlign: "center", py: 4, px: 8 }}>
103
+        <Grid
104
+          item
105
+          size={{ xs: 12, md: 6 }}
106
+          sx={{
107
+            textAlign: "center",
108
+            py: 4,
109
+            px: 8,
110
+            display: {
111
+              xs: showLoginForm ? "none" : "block",
112
+              md: "block"
113
+            }
114
+          }}>
115
+
116
+          <Typography variant="h6" sx={{ fontWeight: "500", mb: 3, display: { xs: "block", md: "none" } }}>NEW CUSTOMER</Typography>
74 117
 
75 118
           <Typography variant="body2">You’ll need an account to purchase watches, track and review orders, and manage your personal details.</Typography>
76 119
 
77 120
           <SignUpForm />
78 121
 
122
+          <Typography variant="body1" sx={{ fontWeight: "400", mt: 5, display: { xs: "block", md: "none" } }}>Already have an Account? <Link onClick={() => { setShowLoginForm(true) }} sx={{ textDecoration: "underline" }}> here</Link> to subcribe now.</Typography>
123
+
79 124
         </Grid>
80 125
 
81 126
 
@@ -83,25 +128,27 @@ const Checkout = () => {
83 128
 
84 129
       {(content == 1) && <Grid container sx={{ mb: 5 }}>
85 130
         <Grid item size={12}>
86
-          <ShippingForm/>
131
+          <ShippingForm />
87 132
         </Grid>
88 133
       </Grid>}
89 134
 
90 135
       {(content == 2) && <Grid container sx={{ mb: 5 }}>
91 136
         <Grid item size={12}>
92
-          <BillingForm/>
137
+          <BillingForm />
93 138
         </Grid>
94 139
       </Grid>}
95 140
 
96 141
       {(content == 3) && <Grid container sx={{ mb: 5 }}>
97 142
         <Grid item size={12}>
98
-          <ConfirmOrder/>
143
+          <ConfirmOrder />
99 144
         </Grid>
100 145
       </Grid>}
101 146
 
102 147
 
103
-      <SocialMedia />
104
-      <Feature />
148
+      <Box sx={{display: {xs:"none", md:"block"}  }}>
149
+        <SocialMedia />
150
+        <Feature />
151
+      </Box>
105 152
 
106 153
     </Box>
107 154
   )

+ 61
- 27
src/pages/Home.jsx Visa fil

@@ -17,48 +17,78 @@ const Home = () => {
17 17
   return (
18 18
     <>
19 19
       <Carousel />
20
-      <Box sx={{ px: 24, mb: 10 }}>
21
-
22
-        <Box sx={{
23
-          display: "flex",
24
-          position: "relative",
25
-          py: 5
20
+      <Box sx={{
21
+        px: {
22
+          xs: 2,
23
+          md: 12,
24
+          lg: 20
25
+        },
26
+        mb: {
27
+          xs: 0,
28
+          md: 5,
29
+          lg: 10
30
+        }
31
+      }}>
32
+
33
+        <Grid container sx={{
34
+          py:{
35
+            xs:3,
36
+            md:3,
37
+            lg:6
38
+          }
26 39
         }}>
27
-          <Box
28
-            sx={{
29
-              display: "flex",
30
-              alignItems: "center",
31
-              justifyContent: "center",
32
-              mx: "auto"
33
-            }}
34
-          >
35
-            <KeyboardArrowLeftIcon sx={{ mr: 3, color: "#B7B7B7" }} /> {/* Icon at the start */}
36
-            <Typography variant="h4" sx={{ mx: "auto" }}>
40
+
41
+          {/* OFFSET PURPOSE */}
42
+          <Grid size={{xs:12, md:2}} sx={{display:"flex", alignItems:"center" }}></Grid>
43
+
44
+          <Grid size={{xs:12, md:4}} sx={{mx:"auto", display:"flex", alignItems:"center", justifyContent:"center" }}>
45
+            {/* Icon at the start */}
46
+            <KeyboardArrowLeftIcon sx={{ mr: 3, color: "#B7B7B7" }} />
47
+            <Typography variant="h4">
37 48
               NEW IN
38 49
             </Typography>
39
-            <KeyboardArrowRightIcon sx={{ ml: 3, color: "#B7B7B7" }} /> {/* Icon at the end */}
40
-          </Box>
50
+            {/* Icon at the end */}
51
+            <KeyboardArrowRightIcon sx={{ ml: 3, color: "#B7B7B7" }} />
52
+          </Grid>
41 53
 
42
-          <Link href="#" sx={{ position: "absolute", right: 0, textDecoration: "underline" }}>VIEW ALL</Link>
54
+          <Grid size={{xs:12, md:2}} sx={{display:"flex", alignItems:"center", py:{xs:2, md:0} }}>
55
+            <Link href="#" sx={{ color:"#000", textDecoration: "underline", m:{xs:"auto auto auto auto", md:"0 0 0 auto"}}}>VIEW ALL</Link>
56
+          </Grid>
57
+
58
+        </Grid>
43 59
 
44
-        </Box>
45 60
         <ProductSelected />
61
+        
46 62
       </Box>
47 63
 
48
-      <VideoAds width={"100%"} height={700} />
49
-
50
-      <Box sx={{ px: 24, mb: 10 }}>
51
-
64
+      <VideoAds width={"100%"} height={{
65
+        xs: 350,
66
+        md: 500,
67
+        lg: 750,
68
+      }} />
69
+
70
+      <Box sx={{
71
+        px: {
72
+          xs: 2,
73
+          md: 12,
74
+          lg: 20
75
+        },
76
+        mb: {
77
+          xs: 2,
78
+          md: 5,
79
+          lg: 10
80
+        }
81
+      }}>
52 82
 
53 83
         <Box sx={{ flexGrow: 1, mt: 10 }}>
54 84
           <Grid container spacing={2}>
55 85
             <Grid size={12}>
56 86
               <ProductType />
57 87
             </Grid>
58
-            <Grid size={6}>
88
+            <Grid size={{xs:12, md:6}}>
59 89
               <ProductType />
60 90
             </Grid>
61
-            <Grid size={6}>
91
+            <Grid size={{xs:12, md:6}}>
62 92
               <ProductType />
63 93
             </Grid>
64 94
             <Grid size={12}>
@@ -71,7 +101,11 @@ const Home = () => {
71 101
 
72 102
       <NewsLetter />
73 103
 
74
-      <Box sx={{ px: 24, my: 10 }}>
104
+      <Box sx={{ px:{
105
+        xs:2,
106
+        md:12,
107
+        lg:20
108
+      }, mb: 10 }}>
75 109
 
76 110
         <SocialMedia />
77 111
         <Feature />

+ 26
- 5
src/pages/Products/Product.jsx Visa fil

@@ -2,6 +2,7 @@ import React, { useEffect } from 'react'
2 2
 import { Box, Typography } from '@mui/material';
3 3
 import { useParams } from 'react-router-dom';
4 4
 import Grid from '@mui/material/Grid2';
5
+import logoSrc from "../../assets/svg/logo.svg";
5 6
 import ImageView from '../../components/ImageView/ImageView';
6 7
 import ProductDetails from '../../components/ProductDetails';
7 8
 import ProductSuggestion from '../../components/ProductSuggestion';
@@ -19,9 +20,29 @@ const Product = () => {
19 20
 
20 21
   return (
21 22
 
22
-    <Box sx={{ mt: 10, px: 24 }}>
23
-      <Grid container spacing={0}>
24
-        <Grid size={6}>
23
+    <Box sx={{
24
+      px: {
25
+        xs: 2,
26
+        md: 12,
27
+        lg: 20
28
+      },
29
+      mb: {
30
+        xs: 0,
31
+        md: 5,
32
+        lg: 10
33
+      }
34
+    }}>
35
+      <Grid container spacing={0} sx={{ mt: 10, mb:5 }}>
36
+
37
+        <Grid size={12} sx={{ backgroundColor: "#000", textAlign:"center", display:{xs:"block", md:"none"} }}>
38
+          <img src={logoSrc} alt="Logo"
39
+            style={{
40
+              width: 150,
41
+              height: 50
42
+            }} />
43
+        </Grid>
44
+
45
+        <Grid size={{ xs: 12, md: 6 }}>
25 46
           <Box sx={{ paddingRight: 1 }}>
26 47
             <Box>
27 48
               <ImageView />
@@ -29,7 +50,7 @@ const Product = () => {
29 50
           </Box>
30 51
         </Grid>
31 52
 
32
-        <Grid size={6} xs>
53
+        <Grid size={{ xs: 12, md: 6 }}>
33 54
           <Box>
34 55
             <Box>
35 56
               <ProductDetails />
@@ -59,7 +80,7 @@ const Product = () => {
59 80
         textAlign: "center"
60 81
       }}>
61 82
         <Typography variant='body1' sx={{ fontWeight: "400", mb: 4 }}>
62
-          RECENTLY VIEWED 
83
+          RECENTLY VIEWED
63 84
         </Typography>
64 85
 
65 86
         <ProductHistoryList />

+ 13
- 2
src/pages/Products/index.jsx Visa fil

@@ -10,9 +10,20 @@ const Products = () => {
10 10
   return (
11 11
     <>
12 12
       <PageTitle />
13
-      <Box sx={{ px: 24, mb:10 }}>
13
+      <Box sx={{
14
+        px: {
15
+          xs: 2,
16
+          md: 12,
17
+          lg: 20
18
+        },
19
+        mb: {
20
+          xs: 0,
21
+          md: 5,
22
+          lg: 10
23
+        }
24
+      }}>
14 25
         <Filter />
15
-        <ProductList size={5}/>
26
+        <ProductList />
16 27
         <SocialMedia />
17 28
         <Feature />
18 29
       </Box>

Laddar…
Avbryt
Spara