Grab videos from YouTube for impressions
Esse commit está contido em:
@@ -133,7 +133,7 @@
|
|||||||
</script>
|
</script>
|
||||||
<script src="/js/vendor/jquery.js"></script>
|
<script src="/js/vendor/jquery.js"></script>
|
||||||
<script src="/js/vendor/jquery-ajax-localstorage-cache.js"></script>
|
<script src="/js/vendor/jquery-ajax-localstorage-cache.js"></script>
|
||||||
<script src="/js/modules.js"></script>
|
<script src="/js/main.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var $win = $(window);
|
var $win = $(window);
|
||||||
var $wrap = $('.header-links-wrap');
|
var $wrap = $('.header-links-wrap');
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
layout: default
|
||||||
|
title: The NodeCopter - Programming flying robots with node.js
|
||||||
|
introTitle: Impressions of NodeCopter events
|
||||||
|
introText: |
|
||||||
|
Some videos and photos of NodeCopter events from all around the world
|
||||||
|
---
|
||||||
|
|
||||||
|
If you want to see your video here, make sure you we can find your video on
|
||||||
|
YouTube when searching for "nodecopter".
|
||||||
|
|
||||||
|
<div class="js-videos"></div>
|
||||||
@@ -115,11 +115,12 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$(function() {
|
var showNpmModules = function() {
|
||||||
|
|
||||||
// which element to append modules to
|
// which element to append modules to
|
||||||
var ul = $('.modules-all');
|
var ul = $('.modules-all');
|
||||||
|
|
||||||
|
if (!ul.length) return;
|
||||||
|
|
||||||
// appends module to the list
|
// appends module to the list
|
||||||
function appendModules(modules) {
|
function appendModules(modules) {
|
||||||
$('.modules-loading').remove();
|
$('.modules-loading').remove();
|
||||||
@@ -154,7 +155,27 @@
|
|||||||
appendModules(modules);
|
appendModules(modules);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var showYouTubeVideos = function() {
|
||||||
|
var $container = $('.js-videos');
|
||||||
|
|
||||||
|
if (!$container.length) return;
|
||||||
|
|
||||||
|
$.getJSON('https://gdata.youtube.com/feeds/api/videos?q=nodecopter&alt=jsonc&v=2&orderby=viewCount', function(videos) {
|
||||||
|
var videoString = '';
|
||||||
|
var tpl = '<iframe width="512" height="288" src="http://www.youtube.com/embed/{{id}}" frameborder="0" allowfullscreen></iframe>';
|
||||||
|
videos.data.items.forEach(function(video) {
|
||||||
|
videoString += tpl.replace('{{id}}', video.id);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.js-videos').append(videoString);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
showNpmModules();
|
||||||
|
showYouTubeVideos();
|
||||||
});
|
});
|
||||||
|
|
||||||
}(window, jQuery));
|
}(window, jQuery));
|
||||||
Referência em uma Nova Issue
Bloquear um usuário