2017-01-13 18:12:02 +01:00
---
layout: page
title: Video showcase
icon: video
visible: false
permalink: /video/
---
2017-01-21 14:01:27 +01:00
{% assign allTopics = "" | split:"|" %}
{% for post in site.posts %}
{% for talk in post.talks %}
{% if talk.talk_video_url %}
{% for topic in talk.topics %}
{% assign talkTopics = topic | split:"," %}
{% for talkTopic in talkTopics %}
{% assign tt = talkTopic | strip | downcase %}
{% unless allTopics contains tt %}
{% assign allTopics = allTopics | push: tt %}
{% endunless %}
{% endfor %}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
{% assign allTopicsABC = allTopics | sort %}
2017-01-23 11:15:49 +01:00
< div class = "content" >
2017-01-22 22:50:08 +01:00
2017-01-22 19:44:25 +01:00
< div class = "row" >
2017-01-22 22:50:08 +01:00
2017-01-22 19:44:25 +01:00
< div class = "dark_bg col-md-10 col-md-offset-1" >
2017-01-22 22:50:08 +01:00
2017-01-22 19:44:25 +01:00
< div class = "button-group filter-button-group" >
< button data-filter = "*" > show all< / button >
{% for thisTopic in allTopicsABC %}
< button data-filter = ".{{thisTopic | strip | replace: " " , " - " } } " > {{thisTopic | capitalize }}< / button >
{% endfor %}
< / div >
2017-01-21 14:01:27 +01:00
2017-01-23 11:15:49 +01:00
< / div >
< / div >
< div class = "spacer" > < / div >
< div class = "row" >
< div class = "dark_bg col-md-10 col-md-offset-1" >
2017-01-23 10:45:54 +01:00
< div id = "video-roster" class = "container-fluid" >
2017-01-13 18:12:02 +01:00
2017-01-22 19:44:25 +01:00
{% for post in site.posts %}
{% for talk in post.talks %}
{% if talk.talk_video_url %}
{% assign vimeo_id = talk.talk_video_url %}
{% if talk.topics %}
{% assign tags = (talk.topics | split:",") %}
{% endif %}
2017-01-23 12:34:21 +01:00
< div class = "videobox {% for tag in tags | uniq %}{{tag | strip | replace: " " , " - " | downcase } } { % endfor % } { { post . location | strip | replace: " " , " - " | downcase } } col-sm-3 " vimeo = "{{vimeo_id}}" >
2017-01-22 19:44:25 +01:00
< div class = "video-title" > {{talk.artist}}< / div >
2017-01-22 22:50:08 +01:00
< div class = "playbutton" > < / div >
2017-01-22 19:44:25 +01:00
< div class = "video-description" > < h3 > {{talk.title}}< / h3 > < p > < span class = "video-session" > #{{ post.number }}< / span > : < span class = "video-artist" > {{talk.artist}}< / span > / {{talk.artist_website}} – {{talk.description}}< / p > < / div >
< / div >
{% endif %}
{% endfor %}
{% endfor %}
2017-01-21 11:03:02 +01:00
2017-01-22 19:44:25 +01:00
< div id = "videotext" > < / div >
< div id = "videoplayer" >
< div id = "player" > < / div >
< div id = "close-button" > < / div >
< / div >
2017-01-22 22:50:08 +01:00
2017-01-22 19:44:25 +01:00
< / div >
2017-01-13 18:12:02 +01:00
< / div >
2017-01-21 11:03:02 +01:00
2017-01-13 18:12:02 +01:00
< / div > <!-- container -->
< script >
jQuery( document ).ready(function() {
2017-01-22 22:50:08 +01:00
2017-01-13 18:12:02 +01:00
jQuery('.videobox').each(function() {
2017-01-22 22:50:08 +01:00
2017-01-13 18:12:02 +01:00
var $this = jQuery(this);
2017-01-21 20:21:49 +01:00
jQuery.getJSON('https://vimeo.com/api/oembed.json?url=' + encodeURIComponent(jQuery(this).attr('vimeo')), {format: "json"}, function(data) {
$this.css('background', 'url("' + data.thumbnail_url + '")');
2017-01-13 18:12:02 +01:00
$this.css('background-size', 'cover');
2017-01-22 22:50:08 +01:00
$this.css('background-position', 'center center');
2017-01-13 18:12:02 +01:00
});
2017-01-21 11:03:02 +01:00
2017-01-13 18:12:02 +01:00
$this.on('mouseover', function() {
var offset = $this.offset();
var center = jQuery(window).width()/2;
2017-01-22 22:50:08 +01:00
if( offset.left >= center) {
2017-01-13 18:12:02 +01:00
jQuery('#videotext').css('right', '');
jQuery('#videotext').css('left', '20px');
2017-01-22 19:44:25 +01:00
jQuery('#videotext').css('top', '80px');
2017-01-13 18:12:02 +01:00
} else {
jQuery('#videotext').css('left', '');
jQuery('#videotext').css('right', '20px');
2017-01-22 19:44:25 +01:00
jQuery('#videotext').css('top', '80px');
2017-01-13 18:12:02 +01:00
}
2017-01-22 19:44:25 +01:00
2017-01-13 18:12:02 +01:00
jQuery('#videotext').html($this.html());
2017-01-22 22:50:08 +01:00
$this.find(".playbutton").show();
2017-01-13 18:12:02 +01:00
timer = window.setTimeout(function() {
jQuery('#videotext').show(300);
}, 500);
});
$this.on('mouseout', function() {
jQuery('#videotext').hide();
2017-01-22 22:50:08 +01:00
$this.find(".playbutton").hide();
2017-01-13 18:12:02 +01:00
if (timer) {
window.clearTimeout(timer);
}
});
$this.on('click', function() {
jQuery('#videotext').hide();
$this.find("img").hide();
if (timer) {
window.clearTimeout(timer);
}
2017-01-21 20:21:49 +01:00
jQuery.getJSON('https://vimeo.com/api/oembed.json?url=' + encodeURIComponent(jQuery(this).attr('vimeo')), {format: "json"}, function(data) {
var player = jQuery('#videoplayer #player');
player.html(data.html)
player.find( "iframe" ).attr('width', "100%").attr('height', "100%");
var src = player.find( "iframe" ).attr('src');
player.find( "iframe" ).attr('src', src + "?title=0& byline=0& portrait=0& autoplay=1");
});
2017-01-13 18:12:02 +01:00
jQuery('#videoplayer').fadeIn(300);
});
jQuery('#videoplayer').on('click', function() {
jQuery(this).fadeOut(500, function() {
jQuery('#videoplayer #player').html('');
});
});
});
2017-01-21 14:01:27 +01:00
$('#video-roster').isotope({
2017-01-23 11:15:49 +01:00
// options
2017-01-21 14:01:27 +01:00
itemSelector: '.videobox'
});
// init Isotope
var $grid = $('#video-roster').isotope({
});
// filter items on button click
$('.filter-button-group').on( 'click', 'button', function() {
var filterValue = $(this).attr('data-filter');
$grid.isotope({ filter: filterValue });
2017-01-23 11:15:49 +01:00
$('.filter-button-group').find('button').css('background-color', 'black');
$(this).css('background-color', '#5a4b68');
2017-01-21 14:01:27 +01:00
});
2017-01-13 18:12:02 +01:00
});
< / script >