|
|
|
@ -64,23 +64,42 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="a-toolbar"> |
|
|
|
{php} |
|
|
|
$filter_cid = (string)input('cid', ''); |
|
|
|
$filter_all_id = (string)($current_cate['id'] ?? ''); |
|
|
|
if ($filter_cid === '') { |
|
|
|
$filter_cid = $filter_all_id; |
|
|
|
} |
|
|
|
$filter_keywords = (string)input('keywords', ''); |
|
|
|
$filter_is_all = ($filter_cid === $filter_all_id); |
|
|
|
$filter_label = 'Filter by product'; |
|
|
|
if (!$filter_is_all && !empty($sub_cates)) { |
|
|
|
foreach ($sub_cates as $sc) { |
|
|
|
if ((string)($sc['id'] ?? '') === $filter_cid) { |
|
|
|
$filter_label = $sc['title'] ?? $filter_label; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
{/php} |
|
|
|
<div class="a-filter__group"> |
|
|
|
<button type="button" class="a-filter" aria-haspopup="listbox" aria-expanded="false" data-filter-trigger> |
|
|
|
<span>Filter by product</span> |
|
|
|
<button type="button" class="a-filter{if !$filter_is_all} is-selected{/if}" aria-haspopup="listbox" aria-expanded="false" data-filter-trigger> |
|
|
|
<span>{$filter_label}</span> |
|
|
|
<svg class="a-filter__chevron" viewBox="0 0 11.2728 6.90918" width="11" height="7" fill="none" aria-hidden="true"> |
|
|
|
<path d="M0.636353 0.636272L5.63635 5.63627L10.6364 0.63623" stroke="currentColor" stroke-width="1.8" /> |
|
|
|
</svg> |
|
|
|
</button> |
|
|
|
<div class="a-filter__dropdown" data-filter-dropdown hidden> |
|
|
|
<button type="button" class="a-filter__dropdown-item is-active" data-tab="{$current_cate.id}" data-filter-clear>All</button> |
|
|
|
<button type="button" class="a-filter__dropdown-item{if $filter_is_all} is-active{/if}" data-tab="{$current_cate.id}" data-filter-clear>All</button> |
|
|
|
{volist name="sub_cates" id="vo"} |
|
|
|
<button type="button" class="a-filter__dropdown-item" data-tab="{$vo.id}">{$vo.title}</button> |
|
|
|
{php}$vo_id = (string)($vo['id'] ?? '');{/php} |
|
|
|
<button type="button" class="a-filter__dropdown-item{if $filter_cid == $vo_id} is-active{/if}" data-tab="{$vo.id}">{$vo.title}</button> |
|
|
|
{/volist} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<form class="s-search" role="search" data-tab-search> |
|
|
|
<img class="s-search__icon" src="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='24.000000'%20height='24.000000'%20fill='none'%3e%3crect%20id='搜索'%20width='24.000000'%20height='24.000000'%20x='0.000000'%20y='0.000000'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cpath%20id='矢量%203'%20d='M15.8481%2017.1208C14.4808%2018.2114%2012.7482%2018.8633%2010.8633%2018.8633C6.44506%2018.8633%202.86328%2015.2816%202.86328%2010.8633C2.86328%206.445%206.44506%202.86328%2010.8633%202.86328C15.2815%202.86328%2018.8633%206.445%2018.8633%2010.8633C18.8633%2012.7482%2018.2114%2014.4808%2017.1208%2015.8481L21.136%2019.8633L19.8633%2021.136L15.8481%2017.1208ZM17.0632%2010.8633C17.0632%207.43908%2014.2874%204.66326%2010.8633%204.66326C7.4392%204.66326%204.66332%207.43908%204.66332%2010.8633C4.66332%2014.2875%207.4392%2017.0633%2010.8633%2017.0633C14.2874%2017.0633%2017.0632%2014.2875%2017.0632%2010.8633Z'%20fill='rgb(175,181,185)'%20fill-rule='evenodd'%20/%3e%3c/svg%3e" alt="" width="24" height="24" /> |
|
|
|
<input class="s-search__input" type="search" name="keywords" placeholder="Search notice keywords" autocomplete="off" /> |
|
|
|
<input class="s-search__input" type="search" name="keywords" value="{$filter_keywords}" placeholder="Search notice keywords" autocomplete="off" /> |
|
|
|
<button class="s-search__btn" type="submit">Search</button> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
|