Fix navigation list item structure in base template

This commit is contained in:
Ruben 2025-11-03 22:34:30 +01:00
parent 43b0abac3f
commit f503e5289f

View file

@ -34,10 +34,10 @@ function getActiveClass($href) { return rtrim(parse_url($_SERVER['REQUEST_URI'],
</div>
<nav>
<ul>
<a href="/" class="button <?php echo getActiveClass('/'); ?>"><li><?= htmlspecialchars($homeLabel ?? 'Forsiden') ?></li></a>
<li><a href="/" class="button <?php echo getActiveClass('/'); ?>"><?= htmlspecialchars($homeLabel ?? 'Forsiden') ?></a></li>
<?php if (!empty($navigation)): ?>
<?php foreach ($navigation as $item): ?>
<a href="<?= htmlspecialchars($item['url']) ?>" class="button <?php echo getActiveClass($item['url']); ?>"><li><?= htmlspecialchars($item['title']) ?></li></a>
<li><a href="<?= htmlspecialchars($item['url']) ?>" class="button <?php echo getActiveClass($item['url']); ?>"><?= htmlspecialchars($item['title']) ?></a></li>
<?php endforeach; ?>
<?php endif; ?>
</ul>