forked from brooksbingham/theme-elegance
refactor: simplify the pagination by removing icons and spacer
parent
b84aef50c3
commit
8f81085727
|
@ -22,8 +22,8 @@
|
||||||
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*}
|
*}
|
||||||
<nav class="pagination">
|
<nav class="pagination flex justify-between">
|
||||||
<div class="col-md-4">
|
<div class="flex">
|
||||||
{block name='pagination_summary'}
|
{block name='pagination_summary'}
|
||||||
{l s='Showing %from%-%to% of %total% item(s)' d='Shop.Theme.Catalog' sprintf=['%from%' => $pagination.items_shown_from ,'%to%' => $pagination.items_shown_to, '%total%' => $pagination.total_items]}
|
{l s='Showing %from%-%to% of %total% item(s)' d='Shop.Theme.Catalog' sprintf=['%from%' => $pagination.items_shown_from ,'%to%' => $pagination.items_shown_to, '%total%' => $pagination.total_items]}
|
||||||
{/block}
|
{/block}
|
||||||
|
@ -32,28 +32,22 @@
|
||||||
<div class="col-md-6 offset-md-2 pr-0">
|
<div class="col-md-6 offset-md-2 pr-0">
|
||||||
{block name='pagination_page_list'}
|
{block name='pagination_page_list'}
|
||||||
{if $pagination.should_be_displayed}
|
{if $pagination.should_be_displayed}
|
||||||
<ul class="page-list clearfix text-sm-center">
|
<ul class="flex gap-4">
|
||||||
{foreach from=$pagination.pages item="page"}
|
{foreach from=$pagination.pages item="page"}
|
||||||
|
|
||||||
|
|
||||||
<li {if $page.current} class="current" {/if}>
|
<li {if $page.current} class="current" {/if}>
|
||||||
{if $page.type === 'spacer'}
|
|
||||||
<span class="spacer">…</span>
|
|
||||||
{else}
|
|
||||||
<a
|
<a
|
||||||
rel="{if $page.type === 'previous'}prev{elseif $page.type === 'next'}next{else}nofollow{/if}"
|
rel="{if $page.type === 'previous'}prev{elseif $page.type === 'next'}next{else}nofollow{/if}"
|
||||||
href="{$page.url}"
|
href="{$page.url}"
|
||||||
class="{if $page.type === 'previous'}previous {elseif $page.type === 'next'}next {/if}{['disabled' => !$page.clickable, 'js-search-link' => true]|classnames}"
|
class="flex items-center {if $page.type === 'previous'}previous {elseif $page.type === 'next'}next {/if}{['disabled' => !$page.clickable, 'js-search-link' => true]|classnames}"
|
||||||
>
|
>
|
||||||
{if $page.type === 'previous'}
|
{if $page.type === 'previous'}
|
||||||
<i class="material-icons"></i>{l s='Previous' d='Shop.Theme.Actions'}
|
{l s='Previous' d='Shop.Theme.Actions'}
|
||||||
{elseif $page.type === 'next'}
|
{elseif $page.type === 'next'}
|
||||||
{l s='Next' d='Shop.Theme.Actions'}<i class="material-icons"></i>
|
{l s='Next' d='Shop.Theme.Actions'}
|
||||||
{else}
|
{else}
|
||||||
{$page.page}
|
{$page.page}
|
||||||
{/if}
|
{/if}
|
||||||
</a>
|
</a>
|
||||||
{/if}
|
|
||||||
</li>
|
</li>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in New Issue