drink-it-cold/views/_admin_nav.php

18 lines
790 B
PHP
Raw Normal View History

<?php
$path = current_path();
$items = [
'/admin/users' => ['label' => 'Benutzer', 'icon' => 'i-user'],
'/admin/employees' => ['label' => 'Mitarbeiter', 'icon' => 'i-users'],
'/admin/trailers' => ['label' => 'Anhänger', 'icon' => 'i-truck'],
'/admin/mailings' => ['label' => 'Rundmail', 'icon' => 'i-mail'],
'/admin/backups' => ['label' => 'Sicherungen', 'icon' => 'i-database'],
];
?>
<nav class="admin-nav" aria-label="Verwaltung">
<?php foreach ($items as $href => $item): ?>
<a href="<?= e(url($href)) ?>"<?= str_starts_with($path, $href) ? ' class="is-active" aria-current="page"' : '' ?>>
<svg class="ico" aria-hidden="true"><use href="#<?= e($item['icon']) ?>"/></svg><?= e($item['label']) ?>
</a>
<?php endforeach; ?>
</nav>