-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5b750c9
commit ff2be39
Showing
13 changed files
with
177 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,75 @@ | ||
import { Profile } from "../src/types/Profile.ts"; | ||
import { BirthDate } from "../src/types/Profile.ts"; | ||
|
||
export default function Bio({ data }: { | ||
data: Profile; | ||
}) { | ||
const age = new Date().getFullYear() - data.birth_date.year; | ||
const yearOfExperience = new Date().getFullYear() - data.job_start_date.year; | ||
export default function BioSection( | ||
{ | ||
birth_date, | ||
job_start_date, | ||
profile_pic_url, | ||
full_name, | ||
nationality, | ||
occupation, | ||
city, | ||
country_full_name, | ||
summary, | ||
}: { | ||
birth_date: BirthDate; | ||
job_start_date: BirthDate; | ||
profile_pic_url: string; | ||
full_name: string; | ||
nationality: string; | ||
occupation: string; | ||
city: string; | ||
country_full_name: string; | ||
summary: string; | ||
}, | ||
) { | ||
const age = new Date().getFullYear() - birth_date.year; | ||
const yearOfExperience = new Date().getFullYear() - job_start_date.year; | ||
|
||
return ( | ||
<div className="w-full sm:w-1/2"> | ||
<section className="w-full sm:w-1/2"> | ||
<div className="flex flex-col items-center justify-center gap-2 mt-4 mb-8"> | ||
<img | ||
src={data.profile_pic_url} | ||
src={profile_pic_url} | ||
loading="eager" | ||
height="240" | ||
width="240" | ||
alt={data.full_name} | ||
alt={full_name} | ||
/> | ||
|
||
<h3 className="text-3xl font-semibold text-teal-500"> | ||
{data.full_name} | ||
{full_name} | ||
</h3> | ||
|
||
<p className="text-lg text-slate-500 dark:text-slate-400"> | ||
{age} years old | {data.nationality} | ||
{age} years old | {nationality} | ||
</p> | ||
|
||
<p | ||
className="text-lg text-slate-500 dark:text-slate-400" | ||
title="Frontend Software Engineer @ adidas" | ||
> | ||
{data.occupation} | ||
{occupation} | ||
</p> | ||
|
||
<p | ||
className="text-lg text-slate-500 dark:text-slate-400" | ||
title="Sittard-Geleen, Netherlands" | ||
> | ||
{`${data.city}, ${data.country_full_name}`} | ||
{`${city}, ${country_full_name}`} | ||
</p> | ||
</div> | ||
|
||
<div> | ||
<h4 className="text-2xl font-semibold text-teal-500">Summary</h4> | ||
<h4 className="text-2xl font-semibold text-teal-500">About me</h4> | ||
|
||
<p className="text-lg"> | ||
{data.summary.replace( | ||
<p className="text-lg whitespace-pre-line"> | ||
{summary.replace( | ||
"{{year_of_experience}}", | ||
yearOfExperience.toString(), | ||
`${yearOfExperience}`, | ||
)} | ||
</p> | ||
</div> | ||
</div> | ||
</section> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Education } from "../src/types/Profile.ts"; | ||
import Card from "./ui/Card.tsx"; | ||
|
||
export default function EducationSection({ educations }: { | ||
educations: Education[]; | ||
}) { | ||
return ( | ||
<section className="w-full sm:w-1/2"> | ||
<h4 className="text-2xl font-semibold text-teal-500">Education</h4> | ||
<div className="grid grid-cols-1 gap-4"> | ||
{educations.map((education, i) => ( | ||
<div | ||
className="mt-4" | ||
key={i} | ||
> | ||
<Card> | ||
<> | ||
<p className="text-lg font-semibold text-slate-900 dark:text-slate-100 uppercase"> | ||
{education.school} | ||
</p> | ||
<p className="text-base text-slate-900 dark:text-slate-100"> | ||
{education.degree_name} - {education.field_of_study} | ||
</p> | ||
<p className="text-sm text-slate-500 dark:text-slate-400"> | ||
{`${education.starts_at.year} - ${education.ends_at.year}`} | ||
</p> | ||
</> | ||
</Card> | ||
</div> | ||
))} | ||
</div> | ||
</section> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { JSX } from "preact"; | ||
|
||
export default function Card( | ||
{ children }: { children: JSX.Element }, | ||
) { | ||
return ( | ||
<div className="border-l-4 border-teal-500 p-4 bg-slate-50 dark:bg-slate-800 rounded-lg shadow-md transition-transform hover:scale-105 duration-300 ease-in-out"> | ||
{children} | ||
</div> | ||
); | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters