website

Code for the bare sturcture of concealed.world.
git clone git://git.concealed.world/website
Log | Files | Refs | README | LICENSE

commit 9e2ca0c45db027c3b2cb6723ee154ed482a89924
parent 8b5a41321dcd530b64a5c74ae8b7095790fffffb
Author: Nixx <nixx@firemail.cc>
Date:   Sat,  8 Aug 2020 16:55:54 +0100

Added autofocus to article pages, moved _index.php code to separate file, added handling for non-existent files in _index.php?post=

Diffstat:
MGeneral/_index.php | 17+----------------
MMedia/Anime/_index.php | 17+----------------
MMedia/Art/_index.php | 17+----------------
MMedia/Games/_index.php | 17+----------------
MMedia/Music/_index.php | 17+----------------
MMedia/_index.php | 19++-----------------
MNews/_index.php | 17+----------------
MPrivacy/_index.php | 17+----------------
MProjects/_index.php | 17+----------------
MScripting/_index.php | 17+----------------
Mabout.php | 1+
Mcontact.php | 1+
Mincludes/article-start.php | 1+
Aincludes/formatindex.php | 34++++++++++++++++++++++++++++++++++
Mstyles/default.css | 4++++
15 files changed, 52 insertions(+), 161 deletions(-)

diff --git a/General/_index.php b/General/_index.php @@ -5,20 +5,5 @@ $tags="blog"; $message=$title; $submessage="Unassorted rambling."; -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-start.php"; - require $_GET['post']; -} else { - require $root."includes/default-start.php"; - require $root."includes/seemore.php"; - require $root."includes/listing-content.php"; -} -?> - -<?php -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-end.php"; -} else { - require $root."includes/default-end.php"; -} +require $root."includes/formatindex.php"; ?> diff --git a/Media/Anime/_index.php b/Media/Anime/_index.php @@ -6,20 +6,5 @@ $tags="blog,media,anime"; $message=$title; $submessage="I watch a lot of anime."; -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-start.php"; - require $_GET['post']; -} else { - require $root."includes/default-start.php"; - require $root."includes/seemore.php"; - require $root."includes/listing-content.php"; -} -?> - -<?php -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-end.php"; -} else { - require $root."includes/default-end.php"; -} +require $root."includes/formatindex.php"; ?> diff --git a/Media/Art/_index.php b/Media/Art/_index.php @@ -6,20 +6,5 @@ $tags="blog,media,art"; $message=$title; $submessage="Visual media."; -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-start.php"; - require $_GET['post']; -} else { - require $root."includes/default-start.php"; - require $root."includes/seemore.php"; - require $root."includes/listing-content.php"; -} -?> - -<?php -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-end.php"; -} else { - require $root."includes/default-end.php"; -} +require $root."includes/formatindex.php"; ?> diff --git a/Media/Games/_index.php b/Media/Games/_index.php @@ -6,20 +6,5 @@ $tags="blog,media,games"; $message=$title; $submessage="Interactive media."; -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-start.php"; - require $_GET['post']; -} else { - require $root."includes/default-start.php"; - require $root."includes/seemore.php"; - require $root."includes/listing-content.php"; -} -?> - -<?php -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-end.php"; -} else { - require $root."includes/default-end.php"; -} +require $root."includes/formatindex.php"; ?> diff --git a/Media/Music/_index.php b/Media/Music/_index.php @@ -6,20 +6,5 @@ $tags="blog,media,music"; $message=$title; $submessage="An influx of listening material."; -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-start.php"; - require $_GET['post']; -} else { - require $root."includes/default-start.php"; - require $root."includes/seemore.php"; - require $root."includes/listing-content.php"; -} -?> - -<?php -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-end.php"; -} else { - require $root."includes/default-end.php"; -} +require $root."includes/formatindex.php"; ?> diff --git a/Media/_index.php b/Media/_index.php @@ -3,25 +3,10 @@ $root="../"; $title="Media"; $tags="blog,media"; #$scanfiles=array("./Anime/", "./Art/", "./Games/", "./Music/"); -$scanfiles=array("./Art/"); +$scanfiles=array("./Art/", "./Games/"); $message=$title; $submessage=""; -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-start.php"; - require $_GET['post']; -} else { - require $root."includes/default-start.php"; - require $root."includes/seemore.php"; - require $root."includes/listing-content.php"; -} -?> - -<?php -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-end.php"; -} else { - require $root."includes/default-end.php"; -} +require $root."includes/formatindex.php"; ?> diff --git a/News/_index.php b/News/_index.php @@ -5,20 +5,5 @@ $tags="blog,website,news"; $message=$title; $submessage="Anything new of note I'm doing with the website."; -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-start.php"; - require $_GET['post']; -} else { - require $root."includes/default-start.php"; - require $root."includes/seemore.php"; - require $root."includes/listing-content.php"; -} -?> - -<?php -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-end.php"; -} else { - require $root."includes/default-end.php"; -} +require $root."includes/formatindex.php"; ?> diff --git a/Privacy/_index.php b/Privacy/_index.php @@ -6,20 +6,5 @@ $tags="blog,privacy,online privacy"; $message=$title; $submessage="The best encryption protocol is pen and paper. The best encryption layer is irl."; -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-start.php"; - require $_GET['post']; -} else { - require $root."includes/default-start.php"; - require $root."includes/seemore.php"; - require $root."includes/listing-content.php"; -} -?> - -<?php -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-end.php"; -} else { - require $root."includes/default-end.php"; -} +require $root."includes/formatindex.php"; ?> diff --git a/Projects/_index.php b/Projects/_index.php @@ -6,20 +6,5 @@ $tags="blog,projects,software projects"; $message=$title; $submessage="Anything I'm working on in the long or short-term."; -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-start.php"; - require $_GET['post']; -} else { - require $root."includes/default-start.php"; - require $root."includes/seemore.php"; - require $root."includes/listing-content.php"; -} -?> - -<?php -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-end.php"; -} else { - require $root."includes/default-end.php"; -} +require $root."includes/formatindex.php"; ?> diff --git a/Scripting/_index.php b/Scripting/_index.php @@ -6,20 +6,5 @@ $tags="blog,software,scripting"; $message=$title; $submessage="I write scripts."; -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-start.php"; - require $_GET['post']; -} else { - require $root."includes/default-start.php"; - require $root."includes/seemore.php"; - require $root."includes/listing-content.php"; -} -?> - -<?php -if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { - require $root."includes/article-end.php"; -} else { - require $root."includes/default-end.php"; -} +require $root."includes/formatindex.php"; ?> diff --git a/about.php b/about.php @@ -6,6 +6,7 @@ require "includes/default-start.php"; ?> <div class="article article-headerless"> +<a href="#" autofocus></a> <a href=""><h1>About</h1></a> <h3>Example text</h3> diff --git a/contact.php b/contact.php @@ -6,6 +6,7 @@ require "includes/default-start.php"; ?> <div class="article article-headerless"> +<a href="#" autofocus></a> <a href=""><h1>Contact</h1></a> <h3>Example text</h3> diff --git a/includes/article-start.php b/includes/article-start.php @@ -39,4 +39,5 @@ echo '<body>'; echo '</div>'; echo '</center>'; echo '<div class="article">'; + echo '<a href="#" autofocus></a>'; ?> diff --git a/includes/formatindex.php b/includes/formatindex.php @@ -0,0 +1,34 @@ +<?php +if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { + require $root."includes/article-start.php"; + if (!file_exists($_GET['post'])) { + echo '<h3>404 - File Not Found</h3>'; + + echo '<div class="lostimg">'; + echo '<a class="lostimglink" href="/home.php">'; + echo '<span class="largefont">Take me Home, '; + echo 'country road</span>'; + echo '</a>'; + echo '</div>'; + } else { + require $_GET['post']; + } +} else { + require $root."includes/default-start.php"; + require $root."includes/seemore.php"; + require $root."includes/listing-content.php"; +} + +if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { + if (!file_exists($_GET['post'])) { + echo '<style>'; + echo '.article > b {'; + echo 'display: none;'; + echo '}'; + echo '</style>'; + } + require $root."includes/article-end.php"; +} else { + require $root."includes/default-end.php"; +} +?> diff --git a/styles/default.css b/styles/default.css @@ -437,6 +437,10 @@ input[type="submit" i] { word-break: break-all; } +.largefont { + font-size: 2em; +} + /* POST TEXT GLOWS .section > p, .article > p { text-shadow: 0 0 3px var(--fg-col);