From 63f647d99c8068d03c37fe11586cc4b7d05338ef Mon Sep 17 00:00:00 2001 From: Kiritan Flux Date: Sat, 21 Jan 2017 14:01:27 +0100 Subject: [PATCH] added video filtering function --- 6_video.html | 43 ++++++++++++++++++++++++++++++++++++++++--- _site/css/video.css | 11 ++++++++++- 2 files changed, 50 insertions(+), 4 deletions(-) diff --git a/6_video.html b/6_video.html index 218c5574..7eb74049 100644 --- a/6_video.html +++ b/6_video.html @@ -6,6 +6,32 @@ visible: false permalink: /video/ --- +{% 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 %} + +
+ + {% for thisTopic in allTopicsABC %} + + {% endfor %} +
+
{% for post in site.posts %} @@ -20,11 +46,10 @@ permalink: /video/ {% assign tags = (talk.topics | split:",") %} {% endif %} -
-
+
{{talk.title}}
-

{{talk.artist}} / {{talk.artist_website}} – {{talk.description}}

+

{{talk.artist}} / {{talk.artist_website}} – #{{ post.number }}: {{talk.description}}

{% endif %} @@ -95,5 +120,17 @@ permalink: /video/ }); }); + $('#video-roster').isotope({ + // options + 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 }); + }); }); diff --git a/_site/css/video.css b/_site/css/video.css index f37491c1..eb362e83 100644 --- a/_site/css/video.css +++ b/_site/css/video.css @@ -1,3 +1,12 @@ +.button-group +{ + margin: 50px 0 30px 0; +} + +button +{ + color: #000; +} #video-roster { background-color:#000; @@ -106,4 +115,4 @@ right:0; background-image:url("/images/close-button-large.png"); background-size:cover; -} \ No newline at end of file +}