@farberg/reveal-template 1.1.25 → 1.1.27

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/README.md CHANGED
@@ -67,5 +67,5 @@ To start developing on this repository:
67
67
  # Bump version in `package.json`
68
68
 
69
69
  # Run this command to publish on npm
70
- npm publish --access public
70
+ npm login && sleep 3s && npm publish --access public
71
71
  ```
package/init-reveal.js CHANGED
@@ -153,7 +153,9 @@ const defaultRevealOptions = {
153
153
  lineColor: '#5c6971',
154
154
  primaryBorderColor: '#5c6971',
155
155
  secondaryColor: '#5c6971',
156
- secondaryTextColor: '#000'
156
+ secondaryTextColor: '#000',
157
+ tertiaryColor: '#e8e8e8',
158
+ loopTextColor: '#4a4a4a'
157
159
  },
158
160
  sequence: {
159
161
  mirrorActors: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farberg/reveal-template",
3
- "version": "1.1.25",
3
+ "version": "1.1.27",
4
4
  "homepage": "https://github.com/pfisterer/reveal-template",
5
5
  "description": "Reveal.js template for Dennis' lectures",
6
6
  "main": "index.js",
@@ -143,6 +143,14 @@ function injectStyles() {
143
143
  background: #e2001a;
144
144
  color: #fff;
145
145
  }
146
+ #quick-nav-overlay .quick-nav-item.current-slide {
147
+ border-left: 3px solid #e2001a;
148
+ padding-left: 3px;
149
+ font-weight: bold;
150
+ }
151
+ #quick-nav-overlay .quick-nav-item.active.current-slide {
152
+ border-left-color: #fff;
153
+ }
146
154
  #quick-nav-overlay .quick-nav-h1 {
147
155
  font-weight: bold;
148
156
  font-size: 13px;
@@ -191,6 +199,7 @@ function buildOverlay(deck) {
191
199
  let allItems = []
192
200
  let filtered = []
193
201
  let activeIndex = -1
202
+ let currentIndices = { h: 0, v: 0 }
194
203
 
195
204
  function render() {
196
205
  list.innerHTML = ''
@@ -204,6 +213,7 @@ function buildOverlay(deck) {
204
213
  const a = document.createElement('a')
205
214
  a.className = `quick-nav-item quick-nav-${item.level}`
206
215
  if (idx === activeIndex) a.classList.add('active')
216
+ if (item.h === currentIndices.h && item.v === currentIndices.v) a.classList.add('current-slide')
207
217
  a.textContent = item.text
208
218
  a.href = '#'
209
219
  a.addEventListener('click', e => {
@@ -236,8 +246,11 @@ function buildOverlay(deck) {
236
246
  allItems = collectHeadings(deck)
237
247
  filtered = allItems
238
248
  input.value = ''
239
- activeIndex = filtered.length > 0 ? 0 : -1
249
+ currentIndices = deck.getIndices()
250
+ const currentIdx = filtered.findIndex(i => i.h === currentIndices.h && i.v === currentIndices.v)
251
+ activeIndex = currentIdx >= 0 ? currentIdx : (filtered.length > 0 ? 0 : -1)
240
252
  render()
253
+ scrollActiveIntoView()
241
254
  overlay.classList.add('visible')
242
255
  setTimeout(() => input.focus(), 30)
243
256
  }