Explorar el Código

fix logo on mobile nav

master
azri hace 1 semana
padre
commit
0d1a25ace3
Se han modificado 3 ficheros con 148 adiciones y 125 borrados
  1. 119
    124
      src/components/Navbar/Navbar.jsx
  2. 1
    1
      src/components/NewsLetter/NewsLetter.jsx
  3. 28
    0
      src/index.css

+ 119
- 124
src/components/Navbar/Navbar.jsx Ver fichero

@@ -291,142 +291,137 @@ const Navbar = () => {
291 291
           py: 0.5
292 292
         }} disableGutters>
293 293
 
294
-          {/* Left Section: Logo */}
295
-          <Box sx={{
296
-            mr: 5,
297
-            display: {
298
-              xs: "none",
299
-              md: "none",
300
-              lg: "block",
301
-            }
302
-          }}>
303
-            <a href="/">
304
-              <img src={logoSrc} alt="Logo"
305
-                style={{
306
-                  width: 150,
307
-                  height: 25,
308
-                }} />
309
-            </a>
310
-          </Box>
311
-
312
-          {/* SIDEBAR BUTTON */}
313
-          <Box sx={{
314
-            display: {
315
-              xs: "block",
316
-              md: "block",
317
-              lg: "none"
318
-            }
319
-          }}>
320
-
321
-            <IconButton
322
-              onClick={() => setOpen(true)}
323
-              className="navItem"
324
-              sx={{
325
-                backgroundColor: "transparent",
326
-                color: (isAtTop) ? "white" : "black",
327
-                "&:hover": {
328
-                  backgroundColor: "rgba(0, 0, 0, 0.1)",
329
-                },
330
-              }}
331
-            >
332
-              <MenuIcon fontSize="large" />
333
-            </IconButton>
334
-
335
-          </Box>
336
-
337
-          {/* Center Section: Nav Items */}
338
-          <Box
339
-            sx={{
340
-              flexGrow: 1,
294
+          <Box sx={{ display: "flex", alignItems: "center", width:"100%", position:"relative" }}>
295
+            {/* SIDEBAR BUTTON */}
296
+            <Box sx={{
341 297
               display: {
342
-                xs: "none",
343
-                md: "none",
344
-                lg: "flex"
345
-              },
346
-              gap: 2
347
-            }}
348
-          >
349
-
350
-            {navItem.map(({ productType, collection }) => (<Button
351
-              sx={{
352
-                position: "relative",
353
-                ':hover': {
354
-                  backgroundColor: "rgba(0,0,0,0)",
355
-                }
356
-              }}
357
-              color="inherit"
358
-              onClick={() => {
359
-                sessionStorage.setItem('amber-select-product-type', productType)
360
-                sessionStorage.removeItem('amber-select-collection')
361
-                window.location.href = `/products`;
362
-              }}
363
-              onMouseEnter={() => {
364
-                displayCollectionList(collection, productType)
365
-              }}
366
-            >
367
-              <Typography variant="body2"
298
+                xs: "block",
299
+                md: "block",
300
+                lg: "none"
301
+              }
302
+            }}>
303
+
304
+              <IconButton
305
+                onClick={() => setOpen(true)}
368 306
                 className="navItem"
369 307
                 sx={{
370
-                  fontWeight: "400",
308
+                  backgroundColor: "transparent",
371 309
                   color: (isAtTop) ? "white" : "black",
372
-                  transition: "all 0.3s ease-in-out",
373
-                  ":hover": {
374
-                    color: "#95AAC5 !important"
375
-                  }
376
-                }}>{productType}</Typography>
377
-            </Button>))}
378
-
379
-          </Box>
380
-
381
-          {/* Right Section: Search and Profile */}
382
-          <Box sx={{ display: "flex", alignItems: "center", gap: 1.2, ml: "auto" }}>
383
-
384
-            {/* <FormControl
310
+                  "&:hover": {
311
+                    backgroundColor: "rgba(0, 0, 0, 0.1)",
312
+                  },
313
+                }}
314
+              >
315
+                <MenuIcon fontSize="large" />
316
+              </IconButton>
317
+
318
+            </Box>
319
+
320
+            {/* Left Section: Logo */}
321
+            <Box sx={{
322
+              mx: "auto",
323
+            }}>
324
+              <a href="/">
325
+                <img src={logoSrc} alt="Logo"
326
+                  style={{
327
+                    width: 150,
328
+                    height: 25,
329
+                  }} />
330
+              </a>
331
+            </Box>
332
+
333
+            {/* Center Section: Nav Items */}
334
+            <Box
385 335
               sx={{
336
+                flexGrow: 1,
386 337
                 display: {
387 338
                   xs: "none",
388
-                  lg: "block"
389
-                }
339
+                  md: "none",
340
+                  lg: "flex"
341
+                },
342
+                gap: 2
390 343
               }}
391 344
             >
