Refactor events and talks

This commit is contained in:
Oliver Davies 2017-07-09 09:15:27 +01:00
parent af663e2397
commit 20c8f2d834
29 changed files with 309 additions and 251 deletions

View file

@ -1,3 +1,6 @@
.bg-red
background: red
body
padding-top: 60px

View file

@ -16,6 +16,6 @@
.list-style-none
list-style: none
@each $value in 'block' 'inline' 'inline-block'
@each $value in 'block', 'inline', 'inline-block'
.display-#{$value}
display: #{$value}

View file

@ -3,13 +3,6 @@
& > tbody > tr > td
vertical-align: middle
.column-date,
.column-event
width: 200px
.column-feedback
width: 125px
.talk-type,
.event-location
display: block

View file

@ -1,80 +1,191 @@
events:
drupal-bristol:
title: Drupal Bristol
location: 'Bristol, UK'
url: 'https://www.drupalbristol.org.uk'
events:
drupal-bristol:
name: Drupal Bristol
location: Bristol, UK
website: https://www.drupalbristol.org.uk
drupalcamp-brighton-15:
title: DrupalCamp Brighton 2015
location: 'Brighton, UK'
url: ~
drupalcamp-brighton-15:
name: DrupalCamp Brighton 2015
location: Brighton, UK
website: ~
drupalcamp-bristol-16:
title: DrupalCamp Bristol 2016
location: 'Bristol, UK'
url: 'https://www.drupalcampbristol.org.uk'
drupalcamp-bristol-16:
name: DrupalCamp Bristol 2016
location: Bristol, UK
website: https://2016.drupalcampbristol.org.uk
drupalcamp-london-14:
title: DrupalCamp London 2014
location: 'London, UK'
url: ~
drupalcamp-london-14:
name: DrupalCamp London 2014
location: London, UK
website: ~
drupalcamp-london-15:
title: DrupalCamp London 2015
location: 'London, UK'
url: ~
drupalcamp-london-15:
name: DrupalCamp London 2015
location: London, UK
website: ~
drupalcamp-london-16:
title: DrupalCamp London 2016
location: 'London, UK'
url: ~
drupalcamp-london-16:
name: DrupalCamp London 2016
location: London, UK
website: ~
drupalcamp-london-17:
title: DrupalCamp London 2017
location: 'London, UK'
url: 'https://drupalcamp.london'
drupalcamp-london-17:
name: DrupalCamp London 2017
location: London, UK
website: http://drupalcamp.london
drupalcamp-north-15:
title: DrupalCamp North 2015
location: 'Sunderland, UK'
url: 'http://drupalcampnorth.org'
drupalcamp-north-15:
name: DrupalCamp North 2015
location: Sunderland, UK
website: http://drupalcampnorth.org
nomad_php:
title: Nomad PHP
location: Online
url: 'https://nomadphp.com'
nomad-php:
name: Nomad PHP
location: Online
website: https://nomadphp.com
nwdug:
title: NWDUG
location: 'Manchester, UK'
url: 'http://nwdrupal.org.uk'
nwdug:
name: NWDUG
location: Manchester, UK
website: http://nwdrupal.org.uk
phpnw-17:
title: PHP North West 2017
location: 'Manchester, UK'
url: 'http://conference.phpnw.org.uk/phpnw17'
phpnw17:
name: PHP North West 2017
location: Manchester, UK
website: http://conference.phpnw.org.uk/phpnw17
phpsc-16:
title: PHP South Coast 2016
location: 'Portsmouth, UK'
url: 'http://2016.phpsouthcoast.co.uk'
phpsc16:
name: PHP South Coast 2016
location: Portsmouth, UK
website: http://2016.phpsouthcoast.co.uk
phpsw:
title: PHPSW
location: 'Bristol, UK'
url: 'https://phpsw.uk'
phpsw:
name: PHPSW
location: Bristol, UK
website: https://phpsw.uk
swdug:
title: SWDUG
location: 'Cardiff, UK'
url: ~
swdug:
name: SWDUG
location: Cardiff, UK
website: ~
udiff:
title: Unified Diff
location: 'Cardiff, UK'
url: 'http://unifieddiff.co.uk'
umbristol:
name: umBristol
location: Bristol, UK
website: http://umbristol.co.uk
umbristol:
title: umBristol
location: 'Bristol, UK'
url: 'http://umbristol.co.uk'
unifieddiff:
name: 'unified.diff'
location: Cardiff, UK
website: http://unifieddiff.co.uk
dates:
- event: unifieddiff
date: '2012-09-05'
talk: what-is-this-drupal-thing
- event: swdug
date: '2013-07-10'
talk:
title: Drupal and the LDAP Module
type: Talk
- event: drupalcamp-london-14
date: '2014-03-01'
talk: git-flow
- event: drupal-bristol
date: '2014-08-19'
talk: drush-make-drupalbristol
- event: swdug
date: '2014-08-19'
talk:
title: About the Drupal Association
type: Talk
- event: drupalcamp-brighton-15
date: '2015-01-18'
talk: drupalorg-2015
- event: drupalcamp-london-15
date: '2015-02-28'
talk: drupalorg-2015
- event: phpsw
date: '2015-04-08'
talk: drupal-8
- event: drupalcamp-north-15
date: '2015-07-25'
talk: test-drive-twig-with-sculpin
- event: umbristol
date: '2015-08-25'
talk: dancing-for-drupal
- event: phpsw
date: '2015-10-14'
talk: sculpin
feedback: https://joind.in/talk/view/15486
- event: drupalcamp-london-16
date: '2016-03-05'
talk: drupal-8-module-development
- event: nwdug
date: '2016-03-08'
talk: drupal-vm-generator
- event: drupal-bristol
date: '2016-04-02'
talk: drupal-vm-generator
- event: phpsc16
date: '2016-06-11'
talk: drupal-8-rejoining-the-herd
feedback: https://joind.in/talk/41d0f
- event: drupalcamp-bristol-16
date: '2016-07-23'
talk: drupal-vm-meet-symfony-console
- event: phpsw
date: '2016-11-09'
talk: drupal-development-with-composer
- event: drupal-bristol
date: '2016-11-17'
talk: goodbye-drush-make-hello-composer
- event: drupal-bristol
date: '2017-01-18'
talk: getting-your-data-into-drupal-8
- event: phpsw
date: '2016-02-08'
talk: it-all-started-with-a-patch
feedback: https://joind.in/event/phpsw-new-skills-february-17/it-started-with-a-patch
- event: drupalcamp-london-17
date: '2017-03-04'
time: '16:15 - 17:00'
talk: test-driven-drupal-simpletest-phpunit
- event: drupalcamp-london-17
date: '2017-03-04'
time: '12:05 - 12:50'
talk: getting-your-data-into-drupal-8
- event: nomad-php
date: '2017-04-20'
time: '19:00 (CET)'
talk:
id: deploying-php-with-fabric
type: Lightning talk
- event: phpnw17
date: '2017-10-01'
fuzzy_date: yes
talk: deploying-php-with-fabric

View file

@ -1,75 +1,63 @@
<div class="table-responsive">
<table class="talk-event-table table table-striped">
<table class="table table-striped">
<thead>
<tr>
<th class="column-date">Date</th>
{% if not hide_talk %}<th>Talk</th>{% endif %}
<th class="column-event">Event</th>
{% if not hide_feedback %}<th class="column-feedback">Feedback</th>{% endif %}
<th style="width: 20%">Date</th>
{% if not talk_page %}<th style="width: 40%">Talk</th>{% endif %}
<th>Event</th>
{% if not upcoming %}<th style="width: 10%">Feedback</th>{% endif %}
</tr>
</thead>
<tbody>
{% for event in events %}
{% for row in events %}
{% set talk = false %}
{% set key = row.date.talk.id ?: row.date.talk %}
{% for item in row.talks if key == item.filename|split('.')|first %}
{% set talk = item %}
{% endfor %}
<tr>
<td class="column-date">
<div class="event-date display-block">
{% if event.fuzzy_date %}
{{ event.date|date('F Y') }}
{% else %}
{{ event.date|date('j F Y') }}
{% endif %}
</div>
{% if event.time %}
<small class="talk-type">
{{ event.time }}
</small>
<td>
{{ row.date.date|date(row.date.fuzzy_date ? 'F Y' : 'j F Y') }}
{% if row.date.time %}
<small class="display-block">{{ row.date.time }}</small>
{% endif %}
</td>
{% if not hide_talk %}
{% if not talk_page %}
<td>
<div class="display-block">
{% if not event.talk.hide_page %}
<a href="{{ event.talk.url }}">
{{ event.talk.title }}
</a>
{% else %}
{{ event.talk.title }}
{% endif %}
</div>
{% if event.talk.type %}
<small class="talk-type">
{{ event.talk.type }}
</small>
{% if row.date.talk.title is defined %}
{{ row.date.talk.title }}
{% else %}
<a href="{{ talk.url }}">{{ talk.title }}</a>
{% endif %}
<small class="display-block">
{{ row.date.talk.type ?: talk.type }}
</small>
</td>
{% endif %}
<td class="column-event">
<div class="display-block">
{% if event.url %}<a href="{{ event.url }}">{% endif %}
{{ event.title }}
{% if event.url %}</a>{% endif %}
</div>
{% if event.location %}
<small class="event-location">
{{- event.location -}}
</small>
<td>
{% if row.event.website %}
<a href="{{ row.event.website }}">
{{ row.event.name }}
</a>
{% else %}
{{ row.event.name }}
{% endif %}
<small class="display-block">
{{ row.event.location }}
</small>
</td>
{% if not hide_feedback -%}
<td class="column-feedback">
{% if event.talk.joindin %}
<a href="{{ event.talk.joindin }}" class="btn btn-primary" title="Read or leave feedback for this talk">
{% if not upcoming %}
<td>
{% if row.date.feedback %}
<a href="{{ row.date.feedback }}" class="btn btn-primary" title="Read or leave feedback for this talk">
<i class="fa fa-comment-o"></i> joind.in
</a>
{% endif %}
</td>
{%- endif %}
{% endif %}
</tr>
{% endfor %}
</tbody>

View file

@ -1,4 +1,5 @@
---
id: dancing-for-drupal
title: Dancing for Drupal
type: Talk
slides:
@ -6,8 +7,6 @@ slides:
embed: <script async class="speakerdeck-embed" data-id="ffa9b6dea6dc4a8eb207b9982ed6e1bd" data-ratio="1.33333333333333" src="//speakerdeck.com/assets/embed.js"></script>
tags: [meetup, umbristol, drupal]
tweets: yes
events:
- { id: umbristol, date: '2015-08-25' }
---
As part of their [CMS Dance-Off][1], I was selected to speak about Drupal alongside other speakers representing Umbraco, Sitecore and Episerver.

View file

@ -1,4 +1,5 @@
---
id: deploying-php-with-fabric
title: Deploying PHP Applications with Fabric
type: Talk
slides:
@ -18,9 +19,6 @@ meta:
width: 1280
height: 800
type: image/png
events:
- { id: nomad_php, date: '2017-04-20', time: '19:00 (CET)' }
- { id: phpnw-17, date: '2017-09', fuzzy_date: true }
---
Youve built your application, and now you just need to deploy it. There are various ways that this could be done from (S)FTP, to SCP and rsync, to running commands like “git pull” and “composer install” directly on the server (not recommended).

View file

@ -1,4 +1,5 @@
---
id: drupal-8-module-development
title: Getting Started with Drupal 8 Module Development
type: Talk
tags: [conference, php, drupal, drupalcamp, drupal-8]
@ -18,9 +19,6 @@ meta:
type: 'image/png'
height: 540
width: 960
events:
- { id: drupalcamp-london-16, date: '2016-03-05' }
---
New to object-orientated PHP, Symfony or YAML, and want to get started building modules in Drupal 8? This is the session for you!

View file

@ -1,13 +1,11 @@
---
id: drupal-8-rejoining-the-herd
title: Drupal 8: Rejoining the Herd
type: Talk
joindin: https://joind.in/talk/41d0f
tags: [conference, php, drupal, drupal-8]
slides:
url: https://speakerdeck.com/opdavies/drupal-rejoining-the-herd
embed: <script async class="speakerdeck-embed" data-id="440fd6592f474741bc606c96bc32c104" data-ratio="1.37081659973226" src="//speakerdeck.com/assets/embed.js"></script>
events:
- { id: phpsc-16, date: '2016-06-11' }
---
[Drupal 8][0] was (finally) released on November 19th 2015, after almost 4 years of work and code commits by over 3,200 different contributors. Whilst its pretty much the same as the Drupal that we know and, hopefully, love, a lot has changed behind the scenes and under the hood!

View file

@ -1,4 +1,5 @@
---
id: drupal-8
title: Drupal 8
type: Lightning talk
slides:
@ -7,11 +8,8 @@ slides:
video:
url: https://www.youtube.com/watch?v=36zCxPrOOzM
embed: <iframe width="560" height="315" src="https://www.youtube.com/embed/36zCxPrOOzM" frameborder="0" allowfullscreen></iframe>
joindin: https://joind.in/talk/view/14380
tags: [meetup, phpsw, drupal, drupal-8]
tweets: yes
events:
- { id: phpsw, date: '2015-04-08' }
---
This was a ten minute lightning talk, designed to highlight the major changes coming in Drupal 8.

