web/src/components/SpeakerList.astro

29 lines
1.2 KiB
Text
Raw Normal View History

2024-02-24 02:12:40 +01:00
---
import { marked, } from 'marked';
const { item, thumbSize } = Astro.props;
import { getSpeaker } from '../lib/events.js';
import core from "../core.json";
---
{item.speakers &&
<div class="mt-6 mb-6">
<h2>Speakers ({item.speakers.length})</h2>
<div class="w3pn-speaker-list grid grid-cols-1 gap-6 mt-4">
{item.speakers.map(spId => getSpeaker(core, spId)).map((speaker) => (
<div class="flex gap-4">
2024-02-24 02:24:55 +01:00
<div><img class={`${thumbSize === 'big' ? 'w-16 h-16' : 'w-14 h-14'} aspect-square rounded-full object-contain`} src={speaker.imageUrl} /></div>
2024-02-24 02:12:40 +01:00
<div>
<div>
<span class="text-white">{speaker.name}</span>
{speaker.refs?.twitter &&
<span class="ml-2">(<a href={"https://twitter.com/"+speaker.refs.twitter}>@{speaker.refs.twitter}</a>)</span>
}
</div>
<div set:html={marked.parseInline(speaker.caption)} class="text-sm"></div>
</div>
</div>
))}
</div>
</div>
}