Skip to content

Commit

Permalink
add education to timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
jgettings committed Oct 3, 2024
1 parent 8c494ba commit 7cf1eab
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 2 deletions.
8 changes: 8 additions & 0 deletions public/images/school-icons/fredonia-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions public/images/school-icons/fredonia.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ const AdditionalFields = z.object({
coordinates: z.tuple([z.number(), z.number()]).optional(),
}),
}),
education: z.array(
z.object({
name: z.string(),
}),
),
});

const fullSchema = z.intersection(ResumeSchema, AdditionalFields);
Expand Down
2 changes: 1 addition & 1 deletion src/data/resume.json
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@
],
"education": [
{
"name": "Fredonia",
"institution": "State University of New York at Fredonia",
"url": "https://www.fredonia.edu/",
"area": "Computer Information Systems",
Expand Down Expand Up @@ -533,7 +534,6 @@
"Artifactory",
"Pendo",
"Google Analytics",
"Launch Darkly",
"FullStory",
"Sentry",
"Segment",
Expand Down
66 changes: 66 additions & 0 deletions src/pages/ResumeTimeline/EducationTimelineItem.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { MdSchool } from 'react-icons/md';
import { Timeline, Card } from 'flowbite-react';
import { ResumeProfile } from 'data';
import ResumeTimelineDates from './Dates';

type EducationTimelineItemProps = {
education: NonNullable<ResumeProfile['education']>[0];
};

const logoWidth = 150;

const EducationTimelineItem: React.FC<EducationTimelineItemProps> = ({
education,
}) => (
<Timeline.Item key={education.name}>
<Timeline.Point icon={MdSchool} />
<Timeline.Content>
<Card>
<ResumeTimelineDates
startDate={education.startDate as string}
endDate={education.endDate as string}
/>
<Timeline.Title className="flex flex-col justify-between gap-6 md:flex-row">
<div>
{education.studyType}
<div className="font-light italic">{education.institution}</div>
</div>
<div className="flex-none">
<a href={education.url}>
<img
alt={`${education.name} logo`}
src={`/images/school-icons/${education.name.toLowerCase()}-dark.svg`}
width={logoWidth}
className="hidden dark:inline"
/>
<img
alt={`${education.name} logo`}
src={`/images/school-icons/${education.name.toLowerCase()}.svg`}
width={logoWidth}
className="inline dark:hidden"
/>
</a>
</div>
</Timeline.Title>
<Timeline.Body>
<ul>
<li>
<strong>Major:</strong> {education.area}
</li>
<li>
<strong>Second Major:</strong> {education.secondaryArea}
</li>
<li>
<strong>Minor:</strong> {education.minorArea}
</li>
<li>
<strong>GPA:</strong> {education.score}
</li>
</ul>
</Timeline.Body>
</Card>
</Timeline.Content>
</Timeline.Item>
);

export default EducationTimelineItem;
2 changes: 1 addition & 1 deletion src/pages/ResumeTimeline/WorkTimelineItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const WorkTimelineItem: React.FC<WorkTimelineItemProps> = ({ work }) => (
startDate={work.startDate as string}
endDate={work.endDate as string}
/>
<Timeline.Title className="flex flex-col justify-between gap-2 md:flex-row">
<Timeline.Title className="flex flex-col justify-between gap-6 md:flex-row">
<div>
{work.position}
<div className="font-light italic">{work.name}</div>
Expand Down
2 changes: 2 additions & 0 deletions src/pages/ResumeTimeline/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import data from 'data/index';
import { Timeline } from 'flowbite-react';
import ScrollPageHeading from 'components/ScrollPages/Heading';
import WorkTimelineItem from './WorkTimelineItem';
import EducationTimelineItem from './EducationTimelineItem';

const ResumeTimeline: React.FC = () => (
<section id="resume-timeline">
<ScrollPageHeading>Experience</ScrollPageHeading>
<div className="z-0 flex flex-col items-center">
<Timeline>
{data.work?.map((work) => <WorkTimelineItem work={work} />)}
{data.education?.map((ed) => <EducationTimelineItem education={ed} />)}

Check failure on line 13 in src/pages/ResumeTimeline/index.tsx

View workflow job for this annotation

GitHub Actions / Install, Build, Test (20.x)

Type 'objectOutputType<{ institution: ZodOptional<ZodString>; url: ZodOptional<ZodString>; area: ZodOptional<ZodString>; ... 4 more ...; courses: ZodOptional<...>; }, ZodAny, "strip">' is not assignable to type '{ endDate?: any; url?: string | undefined; area?: string | undefined; startDate?: any; institution?: string | undefined; studyType?: string | undefined; score?: string | undefined; courses?: string[] | undefined; } & { ...; } & { ...; }'.

Check failure on line 13 in src/pages/ResumeTimeline/index.tsx

View workflow job for this annotation

GitHub Actions / Build (20.x)

Type 'objectOutputType<{ institution: ZodOptional<ZodString>; url: ZodOptional<ZodString>; area: ZodOptional<ZodString>; ... 4 more ...; courses: ZodOptional<...>; }, ZodAny, "strip">' is not assignable to type '{ endDate?: any; url?: string | undefined; area?: string | undefined; startDate?: any; institution?: string | undefined; studyType?: string | undefined; score?: string | undefined; courses?: string[] | undefined; } & { ...; } & { ...; }'.
</Timeline>
</div>
</section>
Expand Down

0 comments on commit 7cf1eab

Please sign in to comment.