Skip to content

Commit 812ef99

Browse files
committed
feature: HOD message in department
1 parent f5dafa3 commit 812ef99

File tree

1 file changed

+57
-31
lines changed
  • app/[locale]/academics/departments/[name]

1 file changed

+57
-31
lines changed

app/[locale]/academics/departments/[name]/page.tsx

Lines changed: 57 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
11
import Image from 'next/image';
22
import Link from 'next/link';
33
import { notFound } from 'next/navigation';
4-
import { FaTrophy } from 'react-icons/fa6';
4+
import { FaPhone, FaTrophy } from 'react-icons/fa6';
55
import { HiMiniBeaker } from 'react-icons/hi2';
6-
import { MdBadge } from 'react-icons/md';
6+
import { MdBadge, MdEmail } from 'react-icons/md';
77

88
import { Button } from '~/components/buttons';
99
import { GalleryCarousel } from '~/components/carousels';
1010
import Heading from '~/components/heading';
1111
import ImageHeader from '~/components/image-header';
12-
import MessageCard from '~/components/message-card';
1312
import { getTranslations } from '~/i18n/translations';
1413
import { cn } from '~/lib/utils';
1514
import { db, departments } from '~/server/db';
1615
import { countChildren } from '~/server/s3';
1716

17+
const hodProfile = {
18+
name: 'Jitender Kumar Chhabra',
19+
designation: 'Professor & Head of Department',
20+
21+
phone: '+91-1744-233-488',
22+
message: [
23+
'Welcome to the Department of Computer Engineering at NIT Kurukshetra. Our department has been at the forefront of computer science education and research since its inception, consistently producing industry-ready professionals and innovative researchers.',
24+
'We are committed to excellence in teaching, research, and innovation. Our state-of-the-art laboratories, experienced faculty, and strong industry connections provide students with the perfect environment for learning and growth.',
25+
],
26+
};
27+
1828
export async function generateStaticParams() {
1929
return await db.select({ name: departments.urlName }).from(departments);
2030
}
@@ -131,35 +141,51 @@ export default async function Department({
131141
/>
132142
</article>
133143

134-
{departmentHead && (
135-
<>
136-
<Heading
137-
className="container"
138-
glyphDirection="rtl"
139-
heading="h3"
140-
id="hod-message"
141-
text={text.headings.hod.title.toUpperCase()}
144+
<section className="container" id="hod-message">
145+
<Heading
146+
glyphDirection="rtl"
147+
heading="h3"
148+
href="#hod-message"
149+
text="HOD's Message"
150+
/>
151+
<article className="flex flex-col gap-6 rounded-lg border border-primary-500 bg-shade-light p-6 md:flex-row md:gap-8 md:p-8">
152+
<Image
153+
alt={hodProfile.name}
154+
className="mx-auto size-48 rounded-lg bg-neutral-200 object-cover md:size-64"
155+
height={256}
156+
width={256}
157+
src="/placeholder-person.jpg"
142158
/>
143-
<section className="container">
144-
<MessageCard
145-
details={{
146-
email: departmentHead.faculty.person.email,
147-
phone: departmentHead.faculty.person.telephone,
148-
session: text.headings.hod.session(
149-
departmentHead.createdOn.toLocaleString(locale, {
150-
year: 'numeric',
151-
numberingSystem: locale === 'hi' ? 'deva' : 'roman',
152-
})
153-
),
154-
}}
155-
image={`persons/${departmentHead.faculty.employeeId}/image.png`}
156-
locale={locale}
157-
name={departmentHead.faculty.person.name}
158-
quote={departmentHead.message}
159-
/>
160-
</section>
161-
</>
162-
)}
159+
<div className="flex flex-col justify-between">
160+
<div className="space-y-4">
161+
<div>
162+
<h4 className="text-xl font-medium text-primary-500">
163+
{hodProfile.name}
164+
</h4>
165+
<p className="text-lg font-medium">{hodProfile.designation}</p>
166+
</div>
167+
<blockquote className="space-y-4 border-l-4 border-primary-500 pl-4 text-lg">
168+
{hodProfile.message.map((paragraph, index) => (
169+
<p key={index}>{paragraph}</p>
170+
))}
171+
</blockquote>
172+
</div>
173+
<div className="mt-4 flex items-center gap-4">
174+
<a
175+
className="text-primary-500 hover:underline"
176+
href={`mailto:${hodProfile.email}`}
177+
>
178+
<MdEmail className="mr-2 inline-block fill-primary-500" />
179+
{hodProfile.email}
180+
</a>
181+
<span className="text-primary-500">
182+
<FaPhone className="mr-2 inline-block fill-primary-500" />
183+
{hodProfile.phone}
184+
</span>
185+
</div>
186+
</div>
187+
</article>
188+
</section>
163189

164190
<Heading
165191
className="container"

0 commit comments

Comments
 (0)