iPad viewport now defined in script to avoid breaking mobile fallback mode
This commit is contained in:
@@ -66,7 +66,7 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=1024, initial-scale=0.75, user-scalable=no" />
|
<meta name="viewport" content="width=1024" />
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
<title>impress.js | presentation tool based on the power of CSS3 transforms and transitions in modern browsers | by Bartek Szopka @bartaz</title>
|
<title>impress.js | presentation tool based on the power of CSS3 transforms and transitions in modern browsers | by Bartek Szopka @bartaz</title>
|
||||||
|
|
||||||
|
|||||||
@@ -124,6 +124,16 @@
|
|||||||
root.className = "";
|
root.className = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// viewport updates for iPad
|
||||||
|
var meta = $("meta[name='viewport']") || document.createElement("meta");
|
||||||
|
// hardcoding these values looks pretty bad, as they kind of depend on the content
|
||||||
|
// so they should be at least configurable
|
||||||
|
meta.content = "width=1024, initial-scale=0.75, user-scalable=no";
|
||||||
|
if (meta.parentNode != document.head) {
|
||||||
|
meta.name = 'viewport';
|
||||||
|
document.head.appendChild(meta);
|
||||||
|
}
|
||||||
|
|
||||||
var canvas = document.createElement("div");
|
var canvas = document.createElement("div");
|
||||||
canvas.className = "canvas";
|
canvas.className = "canvas";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user