Show message when JavaScript is disabled

pull/129/head
Thibaut 11 years ago
parent 062ccd2c5b
commit 5079756d87

@ -101,6 +101,7 @@
return return
showLoading: -> showLoading: ->
document.body.classList.remove '_noscript'
document.body.classList.add '_loading' document.body.classList.add '_loading'
return return

@ -9,6 +9,7 @@
@extend %border-box; @extend %border-box;
._booting > & { opacity: 0; } ._booting > & { opacity: 0; }
._noscript > & { display: none; }
} }
._booting { ._booting {
@ -33,3 +34,5 @@
transition: opacity .1s .3s; transition: opacity .1s .3s;
} }
} }
._noscript { opacity: 1; }

@ -1,4 +1,5 @@
._fail { ._fail {
display: block;
position: relative; position: relative;
top: 1.5rem; top: 1.5rem;
width: 24rem; width: 24rem;

@ -29,6 +29,7 @@
<%= javascript_tag 'docs' %><% unless App.production? %> <%= javascript_tag 'docs' %><% unless App.production? %>
<%= javascript_tag 'debug' %><% end %> <%= javascript_tag 'debug' %><% end %>
</head> </head>
<body class="_booting"> <body class="_booting _noscript">
<noscript class="_fail">DevDocs requires JavaScript to run.</noscript>
<%= erb :app %></body> <%= erb :app %></body>
</html> </html>

Loading…
Cancel
Save