start of hero layout, mostly positioning

This commit is contained in:
Valentijn
2026-04-20 21:56:21 +02:00
parent 1f59756c9f
commit 007b9ac3e4
8 changed files with 172 additions and 216 deletions

View File

@@ -0,0 +1,23 @@
import { siteData } from '../data/site';
type Study = {
school: string;
study: string;
label: string;
start: Date;
end: Date | null;
};
function getStudy(studies: Study[]){
if (studies.length === 0) return null;
return studies.reduce((latest, study) => {
if (latest.end === null) return latest;
if (study.end === null) return study;
return study.start.getTime() > latest.start.getTime() ? study : latest;
});
}
export const study = getStudy(siteData.studies)