small fixes
This commit is contained in:
@@ -3,6 +3,27 @@
|
||||
|
||||
{% block title %}{{ product.name }}{% endblock title %}
|
||||
|
||||
{# Keeps this product's category selected and expanded in the sidebar, which
|
||||
otherwise matches on the URL alone and so goes blank on /shop/{slug}. #}
|
||||
{% block nav_category %}{% if category %}{{ category.slug }}{% endif %}{% endblock nav_category %}
|
||||
|
||||
{# Same trail as the category listing, extended with the product itself, so the
|
||||
path back up the tree survives the click into a product. #}
|
||||
{% block breadcrumbs %}
|
||||
{% set L = lang | default(value='sk') %}
|
||||
<nav aria-label="breadcrumb" class="mb-5 text-sm">
|
||||
<ol class="flex flex-wrap items-center gap-1.5 text-on-surface/60 dark:text-on-surface-dark/60">
|
||||
{{ ui::crumb(label=t(key="nav-home", lang=L), href="/") }}
|
||||
{{ ui::crumb(label=t(key="nav-shop", lang=L), href="/shop") }}
|
||||
{% for crumb in breadcrumbs %}
|
||||
{{ ui::crumb(label=crumb.name, href="/category/" ~ crumb.slug) }}
|
||||
{% endfor %}
|
||||
{% if category %}{{ ui::crumb(label=category.name, href="/category/" ~ category.slug) }}{% endif %}
|
||||
{{ ui::crumb_current(label=product.name) }}
|
||||
</ol>
|
||||
</nav>
|
||||
{% endblock breadcrumbs %}
|
||||
|
||||
{% block content %}
|
||||
<div class="space-y-12">
|
||||
<div class="grid gap-10 lg:grid-cols-2">
|
||||
|
||||
Reference in New Issue
Block a user