@farberg/reveal-template 1.1.22 → 1.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/css/dhbw.css CHANGED
@@ -30,7 +30,7 @@ body {
30
30
 
31
31
  .reveal {
32
32
  font-family: 'Source Sans Pro', Helvetica, sans-serif;
33
- font-size: 33px;
33
+ font-size: 30px;
34
34
  font-weight: normal;
35
35
  /* color: #222; */
36
36
  color: #4e565c;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farberg/reveal-template",
3
- "version": "1.1.22",
3
+ "version": "1.1.23",
4
4
  "homepage": "https://github.com/pfisterer/reveal-template",
5
5
  "description": "Reveal.js template for Dennis' lectures",
6
6
  "main": "index.js",
@@ -28,12 +28,19 @@ function showTitle(deck, packageJson) {
28
28
  let slideTitle = el.innerText;
29
29
 
30
30
  // Mark the enclosing slide so simplemenu hides on it (handled in dhbw.css
31
- // via body.hide-menubar) and give it a menu-label for any contexts that
32
- // still read data-name. Equivalent to writing in the markdown:
31
+ // via body.hide-menubar). Equivalent to writing in the markdown:
33
32
  // <!-- .slide: data-state="hide-menubar" -->
33
+ // Reveal mirrors data-state to body classes on every slidechanged event.
34
+ // We're running here in the 'ready' callback — after the first
35
+ // slidechanged has already fired during init — so for the *current*
36
+ // slide we also need to apply the body class manually. Subsequent
37
+ // navigations are then handled by Reveal automatically.
34
38
  const section = el.closest('section');
35
39
  if (section) {
36
40
  section.setAttribute('data-state', 'hide-menubar');
41
+ if (section === deck.getCurrentSlide()) {
42
+ document.body.classList.add('hide-menubar');
43
+ }
37
44
  }
38
45
 
39
46
  el.innerHTML = `