Generate 500.html with assets:precompile, remove loading from Google Fonts (#5067)
parent
65827bd2b4
commit
6b0ea1e79c
@ -0,0 +1,5 @@
|
||||
- content_for :page_title do
|
||||
= t('errors.500')
|
||||
|
||||
- content_for :content do
|
||||
= t('errors.500')
|
@ -0,0 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
if Rake::Task.task_defined?('assets:precompile')
|
||||
Rake::Task['assets:precompile'].enhance do
|
||||
html = ApplicationController.render('errors/500', layout: 'error')
|
||||
File.write(Rails.root.join('public', '500.html'), html)
|
||||
end
|
||||
end
|
@ -1,43 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>We're sorry, but something went wrong</title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400" rel="stylesheet">
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
background: #282c37;
|
||||
color: #9baec8;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.dialog img {
|
||||
display: block;
|
||||
margin: 20px auto;
|
||||
margin-top: 50px;
|
||||
max-width: 600px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.dialog h1 {
|
||||
font: 20px/28px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
font-weight: 400;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="dialog">
|
||||
<img src="/oops.png" alt="Mastodon" />
|
||||
|
||||
<div>
|
||||
<h1>We're sorry, but something went wrong.</h1>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue