Procházet zdrojové kódy

init FE

cart-api-guide
azri před 1 týdnem
rodič
revize
e387112f9e

+ 1050
- 14
package-lock.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 10
- 1
package.json Zobrazit soubor

@@ -3,18 +3,27 @@
3 3
   "version": "0.1.0",
4 4
   "private": true,
5 5
   "dependencies": {
6
+    "@emotion/react": "^11.13.5",
7
+    "@emotion/styled": "^11.13.5",
8
+    "@fontsource/roboto": "^5.1.0",
9
+    "@mui/icons-material": "^6.1.10",
10
+    "@mui/material": "^6.1.10",
11
+    "@shopify/shopify-api": "^11.6.0",
12
+    "@shopify/storefront-api-client": "^1.0.3",
6 13
     "@testing-library/jest-dom": "^5.17.0",
7 14
     "@testing-library/react": "^13.4.0",
8 15
     "@testing-library/user-event": "^13.5.0",
16
+    "dotenv": "^16.4.7",
9 17
     "react": "^18.3.1",
10 18
     "react-dom": "^18.3.1",
11 19
     "react-redux": "^9.1.2",
12 20
     "react-router-dom": "^7.0.2",
13 21
     "react-scripts": "5.0.1",
22
+    "shopify-api-node": "^3.14.0",
14 23
     "web-vitals": "^2.1.4"
15 24
   },
