web/src/components/SpeakerList.astro

44 lines
1.7 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 &&
2024-02-24 03:07:17 +01:00
<div class="my-6">
2024-02-24 02:12:40 +01:00
<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-03-04 02:38:21 +01:00
<div class={`${thumbSize === 'big' ? 'w-16 h-16' : 'w-14 h-14'}`}><img class={`${thumbSize === 'big' ? 'w-16 h-16' : 'w-14 h-14'} aspect-square rounded-full object-cover`} 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>
2024-02-24 03:07:17 +01:00
<div class="mt-8">
<a href={core.links.cfp} class="button inverted"><button>Submit proposal (CfP)</button></a>
</div>
</div>
}
{!item.speakers &&
<div class="my-6">
<h2>Speakers (0)</h2>
<div class="mt-4">Stay tuned. Speakers coming :-)</div>
<div class="mt-6">
<a href={core.links.cfp} class="button inverted"><button>Submit proposal (CfP)</button></a>
</div>
2024-02-24 02:12:40 +01:00
</div>
}