@@ -10,6 +10,14 @@ import { Button, HamburgerButton } from '~/components/buttons';
1010import { CtrlLink } from '~/components/link' ;
1111import LocaleSwitcher from '~/components/locale-switcher' ;
1212import MaybeLink from '~/components/maybe-link' ;
13+ import {
14+ NavigationMenu ,
15+ NavigationMenuCustomListItem ,
16+ NavigationMenuItem ,
17+ NavigationMenuLink ,
18+ NavigationMenuList ,
19+ navigationMenuTriggerStyle ,
20+ } from '~/components/ui' ;
1321import { getTranslations } from '~/i18n/translations' ;
1422import { cn } from '~/lib/utils' ;
1523import { getServerAuthSession } from '~/server/auth' ;
@@ -22,11 +30,84 @@ export default async function Header({ locale }: { locale: string }) {
2230 const isMacOS = agent . os . name === 'Mac OS' ;
2331
2432 const items = [
25- { label : text . institute , href : 'institute' } ,
26- { label : text . academics , href : 'academics' } ,
33+ {
34+ label : text . institute ,
35+ href : 'institute' ,
36+ listItems : [
37+ {
38+ title : 'Institute Profile' ,
39+ href : '/institute/profile' ,
40+ description :
41+ 'Get to know our institute’s vision, mission, and values.' ,
42+ } ,
43+ {
44+ title : 'Administration' ,
45+ href : '/institute/administration' ,
46+ description : 'Meet the leadership team guiding our institution.' ,
47+ } ,
48+ {
49+ title : 'Sections' ,
50+ href : '/institute/sections' ,
51+ description :
52+ 'Explore the various sections that support campus life and academics.' ,
53+ } ,
54+ {
55+ title : 'Campus Infrastructure' ,
56+ href : '/institute/campus-infra' ,
57+ description :
58+ 'Discover the state-of-the-art facilities and infrastructure on campus.' ,
59+ } ,
60+ ] ,
61+ } ,
62+ {
63+ label : text . academics ,
64+ href : 'academics' ,
65+ listItems : [
66+ {
67+ title : 'Departments' ,
68+ href : '/academics/departments' ,
69+ description :
70+ 'Explore the diverse academic departments and their offerings.' ,
71+ } ,
72+ {
73+ title : 'Programmes' ,
74+ href : '/academics/programmes' ,
75+ description :
76+ 'Discover our range of undergraduate and postgraduate programmes.' ,
77+ } ,
78+ {
79+ title : 'Courses & Curricula' ,
80+ href : '/academics/curricula' ,
81+ description : 'Browse through the detailed list of courses available.' ,
82+ } ,
83+ {
84+ title : 'Convocation' ,
85+ href : '/academics/convocation' ,
86+ description : 'Get information on upcoming convocation ceremonies.' ,
87+ } ,
88+ {
89+ title : 'Awards' ,
90+ href : '/academics/awards' ,
91+ description :
92+ 'Recognizing excellence in academics, research, and beyond.' ,
93+ } ,
94+ {
95+ title : 'Scholarship' ,
96+ href : '/academics/scholarships' ,
97+ description :
98+ 'Learn about scholarships, eligibility, and application details.' ,
99+ } ,
100+ {
101+ title : 'Academic Notifications' ,
102+ href : '/academics/notifications' ,
103+ description :
104+ 'Stay updated with the latest academic announcements and deadlines.' ,
105+ } ,
106+ ] ,
107+ } ,
27108 { label : text . faculty , href : 'faculty-and-staff' } ,
28109 { label : text . placement , href : 'training-and-placement' } ,
29- { label : text . alumni , href : 'alumni' } ,
110+ // { label: text.alumni, href: 'alumni' },
30111 { label : text . activities , href : 'student-activities' } ,
31112 ] ;
32113
@@ -48,16 +129,43 @@ export default async function Header({ locale }: { locale: string }) {
48129 src = "assets/nitlogo.png"
49130 />
50131 </ Link >
132+ < NavigationMenu >
133+ < NavigationMenuList
134+ className = { cn ( 'hidden grow lg:flex' , 'gap-4 xl:gap-5 2xl:gap-6' ) }
135+ >
136+ { items . map ( ( { label, href, listItems } , index ) => (
137+ < NavigationMenuCustomListItem
138+ key = { index }
139+ triggerName = { label }
140+ locale = { locale }
141+ listItems = { listItems }
142+ href = { href }
143+ imageDetails = { {
144+ src : `${ href } /image01.jpg` ,
145+ alt : label ,
146+ href : href ,
147+ } }
148+ />
149+ ) ) }
51150
52- < ol className = { cn ( 'hidden grow lg:flex' , 'gap-4 xl:gap-5 2xl:gap-6' ) } >
53- { items . map ( ( { label, href } , index ) => (
54- < li className = "my-auto min-h-fit" key = { index } >
55- < Link href = { `/${ locale } /${ href } ` } prefetch >
56- { label }
151+ { /* <NavigationMenuCustomListItem
152+ triggerName={items[0].label}
153+ imageDetails={{
154+ src: 'https://s3-alpha-sig.figma.com/img/054e/19b7/43c945f2ee30e43f797f944b1c02fe2e?Expires=1728259200&Key-Pair-Id=APKAQ4GOSFWCVNEHN3O4&Signature=TjH6LvDVUoTwEvUvc02-8DAwccrJ9YRqDqTy5h-0O0cYSVWG03it8-zr5OSBcjGVuu5TMnV7ZlnEiM3CIHQ3mQAy7Z3~Bv2sbCL8plMbE0GDxzmjpaVkKPAfgbMpuyofWABnyQjH4cda6qWEzeBuGEw~KQfFxVuAA-wHYTA6GL~B776fRbfdfzNxtSqucrIEqfGG1nUMFEdxvTLMPCqXTjErPikIs2rDXtAZ3K3U4suPFFqLRyBQ9H0B3DAGDzxZ64CIVLkAaE~ALCRy1BBUDyXrU24E1~BeTobiCoR0q1WcnBOPMKpnUb0c2qTyaDz8BxMe9hMMI9vGnv4fxdqGBA__',
155+ alt: items[0].label,
156+ href: items[0].href,
157+ }}
158+ listItems={components}
159+ /> */ }
160+ { /* <NavigationMenuItem>
161+ <Link href="/docs" legacyBehavior passHref>
162+ <NavigationMenuLink className={navigationMenuTriggerStyle()}>
163+ Documentation
164+ </NavigationMenuLink>
57165 </Link>
58- </ li >
59- ) ) }
60- </ ol >
166+ </NavigationMenuItem> */ }
167+ </ NavigationMenuList >
168+ </ NavigationMenu >
61169
62170 < ol className = "inline-flex h-10 gap-2" >
63171 < li className = "flex h-full rounded-xl border border-neutral-500 bg-neutral-50" >
0 commit comments