Add noscript warning

This commit is contained in:
Steffen van Bergerem 2016-03-31 11:29:55 +02:00
parent 7fc8f7de9b
commit 6941cdc962
3 changed files with 20 additions and 0 deletions

View file

@ -86,6 +86,21 @@ pre { word-wrap: break-word; }
&.visible { opacity: .5; } &.visible { opacity: .5; }
} }
.noscript {
background-color: rgba($black, .9);
height: 100%;
margin-top: -50px;
position: fixed;
width: 100%;
z-index: 9001;
h3 {
background-color: $white;
margin: 100px;
padding: 50px;
}
}
// general purpose classes // general purpose classes
.small-horizontal-spacer { .small-horizontal-spacer {

View file

@ -49,6 +49,10 @@
%body{ class: "page-#{controller_name} action-#{action_name}" } %body{ class: "page-#{controller_name} action-#{action_name}" }
= yield :before_content = yield :before_content
%noscript
.noscript
%h3= t("error_messages.need_javascript")
= content_for?(:content) ? yield(:content) : yield = content_for?(:content) ? yield(:content) : yield
= yield :after_content = yield :after_content

View file

@ -91,6 +91,7 @@ en:
helper: helper:
invalid_fields: "Invalid fields" invalid_fields: "Invalid fields"
correct_the_following_errors_and_try_again: "Correct the following errors and try again." correct_the_following_errors_and_try_again: "Correct the following errors and try again."
need_javascript: "This website requires JavaScript to function properly. If you disabled JavaScript, please enable it and refresh this page."
admins: admins:
admin_bar: admin_bar: