diff --git a/source/_includes/front-speakers.html.twig b/source/_includes/front-speakers.html.twig index c2c9335..9275295 100644 --- a/source/_includes/front-speakers.html.twig +++ b/source/_includes/front-speakers.html.twig @@ -9,9 +9,7 @@ <span class="tw-flex-1 tw-flex tw-flex-col tw-justify-center"> <span class="tw-block tw-font-bold tw-text-xl tw-text-gray-900 group-hocus:tw-underline">{{ speaker.name }}</span> <span class="tw-block tw-text-gray-800"> - {{ speaker.role }} - {%- if speaker.role and speaker.organisation %}, {% endif %} - {{ speaker.organisation }} + {% include 'speaker-role' with { speaker: speaker } %} </span> </span> <span class="tw-w-24 md:tw-w-32 tw-mr-6"> diff --git a/source/_includes/speaker-role.html.twig b/source/_includes/speaker-role.html.twig new file mode 100644 index 0000000..aef5d0a --- /dev/null +++ b/source/_includes/speaker-role.html.twig @@ -0,0 +1,3 @@ +{{ speaker.role }} +{%- if speaker.role and speaker.organisation %}, {% endif %} +{{ speaker.organisation }} diff --git a/source/_layouts/speaker.html.twig b/source/_layouts/speaker.html.twig index c5eea79..e533408 100644 --- a/source/_layouts/speaker.html.twig +++ b/source/_layouts/speaker.html.twig @@ -30,9 +30,9 @@ {% endif %} <div class="markup"> - {% if page.organisation %} - <b>Organisation</b>: {{ page.organisation }} - {% endif %} + <div class="tw-font-bold tw-text-xl"> + {% include 'speaker-role' with { speaker: page } %} + </div> {% block content %}{% endblock %} </div>