From 20c8f2d8347149f6ce65b8a79fd145e4b9b82efc Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 9 Jul 2017 09:15:27 +0100 Subject: [PATCH] Refactor events and talks --- assets/sass/_base.sass | 3 + assets/sass/base/_layout.sass | 2 +- assets/sass/talks-table.sass | 7 - data/events.yml | 239 +++++++++++++----- source/_partials/talks-table.twig | 88 +++---- source/_talks/dancing-for-drupal.md | 3 +- source/_talks/deploying-php-with-fabric.md | 4 +- source/_talks/drupal-8-module-development.md | 4 +- source/_talks/drupal-8-rejoining-the-herd.md | 4 +- source/_talks/drupal-8.md | 4 +- source/_talks/drupal-association.md | 10 - .../drupal-development-with-composer.md | 3 +- source/_talks/drupal-ldap.md | 10 - source/_talks/drupal-vm-generator.md | 4 +- .../_talks/drupal-vm-meet-symfony-console.md | 3 +- source/_talks/drupalorg-2015.md | 4 +- source/_talks/drush-make-drupalbristol.md | 3 +- .../_talks/getting-your-data-into-drupal-8.md | 4 +- source/_talks/git-flow.md | 3 +- .../goodbye-drush-make-hello-composer.md | 3 +- source/_talks/it-all-started-with-a-patch.md | 4 +- source/_talks/sculpin.md | 4 +- source/_talks/test-drive-twig-with-sculpin.md | 3 +- .../test-driven-drupal-simpletest-phpunit.md | 2 - source/_talks/what-is-this-drupal-thing.md | 3 +- source/_views/talk.twig | 17 +- source/talks.md | 54 ++++ source/talks.twig | 50 ---- source/talks/archive.twig | 18 +- 29 files changed, 309 insertions(+), 251 deletions(-) delete mode 100644 source/_talks/drupal-association.md delete mode 100644 source/_talks/drupal-ldap.md create mode 100644 source/talks.md delete mode 100644 source/talks.twig diff --git a/assets/sass/_base.sass b/assets/sass/_base.sass index 2fc67244..95a99723 100644 --- a/assets/sass/_base.sass +++ b/assets/sass/_base.sass @@ -1,3 +1,6 @@ +.bg-red + background: red + body padding-top: 60px diff --git a/assets/sass/base/_layout.sass b/assets/sass/base/_layout.sass index 5034f105..c2141dc3 100644 --- a/assets/sass/base/_layout.sass +++ b/assets/sass/base/_layout.sass @@ -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} diff --git a/assets/sass/talks-table.sass b/assets/sass/talks-table.sass index 5bdfe99c..3eaf1a7d 100644 --- a/assets/sass/talks-table.sass +++ b/assets/sass/talks-table.sass @@ -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 diff --git a/data/events.yml b/data/events.yml index 8843baea..3742eec4 100644 --- a/data/events.yml +++ b/data/events.yml @@ -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 diff --git a/source/_partials/talks-table.twig b/source/_partials/talks-table.twig index f087834e..b26f7ca4 100644 --- a/source/_partials/talks-table.twig +++ b/source/_partials/talks-table.twig @@ -1,75 +1,63 @@
- +
- - {% if not hide_talk %}{% endif %} - - {% if not hide_feedback %}{% endif %} + + {% if not talk_page %}{% endif %} + + {% if not upcoming %}{% endif %} - {% 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 %} - - {% if not hide_talk %} + {% if not talk_page %} {% endif %} - - {% if not hide_feedback -%} - - {%- endif %} + {% endif %} {% endfor %} diff --git a/source/_talks/dancing-for-drupal.md b/source/_talks/dancing-for-drupal.md index 3721ed49..ed6cc26f 100644 --- a/source/_talks/dancing-for-drupal.md +++ b/source/_talks/dancing-for-drupal.md @@ -1,4 +1,5 @@ --- +id: dancing-for-drupal title: Dancing for Drupal type: Talk slides: @@ -6,8 +7,6 @@ slides: embed: 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. diff --git a/source/_talks/deploying-php-with-fabric.md b/source/_talks/deploying-php-with-fabric.md index 88dcfa2a..4f7caa60 100644 --- a/source/_talks/deploying-php-with-fabric.md +++ b/source/_talks/deploying-php-with-fabric.md @@ -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 } --- You’ve 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). diff --git a/source/_talks/drupal-8-module-development.md b/source/_talks/drupal-8-module-development.md index 1a235847..c1e6648c 100644 --- a/source/_talks/drupal-8-module-development.md +++ b/source/_talks/drupal-8-module-development.md @@ -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! diff --git a/source/_talks/drupal-8-rejoining-the-herd.md b/source/_talks/drupal-8-rejoining-the-herd.md index b06beb6c..574971db 100644 --- a/source/_talks/drupal-8-rejoining-the-herd.md +++ b/source/_talks/drupal-8-rejoining-the-herd.md @@ -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: -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 it’s pretty much the same as the Drupal that we know and, hopefully, love, a lot has changed behind the scenes and under the hood! diff --git a/source/_talks/drupal-8.md b/source/_talks/drupal-8.md index 5a863699..58b5442a 100644 --- a/source/_talks/drupal-8.md +++ b/source/_talks/drupal-8.md @@ -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: -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. diff --git a/source/_talks/drupal-association.md b/source/_talks/drupal-association.md deleted file mode 100644 index b4cdbc7e..00000000 --- a/source/_talks/drupal-association.md +++ /dev/null @@ -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 I’ve been working on since joining the Engineering team earlier in the year. diff --git a/source/_talks/drupal-development-with-composer.md b/source/_talks/drupal-development-with-composer.md index b395836c..41e2590d 100644 --- a/source/_talks/drupal-development-with-composer.md +++ b/source/_talks/drupal-development-with-composer.md @@ -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: '' -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. diff --git a/source/_talks/drupal-ldap.md b/source/_talks/drupal-ldap.md deleted file mode 100644 index 7321125a..00000000 --- a/source/_talks/drupal-ldap.md +++ /dev/null @@ -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 ---- diff --git a/source/_talks/drupal-vm-generator.md b/source/_talks/drupal-vm-generator.md index 52ff0d9d..c6e390b1 100644 --- a/source/_talks/drupal-vm-generator.md +++ b/source/_talks/drupal-vm-generator.md @@ -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: -events: - - { id: nwdug, date: '2016-03-08' } - - { id: drupal-bristol, date: '2016-04-02' } --- An short talk about the [Drupal VM Generator][1] project. diff --git a/source/_talks/drupal-vm-meet-symfony-console.md b/source/_talks/drupal-vm-meet-symfony-console.md index a962b4fa..82736900 100644 --- a/source/_talks/drupal-vm-meet-symfony-console.md +++ b/source/_talks/drupal-vm-meet-symfony-console.md @@ -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: 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._ diff --git a/source/_talks/drupalorg-2015.md b/source/_talks/drupalorg-2015.md index 70af3465..78021977 100644 --- a/source/_talks/drupalorg-2015.md +++ b/source/_talks/drupalorg-2015.md @@ -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: -events: - - { id: drupalcamp-brighton-15, date: '2015-01-18' } - - { id: drupalcamp-london-15, date: '2015-02-28' } --- diff --git a/source/_talks/drush-make-drupalbristol.md b/source/_talks/drush-make-drupalbristol.md index 707a0358..0864b12f 100644 --- a/source/_talks/drush-make-drupalbristol.md +++ b/source/_talks/drush-make-drupalbristol.md @@ -1,10 +1,9 @@ --- +id: drush-make-drupalbristol title: drush make drupalbristol type: Talk slides: url: https://speakerdeck.com/opdavies/drush-make-drupalbristol embed: tags: [meetup, drupal, drupal-bristol, drush, drush-make] -events: - - { id: drupal-bristol, date: '2014-07-02' } --- diff --git a/source/_talks/getting-your-data-into-drupal-8.md b/source/_talks/getting-your-data-into-drupal-8.md index 6d829d75..9995975d 100644 --- a/source/_talks/getting-your-data-into-drupal-8.md +++ b/source/_talks/getting-your-data-into-drupal-8.md @@ -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 you’ve moved a site from Drupal 6 to 7, the chances are that you’ve 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. diff --git a/source/_talks/git-flow.md b/source/_talks/git-flow.md index ede7721d..e98a27dc 100644 --- a/source/_talks/git-flow.md +++ b/source/_talks/git-flow.md @@ -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' } --- diff --git a/source/_talks/goodbye-drush-make-hello-composer.md b/source/_talks/goodbye-drush-make-hello-composer.md index 9ab95813..e255ac5c 100644 --- a/source/_talks/goodbye-drush-make-hello-composer.md +++ b/source/_talks/goodbye-drush-make-hello-composer.md @@ -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: '' -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], PHP’s dependency manager. diff --git a/source/_talks/it-all-started-with-a-patch.md b/source/_talks/it-all-started-with-a-patch.md index e6a14c16..9de10ea8 100644 --- a/source/_talks/it-all-started-with-a-patch.md +++ b/source/_talks/it-all-started-with-a-patch.md @@ -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: '' -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. diff --git a/source/_talks/sculpin.md b/source/_talks/sculpin.md index 8918f8af..2add92e8 100644 --- a/source/_talks/sculpin.md +++ b/source/_talks/sculpin.md @@ -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: code: https://github.com/opdavies/sculpin-demo -joindin: https://joind.in/talk/view/15486 tags: [meetups, phpsw, sculpin] tweets: yes video: embed: 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. diff --git a/source/_talks/test-drive-twig-with-sculpin.md b/source/_talks/test-drive-twig-with-sculpin.md index c9376252..4228d99e 100644 --- a/source/_talks/test-drive-twig-with-sculpin.md +++ b/source/_talks/test-drive-twig-with-sculpin.md @@ -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. diff --git a/source/_talks/test-driven-drupal-simpletest-phpunit.md b/source/_talks/test-driven-drupal-simpletest-phpunit.md index 3a032470..8daabc00 100644 --- a/source/_talks/test-driven-drupal-simpletest-phpunit.md +++ b/source/_talks/test-driven-drupal-simpletest-phpunit.md @@ -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. diff --git a/source/_talks/what-is-this-drupal-thing.md b/source/_talks/what-is-this-drupal-thing.md index 83e04979..731d3cfc 100644 --- a/source/_talks/what-is-this-drupal-thing.md +++ b/source/_talks/what-is-this-drupal-thing.md @@ -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: tags: [meetup, drupal, unified-diff] -events: - - { id: udiff, date: '2012-09-05' } --- diff --git a/source/_views/talk.twig b/source/_views/talk.twig index ebadd65b..5cb58a95 100644 --- a/source/_views/talk.twig +++ b/source/_views/talk.twig @@ -33,12 +33,21 @@

