2023-01-30 02:38:45 +01:00
|
|
|
import html from '../utils/html.js'
|
|
|
|
import markdown from '../utils/markdown.js'
|
|
|
|
import Date from './date.js'
|
|
|
|
import Link from './link.js'
|
|
|
|
|
2023-09-28 02:50:43 +02:00
|
|
|
/**
|
|
|
|
* @param {import('../schema.d.ts').ResumeSchema['publications']} publications
|
|
|
|
* @returns {string | false}
|
|
|
|
*/
|
2023-01-30 02:38:45 +01:00
|
|
|
export default function Publications(publications = []) {
|
|
|
|
return publications.length > 0 && html`
|
|
|
|
<section id="publications">
|
|
|
|
<h3>Publications</h3>
|
|
|
|
<div class="stack">
|
|
|
|
${publications.map(({ name, publisher, releaseDate, summary, url }) => html`
|
|
|
|
<article>
|
|
|
|
<header>
|
|
|
|
<h4>${Link(url, name)}</h4>
|
|
|
|
<div class="meta">
|
|
|
|
${publisher && html`
|
|
|
|
<div>
|
|
|
|
Published by <strong>${publisher}</strong>
|
|
|
|
</div>
|
|
|
|
`}
|
|
|
|
${releaseDate && Date(releaseDate)}
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
${summary && markdown(summary)}
|
|
|
|
</article>
|
|
|
|
`)}
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
`
|
|
|
|
}
|