fix: show the parent category in the mobile label under entry names

On phones the label under each project name showed its subcategory, and names like "General", "Synchronous", or "Core" only make sense under their category heading, so the home and group tables showed vague labels.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Vinta Chen 2026-11-08 20:56:19 +08:00
parent 78f6ef0335
commit 0bd444d073
No known key found for this signature in database
GPG key ID: B93DE4F003C33630

View file

@ -15,7 +15,7 @@
>{{ entry.name }}</a
>
<span class="mobile-cat{% if grouped_page and (not entry.subcategories or category_urls[entry.subcategories[0].value.split(' > ')[0]] == section_path) %} repeats-heading{% endif %}"
>{% if entry.subcategories %}{{ entry.subcategories[0].name }}{%
>{% if entry.subcategories %}{{ entry.subcategories[0].value.split(' > ')[0] }}{%
else %}{{ entry.categories[0] if home else category.name }}{% endif %}</span
>
</td>