diff options
author | Eric Bidelman | 2013-04-15 16:31:09 -0700 |
---|---|---|
committer | Eric Bidelman | 2013-04-15 16:31:09 -0700 |
commit | fa1c41da5a639fd54c064a5a34fdef9cbb794cd8 (patch) | |
tree | 4fd947cc60b80a7d66989a453e2f7f6a3ba53c5d | |
parent | 328eed4d0b86de924339ce865baa7c5d508031fd (diff) | |
download | io-slides-remote-fa1c41da5a639fd54c064a5a34fdef9cbb794cd8.tar.gz |
Adding eventInfo config support
-rw-r--r-- | js/slide-deck.js | 17 | ||||
-rw-r--r-- | slide_config.js | 5 |
2 files changed, 15 insertions, 7 deletions
diff --git a/js/slide-deck.js b/js/slide-deck.js index 6fc99eb..caebaf3 100644 --- a/js/slide-deck.js +++ b/js/slide-deck.js | |||
@@ -316,8 +316,8 @@ SlideDeck.prototype.loadConfig_ = function(config) { | |||
316 | 316 | ||
317 | if (settings.title) { | 317 | if (settings.title) { |
318 | document.title = settings.title.replace(/<br\/?>/, ' '); | 318 | document.title = settings.title.replace(/<br\/?>/, ' '); |
319 | if (settings.eventTitle) { | 319 | if (settings.eventInfo && settings.eventInfo.title) { |
320 | document.title += ' - ' + settings.eventTitle; | 320 | document.title += ' - ' + settings.eventInfo.title; |
321 | } | 321 | } |
322 | document.querySelector('[data-config-title]').innerHTML = settings.title; | 322 | document.querySelector('[data-config-title]').innerHTML = settings.title; |
323 | } | 323 | } |
@@ -334,7 +334,11 @@ SlideDeck.prototype.loadConfig_ = function(config) { | |||
334 | if (presenters.length == 1) { | 334 | if (presenters.length == 1) { |
335 | var p = presenters[0]; | 335 | var p = presenters[0]; |
336 | 336 | ||
337 | html = [p.name, p.company].join('<br>'); | 337 | var presenterTitle = [p.name]; |
338 | if (p.company) { | ||
339 | presenterTitle.push(p.company); | ||
340 | } | ||
341 | html = presenterTitle.join(' - ') + '<br>'; | ||
338 | 342 | ||
339 | var gplus = p.gplus ? '<span>g+</span><a href="' + p.gplus + | 343 | var gplus = p.gplus ? '<span>g+</span><a href="' + p.gplus + |
340 | '">' + p.gplus.replace(/https?:\/\//, '') + '</a>' : ''; | 344 | '">' + p.gplus.replace(/https?:\/\//, '') + '</a>' : ''; |
@@ -367,9 +371,10 @@ SlideDeck.prototype.loadConfig_ = function(config) { | |||
367 | var dataConfigPresenter = document.querySelector('[data-config-presenter]'); | 371 | var dataConfigPresenter = document.querySelector('[data-config-presenter]'); |
368 | if (dataConfigPresenter) { | 372 | if (dataConfigPresenter) { |
369 | dataConfigPresenter.innerHTML = html; | 373 | dataConfigPresenter.innerHTML = html; |
370 | if (settings.eventTitle) { | 374 | if (settings.eventInfo) { |
371 | dataConfigPresenter.innerHTML = dataConfigPresenter.innerHTML + '<br>' + | 375 | var date = settings.eventInfo.date; |
372 | settings.eventTitle; | 376 | var dateInfo = date ? ' - <time>' + date + '</time>' : ''; |
377 | dataConfigPresenter.innerHTML += settings.eventInfo.title + dateInfo; | ||
373 | } | 378 | } |
374 | } | 379 | } |
375 | } | 380 | } |
diff --git a/slide_config.js b/slide_config.js index a849147..8d370fd 100644 --- a/slide_config.js +++ b/slide_config.js | |||
@@ -3,7 +3,10 @@ var SLIDE_CONFIG = { | |||
3 | settings: { | 3 | settings: { |
4 | title: 'Title Goes Here<br>Up To Two Lines', | 4 | title: 'Title Goes Here<br>Up To Two Lines', |
5 | subtitle: 'Subtitle Goes Here', | 5 | subtitle: 'Subtitle Goes Here', |
6 | //eventTitle: 'Google I/O 2013', | 6 | //eventInfo: { |
7 | // title: 'Google I/O', | ||
8 | // date: '6/x/2013' | ||
9 | //}, | ||
7 | useBuilds: true, // Default: true. False will turn off slide animation builds. | 10 | useBuilds: true, // Default: true. False will turn off slide animation builds. |
8 | usePrettify: true, // Default: true | 11 | usePrettify: true, // Default: true |
9 | enableSlideAreas: true, // Default: true. False turns off the click areas on either slide of the slides. | 12 | enableSlideAreas: true, // Default: true. False turns off the click areas on either slide of the slides. |