Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

Commit

Permalink
Provides presenter mode
Browse files Browse the repository at this point in the history
  • Loading branch information
schnatterer committed Nov 21, 2019
1 parent 475a316 commit 08558f1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Web-based presentation that features
* reveal.js with example slides in markdown,
* Jenkins continuous delivery pipeline that deploys to Nexus repo, GitHub Pages and Kubernetes.
* It also creates a PDF export of the slides.
* Toggle "presenter remote" mode using the `,` key. Off by default.
* This helps for presenter remotes that use the left/right key, instead of space and back.
* Workaround: Map left/right keys to next/prev slide functions.
* Disadvantage: left and right keys are also mapped on the keyboard. But you can toggle back to normal using the `,` key.
* Cloudogu corporate design via CSS

See also our [Blog Post](https://cloudogu.com/en/blog/continuous-delivery-with-revealjs) on this topic.
Expand Down
16 changes: 16 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,26 @@
// More info about config & dependencies:
// - https://github.com/hakimel/reveal.js#configuration
// - https://github.com/hakimel/reveal.js#dependencies
let presenterMode = false;
Reveal.initialize({
history: true,
// Use the default (h.v), because the printed version will always have this anyway
slideNumber: 'true',
// Support for presenters - press comma to toggle presenterMode mode, i.e. ⬅/➡️ keys map to
// prev/next slide, instead of left/right
keyboard: {
188: function() {
if (!presenterMode) {
Reveal.addKeyBinding( { keyCode: 39 }, 'next');
Reveal.addKeyBinding( { keyCode: 37 }, 'prev');
} else {
Reveal.removeKeyBinding( 37 );
Reveal.removeKeyBinding( 39 );
}
presenterMode=!presenterMode;
console.log(`Switched to presenter mode: ${presenterMode}`);
}
},
dependencies: [
{ src: 'plugin/markdown/marked.js' },
{ src: 'plugin/markdown/markdown.js' },
Expand Down

0 comments on commit 08558f1

Please sign in to comment.