From 38a85dfa0bf222bb886f499f56a7991af01386b4 Mon Sep 17 00:00:00 2001 From: diondiondion Date: Thu, 3 Sep 2026 16:33:28 +0000 Subject: [PATCH] Add link to homepage to 404 error page (#40369) --- app/javascript/styles/mastodon/basics.scss | 1 + app/views/layouts/error.html.haml | 3 ++- config/locales/en.yml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/javascript/styles/mastodon/basics.scss b/app/javascript/styles/mastodon/basics.scss index 5ef4acc20cc..36e98abfff4 100644 --- a/app/javascript/styles/mastodon/basics.scss +++ b/app/javascript/styles/mastodon/basics.scss @@ -191,6 +191,7 @@ body { font-size: 20px; line-height: 28px; font-weight: 400; + margin-bottom: var(--space-md); } } } diff --git a/app/views/layouts/error.html.haml b/app/views/layouts/error.html.haml index 03cb93dba7b..d73e316f672 100644 --- a/app/views/layouts/error.html.haml +++ b/app/views/layouts/error.html.haml @@ -12,8 +12,9 @@ = theme_style_tags Setting.default_settings['theme'] = vite_typescript_tag 'error.ts', crossorigin: 'anonymous' %body.error - .dialog + %main.dialog .dialog__illustration %img{ alt: Setting.default_settings['site_title'], src: '/oops.png' }/ .dialog__message %h1= yield :content + %a{ class: 'button button-secondary', href: '/' }= t('errors.go_home') diff --git a/config/locales/en.yml b/config/locales/en.yml index 0b9115aba1b..3d76d7e96d5 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1596,6 +1596,7 @@ en: content: We're sorry, but something went wrong on our end. title: This page is not correct '503': The page could not be served due to a temporary server failure. + go_home: Go home noscript_html: To use the Mastodon web application, please enable JavaScript. Alternatively, try one of the native apps for Mastodon for your platform. existing_username_validator: not_found: could not find a local user with that username