2020-10-02 17:38:16 +02:00
|
|
|
<section class="flex flex-col">
|
|
|
|
<header class="flex justify-between py-2">
|
2021-09-08 17:51:33 +02:00
|
|
|
<Heading level="2"><?= lang('Podcast.latest_episodes') ?></Heading>
|
2020-10-02 17:38:16 +02:00
|
|
|
<a href="<?= route_to(
|
2021-09-08 17:51:33 +02:00
|
|
|
'episode-list',
|
|
|
|
$podcast->id,
|
|
|
|
) ?>" class="inline-flex items-center text-sm underline hover:no-underline">
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= lang('Podcast.see_all_episodes') ?>
|
|
|
|
<?= icon('chevron-right', 'ml-2') ?>
|
|
|
|
</a>
|
|
|
|
</header>
|
|
|
|
<?php if ($episodes): ?>
|
2021-09-03 18:34:06 +02:00
|
|
|
<div class="flex p-2 overflow-x-auto gap-x-6 snap snap-x snap-proximity">
|
2020-10-02 17:38:16 +02:00
|
|
|
<?php foreach ($episodes as $episode): ?>
|
2021-09-03 18:34:06 +02:00
|
|
|
<article class="snap-center flex flex-col flex-shrink-0 flex-1 w-full min-w-[12rem] max-w-[17rem] overflow-hidden bg-white border-2 border-pine-100 rounded-xl">
|
2021-08-09 12:28:16 +02:00
|
|
|
<div class="relative">
|
|
|
|
<?= publication_pill(
|
2021-09-08 17:51:33 +02:00
|
|
|
$episode->published_at,
|
|
|
|
$episode->publication_status,
|
|
|
|
'absolute top-2 right-2 text-sm'
|
|
|
|
); ?>
|
2021-08-09 12:28:16 +02:00
|
|
|
<img
|
2021-09-07 17:43:09 +02:00
|
|
|
src="<?= $episode->image->medium_url ?>"
|
2021-08-09 12:28:16 +02:00
|
|
|
alt="<?= $episode->title ?>" class="object-cover w-full" />
|
|
|
|
</div>
|
2021-04-02 19:20:02 +02:00
|
|
|
<div class="flex items-start justify-between p-2">
|
|
|
|
<div class="flex flex-col min-w-0">
|
2020-10-02 17:38:16 +02:00
|
|
|
<a href="<?= route_to(
|
2021-09-08 17:51:33 +02:00
|
|
|
'episode-view',
|
|
|
|
$podcast->id,
|
|
|
|
$episode->id,
|
|
|
|
) ?>"
|
2021-04-02 19:20:02 +02:00
|
|
|
class="text-sm font-semibold truncate hover:underline"
|
2021-08-09 12:28:16 +02:00
|
|
|
>
|
|
|
|
<?= episode_numbering(
|
2021-09-08 17:51:33 +02:00
|
|
|
$episode->number,
|
|
|
|
$episode->season_number,
|
|
|
|
'font-semibold text-gray-600',
|
|
|
|
true,
|
|
|
|
) ?>
|
2021-08-09 12:28:16 +02:00
|
|
|
<span class="mx-1">-</span>
|
|
|
|
<?= $episode->title ?>
|
|
|
|
</a>
|
2020-10-02 17:38:16 +02:00
|
|
|
</div>
|
2021-04-02 19:20:02 +02:00
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="inline-flex items-center p-1 outline-none focus:ring"
|
|
|
|
id="more-dropdown-<?= $episode->id ?>"
|
|
|
|
data-dropdown="button"
|
|
|
|
data-dropdown-target="more-dropdown-<?= $episode->id ?>-menu"
|
|
|
|
aria-label="<?= lang('Common.more') ?>"
|
|
|
|
aria-haspopup="true"
|
|
|
|
aria-expanded="false"
|
|
|
|
><?= icon('more') ?></button>
|
|
|
|
<nav
|
|
|
|
id="more-dropdown-<?= $episode->id ?>-menu"
|
|
|
|
class="z-50 flex flex-col py-2 text-black whitespace-no-wrap bg-white border rounded shadow"
|
|
|
|
aria-labelledby="more-dropdown-<?= $episode->id ?>"
|
|
|
|
data-dropdown="menu"
|
|
|
|
data-dropdown-placement="bottom">
|
|
|
|
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
|
2021-09-08 17:51:33 +02:00
|
|
|
'episode-edit',
|
|
|
|
$podcast->id,
|
|
|
|
$episode->id,
|
|
|
|
) ?>"><?= lang('Episode.edit') ?></a>
|
2021-04-02 19:20:02 +02:00
|
|
|
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
|
2021-09-08 17:51:33 +02:00
|
|
|
'embeddable-player-add',
|
|
|
|
$podcast->id,
|
|
|
|
$episode->id,
|
|
|
|
) ?>"><?= lang(
|
2021-04-02 19:20:02 +02:00
|
|
|
'Episode.embeddable_player.add',
|
2021-02-27 22:21:26 +01:00
|
|
|
) ?></a>
|
2021-04-02 19:20:02 +02:00
|
|
|
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
|
2021-09-08 17:51:33 +02:00
|
|
|
'episode-persons-manage',
|
|
|
|
$podcast->id,
|
|
|
|
$episode->id,
|
|
|
|
) ?>"><?= lang('Person.persons') ?></a>
|
2021-04-02 19:20:02 +02:00
|
|
|
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
|
2021-09-08 17:51:33 +02:00
|
|
|
'episode',
|
|
|
|
$podcast->handle,
|
|
|
|
$episode->slug,
|
|
|
|
) ?>"><?= lang('Episode.go_to_page') ?></a>
|
2021-04-02 19:20:02 +02:00
|
|
|
<hr class="my-2 border border-gray-100">
|
|
|
|
<a class="px-4 py-1 font-semibold text-red-600 hover:bg-gray-100" href="<?= route_to(
|
2021-09-08 17:51:33 +02:00
|
|
|
'episode-delete',
|
|
|
|
$podcast->id,
|
|
|
|
$episode->id,
|
|
|
|
) ?>"><?= lang('Episode.delete') ?></a>
|
2021-04-02 19:20:02 +02:00
|
|
|
</nav>
|
2020-10-02 17:38:16 +02:00
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</div>
|
|
|
|
<?php else: ?>
|
|
|
|
<p class="italic"><?= lang('Podcast.no_episode') ?></p>
|
|
|
|
<?php endif; ?>
|
2021-08-09 12:28:16 +02:00
|
|
|
</section>
|