Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

70 lines (66 sloc) 2.61 kB
---
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 %}
{% capture site_timestamp %}{{ site.time | date:"%s" }}{% endcapture %}
{% capture event_timestamp %}{{ event.date | date:"%s" | plus:28500 }}{% endcapture %}
{% unless current or event_timestamp < site_timestamp %}
{% 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>
Jump to Line
Something went wrong with that request. Please try again.