castopod/themes/cp_app/podcast/_partials/navigation.php
Yassine Doghri fee2c1c0d0 feat(pwa): add service-worker + webmanifest for each podcasts to have them install on devices
- configure service-worker using vite-plugin-pwa
- refactor Image entity to generate images of
different types based on size config
- add requirement for webp library for php gd to generate webp
images for instance
- add action to regenerate all instance images for eventual Images config
changes
- enhance google lighthouse metrics for pwa
2021-12-29 12:09:31 +00:00

24 lines
1.2 KiB
PHP

<?php declare(strict_types=1);
$navigationItems = [
[
'uri' => route_to('podcast-activity', $podcast->handle),
'label' => lang('Podcast.activity'),
],
[
'uri' => route_to('podcast-episodes', $podcast->handle),
'label' => lang('Podcast.episodes'),
],
[
'uri' => route_to('podcast-about', $podcast->handle),
'label' => lang('Podcast.about'),
],
]
?>
<nav class="sticky z-40 flex col-start-2 pt-8 shadow bg-elevated gap-x-2 md:gap-x-4 md:px-8 -top-6 md:-top-10 rounded-conditional-b-xl md:pt-12 ">
<?php foreach ($navigationItems as $item): ?>
<?php $isActive = url_is($item['uri']); ?>
<a href="<?= $item['uri'] ?>" class="px-4 py-1 text-sm font-semibold uppercase focus:ring-accent border-b-4<?= $isActive ? ' border-b-4 text-accent-base border-accent-base' : ' text-skin-muted hover:text-skin-base hover:border-subtle border-transparent' ?>"><?= $item['label'] ?></a>
<?php endforeach; ?>
<button type="button" class="p-2 ml-auto rotate-180 rounded-full md:hidden focus:ring-accent" data-sidebar-toggler="toggler" aria-label="<?= lang('Navigation.toggle_sidebar') ?>"><?= icon('menu') ?></button>
</nav>