Browse Source

feat module 5 : add store locator above footer section

master
nadia 1 day ago
parent
commit
27ac692996
3 changed files with 165 additions and 3 deletions
  1. BIN
      public/AMBERIOISTORE.jpeg
  2. BIN
      public/AMBERSWMSTORE.jpeg
  3. 165
    3
      src/pages/Home.jsx

BIN
public/AMBERIOISTORE.jpeg View File


BIN
public/AMBERSWMSTORE.jpeg View File


+ 165
- 3
src/pages/Home.jsx View File

1
 import React from 'react'
1
 import React from 'react'
2
-import { Box, Typography } from '@mui/material'
2
+import { Box, Button, Typography } from '@mui/material'
3
 import Grid from '@mui/material/Grid2';
3
 import Grid from '@mui/material/Grid2';
4
+import LocationOnIcon from '@mui/icons-material/LocationOn';
4
 import CarouselContainer from '../components/CarouselContainer'
5
 import CarouselContainer from '../components/CarouselContainer'
5
 import ProductSelected from '../components/ProductSelected'
6
 import ProductSelected from '../components/ProductSelected'
6
-import SocialMedia from '../components/SocialMedia'
7
+// import SocialMedia from '../components/SocialMedia'
7
 // import Feature from '../components/Feature'
8
 // import Feature from '../components/Feature'
8
-import { Link } from '@mui/material'
9
+// import { Link } from '@mui/material'
9
 import VideoAds from '../components/VideoAds'
10
 import VideoAds from '../components/VideoAds'
10
 import ProductType from '../components/ProductType';
11
 import ProductType from '../components/ProductType';
11
 // import NewsLetter from '../components/NewsLetter';
12
 // import NewsLetter from '../components/NewsLetter';
14
 import AmberBeautyWallpaper from "../assets/images/amberBeautyWallpaper.webp";
15
 import AmberBeautyWallpaper from "../assets/images/amberBeautyWallpaper.webp";
15
 import AmberClothing from "../assets/images/MAINHEADER-13.webp"
16
 import AmberClothing from "../assets/images/MAINHEADER-13.webp"
16
 
17
 
