{{ range  $i, $element := sort $.Site.Data.events.events "iso8601" }}
{{ if and (le $i 2) (now.Before (time .iso8601)) }}

<div class="event {{ if eq (mod $i 2) 1 }}odd{{else}}even{{end}}">
  <div class="eventTitle"><a href="{{ .url }}">{{ .title }}</a></div>
  <div class="eventLocation">{{ .where }}</div>
  <div class="eventDate">{{ .when }}</div>
  <div class="eventDetails">{{ .what | markdownify }}</div>
</div>

{{ end }}
{{ end }}
