返回 reveal.js
test-pdf.html
根目录 / test / test-pdf.html
1 <!doctype html>
2 <html lang="en">
3
4 <head>
5 <meta charset="utf-8">
6
7 <title>reveal.js - Test PDF exports</title>
8 </head>
9
10 <body style="overflow: auto;">
11
12 <div id="qunit"></div>
13 <div id="qunit-fixture"></div>
14
15 <div class="reveal" style="display: none;">
16
17 <div class="slides">
18
19 <section>
20 <h1>1</h1>
21 <img data-src="">
22 </section>
23
24 <section>
25 <section>
26 <h1>2.1</h1>
27 </section>
28 <section>
29 <h1>2.2</h1>
30 </section>
31 <section>
32 <h1>2.3</h1>
33 </section>
34 </section>
35
36 <section id="fragment-slides">
37 <section>
38 <h1>3.1</h1>
39 <ul>
40 <li class="fragment">4.1</li>
41 <li class="fragment">4.2</li>
42 <li class="fragment">4.3</li>
43 </ul>
44 </section>
45
46 <section>
47 <h1>3.2</h1>
48 <ul>
49 <li class="fragment" data-fragment-index="0">4.1</li>
50 <li class="fragment" data-fragment-index="0">4.2</li>
51 </ul>
52 </section>
53
54 <section>
55 <h1>3.3</h1>
56 <ul>
57 <li class="fragment" data-fragment-index="1">3.3.1</li>
58 <li class="fragment" data-fragment-index="4">3.3.2</li>
59 <li class="fragment" data-fragment-index="4">3.3.3</li>
60 </ul>
61 </section>
62 </section>
63
64 <section>
65 <h1>4</h1>
66 </section>
67
68 </div>
69
70 </div>
71
72 <script type="module">
73 import 'reveal.css';
74 import 'qunit/qunit/qunit.css';
75 import QUnit from 'qunit';
76 import Reveal from 'reveal.js';
77
78 QUnit.config.testTimeout = 30000;
79 QUnit.config.autostart = false;
80
81 Reveal.initialize({ pdf: true }).then( function() {
82
83 QUnit.start();
84
85 // Only one test for now, we're mainly ensuring that there
86 // are no execution errors when running PDF mode
87
88 QUnit.test( 'Reveal.isReady', function( assert ) {
89 assert.strictEqual( Reveal.isReady(), true, 'returns true' );
90 });
91
92 } );
93
94 </script>
95
96 </body>
97 </html>
98
98 lines HTML