impressive hardboiled fallback support added
This commit is contained in:
@@ -9,7 +9,7 @@ BROWSER SUPPORT
|
|||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
Impress.js is developed with current webkit-based browsers in mind (Chrome,
|
Impress.js is developed with current webkit-based browsers in mind (Chrome,
|
||||||
Safari), but *should* work also in other browsers supporting CSS3 transforms
|
Safari), but *should* work also in other browsers supporting CSS3 3D transforms
|
||||||
and transitions (Firefox, IE10).
|
and transitions (Firefox, IE10).
|
||||||
|
|
||||||
It's actively developed with newest Chromium and tested in Firefox Aurora.
|
It's actively developed with newest Chromium and tested in Firefox Aurora.
|
||||||
@@ -17,6 +17,9 @@ It's actively developed with newest Chromium and tested in Firefox Aurora.
|
|||||||
I don't really expect it to run smoothly in non-webkit-based browser.
|
I don't really expect it to run smoothly in non-webkit-based browser.
|
||||||
If it does, just let me know, I'll glad to hear that!
|
If it does, just let me know, I'll glad to hear that!
|
||||||
|
|
||||||
|
For browsers not supporting CSS3 3D transforms impress.js adds `impress-not-supported`
|
||||||
|
class on `#impress` element, so fallback styles can be applied.
|
||||||
|
|
||||||
|
|
||||||
LICENSE
|
LICENSE
|
||||||
---------
|
---------
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
b, strong { font-weight: bold }
|
b, strong { font-weight: bold }
|
||||||
|
i, em { font-style: italic}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
@@ -403,3 +404,34 @@ a:hover {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* IMPRESS NOT SUPPORTED STYLES */
|
||||||
|
|
||||||
|
.fallback-message {
|
||||||
|
font-family: sans-serif;
|
||||||
|
line-height: 1.3;
|
||||||
|
|
||||||
|
display: none;
|
||||||
|
width: 780px;
|
||||||
|
padding: 10px 10px 0;
|
||||||
|
margin: 20px auto;
|
||||||
|
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid #E4C652;
|
||||||
|
background: #EEDC94;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fallback-message p {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.impress-not-supported .step {
|
||||||
|
position: relative;
|
||||||
|
opacity: 1;
|
||||||
|
margin: 20px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.impress-not-supported .fallback-message {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,13 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="impress">
|
|
||||||
|
<div id="impress" class="impress-not-supported">
|
||||||
|
|
||||||
|
<div class="fallback-message">
|
||||||
|
<p>Your browser <b>doesn't support features required</b> by impress.js, so are presented with simplified version of this presentation.</p>
|
||||||
|
<p>For the best experience please use latest <b>Chrome</b> or <b>Safari</b> browser. Firefox 10 and Internet Explorer 10 <i>should</i> also handle it.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="step slide" data-x="-1000" data-y="-1500">
|
<div class="step slide" data-x="-1000" data-y="-1500">
|
||||||
<q>Aren't you just <b>bored</b> with all those slides-based presentations?</q>
|
<q>Aren't you just <b>bored</b> with all those slides-based presentations?</q>
|
||||||
|
|||||||
@@ -72,10 +72,21 @@
|
|||||||
return " scaleX(" + s.x + ") scaleY(" + s.y + ") scaleZ(" + s.z + ") ";
|
return " scaleX(" + s.x + ") scaleY(" + s.y + ") scaleZ(" + s.z + ") ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHECK SUPPORT
|
||||||
|
|
||||||
|
var impressSupported = (pfx("perspective") != null);
|
||||||
|
|
||||||
// DOM ELEMENTS
|
// DOM ELEMENTS
|
||||||
|
|
||||||
var impress = document.getElementById("impress");
|
var impress = document.getElementById("impress");
|
||||||
|
|
||||||
|
if (!impressSupported) {
|
||||||
|
impress.className = "impress-not-supported";
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
impress.className = "";
|
||||||
|
}
|
||||||
|
|
||||||
var canvas = document.createElement("div");
|
var canvas = document.createElement("div");
|
||||||
canvas.className = "canvas";
|
canvas.className = "canvas";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user