bfdd89595a
- New journal post - New article in da blog - Moved /uses, /music, and /greenhouse to top-level directories - Added some new guys to the landing page - Replaced background PNGs with JXLs with JPG fallback - Added mothvertisement - Added my isopod quiz results to /etc - Hid a broken webgarden - Fixed a bug where /guestbook was wider than the screen on mobile due to bad text wrapping\ - Link to my art page has been moved from /links to top navbar - Added to /links: - My revolt account - Unapothecary Link Directory - Removed my tumblr account from /links, at least for the time being. I quit posting for the bit, you see - Added a randomized MBTI type to /stats - Probably some other stuff I forgor
33 lines
1.1 KiB
PHP
33 lines
1.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>";
|
|
echo "<a href='https://deeptwisty.com/art/'>art</a>";
|
|
echolink("stats", "stats");
|
|
echolink("greenhouse", "greenhouse");
|
|
echolink("etc", "etc");
|
|
echo "</div></nav>";
|
|
?>
|