Move talks back into one template

This commit is contained in:
Oliver Davies 2016-01-28 21:47:30 +00:00
parent f483b373a6
commit f91788120a
5 changed files with 64 additions and 69 deletions

View file

@ -1,23 +0,0 @@
{% set year = 0 %}
{% for talk in data.talks if date(talk.date) < date('today') %}
{% if loop.first %}
<h2>Previous Talks</h2>
{% endif %}
{% if talk.date|date('Y') != year %}
{% set year = talk.date|date('Y') %}
</ul>
<h3>{{ year }}</h3>
<ul>
{% endif %}
<li>
{{- include('talk-listing-item') -}}
</li>
{% endfor %}
{% if year != 0 %}
</ul>
{% endif %}

View file

@ -1,6 +1,8 @@
{{ talk.event.name }} - <li>
{% if talk.fuzzy_date %} {{ talk.event.name }} -
{% if talk.fuzzy_date %}
{{ talk.title }} {{ talk.title }}
{% else %} {% else %}
<a href="{{ talk.url }}">{{ talk.title }}</a> <a href="{{ talk.url }}">{{ talk.title }}</a>
{% endif %} {% endif %}
</li>

View file

@ -1,23 +0,0 @@
{% set year = 0 %}
{% for talk in data.talks if date(talk.date) >= date('today') %}
{% if loop.first %}
<h2>Upcoming Talks</h2>
{% endif %}
{% if talk.date|date('Y') != year %}
{% set year = talk.date|date('Y') %}
</ul>
<h3>{{ year }}</h3>
<ul>
{% endif %}
<li>
{{- include('talk-listing-item') -}}
</li>
{% endfor %}
{% if year != 0 %}
</ul>
{% endif %}

56
source/talks.html.twig Normal file
View file

@ -0,0 +1,56 @@
---
layout: default
nav: talks
title: Talks
meta:
description: 'Information about previous and upcoming talks that Oliver has presented at conferences and user groups'
use:
- talks
---
<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="mailto:{{ site.email }}?subject=Speaking%20enquiry">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 found = false %}
{% set year = 0 %}
{% set now = 'now'|date_modify('-2 days')|date('U') %}
{% for talk in data.talks if talk.date >= now %}
{% if loop.first %}
{% set found = true %}
<h2>Upcoming Talks</h2>
{% endif %}
{% if talk.date|date('Y') != year %}
{% set year = talk.date|date('Y') %}
</ul>
<h3>{{ year }}</h3>
<ul>
{% endif %}
{{ include('talk-listing-item') }}
{% endfor %}
{% if found %}
</ul>
{% endif %}
{% set found = false %}
{% set year = 0 %}
{% for talk in data.talks if talk.date < now %}
{% if loop.first %}
{% set found = true %}
<h2>Previous Talks</h2>
{% endif %}
{% if talk.date|date('Y') != year %}
{% set year = talk.date|date('Y') %}
</ul>
<h3>{{ year }}</h3>
<ul>
{% endif %}
{{ include('talk-listing-item') }}
{% endfor %}
{% if found %}
</ul>
{% endif %}

View file

@ -1,17 +0,0 @@
---
layout: default
nav: talks
title: Talks
meta:
description: 'Information about previous and upcoming talks that Oliver has presented at conferences and user groups'
use:
- talks
---
# Talks
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="mailto:{{ site.email }}?subject=Speaking%20enquiry">get in touch</a>.
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.
{{ include('upcoming-talks') }}
{{ include('previous-talks') }}