diff options
| -rw-r--r-- | hooks/post-receive | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/hooks/post-receive b/hooks/post-receive index 722a0ec..2d13cc2 100644 --- a/hooks/post-receive +++ b/hooks/post-receive @@ -40,4 +40,50 @@ for path in glob.glob(os.path.join(webroot, '**', '*.html'), recursive=True): html = html.replace('</body>', footer + '\n</body>', 1) open(path, 'w').write(html) EOF +cat > "$WEBROOT/404.html" <<'HTMLEOF' +<!DOCTYPE html> +<html lang="en"> +<head> +<meta charset="utf-8"> +<link rel="icon" type="image/svg+xml" href="/favicon.svg"> +<meta name="viewport" content="width=device-width,initial-scale=1"> +<title>404 not found</title> +<style> +@font-face { font-family: "Kawkab Mono"; src: url(/fonts/KawkabMono-Regular.woff2); font-weight: normal; } +@font-face { font-family: "Kawkab Mono"; src: url(/fonts/KawkabMono-Bold.woff2); font-weight: bold; } +* { unicode-bidi: plaintext; box-sizing: border-box; } +html { color: black; background-color: white; } +body { font-family: "Kawkab Mono"; font-size: 16px; line-height: 1.4; margin: 0; padding: 4rem 0; min-height: 100%; overflow-wrap: break-word; } +main, header, footer { max-width: 800px; margin-inline: auto; padding: 0 2rem; } +h1, header, footer { text-align: center; } +hr { border: none; border-top: thin solid; margin: 1.25rem 0; } +header { margin-bottom: 1em; } +footer { margin-top: 3em; } +a { color: inherit; } +@media (max-width: 600px) { body { font-size: 0.9em; } } +@media (prefers-color-scheme: dark) { html { filter: invert(1); } img { filter: invert(1); } } +</style> +</head> +<body> +<header> +<h1><a href="https://gumx.cc">gumx</a></h1> +</header> +<main> +<p>404 not found.</p> +</main> +<footer> +<hr> +<a href="https://twt.gumx.cc">twt</a> / +<a href="https://git.gumx.cc">git</a> / +<a href="https://mail.gumx.cc">mail</a> / +<a href="https://irc.gumx.cc">irc</a> / +<a href="https://files.gumx.cc">files</a> / +<a href="https://vpn.gumx.cc">vpn</a> / +<a href="https://pgp.gumx.cc">pgp</a> / +<a href="https://demo.gumx.cc">demo</a> / +<a href="https://wk.fo">wk.fo</a> +</footer> +</body> +</html> +HTMLEOF echo "webring deployed" |
