Added navbar.

This commit is contained in:
sarah committed 2026-08-19 19:31:45 +02:00
1 parent 22662dd928
commit 0593a33649
4 files changed
+139 -7

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
<?php
$NavbarPages = [
"Home" => "/",
"Sarahtonin" => "/Pages/Sarahtonin.html"
];
?>
<nav class="Navbar" aria-label="Main navigation">
<?php foreach ($NavbarPages as $NavbarPage => $NavbarHref): ?>
<a
class="NavbarLink"
href="<?= htmlspecialchars($NavbarHref, ENT_QUOTES, "UTF-8") ?>"
aria-label="<?= htmlspecialchars($NavbarPage, ENT_QUOTES, "UTF-8") ?>"
title="<?= htmlspecialchars($NavbarPage, ENT_QUOTES, "UTF-8") ?>"
<?= ($PageTitle ?? "") === $NavbarPage ? 'aria-current="page"' : "" ?>
>
<img
class="NavbarIcon"
src="/Assets/Img/<?= rawurlencode($NavbarPage) ?>.png"
alt=""
>
</a>
<?php endforeach; ?>
</nav>
+2 -6
View File
@@ -10,6 +10,8 @@ $PageTitle = "Home";
<?php require __DIR__ . "/Bits/Head.php"; ?>
<body>
<?php require __DIR__ . "/Bits/Navbar.php"; ?>
<main class="MainContainer">
<h1>Welcome</h1>
@@ -18,12 +20,6 @@ $PageTitle = "Home";
Feel free to browse around as much as you want.
</p>
<p>
If you want to access <strong>other links</strong>, you probably need to join my tailscale network.
<br>
Also, this is simply the homepage. You can use the <strong>navbar</strong> to the right to navigate around.
</p>
<p>
<b>
Have fun snooping!
+2
View File
@@ -10,6 +10,8 @@ $PageTitle = "Sarahtonin";
<?php require __DIR__ . "/Bits/Head.php"; ?>
<body>
<?php require __DIR__ . "/Bits/Navbar.php"; ?>
<main class="MainContainer">
<h1>About me</h1>