castopod/themes/cp_admin/podcast/latest_episodes.php
Yassine Doghri dfb7888aeb feat(plugins): add aside with plugin metadata next to plugin's readme
- enhance plugin card ui
- refactor components to be more consistent
- invert toggler label for better UX
- edit view components regex
2024-06-14 15:53:33 +00:00

26 lines
994 B
PHP

<section class="flex flex-col">
<header class="flex justify-between">
<x-Heading tagName="h2"><?= lang('Podcast.latest_episodes') ?></x-Heading>
<a href="<?= route_to(
'episode-list',
$podcast->id,
) ?>" class="inline-flex items-center text-sm underline hover:no-underline">
<?= lang('Podcast.see_all_episodes') ?>
<?= icon('arrow-right-s-fill', [
'class' => 'ml-2',
]) ?>
</a>
</header>
<?php if ($episodes): ?>
<div class="grid px-4 pt-2 pb-5 -mx-2 overflow-x-auto grid-cols-latestEpisodes gap-x-4 snap snap-x snap-proximity">
<?php foreach ($episodes as $episode): ?>
<?= view('episode/_card', [
'episode' => $episode,
]) ?>
<?php endforeach; ?>
</div>
<?php else: ?>
<p class="italic"><?= lang('Podcast.no_episode') ?></p>
<?php endif; ?>
</section>