Verified Commit caa2a964 authored by Artemis's avatar Artemis 🐱

#88: Added maintenance mode in the main file

parent c9b3f24b
......@@ -2,6 +2,35 @@
defined('ROOT') || define('ROOT', realpath(dirname(__DIR__)));
if (file_exists(ROOT . '/maintenance-lock')) {
http_response_code(503);
header('Content-Type: text/html; charset=utf8');
echo <<<EOF
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
<title>Down for maintenance... for a while!</title>
<style>
* {margin: 0;padding: 0;}
main {text-align: center;font-family: monospace, monospace;}
h1 {margin-top: 1em;margin-bottom: 1em;}
</style>
</head>
<body>
<main>
<h1>Down for maintenance</h1>
<p>My blog is currently unavailable for maintenance reasons.</p>
<p>It should be up soon, so make sure to check it out in a bit!</p>
</main>
</body>
</html>
EOF;
die(0);
}
require_once(ROOT . '/vendor/autoload.php');
use App\Runner;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment