mirror of
https://git.srhtnin.garden/sarah/srhtnin.github.io.git
synced 2026-10-14 10:48:12 +02:00
Added subnavbar.
This commit is contained in:
1 parent
bdf6871b84
commit
46c35689d7
8 files changed
+298
-19
No files matched your search
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
$SubNavbarItems ??= [];
|
||||
|
||||
if (count($SubNavbarItems) === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$SubNavbarCurrent ??= null;
|
||||
|
||||
?>
|
||||
|
||||
<nav
|
||||
class="SubNavbar"
|
||||
aria-label="Secondary navigation"
|
||||
>
|
||||
<?php foreach (
|
||||
$SubNavbarItems
|
||||
as $SubNavbarName => $SubNavbarHref
|
||||
): ?>
|
||||
<a
|
||||
class="SubNavbarLink"
|
||||
href="<?= htmlspecialchars(
|
||||
$SubNavbarHref,
|
||||
ENT_QUOTES,
|
||||
"UTF-8"
|
||||
) ?>"
|
||||
<?= $SubNavbarCurrent === $SubNavbarName
|
||||
? 'aria-current="page"'
|
||||
: "" ?>
|
||||
>
|
||||
<?= htmlspecialchars(
|
||||
$SubNavbarName,
|
||||
ENT_QUOTES,
|
||||
"UTF-8"
|
||||
) ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</nav>
|
||||
Reference in new issue
Block a user