Make years of experience dynamic based on the
...current year
This commit is contained in:
parent
455d27eef5
commit
bd0dbfa7bc
10 changed files with 28 additions and 10 deletions
|
@ -1,3 +1,5 @@
|
|||
{% import 'macros' as macros %}
|
||||
|
||||
<div>
|
||||
<h2 class="text-xl font-bold">About me</h2>
|
||||
|
||||
|
@ -8,7 +10,7 @@
|
|||
</div>
|
||||
|
||||
<div class="prose prose-p:text-black prose-a:font-light prose-a:text-blue-primary prose-p:text-lg prose-blockquote:border-blue-primary dark:marker:text-white prose-li:my-1 prose-li:text-lg prose-figcaption:text-white prose-li:text-black marker:text-black dark:prose-p:text-white dark:prose-invert dark:prose-a:text-blue-400 dark:prose-blockquote:border-blue-400 dark:prose-li:text-white hover:prose-a:no-underline prose-h2:text-xl prose-code:font-normal prose-h2:mb-4 prose-ul:my-3 dark:prose-hr:border-grey-400 prose-code:before:content-[''] prose-code:after:content-['']">
|
||||
<p>I'm an Acquia-certified Drupal Triple Expert with {{ site.yearsExperience }} years of experience, an open-source software maintainer and Drupal core contributor, <a href="/talks">public speaker</a>, and host of the <a href="/podcast">Beyond Blocks podcast</a>. </p>
|
||||
<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>, and host of the <a href="/podcast">Beyond Blocks podcast</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
3
source/_includes/macros.html.twig
Normal file
3
source/_includes/macros.html.twig
Normal file
|
@ -0,0 +1,3 @@
|
|||
{% macro yearsExperience() %}
|
||||
{{- today|date('Y') - 2007 -}}
|
||||
{% endmacro %}
|
Loading…
Add table
Add a link
Reference in a new issue