From 0e3b0881974e283202960609667dd04d9181639a Mon Sep 17 00:00:00 2001 From: Oliver Ni Date: Mon, 6 Nov 2023 19:30:22 -0800 Subject: [PATCH] add 404 page --- static/input.css | 29 +++++++++++++++++++++++++++++ templates/404.html | 43 +++++++++++++++++++++++++++++++++++++++++++ templates/base.html | 6 +++--- templates/macros.html | 4 ++-- 4 files changed, 77 insertions(+), 5 deletions(-) create mode 100644 templates/404.html diff --git a/static/input.css b/static/input.css index fa30217..fd73617 100644 --- a/static/input.css +++ b/static/input.css @@ -12,6 +12,15 @@ } } +.shadow-link { + @apply font-medium text-blue-500 transition-shadow; + box-shadow: inset 0 -0.3em theme("colors.blue.100"); +} + +.shadow-link:hover { + box-shadow: inset 0 -0.5em theme("colors.blue.200"); +} + #banner { background-image: linear-gradient(rgba(0 0 0 / 75%), rgba(0 0 0 / 75%)), @@ -19,3 +28,23 @@ background-size: cover; background-position: center; } + +#text-404 { + @apply bg-gradient-to-br from-teal-400 to-emerald-300 bg-clip-text text-transparent; + font-size: 12rem; + font-weight: bold; + position: relative; + --text-shadow: 1px 1px theme("colors.emerald.500"), 2px 2px theme("colors.emerald.500"), 3px 3px theme("colors.emerald.500"), 4px 4px theme("colors.emerald.500"), 5px 5px theme("colors.emerald.500"); +} + +#text-404::after { + @apply inset-0; + @apply transition-all; + transition-duration: 25ms; + position: absolute; + content: "404"; + z-index: -1; + font-size: 12rem; + font-weight: bold; + text-shadow: var(--text-shadow); +} diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..4b3bdc8 --- /dev/null +++ b/templates/404.html @@ -0,0 +1,43 @@ +{% extends "base.html" %} + +{% block content %} +
+

404

+

+ Page Not Found. + Go home? +

+
+ + +{% endblock %} diff --git a/templates/base.html b/templates/base.html index 6d5ed5c..54d6a81 100644 --- a/templates/base.html +++ b/templates/base.html @@ -41,7 +41,7 @@ - + @@ -67,7 +67,7 @@ -
+
{% block header %}
BMT Logo @@ -88,7 +88,7 @@
-
+
{% block content %}{% endblock %}
diff --git a/templates/macros.html b/templates/macros.html index 92c4c6f..24f97d6 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -3,12 +3,12 @@ {# Desktop version #} - {# Mobile version #} -{% if current_url == href %} +{% if current_url | default(value="") == href %}