diff --git a/app/[locale]/director-message/page.tsx b/app/[locale]/director-message/page.tsx index 725f8201..054c15b3 100644 --- a/app/[locale]/director-message/page.tsx +++ b/app/[locale]/director-message/page.tsx @@ -1,7 +1,64 @@ +import Image from 'next/image'; + import Heading from '~/components/heading'; import { getTranslations } from '~/i18n/translations'; import { getS3Url } from '~/server/s3'; +const directorCard = { + image: `${getS3Url()}/assets/director.jpeg`, + alt: "Director's Image", + title: 'Director', + name: 'Professor B.V. Ramana Reddy', + position: 'Director', + institute: 'National Institute of Technology, Kurukshetra', + contact: { + phone: ['01744-233201', '01744-233204', '01744-238083'], + fax: '01744-238494', + mobile: '+91 74978 22212', + email: 'director@nitkkr.ac.in', + }, +}; + +// Placeholder data for office cards. Replace with real data as needed. +const directorOfficeCards = [ + { + image: `${getS3Url()}/assets/office.jpeg`, + alt: "Director's Office Image 1", + name: 'Arun Goel', + position: 'Professor (Head of the Department)', + email: 'drarun_goel@yahoo.co.in', + phone: ['01744-233349', '01744-233300'], + }, + { + image: `${getS3Url()}/assets/office.jpeg`, + alt: "Director's Office Image 2", + name: 'Arun Goel', + position: 'Professor (Head of the Department)', + email: 'drarun_goel@yahoo.co.in', + phone: ['01744-233349', '01744-233300'], + }, + { + image: `${getS3Url()}/assets/office.jpeg`, + alt: "Director's Office Image 3", + name: 'Arun Goel', + position: 'Professor (Head of the Department)', + email: 'drarun_goel@yahoo.co.in', + phone: ['01744-233349', '01744-233300'], + }, + { + image: `${getS3Url()}/assets/office.jpeg`, + alt: "Director's Office Image 4", + name: 'Arun Goel', + position: 'Professor (Head of the Department)', + email: 'drarun_goel@yahoo.co.in', + phone: ['01744-233349', '01744-233300'], + }, +]; +const directorOffice = { + title: "Director's Office", + cards: directorOfficeCards, +}; + export default async function DirectorCorner({ params: { locale }, }: { @@ -10,55 +67,182 @@ export default async function DirectorCorner({ const text = (await getTranslations(locale)).DirectorMessage; return ( <> -
- -
-

- {text.message.slice(0, 7).map((message, index) => ( - - {message} - - ))} -

-
-
-

- {text.message.slice(7, 9).map((message, index) => ( - - {message} - - ))} -

-
-
-

- {text.message.slice(9, 11).map((message, index) => ( - - {message} - +

+ +
+ +
+
+ + {/* For DIRECTOR OFFICE CARDS */} +
+
+ +
+ {directorOffice.cards.map((card, index) => ( + ))} -

-
-
-

- {text.message[11]} -

-
-
-

- {text.message[12]} -

-
-
+ + + + {/* For DIRECTOR's MESSAGE */} +
+
+ +
+
+ {(text.message as unknown as string[]).map((message, index) => ( + = 9 && index <= 10 + ? 'mb-3 block' + : 'mb-5 block' + } + > + {message.toString()} + + ))} +
+
+
+
); } + +const Card = ({ + imageAlt, + imageSrc, + name, + designation, + isDepartmentHead = false, + departmentHeadText = '', + contactDetails, +}: { + imageAlt: string; + imageSrc: string; + name: string; + designation: string; + isDepartmentHead?: boolean; + departmentHeadText?: string; + contactDetails: { label: string; icon?: React.ReactNode | string }[]; +}) => { + return ( +
+
+
+ {imageAlt} +
+
+

{name}

+

+ {designation} + {isDepartmentHead && ` (${departmentHeadText})`} +

+
+
    + {contactDetails.map((detail, index) => ( +
  • + + {detail.icon} + + :{detail.label} +
  • + ))} +
+
+
+
+
+ ); +};