aboutsummaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/head.html4
-rw-r--r--inc/nav.php44
2 files changed, 48 insertions, 0 deletions
diff --git a/inc/head.html b/inc/head.html
new file mode 100644
index 0000000..93953e9
--- /dev/null
+++ b/inc/head.html
@@ -0,0 +1,4 @@
+<meta charset="utf-8">
+ <meta property="og:type" content="website">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <link rel="stylesheet" id="theme" href="/res/css/dark.css" type="text/css">
diff --git a/inc/nav.php b/inc/nav.php
new file mode 100644
index 0000000..3f14fff
--- /dev/null
+++ b/inc/nav.php
@@ -0,0 +1,44 @@
+<script lang="javascript" src="/res/js/themeswap.js"></script>
+<div class="header">
+ <nav>
+ <div>
+ <!--<a href="/me/">about</a> |
+ <a href="/projects/">projects</a> |
+ <a href="/pics/">pics</a> |-->
+ <a href="/dog/">dog</a> |
+ <a href="https://github.com/floppydisk05?tab=repositories">repos</a> |
+ <a href="/calculators/">calculators</a> |
+ <a href="/computers/">computers</a> |
+ <a href="/bookmarks/">bookmarks</a> |
+ <a href="https://blog.diskfloppy.me/">blog</a>
+ </div>
+ </nav>
+ <div class="pagetree">
+ <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