blob: b2bde312aa4fa809eaaa717c26c4de86029bdedf [file] [log] [blame]
Scott Main896f61d2013-05-28 17:59:12 -07001fullpage=true
2page.title=Google I/O 13
3@jd:body
Scott Mainda31f2e2012-12-04 18:23:09 -08004<div id="butterbar-wrapper" >
5 <div id="butterbar" >
6 <div id="butterbar-message">
7<a target="_blank" href="https://docs.google.com/a/google.com/forms/d/1EHLPGqhbxj2HungHRRN4_0K9TGpc-Izy-u46vBDgS8Q/viewform">
8 Take the Android Developer Survey</a>
9 </div>
10 </div>
11</div>
12
Scott Main896f61d2013-05-28 17:59:12 -070013<style>
Scott Main896f61d2013-05-28 17:59:12 -070014#ioplayer-frame {
15 z-index:10;
16 width:703px;
17 height:396px;
18 margin:0;
19 position:relative;
20}
21
22#noplayer-message {
23 position:absolute;
24 top:50%;left:0;
25 width:100%;
26 z-index:-1;
27 text-align:center;
28 display:none;
29}
30
31h1 {
32 font-weight:100;
33 font-size:40px;
34 line-height:30px;
35 margin:30px 0 10px 0px;
36 color:#000;
37}
38
39h2 {
40 font-weight:100;
41 font-size:30px;
42 line-height:30px;
43 margin:12px 0 10px 0px;
44 color:#000;
45 float:left;
46 display:block;
47}
48
49.col-4 h2 {
50 margin-top:40px;
51}
52
53ul.videos {
54 list-style:none;
55 margin:0;
56 width:auto;
57}
58ul.videos li {
59 display:block;
60 float:left;
61 position:relative;
62 margin:0 2px 2px 0;
63 background-repeat:no-repeat !important;
64 background-size:320px auto;
65 background-position:10% 50%;
Scott Main25a49f92013-05-30 13:51:08 -070066 z-index:1; /* IE: the description is 2 */
Scott Main896f61d2013-05-28 17:59:12 -070067}
68ul.videos li a {
69 color:#fff !important;
70 display:block;
71 margin:0;
72 padding:8px 12px;
73 width:209px;
74 height:134px;
75 box-shadow:inset 500px 500px 999px rgba(000, 000, 000, 0.2);
76 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgba(0,0,0,0.8)), color-stop(1, transparent));
77 background-image: -webkit-linear-gradient(top, rgba(0,0,0,0.8), transparent);
78 background-image: -moz-linear-gradient(top, rgba(0,0,0,0.8), transparent);
79 background-image: -o-linear-gradient(top, rgba(0,0,0,0.8), transparent);
80 background-image: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
Scott Main25a49f92013-05-30 13:51:08 -070081 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cc000000', endColorstr='#00ffffff',GradientType=0 ); /* IE6-9 */
Scott Main896f61d2013-05-28 17:59:12 -070082}
83ul.videos.featured li {
84 margin:0 0 2px;
85}
86ul.videos.featured li a {
87 margin:0;
88 height:115px;
89}
90ul.videos li a:hover {
91 box-shadow:inset 500px 500px 999px rgba(255,255,255, 0.6);
92}
93ul.videos li h4 {
94 text-shadow:1px 1px 0 rgba(0,0,0,0.8);
95 font-size:18px;
96 line-height:22px;
Scott Main25a49f92013-05-30 13:51:08 -070097 color:#fff;
Scott Main896f61d2013-05-28 17:59:12 -070098 margin:0;
Scott Main25a49f92013-05-30 13:51:08 -070099 height:100%; /* IE: to fill clickable area */
Scott Main896f61d2013-05-28 17:59:12 -0700100}
101
102ul.videos li .description-frame {
103 display:none;
Scott Main25a49f92013-05-30 13:51:08 -0700104 z-index:2; /* IE: the li is 1 */
Scott Main896f61d2013-05-28 17:59:12 -0700105}
106ul.videos li a:hover .description-frame {
107 display:block;
108 position:absolute;
109 top:80px;
110 left:8px;
111 z-index:99;
112}
113ul.videos .description {
114 background:#fff;
115 width:200px;
116 padding:8px;
117 -webkit-border-radius:1px;
118 -moz-border-radius:1px;
119 border-radius:1px;
120 -moz-box-shadow: 0 2px 3px 2px rgba(000,000,000, 0.4);
121 -webkit-box-shadow: 0 2px 3px 2px rgba(000,000,000, 0.4);
122 box-shadow: 0 2px 3px 2px rgba(000,000,000, 0.4);
123 font-size:11px;
124 line-height:12px;
125 color:#000;
126 overflow:hidden;
127}
128ul.videos .arrow-up {
129 position:absolute;
130 left:15px;
131 top:-11px;
132 width:0;
133 height:0;
134 border-bottom:12px solid #fff;
135 border-left:12px solid transparent;
136 border-right:12px solid transparent;
137}
138ul.videos .arrow-down {
139 position:absolute;
140 left:15px;
141 bottom:-11px;
142 width:0;
143 height:0;
144 border-top:12px solid #fff;
145 border-left:12px solid transparent;
146 border-right:12px solid transparent;
147}
148
149ul.videos span.tag {
150 font-size:.9em;
151 font-weight:normal;
152 display: block;
153 position: absolute;
154 bottom: 0;
155 color: #fff;
156 left: 0;
157 padding: 4px;
158 border-top-right-radius:4px;
159 text-transform:uppercase;
160 text-shadow: none;
161}
162ul.videos span.tag.design {
163 background-color:rgba(51, 181, 229, .7);
Scott Main25a49f92013-05-30 13:51:08 -0700164 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cc33b5e5', endColorstr='#cc33b5e5',GradientType=0 ); /* IE6-9 */
Scott Main896f61d2013-05-28 17:59:12 -0700165}
166ul.videos span.tag.develop {
167 background-color:rgba(255, 136, 0, .7);
Scott Main25a49f92013-05-30 13:51:08 -0700168 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ccff8800', endColorstr='#ccff8800',GradientType=0 ); /* IE6-9 */
Scott Main896f61d2013-05-28 17:59:12 -0700169}
170ul.videos span.tag.distribute {
171 background-color:rgba(153, 204, 0, .7);
Scott Main25a49f92013-05-30 13:51:08 -0700172 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cc99cc00', endColorstr='#cc99cc00',GradientType=0 ); /* IE6-9 */
Scott Main896f61d2013-05-28 17:59:12 -0700173}
174
175</style>
176
177
178
179
180
181
182
183<div class="wrap">
184
185 <div class="col-12" style="width:704px;margin:0">
186 <h1>Android @ Google I/O 13</h1>
187 <div id="ioplayer-frame">
188 <div id="noplayer-message">
189 <!-- busted flash player message -->
190 Your video is supposed to appear here.<br/>
191 Make sure you have the <a href="//get.adobe.com/flashplayer/" target="_blank">Flash&reg; Player</a>.
192 </div>
193 <div id="player"><!-- Youtube embeds here... actually replaces this div --></div>
194 </div>
195 </div>
196
197 <div class="col-4" style="margin:0;width:234px;padding:0 0 0 2px">
198 <h2 class="norule">Most Popular</h2>
199 <ul class="videos featured" id="playlist2">
200 </ul>
201 </div>
202</div>
203
204<div class="wrap">
205
206 <div style="position:absolute;width:940px;text-align:right">
207 <a href="//www.youtube.com/AndroidDevelopers" target="_blank">
208 More on YouTube
209 <img src="//www.youtube.com/favicon.ico" style="border:0;width:16px;height:16px;vertical-align:middle;margin:0 2px 3px 2px">
210 </a>
211 </div>
212 <div style="width:944px;overflow:hidden;padding:0 0 20px">
213 <h2 class="norule">All Videos</h2>
214 <ul class="videos" id="playlist1" style="clear:left">
215 <span id="videos-design"></span>
216 <span id="videos-develop"></span>
217 <span id="videos-distribute"></span>
218 </ul>
219 </div>
220
221</div>
222
223<br class="clearfix"/>
224
225
226
227
228
229
230
231
232
233
234
235<script src="//swfobject.googlecode.com/svn/trunk/swfobject/swfobject.js" type="text/javascript"></script>
236<script type="text/javascript">
237
238/* Load a video into the player box.
239 * @param id The YouTube video ID
240 * @param title The video title to display in the player box (character escaped)
241 * @param autoplay Whether to automatically play the video
242 */
243function loadVideo(id, title, autoplay) {
244 var url = '//www.youtube.com/v/' + id + '&rel=1&border=0&fs=1' + (autoplay?'&autoplay=1':'');
245 swfobject.embedSWF(url, 'player', '704', '397', '9.0.0', false, false, {allowfullscreen: 'true'});
Scott Main79bff4c2013-05-29 16:00:19 -0700246 $('body,html').animate({ scrollTop: 0 }, "slow");
Scott Main896f61d2013-05-28 17:59:12 -0700247 setTimeout(function(){$('#noplayer-message').show()}, 2000);
Scott Main896f61d2013-05-28 17:59:12 -0700248}
249
250
251function buildPlaylistDesign(data) {
252 buildPlaylist(data, $('ul#playlist1 #videos-design'), "design");
253}
254
255function buildPlaylistDevelop(data) {
256 buildPlaylist(data, $('ul#playlist1 #videos-develop'), "develop");
257}
258
259function buildPlaylistDistribute(data) {
260 buildPlaylist(data, $('ul#playlist1 #videos-distribute'), "distribute");
261}
262
263function buildPlaylist2(data) {
264 buildPlaylist(data, $('ul#playlist2'));
265}
266
267function buildPlaylist(data, ul, tag) {
268
269 var MAX_DESC_LENGTH = 200; // the length at which we will trim the description
270 var feed = data.feed;
271 var entries = feed.entry || [];
272 var playlistId = feed.yt$playlistId.$t;
273
274 // Loop through each entry (each video) and add it to the '#DevelopersLive' list
275 for (var i = 0; i < entries.length; i++) {
276 var entry = entries[i];
277 var title = entry.title.$t;
278 var id = entry.media$group.yt$videoid.$t;
279 // get 180x320 thumbnail
280 var thumbs = entry.media$group.media$thumbnail;
281 var thumbUrl;
282 for (var j = 0; j < thumbs.length; j++) {
283 if (thumbs[j].yt$name == "hqdefault") {
284 thumbUrl = thumbs[j].url;
285 }
286 }
287
288 // chop out the google io title
289 title = title.substr(title.indexOf("-") + 1, title.length);
290
291 var fullDescription = entry.media$group.media$description.$t;
292 var playerUrl = entry.media$group.media$content[0].url;
293 var shortDescription = fullDescription.substr(0, MAX_DESC_LENGTH);
294 // further shorten description if there's a url (remove it)
295 var httpindex = shortDescription.indexOf("http://");
296 if (httpindex != -1) {
297 shortDescription = shortDescription.substring(0,httpindex);
298 }
299 shortDescription += shortDescription.length == MAX_DESC_LENGTH ? "..." : ""; // add ellipsis if we've chopped the description
300
301 var a = $('<a href="#" id="' + id + '" '
Scott Main25a49f92013-05-30 13:51:08 -0700302 + 'onclick="loadVideo(\'' + id + '\',\'' + escape(title) + '\',true); return false;" />');
Scott Main896f61d2013-05-28 17:59:12 -0700303 var pShortDescription = $('<div class="description-frame"><div class="arrow-up"></div>'
304 + '<div class="description">' + shortDescription + '</div></div>');
305 var h4Title = "<h4>" + title + "</h4>";
Scott Main25a49f92013-05-30 13:51:08 -0700306 var li = $('<li style="background-image:url(\'' + thumbUrl +'\')" />');
Scott Main896f61d2013-05-28 17:59:12 -0700307
308 li.append(a);
309 a.append(h4Title).append(pShortDescription);
310
311 if (tag !== undefined) {
312 var $tag = $('<span class="tag ' + tag + '">' + tag + '</span>');
313 a.append($tag);
314 }
315
316 ul.append(li);
317
318
319 // put the first video in the player
320 if ((tag == "design") && (i == 0)) {
321 loadVideo(id, escape(title), false);
322 }
323 }
324}
325
326
327/* Request the playlist feeds from YouTube */
328function showDevelopersLivePlaylist() {
329 var playlistId = "PLWz5rJ2EKKc-qVhMuAprIFYFbCotdgJKq"; /* IO 13 - Design */
330 $.getScript("//gdata.youtube.com/feeds/api/playlists/"
331 + playlistId +
332 "?v=2&alt=json-in-script&max-results=50&callback=buildPlaylistDesign&orderby=position");
333
334 playlistId = "PLWz5rJ2EKKc9rkwO9yBosRvkQBJd5utmR"; /* IO 13 - Develop */
335 $.getScript("//gdata.youtube.com/feeds/api/playlists/"
336 + playlistId +
337 "?v=2&alt=json-in-script&max-results=50&callback=buildPlaylistDevelop&orderby=position");
338
339 playlistId = "PLWz5rJ2EKKc-1WjgQqL0B4OQtbLfhMlB2"; /* IO 13 - Distribute */
340 $.getScript("//gdata.youtube.com/feeds/api/playlists/"
341 + playlistId +
342 "?v=2&alt=json-in-script&max-results=50&callback=buildPlaylistDistribute&orderby=position");
343
344
345 playlistId = "PLWz5rJ2EKKc9WGUwq2gQ-coU3fSyexgOx"; /* IO 13 - The Android Sessions */
346 $.getScript("//gdata.youtube.com/feeds/api/playlists/"
347 + playlistId +
348 "?v=2&alt=json-in-script&max-results=3&callback=buildPlaylist2&orderby=viewCount");
349}
350
351showDevelopersLivePlaylist();
352
353
354</script>