blob: 98824de6e290c8927d506640023b02ddc97ba5e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
---
import translate from '$i18n/translate';
import tSite from '$i18n/translations/site';
import { getLocaleFromPathOrThrow } from '$lib/getLocaleFromPath';
import type { Contribution } from '$types/LallansIssue';
interface Props {
contributions: Contribution[];
}
const { contributions } = Astro.props;
const locale = getLocaleFromPathOrThrow(Astro.url.pathname);
const t = translate(locale);
---
<section>
<h2>Contributions</h2>
<ul class="lallans-issue__contributions">
{
contributions.map((contribution) => (
<li>
<span class="italic">{contribution.title}</span>
{'author' in contribution && (
<span>
{' '}
{t(tSite, { key: 'by' })} {contribution.author}
</span>
)}
</li>
))
}
</ul>
</section>
|