Use a Twig extension to count the years of experience

This commit is contained in:
Oliver Davies 2024-05-03 12:30:24 +01:00
parent a516fa11e1
commit 9b19d7a036
10 changed files with 54 additions and 23 deletions

View file

@ -10,7 +10,7 @@
</div>
<div class="{{ site.prose_classes }}">
<p>I'm an Acquia-certified Drupal Triple Expert with {{ macros.yearsExperience }} years of experience, an open-source software maintainer and Drupal core contributor, <a href="/talks">public speaker</a>, <a href="{{ site.youtube.channel.url }}/streams">live streamer</a>, and host of the <a href="/podcast">Beyond Blocks podcast</a>.</p>
<p>I'm an Acquia-certified Drupal Triple Expert with {{ get_years_of_experience() }} years of experience, an open-source software maintainer and Drupal core contributor, <a href="/talks">public speaker</a>, <a href="{{ site.youtube.channel.url }}/streams">live streamer</a>, and host of the <a href="/podcast">Beyond Blocks podcast</a>.</p>
</div>
</div>
</div>

View file

@ -2,7 +2,3 @@
{% macro dailiesCount(dailies) %}
{{- dailies|length|round(-1, 'floor') -}}+
{% endmacro %}
{% macro yearsExperience() %}
{{- today|date('Y') - 2007 -}}
{% endmacro %}