forked from hakimel/reveal.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
154 lines (133 loc) · 4.21 KB
/
index.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>OU EECS Theme for reveal.js</title>
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/ou.css">
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="plugin/highlight/monokai.css">
<!-- See https://github.com/hakimel/reveal.js/issues/806 -->
<style type="text/css">
p {
text-align: left;
}
.reveal ul {
display: block;
}
/* 1. Style header/footer <div> so they are positioned as desired. */
.ou-header-left {
position: absolute;
top: 0%;
left: 10px;
z-index: 1;
}
.ou-header-left img {
max-height: 50px;
width: auto;
height: auto;
}
.ou-header-right {
position: absolute;
top: 0%;
right: 0%;
}
.ou-footer-left {
position: absolute;
bottom: 0%;
left: 0%;
font-size: 0.60em;
z-index: 1;
}
.ou-reference {
width: 600px;
height: 500px;
}
@media (width <=800px) {
.ou-header-left img {
max-height: 30px;
width: auto;
height: auto;
}
.ou-footer-left {
font-size: 0.30em;
}
}
</style>
</head>
<body>
<!-- 2. Create hidden header/footer <div> -->
<div id="hidden" style="display:none;">
<div id="header">
<div class="ou-header-left"><img src="img/OHIO_primary_logo_RGB_White.png"></img></div>
<div class="ou-header-right"></div>
<div class="ou-footer-left">Russ College of Engineering<br />School of EECS</div>
</div>
</div>
<div class="reveal">
<div class="slides">
<section data-markdown="content.md" data-separator="^\r?\n---\r?\n$" data-separator-vertical="^\r?\n----\r?\n$">
</section>
<section>
<h2>👋</h2>
</section>
<section id="references" data-ou-bg-type="light">
<h2>References</h2>
<iframe data-src="ref.html" class="ou-reference" data-preload></iframe>
</section>
</div>
</div>
<script src="dist/reveal.js"></script>
<script src="plugin/notes/notes.js"></script>
<script src="plugin/markdown/markdown.js"></script>
<script src="plugin/highlight/highlight.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
// Learn about plugins: https://revealjs.com/plugins/
plugins: [RevealMarkdown, RevealHighlight, RevealNotes]
}).then(() => {
// Parse data-ou-bg-type on the slide.
var slides = Reveal.getSlides();
for (var i = 0; i < slides.length; i++) {
var slide = slides[i];
if ($(slide).data("ou-bg-type") === "light") {
$(slide).addClass("ou-light");
var slideBackgroundElement = slide.slideBackgroundElement;
$(slideBackgroundElement).addClass("ou-light");
slideBackgroundElement.style.backgroundColor = "#F9F7ED";
}
}
});
</script>
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script type="text/javascript">
// 3. On Reveal.js ready event, copy header/footer <div> into each `.slide-background` <div>
var header = $('#header').html();
if (window.location.search.match(/print-pdf/gi)) {
Reveal.addEventListener('ready', function (event) {
$('.slide-background').append(header);
});
}
else {
$('div.reveal').append(header);
// Register event handler.
Reveal.on('slidechanged', event => {
// event.previousSlide, event.currentSlide, event.indexh, event.indexv
if ($(event.currentSlide).data("ou-bg-type") === "light") {
$(".ou-footer-left").addClass("ou-light");
$(".ou-header-left img").attr("src", "img/OHIO_primary_logo_RGB_Cutler.png");
} else {
$(".ou-footer-left").removeClass("ou-light");
$(".ou-header-left img").attr("src", "img/OHIO_primary_logo_RGB_White.png");
}
});
}
</script>
</body>
</html>