View file

@ -1,10 +0,0 @@
---
title: About the Drupal Association
type: Talk
tags: [meetup, swdug, drupal, drupal-association]
slug: drupal-association
events:
- { id: swdug, date: '2014-08-19' }
hide_page: true
---
An impromptu talk about the [Drupal Association](https://association.drupal.org), and what Ive been working on since joining the Engineering team earlier in the year.

View file

@ -1,4 +1,5 @@
---
id: drupal-development-with-composer
title: Modern Drupal Development with Composer
type: Lightning talk
tags: ['meetups', 'phpsw', 'drupal', 'composer']
@ -8,8 +9,6 @@ slides:
video:
url: https://www.youtube.com/watch?v=Yi_FPI3xHwc
embed: '<iframe width="560" height="315" src="https://www.youtube.com/embed/Yi_FPI3xHwc" frameborder="0" allowfullscreen></iframe>'
events:
- { id: phpsw, date: '2016-11-09' }
---
Building a Drupal application? You no longer need to download archives to add new modules or update core, or deal with Drupal specific tools to manage your codebase.

View file

@ -1,10 +0,0 @@
---
title: Drupal and the LDAP Module
type: Talk
tags: [meetup, swdug, drupal, ldap]
slug: drupal-ldap
logo: assets/images/talks/logos/swdug.png
events:
- { id: swdug, date: '2013-07-10' }
hide_page: true
---

View file

@ -1,4 +1,5 @@
---
id: drupal-vm-generator
title: Drupal VM Generator
type: Lightning talk
code: https://github.com/opdavies/drupal-vm-generator
@ -9,9 +10,6 @@ slides:
video:
url: https://youtu.be/U1pbKAAO2Wo?t=3696
embed: <iframe width="560" height="315" src="https://www.youtube.com/embed/U1pbKAAO2Wo?start=3696" frameborder="0" allowfullscreen></iframe>
events:
- { id: nwdug, date: '2016-03-08' }
- { id: drupal-bristol, date: '2016-04-02' }
---
An short talk about the [Drupal VM Generator][1] project.

View file

@ -1,4 +1,5 @@
---
id: drupal-vm-meet-symfony-console
title: Drupal VM, Meet Symfony Console
type: Talk
tags: [conference, php, drupal-vm, symfony]
@ -6,8 +7,6 @@ slides:
url: https://speakerdeck.com/opdavies/drupal-vm-meet-symfony-console
embed: <script async class="speakerdeck-embed" data-id="56c79770f73f4e47a542a30243437c49" data-ratio="1.37081659973226" src="//speakerdeck.com/assets/embed.js"></script>
image: drupal-vm-meet-symfony-console.png
events:
- { id: drupalcamp-bristol-16, date: '2016-07-23' }
---
_TL;DR - Come and learn about Symfony Console, with examples from a real-world project._

View file

@ -1,11 +1,9 @@
---
id: drupalorg-2015
title: Drupal.org in 2015: What's Coming Next
type: Talk
tags: [conference, drupalcamp, drupalcamp-london, drupal-association]
slides:
url: https://speakerdeck.com/opdavies/drupal-dot-org-in-15
embed: <script async class="speakerdeck-embed" data-id="0cf8d7b647c94ae289e9db2b46a9e8f2" data-ratio="1.77777777777778" src="//speakerdeck.com/assets/embed.js"></script>
events:
- { id: drupalcamp-brighton-15, date: '2015-01-18' }
- { id: drupalcamp-london-15, date: '2015-02-28' }
---

View file

@ -1,10 +1,9 @@
---
id: drush-make-drupalbristol
title: drush make drupalbristol
type: Talk
slides:
url: https://speakerdeck.com/opdavies/drush-make-drupalbristol
embed: <script async class="speakerdeck-embed" data-id="42605700f102013198de5a5f6f23ab67" data-ratio="1.29456384323641" src="//speakerdeck.com/assets/embed.js"></script>
tags: [meetup, drupal, drupal-bristol, drush, drush-make]
events:
- { id: drupal-bristol, date: '2014-07-02' }
---

View file

@ -1,4 +1,5 @@
---
id: getting-your-data-into-drupal-8
title: Getting (Your Data) Into Drupal 8
type: Talk
slides:
@ -18,9 +19,6 @@ meta:
width: 2560
height: 1440
type: image/png
events:
- { id: drupal-bristol, date: '2017-01-18' }
- { id: drupalcamp-london-17, date: '2017-03-04', time: '12:05 - 12:50' }
---
If youve moved a site from Drupal 6 to 7, the chances are that youve either used the upgrade path to update your old site in-place, or you built a new site from scratch and used the Migrate module from contrib to migrate your data from the old database.

View file

@ -1,4 +1,5 @@
---
id: git-flow
title: Never Commit to Master - An Introduction to Git Flow
type: Talk
slides:
@ -10,6 +11,4 @@ video:
tags: [conference, drupalcamp, drupalcamp-london, git, git-flow]
slug: git-flow
tweets: yes
events:
- { id: drupalcamp-london-14, date: '2014-03-01' }
---

View file

@ -1,12 +1,11 @@
---
id: goodbye-drush-make-hello-composer
title: Goodbye Drush Make. Hello Composer!
type: Talk
tags: ['meetup', 'drupal', 'composer']
slides:
url: http://bit.ly/slides-goodbye-drush-make-hello-composer2
embed: '<script async class="speakerdeck-embed" data-id="1c1e0e129ab34816bd4c4edb5f6642c2" data-ratio="1.37081659973226" src="//speakerdeck.com/assets/embed.js"></script>'
events:
- { id: drupal-bristol, date: '2016-11-17' }
---
One of the main outcomes of Drupal 8 was “getting off the island” with third-party code included in core and adopting modern best practices from the wider PHP ecosystem - including [Composer][1], PHPs dependency manager.

View file

@ -1,4 +1,5 @@
---
id: it-all-started-with-a-patch
title: It All Started With A Patch
type: Lightning talk
tags: [meetup, phpsw, open-source]
@ -8,8 +9,5 @@ slides:
video:
url: https://www.youtube.com/watch?v=5FYMRR61sdo
embed: '<iframe width="560" height="315" src="https://www.youtube.com/embed/5FYMRR61sdo" frameborder="0" allowfullscreen></iframe>'
joindin: https://joind.in/event/phpsw-new-skills-february-17/it-started-with-a-patch
events:
- { id: phpsw, date: '2017-02-08' }
---
A crash course of why and how to get involved with open source.

View file

@ -1,18 +1,16 @@
---
id: sculpin
title: Building Static Websites with Sculpin
type: Lightning talk
slides:
url: https://speakerdeck.com/opdavies/building-static-websites-with-sculpin
embed: <script async class="speakerdeck-embed" data-id="6c9c4be1a1344f1291ff13a391674a66" data-ratio="1.37081659973226" src="//speakerdeck.com/assets/embed.js"></script>
code: https://github.com/opdavies/sculpin-demo
joindin: https://joind.in/talk/view/15486
tags: [meetups, phpsw, sculpin]
tweets: yes
video:
embed: <iframe width="560" height="315" src="https://www.youtube.com/embed/aN53arCKZAU" frameborder="0" allowfullscreen></iframe>
url: https://www.youtube.com/watch?v=aN53arCKZAU
events:
- { id: phpsw, date: '2015-10-14' }
---
[Sculpin][0] is a static site generator written in PHP. It converts Markdown files, Twig templates and standard HTML into a static HTML site that can be easily deployed.

View file

@ -1,4 +1,5 @@
---
id: test-drive-twig-with-sculpin
title: Test Drive Twig with Sculpin
type: Talk
slides:
@ -7,8 +8,6 @@ slides:
code: https://github.com/opdavies/sculpin-demo
tags: [conference, drupalcamp, drupalcamp-north, sculpin, twig]
tweets: yes
events:
- { id: drupalcamp-north-15, date: '2015-07-25' }
---
[Sculpin][1] is a static site generator written in PHP, and based on [Symfony components][2]. It uses [YAML][3] and [Twig][4], which makes it very appealing to Drupal people wanting to learn these in preparation for Drupal 8.

View file

@ -18,8 +18,6 @@ meta:
width: 2560
height: 1440
type: image/png
events:
- { id: drupalcamp-london-17, date: '2017-03-04', time: '16:15 - 17:00' }
---
Testing is important. Why? It allows developers to add new features and edit and refactor existing code without the worry of adding regressions, reduces the reliance on manual testing to discover bugs, and by taking a test driven approach, your implementation code is leaner as you only write what is needed for your tests to pass.

View file

@ -1,10 +1,9 @@
---
id: what-is-this-drupal-thing
title: So, what is this Drupal thing?
type: Talk
video:
url: https://vimeo.com/49827006
embed: <iframe src="https://player.vimeo.com/video/49827006" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
tags: [meetup, drupal, unified-diff]
events:
- { id: udiff, date: '2012-09-05' }
---

View file

@ -33,12 +33,21 @@
<h2>Events</h2>
{% set events = [] %}
{% for event in page.events %}
{% set event = event|merge({ talk: page })|merge(site.events[event.id]) %}
{% set events = events|merge([event]) %}
{% for date in site.events.dates %}
{% set key = (date.talk.id is defined) ? date.talk.id : date.talk %}
{% set talk = (page.id is defined) ? page.id : page.url|split('/')|last %}
{% if key == talk %}
{% set events = events|merge([{
date: date,
event: site.events.events[date.event],
}]) %}
{% endif %}
{% endfor %}
{% include "talks-table" with { events: events, hide_talk: true } %}
{% include 'talks-table' with {
events: events,
talk_page: true,
} %}
</div>{# .talk-events #}
{% endblock %}

54
source/talks.md Normal file
View file

@ -0,0 +1,54 @@
---
layout: default
title: Talks
meta:
description: 'Information about previous and upcoming talks that Oliver has presented at conferences and user groups'
use: [talks, posts]
---
{% block content %}
# 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 [get in touch][0].
There is also information about events that Ive attended and spoken at on my [Lanyrd][1] and []Joind.in][2] profiles.
{% set upcoming_events = [] %}
{% set past_events = [] %}
{% for date in site.events.dates %}
{% if date.date >= 'today'|date('Y-m-d') %}
{% set upcoming_events = upcoming_events|reverse|merge([{
date: date,
event: site.events.events[date.event],
talks: data.talks,
}]) %}
{% else %}
{% set past_events = past_events|merge([{
date: date,
event: site.events.events[date.event],
talks: data.talks,
}]) %}
{% endif %}
{% endfor %}
{% if upcoming_events is not empty %}
## Upcoming Talks
{% include 'talks-table' with { events: upcoming_events, upcoming: true } %}
{% endif %}
## Last 5 Talks
{% include 'talks-table' with { events: past_events|reverse[:5] } %}
You can view more talks in the [talks archive][3].
{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ site.url }}/assets/css/talks-table.css">
{% endblock %}
[0]: {{site.url}}/contact
[1]: {{site.lanyrd.url}}
[2]: {{site.joindin.url}}
[3]: {{site.url}}/talks/archive

