Update and rename talks.twig to talks.html.twig

This commit is contained in:
Oliver Davies 2015-09-10 08:28:23 +01:00
parent 9f537eb676
commit cd93e18026
2 changed files with 78 additions and 91 deletions

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

@ -0,0 +1,78 @@
---
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="/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 = 'today'|date('U') %}
{% set talks = data.talks %}
{% set found, year, new_year = false, '0', 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, year = true, this_year %}
<h3>{{ this_year }}</h3>
<ul>
{% else %}
{% set new_year = true %}
{% endif %}
{% include 'talk_listing_item' %}
{% endfor %}
{% if found %}
</ul>
{% endif %}
{% set found, year, new_year = false, '0', false %}
{% for talk in talks 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, found = this_year, true %}
<h3>{{ this_year }}</h3>
<ul>
{% else %}
{% set new_year = true %}
{% endif %}
{% include 'talk_listing_item' %}
{% endfor %}
{% if found %}
</ul>
{% endif %}

View file

@ -1,91 +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'
#talks:
# - { date: 2012-09-05, location: <a href="http://unifieddiff.co.uk">Unified Diff</a>, title: '<a href="https://vimeo.com/49827006">So, Whats This Drupal Thing?</a>' }
# - { date: 2013-07-10, location: <a href="https://groups.drupal.org/wales-uk">SWDUG</a> (South Wales Drupal user group), title: Drupal and the LDAP Module }
# - { date: 2014-03-01, location: <a href="http://drupalcamplondon.co.uk">DrupalCamp London</a>, title: '<a href="https://speakerdeck.com/opdavies/never-commit-to-master-an-introduction-to-git-flow">Never Commit to Master: An Introduction to Git Flow</a>' }
# - { date: 2014-07-02, location: <a href="http://www.drupalbristol.org.uk">Drupal Bristol user group</a>, title: <a href="https://speakerdeck.com/opdavies/drush-make-drupalbristol">drush make drupalbristol</a> }
# - { date: 2014-08-19, location: SWDUG, title: About the Drupal Association }
# - { date: 2015-01-18, location: <a href="http://www.drupalcampbrighton.co.uk">DrupalCamp Brighton</a>, title: "Drupal.org in 2015: What's Coming Next" }
# - { date: 2015-02-28, location: DrupalCamp London, title: "Drupal.org in 2015: What's Coming Next" }
# - { date: 2015-04-08, location: <a href="http://phpsw.uk">PHPSW</a>, title: <a href="https://joind.in/talk/view/14380">Drupal 8</a> (lightning talk) }
# - { date: 2015-07-25, location: <a href="http://drupalcampnorth.org">DrupalCamp North</a>, title: <a href="https://speakerdeck.com/opdavies/test-drive-twig-with-sculpin">Test Drive Twig with Sculpin</a> }
# - { date: 2015-08-25, location: '<a href="http://www.umbristol.co.uk">umBristol</a> (Bristol Umbraco user group)', title: '<a href="https://speakerdeck.com/opdavies/umbristol-dancing-for-drupal">Dancing for Drupal</a> (CMS Dance-Off)' }
# - { date: 2015-11-01, location: <a href="http://www.accessiblebristol.org.uk">Accessible Bristol</a>, title: Accessible Drupal, fuzzy_date: true }
# - { date: 2015-11-01, location: Unified Diff, title: Building Static Websites with Sculpin, fuzzy_date: true }
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="/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 = 'today'|date('U') %}
{% set talks = data.talks %}
{% set found, year, new_year = false, '0', 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, year = true, this_year %}
<h3>{{ this_year }}</h3>
<ul>
{% else %}
{% set new_year = true %}
{% endif %}
{% include 'talk_listing_item' %}
{% endfor %}
{% if found %}
</ul>
{% endif %}
{% set found, year, new_year = false, '0', false %}
{% for talk in talks 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, found = this_year, true %}
<h3>{{ this_year }}</h3>
<ul>
{% else %}
{% set new_year = true %}
{% endif %}
{% include 'talk_listing_item' %}
{% endfor %}
{% if found %}
</ul>
{% endif %}