add 404 page (#1690)

* add 404 page

* apply suggestions from code review
This commit is contained in:
Sebastian Beltran
2025-01-06 10:45:51 -05:00
committed by GitHub
parent 11efa753bd
commit c2c8ccf7b3
3 changed files with 43 additions and 0 deletions

12
404.md Normal file
View File

@@ -0,0 +1,12 @@
---
layout: 404
title: Page not found
description: We couldnt find the page youre looking for.
lang: en
---
# {{ page.title }}
We couldnt find the page youre 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!

18
_layouts/404.html Normal file
View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
{% include head.html %}
{% if page.lang == 'en' %}
<body class="en-doc">
{% else %}
<body class="non-en-doc">
{% endif %}
{% include header/header-{{ page.lang }}.html %}
<div id="overlay"></div>
<main class="content-404">
{{ content }}
</main>
{% include footer/footer-{{ page.lang }}.html %}
</body>
</html>

View File

@@ -872,6 +872,19 @@ h2 a {
border-color: #333;
}
.content-404 {
height: 70vh;
padding: 153px 32px 7%;
text-align: center;
display: flex;
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 {