2021-09-08 15:51:33 +00:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
2020-10-02 15:38:16 +00:00
|
|
|
$podcastNavigation = [
|
|
|
|
'dashboard' => [
|
|
|
|
'icon' => 'dashboard',
|
2021-09-07 15:43:09 +00:00
|
|
|
'items' => ['podcast-view', 'podcast-edit', 'podcast-persons-manage'],
|
2020-10-02 15:38:16 +00:00
|
|
|
],
|
|
|
|
'episodes' => [
|
|
|
|
'icon' => 'mic',
|
|
|
|
'items' => ['episode-list', 'episode-create'],
|
|
|
|
],
|
|
|
|
'analytics' => [
|
|
|
|
'icon' => 'line-chart',
|
2020-10-14 10:38:48 +00:00
|
|
|
'items' => [
|
|
|
|
'podcast-analytics',
|
|
|
|
'podcast-analytics-unique-listeners',
|
2020-10-19 10:33:23 +00:00
|
|
|
'podcast-analytics-listening-time',
|
2020-10-14 10:38:48 +00:00
|
|
|
'podcast-analytics-players',
|
|
|
|
'podcast-analytics-locations',
|
2020-11-02 18:15:19 +00:00
|
|
|
'podcast-analytics-time-periods',
|
2020-10-14 10:38:48 +00:00
|
|
|
'podcast-analytics-webpages',
|
|
|
|
],
|
2020-10-02 15:38:16 +00:00
|
|
|
],
|
|
|
|
'contributors' => [
|
|
|
|
'icon' => 'group',
|
|
|
|
'items' => ['contributor-list', 'contributor-add'],
|
|
|
|
],
|
2020-11-18 17:17:56 +00:00
|
|
|
'platforms' => [
|
2021-04-02 17:20:02 +00:00
|
|
|
'icon' => 'link',
|
2020-11-18 17:17:56 +00:00
|
|
|
'items' => [
|
|
|
|
'platforms-podcasting',
|
|
|
|
'platforms-social',
|
|
|
|
'platforms-funding',
|
|
|
|
],
|
2020-10-02 15:38:16 +00:00
|
|
|
],
|
|
|
|
]; ?>
|
|
|
|
|
2021-11-05 14:36:34 +00:00
|
|
|
<div class="flex items-center px-4 py-2 border-b border-navigation">
|
2020-10-02 15:38:16 +00:00
|
|
|
<img
|
2021-11-01 17:12:03 +00:00
|
|
|
src="<?= $podcast->cover->thumbnail_url ?>"
|
2020-10-02 15:38:16 +00:00
|
|
|
alt="<?= $podcast->title ?>"
|
2021-09-03 16:34:06 +00:00
|
|
|
class="object-cover w-16 h-16 rounded"
|
2020-10-02 15:38:16 +00:00
|
|
|
/>
|
2020-10-14 16:03:42 +00:00
|
|
|
<div class="flex flex-col items-start flex-1 w-48 px-2">
|
2021-09-03 16:34:06 +00:00
|
|
|
<span class="w-full font-semibold truncate" title="<?= $podcast->title ?>"><?= $podcast->title ?></span>
|
2020-10-02 15:38:16 +00:00
|
|
|
<a href="<?= route_to(
|
2021-09-08 15:51:33 +00:00
|
|
|
'podcast-activity',
|
|
|
|
$podcast->handle,
|
2021-11-05 14:36:34 +00:00
|
|
|
) ?>" class="inline-flex items-center text-sm hover:underline focus:ring-accent"
|
|
|
|
data-tooltip="bottom" title="<?= lang(
|
2021-09-08 15:51:33 +00:00
|
|
|
'PodcastNavigation.go_to_page',
|
|
|
|
) ?>">@<?= $podcast->handle ?>
|
2021-09-03 16:34:06 +00:00
|
|
|
<?= icon('external-link', 'ml-1 opacity-60') ?>
|
2020-10-02 15:38:16 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-09-03 16:34:06 +00:00
|
|
|
<nav class="flex flex-col flex-1 py-4 overflow-y-auto gap-y-4">
|
2020-10-02 15:38:16 +00:00
|
|
|
<?php foreach ($podcastNavigation as $section => $data): ?>
|
2021-09-03 16:34:06 +00:00
|
|
|
<div>
|
2021-11-05 14:36:34 +00:00
|
|
|
<button class="inline-flex items-center w-full px-4 py-1 font-semibold focus:ring-accent" type="button">
|
2021-09-03 16:34:06 +00:00
|
|
|
<?= icon($data['icon'], 'opacity-60 text-2xl mr-4') .
|
2021-04-02 17:20:02 +00:00
|
|
|
lang('PodcastNavigation.' . $section) ?>
|
2020-10-02 15:38:16 +00:00
|
|
|
</button>
|
2021-04-02 17:20:02 +00:00
|
|
|
<ul class="flex flex-col">
|
2020-10-02 15:38:16 +00:00
|
|
|
<?php foreach ($data['items'] as $item): ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
<?php $isActive = url_is(route_to($item, $podcast->id)); ?>
|
|
|
|
<li class="inline-flex">
|
2021-11-05 14:36:34 +00: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-03 16:34:06 +00:00
|
|
|
? 'font-semibold opacity-100 inline-flex items-center'
|
|
|
|
: 'opacity-75' ?>" href="<?= route_to(
|
2021-09-08 15:51:33 +00:00
|
|
|
$item,
|
|
|
|
$podcast->id,
|
|
|
|
) ?>"><?= ($isActive ? icon('chevron-right', 'mr-2') : '') . lang('PodcastNavigation.' . $item) ?></a>
|
2020-10-02 15:38:16 +00:00
|
|
|
</li>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</nav>
|