aboutsummaryrefslogtreecommitdiff
path: root/nav.php
diff options
context:
space:
mode:
Diffstat (limited to 'nav.php')
-rw-r--r--nav.php52
1 files changed, 52 insertions, 0 deletions
diff --git a/nav.php b/nav.php
new file mode 100644
index 0000000..5aa104f
--- /dev/null
+++ b/nav.php
@@ -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