Changed presentation of description

This commit is contained in:
Thom Werring 2023-10-22 13:43:03 +02:00
parent 43b9cb70f0
commit d247ef0c79

View file

@ -7,15 +7,15 @@ const formatExperience = (experience: ExperienceType) => {
const workPeriod = `${formatDate(experience.startDate)} - ${ const workPeriod = `${formatDate(experience.startDate)} - ${
experience.endDate ? formatDate(experience.endDate) : "present" experience.endDate ? formatDate(experience.endDate) : "present"
}`; }`;
const company = experience.url const company = experience.url
? `<a target="_blank" href="${experience.url}">${experience.name}</a>` ? `<a target="_blank" href="${experience.url}">${experience.name}</a>`
: experience.name; : experience.name;
const description = experience.description.split("\n").join("</p><p>");
return `<strong>${company}</strong>, <em>${experience.city}</em><br/> return `<header><strong>${company}</strong>, <em>${experience.city}</em><br/>
<strong>${experience.jobTitle}</strong><br/> <strong>${experience.jobTitle}</strong><br/>
${workPeriod} <time>${workPeriod}</time></header>
<p>${experience.description}</p>`; <p>${description}</p>`;
}; };
const formatDate = (date: Date, locale: string | string[] = "en-GB"): string => { const formatDate = (date: Date, locale: string | string[] = "en-GB"): string => {