Add 451 page and prettify the 404 page

This commit is contained in:
Alex Cabal 2022-07-24 14:12:37 -05:00
parent 620c2c983f
commit e2dcf97961
12 changed files with 38 additions and 3 deletions

View file

@ -78,6 +78,7 @@ Define webroot /standardebooks.org/web
ServerAlias www.${domain}
DocumentRoot ${webroot}/www
ErrorDocument 404 /404
ErrorDocument 451 /451
ErrorLog /var/log/local/www-error.log
DirectorySlash Off
RewriteEngine on

View file

@ -61,6 +61,7 @@ Define webroot /standardebooks.org/web
ServerAlias www.${domain}
DocumentRoot ${webroot}/www
ErrorDocument 404 /404
ErrorDocument 451 /451
ErrorLog /var/log/local/www-error.log
DirectorySlash Off
RewriteEngine on

View file

@ -1,7 +1,21 @@
<?
require_once('Core.php');
?><?= Template::Header(['title' => 'We couldnt find that document', 'description' => 'We couldnt find that document.']) ?>
<main class="center">
<h1>We couldnt find that document.</h1>
?><?= Template::Header(['title' => 'We Couldnt Find That Document', 'highlight' => '', 'description' => 'We couldnt find that document.']) ?>
<main>
<section class="narrow has-hero">
<hgroup>
<h1>We Couldnt Find That Document</h1>
<h2>This is 404 error.</h2>
</hgroup>
<picture data-caption="Blind Orion Searching for the Rising Sun. Nicolas Poussin, 1658">
<source srcset="/images/blind-orion@2x.avif 2x, /images/blind-orion.avif 1x" type="image/avif"/>
<source srcset="/images/blind-orion@2x.jpg 2x, /images/blind-orion.jpg 1x" type="image/jpg"/>
<img src="/images/blind-orion@2x.jpg" alt="A classical city is aflame as people scramble in the foreground."/>
</picture>
<p>We couldnt find a document at the URL you specified. Did you mistype the URL?</p>
<p>If you arrived here from a link on the Standard Ebooks website, please <a href="/about#editor-in-chief">contact us</a> so that we can fix it.</p>
<p>If you arrived here from a link elsewhere on the web, please contact the site you came from to ask them to fix their link.</p>
</section>
</main>
<?= Template::Footer() ?>

19
www/451.php Normal file
View file

@ -0,0 +1,19 @@
<?
require_once('Core.php');
?><?= Template::Header(['title' => 'This Ebook Is No Longer Available', 'highlight' => '', 'description' => 'This ebook is unavailable due to legal reasons.']) ?>
<main>
<section class="narrow has-hero">
<hgroup>
<h1>This Ebook Is No Longer Available</h1>
<h2>This is 451 error.</h2>
</hgroup>
<picture data-caption="The Course of Empire: Destruction. Thomas Cole, 1836">
<source srcset="/images/the-course-of-empire-destruction@2x.avif 2x, /images/the-course-of-empire-destruction.avif 1x" type="image/avif"/>
<source srcset="/images/the-course-of-empire-destruction@2x.jpg 2x, /images/the-course-of-empire-destruction.jpg 1x" type="image/jpg"/>
<img src="/images/the-course-of-empire-destruction@2x.jpg" alt="A classical city is aflame as people scramble in the foreground."/>
</picture>
<p>This ebook is no longer available, due to legal reasons. This may occur if the book was erroneously thought to be in the U.S. public domain, but new evidence changed that determination.</p>
</section>
</main>
<?= Template::Footer() ?>

BIN
www/images/blind-orion.avif Normal file

Binary file not shown.

BIN
www/images/blind-orion.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB