|
18 | 18 | <body> |
19 | 19 | <div class="reveal"> |
20 | 20 | <div class="slides"> |
21 | | - {%- for presentation_config in presentation_configs -%} |
22 | | - {% set outer_loop = loop %} |
23 | | - {%- for slide_config in presentation_config.slides -%} |
24 | | - {%- if one_file -%} |
| 21 | + {% for presentation_config in presentation_configs -%} |
| 22 | + {%- set outer_loop = loop %} |
| 23 | + {% for slide_config in presentation_config.slides %} |
| 24 | + {% if one_file %} |
25 | 25 | {% set file = file_to_data_uri(slide_config.file) %} |
26 | | - {%- else -%} |
27 | | - {% set file = assets_dir / slide_config.file.name %} |
28 | | - {%- endif -%} |
29 | | - <section |
30 | | - data-background-size={{ background_size }} |
31 | | - data-background-color="{{ presentation_config.background_color }}" |
32 | | - data-background-video="{{ file }}" |
33 | | - {% if loop.index == 1 and outer_loop.index == 1 -%} |
34 | | - data-background-video-muted |
35 | | - {%- endif %} |
36 | | - {% if slide_config.loop -%} |
37 | | - data-background-video-loop |
38 | | - {%- endif -%} |
39 | | - {% if slide_config.auto_next -%} |
40 | | - data-autoslide="{{ get_duration_ms(slide_config.file) }}" |
41 | | - {%- endif -%}> |
42 | | - {% if slide_config.notes != "" -%} |
43 | | - <aside class="notes" data-markdown>{{ slide_config.notes }}</aside> |
44 | | - {%- endif %} |
45 | | - </section> |
46 | | - {%- endfor -%} |
47 | | - {%- endfor -%} |
| 26 | + {% else %} |
| 27 | + {% set file = assets_dir / (prefix(outer_loop.index0) + slide_config.file.name) %} |
| 28 | + {% endif %} |
| 29 | + <section |
| 30 | + data-background-size={{ background_size }} |
| 31 | + data-background-color="{{ presentation_config.background_color }}" |
| 32 | + data-background-video="{{ file }}" |
| 33 | + {% if loop.index == 1 and outer_loop.index == 1 %} |
| 34 | + data-background-video-muted |
| 35 | + {% endif %} |
| 36 | + {% if slide_config.loop %} |
| 37 | + data-background-video-loop |
| 38 | + {% endif %} |
| 39 | + {% if slide_config.auto_next %} |
| 40 | + data-autoslide="{{ get_duration_ms(slide_config.file) }}" |
| 41 | + {% endif %} |
| 42 | + > |
| 43 | + {% if slide_config.notes != "" %} |
| 44 | + <aside class="notes" data-markdown>{{ slide_config.notes }}</aside> |
| 45 | + {% endif %} |
| 46 | + </section> |
| 47 | + {% endfor %} |
| 48 | + {% endfor %} |
48 | 49 | </div> |
49 | 50 | </div> |
50 | 51 |
|
51 | 52 | <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/{{ reveal_version }}/reveal.min.js"></script> |
52 | 53 |
|
53 | 54 | <!-- To include plugins, see: https://revealjs.com/plugins/ --> |
54 | | - |
55 | | - {% if has_notes -%} |
| 55 | + {% if has_notes %} |
56 | 56 | <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/{{ reveal_version }}/plugin/markdown/markdown.min.js"></script> |
57 | 57 | <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/{{ reveal_version }}/plugin/notes/notes.min.js"></script> |
58 | | - {%- endif -%} |
| 58 | + {% endif %} |
59 | 59 |
|
60 | 60 | <!-- <script src="index.js"></script> --> |
61 | 61 | <script> |
62 | 62 | Reveal.initialize({ |
63 | | - {% if has_notes -%} |
64 | | - plugins: [ RevealMarkdown, RevealNotes ], |
65 | | - {%- endif %} |
| 63 | + {% if has_notes %} |
| 64 | + /// The list of RevealJS plugins. |
| 65 | + plugins: [ RevealMarkdown, RevealNotes ], |
| 66 | + {% endif %} |
66 | 67 | // The "normal" size of the presentation, aspect ratio will |
67 | 68 | // be preserved when the presentation is scaled to fit different |
68 | 69 | // resolutions. Can be specified using percentage units. |
69 | 70 | width: {{ width }}, |
70 | 71 | height: {{ height }}, |
71 | | - |
72 | 72 | // Factor of the display size that should remain empty around |
73 | 73 | // the content |
74 | 74 | margin: {{ margin }}, |
75 | | - |
76 | 75 | // Bounds for smallest/largest possible scale to apply to content |
77 | 76 | minScale: {{ min_scale }}, |
78 | 77 | maxScale: {{ max_scale }}, |
79 | | - |
80 | 78 | // Display presentation control arrows |
81 | 79 | controls: {{ controls }}, |
82 | | - |
83 | 80 | // Help the user learn the controls by providing hints, for example by |
84 | 81 | // bouncing the down arrow when they first encounter a vertical slide |
85 | 82 | controlsTutorial: {{ controls_tutorial }}, |
86 | | - |
87 | 83 | // Determines where controls appear, "edges" or "bottom-right" |
88 | 84 | controlsLayout: {{ controls_layout }}, |
89 | | - |
90 | 85 | // Visibility rule for backwards navigation arrows; "faded", "hidden" |
91 | 86 | // or "visible" |
92 | 87 | controlsBackArrows: {{ controls_back_arrows }}, |
93 | | - |
94 | 88 | // Display a presentation progress bar |
95 | 89 | progress: {{ progress }}, |
96 | | - |
97 | 90 | // Display the page number of the current slide |
98 | 91 | // - true: Show slide number |
99 | 92 | // - false: Hide slide number |
|
109 | 102 | // object and return an array with one string [slideNumber] or |
110 | 103 | // three strings [n1,delimiter,n2]. See #formatSlideNumber(). |
111 | 104 | slideNumber: {{ slide_number }}, |
112 | | - |
113 | 105 | // Can be used to limit the contexts in which the slide number appears |
114 | 106 | // - "all": Always show the slide number |
115 | 107 | // - "print": Only when printing to PDF |
116 | 108 | // - "speaker": Only in the speaker view |
117 | 109 | showSlideNumber: {{ show_slide_number }}, |
118 | | - |
119 | 110 | // Use 1 based indexing for # links to match slide number (default is zero |
120 | 111 | // based) |
121 | 112 | hashOneBasedIndex: {{ hash_one_based_index }}, |
122 | | - |
123 | 113 | // Add the current slide number to the URL hash so that reloading the |
124 | 114 | // page/copying the URL will return you to the same slide |
125 | 115 | hash: {{ hash }}, |
126 | | - |
127 | 116 | // Flags if we should monitor the hash and change slides accordingly |
128 | 117 | respondToHashChanges: {{ respond_to_hash_changes }}, |
129 | | - |
| 118 | + // Enable support for jump-to-slide navigation shortcuts |
| 119 | + jumpToSlide: {{ jump_to_slide }}, |
130 | 120 | // Push each slide change to the browser history. Implies `hash: true` |
131 | 121 | history: {{ history }}, |
132 | | - |
133 | 122 | // Enable keyboard shortcuts for navigation |
134 | 123 | keyboard: {{ keyboard }}, |
135 | | - |
136 | 124 | // Optional function that blocks keyboard events when retuning false |
137 | 125 | // |
138 | 126 | // If you set this to 'focused', we will only capture keyboard events |
139 | 127 | // for embedded decks when they are in focus |
140 | 128 | keyboardCondition: {{ keyboard_condition }}, |
141 | | - |
142 | 129 | // Disables the default reveal.js slide layout (scaling and centering) |
143 | 130 | // so that you can use custom CSS layout |
144 | 131 | disableLayout: {{ disable_layout }}, |
145 | | - |
146 | 132 | // Enable the slide overview mode |
147 | 133 | overview: {{ overview }}, |
148 | | - |
149 | 134 | // Vertical centering of slides |
150 | 135 | center: {{ center }}, |
151 | | - |
152 | 136 | // Enables touch navigation on devices with touch input |
153 | 137 | touch: {{ touch }}, |
154 | | - |
155 | 138 | // Loop the presentation |
156 | 139 | loop: {{ loop }}, |
157 | | - |
158 | 140 | // Change the presentation direction to be RTL |
159 | 141 | rtl: {{ rtl }}, |
160 | | - |
161 | 142 | // Changes the behavior of our navigation directions. |
162 | 143 | // |
163 | 144 | // "default" |
|
183 | 164 | // from 1.3 -> 2.1. If "grid" is used, the same navigation takes you |
184 | 165 | // from 1.3 -> 2.3. |
185 | 166 | navigationMode: {{ navigation_mode }}, |
186 | | - |
187 | 167 | // Randomizes the order of slides each time the presentation loads |
188 | 168 | shuffle: {{ shuffle }}, |
189 | | - |
190 | 169 | // Turns fragments on and off globally |
191 | 170 | fragments: {{ fragments }}, |
192 | | - |
193 | 171 | // Flags whether to include the current fragment in the URL, |
194 | 172 | // so that reloading brings you to the same fragment position |
195 | 173 | fragmentInURL: {{ fragment_in_url }}, |
196 | | - |
197 | 174 | // Flags if the presentation is running in an embedded mode, |
198 | 175 | // i.e. contained within a limited portion of the screen |
199 | 176 | embedded: {{ embedded }}, |
200 | | - |
201 | 177 | // Flags if we should show a help overlay when the question-mark |
202 | 178 | // key is pressed |
203 | 179 | help: {{ help }}, |
204 | | - |
205 | 180 | // Flags if it should be possible to pause the presentation (blackout) |
206 | 181 | pause: {{ pause }}, |
207 | | - |
208 | 182 | // Flags if speaker notes should be visible to all viewers |
209 | 183 | showNotes: {{ show_notes }}, |
210 | | - |
211 | 184 | // Global override for autolaying embedded media (video/audio/iframe) |
212 | 185 | // - null: Media will only autoplay if data-autoplay is present |
213 | 186 | // - true: All media will autoplay, regardless of individual setting |
214 | 187 | // - false: No media will autoplay, regardless of individual setting |
215 | 188 | autoPlayMedia: {{ auto_play_media }}, |
216 | | - |
217 | 189 | // Global override for preloading lazy-loaded iframes |
218 | 190 | // - null: Iframes with data-src AND data-preload will be loaded when within |
219 | 191 | // the viewDistance, iframes with only data-src will be loaded when visible |
220 | 192 | // - true: All iframes with data-src will be loaded when within the viewDistance |
221 | 193 | // - false: All iframes with data-src will be loaded only when visible |
222 | 194 | preloadIframes: {{ preload_iframes }}, |
223 | | - |
224 | 195 | // Can be used to globally disable auto-animation |
225 | 196 | autoAnimate: {{ auto_animate }}, |
226 | | - |
227 | 197 | // Optionally provide a custom element matcher that will be |
228 | 198 | // used to dictate which elements we can animate between. |
229 | 199 | autoAnimateMatcher: {{ auto_animate_matcher }}, |
230 | | - |
231 | 200 | // Default settings for our auto-animate transitions, can be |
232 | 201 | // overridden per-slide or per-element via data arguments |
233 | 202 | autoAnimateEasing: {{ auto_animate_easing }}, |
234 | 203 | autoAnimateDuration: {{ auto_animate_duration }}, |
235 | 204 | autoAnimateUnmatched: {{ auto_animate_unmatched }}, |
236 | | - |
237 | 205 | // CSS properties that can be auto-animated. Position & scale |
238 | 206 | // is matched separately so there's no need to include styles |
239 | 207 | // like top/right/bottom/left, width/height or margin. |
240 | 208 | autoAnimateStyles: {{ auto_animate_styles }}, |
241 | | - |
242 | 209 | // Controls automatic progression to the next slide |
243 | 210 | // - 0: Auto-sliding only happens if the data-autoslide HTML attribute |
244 | 211 | // is present on the current slide or fragment |
245 | 212 | // - 1+: All slides will progress automatically at the given interval |
246 | 213 | // - false: No auto-sliding, even if data-autoslide is present |
247 | 214 | autoSlide: {{ auto_slide }}, |
248 | | - |
249 | 215 | // Stop auto-sliding after user input |
250 | 216 | autoSlideStoppable: {{ auto_slide_stoppable }}, |
251 | | - |
252 | 217 | // Use this method for navigation when auto-sliding (defaults to navigateNext) |
253 | 218 | autoSlideMethod: {{ auto_slide_method }}, |
254 | | - |
255 | 219 | // Specify the average time in seconds that you think you will spend |
256 | 220 | // presenting each slide. This is used to show a pacing timer in the |
257 | 221 | // speaker view |
258 | 222 | defaultTiming: {{ default_timing }}, |
259 | | - |
260 | 223 | // Enable slide navigation via mouse wheel |
261 | 224 | mouseWheel: {{ mouse_wheel }}, |
262 | | - |
263 | 225 | // Opens links in an iframe preview overlay |
264 | 226 | // Add `data-preview-link` and `data-preview-link="false"` to customize each link |
265 | 227 | // individually |
266 | 228 | previewLinks: {{ preview_links }}, |
267 | | - |
268 | 229 | // Exposes the reveal.js API through window.postMessage |
269 | 230 | postMessage: {{ post_message }}, |
270 | | - |
271 | 231 | // Dispatches all reveal.js events to the parent window through postMessage |
272 | 232 | postMessageEvents: {{ post_message_events }}, |
273 | | - |
274 | 233 | // Focuses body when page changes visibility to ensure keyboard shortcuts work |
275 | 234 | focusBodyOnPageVisibilityChange: {{ focus_body_on_page_visibility_change }}, |
276 | | - |
277 | 235 | // Transition style |
278 | 236 | transition: {{ transition }}, // none/fade/slide/convex/concave/zoom |
279 | | - |
280 | 237 | // Transition speed |
281 | 238 | transitionSpeed: {{ transition_speed }}, // default/fast/slow |
282 | | - |
283 | 239 | // Transition style for full page slide backgrounds |
284 | 240 | backgroundTransition: {{ background_transition }}, // none/fade/slide/convex/concave/zoom |
285 | | - |
286 | 241 | // The maximum number of pages a single slide can expand onto when printing |
287 | 242 | // to PDF, unlimited by default |
288 | 243 | pdfMaxPagesPerSlide: {{ pdf_max_pages_per_slide }}, |
289 | | - |
290 | 244 | // Prints each fragment on a separate slide |
291 | 245 | pdfSeparateFragments: {{ pdf_separate_fragments }}, |
292 | | - |
293 | 246 | // Offset used to reduce the height of content within exported PDF pages. |
294 | 247 | // This exists to account for environment differences based on how you |
295 | 248 | // print to PDF. CLI printing options, like phantomjs and wkpdf, can end |
296 | 249 | // on precisely the total height of the document whereas in-browser |
297 | 250 | // printing has to end one pixel before. |
298 | 251 | pdfPageHeightOffset: {{ pdf_page_height_offset }}, |
299 | | - |
300 | 252 | // Number of slides away from the current that are visible |
301 | 253 | viewDistance: {{ view_distance }}, |
302 | | - |
303 | 254 | // Number of slides away from the current that are visible on mobile |
304 | 255 | // devices. It is advisable to set this to a lower number than |
305 | 256 | // viewDistance in order to save resources. |
306 | 257 | mobileViewDistance: {{ mobile_view_distance }}, |
307 | | - |
308 | 258 | // The display mode that will be used to show slides |
309 | 259 | display: {{ display }}, |
310 | | - |
311 | 260 | // Hide cursor if inactive |
312 | 261 | hideInactiveCursor: {{ hide_inactive_cursor }}, |
313 | | - |
314 | 262 | // Time before the cursor is hidden (in ms) |
315 | 263 | hideCursorTime: {{ hide_cursor_time }} |
316 | 264 | }); |
317 | | - |
318 | 265 | {% if one_file %} |
319 | 266 | // Fix found by @t-fritsch and @Rapsssito on GitHub |
320 | 267 | // see: https://github.com/hakimel/reveal.js/discussions/3362#discussioncomment-11733074. |
|
0 commit comments