Skip to content

Commit 18da860

Browse files
committed
feature: add quick links section to homepage
1 parent 8d56820 commit 18da860

File tree

4 files changed

+75
-3
lines changed

4 files changed

+75
-3
lines changed

app/[locale]/page.tsx

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
import Image from 'next/image';
2-
import { BsLinkedin } from 'react-icons/bs';
3-
import { FaFacebook, FaInstagram, FaLinkedinIn } from 'react-icons/fa';
2+
import { BsCalendar3, BsClockFill } from 'react-icons/bs';
3+
import {
4+
FaFacebook,
5+
FaGraduationCap,
6+
FaInstagram,
7+
FaLinkedinIn,
8+
} from 'react-icons/fa';
49
import { FaXTwitter } from 'react-icons/fa6';
5-
import { MdEmail, MdPhone } from 'react-icons/md';
10+
import { MdDateRange } from 'react-icons/md';
611

712
import Notifications from '~/app/notifications';
813
import { Button } from '~/components/buttons';
@@ -16,6 +21,7 @@ import {
1621
import Heading from '~/components/heading';
1722
import MessageCard from '~/components/message-card';
1823
import { getTranslations } from '~/i18n/translations';
24+
import { cn } from '~/lib/utils';
1925
import { type events, type notifications } from '~/server/db';
2026

2127
import Events from './events';
@@ -146,6 +152,51 @@ export default async function Home({
146152
}}
147153
/>
148154
</section>
155+
156+
<section className="container mb-8">
157+
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4">
158+
{[
159+
{
160+
label: text.quickLinks.results,
161+
href: 'https://nitkkr.ac.in/result-notification/',
162+
icon: FaGraduationCap,
163+
},
164+
{
165+
label: text.quickLinks.academicCalendar,
166+
href: 'https://nitkkr.ac.in/academic-calender/',
167+
icon: BsCalendar3,
168+
},
169+
{
170+
label: text.quickLinks.examDateSheet,
171+
href: 'https://nitkkr.ac.in/exam-date-sheet/',
172+
icon: MdDateRange,
173+
},
174+
{
175+
label: text.quickLinks.timeTable,
176+
href: 'https://nitkkr.ac.in/institute-time-table/',
177+
icon: BsClockFill,
178+
},
179+
].map(({ label, href, icon: Icon }, index) => (
180+
<Button
181+
key={index}
182+
asChild
183+
className={cn(
184+
'flex flex-col',
185+
'gap-2 md:gap-3 lg:gap-4',
186+
'h-40 md:h-48'
187+
)}
188+
variant="secondary"
189+
>
190+
<a href={href} target="_blank" rel="noopener noreferrer">
191+
<Icon className="size-12" />
192+
<p className="font-serif font-semibold sm:text-lg md:text-xl">
193+
{label}
194+
</p>
195+
</a>
196+
</Button>
197+
))}
198+
</div>
199+
</section>
149200
</>
150201
);
151202
}

i18n/en.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,13 @@ const text: Translations = {
217217
'The newly inaugurated research labs and centers at NIT KKR offer cutting-edge technology and resources for students and faculty alike...',
218218
},
219219
],
220+
quickLinks: {
221+
title: 'Quick Links',
222+
results: 'Results',
223+
academicCalendar: 'Academic Calendar',
224+
examDateSheet: 'Exam Date Sheet',
225+
timeTable: 'Time Table',
226+
},
220227
},
221228
Academics: {
222229
notifications: 'Notifications',

i18n/hi.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,13 @@ const text: Translations = {
211211
'एनआईटी केकेआर में नवनिर्मित अनुसंधान प्रयोगशालाएं और केंद्र छात्रों और संकाय सदस्यों के लिए अत्याधुनिक तकनीक और संसाधन प्रदान करते हैं...',
212212
},
213213
],
214+
quickLinks: {
215+
title: 'त्वरित लिंक',
216+
results: 'परिणाम',
217+
academicCalendar: 'शैक्षणिक कैलेंडर',
218+
examDateSheet: 'परीक्षा दिनांक पत्र',
219+
timeTable: 'समय-सारणी',
220+
},
214221
},
215222
Academics: {
216223
notifications: 'सूचनाएँ',

i18n/translations.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ export interface Translations {
6262
secondary: string;
6363
};
6464
slideshow: { image: string; title: string; subtitle: string }[];
65+
quickLinks: {
66+
title: string;
67+
results: string;
68+
academicCalendar: string;
69+
examDateSheet: string;
70+
timeTable: string;
71+
};
6572
};
6673
Academics: {
6774
notifications: string;

0 commit comments

Comments
 (0)