Skip to content

Update error pages#41

Merged
yCodeTech merged 2 commits into
yCodeTech:refactor/nginx-error-pagesfrom
damsfx:update-error-pages
Jun 8, 2026
Merged

Update error pages#41
yCodeTech merged 2 commits into
yCodeTech:refactor/nginx-error-pagesfrom
damsfx:update-error-pages

Conversation

@damsfx

@damsfx damsfx commented Apr 10, 2026

Copy link
Copy Markdown

This pull request updates the 404.html and 500.html error page templates to improve their appearance, responsiveness, and maintainability. The changes modernize the layout, enhance accessibility, and unify the branding and SVG usage across both pages.

Styling and Layout Improvements:

  • Added a responsive <meta name="viewport"> tag and reworked the CSS to use flexbox for centering, improved font scaling with clamp(), and better color handling for both light and dark modes. This ensures the error pages look good on all devices and respect user preferences.

  • Moved inline styles into a <style> block for maintainability and consistency, and removed redundant or outdated inline style attributes from HTML elements.

SVG and Branding Consistency:

  • Updated the SVG logo markup in 500.html to match the more modern and maintainable structure from 404.html, using consistent class names and gradient definitions. This unifies the branding and reduces code duplication.

These updates collectively provide a more polished, user-friendly, and maintainable error page experience.-update dark scheme rendering

@yCodeTech
yCodeTech changed the base branch from master to refactor/nginx-error-pages June 8, 2026 23:16
@yCodeTech
yCodeTech merged commit 5dc342f into yCodeTech:refactor/nginx-error-pages Jun 8, 2026
yCodeTech added a commit that referenced this pull request Jul 3, 2026
* Update error pages (#41)

Refactor code structure for improved readability and maintainability

-update dark scheme rendering

Co-authored-by: Stu <31927084+yCodeTech@users.noreply.github.com>

* refactor: 404 and 500 error pages structure and refined CSS.

- Added container div for improved HTML structure and added classes for better style selectors.
- Moved the flex styles from the body to the new container class.
- Refined values for widths, margins, and font sizes.
- Changed some of the styles to use CSS nesting.
- Moved the SVG styles into the main style block to keep all styles together.
- Moved the `@media prefers-color-scheme` rules to be nested under each element that it's for.
- Updated colours for dark mode.
- Auto formatting

* fix: small logo on desktop by ensuring the content fills the flex space.

Using width stretch the content fills the entire of the flex container space, capping at max-width, so the logo is always at optimum size.

Reason why this only affects the 404 page and not 500 page, is because 500 has the additional paragraphs that always makes the content fill the flex container.

* fix: change `width: stretch` to `flex-basis: 100%`

Width stretch is supported but some browsers require a different name, so we're switching to flex basis 100% instead which does the same job of filling the flex container space, but without an additional property for certain browsers.

---------

Co-authored-by: Damien MATHIEU <contact@hounddd.fr>
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.

2 participants