From de94696ed7428311c9832d2f0d55ee1d2d87a196 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Wed, 4 Nov 2026 19:46:20 +0100 Subject: Add custom 404 error page This adds a dedicated 404 page with a playful message that reflects the blog's title and tagline, along with a colourful gradient heading and animated thinking dots. It also provides reduced-motion support, excludes the page from search engine and Pagefind indexing, and directs visitors to the site's navigation and search. --- assets/static/css/404.css | 65 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 assets/static/css/404.css (limited to 'assets/static/css') diff --git a/assets/static/css/404.css b/assets/static/css/404.css new file mode 100644 index 0000000..a0ee30f --- /dev/null +++ b/assets/static/css/404.css @@ -0,0 +1,65 @@ +@charset "UTF-8"; + +article { + text-align: center; + + > p:first-of-type { + margin: 0; + font-size: clamp(6rem, 28vw, 13rem); + font-weight: 700; + line-height: 1; + letter-spacing: -0.04em; + background: linear-gradient( + to right, + var(--red), + var(--orange), + var(--yellow), + var(--green), + var(--cyan), + var(--blue), + var(--magenta), + var(--pink) + ); + -webkit-background-clip: text; + background-clip: text; + color: transparent; + } + + > p:last-of-type { + color: var(--dim-foreground); + font-size: 0.85rem; + width: 100%; + max-inline-size: inherit; + } + + .dots span { + opacity: 0.2; + animation: thinking 1.4s infinite; + + &:nth-child(2) { + animation-delay: 0.2s; + } + + &:nth-child(3) { + animation-delay: 0.4s; + } + } +} + +@keyframes thinking { + 0%, + 80%, + 100% { + opacity: 0.2; + } + 40% { + opacity: 1; + } +} + +@media (prefers-reduced-motion: reduce) { + .dots span { + animation: none; + opacity: 1; + } +} -- cgit v1.3.1