Add headers to all pages! Also update the look and feel of the test page.

This commit is contained in:
Hyperling 2025-05-27 12:41:17 -07:00
parent 18cd38b194
commit 073377532e
15 changed files with 69 additions and 19 deletions

View File

@ -1,5 +1,8 @@
#!/usr/bin/php
<?php
if (!isset($GLOBALS["HEADER_TITLE"])) {
$GLOBALS["HEADER_TITLE"] = "About";
}
include "helpers/body_open.php";
?>

View File

@ -3,5 +3,8 @@
Synonym for home page.
-->
<?php
if (!isset($GLOBALS["HEADER_TITLE"])) {
$GLOBALS["HEADER_TITLE"] = "Apps";
}
include "home.php";
?>

View File

@ -1,5 +1,8 @@
#!/usr/bin/php
<?php
if (!isset($GLOBALS["HEADER_TITLE"])) {
$GLOBALS["HEADER_TITLE"] = "Contact";
}
include "helpers/body_open.php";
?>

View File

@ -3,5 +3,8 @@
Alias for the support page with a more common name.
-->
<?php
if (!isset($GLOBALS["HEADER_TITLE"])) {
$GLOBALS["HEADER_TITLE"] = "Donate";
}
include "support.php";
?>

View File

@ -4,6 +4,9 @@
-->
<?php
$GLOBALS["ADVISORY"] = false;
if (!isset($GLOBALS["HEADER_TITLE"])) {
$GLOBALS["HEADER_TITLE"] = "Health";
}
include "helpers/body_open.php";
?>

View File

@ -1,8 +1,15 @@
#!/usr/bin/php
<?php
if (!isset($GLOBALS["HEADER_TITLE"])) {
$GLOBALS["HEADER_TITLE"] = "";
} else {
$GLOBALS["HEADER_TITLE"] = ": " . $GLOBALS["HEADER_TITLE"];
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hyperling</title>
<title>Hyperling<?php echo($GLOBALS["HEADER_TITLE"]); ?></title>
<link rel="icon" sizes="32x32"
href="/files/media/icons/favicon.ico"
>

View File

@ -3,6 +3,9 @@
Landing page, keeping it apps and development projects like old WordPress site.
-->
<?php
if (!isset($GLOBALS["HEADER_TITLE"])) {
$GLOBALS["HEADER_TITLE"] = "Home";
}
include "helpers/body_open.php";
?>

View File

@ -4,7 +4,7 @@
cd `dirname $0`
# Create the necessary HTML components for a web page.
./helpers/body_open.php
./helpers/body_open.php | sed -e 's/Hyperling/Hyperling: Journey/'
#Content for this page
cat << EOF

View File

@ -3,6 +3,9 @@
Lists of items which I'd like to share such as gear and frequently used apps.
-->
<?php
if (!isset($GLOBALS["HEADER_TITLE"])) {
$GLOBALS["HEADER_TITLE"] = "Lists";
}
include "helpers/body_open.php";
?>

View File

@ -3,6 +3,9 @@
Page for my video links.
-->
<?php
if (!isset($GLOBALS["HEADER_TITLE"])) {
$GLOBALS["HEADER_TITLE"] = "Media";
}
include "helpers/body_open.php";
?>

View File

@ -32,6 +32,7 @@ fi
function start_main_page {
# Create the necessary HTML components for a web page.
$HELPER_DIR/body_open.php > $mainpage
sed -i -e 's/Hyperling/Hyperling: Photos/' $mainpage
echo "" >> $mainpage
# Give the page a description.
@ -89,6 +90,8 @@ function build_album_pages {
page=""
subpage="$PHOTOS_DIR/$album/index.html"
$HELPER_DIR/body_open.php > $subpage
sed -i -e "s/Hyperling/Hyperling: $album_name/" $subpage
echo "" >> $subpage
# Add a back button
echo -en "\n\t\t<div class='row'>\n\t\t\t<a href='/photos'>" >> $subpage
@ -190,6 +193,7 @@ function build_all_page {
# Create/overwrite file.
$HELPER_DIR/body_open.php > $allpage
sed -i -e 's/Hyperling/Hyperling: All Photos/' $allpage
echo "" >> $allpage
# Add header.

View File

@ -3,6 +3,9 @@
Page for my resume and work skill links.
-->
<?php
if (!isset($GLOBALS["HEADER_TITLE"])) {
$GLOBALS["HEADER_TITLE"] = "Resume";
}
include "helpers/body_open.php";
?>

View File

@ -3,6 +3,9 @@
Page to provide ways people can support me.
-->
<?php
if (!isset($GLOBALS["HEADER_TITLE"])) {
$GLOBALS["HEADER_TITLE"] = "Support";
}
include "helpers/body_open.php";
?>

View File

@ -4,27 +4,33 @@
cd `dirname $0`
# Create the necessary HTML components for a web page.
./helpers/body_open.php
echo -e "\t\t<h1>This is a web page written in BASH!!!</h1>"
./helpers/body_open.php | sed -e 's/Hyperling/Hyperling: Test Page!/'
echo -e "\t\t<div class='row'>"
echo -e "\t\t\t<h1 class='col-12 title'>This is a web page written in BASH!!!</h1>"
cat << EOF
<p>
Look at all the fancy things we can do!
</p>
<h2>Current Time</h2>
<p>
We can use the date command to spit out the time!
</p>
<p>
`date`
</p>
<p class="col-12 text">
Look at all the fancy things we can do!
</p>
<h2 class="col-12 header">Current Time</h2>
<div class="col-12 text">
<p>
We can use the date command to spit out the time!
</p>
<p>
`date`
</p>
</div>
EOF
# Create a subsection
echo -e "\t\t<h2>Server Neofetch</h2>"
echo -e "\t\t<p>"
#neofetch --stdout
echo "jk lol"
echo -e "\t\t</p>"
echo -e "\t\t\t<h2 class='col-12 header'>Server Neofetch</h2>"
echo -en "\t\t\t<p class='col-12 text'>"
#neofetch --stdout | sed -e 's/\n/<br>/g'
echo -n "jk lol"
echo -e "</p>"
echo -e "\t\t</div>"
# Finish the web page
./helpers/body_close.php

View File

@ -4,5 +4,8 @@
Deprecated 2024-03-06 for /media.
-->
<?php
if (!isset($GLOBALS["HEADER_TITLE"])) {
$GLOBALS["HEADER_TITLE"] = "Videos";
}
include "media.php";
?>