View file

@ -1,50 +0,0 @@
---
layout: default
title: Talks
meta:
description: 'Information about previous and upcoming talks that Oliver has presented at conferences and user groups'
use: [talks, posts]
---
{% 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 upcoming_events = [] %}
{% set past_events = [] %}
{% for talk in data.talks %}
{% for event in talk.events if event.date >= 'today'|date('Y-m-d') %}
{% set event = event|merge({ talk: talk })|merge(site.events[event.id]) %}
{% set upcoming_events = upcoming_events|merge([event]) %}
{% endfor %}
{% for event in talk.events if event.date < 'today'|date('Y-m-d') %}
{% set event = event|merge({ talk: talk })|merge(site.events[event.id]) %}
{% set past_events = past_events|merge([event]) %}
{% endfor %}
{% endfor %}
{% if upcoming_events is not empty %}
<h2>Upcoming Talks</h2>
{% include "talks-table" with {
events: upcoming_events|sortbyfield('date'),
hide_feedback: true,
} %}
{% endif %}
<h2>Last 5 Talks</h2>
{% include "talks-table" with {
events: past_events|sortbyfield('date')|reverse[:5]
} %}
<p>You can view more talks in the <a href="/talks/archive">talks archive</a>.</p>
{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ site.url }}/assets/css/talks-table.css">
{% endblock %}

View file

@ -4,15 +4,13 @@ layout: page
use: [talks]
---
{% set events = [] %}
{% for talk in data.talks %}
{% for event in talk.events if event.date < 'today'|date('Y-m-d') %}
{% set event = event|merge({ talk: talk })|merge(site.events[event.id]) %}
{% set events = events|merge([event]) %}
{% endfor %}
{% for date in site.events.dates|reverse if date.date < "today"|date("Y-m-d") %}
{% set events = events|merge([{
date: date,
event: site.events.events[date.event],
talks: data.talks,
}]) %}
{% endfor %}
{% include "talks-table" with {
events: events|sortbyfield('date')|reverse,
show_feedback: true,
show_talk: true
} %}
{% include 'talks-table' with { events: events } %}