fix: styling
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
id="theme-toggle"
|
id="theme-toggle"
|
||||||
type="button"
|
type="button"
|
||||||
aria-label="switchtheme"
|
aria-label="switchtheme"
|
||||||
class="text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none rounded-lg text-sm p-2.5 cursor-pointer">
|
class="text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none rounded-lg text-sm p-4 cursor-pointer">
|
||||||
{% include 'components/icons/moon.svg' %}
|
{% include 'components/icons/moon.svg' %}
|
||||||
{% include 'components/icons/sun.svg' %}
|
{% include 'components/icons/sun.svg' %}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<!-- Cart -->
|
<!-- Cart -->
|
||||||
<div id="myCartDropdown1"
|
<div id="myCartDropdown1"
|
||||||
class="absolute top-10 z-10 w-56 divide-y divide-gray-100 overflow-hidden overflow-y-auto rounded-lg bg-white antialiased shadow dark:divide-gray-600 dark:bg-gray-700 right-0 p-4 hidden"
|
class="absolute top-12 z-10 w-65 divide-y divide-gray-100 overflow-hidden overflow-y-auto rounded-lg bg-white antialiased shadow dark:divide-gray-600 dark:bg-gray-700 right-0 p-4 hidden"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
{% if cart.items.count == 0 %}
|
{% if cart.items.count == 0 %}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
id="userDropdownButton1"
|
id="userDropdownButton1"
|
||||||
data-dropdown-toggle="userDropdown1" type="button"
|
data-dropdown-toggle="userDropdown1" type="button"
|
||||||
aria-label="show menu"
|
aria-label="show menu"
|
||||||
class="inline-flex items-center rounded-lg justify-center p-2 hover:bg-gray-100 dark:hover:bg-gray-700 text-sm font-medium leading-none text-gray-900 dark:text-white cursor-pointer">
|
class="inline-flex items-center rounded-lg justify-center p-4 hover:bg-gray-100 dark:hover:bg-gray-700 text-sm font-medium leading-none text-gray-900 dark:text-white cursor-pointer">
|
||||||
{% include 'components/icons/user.svg' %}
|
{% include 'components/icons/user.svg' %}
|
||||||
<span class="hidden sm:flex">
|
<span class="hidden sm:flex">
|
||||||
{% translate 'Mi cuenta' %}
|
{% translate 'Mi cuenta' %}
|
||||||
@@ -58,12 +58,12 @@
|
|||||||
|
|
||||||
<!-- User account dropdown -->
|
<!-- User account dropdown -->
|
||||||
<div id="userDropdown1"
|
<div id="userDropdown1"
|
||||||
class="absolute top-10 hidden z-10 w-56 divide-y divide-gray-100 overflow-hidden overflow-y-auto rounded-lg bg-white antialiased shadow dark:divide-gray-600 dark:bg-gray-700 right-0">
|
class="absolute top-12 hidden z-12 w-56 divide-y divide-gray-100 overflow-hidden overflow-y-auto rounded-lg bg-white antialiased shadow dark:divide-gray-600 dark:bg-gray-700 right-0">
|
||||||
{% include 'components/users/user_dropdown.html' %}
|
{% include 'components/users/user_dropdown.html' %}
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{% url 'web:login' %}"
|
<a href="{% url 'web:login' %}"
|
||||||
class="inline-flex items-center rounded-lg justify-center p-2 hover:bg-gray-100 dark:hover:bg-gray-700 text-sm font-medium leading-none text-gray-900 dark:text-white">
|
class="inline-flex items-center rounded-lg justify-center p-4 hover:bg-gray-100 dark:hover:bg-gray-700 text-sm font-medium leading-none text-gray-900 dark:text-white">
|
||||||
Inicia sesión
|
Inicia sesión
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
data-collapse-toggle="ecommerce-navbar-menu-1" aria-controls="ecommerce-navbar-menu-1"
|
data-collapse-toggle="ecommerce-navbar-menu-1" aria-controls="ecommerce-navbar-menu-1"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-label="show menu"
|
aria-label="show menu"
|
||||||
class="inline-flex lg:hidden items-center justify-center hover:bg-gray-100 rounded-md dark:hover:bg-gray-700 p-2 text-gray-900 dark:text-white cursor-pointer">
|
class="inline-flex lg:hidden items-center justify-center hover:bg-gray-100 rounded-md dark:hover:bg-gray-700 p-4 text-gray-900 dark:text-white cursor-pointer">
|
||||||
<span class="sr-only">
|
<span class="sr-only">
|
||||||
{% translate 'Abrir menú' %}
|
{% translate 'Abrir menú' %}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<div>
|
<div>
|
||||||
{% include 'components/products/list_filters.html' %}
|
{% include 'components/products/list_filters.html' %}
|
||||||
<section
|
<section
|
||||||
class="p-8"
|
class="px-8"
|
||||||
hx-get="
|
hx-get="
|
||||||
{% url 'web:list_products' %}{% querystring request.GET %}{% if filter_by_category %}{% querystring category=category.id %}{% endif %}"
|
{% url 'web:list_products' %}{% querystring request.GET %}{% if filter_by_category %}{% querystring category=category.id %}{% endif %}"
|
||||||
hx-trigger="load"
|
hx-trigger="load"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
<ul class="mb-4 grid gap-4 sm:grid-cols-2 md:mb-8 lg:grid-cols-3 xl:grid-cols-4">
|
<ul class="mb-4 grid gap-4 sm:grid-cols-2 md:mb-8 lg:grid-cols-3 xl:grid-cols-4 3xl:grid-cols-5">
|
||||||
{% for product in page %}
|
{% for product in page %}
|
||||||
<li>
|
<li>
|
||||||
{% include 'components/product_card.html' %}
|
{% include 'components/product_card.html' %}
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<div class="flex justify-center items-center">
|
||||||
{% if has_previous_page %}
|
{% if has_previous_page %}
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="rounded-lg border border-gray-200 bg-white px-5 py-2.5 text-sm font-medium text-gray-900
|
class="rounded-lg border border-gray-200 bg-white px-5 py-2.5 text-sm font-medium text-gray-900
|
||||||
@@ -38,3 +38,8 @@
|
|||||||
{% translate 'Siguiente' %}
|
{% translate 'Siguiente' %}
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<span class="flex justify-center items-center text-lg text-gray-900 dark:text-gray-400 mt-4">
|
||||||
|
{% blocktranslate %}Página {{ current_page }} de {{ num_pages }}{% endblocktranslate %}
|
||||||
|
</span>
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ class ListProducts(TemplateView, FilteredQuerysetMixin, PaginatedQuerysetMixin):
|
|||||||
page = self.get_paginated_queryset(qs)
|
page = self.get_paginated_queryset(qs)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
"current_page": page.number,
|
||||||
|
"num_pages": page.paginator.num_pages,
|
||||||
"page": page,
|
"page": page,
|
||||||
"has_next_page": page.has_next(),
|
"has_next_page": page.has_next(),
|
||||||
"has_previous_page": page.has_previous(),
|
"has_previous_page": page.has_previous(),
|
||||||
|
|||||||
Reference in New Issue
Block a user