-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathexpo.html
70 lines (56 loc) · 2.07 KB
/
expo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
layout: container
title: Expo
---
<h1 class="text-center text-red">EXHIBITION</h1>
{%- include bg-items-white.html -%}
<div class="text-center my-5 position-relative">
<p>
FABxLive invites all of the Fab Lab Network to participate in our virtual Exhibition that will showcase outstanding projects developed by the Fab Lab Community in the past 16 years. Have you done an amazing Academany project that you would like to exhibit? Did you develop a unique open-source machine in your lab? All projects are welcome, it doesn´t matter how far back you’ve developed it!
</p>
<a class="btn bg-red" href="https://docs.google.com/forms/d/e/1FAIpQLSdKb4Wxd8TvFMeIS25vvry4iDWFByWByYxUxjvmtJ4pZxvaYg/viewform" target="_blank">
Submit your project and be part of the Fab legacy!
</a>
</div>
<div class="text-center my-5">
{% assign all_tags = site.data.expo | map: 'tags' | uniq %}
{% for item in all_tags %}
<a href="#/"
id="{{ item | slugify }}"
onClick="toggleTags('{{ item | slugify }}')"
class="badge badge-info">{{ item }}</a>
{% endfor %}
</div>
<section class="card-columns">
<!-- add new expo in _data/expo.yml -->
{% for item in site.data.expo %}
<article class="card">
<img class="card-img-top" src="/uploads/{{ item.picture }}" alt="{{item.title}}"/>
<div class="card-body">
<h5 class="card-title">
{{ item.title }}
</h5>
<p class="card-text">
{{ item.text }}
</p>
<!-- If multiple tags -->
{% for tag in item.tags %}
<small class="badge badge-info {{tag | slugify }}">{{ tag }}</small>
{% endfor %}
</div>
</article>
{% endfor %}
</section>
<script charset="utf-8">
function toggleTags(tag) {
// Change the badge when click
document.getElementById(tag).classList.toggle('badge-info');
// Hide the cards
cards = document.getElementsByClassName(tag);
//console.log(tag, cards.length);
Array.from(cards).forEach(function(item) {
//console.log(item);
item.parentElement.parentElement.classList.toggle('d-none')
});
}
</script>