2023-01-30 02:38:45 +01:00
|
|
|
import html from '../utils/html.js'
|
|
|
|
import markdown from '../utils/markdown.js'
|
|
|
|
import Duration from './duration.js'
|
|
|
|
import Link from './link.js'
|
|
|
|
|
2023-09-28 02:50:43 +02:00
|
|
|
/**
|
|
|
|
* @param {import('../schema.d.ts').ResumeSchema['education']} education
|
|
|
|
* @returns {string | false}
|
|
|
|
*/
|
2023-01-30 02:38:45 +01:00
|
|
|
export default function Education(education = []) {
|
|
|
|
return education.length > 0 && html`
|
|
|
|
<section id="education">
|
|
|
|
<h3>Education</h3>
|
|
|
|
<div class="stack">
|
|
|
|
${education.map(({ area, courses = [], institution, startDate, endDate, studyType, url }) => html`
|
|
|
|
<article>
|
|
|
|
<header>
|
|
|
|
<h4>${Link(url, institution)}</h4>
|
|
|
|
<div class="meta">
|
|
|
|
${area && html`<strong>${area}</strong>`}
|
2023-09-28 02:50:43 +02:00
|
|
|
${startDate && html`<div>${Duration(startDate, endDate)}</div>`}
|
2023-01-30 02:38:45 +01:00
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
${studyType && markdown(studyType)}
|
|
|
|
${courses.length > 0 && html`
|
|
|
|
<h5>Courses</h5>
|
|
|
|
<ul>
|
|
|
|
${courses.map(course => html`<li>${markdown(course)}</li>`)}
|
|
|
|
</ul>
|
|
|
|
`}
|
|
|
|
</article>
|
|
|
|
`)}
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
`
|
|
|
|
}
|