diff --git a/codepoints.net/init.php b/codepoints.net/init.php index 1d8abcc2..4da47d8b 100644 --- a/codepoints.net/init.php +++ b/codepoints.net/init.php @@ -10,6 +10,7 @@ use Codepoints\Unicode\CodepointInfo\Image; use Codepoints\Unicode\CodepointInfo\Sensitivity; use Codepoints\Unicode\PropertyInfo; +use Codepoints\View; require 'vendor/autoload.php'; @@ -43,6 +44,12 @@ /* enable gzip compression of HTML */ ini_set('zlib.output_compression', '1'); +/* quick exit into maintenance mode */ +if (file_exists(__DIR__.'/maintenance') && PHP_SAPI !== 'cli') { + http_response_code(503); + die((new View('maintenance'))(['title' => 'Maintenance', 'no_navigation' => true])); +} + /** * get global config values and the database connection ready */ diff --git a/codepoints.net/views/maintenance.php b/codepoints.net/views/maintenance.php new file mode 100644 index 00000000..9dd3dcfe --- /dev/null +++ b/codepoints.net/views/maintenance.php @@ -0,0 +1,24 @@ + +
+

+ +

+

Unfortunately, we are currently in maintenance mode. But fear not, we + will be right back with more code point features!

+

Meanwhile you can come chat with us over at Mastodon: + typo.social/@codepoints.

+
+ +
+
+ diff --git a/codepoints.net/views/partials/header.php b/codepoints.net/views/partials/header.php index 581d0f62..80c4c759 100644 --- a/codepoints.net/views/partials/header.php +++ b/codepoints.net/views/partials/header.php @@ -45,4 +45,4 @@
- +