From 03b4c6cafb2c374e3fa9db8400d7d61dc3386677 Mon Sep 17 00:00:00 2001 From: A Charlwood Date: Fri, 13 Feb 2026 23:59:54 +0000 Subject: [PATCH] US-015: Modify EducationTile: richer content, panel trigger - Show richer inline content: MPharm research score (75.1%), Mary Seacole score (78%), A-level grades - Each education entry is now clickable -> opens detail panel - Hover state: border color shift to teal with shadow deepening - Use documents data from documents.ts for accurate content - Maintains existing visual hierarchy and spacing Co-Authored-By: Claude Sonnet 4.5 --- src/components/tiles/EducationTile.tsx | 157 ++++++++++++++++++------- 1 file changed, 114 insertions(+), 43 deletions(-) diff --git a/src/components/tiles/EducationTile.tsx b/src/components/tiles/EducationTile.tsx index 2690c07..000d411 100644 --- a/src/components/tiles/EducationTile.tsx +++ b/src/components/tiles/EducationTile.tsx @@ -1,63 +1,134 @@ +import { useState } from 'react' import { Card, CardHeader } from '../Card' +import { useDetailPanel } from '@/contexts/DetailPanelContext' +import { documents } from '@/data/documents' /** * Education tile - displays academic qualifications * Full-width card below Career Activity + * Each entry is clickable to open detail panel */ export function EducationTile() { - // Education entries from CV, presented in reverse chronological order - const educationEntries = [ - { - degree: 'MPharm (Hons) — 2:1', - detail: 'University of East Anglia · 2015', - }, - { - degree: 'NHS Leadership Academy — Mary Seacole Programme', - detail: '2018 · 78%', - }, - { - degree: 'A-Levels: Mathematics (A*), Chemistry (B), Politics (C)', - detail: 'Highworth Grammar School · 2009–2011', - }, + const { openPanel } = useDetailPanel() + const [hoveredIndex, setHoveredIndex] = useState(null) + + // Filter to main education entries in reverse chronological order + const educationDocuments = [ + documents.find((d) => d.id === 'doc-mary-seacole')!, + documents.find((d) => d.id === 'doc-mpharm')!, + documents.find((d) => d.id === 'doc-alevels')!, ] + // Build rich inline content for each entry + const getInlineContent = (doc: typeof educationDocuments[0]) => { + switch (doc.id) { + case 'doc-mpharm': + return { + title: 'MPharm (Hons) — 2:1', + institution: 'University of East Anglia', + year: '2015', + extra: 'Research project: 75.1% (Distinction)', + } + case 'doc-mary-seacole': + return { + title: 'NHS Leadership Academy — Mary Seacole Programme', + institution: 'NHS Leadership Academy', + year: '2018', + extra: 'Programme score: 78%', + } + case 'doc-alevels': + return { + title: 'A-Levels', + institution: 'Highworth Grammar School', + year: '2009–2011', + extra: 'Mathematics A* · Chemistry B · Politics C', + } + default: + return { + title: doc.title, + institution: doc.institution, + year: doc.date, + extra: doc.classification, + } + } + } + return (
- {educationEntries.map((entry, index) => ( -
- { + const content = getInlineContent(doc) + const isHovered = hoveredIndex === index + + return ( +
- ))} +
+ + {content.title} + + + {content.year} + +
+
+ {content.institution} +
+ {content.extra && ( +
+ {content.extra} +
+ )} + + ) + })}
)