diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/slides.js | 49 |
1 files changed, 41 insertions, 8 deletions
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() { | |||
158 | this.addFavIcon_(settings.favIcon); | 158 | this.addFavIcon_(settings.favIcon); |
159 | } | 159 | } |
160 | 160 | ||
161 | if (settings.title) { | ||
162 | document.title = settings.title; | ||
163 | } | ||
164 | |||
165 | if (settings.title) { | ||
166 | document.title = settings.title; | ||
167 | } | ||
168 | |||
169 | if (!!!('usePrettify' in settings) || settings.usePrettify) { | 161 | if (!!!('usePrettify' in settings) || settings.usePrettify) { |
170 | prettyPrint(); | 162 | prettyPrint(); |
171 | } | 163 | } |
@@ -181,6 +173,47 @@ SlideDeck.prototype.loadConfig_ = function() { | |||
181 | if (!!!('useBuilds' in settings) || settings.useBuilds) { | 173 | if (!!!('useBuilds' in settings) || settings.useBuilds) { |
182 | this.makeBuildLists_(); | 174 | this.makeBuildLists_(); |
183 | } | 175 | } |
176 | |||
177 | if (settings.title) { | ||
178 | document.title = settings.title + ' - Google IO 2012'; | ||
179 | document.querySelector('[data-config-title]').textContent = settings.title; | ||
180 | } | ||
181 | |||
182 | if (settings.subtitle) { | ||
183 | document.querySelector('[data-config-subtitle]').textContent = settings.subtitle; | ||
184 | } | ||
185 | |||
186 | if (this.config_.presenters) { | ||
187 | var presenters = this.config_.presenters; | ||
188 | |||
189 | var html = []; | ||
190 | if (presenters.length == 1) { | ||
191 | var p = presenters[0] | ||
192 | |||
193 | html = [p.name, p.company].join('<br>'); | ||
194 | |||
195 | var gplus = p.gplus ? '<span>g+</span><a href="' + p.gplus + | ||
196 | '" target="_blank">' + p.gplus + '</a>' : ''; | ||
197 | |||
198 | var twitter = p.twitter ? '<span>twitter</span>' + | ||
199 | '<a href="http://twitter.com/' + p.twitter + '" target="_blank">' + | ||
200 | p.twitter + '</a>' : ''; | ||
201 | |||
202 | var www = p.www ? '<span>www</span><a href="' + p.www + | ||
203 | '" target="_blank">' + p.www + '</a>' : ''; | ||
204 | |||
205 | var html2 = [gplus, twitter, www].join('<br>'); | ||
206 | |||
207 | document.querySelector('[data-config-contact]').innerHTML = html2; | ||
208 | } else { | ||
209 | for (var i = 0, p; p = presenters[i]; ++i) { | ||
210 | html.push(p.name + ' - ' + p.company); | ||
211 | } | ||
212 | html = html.join('<br>'); | ||
213 | } | ||
214 | |||
215 | document.querySelector('[data-config-presenter]').innerHTML = html; | ||
216 | } | ||
184 | }; | 217 | }; |
185 | 218 | ||
186 | /** | 219 | /** |