stammbaum/templates/stammbaum.html
itsscb aaaed7ce62 fix: recursive bloat in html
the meta, title and style tags are being replicated in the list on '/'
2025-06-23 20:35:01 +02:00

37 lines
945 B
HTML

{% for person in members %}
<div class="family-node">
<div class="name">
<span class="first-name">{{ person.first_name() }}</span>
<span class="last-name">{{ person.last_name() }}</span>
{% if person.maiden_name().is_some() %}
<span class="maiden-name">({{ person.maiden_name().as_ref().unwrap() }})</span>
{% endif %}
</div>
<div class="details">
<div>Sex:
{% match person.sex() %}
{% when Sex::Male %}Male
{% when Sex::Female %}Female
{% when Sex::Other(desc) %}{{ desc }}
{% endmatch %}
</div>
<div>Birthday: {{ person.date_of_birth().format("%Y-%m-%d") }}</div>
<a href="/{{ person.id() }}">ID: {{ person.id() }}</a>
<div class="parents">
Parents:
{% if person.parents().is_empty() %}
<ul></ul>
{% else %}
<ul>
{% for parent_id in &person.parents() %}
<li>
<a href="/{{ parent_id }}">{{ parent_id }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
{% endfor %}