Adds no-browser fallback.

This commit is contained in:
Lars Jung 2013-07-11 16:09:58 +02:00
parent a4e599034e
commit a076dfc7d3
6 changed files with 13 additions and 15 deletions

View File

@ -45,13 +45,14 @@
color: @col-error;
margin-left: 16px;
}
.unsupportedBrowserMsg {
.noBrowserMsg {
display: none;
color: @col-error;
margin-left: 16px;
a, a:active, a:visited {
color: @col-error;
text-decoration: underline;
opacity: 1;
&:hover {
color: @col-hover;
}

View File

@ -51,11 +51,6 @@ body {
html.js .hideOnJs, html.no-js .hideOnNoJs {
display: none;
}
html.oldie {
.unsupportedBrowserMsg {
display: inline !important;
}
#tree {
display: none !important;
}
html.no-browser .noBrowserMsg {
display: inline !important;
}

View File

@ -61,8 +61,6 @@
img {
width: 16px;
height: 16px;
position: relative;
top: -2px;
}
}
td:nth-child(2), th:nth-child(2) {

View File

@ -33,7 +33,11 @@
var $ = jQuery,
mode = $('script[src$="scripts.js"]').data('mode');
if (mode === 'info') {
if ($('html').hasClass('no-browser')) {
$(function () { $('#no-js-fallback').removeClass('hideOnJs'); })
} else if (mode === 'info') {
$(function () { modulejs.require('info'); });

View File

@ -1,6 +1,6 @@
doctype 5
//if lt IE 9
<html class="no-js oldie" lang="en">
<html class="no-js no-browser" lang="en">
//[if gt IE 8]><!
html.no-js( lang="en" )
//<![endif]
@ -68,7 +68,7 @@ html.no-js( lang="en" )
| {{pkg.name}} {{pkg.version}}
span.hideOnJs.noJsMsg
| ⚡ JavaScript disabled! ⚡
span.unsupportedBrowserMsg
span.noBrowserMsg
| ⚡ Unsupported browser! Works best in
a( href="http://browsehappy.com" ) modern browsers
| . ⚡

View File

@ -4,7 +4,7 @@
doctype 5
//if lt IE 9
<html class="no-js oldie" lang="en">
<html class="no-js no-browser" lang="en">
//[if gt IE 8]><!
html.no-js( lang="en" )
//<![endif]
@ -32,7 +32,7 @@ html.no-js( lang="en" )
| {{pkg.name}} {{pkg.version}}
span.hideOnJs.noJsMsg
| ⚡ JavaScript disabled! ⚡
span.unsupportedBrowserMsg
span.noBrowserMsg
| ⚡ Unsupported browser! Works best in
a( href="http://browsehappy.com" ) modern browsers
| . ⚡