Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
sujata
/
Akruti-Frontend
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Registry
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 02033113
authored
2026-01-19 16:02:32 +0530
by
Ravindra Kanojiya
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
updated menu
1 parent
b18a0350
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
70 deletions
components/Layout/Header.js
components/data/collectionsData.js
styles/globals.css
components/Layout/Header.js
View file @
0203311
...
...
@@ -133,8 +133,15 @@ export default function Navigation() {
// const [level1, setLevel1] = useState(collectionsMenu[0] ?? null);
// const [level2, setLevel2] = useState(collectionsMenu[0]?.subCategories[0] ?? null);
const
[
level1
,
setLevel1
]
=
useState
(
collectionsData
[
0
]);
const
[
level2
,
setLevel2
]
=
useState
(
collectionsData
[
0
].
subCategories
[
0
]);
// COLLECTION
const
[
collectionL1
,
setCollectionL1
]
=
useState
(
collectionsData
[
0
]);
const
[
collectionL2
,
setCollectionL2
]
=
useState
(
collectionsData
[
0
].
subCategories
[
0
]
);
// BRANDS
const
[
brandL1
,
setBrandL1
]
=
useState
(
brandsData
[
0
]);
const
[
mobileStep
,
setMobileStep
]
=
useState
(
"main"
);
...
...
@@ -186,7 +193,10 @@ export default function Navigation() {
/>
<
/Navbar.Brand
>
<
Nav
className
=
"d-none d-lg-flex ms-4 gap-4"
>
<
Nav
.
Item
className
=
"nav-item dropdown-custom"
>
<
Nav
.
Item
className
=
"nav-item dropdown-custom"
onMouseEnter
=
{()
=>
{
setCollectionL1
(
collectionsData
[
0
]);
setCollectionL2
(
collectionsData
[
0
].
subCategories
[
0
]);
}}
>
<
Link
href
=
{
collectionsData
?.
length
...
...
@@ -213,11 +223,11 @@ export default function Navigation() {
<
Link
href
=
{
`/collections/
${
cat
.
categorySlug
}
`
}
onMouseEnter
=
{()
=>
{
setLevel
1
(
cat
);
setLevel2
(
cat
.
subCategories
[
0
]);
}}
setCollectionL
1
(
cat
);
setCollectionL2
(
cat
.
subCategories
[
0
]);
// reset level 2
}}
className
=
{
level
1
.
categorySlug
===
cat
.
categorySlug
collectionL
1
.
categorySlug
===
cat
.
categorySlug
?
"active"
:
""
}
...
...
@@ -229,18 +239,16 @@ export default function Navigation() {
<
/ul
>
<
/Col
>
<
Col
md
=
{
4
}
>
<
h6
className
=
"nav-head01"
>
{
level1
.
categoryName
}
<
/h6
>
<
h6
>
{
collectionL1
.
categoryName
}
<
/h6
>
<
ul
className
=
"navList01"
>
{
level
1
.
subCategories
.
map
((
sub
)
=>
(
{
collectionL
1
.
subCategories
.
map
((
sub
)
=>
(
<
li
key
=
{
sub
.
subCategorySlug
}
>
<
Link
href
=
{
`/collections/
${
level
1
.
categorySlug
}
/
${
sub
.
subCategorySlug
}
`
}
onMouseEnter
=
{()
=>
set
Level
2
(
sub
)}
href
=
{
`/collections/
${
collectionL
1
.
categorySlug
}
/
${
sub
.
subCategorySlug
}
`
}
onMouseEnter
=
{()
=>
set
CollectionL
2
(
sub
)}
className
=
{
level
2
.
subCategorySlug
===
collectionL
2
.
subCategorySlug
===
sub
.
subCategorySlug
?
"active"
:
""
...
...
@@ -253,15 +261,13 @@ export default function Navigation() {
<
/ul
>
<
/Col
>
<
Col
md
=
{
4
}
>
<
h6
className
=
"nav-head01"
>
{
level2
.
subCategoryName
}
<
/h6
>
<
h6
>
{
collectionL2
.
subCategoryName
}
<
/h6
>
<
ul
className
=
"navList01"
>
{
level
2
.
products
.
map
((
product
)
=>
(
{
collectionL
2
.
products
.
map
((
product
)
=>
(
<
li
key
=
{
product
.
productSlug
}
>
<
Link
href
=
{
`/collections/
${
level1
.
categorySlug
}
/
${
level
2
.
subCategorySlug
}
/
${
product
.
productSlug
}
`
}
href
=
{
`/collections/
${
collectionL1
.
categorySlug
}
/
${
collectionL
2
.
subCategorySlug
}
/
${
product
.
productSlug
}
`
}
>
{
product
.
title
}
<
/Link
>
...
...
@@ -273,11 +279,12 @@ export default function Navigation() {
<
/Col
>
<
Col
md
=
{
4
}
>
<
Row
>
{
level
1
.
subCategories
?.
slice
(
0
,
2
).
map
((
sub
)
=>
(
{
collectionL
1
.
subCategories
?.
slice
(
0
,
2
).
map
((
sub
)
=>
(
<
Col
md
=
{
6
}
key
=
{
sub
.
subCategorySlug
}
>
<
Link
href
=
{
`/collections/
${
level1
.
categorySlug
}
/
${
sub
.
subCategorySlug
}
`
}
onMouseEnter
=
{()
=>
setLevel2
(
sub
)}
href
=
{
`/collections/
${
collectionL1
.
categorySlug
}
/
${
sub
.
subCategorySlug
}
`
}
onMouseEnter
=
{()
=>
setCollectionL2
(
sub
)}
>
<
Image
src
=
{
sub
.
subCategoryImage
}
...
...
@@ -286,7 +293,7 @@ export default function Navigation() {
alt
=
{
sub
.
subCategoryName
}
className
=
"img-fluid"
/
>
<
p
className
=
"mt-1"
>
{
sub
.
subCategoryName
}
<
/p
>
<
p
className
=
"
img-head
mt-1"
>
{
sub
.
subCategoryName
}
<
/p
>
<
/Link
>
<
/Col
>
))}
...
...
@@ -297,18 +304,12 @@ export default function Navigation() {
<
/div
>
<
/Nav.Item
>
<
Nav
.
Item
className
=
"nav-item dropdown-custom"
>
<
Link
href
=
{
collectionsData
?.
length
?
`/collections/
${
brandsData
[
0
].
categorySlug
}
`
:
"#"
}
className
=
"nav-link"
onClick
=
{()
=>
setShow
(
false
)}
>
Brands
<
/Link
>
<
Nav
.
Item
className
=
"nav-item dropdown-custom"
onMouseEnter
=
{()
=>
{
setBrandL1
(
brandsData
[
0
]);
}}
>
<
Link
href
=
"/brands"
className
=
"nav-link"
>
Brands
<
/Link
>
<
div
className
=
"dropdown-menu"
>
<
div
className
=
"dropdown-menu-inner custom_container"
>
...
...
@@ -316,37 +317,34 @@ export default function Navigation() {
<
Col
md
=
{
8
}
>
<
Row
>
<
Col
md
=
{
4
}
>
<
h6
className
=
"nav-head01"
>
Brands
<
/h6
>
<
h6
className
=
"nav-head01"
>
{
brandL1
.
categoryName
}
<
/h6
>
<
ul
className
=
"navList01"
>
{
brandsData
.
map
((
brand
)
=>
(
<
li
key
=
{
brand
.
categorySlug
}
>
<
Link
href
=
{
`/brands/
${
brand
.
categorySlug
}
`
}
onMouseEnter
=
{()
=>
setLevel1
(
brand
)}
className
=
{
level1
?.
categorySlug
===
brand
.
categorySlug
?
"active"
:
""
}
>
{
brand
.
categoryName
}
<
/Link
>
<
/li
>
))}
<
li
key
=
{
brand
.
categorySlug
}
>
<
Link
href
=
{
`/brands/
${
brand
.
categorySlug
}
`
}
onMouseEnter
=
{()
=>
setBrandL1
(
brand
)}
className
=
{
brandL1
?.
categorySlug
===
brand
.
categorySlug
?
"active"
:
""
}
>
{
brand
.
categoryName
}
<
/Link
>
<
/li
>
))}
<
/ul
>
<
/Col
>
<
Col
md
=
{
4
}
>
<
h6
className
=
"nav-head01"
>
{
level
1
?.
categoryName
}
{
brandL
1
?.
categoryName
}
<
/h6
>
<
ul
className
=
"navList01"
>
{
level
1
?.
subCategories
?.
map
((
sub
)
=>
(
{
brandL
1
?.
subCategories
?.
map
((
sub
)
=>
(
<
li
key
=
{
sub
.
subCategorySlug
}
>
<
Link
href
=
{
`/brands/
${
level
1
.
categorySlug
}
/
${
sub
.
subCategorySlug
}
`
}
href
=
{
`/brands/
${
brandL
1
.
categorySlug
}
/
${
sub
.
subCategorySlug
}
`
}
>
{
sub
.
subCategoryName
}
<
/Link
>
...
...
@@ -358,10 +356,10 @@ export default function Navigation() {
<
/Col
>
<
Col
md
=
{
4
}
>
<
Row
>
{
level
1
?.
subCategories
?.
slice
(
0
,
2
).
map
((
sub
)
=>
(
{
brandL
1
?.
subCategories
?.
slice
(
0
,
2
).
map
((
sub
)
=>
(
<
Col
md
=
{
6
}
key
=
{
sub
.
subCategorySlug
}
>
<
Link
href
=
{
`/brands/
${
level
1
.
categorySlug
}
/
${
sub
.
subCategorySlug
}
`
}
href
=
{
`/brands/
${
brandL
1
.
categorySlug
}
/
${
sub
.
subCategorySlug
}
`
}
>
<
Image
src
=
{
sub
.
subCategoryImage
}
...
...
@@ -370,7 +368,7 @@ export default function Navigation() {
alt
=
{
sub
.
subCategoryName
}
className
=
"img-fluid"
/
>
<
p
className
=
"mt-1"
>
{
sub
.
subCategoryName
}
<
/p
>
<
p
className
=
"mt-1
img-head
"
>
{
sub
.
subCategoryName
}
<
/p
>
<
/Link
>
<
/Col
>
))}
...
...
components/data/collectionsData.js
View file @
0203311
...
...
@@ -90,8 +90,8 @@ export const collectionsData = [
categoryName
:
"Wardrobes"
,
subCategories
:
[
{
subCategorySlug
:
"
indoor-kitchen
s"
,
subCategoryName
:
"
Indoor Kitchen
s"
,
subCategorySlug
:
"
cabinet-free-wardrobe
s"
,
subCategoryName
:
"
Cabinet Free Wardrobe
s"
,
subCategoryImage
:
"/image/collection-page/indoor-kitchens.png"
,
products
:
[
{
...
...
@@ -122,8 +122,8 @@ export const collectionsData = [
],
},
{
subCategorySlug
:
"
outdoor-kitchens
"
,
subCategoryName
:
"
Outdoor Kitchens
"
,
subCategorySlug
:
"
glass-wardrobes
"
,
subCategoryName
:
"
Glass Wardrobes
"
,
subCategoryImage
:
"/image/collection-page/outdoor-kitchens.png"
,
products
:
[
{
...
...
@@ -134,8 +134,8 @@ export const collectionsData = [
],
},
{
subCategorySlug
:
"
pantry-and-coffee-bar
"
,
subCategoryName
:
"
Pantry and coffee bar
"
,
subCategorySlug
:
"
open-wardrobes
"
,
subCategoryName
:
"
Open Wardrobes
"
,
subCategoryImage
:
"/image/collection-page/pantry.png"
,
products
:
[
{
...
...
@@ -146,8 +146,8 @@ export const collectionsData = [
],
},
{
subCategorySlug
:
"
sepecial-element
s"
,
subCategoryName
:
"
Sepecial Element
s"
,
subCategorySlug
:
"
walk-in-wardrobe
s"
,
subCategoryName
:
"
Walk-in Wardrobe
s"
,
subCategoryImage
:
"/image/collection-page/special-elements.png"
,
products
:
[
{
...
...
@@ -158,8 +158,8 @@ export const collectionsData = [
],
},
{
subCategorySlug
:
"
kitchen-accessorie
s"
,
subCategoryName
:
"
Kitchen Accessorie
s"
,
subCategorySlug
:
"
island
s"
,
subCategoryName
:
"
Island
s"
,
subCategoryImage
:
"/image/collection-page/kitchchen-Accessories.png"
,
products
:
[
{
...
...
styles/globals.css
View file @
0203311
...
...
@@ -560,7 +560,7 @@ input:focus-visible {
padding
:
0
;
}
.navList01
li
{
padding
:
0.
4
rem
0
;
padding
:
0.
3
rem
0
;
}
.navList01
a
{
color
:
#000
;
...
...
@@ -677,7 +677,10 @@ input:focus-visible {
.copyright
{
font-size
:
14px
;
}
.custom-navbar
.dropdown-menu-inner
.img-head
{
color
:
#000
;
text-transform
:
uppercase
;
}
@media
only
screen
and
(
max-width
:
1023px
)
{
}
/* ===== Mobile ===== */
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment