Order speakers

This commit is contained in:
Oliver Davies 2019-05-21 00:04:24 +01:00
parent 05e8983d98
commit 3e0d8a1cc7
6 changed files with 7 additions and 7 deletions

View file

@ -2,6 +2,6 @@ sculpin_content_types:
sessions:
permalink: /sessions/:basename/
speakers:
permalink: /speakers/:basename/
permalink: /speakers/:title/
posts:
enabled: false

View file

@ -7,7 +7,7 @@
<li class="tw-w-full lg:tw-w-1/2 tw-text-left tw-mb-6">
<a href="{{ speaker.url }}" class="group tw-px-4 tw-flex tw-flex-row-reverse tw-no-underline focus:tw-outline-none">
<span class="tw-flex-1 tw-flex tw-flex-col tw-justify-center">
<span class="tw-block tw-font-bold tw-text-xl tw-text-gray-900 group-hocus:tw-underline">{{ speaker.name }}</span>
<span class="tw-block tw-font-bold tw-text-xl tw-text-gray-900 group-hocus:tw-underline">{{ speaker.title }}</span>
<span class="tw-block tw-text-gray-800">
{% include 'speaker-role' with { speaker: speaker } %}
</span>

View file

@ -1,5 +1,5 @@
---
name: Dan McNamara
title: Dan McNamara
role: Managing Director
organisation: Microserve
image: dan-mcnamara.jpg

View file

@ -1,5 +1,5 @@
---
name: Matt Haworth
title: Matt Haworth
role: Co-Founder
organisation: Reason Digital
image: matt-haworth.jpg

View file

@ -1,5 +1,5 @@
---
name: Daniel Pickering
title: Daniel Pickering
role: Full Stack Developer
organisation: Annertech
image: daniel-pickering.jpg

View file

@ -29,7 +29,7 @@ class SpeakersExtension extends AbstractExtension
public function getSessionSpeakers($session, array $speakers): array
{
return collect($speakers)->filter(function ($speaker) use ($session): bool {
return collect($session['speakers'])->contains($speaker['name']);
return collect($session['speakers'])->contains($speaker['title']);
})->values()->toArray();
}
@ -44,7 +44,7 @@ class SpeakersExtension extends AbstractExtension
public function getSpeakerSessions($speaker, array $sessions): array
{
return collect($sessions)->filter(function ($session) use ($speaker): bool {
return collect($session['speakers'])->contains($speaker['name']);
return collect($session['speakers'])->contains($speaker['title']);
})->values()->toArray();
}
}