2022-10-07 09:14:10 +01:00
|
|
|
---
|
2023-02-11 22:53:00 +00:00
|
|
|
import ListingPage from "~/components/ListingPage.astro";
|
2023-04-09 10:17:52 +01:00
|
|
|
import _ from "lodash";
|
2023-04-19 17:00:29 +01:00
|
|
|
import { getCollection } from "astro:content";
|
2023-04-22 21:57:02 +01:00
|
|
|
import Markdown from "~/components/Markdown.astro";
|
2022-10-07 09:14:10 +01:00
|
|
|
|
2023-04-19 17:00:29 +01:00
|
|
|
const talks = await getCollection("talk");
|
2022-10-07 09:14:10 +01:00
|
|
|
|
2022-10-15 16:10:41 +01:00
|
|
|
const talkCount = _(talks)
|
2023-04-09 10:17:52 +01:00
|
|
|
.flatMap((talk) => talk.data.events)
|
2023-01-08 19:25:23 +00:00
|
|
|
.size();
|
2022-10-15 16:10:41 +01:00
|
|
|
|
2022-10-07 09:14:10 +01:00
|
|
|
const sortedTalks = talks
|
2023-01-08 19:25:23 +00:00
|
|
|
.map((talk) => {
|
2023-04-19 17:00:29 +01:00
|
|
|
const slug = `/talks/${talk.slug}`;
|
2022-10-07 09:14:10 +01:00
|
|
|
|
2023-02-11 22:53:00 +00:00
|
|
|
return { slug, item: talk };
|
2022-10-07 09:14:10 +01:00
|
|
|
})
|
|
|
|
.sort((b, a) => {
|
|
|
|
const events = [
|
2023-04-09 10:17:52 +01:00
|
|
|
a.item.data.events[a.item.data.events.length - 1],
|
|
|
|
b.item.data.events[b.item.data.events.length - 1],
|
2023-01-08 19:25:23 +00:00
|
|
|
];
|
2022-10-07 09:14:10 +01:00
|
|
|
|
2023-08-02 23:30:00 +01:00
|
|
|
const dates = [
|
|
|
|
new Date(events[0].date).valueOf(),
|
|
|
|
new Date(events[1].date).valueOf(),
|
|
|
|
];
|
|
|
|
|
|
|
|
if (dates[0] >= today) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return dates[0] - dates[1];
|
2023-01-08 19:25:23 +00:00
|
|
|
});
|
2022-10-07 09:14:10 +01:00
|
|
|
---
|
|
|
|
|
2023-02-11 22:53:00 +00:00
|
|
|
<ListingPage items={sortedTalks} title="Talks and workshops">
|
2023-07-13 14:52:51 +01:00
|
|
|
<Markdown slot="intro">
|
|
|
|
<p>
|
2023-04-22 21:57:02 +01:00
|
|
|
Starting with my first talk in September 2012, I have given {talkCount} presentations
|
|
|
|
and workshops at various conferences and meetups, in-person and remotely, on
|
|
|
|
topics including PHP, Drupal, automated testing, Git, CSS, and systems administration.
|
|
|
|
</p>
|
|
|
|
</Markdown>
|
2023-02-11 22:53:00 +00:00
|
|
|
</ListingPage>
|