392
-              <LanguageSelect
393
-                value={language}
394
-                onChange={handleChange}
395
-                label=""
396
-                MenuProps={{
397
-                  PaperProps: {
398
-                    style: {
399
-                      backgroundColor: 'black',
400
-                      color: 'white'
401
-                    },
402
-                  },
345
+
346
+              {navItem.map(({ productType, collection }) => (<Button
347
+                sx={{
348
+                  position: "relative",
349
+                  ':hover': {
350
+                    backgroundColor: "rgba(0,0,0,0)",
351
+                  }
352
+                }}
353
+                color="inherit"
354
+                onClick={() => {
355
+                  sessionStorage.setItem('amber-select-product-type', productType)
356
+                  sessionStorage.removeItem('amber-select-collection')
357
+                  window.location.href = `/products`;
358
+                }}
359
+                onMouseEnter={() => {
360
+                  displayCollectionList(collection, productType)
403 361
                 }}
404 362
               >
405
-                <LanguageSelectItem value="English">English</LanguageSelectItem>
406
-                <LanguageSelectItem value="Malay">Malay</LanguageSelectItem>
407
-                <LanguageSelectItem value="Chinese">Chinese</LanguageSelectItem>
408
-              </LanguageSelect>
409
-            </FormControl> */}
410
-
411
-            <IconButton>
412
-              <SearchIcon className="navItem" style={{
413
-                transition: "all 0.3s ease-in-out",
414
-                color: (isAtTop) ? "white" : "black",
415
-              }} />
416
-            </IconButton>
417
-
418
-            <Badge sx={{ cursor: "pointer" }} onClick={() => { window.location.href = "/cart" }} badgeContent={cartAmount} color="primary">
419
-              <LocalMallIcon className="navItem" style={{
420
-                transition: "all 0.3s ease-in-out",
421
-                color: (isAtTop) ? "white" : "black",
422
-              }} />
423
-            </Badge>
424
-
425
-            {/* <IconButton color="inherit">
426
-              <AccountCircleIcon sx={{ color: "white" }} />
427
-            </IconButton> */}
428
-          </Box>
363
+                <Typography variant="body2"
364
+                  className="navItem"
365
+                  sx={{
366
+                    fontWeight: "400",
367
+                    color: (isAtTop) ? "white" : "black",
368
+                    transition: "all 0.3s ease-in-out",
369
+                    ":hover": {
370
+                      color: "#95AAC5 !important"
371
+                    }
372
+                  }}>{productType}</Typography>
373
+              </Button>))}
374
+
375
+            </Box>
376
+
377
+            {/* Right Section: Search and Profile */}
378
+            <Box sx={{ display: "flex", alignItems: "center", gap: 1.2 }}>
379
+
380
+              {/* <FormControl
381
+                sx={{
382
+                  display: {
383
+                    xs: "none",
384
+                    lg: "block"
385
+                  }
386
+                }}
387
+              >
388
+                <LanguageSelect
389
+                  value={language}
390
+                  onChange={handleChange}
391
+                  label=""
392
+                  MenuProps={{
393
+                    PaperProps: {
394
+                      style: {
395
+                        backgroundColor: 'black',
396
+                        color: 'white'
397
+                      },
398
+                    },
399
+                  }}
400
+                >
401
+                  <LanguageSelectItem value="English">English</LanguageSelectItem>
402
+                  <LanguageSelectItem value="Malay">Malay</LanguageSelectItem>
403
+                  <LanguageSelectItem value="Chinese">Chinese</LanguageSelectItem>
404
+                </LanguageSelect>
405
+              </FormControl> */}
406
+
407
+              <IconButton>
408
+                <SearchIcon className="navItem" style={{
409
+                  transition: "all 0.3s ease-in-out",
410
+                  color: (isAtTop) ? "white" : "black",
411
+                }} />
412
+              </IconButton>
429 413
 
414
+              <Badge sx={{ cursor: "pointer" }} onClick={() => { window.location.href = "/cart" }} badgeContent={cartAmount} color="primary">
415
+                <LocalMallIcon className="navItem" style={{
416
+                  transition: "all 0.3s ease-in-out",
417
+                  color: (isAtTop) ? "white" : "black",
418
+                }} />
419
+              </Badge>
420
+              {/* <IconButton color="inherit">
421
+                <AccountCircleIcon sx={{ color: "white" }} />
422
+              </IconButton> */}
423
+            </Box>
424
+          </Box>
430 425
         </Toolbar>
431 426
 
432 427
         {/* On Hover Collection */}

+ 1
- 1
src/components/NewsLetter/NewsLetter.jsx Ver fichero

@@ -25,7 +25,7 @@ const NewsLetter = () => {
25 25
           width: '100%',
26 26
           height: '100%',
27 27
           display: 'flex',
28
-          backgroundColor: 'rgba(50, 50, 50, 0.5)', // Filter overlay
28
+          backgroundColor: 'rgba(50, 50, 50, 0.1)', // Filter overlay
29 29
           flexDirection: 'column',
30 30
           justifyContent: 'center',
31 31
           alignItems: 'center',

+ 28
- 0
src/index.css Ver fichero

@@ -355,4 +355,32 @@
355 355
   }
356 356
 
357 357
 
358
+  /*
359
+  * Scroll Custom
360
+  */
361
+  /* Style for WebKit-based browsers (e.g., Chrome, Edge, Safari) */
362
+::-webkit-scrollbar {
363
+  width: 10px; /* Adjust scrollbar width */
364
+  height: 10px; /* Adjust scrollbar height for horizontal scrolling */
365
+}
358 366
 
367
+::-webkit-scrollbar-track {
368
+  background: #FFF; /* Background color of the scrollbar track */
369
+  border-radius: 5px; /* Rounded corners for the track */
370
+}
371
+
372
+::-webkit-scrollbar-thumb {
373
+  background: #95AAC5; /* Scroll thumb color */
374
+  border-radius: 5px; /* Rounded corners for the thumb */
375
+}
376
+
377
+/* Optional: Style for hover state */
378
+::-webkit-scrollbar-thumb:hover {
379
+  background: #7A98B5; /* Slightly darker color for hover */
380
+}
381
+
382
+/* Add for Firefox */
383
+* {
384
+  scrollbar-width: thin; /* Thin scrollbar */
385
+  scrollbar-color: #95AAC5 #FFF; /* Thumb color and track color */
386
+}

Loading…
Cancelar
Guardar