diff --git a/app/page.tsx b/app/page.tsx index 4d8d7f9..bd39d91 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,4 +1,5 @@ import Personality from '../components/home/Personality'; +import ProvostSection from '../components/home/ProvostSection'; import HeroSection from '../components/home/HeroSection' import React from 'react' import RecentEvent from '../components/home/RecentEvent'; @@ -20,6 +21,7 @@ const Home = () => { isScroll={true} /> + diff --git a/components/events/EventDetail.tsx b/components/events/EventDetail.tsx index bdc0863..8113da2 100644 --- a/components/events/EventDetail.tsx +++ b/components/events/EventDetail.tsx @@ -1,10 +1,13 @@ 'use client'; import Image from 'next/image'; -import { MapPin, Calendar, ExternalLink, ArrowLeft } from 'lucide-react'; +import { MapPin, Calendar, ExternalLink, ArrowLeft, Image as ImageIcon } from 'lucide-react'; import { EventItem } from '@/hooks/useEventCollection'; import Link from 'next/link'; import { useState } from 'react'; +import ReactMarkdown from 'react-markdown'; +import remarkGfm from 'remark-gfm'; +import remarkBreaks from 'remark-breaks'; interface EventDetailProps { event: EventItem; @@ -13,7 +16,7 @@ interface EventDetailProps { const EventDetail: React.FC = ({ event }) => { const [mapLoading, setMapLoading] = useState(true); - const { title, description, eventDate, eventImage, venue, onlineLink } = event; + const { title, description, eventDate, eventImage, venue, onlineLink, eventImagesCollection } = event; const dateObj = new Date(eventDate); const formattedDate = dateObj.toLocaleDateString("en-US", { @@ -74,12 +77,56 @@ const EventDetail: React.FC = ({ event }) => {

About the Event

- {description.split('\n').map((paragraph, idx) => ( -

{paragraph}

- ))} +

, + ul: ({ node, ...props }: any) =>

    , + ol: ({ node, ...props }: any) =>
      , + li: ({ node, ...props }: any) =>
    1. + }} + > + {description} +
+ {/* Media Gallery Section */} + {eventImagesCollection && eventImagesCollection.items.length > 0 && ( +
+
+
+ +
+

Media & Gallery

+
+
+ {eventImagesCollection.items.map((asset, index) => ( +
+ {asset.description +
+ {asset.title && ( +
+

{asset.title}

+ {asset.description && ( +

{asset.description}

+ )} +
+ )} +
+ ))} +
+
+ )} + {/* Map Section */}
diff --git a/components/home/ProvostSection.tsx b/components/home/ProvostSection.tsx new file mode 100644 index 0000000..ec2610b --- /dev/null +++ b/components/home/ProvostSection.tsx @@ -0,0 +1,138 @@ +'use client'; + +import Image from 'next/image'; +import { motion } from 'framer-motion'; +import Container from '../custom/Container'; +import { Award, BookOpen, GraduationCap, Briefcase } from 'lucide-react'; + +const ProvostSection = () => { + const highlights = [ + { + icon: , + text: "30 Years Experience", + label: "Teaching & Research" + }, + { + icon: , + text: "Provost", + label: "College of Engineering" + }, + { + icon: , + text: "100+ Publications", + label: "Peer-reviewed Journals" + }, + { + icon: , + text: "Patron", + label: "GESA-KNUST" + } + ]; + + return ( +
+ +
+ +
+
+
+ +
+ Professor Kwabena Biritwum Nyarko +
+
+ + +

GESA Patron

+

Celebrating Excellence &
Leadership at KNUST

+
+
+ + + {/* Content */} +
+ +
+ + GESA PATRON +
+

+ Prof. Kwabena Biritwum Nyarko +

+

+ Provost, College of Engineering — KNUST +

+
+ + +

+ {`Professor Kwabena Biritwum Nyarko is a Professor at the Civil Engineering Department of Kwame Nkrumah University of Science and Technology, Kumasi, Ghana. He has 30 years of teaching and research experience in Water and Sanitation. His research focuses on water transport and distribution, sanitation technologies, and sustainable water and sanitation service delivery.`} +

+

+ {`He is the Provost of the College of Engineering at KNUST and a valued member of the Regional Water and Sanitation Centre, Kumasi (RWESCK). He serves on the Board of the Engineering Council of Ghana and is a Council member of the Ghana Institution of Engineers.`} +

+

+ {`Prof Nyarko has over one hundred (100) publications in peer-reviewed journals, conference proceedings, and technical reports.`} +

+
+ +
+ {highlights.map((item, index) => ( + +
+ {item.icon} +
+

+ {item.text} +

+

+ {item.label} +

+
+ ))} +
+
+
+ +
+ ); +}; + +export default ProvostSection; diff --git a/hooks/useEventCollection.ts b/hooks/useEventCollection.ts index e24cfea..22b2334 100644 --- a/hooks/useEventCollection.ts +++ b/hooks/useEventCollection.ts @@ -22,6 +22,13 @@ export interface EventItem { venueInPlainEnglish: string; onlineLink?: string; eventImage: EventImage; + eventImagesCollection?: { + items: { + title: string; + description: string; + url: string; + }[]; + }; } interface Props { @@ -49,6 +56,13 @@ const GET_EVENTS = gql` url description } + eventImagesCollection { + items { + title + description + url + } + } } } } @@ -73,6 +87,13 @@ const GET_EVENT_BY_SLUG = gql` url description } + eventImagesCollection { + items { + title + description + url + } + } } } } diff --git a/lib/contentful-client.ts b/lib/contentful-client.ts index c2bfd35..890ab66 100644 --- a/lib/contentful-client.ts +++ b/lib/contentful-client.ts @@ -21,6 +21,6 @@ export const contentfulClient = new GraphQLClient( ...(CONTENTFUL_ACCESS_TOKEN ? { Authorization: `Bearer ${CONTENTFUL_ACCESS_TOKEN}` } : {}), }, // @ts-ignore - next: { revalidate: 3600 }, + next: { revalidate: 600 }, } ); diff --git a/public/images/Provost.jpg b/public/images/Provost.jpg new file mode 100644 index 0000000..0eb3675 Binary files /dev/null and b/public/images/Provost.jpg differ