diff --git a/app/SculpinKernel.php b/app/SculpinKernel.php index 77f5abe9..36416ff0 100644 --- a/app/SculpinKernel.php +++ b/app/SculpinKernel.php @@ -1,5 +1,7 @@ =5.6.4" + }, + "require-dev": { + "mockery/mockery": "^0.9.7", + "phpunit/phpunit": "^5.7" + }, + "type": "library", + "autoload": { + "files": [ + "src/Illuminate/Support/helpers.php" + ], + "psr-4": { + "Illuminate\\": "src/Illuminate" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "Collect - Illuminate Collections as a separate package.", + "keywords": [ + "collection", + "laravel" + ], + "time": "2017-08-14T20:47:19+00:00" + }, { "name": "tsphethean/sculpin-related-posts-bundle", "version": "0.1.0", @@ -2769,6 +2816,55 @@ "string" ], "time": "2017-05-11T10:04:12+00:00" + }, + { + "name": "wikimedia/composer-merge-plugin", + "version": "v1.4.1", + "source": { + "type": "git", + "url": "https://github.com/wikimedia/composer-merge-plugin.git", + "reference": "81c6ac72a24a67383419c7eb9aa2b3437f2ab100" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/wikimedia/composer-merge-plugin/zipball/81c6ac72a24a67383419c7eb9aa2b3437f2ab100", + "reference": "81c6ac72a24a67383419c7eb9aa2b3437f2ab100", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0", + "php": ">=5.3.2" + }, + "require-dev": { + "composer/composer": "~1.0.0", + "jakub-onderka/php-parallel-lint": "~0.8", + "phpunit/phpunit": "~4.8|~5.0", + "squizlabs/php_codesniffer": "~2.1.0" + }, + "type": "composer-plugin", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + }, + "class": "Wikimedia\\Composer\\MergePlugin" + }, + "autoload": { + "psr-4": { + "Wikimedia\\Composer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bryan Davis", + "email": "bd808@wikimedia.org" + } + ], + "description": "Composer plugin to merge multiple composer.json files", + "time": "2017-04-25T02:31:25+00:00" } ], "packages-dev": [ diff --git a/source/talks.html.twig b/source/talks.html.twig index 9d8a2fb6..ee3dd122 100644 --- a/source/talks.html.twig +++ b/source/talks.html.twig @@ -8,6 +8,8 @@ use: [talks] {% block content %}

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.

+

Last 5 Talks

+ {% set talks = [] %} {% for talk in data.talks %} {% for event in talk.events %} @@ -18,7 +20,9 @@ use: [talks] {% endfor %} {% endfor %} - {% include "talks-table" %} + {% include "talks-table" with { + talks: talks|format_talks|slice(0,5) + } %}

Upcoming talks can be found in the talks archive.

{% endblock %} diff --git a/source/talks/archive.html.twig b/source/talks/archive.html.twig index e07c9a54..777deb1d 100644 --- a/source/talks/archive.html.twig +++ b/source/talks/archive.html.twig @@ -24,6 +24,6 @@ talks: {% endfor %} {% endfor %} -{% include 'talks-table' %} +{% include 'talks-table' with { talks: talks|format_talks } %}

Upcoming talks can be found on the talks page].

diff --git a/src/format-talks-bundle/Resources/config/services.yml b/src/format-talks-bundle/Resources/config/services.yml new file mode 100644 index 00000000..b332a7a3 --- /dev/null +++ b/src/format-talks-bundle/Resources/config/services.yml @@ -0,0 +1,5 @@ +services: + app.twig.format_talks: + class: 'App\FormatTalks\Twig\FormatTalksExtension' + tags: + - { name: twig.extension } diff --git a/src/format-talks-bundle/composer.json b/src/format-talks-bundle/composer.json new file mode 100644 index 00000000..6ce35c37 --- /dev/null +++ b/src/format-talks-bundle/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "tightenco/collect": "^5.4" + } +} diff --git a/src/format-talks-bundle/src/DependencyInjection/SculpinFormatTalksExtension.php b/src/format-talks-bundle/src/DependencyInjection/SculpinFormatTalksExtension.php new file mode 100644 index 00000000..68e24467 --- /dev/null +++ b/src/format-talks-bundle/src/DependencyInjection/SculpinFormatTalksExtension.php @@ -0,0 +1,20 @@ +load('services.yml'); + } +} diff --git a/src/format-talks-bundle/src/SculpinFormatTalksBundle.php b/src/format-talks-bundle/src/SculpinFormatTalksBundle.php new file mode 100644 index 00000000..73f29cb7 --- /dev/null +++ b/src/format-talks-bundle/src/SculpinFormatTalksBundle.php @@ -0,0 +1,7 @@ +sortBy('event.date') + ->all(); + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return 'format_talks'; + } +}