aboutsummaryrefslogtreecommitdiff
path: root/header.php
diff options
context:
space:
mode:
authorFrankie B <floppydisk05@aol.com>2022-09-04 00:25:49 +0000
committerFrankie B <floppydisk05@aol.com>2022-09-04 00:25:49 +0000
commit8677395d2d186dd2d1871ca2ff2b4ef0dee8a74f (patch)
treeb7d12f9c918da2557a0c0664f0cffc22c6baa7c9 /header.php
parentb00662b1fedd298beee82aa5ba960631101c26d1 (diff)
Changes
Diffstat (limited to 'header.php')
-rw-r--r--header.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/header.php b/header.php
new file mode 100644
index 0000000..f350537
--- /dev/null
+++ b/header.php
@@ -0,0 +1,51 @@
+<?php
+ini_set('display_errors', 1);
+ini_set('display_startup_errors', 1);
+error_reporting(E_ALL);
+?>
+
+<div class="header">
+ <nav>
+ <div>
+ <a href="./me/">about</a> |
+ <a href="./pics/">pics</a> |
+ <a href="./projects/">projects</a> |
+ <a href="./cgit">repos</a> |
+ <a href="./calculators/">calculators</a> |
+ <a href="./computers/">computers</a> |
+ <a href="https://blog.diskfloppy.me/">blog</a>
+ </div>
+ </nav>
+ <div class="pagetree">
+ <div style="float: left;">Design based on <a href="https://finalrewind.org/">finalrewind.org</a></div>
+ <span class="title">
+ <?php
+ $uri = $_SERVER['REQUEST_URI'];
+ if ($uri === '/') {
+ echo '~floppydisk';
+ } else {
+ $uri = substr(substr($uri, 1), 0, -1);
+ if (strpos($uri, '/')) {
+ $uriArr = explode('/', $uri);
+ $link = "/";
+ $links = '<a href="/">~floppydisk</a> / ';
+ $currentDir = basename(getcwd());
+ foreach($uriArr as $page) {
+ if ($page !== $currentDir) {
+ if ($link !== '/')
+ $link = $link . '/' . $page;
+ else
+ $link = $link . $page;
+ $links = $links . '<a href="' . $link . '">' . $page . '</a> / ';
+ }
+ }
+ $links = substr($links, 0, -3) . ' / ' . $currentDir;
+ echo $links;
+ }
+ }
+ ?>
+
+ </span>
+ <div style="float: right;"><a onclick="javascript:toggleTheme()">dark / light mode</a></div>
+ </div>
+</div> <!-- header --> \ No newline at end of file