update
This commit is contained in:
@@ -4,8 +4,10 @@
|
||||
<!-- Breadcrumb -->
|
||||
<div class="flex items-center gap-2 text-[13px]">
|
||||
<a href="/" class="text-black cursor-pointer hover:text-[#e4057c]">Trang chủ</a>
|
||||
<img src="image/icon_arrow_next.svg" alt="" class="w-[10px] h-[10px]" />
|
||||
<span class="text-black font-medium">{{ page.current_category.name }}</span>
|
||||
<svg class="w-2.5 h-2.5 text-[#888]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>
|
||||
</svg>
|
||||
<span class="text-black font-medium">{{ page.current_category.name | strip }}</span>
|
||||
</div>
|
||||
|
||||
<!-- Banner Sale -->
|
||||
@@ -19,29 +21,41 @@
|
||||
<div class="absolute bottom-[23px] left-[12px] right-[12px] flex gap-3">
|
||||
{% for _product in page.product_list limit:5 %}
|
||||
<a href="/product/detail?id={{ _product.productId }}"
|
||||
class="relative bg-white border border-[#dcdcdc] rounded-[8px] w-[226px] h-[426px] shrink-0 px-[9px] py-[10px] flex flex-col gap-[8px] no-underline">
|
||||
<div class="h-[173px] flex items-center justify-center">
|
||||
class="relative bg-white border border-[#dcdcdc] rounded-[8px] w-[226px] h-[426px] shrink-0 px-[7px] pt-[10px] pb-[8px] flex flex-col gap-[8px] no-underline">
|
||||
<div class="absolute left-[7px] top-[8px] z-[1] flex items-center gap-[8px]">
|
||||
{% if _product.productType.isNew == 1 %}
|
||||
<span
|
||||
class="inline-flex items-center justify-center h-4 rounded-[4px] bg-[#fff1f1] px-[5px] text-[10px] leading-none tracking-[-0.2px] text-[#e40000]">Mẫu
|
||||
mới</span>
|
||||
{% endif %}
|
||||
<span
|
||||
class="inline-flex items-center justify-center h-4 rounded-[4px] bg-[#f1f1f1] px-[6px] text-[10px] leading-none tracking-[-0.2px] text-[#484848]">Trả
|
||||
chậm 0%</span>
|
||||
</div>
|
||||
|
||||
<div class="h-[173px] mt-[20px] flex items-center justify-center">
|
||||
<img src="{{ _product.productImage.large }}" alt="{{ _product.productName }}"
|
||||
class="w-[173px] h-[173px] rounded-[4px] object-cover"
|
||||
onerror="this.onerror=null;this.src='{{ no_image_url }}'" />
|
||||
</div>
|
||||
{% if _product.label != '' %}
|
||||
|
||||
<div class="inline-flex w-fit h-5 items-center gap-1 rounded-full pl-1 pr-[10px] text-white text-[10px] font-medium tracking-[-0.2px]"
|
||||
style="background:linear-gradient(89.82deg,#ff0000 2.38%,#cc0003 94.82%)">
|
||||
<span class="w-4 h-4 rounded-full bg-white flex items-center justify-center overflow-hidden"><img
|
||||
src="{{ 'icon_gift.png' | asset_url }}" alt=""
|
||||
class="w-[11px] h-[11px] object-contain" /></span>
|
||||
<span>{{ _product.label }}</span>
|
||||
<span>{{ _product.label | strip | default: 'Sắm tết vô tư' }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="flex items-center gap-[6px]">
|
||||
{% if _product.price > 0 %}
|
||||
<p class="m-0 text-[18px] leading-none font-bold text-[#db0000] tracking-[-0.36px]">{{
|
||||
_product.price | number_format }} <span class="underline">đ</span></p>
|
||||
{% if _product.price_off != '' %}
|
||||
_product.price | format_number }} <span class="underline">đ</span></p>
|
||||
{% assign _price_off = _product.price_off | strip %}
|
||||
{% if _price_off != '' and _price_off != '0' %}
|
||||
<span
|
||||
class="min-w-[35px] h-4 px-[7px] rounded-full bg-[#ffeef0] text-[#dc0d28] text-[10px] leading-none font-medium tracking-[-0.2px] inline-flex items-center justify-center">-{{
|
||||
_product.price_off }}%</span>
|
||||
_price_off }}%</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p class="m-0 text-[18px] leading-none font-bold text-[#db0000] tracking-[-0.36px]">Liên hệ</p>
|
||||
@@ -49,12 +63,20 @@
|
||||
</div>
|
||||
{% if _product.marketPrice > 0 %}
|
||||
<p class="m-0 text-[12px] leading-none text-[#c5c5c5] tracking-[-0.24px] line-through">{{
|
||||
_product.marketPrice | number_format }} đ</p>
|
||||
_product.marketPrice | format_number }} đ</p>
|
||||
{% endif %}
|
||||
<p
|
||||
class="m-0 h-[32px] overflow-hidden text-[13px] leading-[16px] font-bold tracking-[-0.26px] text-black">
|
||||
{{ _product.productName }}</p>
|
||||
<div class="mt-auto flex items-center justify-between gap-[6px]">
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<img src="{{ 'product_badge_1.png' | asset_url }}" alt="" class="w-8 h-8 rounded-full object-cover"
|
||||
onerror="this.style.display='none'">
|
||||
<img src="{{ 'product_badge_2.png' | asset_url }}" alt="" class="w-8 h-8 rounded-full object-cover"
|
||||
onerror="this.style.display='none'">
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between gap-[6px]">
|
||||
<div
|
||||
class="inline-flex items-center gap-1 text-[#707070] text-[12px] leading-none tracking-[-0.24px] whitespace-nowrap">
|
||||
<img src="{{ 'icon_rating_star.svg' | asset_url }}" alt="" class="w-[11px] h-[11px]" />
|
||||
@@ -144,47 +166,53 @@
|
||||
{% for _product in page.product_list %}
|
||||
<div
|
||||
class="relative bg-white border border-[#dcdcdc] rounded-[8px] p-[9px] pt-[10px] flex flex-col gap-[10px] h-full">
|
||||
<a href="/product/detail" class="block">
|
||||
<a href="/product/detail?id={{ _product.productId }}" class="block">
|
||||
<img src="{{ _product.productImage.large }}" alt="{{ _product.productName }}"
|
||||
class="w-full aspect-square rounded-[4px] object-cover"
|
||||
onerror="this.onerror=null;this.src='{{ no_image_url }}'" />
|
||||
</a>
|
||||
{% if _product.productType.isSaleOff == 1 %}
|
||||
<span class="inline-block h-5 rounded-full text-white text-[10px] font-medium px-2 leading-5 w-fit"
|
||||
style="background:linear-gradient(89.82deg,#ff0000 2.38%,#cc0003 94.82%)">Sale off</span>
|
||||
{% elsif _product.productType.isHot == 1 %}
|
||||
<span class="inline-block h-5 rounded-full text-white text-[10px] font-medium px-2 leading-5 w-fit"
|
||||
style="background:linear-gradient(89.82deg,#ff6600 2.38%,#cc4400 94.82%)">Hot</span>
|
||||
{% elsif _product.productType.isNew == 1 %}
|
||||
<span class="inline-block h-5 rounded-full text-white text-[10px] font-medium px-2 leading-5 w-fit"
|
||||
style="background:linear-gradient(89.82deg,#0066ff 2.38%,#0044cc 94.82%)">Mới</span>
|
||||
{% endif %}
|
||||
<div class="inline-flex w-fit h-5 items-center gap-1 rounded-full pl-1 pr-[10px] text-white text-[10px] font-medium tracking-[-0.2px]"
|
||||
style="background:linear-gradient(89.82deg,#ff0000 2.38%,#cc0003 94.82%)">
|
||||
<span class="w-4 h-4 rounded-full bg-white flex items-center justify-center overflow-hidden"><img
|
||||
src="{{ 'icon_gift.png' | asset_url }}" alt=""
|
||||
class="w-[11px] h-[11px] object-contain" /></span>
|
||||
<span>{{ _product.label | strip | default: 'Sắm tết vô tư' }}</span>
|
||||
</div>
|
||||
{% if _product.price > 0 %}
|
||||
<div class="flex items-center gap-1">
|
||||
<p class="text-[18px] font-bold text-[#db0000]">{{ _product.price | number_format }} <span
|
||||
class="underline">đ</span></p>
|
||||
{% if _product.price_off != '' and _product.price_off != '0' %}
|
||||
<span class="bg-[#ffeef0] rounded-full px-[7px] py-[2px] text-[10px] font-medium text-[#dc0d28]">-{{
|
||||
_product.price_off }}%</span>
|
||||
<div class="flex items-center gap-[6px]">
|
||||
<p class="text-[18px] leading-none font-bold text-[#db0000] tracking-[-0.36px]">{{ _product.price |
|
||||
format_number }} <span class="underline">đ</span></p>
|
||||
{% assign _price_off = _product.price_off | strip %}
|
||||
{% if _price_off != '' and _price_off != '0' %}
|
||||
<span
|
||||
class="min-w-[35px] h-4 px-[7px] rounded-full bg-[#ffeef0] text-[#dc0d28] text-[10px] leading-none font-medium tracking-[-0.2px] inline-flex items-center justify-center">-{{
|
||||
_price_off }}%</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if _product.marketPrice > 0 %}
|
||||
<p class="text-[12px] text-[#c5c5c5] line-through">{{ _product.marketPrice | number_format }} đ</p>
|
||||
<p class="text-[12px] leading-none text-[#c5c5c5] tracking-[-0.24px] line-through">{{
|
||||
_product.marketPrice | format_number }} đ</p>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p class="text-[18px] font-bold text-[#db0000]">Liên hệ</p>
|
||||
<p class="text-[18px] leading-none font-bold text-[#db0000] tracking-[-0.36px]">Liên hệ</p>
|
||||
{% endif %}
|
||||
<a href="/product/detail" class="text-[13px] font-bold text-black hover:text-[#e4057c] line-clamp-2">{{
|
||||
<a href="/product/detail?id={{ _product.productId }}"
|
||||
class="h-[32px] overflow-hidden text-[13px] leading-[16px] font-bold tracking-[-0.26px] text-black hover:text-[#e4057c]">{{
|
||||
_product.productName
|
||||
}}</a>
|
||||
{% if _product.rating > 0 %}
|
||||
<div class="flex items-center gap-1 text-[12px] text-[#707070]">
|
||||
<img src="{{ 'icon_rating_star.svg' | asset_url }}" alt="" class="w-[11px] h-[11px]" />
|
||||
<span>{{ _product.rating }} · {{ _product.reviewCount }} đánh giá</span>
|
||||
<div class="flex items-center gap-2">
|
||||
<img src="{{ 'product_badge_1.png' | asset_url }}" alt="" class="w-8 h-8 rounded-full object-cover"
|
||||
onerror="this.style.display='none'">
|
||||
<img src="{{ 'product_badge_2.png' | asset_url }}" alt="" class="w-8 h-8 rounded-full object-cover"
|
||||
onerror="this.style.display='none'">
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="mt-auto flex justify-end">
|
||||
<div class="w-6 h-6 bg-[#BBBBBB] rounded-full flex items-center justify-center shadow">
|
||||
<div
|
||||
class="mt-auto flex items-center justify-between gap-[6px] text-[#707070] text-[12px] leading-none tracking-[-0.24px] whitespace-nowrap">
|
||||
<div class="inline-flex items-center gap-1">
|
||||
<img src="{{ 'icon_rating_star.svg' | asset_url }}" alt="" class="w-[11px] h-[11px]" />
|
||||
<span>{{ _product.rating | default: 0 }} · Đã bán {{ _product.reviewCount | default: 0 }}</span>
|
||||
</div>
|
||||
<div class="w-6 h-6 bg-[#BBBBBB] rounded-full flex items-center justify-center shrink-0 shadow">
|
||||
<img src="{{ 'icon_cart_circle.svg' | asset_url }}" alt="" class="w-4 h-4" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -265,4 +293,4 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user