diff --git a/CHANGELOG.md b/CHANGELOG.md index 10a2b40..2dd5b64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update the comparison table in the README. [#560](https://github.com/jeertmans/manim-slides/pull/560) +- Update the template in the *Customize your RevealJS slides* section. + [#565](https://github.com/jeertmans/manim-slides/pull/565) (v5.5.2)= ## [v5.5.2](https://github.com/jeertmans/manim-slides/compare/v5.5.1...v5.5.2) diff --git a/docs/source/_static/template.html b/docs/source/_static/template.html index 06e943c..d85fb33 100644 --- a/docs/source/_static/template.html +++ b/docs/source/_static/template.html @@ -50,11 +50,11 @@ + {% if has_notes %} - - + {% endif %} @@ -262,6 +262,23 @@ // Time before the cursor is hidden (in ms) hideCursorTime: {{ hide_cursor_time }} }); + // Override SPACE to play / pause the video + Reveal.addKeyBinding( + { + keyCode: 32, + key: 'SPACE', + description: 'Play / pause video' + }, + () => { + var currentVideos = Reveal.getCurrentSlide().slideBackgroundContentElement.getElementsByTagName("video"); + if (currentVideos.length > 0) { + if (currentVideos[0].paused == true) currentVideos[0].play(); + else currentVideos[0].pause(); + } else { + Reveal.next(); + } + } + ); {% if one_file %} // Fix found by @t-fritsch and @Rapsssito on GitHub // see: https://github.com/hakimel/reveal.js/discussions/3362#discussioncomment-11733074. @@ -306,6 +323,13 @@ Reveal.on( 'ready', fixBase64VideoBackground ); {% endif %} + {% if env['READTHEDOCS'] %} + + {% endif %}