Compare commits

..

No commits in common. "master" and "09b773ca650b01427cea140d405298c14eba5fd2" have entirely different histories.

14 changed files with 912 additions and 857 deletions

1
.gitignore vendored
View file

@ -19,3 +19,4 @@ Thumbs.db
npm-debug.log
node_modules/
dist/

View file

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

1
dist/4xx.html vendored
View file

@ -1 +0,0 @@
<!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"><script defer="defer" src="/err_js/app.js"></script><link href="/err_css/app.css" rel="stylesheet"></head><body class="w-screen h-screen overflow-y-auto overflow-x-hidden 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
View file

@ -1 +0,0 @@
<!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"><script defer="defer" src="/err_js/app.js"></script><link href="/err_css/app.css" rel="stylesheet"></head><body class="w-screen h-screen overflow-y-auto overflow-x-hidden 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>

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

0
dist/err_js/app.js vendored
View file

1746
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
{
"author": "Adam Piontek <adam@73k.us> (https://73k.us)",
"name": "@73kus/custom-rainbow-error-pages",
"version": "0.1.1",
"version": "0.1.0",
"description": "Simple but pretty unicorn rainbow error pages for webserver 40x/50x HTTP errors",
"homepage": "https://git.73k.us/73kus-err.git",
"browserslist": [
@ -74,7 +74,7 @@
"watch": "webpack --config configuration/webpack.dev.config.js --mode=development --watch",
"bundle": "npm install && npm run watch",
"dev": "webpack serve --config configuration/webpack.dev.config.js --mode=development",
"prod": "NODE_ENV=production webpack --config configuration/webpack.prod.config.js --mode=production",
"production": "NODE_ENV=production webpack --config configuration/webpack.prod.config.js --mode=production",
"lint:sass": "sass-lint -v -q",
"lint:js": "eslint --ext .js src/js/",
"stats": "webpack --config configuration/webpack.prod.config.js --mode=production --json > dist/stats.json && webpack-bundle-analyzer dist/stats.json"

View file

@ -8,7 +8,7 @@
<meta name="description" content="You tried to get something thats not there!">
<meta name="author" content="Oh no! @@errcode@@!">
</head>
<body class="w-screen h-screen overflow-y-auto overflow-x-hidden bg-cover bg-center grid grid-cols-1 place-content-center" style="background-image: url(/err_images/content/4xx_rainbow.jpg);">
<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">

View file

@ -8,7 +8,7 @@
<meta name="description" content="You tried to get something thats not there!">
<meta name="author" content="Kzzt! @@errcode@@!">
</head>
<body class="w-screen h-screen overflow-y-auto overflow-x-hidden bg-cover bg-center grid grid-cols-1 place-content-center" style="background-image: url(/err_images/content/5xx_rainbow.jpg);">
<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">