fix: html refactor
This commit is contained in:
@@ -3,10 +3,9 @@
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="product" value="{{ product.pk }}">
|
||||
|
||||
<div class="flex">
|
||||
<input class="input" id="quantity" aria-label="quantity" type="number" min="1" max="10" name="quantity" value="1">
|
||||
<button class="btn btn-primary"
|
||||
>
|
||||
<div class="flex items-center">
|
||||
<input class="input mr-4" id="quantity" aria-label="quantity" type="number" min="1" max="10" name="quantity" value="1">
|
||||
<button class="btn btn-primary">
|
||||
{% include 'components/icons/add_cart.svg' %}
|
||||
{% translate 'Añadir al carrito' %}
|
||||
</button>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="space-y-6">
|
||||
|
||||
{% for item in items %}
|
||||
<div class="rounded-lg p-4 shadow-sm md:p-6">
|
||||
<div class="rounded-lg p-4 shadow-md md:p-6">
|
||||
<div class="space-y-4 flex items-center justify-between gap-6 space-y-0">
|
||||
<a href="{% url 'web:product_detail' pk=item.product.pk slug=item.product.slug %}"
|
||||
class="shrink-0 md:order-1">
|
||||
@@ -155,10 +155,10 @@
|
||||
{% translate 'País' %}
|
||||
</label>
|
||||
<input type="text" name="shipping_address_country" id="shipping_address_country"
|
||||
class="input"
|
||||
placeholder="{% translate 'País' %}"
|
||||
value="{% if shipping_address %}{{ shipping_address.address_country }}{% endif %}"
|
||||
required=""
|
||||
class="input"
|
||||
placeholder="{% translate 'País' %}"
|
||||
value="{% if shipping_address %}{{ shipping_address.address_country }}{% endif %}"
|
||||
required=""
|
||||
>
|
||||
</div>
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
<!-- Resumen del pedido -->
|
||||
<div class="mx-auto mt-6 max-w-4xl flex-1 space-y-6 lg:mt-0 lg:w-full">
|
||||
<div
|
||||
class="space-y-4 rounded-lg p-4 shadow-sm sm:p-6">
|
||||
class="space-y-4 rounded-lg p-4 shadow-md sm:p-6">
|
||||
<p class="text-xl font-semibold ">
|
||||
{% translate 'Resumen del pedido' %}
|
||||
</p>
|
||||
@@ -324,10 +324,13 @@
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<button
|
||||
class="flex w-full items-center justify-center rounded-lg px-5 py-2.5 text-sm font-medium text-white hover: focus:outline-none focus:ring-4 focus:ring-primary-300 : :ring-primary-800 cursor-pointer">
|
||||
{% translate 'Terminar pedido' %}
|
||||
</button>
|
||||
<div class="flex justify-center items-center">
|
||||
<button
|
||||
class="btn btn-primary">
|
||||
{% translate 'Terminar pedido' %}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex items-center justify-center gap-2">
|
||||
<span class="text-sm font-normal "> {% translate 'o' %} </span>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<div id="tooltipRemoveItem1a" role="tooltip"
|
||||
class="tooltip invisible absolute z-10 inline-block rounded-lg px-3 py-2 text-sm font-medium
|
||||
text-white opacity-0 shadow-sm transition-opacity duration-300 "
|
||||
text-white opacity-0 shadow-md transition-opacity duration-300 "
|
||||
>
|
||||
{% translate 'Quitar del carrito' %}
|
||||
<div class="tooltip-arrow" data-popper-arrow></div>
|
||||
|
||||
@@ -1,24 +1,19 @@
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
<nav class="navbar bg-base-100 shadow-sm">
|
||||
<div class="flex-1">
|
||||
|
||||
<nav class="flex justify-between navbar bg-base-300 shadow-md px-4 fixed top-0 z-10 left-0 w-full">
|
||||
<div class="text-base-content">
|
||||
<a href="{% url 'web:index' %}" class="flex text-xl">
|
||||
<img class="mr-4" src="{{ logo }}" alt="{{ web_title }} logo">
|
||||
{{ web_title }}
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="flex gap-2">
|
||||
<input type="text" placeholder="{% trans 'Buscar...' %}" class="input input-bordered w-24 md:w-auto"/>
|
||||
|
||||
{% include 'components/generic/theme-switch.html' %}
|
||||
{% if user.is_authenticated %}
|
||||
{% include 'components/generic/user_dropdown.html' %}
|
||||
{% else %}
|
||||
<a href="{% url 'users:login' %}"
|
||||
class="link-button flex items-center">
|
||||
<a href="{% url 'users:login' %}" class="link-button flex items-center">
|
||||
{% translate 'Inicia sesión' %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,43 +1,24 @@
|
||||
{% load i18n %}
|
||||
<article>
|
||||
<div
|
||||
>
|
||||
<div class="h-56 w-full ">
|
||||
<a href="{% url 'web:product_detail' pk=product.pk slug=product.slug %}">
|
||||
<img class="mx-auto h-full " src="{{ product.images.all.0.m.url }}"
|
||||
alt="{{ product.name }}"/>
|
||||
<img class="mx-auto hidden h-full " src="{{ product.images.all.0.m_dark.url }}"
|
||||
alt="{{ product.name }}"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="pt-6">
|
||||
<article class="rounded-lg border-primary p-6 shadow-sm">
|
||||
|
||||
<a href="{% url 'web:product_detail' pk=product.pk slug=product.slug %}"
|
||||
class="link">{{ product.name }}</a>
|
||||
<a class="h-56 w-full" href="{% url 'web:product_detail' pk=product.pk slug=product.slug %}">
|
||||
<img class="mx-auto h-full " src="{{ product.images.all.0.m.url }}"
|
||||
alt="{{ product.name }}"/>
|
||||
</a>
|
||||
|
||||
<!-- <div class="mt-2 flex items-center gap-2">-->
|
||||
<!-- <div class="flex items-center">-->
|
||||
<!-- {% include 'components/icons/star.svg' %}-->
|
||||
<!-- {% include 'components/icons/star.svg' %}-->
|
||||
<!-- {% include 'components/icons/star.svg' %}-->
|
||||
<!-- {% include 'components/icons/star.svg' %}-->
|
||||
<!-- {% include 'components/icons/star.svg' %}-->
|
||||
<!-- </div>-->
|
||||
<div class="pt-6 flex justify-between">
|
||||
<a href="{% url 'web:product_detail' pk=product.pk slug=product.slug %}"
|
||||
class="link">
|
||||
<h1>{{ product.name }}</h1>
|
||||
|
||||
<!-- <p class="text-sm font-medium ">5.0</p>-->
|
||||
<!-- <p class="text-sm font-medium ">(455)</p>-->
|
||||
<!-- </div>-->
|
||||
<div class="mt-4 flex gap-4">
|
||||
<p class="txt-2xl">
|
||||
{% with product.current_prices.0 as price %}
|
||||
{{ price.price_with_tax }} €
|
||||
{% endwith %}
|
||||
</p>
|
||||
</div>
|
||||
<div class="mt-4">
|
||||
{% include 'components/cart/add_to_cart.html' %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
<p class="txt-2xl">
|
||||
{% with product.current_prices.0 as price %}
|
||||
{{ price.price_with_tax }} €
|
||||
{% endwith %}
|
||||
</p>
|
||||
</div>
|
||||
<div class="mt-4">
|
||||
{% include 'components/cart/add_to_cart.html' %}
|
||||
</div>
|
||||
</article>
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
{% block main %}
|
||||
{% include 'components/generic/navbar.html' %}
|
||||
<div>
|
||||
<div class="mt-24">
|
||||
{% include 'components/products/list_filters.html' %}
|
||||
<section
|
||||
class="px-8"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
|
||||
<ul class="product-grid">
|
||||
<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 %}
|
||||
<li>
|
||||
{% include 'components/product_card.html' %}
|
||||
@@ -12,7 +12,6 @@
|
||||
<div class="flex justify-center items-center">
|
||||
{% if has_previous_page %}
|
||||
<button type="button"
|
||||
|
||||
hx-get="{% url 'web:list_products' %}{% querystring page=page.previous_page_number %}"
|
||||
hx-trigger="click"
|
||||
hx-target="#products"
|
||||
@@ -23,11 +22,10 @@
|
||||
{% endif %}
|
||||
{% if has_next_page %}
|
||||
<button type="button"
|
||||
|
||||
hx-get="{% url 'web:list_products' %}{% querystring page=page.next_page_number %}"
|
||||
hx-trigger="click"
|
||||
hx-target="#products"
|
||||
hx-swap="innerHTML"
|
||||
hx-get="{% url 'web:list_products' %}{% querystring page=page.next_page_number %}"
|
||||
hx-trigger="click"
|
||||
hx-target="#products"
|
||||
hx-swap="innerHTML"
|
||||
>
|
||||
{% translate 'Siguiente' %}
|
||||
</button>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
{% for item in items %}
|
||||
<div
|
||||
class="rounded-lg p-4 shadow-sm md:p-6">
|
||||
class="rounded-lg p-4 shadow-md md:p-6">
|
||||
<div class="space-y-4 md:flex md:items-center md:justify-between md:gap-6 md:space-y-0">
|
||||
<a href="#" class="shrink-0 md:order-1">
|
||||
<img class="h-20 w-20 " src="{{ item.product.images.all.0.s.url }}"
|
||||
@@ -114,7 +114,7 @@
|
||||
<!-- Resumen del pedido -->
|
||||
<div class="mx-auto mt-6 max-w-4xl flex-1 space-y-6 lg:mt-0 lg:w-full">
|
||||
<div
|
||||
class="space-y-4 rounded-lg p-4 shadow-sm sm:p-6">
|
||||
class="space-y-4 rounded-lg p-4 shadow-md sm:p-6">
|
||||
<p class="text-xl font-semibold ">
|
||||
{% translate 'Resumen del pedido' %}</p>
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
<input type="hidden" name="Ds_MerchantParameters" value="{{ merchant_parameters }}"/>
|
||||
<input type="hidden" name="Ds_Signature" value="{{ signature }}"/>
|
||||
|
||||
<button class="flex w-full items-center justify-center rounded-lg px-5 py-2.5 text-sm font-medium text-white hover: focus:outline-none focus:ring-4 focus:ring-primary-300 : :ring-primary-800 cursor-pointer">
|
||||
<button class="btn btn-primary">
|
||||
{% translate 'Pagar' %}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user