Browse Source

Add error pages: 400, 403, 404, and 500

TEC 5 months ago
parent
commit
8e6ed20b6f

+ 10 - 0
errors/400.org

@@ -0,0 +1,10 @@
+#+title: 400
+#+setupfile: setup.org
+#+description: Org: an Emacs Mode for Notes, Planning and Authoring
+#+html_head: <link rel="stylesheet" href="/resources/style/errors.min.css" type="text/css" />
+#+include: "../resources/preamble.html" export html
+
+There's something dodgy about your request...
+
+#+attr_html: :class btn :style text-align:center
+[[https://orgmode.org][Homepage]]

+ 10 - 0
errors/403.org

@@ -0,0 +1,10 @@
+#+title: 403
+#+setupfile: setup.org
+#+description: Org: an Emacs Mode for Notes, Planning and Authoring
+#+html_head: <link rel="stylesheet" href="/resources/style/errors.min.css" type="text/css" />
+#+include: "../resources/preamble.html" export html
+
+You're not allowed to be here!
+
+#+attr_html: :class btn :style text-align:center
+[[https://orgmode.org][Homepage]]

+ 10 - 0
errors/404.org

@@ -0,0 +1,10 @@
+#+title: 404
+#+setupfile: setup.org
+#+description: Org: an Emacs Mode for Notes, Planning and Authoring
+#+html_head: <link rel="stylesheet" href="/resources/style/errors.min.css" type="text/css" />
+#+include: "../resources/preamble.html" export html
+
+No sign of that page anywhere
+
+#+attr_html: :class btn :style text-align:center
+[[https://orgmode.org][Homepage]]

+ 10 - 0
errors/500.org

@@ -0,0 +1,10 @@
+#+title: 500
+#+setupfile: setup.org
+#+description: Org: an Emacs Mode for Notes, Planning and Authoring
+#+html_head: <link rel="stylesheet" href="/resources/style/errors.min.css" type="text/css" />
+#+include: "../resources/preamble.html" export html
+
+Uh oh. Something went wrong our end. Try again in a moment.
+
+#+attr_html: :class btn :style text-align:center
+[[https://orgmode.org][Homepage]]

+ 6 - 0
errors/setup.org

@@ -0,0 +1,6 @@
+#+language:    en
+#+startup:     hidestars
+#+options:     H:3 num:nil toc:nil \n:nil @:t ::t |:t ^:t *:t TeX:t author:nil <:t LaTeX:t
+#+property:    header-args :eval no-export
+#+html_head:   <link rel="preload" href="/resources/fonts/droid-serif.woff2" as="font" type="font/woff2" crossorigin="anonymous">
+#+html_head:   <link rel="preload" href="/resources/fonts/droid-serif-italic.woff2" as="font" type="font/woff2" crossorigin="anonymous">

+ 245 - 0
resources/style/errors.css

@@ -0,0 +1,245 @@
+@font-face {
+  font-family: 'Droid Serif';
+  font-style: normal;
+  font-weight: 400;
+  font-display: swap;
+  src: local("Droid Serif Regular"), local("DroidSerif-Regular"), url(/resources/fonts/droid-serif.woff2) format("woff2");
+  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
+
+@font-face {
+  font-family: 'Droid Serif';
+  font-style: italic;
+  font-weight: 400;
+  font-display: swap;
+  src: local("Droid Serif Italic"), local("DroidSerif-Italic"), url(/resources/fonts/droid-serif-italic.woff2) format("woff2");
+  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
+
+@font-face {
+  font-family: 'Droid Sans Mono';
+  font-style: normal;
+  font-weight: 400;
+  font-display: swap;
+  src: local("Droid Sans Mono Regular"), local("DroidSansMono-Regular"), url(/resources/fonts/droid-sans-mono.woff2) format("woff2");
+  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
+
+html {
+  font-family: "Droid Serif", Cambria, Big Carslon, Lucida Bright, Georgia, "DejaVu Serif", serif;
+  font-weight: 400; }
+
+:root {
+  --sans: -apple-system, BlinkMacSystemFont, San Francisco, Helvetica Neue, Helvetica, Ubuntu, Roboto, Noto, Segoe UI, Arial, sans-serif; }
+
+* {
+  box-sizing: border-box; }
+
+:root {
+  --body-left: 0px;
+  --body-right: 0px;
+  --body-padding: 10px; }
+  @media (min-width: 850px) and (max-width: 1000px) {
+    :root {
+      --body-left: 25px;
+      --body-right: 15px; } }
+  @media (min-width: 1000px) {
+    :root {
+      --body-left: 50px;
+      --body-right: 30px;
+      --body-padding: 20px; } }
+  @media (min-width: 1600px) {
+    :root {
+      --body-left: 80px;
+      --body-right: 50px;
+      --body-padding: 30px; } }
+html {
+  margin: 0;
+  overflow-x: hidden; }
+
+body {
+  margin: calc(2.0rem + 14px) var(--body-right) 0 var(--body-left);
+  padding: 0 var(--body-padding);
+  background-color: #fafafa; }
+
+#content {
+  font-size: 1.2em;
+  line-height: 1.4;
+  max-width: 60rem;
+  margin: auto; }
+
+#content p {
+  padding-right: 7pt; }
+
+#postamble {
+  text-align: center;
+  background: #eaeaea;
+  color: #4d4d4d;
+  font-family: var(--sans);
+  font-family: var(--sans);
+  padding: 0.4rem 0;
+  margin: 5rem calc(0px - var(--body-right) - var(--body-padding)) 0 calc(0px - var(--body-left) - var(--body-padding)); }
+  #postamble p {
+    display: inline;
+    margin: 0; }
+    #postamble p a:hover {
+      text-decoration: none; }
+    #postamble p:not(:first-child) {
+      margin-left: 1rem; }
+
+nav#main {
+  background-color: #689486;
+  background-image: url(/resources/img/greenteselatedband.png);
+  background-size: auto calc(2.5rem + 16px);
+  background-repeat: repeat-x;
+  padding: 8px;
+  margin-bottom: 20px;
+  display: flex;
+  justify-content: center;
+  font-size: 1.2rem;
+  font-family: var(--sans);
+  /* fix the position for now - easy solution */
+  position: fixed;
+  width: 100vw;
+  top: 0;
+  left: 0;
+  z-index: 1;
+  line-height: 2em; }
+  nav#main a {
+    padding: 0 10px;
+    text-decoration: none;
+    font-weight: 500;
+    color: #fff; }
+    nav#main a p.logo {
+      display: inline-block;
+      font-weight: 700;
+      margin: 0;
+      color: #323232; }
+      nav#main a p.logo img {
+        height: 2em;
+        margin-bottom: -0.8em;
+        position: relative;
+        top: -0.2em; }
+  nav#main #translate {
+    position: absolute;
+    left: 1em;
+    color: #eeeeee;
+    font-weight: bold; }
+    nav#main #translate a {
+      color: #d5d5d5;
+      font-weight: bold;
+      padding: 0px;
+      margin: 0 -2px 0 -2px; }
+  nav#main label, nav#main input {
+    display: none; }
+  @media (max-width: 850px) {
+    nav#main {
+      flex-direction: column; }
+      nav#main label {
+        display: block;
+        font-weight: 700;
+        color: #fff;
+        line-height: 1;
+        font-size: 1.6em; }
+      nav#main > a:first-of-type {
+        margin-top: -1.8em; }
+      nav#main > a:last-child {
+        margin-bottom: -8px; }
+      nav#main p {
+        align-self: center;
+        margin-bottom: -0.4em; }
+      nav#main a, nav#main #translate {
+        display: none;
+        align-self: center; }
+      nav#main #translate {
+        left: 0;
+        right: 0;
+        bottom: 0;
+        margin-top: 0.35em;
+        height: 1.9em;
+        line-height: 1.7;
+        text-align: right;
+        padding-right: 1em;
+        background-color: #fff4; }
+      nav#main a.view-source {
+        position: relative;
+        align-self: baseline;
+        background-color: transparent;
+        font-size: 0.9em;
+        line-height: 1;
+        margin-left: 10pt;
+        padding-bottom: 3pt;
+        top: 2px; }
+        nav#main a.view-source::after {
+          content: ' view source';
+          font-weight: 400; }
+      nav#main input:checked ~ a, nav#main input:checked ~ #translate {
+        display: block; }
+      nav#main input:checked ~ #translate a {
+        display: inline-block; } }
+h2[id]:target {
+  padding-top: calc(40px + 2rem); }
+
+nav#main {
+  background-color: transparent;
+  background-image: none;
+  position: absolute; }
+  nav#main a {
+    color: #444444; }
+  nav#main label {
+    color: #000; }
+  nav#main #translate {
+    color: #587e72; }
+    nav#main #translate a {
+      color: #587e72; }
+  @media (max-width: 850px) {
+    nav#main {
+      background-color: rgba(250, 250, 250, 0.06) !important; } }
+nav#main #translate {
+  display: none; }
+
+body {
+  background-color: #fff;
+  background-image: url(/resources/img/bgtile.webp); }
+
+button.btn, a.btn {
+  display: inline-block;
+  padding: 8px 15px;
+  border-radius: 3px;
+  margin: 5px 0px;
+  color: #fafafa;
+  background-color: #77aa99; }
+  button.btn:hover, a.btn:hover {
+    text-decoration: none;
+    color: #fafafa;
+    background-color: #587e72; }
+
+a {
+  text-decoration: none;
+  color: #587e72; }
+
+a:visited {
+  text-decoration: none; }
+
+a:not(.btn):hover {
+  text-decoration: underline;
+  filter: brightness(85%); }
+
+a[href^="https://orgmode.org"]:not(.btn):hover, a:not(.btn):not([href^="https://"]):not([href^="http://"]):hover {
+  text-decoration: underline dashed; }
+
+#content {
+  text-align: center;
+  font-size: 1.5rem; }
+  #content h1 {
+    color: #77aa99;
+    font-size: 12rem;
+    line-height: 1;
+    margin-bottom: 2rem; }
+  #content p {
+    font-family: var(--sans); }
+
+#postamble {
+  position: fixed;
+  bottom: 0;
+  width: 100%; }
+  #postamble img.inline {
+    height: 1em;
+    margin-bottom: -0.15em; }

File diff suppressed because it is too large
+ 2 - 0
resources/style/errors.min.css


File diff suppressed because it is too large
+ 1 - 0
resources/style/errors.min.css.map


+ 42 - 0
resources/style/errors.scss

@@ -0,0 +1,42 @@
+@import 'font';
+@import 'variables';
+@import 'color-contrast';
+@import 'layout';
+@import 'footer';
+
+@import 'nav';
+@import 'nav-light';
+nav#main #translate {
+    display: none;
+}
+
+body {
+    background-color: #fff;
+    background-image: url(/resources/img/bgtile.webp);
+}
+
+@import 'links';
+
+#content {
+    text-align: center;
+    font-size: 1.5rem;
+    h1 {
+        color: $primary;
+        font-size: 12rem;
+        line-height: 1;
+        margin-bottom: 2rem;
+    }
+    p {
+        font-family: var(--sans);
+    }
+}
+
+#postamble {
+    position: fixed;
+    bottom: 0;
+    width: 100%;
+    img.inline {
+        height: 1em;
+        margin-bottom: -0.15em;
+    }
+}