diff --git a/templates/_partials/pagination.tpl b/templates/_partials/pagination.tpl index 270b2d7..fda75f8 100644 --- a/templates/_partials/pagination.tpl +++ b/templates/_partials/pagination.tpl @@ -34,7 +34,7 @@ {if $pagination.should_be_displayed} <ul class="flex gap-4"> {foreach from=$pagination.pages item="page"} - <li {if $page.current} class="current" {/if}> + <li {if $page.current} class="current font-bold" {/if}> <a rel="{if $page.type === 'previous'}prev{elseif $page.type === 'next'}next{else}nofollow{/if}" href="{$page.url}" diff --git a/templates/catalog/_partials/facets.tpl b/templates/catalog/_partials/facets.tpl index 3093768..af176b3 100644 --- a/templates/catalog/_partials/facets.tpl +++ b/templates/catalog/_partials/facets.tpl @@ -24,77 +24,56 @@ *} {if $facets|count} <div id="search_filters"> - {* - <div id="search_filter_buttons" class="flex hidden"> - {block name='facets_clearall_button'} - {if $activeFilters|count} - <button id="_desktop_search_filters_clear_all" data-search-url="{$clear_all_link}" class="flex w-6 h-6 flex items-center justify-center select-none js-search-filters-clear-all"> - <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-filter-off hover:stroke-2 cursor-pointer" width="16" height="16" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round"> - <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> - <path d="M8 4h12v2.172a2 2 0 0 1 -.586 1.414l-3.914 3.914m-.5 3.5v4l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227"></path> - <path d="M3 3l18 18"></path> - </svg> - </button> - {else} - <button id="_desktop_search_filters" class="flex w-6 h-6 items-center justify-center select-none"> - <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-filter hover:stroke-2 cursor-pointer" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke-linecap="round" stroke-linejoin="round"> - <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> - <path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"></path> - </svg> - </button> - {/if} - {/block} - </div> - *} <div class="th-accordion"> - {foreach from=$facets item="facet"} - {if !$facet.displayed} - {continue} - {/if} - {if $facet.widgetType === 'dropdown'} - <div class="th-accordion-item border-t border-gray-200 px-4 py-4"> - <h3 class="-mx-2 -my-3 flow-root"> - <!-- Expand/collapse section button --> - <button id="show-filters-{$facet.label}" data-filter-name="{$facet.label}" type="button" class="th-accordion-item-trigger flex w-full items-center justify-between bg-white px-2 py-3 text-gray-400 hover:text-gray-500" aria-controls="filter-section-mobile-0" aria-expanded="false"> - <span class="font-medium text-gray-900"> - {$active_found = false} + {foreach from=$facets item="facet"} + {if !$facet.displayed} + {continue} + {/if} + {if $facet.widgetType === 'dropdown'} + <div class="th-accordion-item border-t border-gray-200 px-4 py-4"> + <h3 class="-mx-2 -my-3 flow-root"> + <!-- Expand/collapse section button --> + <button id="show-filters-{$facet.label}" data-filter-name="{$facet.label}" type="button" class="th-accordion-item-trigger flex w-full items-center justify-between bg-white px-2 py-3 text-gray-400 hover:text-gray-500" aria-controls="filter-section-mobile-0" aria-expanded="false"> + <span class="font-medium text-gray-900"> + {$active_found = false} + {foreach from=$facet.filters item="filter"} + {if $filter.active} + {$filter.label} + {$active_found = true} + {/if} + {/foreach} + {if !$active_found} + {$facet.label} + {/if} + </span> + <span class="ml-6 flex items-center"> + <!-- Expand icon, show/hide based on section open state. --> + <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-chevron-down" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> + <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> + <path d="M6 9l6 6l6 -6"></path> + </svg> + </span> + </button> + </h3> + <!-- Filter section, show/hide based on section state. --> + <div class="th-accordion-item-content pt-6 hidden" id="filter-section-{$facet.label}" data-filter-name="{$facet.label}"> + <div class="flex flex-wrap w-full"> {foreach from=$facet.filters item="filter"} - {if $filter.active} - {$filter.label} - {$active_found = true} + {if !$filter.active} + <a + rel="nofollow" + href="{$filter.nextEncodedFacetsURL}" + class="select-list text-sm w-1/2 p-2 text-center" + > + {$filter.label} + </a> {/if} {/foreach} - {if !$active_found} - {$facet.label} - {/if} - </span> - <span class="ml-6 flex items-center"> - <!-- Expand icon, show/hide based on section open state. --> - <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-chevron-down" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> - <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> - <path d="M6 9l6 6l6 -6"></path> - </svg> - </span> - </button> - </h3> - <!-- Filter section, show/hide based on section state. --> - <div class="th-accordion-item-content pt-6 hidden" id="filter-section-{$facet.label}" data-filter-name="{$facet.label}"> - <div class="flex flex-wrap w-full"> - {foreach from=$facet.filters item="filter"} - {if !$filter.active} - <a - rel="nofollow" - href="{$filter.nextEncodedFacetsURL}" - class="select-list text-sm w-1/2 p-2 text-center" - > - {$filter.label} - </a> - {/if} - {/foreach} + </div> </div> </div> - </div> - {/if} - {/foreach} + {/if} + {/foreach} + </div> </div> {/if} diff --git a/templates/catalog/_partials/miniatures/product.tpl b/templates/catalog/_partials/miniatures/product.tpl index 831f39d..d2a710d 100644 --- a/templates/catalog/_partials/miniatures/product.tpl +++ b/templates/catalog/_partials/miniatures/product.tpl @@ -60,72 +60,3 @@ </a> {/block} -{** - - <article class="product-miniature js-product-miniature flex flex-col shrink-0" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}" itemscope itemtype="http://schema.org/Product"> - <div class="thumbnail-container flex flex-col gap-4"> - {block name='product_thumbnail'} - {if $product.cover} - <a href="{$product.url}" class="thumbnail product-thumbnail w-full aspect-[342/513] bg-gray-100"> - <img - src="{$product.cover.bySize.home_default.url}" - alt="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name|truncate:30:'...'}{/if}" - data-full-size-image-url="{$product.cover.large.url}" - class="object-cover w-full h-full" - /> - </a> - {else} - <a href="{$product.url}" class="thumbnail product-thumbnail w-full aspect-[342/513]"> - <img class="object-fit w-full h-full" src="{$urls.no_picture_image.bySize.home_default.url}" /> - </a> - {/if} - {/block} - - <div class="product-description flex flex-col"> - - {block name='product_price_and_shipping'} - {if $product.show_price} - <div class="product-price-and-shipping flex flex-col"> - {if $product.has_discount} - {hook h='displayProductPriceBlock' product=$product type="old_price"} - - <span class="regular-price">{$product.regular_price}</span> - {if $product.discount_type === 'percentage'} - <span class="discount-percentage discount-product">{$product.discount_percentage}</span> - {elseif $product.discount_type === 'amount'} - <span class="discount-amount discount-product">{$product.discount_amount_to_display}</span> - {/if} - {/if} - - {hook h='displayProductPriceBlock' product=$product type="before_price"} - - <span itemprop="price" class="price text-base font-medium">{$product.price}</span> - - {hook h='displayProductPriceBlock' product=$product type='unit_price'} - - {hook h='displayProductPriceBlock' product=$product type='weight'} - </div> - {/if} - {/block} - {block name='product_name'} - <h2 class="h3 product-title text-lg font-medium" itemprop="name"><a href="{$product.url}">{$product.name|truncate:30:'...'}</a></h2> - {/block} - - {block name='product_reviews'} - {hook h='displayProductListReviews' product=$product} - {/block} - </div> - - <!-- @todo: use include file='catalog/_partials/product-flags.tpl'} --> - - <div class="highlighted-informations{if !$product.main_variants} no-variants{/if} hidden-sm-down"> - - {block name='product_variants'} - {if $product.main_variants} - {include file='catalog/_partials/variant-links.tpl' variants=$product.main_variants} - {/if} - {/block} - </div> - </div> - </article> -*} diff --git a/templates/catalog/_partials/product-additional-info.tpl b/templates/catalog/_partials/product-additional-info.tpl index f4fd6b5..cf8e79a 100644 --- a/templates/catalog/_partials/product-additional-info.tpl +++ b/templates/catalog/_partials/product-additional-info.tpl @@ -22,6 +22,6 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) * International Registered Trademark & Property of PrestaShop SA *} -<div class="product-additional-info"> +<div class="product-additional-info flex flex-col"> {hook h='displayProductAdditionalInfo' product=$product} </div> diff --git a/templates/catalog/_partials/products.tpl b/templates/catalog/_partials/products.tpl index 9c1f5ff..345408a 100644 --- a/templates/catalog/_partials/products.tpl +++ b/templates/catalog/_partials/products.tpl @@ -22,7 +22,7 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) * International Registered Trademark & Property of PrestaShop SA *} -<div id="js-product-list flex flex-col"> +<div id="js-product-list" class="flex flex-col"> <div class="products flex flex-wrap"> {foreach from=$listing.products item="product"} {block name='product_miniature'}