forked from asyncjs/async-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
67 lines (64 loc) · 2.38 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
---
layout: base
---
{% assign news = site.categories.news %}
{% assign events = site.categories.event %}
{% assign offset = 0 %}
{% for post in news %}
{% capture start_timestamp %}{{ site.time | date:"%s" | minus:2592000 }}{% endcapture %}
{% capture item_timestamp %}{{ post.date | date:"%s" }}{% endcapture %}
{% if item_timestamp > start_timestamp and post.date < site.time %}
<section class="module news" data-timestamp="{{ post.date | date_to_xmlschema }}">
<a href="{{ post.url }}"><strong>News:</strong> {{ post.title }}</a>
</section>
{% endif %}
{% endfor %}
<section class="module event-detail">
<h2 class="module-heading">Next Event:</h2>
{% for event in events reversed %}
{% unless current or event.date < site.time %}
{% assign current = event %}{% assign offset = forloop.rindex %}
{% include partial/event_detail.html %}
{% endunless %}
{% endfor %}
{% if offset == 0 %}
{% assign current = events.first %}
<p class="prose">There are currently no upcoming events, stay tuned for more. You can
follow us on <a href="http://twitter.com/asyncjs">Twitter</a> or
subscribe to the <a href="/feed/">feed</a> for updates.</p>
{% endif %}
</section>
<section class="module">
<section class="column upcoming-events">
<h2 class="module-heading">Upcoming Events:</h2>
<ul class="event-lisiting">
{% assign matches = "0" %}
{% for event in events reversed limit:offset %}
{% if matches < "2" and event.date > current.date %}
<li class="event-item">{% include partial/event_item.html %}</li>
{% capture matches %}{{ matches | plus:1 }}{% endcapture %}
{% endif %}
{% endfor %}
{% if matches == "0" %}
<li class="empty">No further events are currently scheduled</li>
{% endif %}
</ul>
<p class="read-more"><a href="/events/">View all events</a></p>
</section>
<section class="column past-events">
<h2 class="module-heading">Past Events:</h2>
<ul class="event-lisiting">
{% assign matches = "0" %}
{% for event in events %}
{% if event.date < current.date and matches < "2" %}
<li class="event-item">{% include partial/event_item.html %}</li>
{% capture matches %}{{ matches | plus:1 }}{% endcapture %}
{% endif %}
{% endfor %}
{% if matches == "0" %}
<li class="empty">There are no past events</li>
{% endif %}
</ul>
<p class="read-more"><a href="/events/">View all events</a></p>
</section>
</section>