2021-09-08 17:51:33 +02:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
2021-09-07 17:43:09 +02:00
|
|
|
$podcastNavigation = [
|
|
|
|
'dashboard' => [
|
|
|
|
'icon' => 'dashboard',
|
2021-12-07 17:58:12 +01:00
|
|
|
'items' => ['episode-view', 'episode-edit', 'episode-persons-manage', 'embed-add'],
|
|
|
|
],
|
|
|
|
'clips' => [
|
|
|
|
'icon' => 'clapperboard',
|
2021-12-24 18:55:56 +01:00
|
|
|
'items' => ['video-clips-list', 'video-clips-create', 'soundbites-edit'],
|
2021-09-07 17:43:09 +02:00
|
|
|
],
|
|
|
|
]; ?>
|
|
|
|
|
2021-11-05 15:36:34 +01:00
|
|
|
<a href="<?= route_to('podcast-view', $podcast->id) ?>" class="flex items-center px-4 py-2 focus:ring-inset focus:ring-accent">
|
2021-09-08 17:51:33 +02:00
|
|
|
<?= icon('arrow-left', 'mr-2') ?>
|
2021-09-07 17:43:09 +02:00
|
|
|
<img
|
2021-11-01 18:12:03 +01:00
|
|
|
src="<?= $podcast->cover->tiny_url ?>"
|
2021-09-07 17:43:09 +02:00
|
|
|
alt="<?= $podcast->title ?>"
|
2021-11-23 12:54:34 +01:00
|
|
|
class="object-cover w-6 h-6 rounded aspect-square"
|
2021-09-07 17:43:09 +02:00
|
|
|
/>
|
|
|
|
<span class="flex-1 w-full px-2 text-xs font-semibold truncate" title="<?= $podcast->title ?>"><?= $podcast->title ?></span>
|
|
|
|
</a>
|
2021-11-12 17:31:35 +01:00
|
|
|
<div class="flex items-center px-4 py-2 border-y border-navigation">
|
2021-09-07 17:43:09 +02:00
|
|
|
<img
|
2021-11-01 18:12:03 +01:00
|
|
|
src="<?= $episode->cover->thumbnail_url ?>"
|
2021-09-07 17:43:09 +02:00
|
|
|
alt="<?= $episode->title ?>"
|
2021-11-23 12:54:34 +01:00
|
|
|
class="object-cover w-16 h-16 rounded aspect-square"
|
2021-09-07 17:43:09 +02:00
|
|
|
/>
|
|
|
|
<div class="flex flex-col items-start flex-1 w-48 px-2">
|
|
|
|
<span class="w-full font-semibold truncate" title="<?= $episode->title ?>"><?= $episode->title ?></span>
|
|
|
|
<a href="<?= route_to(
|
2021-09-08 17:51:33 +02:00
|
|
|
'episode',
|
|
|
|
$podcast->handle,
|
|
|
|
$episode->slug,
|
2021-11-05 15:36:34 +01:00
|
|
|
) ?>" class="inline-flex items-center text-xs hover:underline focus:ring-accent"><?= lang(
|
2021-09-08 17:51:33 +02:00
|
|
|
'EpisodeNavigation.go_to_page',
|
|
|
|
) ?>
|
2021-09-07 17:43:09 +02:00
|
|
|
<?= icon('external-link', 'ml-1 opacity-60') ?>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<nav class="flex flex-col flex-1 py-4 overflow-y-auto gap-y-4">
|
|
|
|
<?php foreach ($podcastNavigation as $section => $data): ?>
|
|
|
|
<div>
|
2021-11-05 15:36:34 +01:00
|
|
|
<button class="inline-flex items-center w-full px-4 py-1 font-semibold focus:ring-accent" type="button">
|
2021-09-07 17:43:09 +02:00
|
|
|
<?= icon($data['icon'], 'opacity-60 text-2xl mr-4') .
|
|
|
|
lang('EpisodeNavigation.' . $section) ?>
|
|
|
|
</button>
|
|
|
|
<ul class="flex flex-col">
|
|
|
|
<?php foreach ($data['items'] as $item): ?>
|
|
|
|
<?php $isActive = url_is(route_to($item, $podcast->id, $episode->id)); ?>
|
|
|
|
<li class="inline-flex">
|
2021-11-05 15:36:34 +01:00
|
|
|
<a class="w-full py-1 pl-14 pr-2 text-sm hover:opacity-100 focus:ring-inset focus:ring-accent <?= $isActive
|
2021-09-07 17:43:09 +02:00
|
|
|
? 'font-semibold opacity-100 inline-flex items-center'
|
|
|
|
: 'opacity-75' ?>" href="<?= route_to(
|
2021-09-08 17:51:33 +02:00
|
|
|
$item,
|
|
|
|
$podcast->id,
|
|
|
|
$episode->id
|
|
|
|
) ?>"><?= ($isActive ? icon('chevron-right', 'mr-2') : '') . lang('EpisodeNavigation.' . $item) ?></a>
|
2021-09-07 17:43:09 +02:00
|
|
|
</li>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</nav>
|