From ca26979ec3e0f76c6623e9b488bfb976cd976566 Mon Sep 17 00:00:00 2001
From: Eric Bidelman
Date: Mon, 9 Apr 2012 19:23:37 -0700
Subject: Contact info config hooked up
---
js/slides.js | 49 +++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 41 insertions(+), 8 deletions(-)
(limited to 'js')
diff --git a/js/slides.js b/js/slides.js
index 30aee54..e397d96 100644
--- a/js/slides.js
+++ b/js/slides.js
@@ -158,14 +158,6 @@ SlideDeck.prototype.loadConfig_ = function() {
this.addFavIcon_(settings.favIcon);
}
- if (settings.title) {
- document.title = settings.title;
- }
-
- if (settings.title) {
- document.title = settings.title;
- }
-
if (!!!('usePrettify' in settings) || settings.usePrettify) {
prettyPrint();
}
@@ -181,6 +173,47 @@ SlideDeck.prototype.loadConfig_ = function() {
if (!!!('useBuilds' in settings) || settings.useBuilds) {
this.makeBuildLists_();
}
+
+ if (settings.title) {
+ document.title = settings.title + ' - Google IO 2012';
+ document.querySelector('[data-config-title]').textContent = settings.title;
+ }
+
+ if (settings.subtitle) {
+ document.querySelector('[data-config-subtitle]').textContent = settings.subtitle;
+ }
+
+ if (this.config_.presenters) {
+ var presenters = this.config_.presenters;
+
+ var html = [];
+ if (presenters.length == 1) {
+ var p = presenters[0]
+
+ html = [p.name, p.company].join('
');
+
+ var gplus = p.gplus ? 'g+' + p.gplus + '' : '';
+
+ var twitter = p.twitter ? 'twitter' +
+ '' +
+ p.twitter + '' : '';
+
+ var www = p.www ? 'www' + p.www + '' : '';
+
+ var html2 = [gplus, twitter, www].join('
');
+
+ document.querySelector('[data-config-contact]').innerHTML = html2;
+ } else {
+ for (var i = 0, p; p = presenters[i]; ++i) {
+ html.push(p.name + ' - ' + p.company);
+ }
+ html = html.join('
');
+ }
+
+ document.querySelector('[data-config-presenter]').innerHTML = html;
+ }
};
/**
--
cgit v1.2.3