Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webumenia 2078 reset icon #1006

Merged
merged 2 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions resources/js/components/catalog-new/ResetButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,32 @@ const props = defineProps<{
<template>
<button
:class="[
'tw-flex tw-items-center tw-border tw-leading-none tw-border-gray-300 tw-bg-white tw-font-normal hover:tw-border-gray-800',
'tw-flex tw-items-center tw-border tw-leading-none tw-border-gray-300 tw-bg-white tw-font-normal hover:tw-border-gray-800 tw-whitespace-nowrap',
props.sm
? 'tw-px-1.5 tw-py-1 tw-text-xs'
: 'tw-px-1.5 tw-py-1 tw-text-xs md:tw-px-4 md:tw-py-1.5 md:tw-text-sm',
]"
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 256 256"
class="tw-mr-1.5 tw-h-4 tw-w-4 tw-fill-current"
viewBox="0 0 14 14"
>
<path
d="M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"
></path>
<g clip-path="url(#a)">
<path
d="M.885.152a.519.519 0 1 0-.733.733l12.963 12.963a.519.519 0 1 0 .733-.733L.885.152ZM4.681 1.919a.54.54 0 0 1 .515.706l.688.686a1.47 1.47 0 0 0 .196-.385h6.66a.467.467 0 1 0 0-.933H6.08a1.475 1.475 0 0 0-2.254-.734l.68.688a.54.54 0 0 1 .175-.028Z"
/>
<path
fill-rule="evenodd"
d="M10.755 5.015c.651 0 1.204.422 1.4 1.007h.586a.467.467 0 1 1 0 .934h-.587a1.475 1.475 0 0 1-1.643.987L9.3 6.733V6.73l-.709-.707h.765a1.475 1.475 0 0 1 1.399-1.007Zm-.54 1.474a.54.54 0 1 1 1.081 0 .54.54 0 0 1-1.081 0ZM5.66 12.496c.65 0 1.203-.422 1.398-1.007h1.871l-.934-.933h-.937a1.475 1.475 0 0 0-2.798 0h-2.6a.467.467 0 1 0 0 .933h2.6a1.475 1.475 0 0 0 1.4 1.007Zm0-2.014a.54.54 0 1 0 0 1.081.54.54 0 0 0 0-1.082Z"
clip-rule="evenodd"
/>
<path d="M1.66 6.022a.467.467 0 1 0 0 .934H4.39l-.955-.934H1.66Z" />
</g>
<defs>
<clipPath id="a"><path d="M0 0h14v14H0z" /></clipPath>
</defs>
</svg>
<slot></slot>
<slot>{{ $t('item.filter.clear') }}</slot>
</button>
</template>
16 changes: 1 addition & 15 deletions resources/views/frontend/catalog-new/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ class="tw-flex tw-justify-end">
<catalog.reset-button
v-on:click="handleYearRangeChange(null)"
class="tw-mb-3">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
</div>
<filter-new-year-slider
Expand Down Expand Up @@ -199,7 +198,6 @@ class="tw-inline-block tw-h-4 tw-w-4"
<catalog.reset-button
v-on:click="clearFilterSelection('color')"
class="tw-mb-2">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
</div>
<filter-new-color-slider
Expand Down Expand Up @@ -383,7 +381,6 @@ class="tw-flex tw-justify-center">
<catalog.reset-button
v-on:click="handleYearRangeChange(null)"
class="tw-mt-2.5">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
</div>
@endslot
Expand Down Expand Up @@ -425,7 +422,6 @@ class="tw-flex tw-justify-center">
<catalog.reset-button
v-on:click="clearFilterSelection('color')"
class="tw-mt-4">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
</div>
@endslot
Expand Down Expand Up @@ -482,7 +478,6 @@ class="tw-pb-2"
<catalog.reset-button class="tw-mr-3"
v-if="query.author.length"
v-on:click="clearFilterSelection('author')">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
@endslot
@slot('body')
Expand Down Expand Up @@ -514,7 +509,6 @@ class="tw-inset-x-0 tw-box-border tw-flex tw-min-h-0 tw-flex-1 tw-flex-col tw-ov
<catalog.reset-button class="tw-mr-3"
v-if="query.work_type.length"
v-on:click="clearFilterSelection('work_type')">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
@endslot
@slot('body')
Expand Down Expand Up @@ -546,7 +540,6 @@ class="tw-inset-x-0 tw-box-border tw-flex tw-min-h-0 tw-flex-1 tw-flex-col tw-ov
<catalog.reset-button class="tw-mr-3"
v-if="query.object_type.length"
v-on:click="clearFilterSelection('object_type')">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
@endslot
@slot('body')
Expand Down Expand Up @@ -577,7 +570,6 @@ class="tw-inset-x-0 tw-box-border tw-flex tw-min-h-0 tw-flex-1 tw-flex-col tw-ov
<catalog.reset-button class="tw-mr-3"
v-if="query.tag.length"
v-on:click="clearFilterSelection('tag')">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
@endslot
@slot('body')
Expand Down Expand Up @@ -609,7 +601,6 @@ class="tw-inset-x-0 tw-box-border tw-flex tw-min-h-0 tw-flex-1 tw-flex-col tw-ov
<catalog.reset-button class="tw-mr-3"
v-if="query.gallery.length"
v-on:click="clearFilterSelection('gallery')">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
@endslot
@slot('body')
Expand Down Expand Up @@ -638,7 +629,6 @@ class="tw-inset-x-0 tw-box-border tw-flex tw-min-h-0 tw-flex-1 tw-flex-col tw-ov
<catalog.reset-button class="tw-mr-3"
v-if="query.technique.length"
v-on:click="clearFilterSelection('technique')">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
@endslot
@slot('body')
Expand Down Expand Up @@ -670,7 +660,6 @@ class="tw-inset-x-0 tw-box-border tw-flex tw-min-h-0 tw-flex-1 tw-flex-col tw-ov
<catalog.reset-button class="tw-mr-3"
v-if="query.topic.length"
v-on:click="clearFilterSelection('topic')">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
@endslot
@slot('body')
Expand Down Expand Up @@ -702,7 +691,6 @@ class="tw-inset-x-0 tw-box-border tw-flex tw-min-h-0 tw-flex-1 tw-flex-col tw-ov
<catalog.reset-button class="tw-mr-3"
v-if="query.medium.length"
v-on:click="clearFilterSelection('medium')">
{{ trans('item.filter.clear') }}
</catalog.reset-button>
@endslot
@slot('body')
Expand Down Expand Up @@ -809,9 +797,7 @@ class="tw-h-4 tw-w-4 tw-fill-current" viewBox="0 0 256 256">
class="mb-4">
<catalog.reset-button v-if="selectedOptionsAsLabels.length"
v-on:click="clearAllSelections" sm>
<span
class="tw-whitespace-nowrap">{{ trans('item.filter.clear') }}
</span>
{{ trans('item.filter.clear_all') }}
</catalog.reset-button>
</transition>
</div>
Expand Down