2021-09-08 15:51:33 +00:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
2020-07-27 09:35:34 +00:00
|
|
|
$navigation = [
|
2022-07-06 15:29:15 +00:00
|
|
|
'dashboard' => [
|
|
|
|
'icon' => 'dashboard',
|
|
|
|
'items' => ['admin'],
|
|
|
|
],
|
2020-07-27 09:35:34 +00:00
|
|
|
'podcasts' => [
|
|
|
|
'icon' => 'mic',
|
2020-08-27 10:05:44 +00:00
|
|
|
'items' => ['podcast-list', 'podcast-create', 'podcast-import'],
|
2020-07-27 09:35:34 +00:00
|
|
|
],
|
2021-02-10 16:20:01 +00:00
|
|
|
'persons' => [
|
|
|
|
'icon' => 'folder-user',
|
|
|
|
'items' => ['person-list', 'person-create'],
|
|
|
|
],
|
2021-04-02 17:20:02 +00:00
|
|
|
'fediverse' => [
|
|
|
|
'icon' => 'star-smile',
|
|
|
|
'items' => ['fediverse-blocked-actors', 'fediverse-blocked-domains'],
|
|
|
|
],
|
2021-09-08 15:51:33 +00:00
|
|
|
'users' => [
|
|
|
|
'icon' => 'group',
|
|
|
|
'items' => ['user-list', 'user-create'],
|
|
|
|
],
|
|
|
|
'pages' => [
|
|
|
|
'icon' => 'pages',
|
|
|
|
'items' => ['page-list', 'page-create'],
|
|
|
|
|
|
|
|
],
|
2021-10-26 15:54:56 +00:00
|
|
|
'settings' => [
|
|
|
|
'icon' => 'settings',
|
2021-11-08 16:52:20 +00:00
|
|
|
'items' => ['settings-general', 'settings-theme'],
|
2021-10-26 15:54:56 +00:00
|
|
|
],
|
2020-07-27 09:35:34 +00:00
|
|
|
]; ?>
|
|
|
|
|
2021-09-03 16:34:06 +00:00
|
|
|
<nav class="flex flex-col flex-1 py-4 overflow-y-auto gap-y-4">
|
2020-07-27 09:35:34 +00:00
|
|
|
<?php foreach ($navigation 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-11-08 16:52:20 +00:00
|
|
|
<?= lang('Navigation.' . $section) ?>
|
2020-07-27 09:35:34 +00:00
|
|
|
</button>
|
2021-04-02 17:20:02 +00:00
|
|
|
<ul class="flex flex-col">
|
2020-07-27 09:35:34 +00:00
|
|
|
<?php foreach ($data['items'] as $item): ?>
|
2021-04-02 17:20:02 +00:00
|
|
|
<?php $isActive = url_is(route_to($item)); ?>
|
|
|
|
<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'
|
2021-09-08 15:51:33 +00:00
|
|
|
: ' opacity-75' ?>" href="<?= route_to($item) ?>"><?= ($isActive ? icon('chevron-right', 'mr-2') : '') . lang(
|
2021-11-08 16:52:20 +00:00
|
|
|
'Navigation.' . $item,
|
2021-09-08 15:51:33 +00:00
|
|
|
) ?></a>
|
2020-07-27 09:35:34 +00:00
|
|
|
</li>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<?php endforeach; ?>
|
2022-10-18 16:53:51 +00:00
|
|
|
<a class="inline-flex items-center w-full px-4 py-1 font-semibold focus:ring-accent" href="<?= route_to('admin-about') ?>">
|
|
|
|
<?= icon('information', 'opacity-60 text-2xl mr-4') ?>
|
|
|
|
<?= lang('Navigation.about') ?>
|
|
|
|
</a>
|
2020-07-27 09:35:34 +00:00
|
|
|
</nav>
|