forked from reid/upstage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html.erb
115 lines (98 loc) · 3.47 KB
/
index.html.erb
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
112
113
114
115
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title><%= @headers['title'] %></title>
<meta name="author" content="<%= @headers['author'] %>">
<meta name="copyright" content="<%= @headers['copyright'] %>">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=1024, user-scalable=no">
<link rel="stylesheet" href="build/upstage-deck-core-min.css">
<link rel="stylesheet" href="transition.css">
<link rel="stylesheet" href="prettify.css">
<style>
<%= content_for :css %>
</style>
</head>
<body>
<div id="bd" class="deck-container">
<div class="slide title">
<p class="conf"><%= @headers['footer'] %></p>
<h1><%= @headers['title'] %></h1>
<p><%= @headers['author'] %></p>
</div>
<%= @content %>
</div>
<script src="prettify.js"></script>
<script src="http://yui.yahooapis.com/3.8.0pr1/build/yui/yui-min.js"></script>
<script>
if (!window.YUI) {
// Retry with a local URL.
document.write('<script src="yui3/build/yui/yui.js"><\/script>');
// Don't autodetect the base path (the CDN path didn't work).
document.write('<script>YUI.config.base = "yui3/build/";<\/script>');
}
</script>
<script>
prettyPrint();
YUI({
modules: {
"upstage-blank": {
fullpath: "build/upstage-blank-min.js",
requires: ["upstage-slideshow", "plugin"]
},
"upstage-controls": {
fullpath: "build/upstage-controls-min.js",
requires: ["upstage-slideshow", "widget", "transition", "node"]
},
"upstage-gesture": {
fullpath: "build/upstage-gesture-min.js",
requires: ["upstage-slideshow", "plugin", "event-move"]
},
"upstage-keyboard": {
fullpath: "build/upstage-keyboard-min.js",
requires: ["upstage-slideshow", "base-build", "plugin", "event-key"]
},
"upstage-permalink": {
fullpath: "build/upstage-permalink-min.js",
requires: ["upstage-slideshow", "base-build", "node", "plugin", "history"]
},
"upstage-slideshow": {
fullpath: "build/upstage-slideshow-min.js",
requires: ["oop", "node", "widget", "base-build"]
}
// For controls plugin-widget:
// It should be a sub-Widget, but pluggable into deck.
// Also, it should create the prev/next links
// unlike deck.js which puts dummy links in markup.
},
debug: true,
filter: "min"
}).use(
"upstage-slideshow",
"upstage-keyboard",
"upstage-permalink",
"upstage-gesture",
"upstage-blank",
function (Y) {
// Upstage is a YUI widget.
var deck = new Y.Upstage({
srcNode: "#bd" // Where to find .slide elements.
});
// Upstage does not do much without plugins.
// They are all optional. Use only what you need.
deck.plug([
Y.Plugin.UpstageKeyboard,
Y.Plugin.UpstageBlank,
Y.Plugin.UpstageGesture,
Y.Plugin.UpstagePermalink
]);
deck.render();
if ("function" === typeof window.deckReady) {
window.deckReady(deck, Y);
}
}
);
</script>
</body>
</html>