fix: Prevent duplicate HTML IDs on photo page (#6356)

* fix: Prevent duplicate HTML IDs on photo page

Fixes #6355

* Just don't slugify the ID.

See https://mathiasbynens.be/notes/html5-id-class
This commit is contained in:
Lars Eggert 2023-09-22 20:50:43 +03:00 committed by GitHub
parent b08d26d36e
commit 910a266126
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,7 @@
<h1>{{ group_type | upper }} {{ role }} photos</h1>
{% regroup roles|dictsort:"last_initial" by last_initial as alphabet_blocks %}
{% for letter in alphabet_blocks %}
<h2 class="mt-4" {% if letter.grouper|slugify %}id="{{ letter.grouper|slugify }}"{% endif %}>{{ letter.grouper }}</h2>
<h2 class="mt-4" {% if letter.grouper|slugify %}id="{{ letter.grouper }}"{% endif %}>{{ letter.grouper }}</h2>
{% regroup letter.list by person as person_groups %}
{# keep in sync with group_photos.html #}
<div class="mt-0 row row-cols-2 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 row-cols-xl-4 row-cols-xxl-5 g-2">
@ -17,4 +17,4 @@
{% endfor %}
</div>
{% endfor %}
{% endblock %}
{% endblock %}