Browse Source

snapshot 09.05.2023.0

master
Craig Oates 12 months 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
(: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*)

3
src/web.lisp

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

16
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],

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

9
templates/page.html

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

Loading…
Cancel
Save