Skip to content

feat: redesign 404 page with error image and fix GitHub Pages routing#810

Open
lenderom wants to merge 6 commits intomainfrom
feat/404-page
Open

feat: redesign 404 page with error image and fix GitHub Pages routing#810
lenderom wants to merge 6 commits intomainfrom
feat/404-page

Conversation

@lenderom
Copy link
Copy Markdown
Member

@lenderom lenderom commented Apr 5, 2026

Summary

  • Redesign the 404 error page with a centered error illustration (error.webp) and improved layout using float-image and intersector shortcodes across all three languages (en, de, fr)
  • Add homepage links to the "go to homepage" bullet point in all languages
  • Fix GitHub Pages 404 routing: replace the Hugo alias-based 404.html (which incorrectly landed under /en/404.html due to defaultContentLanguageInSubdir: true) with a static/404.html that reliably serves from the site root
  • Add center position support for float-image in SCSS

Fixes #717
Fixes #136

…ting

Add error illustration and visual improvements to all three language
versions of the 404 page. Replace the Hugo alias-based 404.html (which
landed under /en/404.html due to defaultContentLanguageInSubdir) with a
static/404.html that reliably serves from the root on GitHub Pages.

Fixes #717
Fixes #136
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 5, 2026

Hi there! 👋

Thank you for your contribution to the FIP Guide! 🚀
We appreciate your effort in making rail staff travel information more accessible. 🚄

Checklist before merging:

  • Added a description to the Pull Request
  • Checked the License of new pictures (non-commercial use without attribution)
  • Modified content in English
  • Modified content in German
  • Modified content in French

@lenderom lenderom requested review from MoritzWeber0 and therobrob and removed request for therobrob April 5, 2026 12:25
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 5, 2026

Deploy Preview for fipguide ready!

Name Link
🔨 Latest commit c6f0ecb
🔍 Latest deploy log https://app.netlify.com/projects/fipguide/deploys/69e4abcaeba77c0008f06cdb
😎 Deploy Preview https://deploy-preview-810--fipguide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread assets/sass/floatImage.scss Outdated
Comment thread content/404/index.de.md Outdated
Comment thread static/404.html
Comment thread static/404.html
Comment thread content/404/error.webp Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The contrast of the image in dark mode is pretty bad.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to change the image :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think of the new one (source https://www.pexels.com/de-de/foto/30503335/)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LIKE! :)

Comment thread layouts/404/single.html
Comment on lines +15 to +17
<div class="o-error__divider">
{{ partial "intersector" }}
</div>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d not show it overall, because it doesn’t divide two paragraphs.

Comment thread layouts/404/single.html
@@ -0,0 +1,23 @@
{{ define "main" }}
<article class="o-error" data-pagefind-ignore="all">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d prefer this one:
<article class="o-single o-single--error" data-pagefind-ignore="all">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about it, the error case is pretty specific and isolated, we won't use it in another file. So I'd keep it in a separate SCSS file and not mix it in the content SCSS file. Another idea is to rename it to o-404 or something like it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn’t talked about scss at all. The syntax and the file-system are two different things in my opinion. In BEM this is a special case for o-single, so we should treat it like that :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always prefer a clear logic to find out in which SCSS file a CSS rule is stored and the prefix is the easiest one to remember. But we don't do that consistently, so yeah, we can also call it o-single--error.
However, we should then also update the other elements as well, for example o-error__body--error and so on.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we do so, we should update the other elements as well, yes 👍🏼 I agree with you to have a clear logic – let’s discuss the scss file structure in another issue :) #879

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good 👍

Comment thread static/404.html
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can get rid of the file now, right?

Comment thread content/404/index.fr.md
- **Accédez à la page daccueil :** Retournez à la page daccueil et naviguez à partir de là.
- **Utilisez la navigation :** Essayez de naviguer via le menu ou dutiliser la fonction de recherche.
- **Contactez-nous :** Si vous avez besoin daide, nhésitez pas à nous contacter : [nextstop@fipguide.org](mailto:nextstop@fipguide.org)
- **Vérifiez l'URL :** Assurez-vous qu'il n'y a pas de faute de frappe dans l'adresse.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Vérifiez l'URL :** Assurez-vous qu'il n'y a pas de faute de frappe dans l'adresse.
- **Vérifiez lURL :** Assurez-vous qu'il n'y a pas de faute de frappe dans l'adresse.

You probably used a Anthropic model. They have the bug that they replace with '. It's a bit annoying. Can you change it back for all occurrences in the file?

Comment thread layouts/404/single.html
@@ -0,0 +1,23 @@
{{ define "main" }}
<article class="o-error" data-pagefind-ignore="all">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about it, the error case is pretty specific and isolated, we won't use it in another file. So I'd keep it in a separate SCSS file and not mix it in the content SCSS file. Another idea is to rename it to o-404 or something like it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Illustration for 404-Page 404 Page not working

3 participants