blob: 5ce9d07bf08c19eca263506c3b8196ea27887d31 [file] [log] [blame]
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +02001/**
2 * The default reveal.js config object.
3 */
4export default {
5
6 // The "normal" size of the presentation, aspect ratio will be preserved
7 // when the presentation is scaled to fit different resolutions
Marc Kupietz9c036a42024-05-14 13:17:25 +02008 width: 1280,
Marc Kupietzcf6e9982026-08-15 15:37:40 +02009 height: 720,
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020010
11 // Factor of the display size that should remain empty around the content
12 margin: 0.04,
13
14 // Bounds for smallest/largest possible scale to apply to content
15 minScale: 0.2,
16 maxScale: 2.0,
17
Marc Kupietzcf6e9982026-08-15 15:37:40 +020018 // Display presentation control arrows.
19 // - true: Display controls on all screens
20 // - false: Hide controls on all screens
21 // - "speaker-only": Only display controls in the speaker view
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020022 controls: true,
23
24 // Help the user learn the controls by providing hints, for example by
25 // bouncing the down arrow when they first encounter a vertical slide
26 controlsTutorial: true,
27
28 // Determines where controls appear, "edges" or "bottom-right"
29 controlsLayout: 'bottom-right',
30
31 // Visibility rule for backwards navigation arrows; "faded", "hidden"
32 // or "visible"
33 controlsBackArrows: 'faded',
34
35 // Display a presentation progress bar
36 progress: true,
37
38 // Display the page number of the current slide
39 // - true: Show slide number
40 // - false: Hide slide number
41 //
42 // Can optionally be set as a string that specifies the number formatting:
43 // - "h.v": Horizontal . vertical slide number (default)
44 // - "h/v": Horizontal / vertical slide number
45 // - "c": Flattened slide number
46 // - "c/t": Flattened slide number / total slides
47 //
48 // Alternatively, you can provide a function that returns the slide
49 // number for the current slide. The function should take in a slide
50 // object and return an array with one string [slideNumber] or
51 // three strings [n1,delimiter,n2]. See #formatSlideNumber().
52 slideNumber: false,
53
54 // Can be used to limit the contexts in which the slide number appears
55 // - "all": Always show the slide number
56 // - "print": Only when printing to PDF
57 // - "speaker": Only in the speaker view
58 showSlideNumber: 'all',
59
60 // Use 1 based indexing for # links to match slide number (default is zero
61 // based)
62 hashOneBasedIndex: false,
63
64 // Add the current slide number to the URL hash so that reloading the
65 // page/copying the URL will return you to the same slide
66 hash: false,
67
68 // Flags if we should monitor the hash and change slides accordingly
69 respondToHashChanges: true,
70
Marc Kupietz09b75752023-10-07 09:32:19 +020071 // Enable support for jump-to-slide navigation shortcuts
72 jumpToSlide: true,
73
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020074 // Push each slide change to the browser history. Implies `hash: true`
75 history: false,
76
77 // Enable keyboard shortcuts for navigation
78 keyboard: true,
79
Marc Kupietzcf6e9982026-08-15 15:37:40 +020080 // Optional function that blocks keyboard events when returning false
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +020081 //
82 // If you set this to 'focused', we will only capture keyboard events
83 // for embedded decks when they are in focus
84 keyboardCondition: null,
85
86 // Disables the default reveal.js slide layout (scaling and centering)
87 // so that you can use custom CSS layout
88 disableLayout: false,
89
90 // Enable the slide overview mode
91 overview: true,
92
93 // Vertical centering of slides
94 center: true,
95
96 // Enables touch navigation on devices with touch input
97 touch: true,
98
99 // Loop the presentation
100 loop: false,
101
102 // Change the presentation direction to be RTL
103 rtl: false,
104
105 // Changes the behavior of our navigation directions.
106 //
107 // "default"
108 // Left/right arrow keys step between horizontal slides, up/down
109 // arrow keys step between vertical slides. Space key steps through
110 // all slides (both horizontal and vertical).
111 //
112 // "linear"
113 // Removes the up/down arrows. Left/right arrows step through all
114 // slides (both horizontal and vertical).
115 //
116 // "grid"
117 // When this is enabled, stepping left/right from a vertical stack
118 // to an adjacent vertical stack will land you at the same vertical
119 // index.
120 //
121 // Consider a deck with six slides ordered in two vertical stacks:
122 // 1.1 2.1
123 // 1.2 2.2
124 // 1.3 2.3
125 //
126 // If you're on slide 1.3 and navigate right, you will normally move
127 // from 1.3 -> 2.1. If "grid" is used, the same navigation takes you
128 // from 1.3 -> 2.3.
129 navigationMode: 'default',
130
131 // Randomizes the order of slides each time the presentation loads
132 shuffle: false,
133
134 // Turns fragments on and off globally
135 fragments: true,
136
137 // Flags whether to include the current fragment in the URL,
138 // so that reloading brings you to the same fragment position
139 fragmentInURL: true,
140
141 // Flags if the presentation is running in an embedded mode,
142 // i.e. contained within a limited portion of the screen
143 embedded: false,
144
145 // Flags if we should show a help overlay when the question-mark
146 // key is pressed
147 help: true,
148
149 // Flags if it should be possible to pause the presentation (blackout)
150 pause: true,
151
152 // Flags if speaker notes should be visible to all viewers
153 showNotes: false,
154
155 // Flags if slides with data-visibility="hidden" should be kep visible
156 showHiddenSlides: false,
157
158 // Global override for autoplaying embedded media (video/audio/iframe)
159 // - null: Media will only autoplay if data-autoplay is present
160 // - true: All media will autoplay, regardless of individual setting
161 // - false: No media will autoplay, regardless of individual setting
162 autoPlayMedia: null,
163
164 // Global override for preloading lazy-loaded iframes
165 // - null: Iframes with data-src AND data-preload will be loaded when within
166 // the viewDistance, iframes with only data-src will be loaded when visible
167 // - true: All iframes with data-src will be loaded when within the viewDistance
168 // - false: All iframes with data-src will be loaded only when visible
169 preloadIframes: null,
170
171 // Can be used to globally disable auto-animation
172 autoAnimate: true,
173
174 // Optionally provide a custom element matcher that will be
175 // used to dictate which elements we can animate between.
176 autoAnimateMatcher: null,
177
178 // Default settings for our auto-animate transitions, can be
179 // overridden per-slide or per-element via data arguments
180 autoAnimateEasing: 'ease',
181 autoAnimateDuration: 1.0,
182 autoAnimateUnmatched: true,
183
184 // CSS properties that can be auto-animated. Position & scale
185 // is matched separately so there's no need to include styles
186 // like top/right/bottom/left, width/height or margin.
187 autoAnimateStyles: [
188 'opacity',
189 'color',
190 'background-color',
191 'padding',
192 'font-size',
193 'line-height',
194 'letter-spacing',
195 'border-width',
196 'border-color',
197 'border-radius',
198 'outline',
199 'outline-offset'
200 ],
201
202 // Controls automatic progression to the next slide
203 // - 0: Auto-sliding only happens if the data-autoslide HTML attribute
204 // is present on the current slide or fragment
205 // - 1+: All slides will progress automatically at the given interval
206 // - false: No auto-sliding, even if data-autoslide is present
207 autoSlide: 0,
208
209 // Stop auto-sliding after user input
210 autoSlideStoppable: true,
211
212 // Use this method for navigation when auto-sliding (defaults to navigateNext)
213 autoSlideMethod: null,
214
215 // Specify the average time in seconds that you think you will spend
216 // presenting each slide. This is used to show a pacing timer in the
217 // speaker view
218 defaultTiming: null,
219
220 // Enable slide navigation via mouse wheel
221 mouseWheel: false,
222
223 // Opens links in an iframe preview overlay
224 // Add `data-preview-link` and `data-preview-link="false"` to customise each link
225 // individually
226 previewLinks: false,
227
228 // Exposes the reveal.js API through window.postMessage
229 postMessage: true,
230
231 // Dispatches all reveal.js events to the parent window through postMessage
232 postMessageEvents: false,
233
234 // Focuses body when page changes visibility to ensure keyboard shortcuts work
235 focusBodyOnPageVisibilityChange: true,
236
237 // Transition style
238 transition: 'slide', // none/fade/slide/convex/concave/zoom
239
240 // Transition speed
241 transitionSpeed: 'default', // default/fast/slow
242
243 // Transition style for full page slide backgrounds
244 backgroundTransition: 'fade', // none/fade/slide/convex/concave/zoom
245
246 // Parallax background image
247 parallaxBackgroundImage: '', // CSS syntax, e.g. "a.jpg"
248
249 // Parallax background size
250 parallaxBackgroundSize: '', // CSS syntax, e.g. "3000px 2000px"
251
252 // Parallax background repeat
253 parallaxBackgroundRepeat: '', // repeat/repeat-x/repeat-y/no-repeat/initial/inherit
254
255 // Parallax background position
256 parallaxBackgroundPosition: '', // CSS syntax, e.g. "top left"
257
258 // Amount of pixels to move the parallax background per slide step
259 parallaxBackgroundHorizontal: null,
260 parallaxBackgroundVertical: null,
261
Marc Kupietz9c036a42024-05-14 13:17:25 +0200262 // Can be used to initialize reveal.js in one of the following views:
263 // - print: Render the presentation so that it can be printed to PDF
264 // - scroll: Show the presentation as a tall scrollable page with scroll
265 // triggered animations
266 view: null,
267
268 // Adjusts the height of each slide in the scroll view.
269 // - full: Each slide is as tall as the viewport
270 // - compact: Slides are as small as possible, allowing multiple slides
271 // to be visible in parallel on tall devices
272 scrollLayout: 'full',
273
274 // Control how scroll snapping works in the scroll view.
275 // - false: No snapping, scrolling is continuous
276 // - proximity: Snap when close to a slide
277 // - mandatory: Always snap to the closest slide
278 //
279 // Only applies to presentations in scroll view.
280 scrollSnap: 'mandatory',
281
282 // Enables and configure the scroll view progress bar.
283 // - 'auto': Show the scrollbar while scrolling, hide while idle
284 // - true: Always show the scrollbar
285 // - false: Never show the scrollbar
286 scrollProgress: 'auto',
287
288 // Automatically activate the scroll view when we the viewport falls
289 // below the given width.
290 scrollActivationWidth: 435,
291
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200292 // The maximum number of pages a single slide can expand onto when printing
293 // to PDF, unlimited by default
294 pdfMaxPagesPerSlide: Number.POSITIVE_INFINITY,
295
296 // Prints each fragment on a separate slide
297 pdfSeparateFragments: true,
298
299 // Offset used to reduce the height of content within exported PDF pages.
300 // This exists to account for environment differences based on how you
301 // print to PDF. CLI printing options, like phantomjs and wkpdf, can end
302 // on precisely the total height of the document whereas in-browser
303 // printing has to end one pixel before.
304 pdfPageHeightOffset: -1,
305
306 // Number of slides away from the current that are visible
307 viewDistance: 3,
308
309 // Number of slides away from the current that are visible on mobile
310 // devices. It is advisable to set this to a lower number than
311 // viewDistance in order to save resources.
312 mobileViewDistance: 2,
313
314 // The display mode that will be used to show slides
315 display: 'block',
316
317 // Hide cursor if inactive
318 hideInactiveCursor: true,
319
320 // Time before the cursor is hidden (in ms)
321 hideCursorTime: 5000,
322
Marc Kupietz9c036a42024-05-14 13:17:25 +0200323 // Should we automatically sort and set indices for fragments
Marc Kupietz09b75752023-10-07 09:32:19 +0200324 // at each sync? (See Reveal.sync)
325 sortFragmentsOnSync: true,
326
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +0200327 // Script dependencies to load
328 dependencies: [],
329
330 // Plugin objects to register and use for this presentation
331 plugins: []
332
333}