feat: added categories
This commit is contained in:
@@ -22,24 +22,14 @@
|
||||
{% translate 'Inicio' %}
|
||||
</a>
|
||||
</li>
|
||||
{% for category in navbar_categories %}
|
||||
<li class="shrink-0">
|
||||
<a href="{% url 'web:index' %}" title=""
|
||||
<a href="{% url 'web:category_view' slug=category.slug %}" title=""
|
||||
class="flex text-sm font-medium text-gray-900 hover:text-primary-700 dark:text-white dark:hover:text-primary-500">
|
||||
{% translate 'Más vendidos' %}
|
||||
</a>
|
||||
</li>
|
||||
<li class="shrink-0">
|
||||
<a href="{% url 'web:index' %}" title=""
|
||||
class="flex text-sm font-medium text-gray-900 hover:text-primary-700 dark:text-white dark:hover:text-primary-500">
|
||||
{% translate 'Ideas de regalo' %}
|
||||
</a>
|
||||
</li>
|
||||
<li class="shrink-0">
|
||||
<a href="{% url 'web:index' %}" title=""
|
||||
class="text-sm font-medium text-gray-900 hover:text-primary-700 dark:text-white dark:hover:text-primary-500">
|
||||
{% translate 'Ofertas del día' %}
|
||||
{{ category.name }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{% include 'components/products/list_filters.html' %}
|
||||
<section
|
||||
class="p-8"
|
||||
hx-get="{% url 'web:list_products' %}{% querystring request.GET %}"
|
||||
hx-get="{% url 'web:list_products' %}{% querystring request.GET %}{% if filter_by_category %}{% querystring category=category.id %}{% endif %}"
|
||||
hx-trigger="load"
|
||||
hx-target="#products"
|
||||
hx-swap="innerHTML"
|
||||
|
||||
Reference in New Issue
Block a user