fixing caddy config in readme, adding dist files

This commit is contained in:
Adam Piontek 2021-11-26 08:52:19 -05:00
parent 09b773ca65
commit 4b726b4339
7 changed files with 10 additions and 2 deletions

View File

@ -14,8 +14,14 @@ With this snippet in the Caddyfile, for a site one can `import err` to handle er
```
(err) {
root /err_css/* /www/err
root /err_images/* /www/err
@errpaths {
path /err_css/*
path /err_images/*
}
route @errpaths {
root * /www/err
file_server
}
respond /unknown_error_not_4xx_not_5xx "{http.error.status_code} {http.error.status_text}"
handle_errors {

1
dist/4xx.html vendored Normal file
View File

@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="UTF-8"><title>{{placeholder "http.error.status_code"}} Error!</title><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"><meta name="description" content="You tried to get something thats not there!"><meta name="author" content="Oh no! {{placeholder "http.error.status_code"}}!"><link rel="icon" href="/favicon.ico"><link href="/err_css/app.css" rel="stylesheet"></head><body class="bg-cover bg-center grid grid-cols-1 place-content-center" style="background-image: url(/err_images/content/4xx_rainbow.jpg);"><div class="grid justify-items-center text-gray-900"><img src="/err_images/content/4xx_unicorn.png" class="unicorn" alt="UNICORN"><h1 class="text-5xl leading-normal text-center">Oh no! <a class="hover:underline hover:text-gray-800 font-bold" href="https://httpstatuses.com/{{placeholder "http.error.status_code"}}">{{placeholder "http.error.status_code"}}, {{placeholder "http.error.status_text"}}</a></h1><p class="text-info font-serif leading-loose">You tried to get something that can't be got!</p><p class="icon-link mt-0 sm:mt-2 md:mt-6"><a class="text-5xl hover:text-gray-800 filter hover:drop-shadow-md" title="Home" href="https://73k.us/" target="_blank"><svg class="h-12 w-12" viewBox="0 0 20 20" fill="currentColor"><path d="M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z"/></svg></a></p><p class="text-copy text-gray-200 mt-3 sm:mt-6 md:mt-8">(Unicorn image <a href="https://creativecommons.org/licenses/by-nc/4.0/" class="text-gray-100 underline">Creative Commons 4.0 BY-NC</a> via <a href="http://pngimg.com/download/24891" class="text-gray-100 underline">pngimg.com</a>)</p></div></body></html>

1
dist/5xx.html vendored Normal file
View File

@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="UTF-8"><title>{{placeholder "http.error.status_code"}} Error!</title><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"><meta name="description" content="You tried to get something thats not there!"><meta name="author" content="Kzzt! {{placeholder "http.error.status_code"}}!"><link rel="icon" href="/favicon.ico"><link href="/err_css/app.css" rel="stylesheet"></head><body class="bg-cover bg-center grid grid-cols-1 place-content-center" style="background-image: url(/err_images/content/5xx_rainbow.jpg);"><div class="grid justify-items-center text-gray-900"><img src="/err_images/content/5xx_unicorn.png" class="unicorn" alt="UNICORN"><h1 class="text-5xl leading-normal text-center">K̸z̴z̷t̵!̷ &mdash; <a class="hover:underline hover:text-gray-800 font-bold" href="https://httpstatuses.com/{{placeholder "http.error.status_code"}}">{{placeholder "http.error.status_code"}}, {{placeholder "http.error.status_text"}}</a></h1><p class="text-info font-serif leading-loose">Something went wrong. Try going home&hellip;</p><p class="icon-link mt-0 sm:mt-2 md:mt-6"><a class="text-5xl hover:text-gray-800 filter hover:drop-shadow-md" title="Home" href="https://73k.us/" target="_blank"><svg class="h-12 w-12" viewBox="0 0 20 20" fill="currentColor"><path d="M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z"/></svg></a></p><p class="text-copy text-gray-200 mt-3 sm:mt-6 md:mt-8">(Unicorn image <a href="https://creativecommons.org/licenses/by-nc/4.0/" class="text-gray-100 underline">Creative Commons 4.0 BY-NC</a> via <a href="http://pngimg.com/download/24891" class="text-gray-100 underline">pngimg.com</a>)</p></div></body></html>

BIN
dist/err_images/content/4xx_rainbow.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

BIN
dist/err_images/content/4xx_unicorn.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 KiB

BIN
dist/err_images/content/5xx_rainbow.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

BIN
dist/err_images/content/5xx_unicorn.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB