about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-09-25 04:04:04 +0200
committerGitHub <noreply@github.com>2017-09-25 04:04:04 +0200
commit2c8e3fbbfbe26fb78418324ef14caf13ab207623 (patch)
tree5d33ed814964bba9fd11899087585bda02bd5669 /app
parentb982d549f440cfebadd5dc8d300a506df213bfee (diff)
Generate 500.html with assets:precompile, remove loading from Google Fonts (#5067)
Diffstat (limited to 'app')
-rw-r--r--app/javascript/styles/basics.scss21
-rw-r--r--app/views/errors/500.html.haml5
-rw-r--r--app/views/layouts/error.html.haml28
3 files changed, 29 insertions, 25 deletions
diff --git a/app/javascript/styles/basics.scss b/app/javascript/styles/basics.scss
index c5f98750c..48652a035 100644
--- a/app/javascript/styles/basics.scss
+++ b/app/javascript/styles/basics.scss
@@ -62,6 +62,27 @@ body {
     height: 100%;
     padding: 0;
   }
+
+  &.error {
+    text-align: center;
+    color: $ui-primary-color;
+    padding: 20px;
+
+    .dialog img {
+      display: block;
+      margin: 20px auto;
+      margin-top: 50px;
+      max-width: 600px;
+      width: 100%;
+      height: auto;
+    }
+
+    .dialog h1 {
+      font-size: 20px;
+      line-height: 28px;
+      font-weight: 400;
+    }
+  }
 }
 
 button {
diff --git a/app/views/errors/500.html.haml b/app/views/errors/500.html.haml
new file mode 100644
index 000000000..e124be551
--- /dev/null
+++ b/app/views/errors/500.html.haml
@@ -0,0 +1,5 @@
+- content_for :page_title do
+  = t('errors.500')
+
+- content_for :content do
+  = t('errors.500')
diff --git a/app/views/layouts/error.html.haml b/app/views/layouts/error.html.haml
index 08b94af54..0b5f908ae 100644
--- a/app/views/layouts/error.html.haml
+++ b/app/views/layouts/error.html.haml
@@ -5,31 +5,9 @@
     %meta{ charset: 'utf-8' }/
     %title= yield :page_title
     %meta{ content: 'width=device-width,initial-scale=1', name: 'viewport' }/
-    %link{ href: 'https://fonts.googleapis.com/css?family=Roboto:400', rel: 'stylesheet' }/
-    :css
-      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;
-      }
-  %body
+    = stylesheet_pack_tag 'common', media: 'all'
+    = stylesheet_pack_tag Setting.default_settings['theme'], media: 'all'
+  %body.error
     .dialog
       %img{ alt: 'Mastodon', src: '/oops.png' }/
       %div