From 7475f129c8d8eb4308248d9baae7d0ba4be886d6 Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Tue, 9 May 2023 01:26:35 +0100 Subject: [PATCH] snapshot 09.05.2023.0 --- app.lisp | 2 +- src/web.lisp | 3 +- static/css/main.css | 16 +++++++++ static/robots.txt | 28 +++++++++++++++ templates/_errors/404.html | 74 +++++++++++++++----------------------- templates/page.html | 9 ++--- 6 files changed, 80 insertions(+), 52 deletions(-) create mode 100644 static/robots.txt diff --git a/app.lisp b/app.lisp index ea7f69d..4d44ecc 100644 --- a/app.lisp +++ b/app.lisp @@ -22,7 +22,7 @@ (builder (:static :path (lambda (path) - (if (ppcre:scan "^(?:/images/|/css/|/js/|/robot\\.txt$|/favicon\\.ico$)" path) + (if (ppcre:scan "^(?:/images/|/css/|/js/|/robots\\.txt$|/favicon\\.ico$)" path) path nil)) :root *static-directory*) diff --git a/src/web.lisp b/src/web.lisp index 211d82f..02cda2f 100644 --- a/src/web.lisp +++ b/src/web.lisp @@ -1856,5 +1856,4 @@ (defmethod on-exception ((app ) (code (eql 404))) (declare (ignore app)) - (merge-pathnames #P"_errors/404.html" - *template-directory*)) + (render #P"_errors/404.html")) diff --git a/static/css/main.css b/static/css/main.css index ec9eb6b..0fe9e51 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -33,6 +33,22 @@ a:hover { text-decoration: underline; } +.fe-404 { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 100%; +} + +.fe-404 img { + width: 300px; +} + +.fe-404 p { + font-size: 20px; +} + input[type=file], input[type=text], input[type=password], diff --git a/static/robots.txt b/static/robots.txt new file mode 100644 index 0000000..4a30d76 --- /dev/null +++ b/static/robots.txt @@ -0,0 +1,28 @@ +# Nicola Ellis and Ritherdon Archive +User-agent: * +Sitemap: https://neandr.nicolaellis.com +Disallow: /setup +Disallow: /run-setup +Disallow: /sign-up +Disallow: /login +Disallow: /logout +Disallow: /dashboard +Disallow: /site-settings +Disallow: /site-settings/ +Disallow: /users +Disallow: /user/ +Disallow: /create/ +Disallow: /user/ +Disallow: /edit/ +Disallow: /rename/ +Disallow: /page/ +Disallow: /storage/manage +Disallow: /storage/rename/ +Disallow: /storage/delete/ +Disallow: /create/ +Disallow: /archive/ +Disallow: /search +Allow: /archive +Allow: /view/archive/ +Allow: /pages +Allow: /view/page/ diff --git a/templates/_errors/404.html b/templates/_errors/404.html index 5d0d4ae..39d4e4d 100644 --- a/templates/_errors/404.html +++ b/templates/_errors/404.html @@ -1,47 +1,31 @@ - - - - 404 NOT FOUND - - - -
-
-
404
-
NOT FOUND
-
-
- + + + + 404 Not Found + + + + + + {% lisp (insert-snippet "site-wide-snippet.html") %} + + +
+ Confused Cat +

404 Not Found

+

+ Return to Home +

+
+ diff --git a/templates/page.html b/templates/page.html index 3faebeb..3f64179 100644 --- a/templates/page.html +++ b/templates/page.html @@ -55,10 +55,11 @@
-
- {{data | safe}} -
- +
+
+ {{data | safe}} +
+