From 8738fc4620f42082ecd91f454ee57fb6ad841f29 Mon Sep 17 00:00:00 2001 From: Sebastian Beltran Date: Wed, 20 Nov 2024 20:06:03 -0500 Subject: [PATCH 1/2] add 404 page --- 404.md | 12 ++++++++++++ _layouts/404.html | 18 ++++++++++++++++++ css/style.css | 14 ++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 404.md create mode 100644 _layouts/404.html diff --git a/404.md b/404.md new file mode 100644 index 0000000000..1b14733c9f --- /dev/null +++ b/404.md @@ -0,0 +1,12 @@ +--- +layout: 404 +title: Page not found +description: The page you requested could not be found. +lang: en +--- + +# Not Found + +We couldn’t find the page you’re looking for. Check the address or [head back home](/). + +If this is a mistake, [let us know](https://github.com/expressjs/expressjs.com/issues/new/), and we will try to fix it! \ No newline at end of file diff --git a/_layouts/404.html b/_layouts/404.html new file mode 100644 index 0000000000..338facdd1f --- /dev/null +++ b/_layouts/404.html @@ -0,0 +1,18 @@ + + + + {% include head.html %} + + {% if page.lang == 'en' %} + + {% else %} + + {% endif %} + {% include header/header-{{ page.lang }}.html %} +
+
+ {{ content }} +
+ {% include footer/footer-{{ page.lang }}.html %} + + \ No newline at end of file diff --git a/css/style.css b/css/style.css index 65a451b5e1..f97d20222f 100644 --- a/css/style.css +++ b/css/style.css @@ -878,6 +878,20 @@ h2 a { border-color: #333; } +.content-404 { + height: 70vh; + padding: 153px 32px 7%; + text-align: center; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; +} + +.content-404 p { + font-size: 16px; +} + /* search-bar desktop re-sizing */ @media all and (min-width: 950px) { .algolia-autocomplete { From ac26575bbfcc8afd534c4f4ae0be63993bc19710 Mon Sep 17 00:00:00 2001 From: Sebastian Beltran Date: Thu, 21 Nov 2024 13:17:19 -0500 Subject: [PATCH 2/2] apply suggestions from code review --- 404.md | 4 ++-- css/style.css | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/404.md b/404.md index 1b14733c9f..5bae9ef3f0 100644 --- a/404.md +++ b/404.md @@ -1,11 +1,11 @@ --- layout: 404 title: Page not found -description: The page you requested could not be found. +description: We couldn’t find the page you’re looking for. lang: en --- -# Not Found +# {{ page.title }} We couldn’t find the page you’re looking for. Check the address or [head back home](/). diff --git a/css/style.css b/css/style.css index f97d20222f..664d7c0eb9 100644 --- a/css/style.css +++ b/css/style.css @@ -883,7 +883,6 @@ h2 a { padding: 153px 32px 7%; text-align: center; display: flex; - align-items: center; justify-content: center; flex-direction: column; }