From e32d9b2925334a38ec785d1c571113ce54d19b3f Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 27 Oct 2016 07:08:45 +0100 Subject: [PATCH] Use a table for talks listing --- source/_partials/talks-table.html.twig | 26 +++++++ source/_partials/talks/listing-item.html.twig | 8 --- source/talks.html.twig | 70 +++++++------------ 3 files changed, 51 insertions(+), 53 deletions(-) create mode 100644 source/_partials/talks-table.html.twig delete mode 100644 source/_partials/talks/listing-item.html.twig diff --git a/source/_partials/talks-table.html.twig b/source/_partials/talks-table.html.twig new file mode 100644 index 00000000..e9ecabc7 --- /dev/null +++ b/source/_partials/talks-table.html.twig @@ -0,0 +1,26 @@ + + + + + + + + + + {% for talk in talks %} + + + + + + + + {% endfor %} + +
DateTalkEvent
+ {{ talk.date|date(site.default_date_format) }} + + + {{ talk.title }} + + {{ talk.event.name }}
diff --git a/source/_partials/talks/listing-item.html.twig b/source/_partials/talks/listing-item.html.twig deleted file mode 100644 index f97c1e69..00000000 --- a/source/_partials/talks/listing-item.html.twig +++ /dev/null @@ -1,8 +0,0 @@ -
  • - {{ talk.event.name }} - - {% if talk.fuzzy_date %} - {{ talk.title }} - {% else %} - {{ talk.title }} - {% endif %} -
  • diff --git a/source/talks.html.twig b/source/talks.html.twig index c8deedd2..ef1d48e5 100644 --- a/source/talks.html.twig +++ b/source/talks.html.twig @@ -12,53 +12,33 @@ use:

    There is also information about events that I’ve attended and spoken at on my Lanyrd and Joind.in profiles.

    -{% set found = false %} -{% set year = 0 %} {% set now = 'now'|date('U') %} -{% for talk in data.talks|reverse if talk.date >= now %} - {% if loop.first %} - {% set found = true %} +{% include "talks-table" with { talks: data.talks } %} -

    Upcoming Talks

    - {% endif %} +