mirror of
https://code.castopod.org/adaures/castopod.git
synced 2024-09-03 01:17:19 +02:00
- set and remove platform links for a podcast - remove unnecessary fields from platforms and platform_links tables - add platforms svg icons to show in form - update platform and auth seeders - update svgo config for images
41 lines
1.6 KiB
PHP
41 lines
1.6 KiB
PHP
<?php
|
|
$navigation = [
|
|
'dashboard' => ['icon' => 'dashboard', 'items' => ['admin']],
|
|
'podcasts' => [
|
|
'icon' => 'mic',
|
|
'items' => ['podcast-list', 'podcast-create', 'podcast-import'],
|
|
],
|
|
'users' => ['icon' => 'group', 'items' => ['user-list', 'user-create']],
|
|
'pages' => ['icon' => 'pages', 'items' => ['page-list', 'page-create']],
|
|
]; ?>
|
|
|
|
<nav class="<?= $class ?>">
|
|
<?php foreach ($navigation as $section => $data): ?>
|
|
<div class="mb-4">
|
|
<button class="inline-flex items-center w-full px-6 py-1 outline-none focus:shadow-outline" type="button">
|
|
<?= icon($data['icon'], 'text-gray-500') ?>
|
|
<span class="ml-2"><?= lang('AdminNavigation.' . $section) ?></span>
|
|
</button>
|
|
<ul>
|
|
<?php foreach ($data['items'] as $item): ?>
|
|
<?php $isActive = base_url(route_to($item)) == current_url(); ?>
|
|
<li>
|
|
<a class="block py-1 pl-12 pr-2 text-sm text-gray-600 outline-none hover:text-gray-900 focus:shadow-outline <?= $isActive
|
|
? 'font-semibold text-gray-900'
|
|
: '' ?>" href="<?= route_to($item) ?>"><?= lang(
|
|
'AdminNavigation.' . $item
|
|
) ?></a>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
|
|
<a href="<?= route_to(
|
|
'home'
|
|
) ?>" class="inline-flex items-center px-4 py-1 mt-auto text-sm underline outline-none hover:no-underline focus:shadow-outline">
|
|
<?= lang('AdminNavigation.go_to_website') ?>
|
|
<?= icon('external-link', 'ml-2 text-gray-500') ?>
|
|
</a>
|
|
</nav>
|