aboutsummaryrefslogtreecommitdiff
path: root/_site/includes/dom
diff options
context:
space:
mode:
authorMinteck <46352972+Minteck@users.noreply.github.com>2021-06-29 20:00:07 +0200
committerMinteck <46352972+Minteck@users.noreply.github.com>2021-06-29 20:00:07 +0200
commitd2733aa17b7932dfb78e97639e7d568ac41b9ee1 (patch)
tree1e77dbe51e192c42f993e79e53532d3558d36bcb /_site/includes/dom
parent9f3bd84cb82a7f57a49701018a7fb43eb77c65aa (diff)
downloadunchainedtech-d2733aa17b7932dfb78e97639e7d568ac41b9ee1.tar.gz
unchainedtech-d2733aa17b7932dfb78e97639e7d568ac41b9ee1.tar.bz2
unchainedtech-d2733aa17b7932dfb78e97639e7d568ac41b9ee1.zip
Let's finally commit stuff!
Diffstat (limited to '_site/includes/dom')
-rw-r--r--_site/includes/dom/footer.php8
-rw-r--r--_site/includes/dom/header.php313
2 files changed, 321 insertions, 0 deletions
diff --git a/_site/includes/dom/footer.php b/_site/includes/dom/footer.php
new file mode 100644
index 0000000..31b6cb8
--- /dev/null
+++ b/_site/includes/dom/footer.php
@@ -0,0 +1,8 @@
+<hr>
+
+<div class="container">
+ <p># blogchain <a href="https://twitter.com/_Minteck" target="_blank">--twitter</a> <a href="https://github.com/Minteck/Blogchain-Software" target="_blank">--github</a>gi_</p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/_site/includes/dom/header.php b/_site/includes/dom/header.php
new file mode 100644
index 0000000..7398567
--- /dev/null
+++ b/_site/includes/dom/header.php
@@ -0,0 +1,313 @@
+<?php
+
+ob_start();
+
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/markdown.php";
+$Parsedown = new Parsedown();
+
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/articles/getlist.php";
+
+function customShutdown() {
+ if (!is_null(error_get_last())) {
+ ob_clean();
+ $d = error_get_last();
+ echo "
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Something went wrong - Blogchain</title>
+ <style>
+
+ @font-face {
+ src: url(\"/font/regular.ttf\");
+ font-family: \"JetBrains Mono\";
+ font-style: normal;
+ }
+
+ @font-face {
+ src: url(\"/font/italic.ttf\");
+ font-family: \"JetBrains Mono\";
+ font-style: italic;
+ }
+
+ *, pre {
+ font-family: \"JetBrains Mono\", sans-serif;
+ transition: none !important;
+ }
+
+ nav, * {
+ color: #00ff00 !important;
+ }
+
+ html, body, nav.navbar, .card {
+ background-color: black !important;
+ }
+
+ a:hover {
+ color: black !important;
+ background: #00ff00;
+ }
+
+ pre {
+ background: #00ff00;
+ border-radius: 5px;
+ padding: 10px;
+ color: black !important;
+ text-align: left;
+ }
+
+ @media (min-width: 700px) {
+ pre {
+ margin-left: 25%;
+ margin-right: 25%;
+ }
+ }
+
+ </style>
+</head>
+<body>
+ <div style='margin-top:50px;text-align: center;'>
+ <h1>Something went wrong <small>(like, for real!)</small></h1>
+ <p>An error occured and Blogchain cannot load right now. Even us can make mistakes sometimes, and because you are really nice you will <a href='mailto:nekostarfan@gmail.com'>report this bug</a>.</p>
+ <p>For you, really tech-savvy people, here is that alien language thing you're probably looking for:</p>
+ <pre>
+#99{$d["type"]}: ";
+
+$pparts = explode(": ", $d["message"]);
+array_shift($pparts);
+
+$parts = explode(" in ", implode(": ", $pparts));
+echo($parts[0]);
+
+$stp = explode("\nStack trace:", $parts[1]);
+echo("\n at " . $stp[0]);
+
+$stlines = explode("\n", $stp[1]);
+array_shift($stlines);
+
+foreach ($stlines as $stline) {
+ $stpparts = explode(" ", $stline);
+ array_shift($stpparts);
+ $stline = implode(" ", $stpparts);
+
+ if ($stline !== " thrown" && $stline !== "{main}") {
+ $pp2 = explode("(", $stline);
+ $pp2n = explode(")", $pp2[1]);
+
+ echo("\n at " . $pp2[0] . ":" . $pp2n[0]);
+ } else if ($stline === "{main}") {
+ echo("\n at Blogchain.\$Core (PHP " . PHP_VERSION . ")");
+ }
+}
+
+echo "
+</pre>
+ </div>
+</body>
+</html>
+ ";
+ die();
+ }
+}
+
+function customError($errno, $errstr, $errfile = "&lt;unknown file&gt;", $errline = "&lt;unknown line&gt;") {
+ ob_clean();
+ echo "
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Something went wrong - Blogchain</title>
+ <style>
+
+ @font-face {
+ src: url(\"/font/regular.ttf\");
+ font-family: \"JetBrains Mono\";
+ font-style: normal;
+ }
+
+ @font-face {
+ src: url(\"/font/italic.ttf\");
+ font-family: \"JetBrains Mono\";
+ font-style: italic;
+ }
+
+ *, pre {
+ font-family: \"JetBrains Mono\", sans-serif;
+ transition: none !important;
+ }
+
+ nav, * {
+ color: #00ff00 !important;
+ }
+
+ html, body, nav.navbar, .card {
+ background-color: black !important;
+ }
+
+ a:hover {
+ color: black !important;
+ background: #00ff00;
+ }
+
+ pre {
+ background: #00ff00;
+ border-radius: 5px;
+ padding: 10px;
+ color: black !important;
+ text-align: left;
+ }
+
+ @media (min-width: 700px) {
+ pre {
+ margin-left: 25%;
+ margin-right: 25%;
+ }
+ }
+
+ </style>
+</head>
+<body>
+ <div style='margin-top:50px;text-align: center;'>
+ <h1>Something went wrong <small>(like, for real!)</small></h1>
+ <p>An error occured and Blogchain cannot load right now. Even us can make mistakes sometimes, and because you are really nice you will <a href='mailto:nekostarfan@gmail.com'>report this bug</a>.</p>
+ <p>For you, really tech-savvy people, here is that alien language thing you're probably looking for:</p>
+ <pre>
+#{$errno}: {$errstr}
+ at {$errfile}:{$errline}
+</pre>
+ </div>
+</body>
+</html>
+ ";
+ die();
+}
+set_error_handler("customError", E_ALL);
+register_shutdown_function("customShutdown");
+
+?>
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title><?= isset($_TITLE) ? $_TITLE . " - Blogchain" : "Blogchain" ?></title>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="stylesheet" href="/css/bootstrap.min.css">
+ <style>
+
+ @font-face {
+ src: url("/font/regular.ttf");
+ font-family: "JetBrains Mono";
+ font-style: normal;
+ }
+
+ @font-face {
+ src: url("/font/italic.ttf");
+ font-family: "JetBrains Mono";
+ font-style: italic;
+ }
+
+ *, code {
+ font-family: "JetBrains Mono", sans-serif;
+ transition: none !important;
+ }
+
+ nav, * {
+ color: #00ff00 !important;
+ }
+
+ html, body, nav.navbar, .card {
+ background-color: black !important;
+ }
+
+ nav.navbar {
+ border-bottom: 3px solid #00ff00 !important;
+ }
+
+ .card {
+ border-color: #00ff00 !important;
+ }
+
+ .btn-primary {
+ background-color: black !important;
+ border-color: #00ff00 !important;
+ border-style: dashed;
+ }
+
+ .list-group-item {
+ background: black;
+ border: 1px solid #00ff00;
+ }
+
+ .list-group-item:hover {
+ background: #00ff00;
+ color: black !important;
+ }
+
+ .btn-primary:hover {
+ background: #00ff00 !important;
+ color: black !important;
+ }
+
+ hr {
+ border-color: #00ff00;
+ border-width: 3px;
+ }
+
+ td {
+ border: 1px solid #00ff00;
+ }
+
+ th {
+ border: 1px solid #00ff00;
+ border-bottom-width: 2px;
+ }
+
+ code {
+ background: #00ff00;
+ color: black !important;
+ }
+
+ pre {
+ background: #00ff00;
+ border-radius: 5px;
+ padding: 10px;
+ }
+
+ img {
+ max-width: 100%;
+ }
+
+ .nav-link:hover, .nav-link:focus {
+ outline: 1px dotted #00ff00;
+ }
+
+ .nav-link:active {
+ outline: 1px solid #00ff00;
+ }
+
+ .btn:focus {
+ box-shadow: none;
+ }
+
+ </style>
+</head>
+<body>
+ <nav class="navbar navbar-expand-sm bg-dark navbar-dark">
+ <a class="navbar-brand" href="/"># blogchain_</a>
+
+ <ul class="navbar-nav">
+ <li class="nav-item">
+ <a class="nav-link" href="/home">Home</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link" href="/articles">All Articles</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link" href="/about">About</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link" href="https://minteck-projects.alwaysdata.net/legal">Legal</a>
+ </li>
+ </ul>
+
+ </nav> \ No newline at end of file