Remove custom Twig extensions
Go back to calculating the talk count inline and using a macro to get the number of years experience.
This commit is contained in:
parent
c4ac4a8d3f
commit
94a4190be6
14 changed files with 1659 additions and 1871 deletions
21
source/_pages/presentations.html.twig
Normal file
21
source/_pages/presentations.html.twig
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
title: Presentations
|
||||
use: [presentations]
|
||||
---
|
||||
|
||||
{% set today = 'today'|date('U') %}
|
||||
{% set presentation_count = data.presentations|reduce((count, presentation) => count + (presentation.events|filter(e => e.date|date('U') < today)|length), 0) %}
|
||||
|
||||
<p>Since September 2012, I have given {{ presentation_count }} public talks and workshops at various conferences and meetups, in-person and remotely, on topics including PHP, Drupal, automated testing, Git, CSS, and systems administration.</p>
|
||||
|
||||
{% for talk in data.presentations|sort((a, b) => a.events|last.date|date('U') > b.events|last.date|date('U') ? -1 : 1) %}
|
||||
<article>
|
||||
<div class="not-prose">
|
||||
<h2 class="text-xl font-bold">
|
||||
<a class="font-bold text-blue-primary dark:text-blue-400" href="{{ talk.url|trim('/', 'right') }}">{{ talk.title }}</a>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<p>{{ talk.description }}</p>
|
||||
</article>
|
||||
{% endfor %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue