-
Notifications
You must be signed in to change notification settings - Fork 0
/
book.html
112 lines (95 loc) · 4.46 KB
/
book.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<meta id="viewport" name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1">
<title>3D Flipbook</title>
<meta name="description" content="3D Flipbook">
<meta name="keywords" content="3d, mockup, flipbook">
<meta name="robots" content="index,follow">
<link href="css/book.css" rel="stylesheet">
<link href="css/dflip.css" rel="stylesheet">
<link href="css/ionicons.css" rel="stylesheet" type="text/css">
<link rel="icon" type="image/png" href="images/icon_16.png">
</head>
<body class="absolute-stretch">
<header class="menu">
<a class="menu-item" href="book.html"> 3D Image</a>
<a class="menu-item" href="book.html?pdf"> 3D PDF</a>
<a class="menu-item" href="book.html?css"> 2D Image</a>
<a class="menu-item" href="book.html?csspdf"> 2D PDF</a>
</header>
<section id="home" class="home absolute-stretch">
<div id="container" style="width: 100%;height: 100%">
<div class="quick-hint" style="display:none;">Double Click on an element to change the design. <strong>It's just
that easy!!</strong></div>
</div>
</section>
<section class="features">
<img src="images/features-flipbook.jpg">
</section>
<script src="js/libs/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="js/dflip/dflip.min.js"></script>
<script src="js/dflip/dflip.js"></script>
<script>
var flipBook;
if(window.location.href.indexOf("localhost")==-1){
// Standard Google Universal Analytics code
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); // Note: https protocol here
ga('create', 'UA-40859319-5', 'auto');
ga('set', 'checkProtocolTask', function(){}); // Removes failing protocol check. @see: http://stackoverflow.com/a/22152353/1958200
ga('require', 'displayfeatures');
ga('send', 'pageview', '/book.html');
}
$(document).ready(function () {
var source, options = {height: 500, duration: 500}, undef = void 0;
// Fragment exists
var queryString = window.location.href.split('?')[1] || "default";
queryString = queryString.toLowerCase();
if (queryString.indexOf("pdf") > -1) {
// source = "data/book/user_guide2_draft.pdf";
// source = "data/book/aiwo.pdf";
// source = "data/book/helloworld.pdf";
// source = "data/book/RFF-Resources_191_web.pdf";
//
// source = "data/book/Vogue_USA_-_November_2015-P2P.pdf";
// source = "data/book/book copy.pdf";
// source = "data/book/compressed.tracemonkey-pldi-09.pdf";
// source = "data/book/doc.pdf";
source = "data/book/National_Geographic_History_2016-03_04.pdf";
// source = "data/book/CASTEU copy-low res.pdf";
// source = "data/book/BusinessPixel Brochure copy3.pdf";
// source = "data/book/gimp.pdf";
} else {
var images = [];
for (var imgCount = 0; imgCount < 31; imgCount++) {
images[imgCount] = "./data/book/RFF-Resources_191_web/" + ('0000' + (imgCount + 1)).slice(-4) + ".jpg";
}
source = images;
}
options.isWebGl =
queryString.indexOf("css") > -1 ? false
: queryString.indexOf("3d") > -1 ? true
: true;
if (typeof PRESENTATION !== 'undefined') {
PRESENTATION.defaults.backgroundImage = "blank";//images/textures/white.jpg";
// PRESENTATION.defaults.mockupjsSrc = "js/libs/mockup.js";
/* PRESENTATION.defaults.backgroundImage = "images/textures/wood2.jpg";
options.backgroundColor= "#eee";
options.backgroundRepeat = 120;*/
}
flipBook = $("#container").flipBook(source, options);
if(window.ga)
window.ga('send', 'event', "Flipbook", "Load", queryString);
$(window).on("resize",function(){
flipBook.height($(window).height()-flipBook.container.position().top);
});
// flipBook = $("#container").triFold(source, {isWebGl: true,stiffness:0.15});
});
</script>
</body>
</html>