diff --git a/app/assets/images/branding/logos/white2x.png b/app/assets/images/branding/logos/white2x.png deleted file mode 100644 index fa0aafb95..000000000 Binary files a/app/assets/images/branding/logos/white2x.png and /dev/null differ diff --git a/app/assets/stylesheets/error_pages.scss b/app/assets/stylesheets/error_pages.scss index d170a478d..b6d6f2a18 100644 --- a/app/assets/stylesheets/error_pages.scss +++ b/app/assets/stylesheets/error_pages.scss @@ -3,46 +3,31 @@ html { min-height: 100%; } -#big-number { - color: $light-grey; - font-family: Helvetica, Arial, sans-serif; - font-size: 250px; - line-height: 1em; - padding-top: 80px; - text-align: center; - text-shadow: 0 2px 0 #fff, 0 -1px 0 #999; +.error-404 { + background: image-url('peeping-tom.png') no-repeat bottom; + background-attachment: fixed; } -.transparent { - opacity: 0.8; -} -#content { + +.error-404, +.error-422, +.error-500, +.error-not-public { + background-color: $background-grey; + bottom:0px; color: $text-dark-grey; font-family: Helvetica, Arial, sans-serif; - font-size: 1.25em; - left: 0; - line-height: 1.5em; - position: absolute; - right: 0; - text-align: center; - text-shadow: 0 1px 0 $white; -} - -#error_404 { - width: 100%; height: 100%; - bottom:0px; margin: 0px; - font-family: Helvetica, Arial, sans-serif; text-align: center; text-shadow: 0 1px 0 #fff; - color: #666; - background: image-url("peeping-tom.png") no-repeat bottom; - background-attachment: fixed; + width: 100%; - #big-number { - color: $light-grey; + .big-number { + color: $text-grey; font-family: Helvetica, Arial, sans-serif; font-size: 250px; + line-height: 1em; + padding-top: 50px; text-shadow: 0 2px 0 #fff, 0 -1px 0 #999; } @@ -56,55 +41,7 @@ html { min-height: 100%; } } .transparent { - filter: alpha(opacity=80); - opacity: 0.6; - } -} - -#error_422 { - background-color: #fff; - color: #666; - text-align: center; - font-family: arial, sans-serif; - - div.dialog { - width: 25em; - padding: 0 4em; - margin: 4em auto 0 auto; - border: 1px solid #ccc; - border-right-color: #999; - border-bottom-color: #999; - } - - h1 { - font-size: 100%; - color: #f00; - line-height: 1.5em; - } -} - -#error_500 { - text-align: center; - background-color: rgb(252,252,252); - color: #444; - font-family: 'helvetica neue', 'helvetica', 'arial', sans-serif; - margin: 0; - padding: 1em; - - header { - height: 100px; - background-color: #333; - position:relative; - } - - #diaspora_logo { - position: relative; - margin-top: 50px; - } - - h1 { - font-size: 100%; - color: #444; - line-height: 1.5em; + filter: alpha(opacity = 60); + opacity: .6; } } diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 1d1abb931..644970d6e 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -11,8 +11,9 @@ class PostsController < ApplicationController respond_to :html, :mobile, :json, :xml rescue_from Diaspora::NonPublic do + @code = "not-public" respond_to do |format| - format.all { render template: "errors/not_public", status: 404, layout: "application" } + format.all { render template: "errors/not_public", status: 404, layout: "error_page" } end end diff --git a/app/views/errors/error_404.haml b/app/views/errors/error_404.haml index e66451207..847b92ef6 100644 --- a/app/views/errors/error_404.haml +++ b/app/views/errors/error_404.haml @@ -1,9 +1,9 @@ - content_for(:page_title) do The page you were looking for doesn't exist (404) -#big-number.transparent +.transparent.big-number 404 -%p +%h3 These are not the kittens you're looking for. Move along. %p %a{href: "javascript:history.back()"} diff --git a/app/views/errors/error_422.haml b/app/views/errors/error_422.haml index f602b05d0..cd3af7d46 100644 --- a/app/views/errors/error_422.haml +++ b/app/views/errors/error_422.haml @@ -1,8 +1,13 @@ - content_for(:page_title) do The change you wanted was rejected (422) -.dialog - %h1 - The change you wanted was rejected. - %p - Maybe you tried to change something you didn't have access to. +.transparent.big-number + 422 +%h3 + The change you wanted was rejected. +%p + Maybe you tried to change something you didn't have access to. + +%p + %a{href: "javascript:history.back()"} + Go Back? diff --git a/app/views/errors/error_500.haml b/app/views/errors/error_500.haml index 25e744d3c..eb88e7eda 100644 --- a/app/views/errors/error_500.haml +++ b/app/views/errors/error_500.haml @@ -1,10 +1,12 @@ - content_for(:page_title) do We're sorry, but something went wrong (500) -%header - = image_tag "branding/logos/white2x.png", id: "diaspora_logo" - -%h1 - 500: Internal server error. +.transparent.big-number + 500 %h3 + Internal server error. Our bad! Sorry about that. :( + +%p + %a{href: "javascript:history.back()"} + Go Back? diff --git a/app/views/errors/not_public.haml b/app/views/errors/not_public.haml index c330cb28e..bcd908b26 100644 --- a/app/views/errors/not_public.haml +++ b/app/views/errors/not_public.haml @@ -2,13 +2,9 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -- content_for :head do - = stylesheet_link_tag :error_pages, :media => 'all' - -#big-number.transparent +.transparent.big-number 404 - -#content - = t('error_messages.post_not_public_or_not_exist') - %br - = t('error_messages.login_try_again', :login_link => new_user_session_path).html_safe +%h3 + = t("error_messages.post_not_public_or_not_exist") +%p + = t("error_messages.login_try_again", login_link: new_user_session_path).html_safe diff --git a/app/views/layouts/error_page.haml b/app/views/layouts/error_page.haml index 5f7fee3d2..97543be53 100644 --- a/app/views/layouts/error_page.haml +++ b/app/views/layouts/error_page.haml @@ -10,5 +10,5 @@ = yield(:head) - %body{id: "error_#{@code}"} + %body{class: "error-#{@code}", id: "error_#{@code}"} = yield