add clear search input button
This commit is contained in:
parent
2f8ceb831e
commit
53b72e85b9
3 changed files with 21 additions and 4 deletions
|
|
@ -22,10 +22,18 @@
|
|||
x-model="search"
|
||||
>
|
||||
<img
|
||||
x-show="search.length === 0"
|
||||
src="<?= url('assets/images/icons/search.svg') ?>"
|
||||
class="search__icon"
|
||||
alt="Icône loupe indiquant le champ de recherche."
|
||||
>
|
||||
<button
|
||||
x-show="search.length > 0"
|
||||
@click="search = ''"
|
||||
class="search__icon"
|
||||
>
|
||||
<img src="<?= url('assets/images/icons/close.svg') ?>" alt="">
|
||||
</button>
|
||||
</div>
|
||||
<ul class="panel__items">
|
||||
<?php foreach($kirby->collection('years') as $year): ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue