improved mobile view of cv + added experience section
continuous-integration/drone/push Build is passing Details

pull/2/head
Guus van Meerveld 2 months ago
parent e3c73fc3fc
commit 47af546637

@ -45,12 +45,19 @@
"skills": ["Mathematics", "Neuroscience", "Computer science"] "skills": ["Mathematics", "Neuroscience", "Computer science"]
}, },
{ {
"title": "VWO (NT&G)", "title": "Highschool VWO (NT&G)",
"timeFrame": "2016 - 2022", "timeFrame": "2016 - 2022",
"institution": "RSG Pantarijn MHV Wageningen", "institution": "RSG Pantarijn MHV Wageningen",
"location": "Wageningen, Netherlands", "location": "Wageningen, Netherlands",
"skills": ["Biology", "Physics", "Mathematics"] "skills": ["Biology", "Physics", "Mathematics"]
} }
], ],
"experience": [] "experience": [
{
"title": "Albert Heijn",
"timeFrame": "2020 - 2023",
"role": "Store employee",
"description": ""
}
]
} }

@ -14,6 +14,7 @@ import { Fragment } from "react";
import CvProps, { import CvProps, {
Education as EducationProps, Education as EducationProps,
Experience as ExperienceProps,
Skill as SkillProps Skill as SkillProps
} from "@models/cv"; } from "@models/cv";
@ -69,22 +70,49 @@ const Education: Component<{ education: EducationProps }> = ({ education }) => {
); );
}; };
const Experience: Component<{ experience: ExperienceProps }> = ({
experience
}) => {
return (
<Card>
<CardBody>
<div className="flex justify-between">
<div className="flex flex-col">
<h1 className="text-md">
{experience.role} <span className="text-default-500">at</span>{" "}
{experience.title}
</h1>
<h2 className="text-small text-default-500">
{experience.timeFrame}
</h2>
</div>
</div>
<Spacer y={4} />
</CardBody>
</Card>
);
};
export const Cv: Component<{ data: CvProps }> = ({ data }) => { export const Cv: Component<{ data: CvProps }> = ({ data }) => {
return ( return (
<div className="container mx-auto min-h-screen py-8"> <div className="px-2 container mx-auto min-h-screen py-8">
<div className="flex items-center"> <div className="md:flex items-center">
<Image <div className="flex justify-center">
alt={`Professional picture of ${data.fullName}`} <Image
as={NextImage} alt={`Professional picture of ${data.fullName}`}
width={200} as={NextImage}
height={200} className="mx-auto md:mx-0"
src="/cv.jpg" width={200}
/> height={200}
src="/cv.jpg"
/>
</div>
<Spacer x={8} /> <Spacer x={8} />
<div className="w-full flex justify-between"> <div className="text-center md:text-left flex justify-between">
<div> <div className="w-full">
<h1 className="text-4xl">{data.fullName}</h1> <h1 className="text-4xl">{data.fullName}</h1>
<Spacer y={4} /> <Spacer y={4} />
<h1 className="text-2xl text-default-600">{data.role}</h1> <h1 className="text-2xl text-default-600">{data.role}</h1>
@ -103,22 +131,39 @@ export const Cv: Component<{ data: CvProps }> = ({ data }) => {
<div className="w-full lg:w-1/3"> <div className="w-full lg:w-1/3">
<h1 className="text-2xl">Skills</h1> <h1 className="text-2xl">Skills</h1>
{data.skills.map((skill) => ( {data.skills
<Skill skill={skill} key={skill.name.toLowerCase()} /> .sort((a, b) => b.value - a.value)
))} .map((skill) => (
<Skill skill={skill} key={skill.name.toLowerCase()} />
))}
<Spacer y={8} /> <Spacer y={8} />
<h1 className="text-2xl">Programming Languages</h1> <h1 className="text-2xl">Programming Languages</h1>
{data.programmingLanguages.map((skill) => ( {data.programmingLanguages
<Skill skill={skill} key={skill.name.toLowerCase()} /> .sort((a, b) => b.value - a.value)
))} .map((skill) => (
<Skill skill={skill} key={skill.name.toLowerCase()} />
))}
<Spacer y={8} /> <Spacer y={8} />
</div> </div>
<Spacer x={8} /> <Spacer x={8} />
<div className="w-full lg:w-2/3"> <div className="w-full lg:w-2/3">
<h1 className="text-2xl">Experience</h1>
{data.experience.map((experience) => {
return (
<Fragment key={experience.title.toLowerCase()}>
<Spacer y={4} />
<Experience experience={experience} />
</Fragment>
);
})}
<Spacer y={8} />
<h1 className="text-2xl">Education</h1> <h1 className="text-2xl">Education</h1>
{data.education.map((education) => { {data.education.map((education) => {

@ -25,6 +25,8 @@ const ExperienceModel = z.object({
description: z.string() description: z.string()
}); });
export type Experience = z.infer<typeof ExperienceModel>;
export const CvPropsModel = z.object({ export const CvPropsModel = z.object({
fullName: z.string(), fullName: z.string(),
role: z.string(), role: z.string(),

@ -1,4 +1,3 @@
import { readJson } from "fs-extra";
import path from "path"; import path from "path";
import { readAndParseJsonFile } from "./json"; import { readAndParseJsonFile } from "./json";

Loading…
Cancel
Save