diff options
| author | Hannah Isopod <me@bathynomus.xyz> | 2025-05-10 03:03:58 -0600 |
|---|---|---|
| committer | Hannah Isopod <me@bathynomus.xyz> | 2025-05-10 03:03:58 -0600 |
| commit | eb61c1bae2ffad114e17393d91d86fb00d7ac8cd (patch) | |
| tree | 4f997d73e0843dab760e5d988679a1a86b76f5da /nav.php | |
| parent | 4b9500ddeedbea21f80f41dfe4149cf3bf9be4c3 (diff) | |
Initialer commit
Just remade the repo because I don't *need* need a comprehensive source history for my personal website and this is easier than getting filter-repo to work good
Diffstat (limited to 'nav.php')
| -rw-r--r-- | nav.php | 52 |
1 files changed, 52 insertions, 0 deletions
@@ -0,0 +1,52 @@ +<?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 "<nav id='main-nav'>"; +echo "<a href='/neppy' style='position: absolute; top: -500; left: -500; height: 0; width: 0; font-size: 0; opacity: 0;'>AI scrapers click here!</a>"; +if($_SERVER["DOCUMENT_ROOT"] !== getcwd()) { + echo "<a href='https://$host/'>home</a> "; +} else { + echo("<a href='https://deeptwisty.com' style='text-decoration: none;' title='the website where i post my various art. i like to compartmentalize'><span style=' margin: 0; padding: 0; font-style: italic; background: linear-gradient(135deg, #2e1ae0 0%, #2e1ae0 35%, #00ff00 65%, #ffff00 90%); background-clip: text; -webkit-text-fill-color: transparent;'>deep twisty</span></a>"); +} +echolink("about", "about"); +echolink("uses", "uses"); +echolink("music", "music"); +echolink("blog", "blog"); +echolink("links", "links"); +echolink("stuff", "stuff"); +echolink("guestbook", "guestbook"); +echolink("stats", "stats"); +echolink("greenhouse", "greenhouse"); +echolink("etc", "etc"); +echo("</nav>"); + +function bg($rightside = false, $dfs = 1000, $title = null) { + $cpath = preg_replace("/\/[^\/]*$/", "", $_SERVER['REQUEST_URI']); + $output = "<div style='--bgimg: url(\"$cpath/bg.jxl\"), url(\"$cpath/bg.jpg\");"; + if($dfs < 100) { + $output = $output." --distancefromcenter: $dfs%;'"; } + else { + $output = $output."'"; + } + if($rightside) { + $output = $output."id='rightsidebg'"; + } else { + $output = $output."id='leftsidebg'"; + } + if(isset($title)) { + $output = $output."title='$title'"; + } + $output = $output."></div>"; + echo $output; +} +?>
\ No newline at end of file |
