Skip to content

Commit acabcfa

Browse files
refactor navigation menu labels and structure
1 parent c677fd8 commit acabcfa

File tree

2 files changed

+42
-53
lines changed

2 files changed

+42
-53
lines changed

src/components/menu/main-menu/megamenu.tsx

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const Megamenu = ({ className, align, menu, ...rest }: TProps) => {
1313
return (
1414
<div
1515
className={clsx(
16-
"tw-w-[1170px] tw-flex tw-flex-wrap tw-absolute tw-z-20 tw-top-full tw-mt-5 tw-invisible tw-opacity-0 tw-pt-7.5 tw-pb-[34px] tw-px-3.8 tw-shadow-2md tw-shadow-black/5 tw-bg-white tw-border-b-4 tw-border-b-primary tw-transition-all tw-duration-300",
16+
"tw-invisible tw-absolute tw-top-full tw-z-20 tw-mt-5 tw-flex tw-w-[1170px] tw-flex-wrap tw-border-b-4 tw-border-b-primary tw-bg-white tw-px-3.8 tw-pb-[34px] tw-pt-7.5 tw-opacity-0 tw-shadow-2md tw-shadow-black/5 tw-transition-all tw-duration-300",
1717
align === "left" && "tw-left-0",
1818
align === "center" && "tw-left-1/2 -tw-translate-x-1/2",
1919
className
@@ -24,7 +24,7 @@ const Megamenu = ({ className, align, menu, ...rest }: TProps) => {
2424
<div
2525
key={id}
2626
className={clsx(
27-
"tw-px-3.8 tw-shrink-0 tw-grow-0",
27+
"tw-shrink-0 tw-grow-0 tw-px-3.8",
2828
submenu && "tw-w-1/4 tw-basis-1/4",
2929
banner && "tw-w-1/2 tw-basis-1/2"
3030
)}
@@ -37,7 +37,7 @@ const Megamenu = ({ className, align, menu, ...rest }: TProps) => {
3737
<Anchor
3838
path={nav.path}
3939
className={clsx(
40-
"tw-leading-relaxed tw-block tw-font-medium tw-py-2 hover:tw-text-heading",
40+
"tw-block tw-py-2 tw-font-medium tw-leading-relaxed hover:tw-text-heading",
4141
nav.status === "coming soon" && "tw-pointer-events-none"
4242
)}
4343
>
@@ -48,9 +48,10 @@ const Megamenu = ({ className, align, menu, ...rest }: TProps) => {
4848
nav.status === "hot" ? "gradient" : "primary"
4949
}
5050
size="xs"
51-
className="tw-ml-2.5 tw-font-bold tw-tracking-wide tw-uppercase"
51+
variant="contained"
52+
className="tw-ml-2.5 tw-font-bold tw-uppercase tw-tracking-wide"
5253
>
53-
{nav.status}
54+
{nav.status.toUpperCase()}
5455
</Badge>
5556
)}
5657
</Anchor>

src/data/menu.ts

+36-48
Original file line numberDiff line numberDiff line change
@@ -36,86 +36,74 @@ type NavigationItem = SubMenuItem | MegaMenuItem;
3636
const navigation: NavigationItem[] = [
3737
{
3838
id: 1,
39-
label: "Home",
40-
path: "/",
39+
label: "Train",
40+
path: "#!",
41+
submenu: [
42+
{
43+
id: 11,
44+
label: "Start Your Mission",
45+
path: "/apply",
46+
},
47+
{
48+
id: 13,
49+
label: "FAQ",
50+
path: "/faq",
51+
},
52+
],
4153
},
4254
{
4355
id: 2,
44-
label: "About",
56+
label: "Build",
4557
path: "#!",
4658
submenu: [
4759
{
48-
id: 21,
49-
label: "About Us",
50-
path: "/about-us",
51-
},
52-
{
53-
id: 22,
54-
label: "Projects",
60+
id: 14,
61+
label: "Open Source Projects",
5562
path: "/projects",
5663
},
5764
{
58-
id: 23,
59-
label: "Subjects",
65+
id: 15,
66+
label: "Subjects & Skills",
6067
path: "/subjects/all",
6168
},
62-
{
63-
id: 24,
64-
label: "FAQ",
65-
path: "/faq",
66-
},
6769
],
6870
},
6971
{
7072
id: 3,
71-
label: "Apply",
73+
label: "Lead",
7274
path: "#!",
7375
submenu: [
7476
{
75-
id: 31,
77+
id: 16,
7678
label: "Become a Mentor",
7779
path: "/mentor",
7880
},
7981
{
80-
id: 32,
81-
label: "Apply to be a Student",
82-
path: "/apply",
83-
status: "new",
82+
id: 17,
83+
label: "Donate",
84+
path: "/donate",
8485
},
85-
],
86-
},
87-
{
88-
id: 4,
89-
label: "Blog",
90-
path: "/blogs/blog",
91-
},
92-
{
93-
id: 5,
94-
label: "Contact Us",
95-
path: "/contact-us",
96-
},
97-
{
98-
id: 6,
99-
label: "Support",
100-
path: "#!",
101-
submenu: [
10286
{
103-
id: 61,
87+
id: 18,
10488
label: "Events",
10589
path: "/events",
10690
},
10791
{
108-
id: 62,
92+
id: 19,
93+
label: "Stories",
94+
path: "/blogs/blog",
95+
},
96+
{
97+
id: 20,
98+
label: "Contact",
99+
path: "/contact-us",
100+
},
101+
{
102+
id: 21,
109103
label: "Shop",
110104
path: "https://hashflag.shop/",
111105
external: true,
112106
},
113-
{
114-
id: 63,
115-
label: "Donate",
116-
path: "/donate",
117-
status: "hot",
118-
},
119107
],
120108
},
121109
];

0 commit comments

Comments
 (0)