Chris
bd151ab4e6
Some checks failed
Build and push / Pulling repo on server (push) Failing after 17s
50 lines
2.3 KiB
HTML
50 lines
2.3 KiB
HTML
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
|
<div class="container-fluid">
|
|
<a class="navbar-brand" href="/home" hx-push-url="/home" hx-get="/home" hx-target="#main">
|
|
<img src="/imgs/dogstats-50.png" alt="Logo" width="50" height="50" class="d-inline-block align-text-top">
|
|
Dogstats
|
|
</a>
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
|
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
|
|
|
|
|
|
<?php foreach(getMenu() as $item) : ?>
|
|
<li <?php if (count($item['submenu'])) : ?>
|
|
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
|
<?= $item['text']?>
|
|
</a>
|
|
<ul class="dropdown-menu">
|
|
<?php foreach($item['submenu'] as $sub) : ?>
|
|
<li>
|
|
<a href="<?= $sub['action'] ?>" hx-push-url="<?= $sub['action'] ?>" hx-get="<?= $sub['action'] ?>" hx-target="#main" class="dropdown-item <?= $sub['classes']?:'' ?>">
|
|
<?php if($sub['icon']) : ?>
|
|
<i class="<?= $sub['icon'] ?>"></i>
|
|
<?php endif; ?>
|
|
|
|
<?= $sub['text'] ?>
|
|
</a>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</li>
|
|
<?php else : ?>
|
|
<li class="nav-item">
|
|
<a class="nav-link" aria-current="page" href="/<?= $item['url'] ?>" hx-push-url="/<?= $item['url'] ?>" hx-get="/<?= $item['url'] ?>" hx-target="#main">
|
|
<i class="<?= $item['image'] ?>"></i>
|
|
<?= $item['text'] ?>
|
|
</a>
|
|
</li>
|
|
|
|
<?php endif; ?>
|
|
</li>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</div>
|
|
</div>
|
|
</nav> |