|
1 | 1 | import Image from 'next/image'; |
2 | 2 | import Link from 'next/link'; |
3 | 3 | import { notFound } from 'next/navigation'; |
4 | | -import { FaTrophy } from 'react-icons/fa6'; |
| 4 | +import { FaPhone, FaTrophy } from 'react-icons/fa6'; |
5 | 5 | import { HiMiniBeaker } from 'react-icons/hi2'; |
6 | | -import { MdBadge } from 'react-icons/md'; |
| 6 | +import { MdBadge, MdEmail } from 'react-icons/md'; |
7 | 7 |
|
8 | 8 | import { Button } from '~/components/buttons'; |
9 | 9 | import { GalleryCarousel } from '~/components/carousels'; |
10 | 10 | import Heading from '~/components/heading'; |
11 | 11 | import ImageHeader from '~/components/image-header'; |
12 | | -import MessageCard from '~/components/message-card'; |
13 | 12 | import { getTranslations } from '~/i18n/translations'; |
14 | 13 | import { cn } from '~/lib/utils'; |
15 | 14 | import { db, departments } from '~/server/db'; |
16 | 15 | import { countChildren } from '~/server/s3'; |
17 | 16 |
|
| 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 | + |
18 | 28 | export async function generateStaticParams() { |
19 | 29 | return await db.select({ name: departments.urlName }).from(departments); |
20 | 30 | } |
@@ -131,35 +141,51 @@ export default async function Department({ |
131 | 141 | /> |
132 | 142 | </article> |
133 | 143 |
|
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" |
142 | 158 | /> |
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> |
163 | 189 |
|
164 | 190 | <Heading |
165 | 191 | className="container" |
|
0 commit comments