mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 23:09:29 -07:00
Add 404 page
This commit is contained in:
parent
2252271995
commit
6ac63fe7ea
2 changed files with 50 additions and 0 deletions
|
@ -138,4 +138,11 @@ if(is_array($match) && is_callable($match['target'])) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// No route was matched
|
// No route was matched
|
||||||
|
$content = file_get_contents("pages/template.html");
|
||||||
|
$pageTitle = "404";
|
||||||
|
$pageContent = "404 - This page could not be found :(";
|
||||||
|
$content = str_replace('%TITLE%', $pageTitle, $content);
|
||||||
|
$content = str_replace('%CONTENT%', $pageContent, $content);
|
||||||
|
header('Content-Type: text/html; charset=utf-8');
|
||||||
|
echo($content);
|
||||||
}
|
}
|
||||||
|
|
43
pages/404.html
Normal file
43
pages/404.html
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" dir="ltr">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link rel="shortcut icon" href="/favicon.png">
|
||||||
|
<title>%TITLE% - Keyoxide</title>
|
||||||
|
<link rel="stylesheet" href="/assets/styles.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<div class="container">
|
||||||
|
<a href="/">Keyoxide</a>
|
||||||
|
<div class="spacer"></div>
|
||||||
|
<nav>
|
||||||
|
<a href="/verify">verify</a>
|
||||||
|
<a href="/encrypt">encrypt</a>
|
||||||
|
<a href="/proofs">proofs</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<h1>%TITLE%</h1>
|
||||||
|
<div class="content">
|
||||||
|
%CONTENT%
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<p>
|
||||||
|
Sitemap:
|
||||||
|
<a href="/">index</a> -
|
||||||
|
<a href="/encrypt">encrypt</a> -
|
||||||
|
<a href="/verify">verify</a> -
|
||||||
|
<a href="/proofs">proofs</a> -
|
||||||
|
<a href="/guides">guides</a> -
|
||||||
|
<a href="/faq">faq</a>
|
||||||
|
</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in a new issue