feat: added seo template and prioduct.slug

This commit is contained in:
2024-11-22 21:40:27 +01:00
parent 2d7119c6c1
commit b057b70a31
13 changed files with 644 additions and 33 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
<div
class="rounded-lg border border-gray-200 bg-white p-6 shadow-sm dark:border-gray-700 dark:bg-gray-800">
<div class="h-56 w-full">
<a href="#">
<a href="{% url 'shop:product_detail' pk=product.pk slug=product.slug %}">
<img class="mx-auto h-full dark:hidden" src="{{ product.images.all|first }}"
alt="{{ product.name }}"/>
<img class="mx-auto hidden h-full dark:block" src="{{ product.images.all|first }}"
@@ -11,7 +11,7 @@
</div>
<div class="pt-6">
<a href="{% url 'shop:product_detail' pk=product.pk %}"
<a href="{% url 'shop:product_detail' pk=product.pk slug=product.slug %}"
class="text-lg font-semibold leading-tight text-gray-900 hover:underline dark:text-white">{{ product.name }}</a>
<div class="mt-2 flex items-center gap-2">
@@ -8,6 +8,7 @@
hx-target="#products"
hx-trigger="keyup changed delay:500ms"
hx-swap="innerHTML"
hx-push="true"
>
<label for="simple-search" class="sr-only">Buscar</label>
<div class="relative w-full">