Events

{% 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, + } %} {# .talk-events #} {% endblock %} diff --git a/source/talks.md b/source/talks.md new file mode 100644 index 00000000..2f851a5f --- /dev/null +++ b/source/talks.md @@ -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 I’ve 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 %} + +{% endblock %} + +[0]: {{site.url}}/contact +[1]: {{site.lanyrd.url}} +[2]: {{site.joindin.url}} +[3]: {{site.url}}/talks/archive diff --git a/source/talks.twig b/source/talks.twig deleted file mode 100644 index 8b3aa44d..00000000 --- a/source/talks.twig +++ /dev/null @@ -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 %} -

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.

- -

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

- - {% 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 %} -

Upcoming Talks

- - {% include "talks-table" with { - events: upcoming_events|sortbyfield('date'), - hide_feedback: true, - } %} - {% endif %} - -

Last 5 Talks

- - {% include "talks-table" with { - events: past_events|sortbyfield('date')|reverse[:5] - } %} - -

You can view more talks in the talks archive.

-{% endblock %} - -{% block stylesheets %} - -{% endblock %} diff --git a/source/talks/archive.twig b/source/talks/archive.twig index 509a1495..72f58807 100644 --- a/source/talks/archive.twig +++ b/source/talks/archive.twig @@ -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 } %}
DateTalkEventFeedbackDateTalkEventFeedback
-
- {% if event.fuzzy_date %} - {{ event.date|date('F Y') }} - {% else %} - {{ event.date|date('j F Y') }} - {% endif %} -
- - {% if event.time %} - - {{ event.time }} - +
+ {{ row.date.date|date(row.date.fuzzy_date ? 'F Y' : 'j F Y') }} + {% if row.date.time %} + {{ row.date.time }} {% endif %} -
- {% if not event.talk.hide_page %} - - {{ event.talk.title }} - - {% else %} - {{ event.talk.title }} - {% endif %} -
- - {% if event.talk.type %} - - {{ event.talk.type }} - + {% if row.date.talk.title is defined %} + {{ row.date.talk.title }} + {% else %} + {{ talk.title }} {% endif %} + + {{ row.date.talk.type ?: talk.type }} +
-
- {% if event.url %}{% endif %} - {{ event.title }} - {% if event.url %}{% endif %} -
- - {% if event.location %} - - {{- event.location -}} - +
+ {% if row.event.website %} + + {{ row.event.name }} + + {% else %} + {{ row.event.name }} {% endif %} + + {{ row.event.location }} + - {% if event.talk.joindin %} - + {% if not upcoming %} + + {% if row.date.feedback %} + joind.in {% endif %}