18
+const stores = [
19
+  {
20
+    // name: "AMBER IOI STORE",
21
+    // address: "IOI City Mall",
22
+    name: "IOI CITY MALL",
23
+    address: "G-67 IOI CITY MALL, PUTRAJAYA",
24
+    image: "/AMBERIOISTORE.jpeg",
25
+    directionUrl: "https://www.google.com/maps/search/?api=1&query=IOI%20City%20Mall%20Putrajaya"
26
+  },
27
+  {
28
+    // name: "AMBER SWM STORE",
29
+    // address: "Wangsa Walk Mall",
30
+    name: "WANGSA WALK MALL",
31
+    address: "LOT G-77, WANGSA WALK MALL, KUALA LUMPUR",
32
+    image: "/AMBERSWMSTORE.jpeg",
33
+    directionUrl: "https://www.google.com/maps/search/?api=1&query=AMBER%20Wangsa%20Walk%20Mall"
34
+  }
35
+]
36
+
17
 const Home = () => {
37
 const Home = () => {
18
 
38
 
19
   React.useEffect(()=>{
39
   React.useEffect(()=>{
79
         {/*
99
         {/*
80
         <Feature />
100
         <Feature />
81
         */}
101
         */}
102
+
103
+        <Box id="find-us" sx={{ textAlign: "center", mt: 6 }}>
104
+          <Typography
105
+            component="a"
106
+            href="#find-us"
107
+            variant="body1"
108
+            sx={{
109
+              color: "inherit",
110
+              display: "inline-block",
111
+              fontWeight: "400",
112
+              fontSize: "1rem",
113
+              mb: 4,
114
+              letterSpacing: 0,
115
+              textDecoration: "none",
116
+              textTransform: "uppercase"
117
+            }}
118
+          >
119
+            FIND US
120
+          </Typography>
121
+
122
+          <Grid
123
+            container
124
+            spacing={2}
125
+            sx={{
126
+              maxWidth: 1200,
127
+              mx: "auto"
128
+            }}
129
+          >
130
+            {stores.map(({ name, address, image, directionUrl }) => (
131
+              <Grid key={name} size={{ xs: 12, md: 6 }}>
132
+                <Box
133
+                  sx={{
134
+                    position: "relative",
135
+                    height: {
136
+                      xs: 280,
137
+                      sm: 360,
138
+                      md: 400
139
+                    },
140
+                    overflow: "hidden",
141
+                    borderRadius: "4px",
142
+                    textAlign: "left",
143
+                    "&:hover .store-image": {
144
+                      transform: "scale(1.06)"
145
+                    }
146
+                  }}
147
+                >
148
+                  <Box
149
+                    className="store-image"
150
+                    sx={{
151
+                      position: "absolute",
152
+                      inset: 0,
153
+                      backgroundImage: `url("${image}")`,
154
+                      backgroundSize: "cover",
155
+                      backgroundPosition: "center",
156
+                      transition: "transform 550ms ease",
157
+                      transform: "scale(1)"
158
+                    }}
159
+                  />
160
+                  <Box
161
+                    sx={{
162
+                      position: "absolute",
163
+                      inset: 0,
164
+                      background: "linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,0.62) 100%)"
165
+                    }}
166
+                  />
167
+                  <Box
168
+                    sx={{
169
+                      position: "absolute",
170
+                      left: {
171
+                        xs: 8,
172
+                        md: 9
173
+                      },
174
+                      right: {
175
+                        xs: 3,
176
+                        md: 4
177
+                      },
178
+                      bottom: {
179
+                        xs: 8,
180
+                        md: 9
181
+                      },
182
+                      color: "#FFF"
183
+                    }}
184
+                  >
185
+                    <Typography
186
+                      variant="h4"
187
+                      sx={{
188
+                        fontWeight: "700",
189
+                        mb: 0.5,
190
+                        textTransform: "uppercase",
191
+                        fontSize: {
192
+                          xs: "1.45rem",
193
+                          md: "1.65rem"
194
+                        },
195
+                        lineHeight: 1.1,
196
+                        textShadow: "0 1px 8px rgba(0,0,0,0.55)"
197
+                      }}
198
+                    >
199
+                      {name}
200
+                    </Typography>
201
+                    <Typography
202
+                      variant="body2"
203
+                      sx={{
204
+                        fontWeight: "400",
205
+                        mb: 2,
206
+                        textTransform: "uppercase",
207
+                        fontSize: {
208
+                          xs: "0.8rem",
209
+                          md: "0.9rem"
210
+                        },
211
+                        textShadow: "0 1px 8px rgba(0,0,0,0.55)"
212
+                      }}
213
+                    >
214
+                      {address}
215
+                    </Typography>
216
+                    <Button
217
+                      href={directionUrl}
218
+                      target="_blank"
219
+                      rel="noreferrer"
220
+                      variant="contained"
221
+                      sx={{
222
+                        backgroundColor: "#000",
223
+                        color: "#FFF",
224
+                        textTransform: "none",
225
+                        borderRadius: "4px",
226
+                        minHeight: 38,
227
+                        px: 2,
228
+                        fontWeight: "700",
229
+                        fontSize: "0.875rem",
230
+                        "&:hover": {
231
+                          backgroundColor: "#222"
232
+                        }
233
+                      }}
234
+                      startIcon={<LocationOnIcon />}
235
+                    >
236
+                      Directions
237
+                    </Button>
238
+                  </Box>
239
+                </Box>
240
+              </Grid>
241
+            ))}
242
+          </Grid>
243
+        </Box>
82
       </Box>
244
       </Box>
83
 
245
 
84
 
246
 

Loading…
Cancel
Save