2023-01-09 21:30:45 +00:00
|
|
|
<?php
|
2023-02-26 11:22:38 +00:00
|
|
|
|
2023-01-09 21:30:45 +00:00
|
|
|
$host = $_SERVER['HTTP_HOST'];
|
2023-02-26 11:22:38 +00:00
|
|
|
|
|
|
|
function echolink($url, $name) {
|
|
|
|
global $host;
|
|
|
|
if("/$url/" != $_SERVER['REQUEST_URI']) {
|
|
|
|
echo "<a href='https://$host/$url/'>$name</a>";
|
2023-01-09 21:30:45 +00:00
|
|
|
} else {
|
2023-02-26 11:22:38 +00:00
|
|
|
echo "<span>$name</span>";
|
2023-01-09 21:30:45 +00:00
|
|
|
}
|
|
|
|
}
|
2023-02-26 11:22:38 +00:00
|
|
|
echo "<input type='checkbox' id='navtoggle'>";
|
|
|
|
echo '<label for="navtoggle"><svg xmlns="http://www.w3.org/2000/svg" viewBox="-5 -7 24 24" width="32" fill="currentColor"><path d="M1 0h12a1 1 0 0 1 0 2H1a1 1 0 1 1 0-2zm0 8h12a1 1 0 0 1 0 2H1a1 1 0 1 1 0-2zm0-4h12a1 1 0 0 1 0 2H1a1 1 0 1 1 0-2z"></path></svg></label>';
|
|
|
|
echo "<nav id='main-nav' style='--rowcount: 3;'><div>";
|
|
|
|
if($_SERVER["DOCUMENT_ROOT"] !== getcwd()) {
|
|
|
|
echo "<a href='https://$host/'>home</a>";
|
|
|
|
}
|
|
|
|
echolink("about", "about");
|
2023-08-21 14:46:34 +00:00
|
|
|
echolink("uses", "uses");
|
|
|
|
echolink("music", "music");
|
2023-02-26 11:22:38 +00:00
|
|
|
echo "</div><div>";
|
|
|
|
echolink("blog", "blog");
|
|
|
|
echolink("links", "links");
|
|
|
|
echolink("stuff", "stuff");
|
|
|
|
echolink("guestbook", "guestbook");
|
|
|
|
echo "</div><div>";
|
2023-08-02 04:55:01 +00:00
|
|
|
echo "<a href='https://deeptwisty.com/art/'>art</a>";
|
2023-02-26 11:22:38 +00:00
|
|
|
echolink("stats", "stats");
|
2023-08-21 14:46:34 +00:00
|
|
|
echolink("greenhouse", "greenhouse");
|
2023-02-26 11:22:38 +00:00
|
|
|
echolink("etc", "etc");
|
|
|
|
echo "</div></nav>";
|
2023-01-09 21:30:45 +00:00
|
|
|
?>
|