Move title path thing to page title

This commit is contained in:
Frankie B 2022-12-20 20:55:38 +00:00
parent 907203d6f7
commit 2195834edb
12 changed files with 32 additions and 37 deletions

View file

@ -6,7 +6,7 @@
<?php require('../inc/header.inc.php'); ?>
<!-- Page-specific -->
<title>Bookmarks</title>
<?php require_once('../inc/title.inc.php') ?>
<!--<link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon">-->
<meta property="og:title" content="title">
<meta property="og:description" content="description">

View file

@ -6,7 +6,7 @@
<?php require('../inc/header.inc.php'); ?>
<!-- Page-specific -->
<title>Bookmarks</title>
<?php require_once('../inc/title.inc.php') ?>
<!--<link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon">-->
<meta property="og:title" content="Bookmarks">
<meta property="og:description" content="friends' websites or sites I just find cool">

View file

@ -5,7 +5,7 @@
<?php require('../inc/header.inc.php'); ?>
<!-- Page-specific -->
<title>Calculators</title>
<?php require_once('../inc/title.inc.php') ?>
<link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon">
<meta property="og:title" content="Calculators">
<meta property="og:description" content="C a l c u l a t o r s">

View file

@ -6,7 +6,7 @@
<?php require('../inc/header.inc.php'); ?>
<!-- Page-specific -->
<title>Computers</title>
<?php require_once('../inc/title.inc.php') ?>
<!--<link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon">-->
<meta property="og:title" content="Computers">
<meta property="og:description" content="Computers I own or have owned.">

View file

@ -6,7 +6,7 @@
<?php require('../inc/header.inc.php'); ?>
<!-- Page-specific -->
<title>Guestbook</title>
<?php require_once('../inc/title.inc.php') ?>
<!--<link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon">-->
<meta property="og:title" content="Guestbook">
<meta property="og:description" content="h">

View file

@ -6,7 +6,7 @@
<?php require('../inc/header.inc.php'); ?>
<!-- Page-specific -->
<title>Guestbook</title>
<?php require_once('../inc/title.inc.php') ?>
<!--<link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon">-->
<!--<meta property="og:image" content="/res/img/icons/png/computer.png">-->
</head>

View file

@ -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 -->

22
inc/title.inc.php Normal file
View file

@ -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>

View file

@ -7,7 +7,7 @@
<?php require('./inc/header.inc.php'); ?>
<!-- Page-specific -->
<title>~floppydisk</title>
<?php require_once('./inc/title.inc.php') ?>
<meta property="og:title" content="~floppydisk">
<meta property="og:description" content="This is the personal homepage of floppydisk.">
<meta property="og:image" content="/favicon.png">

View file

@ -6,7 +6,7 @@
<?php require('../inc/header.inc.php'); ?>
<!-- Page-specific -->
<title>Calculators</title>
<?php require_once('../inc/title.inc.php') ?>
<link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon">
<meta property="og:title" content="Calculators">
<meta property="og:description" content="C a l c u l a t o r s">

View file

@ -6,7 +6,7 @@
<?php require('../inc/header.inc.php'); ?>
<!-- Page-specific -->
<title>Pictures</title>
<?php require_once('../inc/title.inc.php') ?>
<!--<link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon">-->
<meta property="og:title" content="Pictures">
<meta property="og:description" content="description">

View file

@ -6,7 +6,7 @@
<?php require('../inc/header.inc.php'); ?>
<!-- Page-specific -->
<title>Projects</title>
<?php require_once('../inc/title.inc.php') ?>
<!--<link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon">-->
<meta property="og:title" content="Projects">
<meta property="og:description" content="Personal and group projects">