.dialog img {
display: block;
- margin: 20px auto;
- margin-top: 50px;
- max-width: 600px;
+ margin: 0 auto;
+ max-width: 470px;
width: 100%;
height: auto;
}
- content_for :page_title do
- = t('errors.500')
+ = t('errors.500.title')
- content_for :content do
- = t('errors.500')
+ = t('errors.500.content')
%head
%meta{ content: 'text/html; charset=UTF-8', 'http-equiv' => 'Content-Type' }/
%meta{ charset: 'utf-8' }/
- %title= yield :page_title
+ %title= safe_join([yield(:page_title), title], ' - ')
%meta{ content: 'width=device-width,initial-scale=1', name: 'viewport' }/
= stylesheet_pack_tag 'common', media: 'all'
= stylesheet_pack_tag Setting.default_settings['theme'], media: 'all'
%body.error
.dialog
- %img{ alt: 'Mastodon', src: '/oops.png' }/
+ %img{ alt: title, src: '/oops.gif' }/
%div
%h1= yield :content
content: Security verification failed. Are you blocking cookies?
title: Security verification failed
'429': Throttled
- '500': We're sorry, but something went wrong.
+ '500':
+ content: We're sorry, but something went wrong on our end.
+ title: This page is not correct
noscript_html: To use the Mastodon web application, please enable JavaScript. Alternatively, try one of the <a href="https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/Apps.md">native apps</a> for Mastodon for your platform.
exports:
blocks: You block
namespace :assets do
desc 'Generate 500.html'
task :generate_500 do
- html = ApplicationController.render('errors/500', layout: 'error')
- File.write(Rails.root.join('public', '500.html'), html)
+ I18n.with_locale(ENV['DEFAULT_LOCALE'] || I18n.default_locale) do
+ html = ApplicationController.render('errors/500', layout: 'error')
+ File.write(Rails.root.join('public', '500.html'), html)
+ end
end
end
if Rake::Task.task_defined?('assets:precompile')
Rake::Task['assets:precompile'].enhance do
Webpacker::Manifest.load
-
Rake::Task['assets:generate_500'].invoke
end
end