mirror of
https://code.castopod.org/adaures/castopod.git
synced 2024-09-09 04:09:24 +02:00
c0e66d5f70
- bundle js using parcel - add markdown editor, html editor, dropdown and tooltip features using third-party packages - integrate optimized inline svg icons from RemixIcon using svgo and a php helper - add scripts in package.json to bundle icons, images, css and js - update tailwind config to add purgecss lookups and typography plugin - refactor views to add missing pages in user journey - update admin's holy grail layout using css grid
40 lines
1.5 KiB
PHP
40 lines
1.5 KiB
PHP
<?php
|
|
$navigation = [
|
|
'dashboard' => ['icon' => 'dashboard', 'items' => ['admin_home']],
|
|
'podcasts' => [
|
|
'icon' => 'mic',
|
|
'items' => ['podcast_list', 'podcast_create'],
|
|
],
|
|
'users' => ['icon' => 'group', 'items' => ['user_list', 'user_create']],
|
|
]; ?>
|
|
|
|
<nav class="<?= $class ?>">
|
|
<?php foreach ($navigation as $section => $data): ?>
|
|
<div class="mb-4">
|
|
<button class="inline-flex items-center w-full px-4 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-10 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>
|