Browse Source

snapshot 09.05.2023.0

master
Craig Oates 1 year ago
parent
commit
7475f129c8
  1. 2
      app.lisp
  2. 3
      src/web.lisp
  3. 16
      static/css/main.css
  4. 28
      static/robots.txt
  5. 74
      templates/_errors/404.html
  6. 9
      templates/page.html

2
app.lisp

@ -22,7 +22,7 @@
(builder (builder
(:static (:static
:path (lambda (path) :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 path
nil)) nil))
:root *static-directory*) :root *static-directory*)

3
src/web.lisp

@ -1856,5 +1856,4 @@
(defmethod on-exception ((app <web>) (code (eql 404))) (defmethod on-exception ((app <web>) (code (eql 404)))
(declare (ignore app)) (declare (ignore app))
(merge-pathnames #P"_errors/404.html" (render #P"_errors/404.html"))
*template-directory*))

16
static/css/main.css

@ -33,6 +33,22 @@ a:hover {
text-decoration: underline; 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=file],
input[type=text], input[type=text],
input[type=password], input[type=password],

28
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/

74
templates/_errors/404.html

@ -1,47 +1,31 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html style="height:100%;">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>404 NOT FOUND</title> <title>404 Not Found</title>
<style type="text/css"> <meta name="viewport"
html { content="width=device-width, initial-scale=1">
height: 100%; <meta http-equiv="X-UA-Compatible"
} content="IE=edge">
<meta name="viewport"
body { content="width=device-width, initial-scale=1">
height: 100%; <link rel="stylesheet"
font-family: 'Myriad Pro', Calibri, Helvetica, Arial, sans-serif; type="text/css"
background-color: #DFDFDF; media="screen"
} href="/css/main.css">
<link rel="icon"
#main { href="/images/favicon.png"
display: table; type="image/x-icon">
width: 100%; {% lisp (insert-snippet "site-wide-snippet.html") %}
height: 100%; </head>
} <body style="height:100%;">
<div class="fe-404">
.error { <img src="/images/alerts/confused-cat.png"
display: table-cell; alt="Confused Cat"/>
text-align: center; <h1>404 Not Found</h1>
vertical-align: middle; <p><a href="/" title="Click here to return to the home page.">
} Return to Home
</a></p>
.error .code { </div>
font-size: 1600%; </body>
font-weight: bold;
}
.error .message {
font-size: 400%;
}
</style>
</head>
<body>
<div id="main">
<div class="error">
<div class="code">404</div>
<div class="message">NOT FOUND</div>
</div>
</div>
</body>
</html> </html>

9
templates/page.html

@ -55,10 +55,11 @@
<div id="hits"></div> <div id="hits"></div>
</div> </div>
<main> <article class="fe-article">
{{data | safe}} <div class="fe-article-body">
</main> {{data | safe}}
</div>
</article>
<script> <script>
let server = "{{system-data.first.search-url}}"; let server = "{{system-data.first.search-url}}";

Loading…
Cancel
Save