forked from boyney123/evento
-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
84 lines (84 loc) · 3.65 KB
/
index.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
layout: default
cover: 'http://cdn.mtlblog.com/uploads/2014/04/13694776595_4b4c70226b_o.jpg'
ref: index
tagline: "informations wiki"
---
<div class="home">
{% capture currentDate %}{{'now' | date: '%s' }}{% endcapture %}
<div class="tagline">
<p>{{page.tagline}}</p>
</div>
<div class="clearfix">
Celebrez design + diversite en 2017
</div>
<div class="clearfix">
<h1 class="title">Activités à venir</h1>
{% assign activities=site.activities | sort 'date' %}
{% assign refs = nil %}
{% for activity in activities %}
{% assign skip = false %}
{% assign refs_array = refs | strip_newlines | split: "," %}
{% for r in refs_array %}
{% if r == activity.ref %}
{% assign skip = true %}
{% endif %}
{% endfor %}
{% if skip %}
{% continue %}
{% endif %}
{% capture refs %}{{refs}},{{activity.ref}}{% endcapture %}
{% capture blogDate %}{{activity.date | date: '%s' }}{% endcapture %}
{% if blogDate >= currentDate %}
{% capture activity_ref_lang_str %}{% include merge/activity.html act = activity %}{% endcapture %}
{% assign activity_ref_lang = activity_ref_lang_str | strip_newlines | split: "," %}
{% assign activ = site.activities | where: "ref", activity_ref_lang[0] | where: "lang", activity_ref_lang[1] | first %}
<a href="{{ activ.url | prepend: site.baseurl }}">
{% capture activity_cover %}{% include merge.html collection = "activities" ref = activity.ref leaf="cover" default = 'http://evento.io/img/cover.jpg' %}{% endcapture %}
<div class="activity-card" style="background-image:url({{activity_cover}});">
<h2>{{ activ.title }} <span>{{ activ.date | date: "%b %-d, %Y" }}</span></h2>
{% if page.lang == activ.lang %}
<div class='activity-card-overlay'></div>
{% else %}
<div class='activity-card-foreign-overlay'></div>
{% endif %}
</div>
</a>
{% endif %}
{% endfor %}
</div>
<div class="clearfix">
<h1 class="title">Activités passées</h1>
{% assign refs = nil %}
{% for activity in activities reversed %}
{% assign skip = false %}
{% assign refs_array = refs | strip_newlines | split: "," %}
{% for r in refs_array %}
{% if r == activity.ref %}
{% assign skip = true %}
{% endif %}
{% endfor %}
{% if skip %}
{% continue %}
{% endif %}
{% capture refs %}{{refs}},{{activity.ref}}{% endcapture %}
{% capture blogDate %}{{activity.date | date: '%s' }}{% endcapture %}
{% if blogDate < currentDate %}
{% capture activity_ref_lang_str %}{% include merge/activity.html act = activity %}{% endcapture %}
{% assign activity_ref_lang = activity_ref_lang_str | strip_newlines | split: "," %}
{% assign activ = site.activities | where: "ref", activity_ref_lang[0] | where: "lang", activity_ref_lang[1] | first %}
<a href="{{ activ.url | prepend: site.baseurl }}">
{% capture activity_cover %}{% include merge.html collection = "activities" ref = activity.ref leaf="cover" default = 'http://evento.io/img/cover.jpg' %}{% endcapture %}
<div class="activity-card" style="background-image:url({{activity_cover}});">
<h2>{{ activ.title }} <span>{{ activ.date | date: "%b %-d, %Y" }}</span></h2>
{% if page.lang == activ.lang %}
<div class='activity-card-overlay'></div>
{% else %}
<div class='activity-card-foreign-overlay'></div>
{% endif %}
</div>
</a>
{% endif %}
{% endfor %}
</div>
</div>