aboutsummaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorFrankie B <floppydisk05@aol.com>2022-12-20 20:55:38 +0000
committerFrankie B <floppydisk05@aol.com>2022-12-20 20:55:38 +0000
commit2195834edbc91935b70f937ce7a168d3a2e0c3b8 (patch)
tree501fe6ca2d4dbf3cb14dccae99e0d9994fe25b20 /inc
parent907203d6f73ea8aa9de82126b57b9f694d24dd99 (diff)
Move title path thing to page title
Diffstat (limited to 'inc')
-rw-r--r--inc/nav.inc.php27
-rw-r--r--inc/title.inc.php22
2 files changed, 22 insertions, 27 deletions
diff --git a/inc/nav.inc.php b/inc/nav.inc.php
index e75445c..c626142 100644
--- a/inc/nav.inc.php
+++ b/inc/nav.inc.php
@@ -9,31 +9,4 @@
<a href="/guestbook/">guestbook</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> <!-- pagetree -->
</div> <!-- header --> \ No newline at end of file
diff --git a/inc/title.inc.php b/inc/title.inc.php
new file mode 100644
index 0000000..149f0c8
--- /dev/null
+++ b/inc/title.inc.php
@@ -0,0 +1,22 @@
+<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 = '~floppydisk / ';
+ $currentDir = basename(getcwd());
+ foreach($uriArr as $page) {
+ if ($page !== $currentDir) {
+ if ($link !== '/') $link = $link . '/' . $page;
+ else $link = $link . $page;
+ $links = $links . $link . $page . ' / ';
+ }
+ }
+ $links = substr($links, 0, -3) . ' / ' . $currentDir;
+ echo $links;
+ }
+}
+?></title>