feat: conditionally hide license filters on recipes page

Add shouldShowLicenseFilters method to check if current page is 'recipes' and skip license filter initialization and updates when on recipes page. Also conditionally render license filter section in header template based on current page.

This prevents license filters from appearing on the recipes page where they are not applicable.
This commit is contained in:
Will Miao
2025-11-19 22:26:16 +08:00
parent bcf72c6bcc
commit 8c77080ae6
2 changed files with 15 additions and 5 deletions

View File

@@ -147,6 +147,7 @@
</div>
</div>
{% endif %}
{% if current_page != 'recipes' %}
<div class="filter-section">
<h4>{{ t('header.filter.license') }}</h4>
<div class="filter-tags">
@@ -158,6 +159,7 @@
</div>
</div>
</div>
{% endif %}
<div class="filter-actions">
<button class="clear-filters-btn" onclick="filterManager.clearFilters()">
{{ t('header.filter.clearAll') }}