-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtml5slide-sample.php
449 lines (386 loc) · 11.3 KB
/
html5slide-sample.php
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
<?php
function html5slidesjs() { ?>
<script>
function addPrettify() {
var els = document.querySelectorAll('pre');
for (var i = 0, el; el = els[i]; i++) {
if (!el.classList.contains('noprettyprint')) {
el.classList.add('prettyprint');
}
}
var el = document.createElement('script');
el.type = 'text/javascript';
el.src = '<?php echo plugins_url('js/prettify.js', __FILE__ ); ?>';
el.onload = function() {
prettyPrint();
}
document.body.appendChild(el);
};
function addGeneralStyle() {
var el = document.createElement('link');
el.rel = 'stylesheet';
el.type = 'text/css';
el.href = '/css/html5-slide.css';
document.body.appendChild(el);
var el = document.createElement('meta');
el.name = 'viewport';
el.content = 'width=1100,height=750';
document.querySelector('head').appendChild(el);
var el = document.createElement('meta');
el.name = 'apple-mobile-web-app-capable';
el.content = 'yes';
document.querySelector('head').appendChild(el);
};
</script>
<?php }
function html5_run_slideshow($slide_id) { ?>
<!DOCTYPE html>
<!--
Google HTML5 slide template
Authors: Luke Mahé (code)
Marcin Wichary (code and design)
Dominic Mazzoni (browser compatibility)
Charles Chen (ChromeVox support)
URL: http://code.google.com/p/html5slides/
-->
<html>
<head>
<title>Presentation</title>
<meta charset='utf-8'>
<script src='<?php echo plugins_url('js/slides.js', __FILE__ ); ?>'></script>
<script src='<?php echo plugins_url('js/prettify.js', __FILE__ ); ?>'></script>
<link rel="stylesheet" href="<?php echo plugins_url('css/html5-slide.css', __FILE__ ); ?>" type="text/css" media="screen" />
</head>
<style>
/* Your individual styles here, or just use inline styles if that’s
what you want. */
</style>
<body style='display: none'>
<section class='slides layout-regular template-default'>
<!-- Your slides (<article>s) go here. Delete or comment out the
slides below. -->
<?php global $post;
global $id;
$paged = get_query_var( 'page' );
$children = new WP_Query(array(
'post_type' => page,
'post_parent' => $id,
'posts_per_page' => -1,
'orderby' => 'menu_order',
'order' => 'ASC',
'paged' => $paged,
));
?>
<article class='biglogo'>
</article>
<article>
<h1>
Title Goes Here Up
<br>
To Two Lines
</h1>
<p>
Sergey Brin
<br>
May 10, 2011
</p>
</article>
<article>
<p>
This is a slide with just text. This is a slide with just text.
This is a slide with just text. This is a slide with just text.
This is a slide with just text. This is a slide with just text.
</p>
<p>
There is more text just underneath.
</p>
</article>
<article>
<h3>
Simple slide with header and text
</h3>
<p>
This is a slide with just text. This is a slide with just text.
This is a slide with just text. This is a slide with just text.
This is a slide with just text. This is a slide with just text.
</p>
<p>
There is more text just underneath with a <code>code sample: 5px</code>.
</p>
</article>
<article class='smaller'>
<h3>
Simple slide with header and text (small font)
</h3>
<p>
This is a slide with just text. This is a slide with just text.
This is a slide with just text. This is a slide with just text.
This is a slide with just text. This is a slide with just text.
</p>
<p>
There is more text just underneath with a <code>code sample: 5px</code>.
</p>
</article>
<article>
<h3>
Slide with bullet points and a longer title, just because we
can make it longer
</h3>
<ul>
<li>
Use this template to create your presentation
</li>
<li>
Use the provided color palette, box and arrow graphics, and
chart styles
</li>
<li>
Instructions are provided to assist you in using this
presentation template effectively
</li>
<li>
At all times strive to maintain Google's corporate look and feel
</li>
</ul>
</article>
<article>
<h3>
Slide with bullet points that builds
</h3>
<ul class="build">
<li>
This is an example of a list
</li>
<li>
The list items fade in
</li>
<li>
Last one!
</li>
</ul>
<div class="build">
<p>Any element with child nodes can build.</p>
<p>It doesn't have to be a list.</p>
</div>
</article>
<article class='smaller'>
<h3>
Slide with bullet points (small font)
</h3>
<ul>
<li>
Use this template to create your presentation
<li>
Use the provided color palette, box and arrow graphics, and
chart styles
<li>
Instructions are provided to assist you in using this
presentation template effectively
<li>
At all times strive to maintain Google's corporate look and feel
</ul>
</article>
<article>
<h3>
Slide with a table
</h3>
<table>
<tr>
<th>
Name
<th>
Occupation
<tr>
<td>
Luke Mahé
<td>
V.P. of Keepin’ It Real
<tr>
<td>
Marcin Wichary
<td>
The Michael Bay of Doodles
</table>
</article>
<article class='smaller'>
<h3>
Slide with a table (smaller text)
</h3>
<table>
<tr>
<th>
Name
<th>
Occupation
<tr>
<td>
Luke Mahé
<td>
V.P. of Keepin’ It Real
<tr>
<td>
Marcin Wichary
<td>
The Michael Bay of Doodles
</table>
</article>
<article>
<h3>
Styles
</h3>
<ul>
<li>
<span class='red'>class="red"</span>
<li>
<span class='blue'>class="blue"</span>
<li>
<span class='green'>class="green"</span>
<li>
<span class='yellow'>class="yellow"</span>
<li>
<span class='black'>class="black"</span>
<li>
<span class='white'>class="white"</span>
<li>
<b>bold</b> and <i>italic</i>
</ul>
</article>
<article>
<h2>
Segue slide
</h2>
</article>
<article>
<h3>
Slide with an image
</h3>
<p>
<img style='height: 500px' src='<?php echo plugins_url('images/wordpress-pie-chart.png', __FILE__ ); ?>'>
</p>
<div class='source'>
Source: <a href="http://www.pootlepress.co.uk/2011/02/wordpress-worldwide-usage-charts/" target="_blank">http://www.pootlepress.co.uk</a>
</div>
</article>
<article>
<h3>
Slide with an image (centered)
</h3>
<p>
<img class='centered' style='height: 500px' src='<?php echo plugins_url('images/example-graph.png', __FILE__ ); ?>'>
</p>
<div class='source'>
Source: Larry Page
</div>
</article>
<article class='fill'>
<h3>
Image filling the slide (with optional header)
</h3>
<p>
<img src='<?php echo plugins_url('images/example-cat.jpg', __FILE__ ); ?>'>
</p>
<div class='source white'>
Source: Eric Schmidt
</div>
</article>
<article>
<h3>
This slide has some code
</h3>
<section>
<pre>
<script type='text/javascript'>
// Say hello world until the user starts questioning
// the meaningfulness of their existence.
function helloWorld(world) {
for (var i = 42; --i >= 0;) {
alert('Hello ' + String(world));
}
}
</script>
<style>
p { color: pink }
b { color: blue }
u { color: 'umber' }
</style>
</pre>
</section>
</article>
<article class='smaller'>
<h3>
This slide has some code (small font)
</h3>
<section>
<pre>
// This just echoes the chosen line, we'll position it later
function hello_dolly() {
$chosen = hello_dolly_get_lyric();
echo "<p id='dolly'>$chosen</p>";
}
// Now we set that function up to execute when the admin_notices action is called
add_action( 'admin_notices', 'hello_dolly' );
// We need some CSS to position the paragraph
function dolly_css() {
// This makes sure that the positioning is also good for right-to-left languages
$x = is_rtl() ? 'left' : 'right';
echo "
<style type='text/css'>
#dolly {
float: $x;
padding-$x: 15px;
padding-top: 5px;
margin: 0;
font-size: 11px;
}
</style>
";
}
</pre>
</section>
</article>
<article>
<q>
The best way to predict the future is to invent it.
</q>
<div class='author'>
Alan Kay
</div>
</article>
<article class='smaller'>
<q>
A distributed system is one in which the failure of a computer
you didn’t even know existed can render your own computer unusable.
</q>
<div class='author'>
Leslie Lamport
</div>
</article>
<article class='nobackground'>
<h3>
A slide with an embed + title
</h3>
<iframe src='http://wordpress.org'></iframe>
</article>
<article class='nobackground'>
<iframe src='http://wordpress.org'></iframe>
</article>
<article class='fill'>
<h3>
Full-slide embed with (optional) slide title on top
</h3>
<iframe src='http://wordpress.org'></iframe>
</article>
<article>
<h3>
Thank you!
</h3>
<ul>
<li>
<a href='http://wordpress.org'>wordpress.org</a>
</ul>
</article>
</section>
<?php html5slidesjs(); ?>
</body>
</html>
<?php }