1
0
Fork 0
isopod.cool/nav.php
will b53202db59 added dates to blog post pages + some other changes
Moved personal social/contact links from /links to /about
Other minor changes to /links
Added some PHP code to every blog post that automatically pulls the publish and update dates from the Atom feed
Added a button to /etc
Added a new webgarden
Updated /stats
Wording changes to /uses
2024-03-18 04:21:49 -06:00

32 lines
1 KiB
PHP

<?php
$host = $_SERVER['HTTP_HOST'];
function echolink($url, $name) {
global $host;
if("/$url/" != $_SERVER['REQUEST_URI']) {
echo "<a href='https://$host/$url/'>$name</a>";
} else {
echo "<span>$name</span>";
}
}
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");
echolink("uses", "uses");
echolink("music", "music");
echo "</div><div>";
echolink("blog", "blog");
echolink("links", "links");
echolink("stuff", "stuff");
echolink("guestbook", "guestbook");
echo "</div><div>";
echolink("stats", "stats");
echolink("greenhouse", "greenhouse");
echolink("etc", "etc");
echo "</div></nav>";
?>