mirror of
https://code.castopod.org/adaures/castopod
synced 2025-05-12 01:05:47 +00:00

- add pages migration, model and entity - add page controllers - update routes config to input page forms and page view in public - fix markdow editor focus area - show pages links in public side footer closes #24
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'],
|
|
],
|
|
'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>
|