16 25
   "scripts": {
17
-    "start": "react-scripts start",
26
+    "start": "set GENERATE_SOURCEMAP=false && react-scripts start",
18 27
     "build": "react-scripts build",
19 28
     "test": "react-scripts test",
20 29
     "eject": "react-scripts eject"

+ 0
- 38
src/App.css Zobrazit soubor

@@ -1,38 +0,0 @@
1
-.App {
2
-  text-align: center;
3
-}
4
-
5
-.App-logo {
6
-  height: 40vmin;
7
-  pointer-events: none;
8
-}
9
-
10
-@media (prefers-reduced-motion: no-preference) {
11
-  .App-logo {
12
-    animation: App-logo-spin infinite 20s linear;
13
-  }
14
-}
15
-
16
-.App-header {
17
-  background-color: #282c34;
18
-  min-height: 100vh;
19
-  display: flex;
20
-  flex-direction: column;
21
-  align-items: center;
22
-  justify-content: center;
23
-  font-size: calc(10px + 2vmin);
24
-  color: white;
25
-}
26
-
27
-.App-link {
28
-  color: #61dafb;
29
-}
30
-
31
-@keyframes App-logo-spin {
32
-  from {
33
-    transform: rotate(0deg);
34
-  }
35
-  to {
36
-    transform: rotate(360deg);
37
-  }
38
-}

+ 45
- 18
src/App.js Zobrazit soubor

@@ -1,25 +1,52 @@
1
-import logo from './logo.svg';
2
-import './App.css';
1
+import { useEffect } from 'react';
2
+import { BrowserRouter, Routes, Route } from 'react-router-dom';
3
+import Home from './pages/Home';
4
+import Cart from './pages/Cart';
5
+import Login from './pages/Login';
6
+import Newsletter from './pages/Newsletter';
7
+import Products from './pages/Products';
8
+import Product from './pages/Products/Product';
9
+import Checkout from './pages/Checkout';
10
+import Navbar from './components/Navbar';
11
+import Header from './components/Header';
12
+import theme from './theme/theme';
13
+import { ThemeProvider } from '@mui/material';
14
+import Footer from './components/Footer/Footer';
3 15
 
4 16
 function App() {
17
+
18
+  useEffect(() => {
19
+
20
+  }, [])
21
+
5 22
   return (
6
-    <div className="App">
7
-      <header className="App-header">
8
-        <img src={logo} className="App-logo" alt="logo" />
9
-        <p>
10
-          Edit <code>src/App.js</code> and save to reload.
11
-        </p>
12
-        <a
13
-          className="App-link"
14
-          href="https://reactjs.org"
15
-          target="_blank"
16
-          rel="noopener noreferrer"
17
-        >
18
-          Learn React
19
-        </a>
20
-      </header>
21
-    </div>
23
+    <ThemeProvider theme={theme}>
24
+      <Header />
25
+      <Navbar/>
26
+      <BrowserRouter>
27
+        <Routes>
28
+          <Route path='/' element={<Home />} />
29
+          <Route path='/login' element={<Login />} />
30
+
31
+          <Route path='products'>
32
+            {/* All Products */}
33
+            <Route index element={<Products />} />
34
+
35
+            {/* Single Product */}
36
+            <Route path=':pid' element={<Product />} />
37
+
38
+          </Route>
39
+
40
+          <Route path='/newsletter' element={<Newsletter />} />
41
+          <Route path='/cart' element={<Cart />} />
42
+          <Route path='/checkout' element={<Checkout />} />
43
+        </Routes>
44
+      </BrowserRouter>
45
+      <Footer />
46
+    </ThemeProvider>
22 47
   );
23 48
 }
24 49
 
50
+
51
+
25 52
 export default App;

+ 88
- 0
src/components/Carousel/Carousel.jsx Zobrazit soubor

@@ -0,0 +1,88 @@
1
+import React from "react";
2
+import { Box, IconButton } from "@mui/material";
3
+import ArrowBackIosIcon from "@mui/icons-material/ArrowBackIos";
4
+import ArrowForwardIosIcon from "@mui/icons-material/ArrowForwardIos";
5
+
6
+const Carousel = () => {
7
+
8
+  const items = [
9
+    { img_src: "https://via.placeholder.com/600x300", alt_name: "Image 1" },
10
+    { img_src: "https://via.placeholder.com/600x300/ff0000", alt_name: "Image 2" },
11
+    { img_src: "https://via.placeholder.com/600x300/00ff00", alt_name: "Image 3" },
12
+  ]
13
+
14
+  const [currentIndex, setCurrentIndex] = React.useState(0);
15
+
16
+  const handlePrev = () => {
17
+    setCurrentIndex((prevIndex) =>
18
+      prevIndex === 0 ? items.length - 1 : prevIndex - 1
19
+    );
20
+  };
21
+
22
+  const handleNext = () => {
23
+    setCurrentIndex((prevIndex) =>
24
+      prevIndex === items.length - 1 ? 0 : prevIndex + 1
25
+    );
26
+  };
27
+
28
+  return (
29
+    <Box
30
+      sx={{
31
+        position: "relative",
32
+        display: "flex",
33
+        alignItems: "center",
34
+        justifyContent: "center",
35
+        width: "100%",
36
+        height: "100vh",
37
+        overflow: "hidden",
38
+      }}
39
+    >
40
+      {items.map((item, index) => (
41
+        <Box
42
+          key={index}
43
+          component="img"
44
+          src={item.img_src}
45
+          alt={item.alt_name}
46
+          sx={{
47
+            width: "100%",
48
+            height: "100%",
49
+            objectFit: "cover",
50
+            display: index === currentIndex ? "block" : "none",
51
+          }}
52
+        />
53
+      ))}
54
+
55
+      <IconButton
56
+        onClick={handlePrev}
57
+        sx={{
58
+          position: "absolute",
59
+          left: 16,
60
+          top: "50%",
61
+          transform: "translateY(-50%)",
62
+          color: "white",
63
+          backgroundColor: "rgba(0, 0, 0, 0.5)",
64
+          "&:hover": { backgroundColor: "rgba(0, 0, 0, 0.7)" },
65
+        }}
66
+      >
67
+        <ArrowBackIosIcon />
68
+      </IconButton>
69
+
70
+      <IconButton
71
+        onClick={handleNext}
72
+        sx={{
73
+          position: "absolute",
74
+          right: 16,
75
+          top: "50%",
76
+          transform: "translateY(-50%)",
77
+          color: "white",
78
+          backgroundColor: "rgba(0, 0, 0, 0.5)",
79
+          "&:hover": { backgroundColor: "rgba(0, 0, 0, 0.7)" },
80
+        }}
81
+      >
82
+        <ArrowForwardIosIcon />
83
+      </IconButton>
84
+    </Box>
85
+  );
86
+};
87
+
88
+export default Carousel;

+ 1
- 0
src/components/Carousel/index.js Zobrazit soubor

@@ -0,0 +1 @@
1
+export { default } from "./Carousel"

+ 58
- 0
src/components/Feature/Feature.jsx Zobrazit soubor

@@ -0,0 +1,58 @@
1
+import React from 'react';
2
+import { Box, Typography } from '@mui/material';
3
+import AssignmentTurnedInIcon from '@mui/icons-material/AssignmentTurnedIn';
4
+import ReplayIcon from '@mui/icons-material/Replay';
5
+import AssuredWorkloadIcon from '@mui/icons-material/AssuredWorkload';
6
+import SupportAgentIcon from '@mui/icons-material/SupportAgent';
7
+
8
+const Feature = () => {
9
+  const features = [
10
+    { icon: <AssignmentTurnedInIcon color="primary" sx={{ fontSize: 40 }} />, name: 'Pickup at any Store', description: "Free shipping on orders over $65" },
11
+    { icon: <ReplayIcon color="primary" sx={{ fontSize: 40 }} />, name: 'Free returns', description:"30-days free return policy." },
12
+    { icon: <AssuredWorkloadIcon color="primary" sx={{ fontSize: 40 }} />, name: 'Secured payments', description:"We accept all major credit cards."  },
13
+    { icon: <SupportAgentIcon color="primary" sx={{ fontSize: 40 }} />, name: 'Customer service', description:"Top notch customer service." },
14
+  ];
15
+
16
+  return (
17
+    <Box
18
+      sx={{
19
+        display: 'flex',
20
+        justifyContent: 'space-between',
21
+        alignItems: 'center',
22
+        padding: 2,
23
+        mt:5
24
+      }}
25
+    >
26
+      {features.map((feature, index) => (
27
+        <Box
28
+          key={index}
29
+          sx={{
30
+            display: 'flex',
31
+            flexDirection: 'column',
32
+            alignItems: 'center',
33
+            textAlign: 'center',
34
+            flex: 1,
35
+            borderRight: index < features.length - 1 ? '1px solid #CFCFCF' : 'none', // Add right border except for the last item
36
+            padding: 2,
37
+          }}
38
+        >
39
+          {feature.icon}
40
+          <Typography
41
+            variant="body1"
42
+            sx={{ marginTop: 1, fontWeight: 'bold', color: 'text.primary' }}
43
+          >
44
+            {feature.name}
45
+          </Typography>
46
+          <Typography
47
+            variant="body2"
48
+            sx={{ marginTop: 1, color: 'text.primary' }}
49
+          >
50
+            {feature.description}
51
+          </Typography>
52
+        </Box>
53
+      ))}
54
+    </Box>
55
+  );
56
+};
57
+
58
+export default Feature;

+ 1
- 0
src/components/Feature/index.js Zobrazit soubor

@@ -0,0 +1 @@
1
+export { default } from "./Feature"

+ 122
- 0
src/components/Filter/Filter.jsx Zobrazit soubor

@@ -0,0 +1,122 @@
1
+import { useState } from "react";
2
+import Box from "@mui/material/Box";
3
+import Typography from "@mui/material/Typography";
4
+import FormControl from "@mui/material/FormControl";
5
+import Select from "@mui/material/Select";
6
+import MenuItem from "@mui/material/MenuItem";
7
+import InputLabel from "@mui/material/InputLabel";
8
+import { InputBase } from "@mui/material";
9
+import { styled } from "@mui/material";
10
+
11
+const BootstrapInput = styled(InputBase)(({ theme }) => ({
12
+    'label + &': {
13
+        marginTop: theme.spacing(3),
14
+    },
15
+    '& .MuiInputBase-input': {
16
+        position: 'relative',
17
+        backgroundColor: "#2E2E2E",
18
+        border: '1px solid #ced4da',
19
+        color:"#FFF",
20
+        fontSize: 13,
21
+        padding: '5px 0',
22
+        paddingRight:'50px !important',
23
+        paddingLeft:"10px",
24
+        transition: theme.transitions.create(['border-color', 'box-shadow']),
25
+        '&:focus': {
26
+            borderRadius: 4,
27
+            borderColor: '#80bdff',
28
+            boxShadow: '0 0 0 0.2rem rgba(0,123,255,.25)',
29
+        },
30
+    },
31
+    '& .MuiSvgIcon-root': {
32
+        color:"#FFF !important"
33
+    },
34
+}));
35
+
36
+const Filter = () => {
37
+
38
+    const [input, setInput] = useState({
39
+        type:0,
40
+        sort:0,
41
+        show:1,
42
+    })
43
+
44
+
45
+
46
+    const handleChange = (event) => {
47
+        setInput({...input, [event.target.name]:event.target.value });
48
+    };
49
+
50
+
51
+    return (
52
+        <Box
53
+            sx={{
54
+                display: "flex",
55
+                justifyContent: "space-between",
56
+                alignItems: "center",
57
+                backgroundColor: "background.black",
58
+                color: "white",
59
+                px: 2, // Add padding around the box
60
+                my: 4
61
+            }}
62
+        >
63
+            {/* Left Side: Page Title */}
64
+            <Typography variant="body2">
65
+                13 Item
66
+            </Typography>
67
+
68
+            {/* Right Side: Option Inputs */}
69
+            <Box sx={{ display: "flex", gap: 2 }}>
70
+
71
+
72
+                <FormControl sx={{ m: 1, display:"flex", flexDirection:"row" }} variant="standard">
73
+                    <Typography variant="body2" sx={{mr:1, my:"auto"}}>Filter</Typography>
74
+                    <Select
75
+                        labelId="demo-customized-select-label"
76
+                        id="demo-customized-select"
77
+                        value={input.type}
78
+                        onChange={handleChange}
79
+                        input={<BootstrapInput />}
80
+                        name="type"
81
+                    >
82
+                        <MenuItem value={0}>All</MenuItem>
83
+                        <MenuItem value={1}>Red</MenuItem>
84
+                    </Select>
85
+                </FormControl>
86
+
87
+                <FormControl sx={{ m: 1, display:"flex", flexDirection:"row" }} variant="standard">
88
+                    <Typography variant="body2" sx={{mr:1, my:"auto"}}>Sort By</Typography>
89
+                    <Select
90
+                        labelId="demo-customized-select-label"
91
+                        id="demo-customized-select"
92
+                        value={input.sort}
93
+                        onChange={handleChange}
94
+                        input={<BootstrapInput />}
95
+                        name="sort"
96
+                    >
97
+                        <MenuItem value={0}>All</MenuItem>
98
+                        <MenuItem value={1}>Red</MenuItem>
99
+                    </Select>
100
+                </FormControl>
101
+
102
+                <FormControl sx={{ m: 1, display:"flex", flexDirection:"row" }} variant="standard">
103
+                    <Typography variant="body2" sx={{mr:1, my:"auto"}}>Show</Typography>
104
+                    <Select
105
+                        labelId="demo-customized-select-label"
106
+                        id="demo-customized-select"
107
+                        value={input.show}
108
+                        onChange={handleChange}
109
+                        input={<BootstrapInput />}
110
+                        name="show"
111
+                    >
112
+                        <MenuItem value={0}>All</MenuItem>
113
+                        <MenuItem value={1}>Red</MenuItem>
114
+                    </Select>
115
+                </FormControl>
116
+
117
+            </Box>
118
+        </Box>
119
+    );
120
+};
121
+
122
+export default Filter;

+ 1
- 0
src/components/Filter/index.js Zobrazit soubor

@@ -0,0 +1 @@
1
+export { default } from "./Filter"

+ 123
- 0
src/components/Footer/Footer.jsx Zobrazit soubor

@@ -0,0 +1,123 @@
1
+import React from 'react';
2
+import { Box, Typography, TextField, Button, InputAdornment } from '@mui/material';
3
+import SearchIcon from "@mui/icons-material/Search";
4
+import Grid from '@mui/material/Grid2';
5
+
6
+const Footer = () => {
7
+  return (
8
+    <Box
9
+      sx={{
10
+        backgroundColor: 'background.default',
11
+        mb: 10,
12
+        mt: 15
13
+      }}
14
+    >
15
+
16
+      <Grid container spacing={2} justifyContent="space-evenly">
17
+
18
+        <Grid item xs={12} sm={6} md={3} sx={{ position: "relative" }}>
19
+
20
+          <Typography variant="h5" sx={{
21
+            color: 'primary.main', // Use primary color
22
+            letterSpacing: 15,
23
+            fontWeight: "bold",
24
+            position: "absolute",
25
+            top:-60
26
+          }}>
27
+            AMBER
28
+          </Typography>
29
+
30
+          <Typography variant="body1" sx={{ fontWeight: "bold", mb: 4 }}>
31
+            Contact Info
32
+          </Typography>
33
+          <Typography variant="body2" sx={{ mb: 2 }}><span style={{ fontWeight: "bold" }}>Phone:</span> +4 (509) 120 6705</Typography>
34
+          <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
+        </Grid>
36
+
37
+        <Grid item xs={12} sm={6} md={3}>
38
+          <Typography variant="body1" sx={{ fontWeight: "bold", mb: 4 }}>
39
+            Get Help
40
+          </Typography>
41
+          <nav>
42
+            <Typography variant="body2" sx={{ mb: 1 }}>
43
+              <a href="#" style={{ textDecoration: 'none', color: 'inherit' }}>Delivery Information</a>
44
+            </Typography>
45
+            <Typography variant="body2" sx={{ mb: 1 }}>
46
+              <a href="#" style={{ textDecoration: 'none', color: 'inherit' }}>Sale Terms & Conditions</a>
47
+            </Typography>
48
+            <Typography variant="body2" sx={{ mb: 1 }}>
49
+              <a href="#" style={{ textDecoration: 'none', color: 'inherit' }}>Returns & Refunds</a>
50
+            </Typography>
51
+            <Typography variant="body2" sx={{ mb: 1 }}>
52
+              <a href="#" style={{ textDecoration: 'none', color: 'inherit' }}>Privacy Notice</a>
53
+            </Typography>
54
+            <Typography variant="body2" sx={{ mb: 1 }}>
55
+              <a href="#" style={{ textDecoration: 'none', color: 'inherit' }}>Shopping FAQs</a>
56
+            </Typography>
57
+          </nav>
58
+        </Grid>
59
+
60
+        <Grid item xs={12} sm={6} md={3}>
61
+          <Typography variant="body1" sx={{ fontWeight: "bold", mb: 4 }}>
62
+            Popular Categories
63
+          </Typography>
64
+          <nav>
65
+            <Typography variant="body2" sx={{ mb: 1 }}>
66
+              <a href="#" style={{ textDecoration: 'none', color: 'inherit' }}>Dresses <span>(45)</span></a>
67
+            </Typography>
68
+            <Typography variant="body2" sx={{ mb: 1 }}>
69
+              <a href="#" style={{ textDecoration: 'none', color: 'inherit' }}>Tops <span>(45)</span></a>
70
+            </Typography>
71
+            <Typography variant="body2" sx={{ mb: 1 }}>
72
+              <a href="#" style={{ textDecoration: 'none', color: 'inherit' }}>Skirts <span>(45)</span></a>
73
+            </Typography>
74
+            <Typography variant="body2" sx={{ mb: 1 }}>
75
+              <a href="#" style={{ textDecoration: 'none', color: 'inherit' }}>Scarves <span>(45)</span></a>
76
+            </Typography>
77
+            <Typography variant="body2" sx={{ mb: 1 }}>
78
+              <a href="#" style={{ textDecoration: 'none', color: 'inherit' }}>Mens <span>(45)</span></a>
79
+            </Typography>
80
+          </nav>
81
+        </Grid>
82
+
83
+
84
+
85
+        <Grid item xs={12} sm={6} md={3}>
86
+          <Typography variant="body1" sx={{ fontWeight: "bold", mb: 4 }}>
87
+            Let’s stay in touch
88
+          </Typography>
89
+          <Box
90
+            component="form"
91
+            sx={{
92
+              display: 'flex',
93
+              flexDirection: 'column',
94
+              gap: 1,
95
+            }}
96
+            noValidate
97
+          >
98
+            <TextField
99
+              variant="outlined"
100
+              placeholder="your email address"
101
+              sx={{ p: 0, mb: 2 }}
102
+              InputProps={{
103
+                startAdornment: (
104
+                  <InputAdornment position="end">
105
+                    <Button variant='contained' sx={{ mr: 2 }}>
106
+                      Subscribe
107
+                    </Button>
108
+                  </InputAdornment>
109
+                ),
110
+              }}
111
+            />
112
+
113
+            <Typography variant="body2" >Keep up to date with our latest  news and <br /> special offers.</Typography>
114
+
115
+
116
+          </Box>
117
+        </Grid>
118
+      </Grid>
119
+    </Box>
120
+  );
121
+};
122
+
123
+export default Footer;

+ 1
- 0
src/components/Footer/index.js Zobrazit soubor

@@ -0,0 +1 @@
1
+export { default } from "./Footer"

+ 40
- 0
src/components/Header/Header.jsx Zobrazit soubor

@@ -0,0 +1,40 @@
1
+import React from 'react';
2
+import { styled } from '@mui/material/styles';
3
+import { Box, Typography } from '@mui/material';
4
+import InstagramIcon from '@mui/icons-material/Instagram';
5
+import FacebookIcon from '@mui/icons-material/Facebook';
6
+import TwitterIcon from '@mui/icons-material/Twitter';
7
+import PinterestIcon from '@mui/icons-material/Pinterest';
8
+
9
+const Container = styled(Box)(({theme})=>({
10
+    backgroundColor: theme.palette.primary.main,
11
+    paddingTop: 20,
12
+    paddingBottom: 20,
13
+    width: "100%",
14
+    display:"flex",
15
+    position:"relative",
16
+    minHeight:"fit-content",
17
+    [`@media (max-width: ${theme.breakpoints.values.md}px)`]: {
18
+        display: "none"
19
+    },
20
+}))
21
+
22
+
23
+const Header = () => {
24
+
25
+    return (
26
+        <Container>
27
+            <Box sx={{color:"white", px:23}}>
28
+                <Box sx={{display:"flex", gap:1}}>
29
+                    <InstagramIcon style={{ fontSize: 20 }} />
30
+                    <FacebookIcon style={{ fontSize: 20 }} />
31
+                    <TwitterIcon style={{ fontSize: 20 }} />
32
+                    <PinterestIcon style={{ fontSize: 20 }} />
33
+                </Box>
34
+                <Typography variant="body2" sx={{position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)" }}>Don’t miss out on our next big thing! Click here to subcribe now.</Typography>
35
+            </Box>
36
+        </Container>
37
+    );
38
+};
39
+
40
+export default Header;

+ 1
- 0
src/components/Header/index.js Zobrazit soubor

@@ -0,0 +1 @@
1
+export { default } from "./Header"

+ 64
- 0
src/components/Navbar/Navbar.jsx Zobrazit soubor

@@ -0,0 +1,64 @@
1
+import React from "react";
2
+import AppBar from "@mui/material/AppBar";
3
+import Toolbar from "@mui/material/Toolbar";
4
+import Typography from "@mui/material/Typography";
5
+import Button from "@mui/material/Button";
6
+import IconButton from "@mui/material/IconButton";
7
+import Box from "@mui/material/Box";
8
+import InputBase from "@mui/material/InputBase";
9
+import SearchIcon from "@mui/icons-material/Search";
10
+import AccountCircleIcon from "@mui/icons-material/AccountCircle";
11
+
12
+const Navbar = () => {
13
+  return (
14
+    <AppBar position="static" sx={{backgroundColor:"background.black"}}>
15
+      <Toolbar>
16
+        {/* Left Section: Logo */}
17
+        <Typography variant="h6" sx={{ flexGrow: 0, color:"white", letterSpacing:10, marginLeft:20 }}>
18
+          AMBER
19
+        </Typography>
20
+
21
+        {/* Center Section: Nav Items */}
22
+        <Box
23
+          sx={{
24
+            flexGrow: 1,
25
+            display: "flex",
26
+            justifyContent: "center",
27
+            gap: 2,
28
+          }}
29
+        >
30
+          <Button color="inherit" onClick={()=>{ window.location.href = "/products" }}>DISCOVER</Button>
31
+          <Button color="inherit" onClick={()=>{ window.location.href = "/" }}>HOME</Button>
32
+          <Button color="inherit" onClick={()=>{ window.location.href = "/products" }}>BEAUTY</Button>
33
+          <Button color="inherit" onClick={()=>{ window.location.href = "/products" }}>SALE</Button>
34
+        </Box>
35
+
36
+        {/* Right Section: Search and Profile */}
37
+        <Box sx={{ display: "flex", alignItems: "center", marginRight:20 }}>
38
+          <Box
39
+            sx={{
40
+              display: "flex",
41
+              alignItems: "center",
42
+              backgroundColor: "rgba(255, 255, 255, 0.15)",
43
+              borderRadius: 1,
44
+              padding: "0 8px",
45
+            }}
46
+          >
47
+            <SearchIcon />
48
+            <InputBase
49
+              placeholder="Search…"
50
+              sx={{
51
+                color: "inherit",
52
+              }}
53
+            />
54
+          </Box>
55
+          <IconButton color="inherit">
56
+            <AccountCircleIcon sx={{color:"white"}}/>
57
+          </IconButton>
58
+        </Box>
59
+      </Toolbar>
60
+    </AppBar>
61
+  );
62
+};
63
+
64
+export default Navbar;

+ 1
- 0
src/components/Navbar/index.js Zobrazit soubor

@@ -0,0 +1 @@
1
+export { default } from './Navbar'

+ 48
- 0
src/components/PageTitle/PageTitle.jsx Zobrazit soubor

@@ -0,0 +1,48 @@
1
+import React from "react";
2
+import Box from "@mui/material/Box";
3
+import Typography from "@mui/material/Typography";
4
+
5
+const PageTitle = () => {
6
+  return (
7
+    <Box
8
+      sx={{
9
+        position: "relative",
10
+        minHeight: "300px",
11
+        backgroundImage: `url("https://p16-va.lemon8cdn.com/tos-alisg-v-a3e477-sg/1bab0c0797934592bb5a705ad62ed4c4~tplv-tej9nj120t-origin.webp")`,
12
+        backgroundSize: "cover",
13
+        backgroundPosition: "center",
14
+        color: "white",
15
+        textAlign: "center",
16
+        overflow: "hidden", // Ensures the dim layer stays inside the box
17
+        display:"flex"
18
+      }}
19
+    >
20
+      {/* Overlay */}
21
+      <Box
22
+        sx={{
23
+          position: "absolute",
24
+          top: 0,
25
+          left: 0,
26
+          right: 0,
27
+          bottom: 0,
28
+          backgroundColor: "rgba(0, 0, 0, 0.5)", // Adjust opacity to control dimness
29
+          zIndex: 1,
30
+        }}
31
+      />
32
+      
33
+      {/* Title */}
34
+      <Typography
35
+        variant="h3"
36
+        sx={{
37
+          position: "relative",
38
+          zIndex: 2,
39
+          margin:"auto auto"
40
+        }}
41
+      >
42
+        ATMA SARI COLLECTION
43
+      </Typography>
44
+    </Box>
45
+  );
46
+};
47
+
48
+export default PageTitle;

+ 1
- 0
src/components/PageTitle/index.js Zobrazit soubor

@@ -0,0 +1 @@
1
+export { default } from './PageTitle'

+ 108
- 0
src/components/ProductList/ProductList.jsx Zobrazit soubor

@@ -0,0 +1,108 @@
1
+import React from 'react';
2
+import { Box, Typography, Button } from '@mui/material';
3
+import Grid from '@mui/material/Grid2';
4
+
5
+const ProductList = ({ size }) => {
6
+
7
+
8
+
9
+  const images = [
10
+    {
11
+      url: 'https://via.placeholder.com/300',
12
+      title: 'KEMBOJA IN BEIGE',
13
+      price: 123.90,
14
+      description: "Atma Sari Kurta Raya Collection 2024",
15
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
16
+    },
17
+    {
18
+      url: 'https://via.placeholder.com/300',
19
+      title: 'KEMBOJA IN BEIGE',
20
+      price: 123.90,
21
+      description: "Atma Sari Kurta Raya Collection 2024",
22
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
23
+    },
24
+    {
25
+      url: 'https://via.placeholder.com/300',
26
+      title: 'KEMBOJA IN BEIGE',
27
+      price: 123.90,
28
+      description: "Atma Sari Kurta Raya Collection 2024",
29
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
30
+    },
31
+    {
32
+      url: 'https://via.placeholder.com/300',
33
+      title: 'KEMBOJA IN BEIGE',
34
+      price: 123.90,
35
+      description: "Atma Sari Kurta Raya Collection 2024",
36
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
37
+    },
38
+    {
39
+      url: 'https://via.placeholder.com/300',
40
+      title: 'KEMBOJA IN BEIGE',
41
+      price: 123.90,
42
+      description: "Atma Sari Kurta Raya Collection 2024",
43
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
44
+    },
45
+    {
46
+      url: 'https://via.placeholder.com/300',
47
+      title: 'KEMBOJA IN BEIGE',
48
+      price: 123.90,
49
+      description: "Atma Sari Kurta Raya Collection 2024",
50
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
51
+    }
52
+  ];
53
+
54
+  return (
55
+    <Box sx={{ mb: 5 }}>
56
+      <Grid container spacing={1} columns={12}>
57
+        {images.map((image, index) => {
58
+
59
+          if (index < size) {
60
+
61
+            return <Grid item size={4} key={index}>
62
+              <Box
63
+                sx={{
64
+                  overflow: 'hidden',
65
+                  position: 'relative'
66
+                }}
67
+              >
68
+                <img
69
+                  src={image.url}
70
+                  alt={image.title}
71
+                  style={{
72
+                    width: '100%',
73
+                    aspectRatio: '3 / 4',
74
+                    objectFit: 'cover',
75
+                  }}
76
+                />
77
+
78
+                <Button sx={{ position: "absolute", top: 20, left: 20, boxShadow: 0 }} variant="contained">
79
+                  NEW
80
+                </Button>
81
+
82
+                <Box sx={{ py: 5 }}>
83
+                  <Typography variant="body2" >
84
+                    {image.description}
85
+                  </Typography>
86
+                  <Typography variant="h5" sx={{ fontWeight: "bolder" }}>
87
+                    {image.title}
88
+                  </Typography>
89
+                  <Typography variant="body" >
90
+                    {`RM ${image.price}`}
91
+                  </Typography>
92
+                  <Typography variant="body2" sx={{ mt: 2 }}>
93
+                    {image.extra_desc}
94
+                  </Typography>
95
+                </Box>
96
+              </Box>
97
+            </Grid>
98
+
99
+
100
+          }
101
+
102
+        })}
103
+      </Grid>
104
+    </Box>
105
+  );
106
+};
107
+
108
+export default ProductList;

+ 1
- 0
src/components/ProductList/index.js Zobrazit soubor

@@ -0,0 +1 @@
1
+export { default } from './ProductList'

+ 85
- 0
src/components/ProductSelected/ProductSelected.jsx Zobrazit soubor

@@ -0,0 +1,85 @@
1
+import React from 'react';
2
+import { Box, Typography, Button } from '@mui/material';
3
+import Grid from '@mui/material/Grid2';
4
+
5
+const ProductSelected = () => {
6
+
7
+
8
+
9
+  const images = [
10
+    {
11
+      url: 'https://via.placeholder.com/300',
12
+      title: 'KEMBOJA IN BEIGE',
13
+      price: 123.90,
14
+      description: "Atma Sari Kurta Raya Collection 2024",
15
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
16
+    },
17
+    {
18
+      url: 'https://via.placeholder.com/300',
19
+      title: 'KEMBOJA IN BEIGE',
20
+      price: 123.90,
21
+      description: "Atma Sari Kurta Raya Collection 2024",
22
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
23
+    },
24
+    {
25
+      url: 'https://via.placeholder.com/300',
26
+      title: 'KEMBOJA IN BEIGE',
27
+      price: 123.90,
28
+      description: "Atma Sari Kurta Raya Collection 2024",
29
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
30
+    },
31
+    {
32
+      url: 'https://via.placeholder.com/300',
33
+      title: 'KEMBOJA IN BEIGE',
34
+      price: 123.90,
35
+      description: "Atma Sari Kurta Raya Collection 2024",
36
+      extra_desc: "or 3 payments of 68.50 MYR with Atome"
37
+    }
38
+  ];
39
+
40
+  return (
41
+    <Box sx={{ mb: 5 }}>
42
+      <Grid container spacing={1} columns={12}>
43
+        {images.map((image, index) => (<Grid item size={3} key={index}>
44
+          <Box
45
+            sx={{
46
+              overflow: 'hidden',
47
+              position: 'relative'
48
+            }}
49
+          >
50
+            <img
51
+              src={image.url}
52
+              alt={image.title}
53
+              style={{
54
+                width: '100%',
55
+                aspectRatio: '3 / 4',
56
+                objectFit: 'cover',
57
+              }}
58
+            />
59
+
60
+            <Button sx={{ position: "absolute", top: 20, left: 20, boxShadow: 0 }} variant="contained">
61
+              NEW
62
+            </Button>
63
+
64
+            <Box sx={{ py: 5 }}>
65
+              <Typography variant="body2" >
66
+                {image.description}
67
+              </Typography>
68
+              <Typography variant="h5" sx={{ fontWeight: "bolder" }}>
69
+                {image.title}
70
+              </Typography>
71
+              <Typography variant="body" >
72
+                {`RM ${image.price}`}
73
+              </Typography>
74
+              <Typography variant="body2" sx={{ mt: 2 }}>
75
+                {image.extra_desc}
76
+              </Typography>
77
+            </Box>
78
+          </Box>
79
+        </Grid>))}
80
+      </Grid>
81
+    </Box>
82
+  );
83
+};
84
+
85
+export default ProductSelected;

+ 1
- 0
src/components/ProductSelected/index.js Zobrazit soubor

@@ -0,0 +1 @@
1
+export { default } from './ProductSelected'

+ 47
- 0
src/components/SocialMedia/SocialMedia.jsx Zobrazit soubor

@@ -0,0 +1,47 @@
1
+import React from 'react';
2
+import { Box, Typography } from '@mui/material';
3
+import InstagramIcon from '@mui/icons-material/Instagram';
4
+import FacebookIcon from '@mui/icons-material/Facebook';
5
+import TwitterIcon from '@mui/icons-material/Twitter';
6
+
7
+const SocialMedia = () => {
8
+  const socialMedia = [
9
+    { icon: <InstagramIcon color="primary" />, name: 'Instagram' },
10
+    { icon: <FacebookIcon color="primary" />, name: 'Facebook' },
11
+    { icon: <TwitterIcon color="primary" />, name: 'Twitter' },
12
+  ];
13
+
14
+  return (
15
+    <Box
16
+      sx={{
17
+        display: 'flex',
18
+        justifyContent: 'center',
19
+        alignItems: 'center',
20
+        gap: 5,
21
+        padding: 2,
22
+        py: 4,
23
+        borderTop:"1px solid #CFCFCF",
24
+        borderBottom:"1px solid #CFCFCF"
25
+      }}
26
+    >
27
+      {socialMedia.map((media, index) => (
28
+        <Box
29
+          key={index}
30
+          sx={{
31
+            display: 'flex',
32
+            flexDirection: 'row',
33
+            alignItems: 'center',
34
+            gap: 1,
35
+          }}
36
+        >
37
+          {media.icon}
38
+          <Typography variant="body1" sx={{ fontWeight: 'bold' }}>
39
+            {media.name}
40
+          </Typography>
41
+        </Box>
42
+      ))}
43
+    </Box>
44
+  );
45
+};
46
+
47
+export default SocialMedia;

+ 1
- 0
src/components/SocialMedia/index.js Zobrazit soubor

@@ -0,0 +1 @@
1
+export { default } from './SocialMedia'

+ 351
- 13
src/index.css Zobrazit soubor

@@ -1,13 +1,351 @@
1
-body {
2
-  margin: 0;
3
-  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4
-    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5
-    sans-serif;
6
-  -webkit-font-smoothing: antialiased;
7
-  -moz-osx-font-smoothing: grayscale;
8
-}
9
-
10
-code {
11
-  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12
-    monospace;
13
-}
1
+
2
+
3
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
4
+
5
+/* Document
6
+   ========================================================================== */
7
+
8
+/**
9
+ * 1. Correct the line height in all browsers.
10
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
11
+ */
12
+
13
+ html {
14
+    line-height: 1.15; /* 1 */
15
+    -webkit-text-size-adjust: 100%; /* 2 */
16
+  }
17
+  
18
+  /* Sections
19
+     ========================================================================== */
20
+  
21
+  /**
22
+   * Remove the margin in all browsers.
23
+   */
24
+  
25
+  body {
26
+    margin: 0;
27
+  }
28
+  
29
+  /**
30
+   * Render the `main` element consistently in IE.
31
+   */
32
+  
33
+  main {
34
+    display: block;
35
+  }
36
+  
37
+  /**
38
+   * Correct the font size and margin on `h1` elements within `section` and
39
+   * `article` contexts in Chrome, Firefox, and Safari.
40
+   */
41
+  
42
+  h1 {
43
+    font-size: 2em;
44
+    margin: 0.67em 0;
45
+  }
46
+  
47
+  /* Grouping content
48
+     ========================================================================== */
49
+  
50
+  /**
51
+   * 1. Add the correct box sizing in Firefox.
52
+   * 2. Show the overflow in Edge and IE.
53
+   */
54
+  
55
+  hr {
56
+    box-sizing: content-box; /* 1 */
57
+    height: 0; /* 1 */
58
+    overflow: visible; /* 2 */
59
+  }
60
+  
61
+  /**
62
+   * 1. Correct the inheritance and scaling of font size in all browsers.
63
+   * 2. Correct the odd `em` font sizing in all browsers.
64
+   */
65
+  
66
+  pre {
67
+    font-family: monospace, monospace; /* 1 */
68
+    font-size: 1em; /* 2 */
69
+  }
70
+  
71
+  /* Text-level semantics
72
+     ========================================================================== */
73
+  
74
+  /**
75
+   * Remove the gray background on active links in IE 10.
76
+   */
77
+  
78
+  a {
79
+    background-color: transparent;
80
+  }
81
+  
82
+  /**
83
+   * 1. Remove the bottom border in Chrome 57-
84
+   * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
85
+   */
86
+  
87
+  abbr[title] {
88
+    border-bottom: none; /* 1 */
89
+    text-decoration: underline; /* 2 */
90
+    text-decoration: underline dotted; /* 2 */
91
+  }
92
+  
93
+  /**
94
+   * Add the correct font weight in Chrome, Edge, and Safari.
95
+   */
96
+  
97
+  b,
98
+  strong {
99
+    font-weight: bolder;
100
+  }
101
+  
102
+  /**
103
+   * 1. Correct the inheritance and scaling of font size in all browsers.
104
+   * 2. Correct the odd `em` font sizing in all browsers.
105
+   */
106
+  
107
+  code,
108
+  kbd,
109
+  samp {
110
+    font-family: monospace, monospace; /* 1 */
111
+    font-size: 1em; /* 2 */
112
+  }
113
+  
114
+  /**
115
+   * Add the correct font size in all browsers.
116
+   */
117
+  
118
+  small {
119
+    font-size: 80%;
120
+  }
121
+  
122
+  /**
123
+   * Prevent `sub` and `sup` elements from affecting the line height in
124
+   * all browsers.
125
+   */
126
+  
127
+  sub,
128
+  sup {
129
+    font-size: 75%;
130
+    line-height: 0;
131
+    position: relative;
132
+    vertical-align: baseline;
133
+  }
134
+  
135
+  sub {
136
+    bottom: -0.25em;
137
+  }
138
+  
139
+  sup {
140
+    top: -0.5em;
141
+  }
142
+  
143
+  /* Embedded content
144
+     ========================================================================== */
145
+  
146
+  /**
147
+   * Remove the border on images inside links in IE 10.
148
+   */
149
+  
150
+  img {
151
+    border-style: none;
152
+  }
153
+  
154
+  /* Forms
155
+     ========================================================================== */
156
+  
157
+  /**
158
+   * 1. Change the font styles in all browsers.
159
+   * 2. Remove the margin in Firefox and Safari.
160
+   */
161
+  
162
+  button,
163
+  input,
164
+  optgroup,
165
+  select,
166
+  textarea {
167
+    font-family: inherit; /* 1 */
168
+    font-size: 100%; /* 1 */
169
+    line-height: 1.15; /* 1 */
170
+    margin: 0; /* 2 */
171
+  }
172
+  
173
+  /**
174
+   * Show the overflow in IE.
175
+   * 1. Show the overflow in Edge.
176
+   */
177
+  
178
+  button,
179
+  input { /* 1 */
180
+    overflow: visible;
181
+  }
182
+  
183
+  /**
184
+   * Remove the inheritance of text transform in Edge, Firefox, and IE.
185
+   * 1. Remove the inheritance of text transform in Firefox.
186
+   */
187
+  
188
+  button,
189
+  select { /* 1 */
190
+    text-transform: none;
191
+  }
192
+  
193
+  /**
194
+   * Correct the inability to style clickable types in iOS and Safari.
195
+   */
196
+  
197
+  button,
198
+  [type="button"],
199
+  [type="reset"],
200
+  [type="submit"] {
201
+    -webkit-appearance: button;
202
+  }
203
+  
204
+  /**
205
+   * Remove the inner border and padding in Firefox.
206
+   */
207
+  
208
+  button::-moz-focus-inner,
209
+  [type="button"]::-moz-focus-inner,
210
+  [type="reset"]::-moz-focus-inner,
211
+  [type="submit"]::-moz-focus-inner {
212
+    border-style: none;
213
+    padding: 0;
214
+  }
215
+  
216
+  /**
217
+   * Restore the focus styles unset by the previous rule.
218
+   */
219
+  
220
+  button:-moz-focusring,
221
+  [type="button"]:-moz-focusring,
222
+  [type="reset"]:-moz-focusring,
223
+  [type="submit"]:-moz-focusring {
224
+    outline: 1px dotted ButtonText;
225
+  }
226
+  
227
+  /**
228
+   * Correct the padding in Firefox.
229
+   */
230
+  
231
+  fieldset {
232
+    padding: 0.35em 0.75em 0.625em;
233
+  }
234
+  
235
+  /**
236
+   * 1. Correct the text wrapping in Edge and IE.
237
+   * 2. Correct the color inheritance from `fieldset` elements in IE.
238
+   * 3. Remove the padding so developers are not caught out when they zero out
239
+   *    `fieldset` elements in all browsers.
240
+   */
241
+  
242
+  legend {
243
+    box-sizing: border-box; /* 1 */
244
+    color: inherit; /* 2 */
245
+    display: table; /* 1 */
246
+    max-width: 100%; /* 1 */
247
+    padding: 0; /* 3 */
248
+    white-space: normal; /* 1 */
249
+  }
250
+  
251
+  /**
252
+   * Add the correct vertical alignment in Chrome, Firefox, and Opera.
253
+   */
254
+  
255
+  progress {
256
+    vertical-align: baseline;
257
+  }
258
+  
259
+  /**
260
+   * Remove the default vertical scrollbar in IE 10+.
261
+   */
262
+  
263
+  textarea {
264
+    overflow: auto;
265
+  }
266
+  
267
+  /**
268
+   * 1. Add the correct box sizing in IE 10.
269
+   * 2. Remove the padding in IE 10.
270
+   */
271
+  
272
+  [type="checkbox"],
273
+  [type="radio"] {
274
+    box-sizing: border-box; /* 1 */
275
+    padding: 0; /* 2 */
276
+  }
277
+  
278
+  /**
279
+   * Correct the cursor style of increment and decrement buttons in Chrome.
280
+   */
281
+  
282
+  [type="number"]::-webkit-inner-spin-button,
283
+  [type="number"]::-webkit-outer-spin-button {
284
+    height: auto;
285
+  }
286
+  
287
+  /**
288
+   * 1. Correct the odd appearance in Chrome and Safari.
289
+   * 2. Correct the outline style in Safari.
290
+   */
291
+  
292
+  [type="search"] {
293
+    -webkit-appearance: textfield; /* 1 */
294
+    outline-offset: -2px; /* 2 */
295
+  }
296
+  
297
+  /**
298
+   * Remove the inner padding in Chrome and Safari on macOS.
299
+   */
300
+  
301
+  [type="search"]::-webkit-search-decoration {
302
+    -webkit-appearance: none;
303
+  }
304
+  
305
+  /**
306
+   * 1. Correct the inability to style clickable types in iOS and Safari.
307
+   * 2. Change font properties to `inherit` in Safari.
308
+   */
309
+  
310
+  ::-webkit-file-upload-button {
311
+    -webkit-appearance: button; /* 1 */
312
+    font: inherit; /* 2 */
313
+  }
314
+  
315
+  /* Interactive
316
+     ========================================================================== */
317
+  
318
+  /*
319
+   * Add the correct display in Edge, IE 10+, and Firefox.
320
+   */
321
+  
322
+  details {
323
+    display: block;
324
+  }
325
+  
326
+  /*
327
+   * Add the correct display in all browsers.
328
+   */
329
+  
330
+  summary {
331
+    display: list-item;
332
+  }
333
+  
334
+  /* Misc
335
+     ========================================================================== */
336
+  
337
+  /**
338
+   * Add the correct display in IE 10+.
339
+   */
340
+  
341
+  template {
342
+    display: none;
343
+  }
344
+  
345
+  /**
346
+   * Add the correct display in IE 10.
347
+   */
348
+  
349
+  [hidden] {
350
+    display: none;
351
+  }

+ 10
- 5
src/index.js Zobrazit soubor

@@ -2,7 +2,12 @@ import React from 'react';
2 2
 import ReactDOM from 'react-dom/client';
3 3
 import './index.css';
4 4
 import App from './App';
5
-import reportWebVitals from './reportWebVitals';
5
+import '@fontsource/roboto/300.css';
6
+import '@fontsource/roboto/400.css';
7
+import '@fontsource/roboto/500.css';
8
+import '@fontsource/roboto/700.css';
9
+// import reportWebVitals from './reportWebVitals';
10
+
6 11
 
7 12
 const root = ReactDOM.createRoot(document.getElementById('root'));
8 13
 root.render(
@@ -11,7 +16,7 @@ root.render(
11 16
   </React.StrictMode>
12 17
 );
13 18
 
14
-// If you want to start measuring performance in your app, pass a function
15
-// to log results (for example: reportWebVitals(console.log))
16
-// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17
-reportWebVitals();
19
+// // If you want to start measuring performance in your app, pass a function
20
+// // to log results (for example: reportWebVitals(console.log))
21
+// // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
22
+// reportWebVitals();

+ 9
- 0
src/pages/Cart.jsx Zobrazit soubor

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

+ 9
- 0
src/pages/Checkout.jsx Zobrazit soubor

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

+ 50
- 0
src/pages/Home.jsx Zobrazit soubor

@@ -0,0 +1,50 @@
1
+import React from 'react'
2
+import { Box, Typography } from '@mui/material'
3
+import Carousel from '../components/Carousel'
4
+import ProductSelected from '../components/ProductSelected'
5
+import SocialMedia from '../components/SocialMedia'
6
+import Feature from '../components/Feature'
7
+import {Link} from '@mui/material'
8
+import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
9
+import KeyboardArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft';
10
+
11
+const Home = () => {
12
+
13
+  return (
14
+    <>
15
+      <Carousel />
16
+      <Box sx={{ px: 24, mb: 10 }}>
17
+
18
+        <Box sx={{
19
+          display: "flex",
20
+          position: "relative",
21
+          py: 5
22
+        }}>
23
+          <Box
24
+            sx={{
25
+              display: "flex",
26
+              alignItems: "center",
27
+              justifyContent: "center",
28
+              mx: "auto"
29
+            }}
30
+          >
31
+            <KeyboardArrowLeftIcon sx={{ mr: 3, color: "#B7B7B7" }} /> {/* Icon at the start */}
32
+            <Typography variant="h4" sx={{ mx: "auto" }}>
33
+              NEW IN
34
+            </Typography>
35
+            <KeyboardArrowRightIcon sx={{ ml: 3, color: "#B7B7B7" }} /> {/* Icon at the end */}
36
+          </Box>
37
+
38
+          <Link href="#" sx={{ position: "absolute", right: 0, textDecoration: "underline" }}>VIEW ALL</Link>
39
+
40
+        </Box>
41
+
42
+        <ProductSelected />
43
+        <SocialMedia />
44
+        <Feature />
45
+      </Box>
46
+    </>
47
+  )
48
+}
49
+
50
+export default Home

+ 9
- 0
src/pages/Login.jsx Zobrazit soubor

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

+ 9
- 0
src/pages/Newsletter.jsx Zobrazit soubor

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

+ 18
- 0
src/pages/Products/Product.jsx Zobrazit soubor

@@ -0,0 +1,18 @@
1
+import React, { useEffect } from 'react'
2
+import { useParams } from 'react-router-dom'
3
+
4
+
5
+const Product = () => {
6
+
7
+  let { pid } = useParams();
8
+
9
+  useEffect(() => {
10
+
11
+  },[])
12
+
13
+  return (
14
+    <div>{`Product: ${pid}`}</div>
15
+  )
16
+}
17
+
18
+export default Product

+ 23
- 0
src/pages/Products/index.jsx Zobrazit soubor

@@ -0,0 +1,23 @@
1
+import React from 'react'
2
+import PageTitle from '../../components/PageTitle'
3
+import Filter from '../../components/Filter'
4
+import ProductList from '../../components/ProductList'
5
+import { Box } from '@mui/material'
6
+import SocialMedia from '../../components/SocialMedia'
7
+import Feature from '../../components/Feature'
8
+
9
+const Products = () => {
10
+  return (
11
+    <>
12
+      <PageTitle />
13
+      <Box sx={{ px: 24, mb:10 }}>
14
+        <Filter />
15
+        <ProductList size={5}/>
16
+        <SocialMedia />
17
+        <Feature />
18
+      </Box>
19
+    </>
20
+  )
21
+}
22
+
23
+export default Products

+ 0
- 0
src/router.jsx Zobrazit soubor


+ 43
- 0
src/theme/theme.js Zobrazit soubor

@@ -0,0 +1,43 @@
1
+import { createTheme, responsiveFontSizes } from '@mui/material';
2
+
3
+// theme override
4
+let theme = createTheme({
5
+  palette:{
6
+    primary:{
7
+        main:"#95AAC5"
8
+    },
9
+    secondary:{
10
+        main:"##A3ADAE"
11
+    },
12
+    background:{
13
+        paper:"#CCC",
14
+        default:"#FFFFFF",
15
+        black:"#000"
16
+    }
17
+  },
18
+  // general style override
19
+  typography: {
20
+    allVariants: {
21
+      fontWeight: "lighter", // Applies to all text variants
22
+    },
23
+  },
24
+  // component style override
25
+  components:{
26
+    MuiButton:{
27
+      styleOverrides:{
28
+        root:{
29
+          borderRadius:0,
30
+          fontWeight:"lighter",
31
+          paddingLeft:30,
32
+          paddingRight:30,
33
+          color:"#FFF",
34
+        }
35
+      }
36
+    }
37
+  }
38
+
39
+})
40
+
41
+theme = responsiveFontSizes(theme)
42
+
43
+export default theme;

+ 0
- 0
src/utils/format.js Zobrazit soubor


+ 0
- 0
src/utils/helpers.js Zobrazit soubor


Načítá se…
Zrušit
Uložit