Open sidebar group on overview pages, fixes #507

This commit is contained in:
Lea Verou
2025-01-13 18:13:54 -05:00
parent 01210ef364
commit e367c0ef29

View File

@@ -1,8 +1,8 @@
{# Some collections (like "patterns") will not have any items in the alpha build for example. So this checks to make sure the collection exists. #}
{% if collections[tag] -%}
<wa-details {{ (tag in (tags or [])) | attr('open') }}>
{% set groupUrl %}/docs/{{ tag }}/{% endset %}
<wa-details {{ (tag in (tags or [])) or (groupUrl in page.url) | attr('open') }}>
<h2 slot="summary">
{% set groupUrl %}/docs/{{ tag }}/{% endset %}
{% if groupUrl | getCollectionItemFromUrl %}
<a href="{{ groupUrl }}" title="Overview">{{ title or (tag | capitalize) }}
<wa-icon name="grid-2"></wa-icon>