2021-04-02 17:20:02 +00:00
|
|
|
<?= $this->extend('podcast/_layout') ?>
|
|
|
|
|
|
|
|
<?= $this->section('meta-tags') ?>
|
|
|
|
<link type="application/rss+xml" rel="alternate" title="<?= $podcast->title ?>" href="<?= $podcast->feed_url ?>" />
|
|
|
|
|
|
|
|
<title><?= $podcast->title ?></title>
|
|
|
|
<meta name="description" content="<?= htmlspecialchars(
|
|
|
|
$podcast->description,
|
|
|
|
) ?>" />
|
|
|
|
<link rel="shortcut icon" type="image/png" href="/favicon.ico" />
|
|
|
|
<link rel="canonical" href="<?= current_url() ?>" />
|
|
|
|
<meta property="og:title" content="<?= $podcast->title ?>" />
|
|
|
|
<meta property="og:description" content="<?= $podcast->description ?>" />
|
|
|
|
<meta property="og:locale" content="<?= $podcast->language_code ?>" />
|
|
|
|
<meta property="og:site_name" content="<?= $podcast->title ?>" />
|
|
|
|
<meta property="og:url" content="<?= current_url() ?>" />
|
|
|
|
<meta property="og:image" content="<?= $podcast->image->large_url ?>" />
|
|
|
|
<meta property="og:image:width" content="<?= config('Images')->largeSize ?>" />
|
|
|
|
<meta property="og:image:height" content="<?= config('Images')->largeSize ?>" />
|
|
|
|
<meta name="twitter:card" content="summary_large_image" />
|
2021-08-09 10:28:16 +00:00
|
|
|
|
|
|
|
<?= service('vite')->asset('styles/index.css', 'css') ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
|
|
|
<?= $this->section('content') ?>
|
2021-08-09 10:28:16 +00:00
|
|
|
<nav class="sticky z-20 flex items-center justify-center pt-2 text-lg top-12 sm:top-0 bg-pine-50">
|
2021-04-02 17:20:02 +00:00
|
|
|
<a href="<?= route_to(
|
|
|
|
'podcast-activity',
|
2021-07-26 13:10:46 +00:00
|
|
|
$podcast->handle,
|
2021-04-02 17:20:02 +00:00
|
|
|
) ?>" class="px-4 py-1 mr-8 rounded-full hover:bg-pine-100"><?= lang(
|
|
|
|
'Podcast.activity',
|
|
|
|
) ?></a>
|
|
|
|
<a href="<?= route_to(
|
|
|
|
'podcast-episodes',
|
2021-07-26 13:10:46 +00:00
|
|
|
$podcast->handle,
|
2021-04-02 17:20:02 +00:00
|
|
|
) ?>" class="px-4 py-1 font-semibold border-b-4 text-pine-800 border-pine-800"><?= lang(
|
|
|
|
'Podcast.episodes',
|
|
|
|
) ?></a>
|
|
|
|
<?php if ($activeQuery): ?>
|
|
|
|
<button id="episode-lists-dropdown" type="button" class="inline-flex items-center px-2 py-1 text-sm font-semibold outline-none focus:ring" data-dropdown="button" data-dropdown-target="episode-lists-dropdown-menu" aria-label="<?= lang(
|
|
|
|
'Common.more',
|
|
|
|
) ?>" aria-haspopup="true" aria-expanded="false">
|
|
|
|
<?= $activeQuery['label'] .
|
|
|
|
' (' .
|
|
|
|
$activeQuery['number_of_episodes'] .
|
|
|
|
')' .
|
|
|
|
icon('caret-down', 'ml-2 text-xl') ?>
|
|
|
|
</button>
|
|
|
|
<nav id="episode-lists-dropdown-menu" class="flex flex-col py-2 text-black bg-white border rounded shadow" aria-labelledby="episode-lists-dropdown" data-dropdown="menu" data-dropdown-placement="bottom-end">
|
|
|
|
<?php foreach ($episodesNav as $link): ?>
|
|
|
|
<?= anchor(
|
|
|
|
$link['route'],
|
|
|
|
$link['label'] . ' (' . $link['number_of_episodes'] . ')',
|
|
|
|
[
|
|
|
|
'class' =>
|
|
|
|
'px-2 py-1 whitespace-nowrap ' .
|
|
|
|
($link['is_active']
|
|
|
|
? 'font-semibold'
|
|
|
|
: 'text-gray-600 hover:text-gray-900'),
|
|
|
|
],
|
|
|
|
) ?>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</nav>
|
|
|
|
<?php endif; ?>
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
<section class="flex flex-col max-w-2xl px-6 py-8 mx-auto">
|
|
|
|
|
|
|
|
<?php if ($episodes): ?>
|
|
|
|
<h1 class="mb-4 text-xl font-semibold">
|
|
|
|
<?php if ($activeQuery['type'] == 'year'): ?>
|
|
|
|
<?= lang('Podcast.list_of_episodes_year', [
|
|
|
|
'year' => $activeQuery['value'],
|
|
|
|
'episodeCount' => count($episodes),
|
|
|
|
]) ?>
|
|
|
|
<?php elseif ($activeQuery['type'] == 'season'): ?>
|
|
|
|
<?= lang('Podcast.list_of_episodes_season', [
|
|
|
|
'seasonNumber' => $activeQuery['value'],
|
|
|
|
'episodeCount' => count($episodes),
|
|
|
|
]) ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
</h1>
|
|
|
|
<?php foreach ($episodes as $episode): ?>
|
2021-08-09 10:28:16 +00:00
|
|
|
<?= view('podcast/_partials/episode_card', [
|
|
|
|
'episode' => $episode,
|
2021-09-02 16:34:25 +00:00
|
|
|
'podcast' => $podcast
|
2021-08-09 10:28:16 +00:00
|
|
|
]) ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
<?php endforeach; ?>
|
|
|
|
<?php else: ?>
|
|
|
|
<h1 class="px-4 mb-2 text-xl text-center"><?= lang(
|
|
|
|
'Podcast.no_episode',
|
|
|
|
) ?></h1>
|
|
|
|
<p class="italic text-center"><?= lang('Podcast.no_episode_hint') ?></p>
|
|
|
|
<?php endif; ?>
|
|
|
|
</section>
|
|
|
|
|
2021-05-03 17:39:58 +00:00
|
|
|
<?= $this->endSection()
|
|
|
|
?>
|