From fc83e59f14652303f0cae29c2e67047a40331be5 Mon Sep 17 00:00:00 2001 From: Joachim Meyer Date: Thu, 27 Jun 2024 09:46:50 -0600 Subject: [PATCH] People modal improvements (#57) * Index - Improve people modal - Refactor modal ID logic Replace creating unique model HTML ID's based of peoples names and just use the index loop. This adds support for any characters in people names. * Index - Add pronouns support in people modal --- team/template.yaml | 2 +- {{ cookiecutter.repo_directory }}/index.html | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/team/template.yaml b/team/template.yaml index 7884648..32e69ec 100644 --- a/team/template.yaml +++ b/team/template.yaml @@ -4,6 +4,7 @@ role: YOUR JOB TITLE organizations: - name: YOUR EMPLOYER + pronouns: pronouns bio: > A FEW SENTENCES ABOUT YOU, MULTIPLE LINES ARE FINE expertise: @@ -21,4 +22,3 @@ # From https://escience.washington.edu/using-data-science/hackweeks/planning/hackweek-roles - ROLE 1 - ROLE 2 - diff --git a/{{ cookiecutter.repo_directory }}/index.html b/{{ cookiecutter.repo_directory }}/index.html index 98e4764..295786a 100644 --- a/{{ cookiecutter.repo_directory }}/index.html +++ b/{{ cookiecutter.repo_directory }}/index.html @@ -375,7 +375,7 @@

Meet the team

{%- if cookiecutter.team['people'] %}
{%- for person in cookiecutter.team['people'] %} - {%- set modal_name = person['title']|lower|replace(' ', '_')|replace('.', '') %} + {%- set modal_name = 'person-{}'.format(loop.index) %} {%- set modal_key = '{}-modal'.format(modal_name) %}
@@ -452,6 +452,11 @@
{{ person['title'] }}

{{person['title']}}

+ {%- if 'pronouns' in person %} +
+ ({{ person['pronouns'] }}) +
+ {%- endif %}
{{ person['role'] }}