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 #!/usr/bin/php
<?php <?php
if (!isset($GLOBALS["HEADER_TITLE"])) {
$GLOBALS["HEADER_TITLE"] = "About";
}
include "helpers/body_open.php"; include "helpers/body_open.php";
?> ?>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,7 +4,7 @@
cd `dirname $0` cd `dirname $0`
# Create the necessary HTML components for a web page. # 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 #Content for this page
cat << EOF cat << EOF

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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