This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
oliverdavies.uk-old-sculpin/source/talks.twig

89 lines
2.3 KiB
Twig
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
layout: default
title: Talks
meta:
description: 'Information about previous and upcoming talks that Oliver has presented at conferences and user groups'
use:
- talks
---
{% block body_classes 'page--talks page--talks__list' %}
{% block content %}
<h1>Talks</h1>
<p>I regularly speak at conferences and user groups about a range of subjects including Drupal, Sculpin and Git. If
you would like to me to speak at your group or conference, please <a href="/contact/">get in touch</a>.</p>
<p>There is also information about events that Ive attended and spoken at on my
<a href="{{ site.lanyrd.url }}">Lanyrd</a> and <a href="{{ site.joindin.url }}">Joind.in</a> profiles.</p>
{% set now = 'now'|date('U') %}
{% set talks = data.talks|reverse %}
{% set found = false %}
{% set year = '0' %}
{% set new_year = false %}
{% for talk in talks if talk.date >= now %}
{% if loop.first %}
<h2>Upcoming Talks</h2>
{% endif %}
{% set this_year %}{{ talk.date|date('Y') }}{% endset %}
{% if this_year != year %}
{% if new_year %}
{# Close the list for the previous year. #}
</ul>
{% endif %}
{% set found = true %}
{% set year = this_year %}
<h3>{{ this_year }}</h3>
<ul>
{% else %}
{% set new_year = true %}
{% endif %}
{% include 'talk_listing_item' %}
{% endfor %}
{% if found %}
</ul>
{% endif %}
{% set found = false %}
{% set year = '0' %}
{% set new_year = false %}
{% for talk in talks|reverse if talk.date < now %}
{% if loop.first %}
<h2>Previous Talks</h2>
{% endif %}
{% set this_year %}{{ talk.date|date('Y') }}{% endset %}
{% if this_year != year %}
{% if new_year %}
{# Close the list for the previous year. #}
</ul>
{% endif %}
{% set year = this_year %}
{% set found = true %}
<h3>{{ this_year }}</h3>
<ul>
{% else %}
{% set new_year = true %}
{% endif %}
{% include 'talk_listing_item' %}
{% endfor %}
{% if found %}
</ul>
{% endif %}
{% endblock %}