From 3cd759b24791cd94a27d34bf8dfd450bfb76111b Mon Sep 17 00:00:00 2001 From: rozhnovaYana Date: Wed, 11 Sep 2024 14:06:54 +0300 Subject: [PATCH 01/16] updated hidden to findify-hidden --- assets/findify-autocomplete.css | 8 +- assets/findify-autocomplete.js | 6 +- assets/findify-grid.css | 2 +- assets/findify-lazy-loading-pagination.js | 2 +- sections/findify-autocomplete.liquid | 134 +++++++++++----------- snippets/findify-button.liquid | 7 +- 6 files changed, 83 insertions(+), 76 deletions(-) diff --git a/assets/findify-autocomplete.css b/assets/findify-autocomplete.css index 51011ce..e16b7fe 100644 --- a/assets/findify-autocomplete.css +++ b/assets/findify-autocomplete.css @@ -23,7 +23,7 @@ body { .findify-autocomplete .findify-zero-result-container{ text-align: center; } -.findify-autocomplete.hidden { +.findify-autocomplete.findify-hidden { display: none !important; } @@ -373,7 +373,7 @@ body { /* slide-in */ .findify-autocomplete.findify-autocomplete-slide-in, -.findify-autocomplete.findify-autocomplete-slide-in.hidden { +.findify-autocomplete.findify-autocomplete-slide-in.findify-hidden { right: -100%; display: block !important; opacity: 0; @@ -391,7 +391,7 @@ body { } .findify-autocomplete.findify-autocomplete-slide-in, -.findify-autocomplete.findify-autocomplete-slide-in.hidden.animation { +.findify-autocomplete.findify-autocomplete-slide-in.findify-hidden.animation { display: block !important; width: 35%; right: 0; @@ -463,7 +463,7 @@ body { @media (max-width: 768px) { /* slide-in */ .findify-autocomplete.findify-autocomplete-slide-in, - .findify-autocomplete.findify-autocomplete-slide-in.hidden.animation { + .findify-autocomplete.findify-autocomplete-slide-in.findify-hidden.animation { width: 100%; } diff --git a/assets/findify-autocomplete.js b/assets/findify-autocomplete.js index 7d412a8..c4c6eaa 100644 --- a/assets/findify-autocomplete.js +++ b/assets/findify-autocomplete.js @@ -102,9 +102,9 @@ const initFindifyAutocompleteEvents = () => { isEscape || !document .querySelector('.findify-autocomplete') - .className.includes('hidden') + .className.includes('findify-hidden') ) { - document.querySelector('.findify-autocomplete').className += ' hidden'; + document.querySelector('.findify-autocomplete').className += ' findify-hidden'; activeInput?.parentNode?.querySelector('button[type="submit"]')?.focus(); } document.removeEventListener(`keydown`, initTrapFocus); @@ -152,7 +152,7 @@ const initFindifyAutocompleteEvents = () => { '.findify-autocomplete' ).className; document.querySelector('.findify-autocomplete').className = - autocompleteClassName.replace(' hidden', ''); + autocompleteClassName.replace(' findify-hidden', ''); document .querySelector('.findify-close-autocomplete') ?.addEventListener('click', (e) => closeAutocomplete(e)); diff --git a/assets/findify-grid.css b/assets/findify-grid.css index 4d72c83..60f3a0f 100644 --- a/assets/findify-grid.css +++ b/assets/findify-grid.css @@ -138,7 +138,7 @@ b { color: var(--findify-text-color); } -.hidden { +.findify-hidden { display: none !important; } diff --git a/assets/findify-lazy-loading-pagination.js b/assets/findify-lazy-loading-pagination.js index 4a7bd9a..92df53e 100644 --- a/assets/findify-lazy-loading-pagination.js +++ b/assets/findify-lazy-loading-pagination.js @@ -78,7 +78,7 @@ const initFindifyLazyLoadingPagination = ( } if (showLoadMoreButton) { const nextBtnElement = document.getElementById(selectors.nextBtn); - nextBtnElement.classList.toggle('hidden'); + nextBtnElement.classList.toggle('findify-hidden'); } }; diff --git a/sections/findify-autocomplete.liquid b/sections/findify-autocomplete.liquid index 140b0c2..e2bc2fb 100644 --- a/sections/findify-autocomplete.liquid +++ b/sections/findify-autocomplete.liquid @@ -12,79 +12,81 @@
- {% render 'findify-sorting' - , options: sort_options - , default: default_sort_by - , selected: sort_by - , is_modal: true %} + {% render 'findify-sorting', options: sort_options, default: default_sort_by, selected: sort_by, is_modal: true %}
\ No newline at end of file + From 8878bc7877e67da70fb754477762acea2a4a08f5 Mon Sep 17 00:00:00 2001 From: rozhnovaYana Date: Wed, 11 Sep 2024 17:16:56 +0300 Subject: [PATCH 04/16] updated CSS and JS --- assets/findify-autocomplete.css | 165 ++++++++---------------- assets/findify-content-tabs.css | 2 +- assets/findify-content-tabs.js | 4 +- assets/findify-content.js | 2 +- assets/findify-filter-breadcrumb.css | 4 +- assets/findify-filter.css | 52 ++++---- assets/findify-grid.css | 22 ++-- assets/findify-pagination.css | 180 +++++++++++++-------------- assets/findify-product-card.css | 2 +- assets/findify-product-card.js | 6 +- assets/findify-product-swatches.css | 2 +- assets/findify-sidebar-mobile.css | 38 +++--- assets/findify-sorting.css | 10 +- 13 files changed, 216 insertions(+), 273 deletions(-) diff --git a/assets/findify-autocomplete.css b/assets/findify-autocomplete.css index e16b7fe..2a345bd 100644 --- a/assets/findify-autocomplete.css +++ b/assets/findify-autocomplete.css @@ -31,36 +31,36 @@ body { display: none; } -.findify-autocomplete .suggestions-wrapper h3 { +.findify-autocomplete .findify-suggestions-wrapper h3 { font-weight: 400; margin-top: 0; margin-bottom: 0; } -.findify-autocomplete .suggestions-wrapper ul { +.findify-autocomplete .findify-suggestions-wrapper ul { list-style: none; padding-left: 0; margin-top: 20px; } -.findify-autocomplete .suggestions-wrapper a { +.findify-autocomplete .findify-suggestions-wrapper a { color: var(--findify-text-color); font-weight: 300; text-decoration: none; } -.findify-autocomplete .suggestions-wrapper a:hover { +.findify-autocomplete .findify-suggestions-wrapper a:hover { text-decoration: underline; } -.findify-autocomplete .products-wrapper h3 { +.findify-autocomplete .findify-products-wrapper h3 { font-weight: 400; margin-top: 0; margin-bottom: 0; color: var(--findify-text-color); } -.findify-autocomplete .products-container { +.findify-autocomplete .findify-products-container { display: flex; flex-direction: row; flex-wrap: wrap; @@ -69,10 +69,6 @@ body { padding-right: 20px; } -.findify-autocomplete .card-wrapper { - height: auto; -} - .findify-autocomplete .findify-product-card-image-wrapper { height: 90%; } @@ -86,14 +82,14 @@ body { cursor: pointer; } -.findify-autocomplete .products-container > div { +.findify-autocomplete .findify-products-container > div { flex-basis: 25%; max-width: 25%; padding-left: 10px; margin: 0; } -.findify-autocomplete .products-wrapper { +.findify-autocomplete .findify-products-wrapper { padding-left: 15px; } @@ -160,66 +156,28 @@ body { font-weight: bold; } -.findify-autocomplete .content-wrapper h3 { +.findify-autocomplete .findify-content-wrapper h3 { font-weight: 400; margin-top: 0; margin-bottom: 0; } -.findify-autocomplete-content .content-wrapper { +.findify-autocomplete-content .findify-content-wrapper { overflow: hidden; position: relative; width: auto; } -.findify-autocomplete-content .content-container { - width: auto; - position: relative; - flex-wrap: wrap; - display: flex; - margin-left: -10px; - margin-top: 20px; - margin-right: -10px; -} - -.findify-autocomplete-content .content-item { - cursor: pointer; - position: relative; - width: calc(50% - 10px); - padding-left: 10px; - margin-bottom: 10px; -} - -.findify-autocomplete-content .content-item .content_image { - width: 100%; - padding-bottom: 100%; - position: relative; - overflow: hidden; - display: block !important; -} - -.findify-autocomplete-content .content-item img { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - width: 100%; - height: 100%; - -o-object-fit: cover; - object-fit: cover; -} - /* horizontal suggestions */ /* Not currently in use */ @media (min-width: 767px) { - .findify-autocomplete .suggestions-wrapper.suggestions-horizontal ul { + .findify-autocomplete .findify-suggestions-wrapper.findify-suggestions-horizontal ul { display: flex; flex-wrap: wrap; margin-top: 20px; } - .findify-autocomplete .suggestions-wrapper.suggestions-horizontal ul li { + .findify-autocomplete .findify-suggestions-wrapper.findify-suggestions-horizontal ul li { background: #d3d3d3; padding: 2px 10px; border-radius: 90px; @@ -239,12 +197,12 @@ body { cursor: pointer; } - .findify-autocomplete .suggestions-wrapper.suggestions-horizontal ul li:hover { + .findify-autocomplete .findify-suggestions-wrapper.findify-suggestions-horizontal ul li:hover { cursor: pointer; background: #d9d9d9; } - .findify-autocomplete .suggestions-wrapper.suggestions-horizontal ul li a { + .findify-autocomplete .findify-suggestions-wrapper.findify-suggestions-horizontal ul li a { text-decoration: none; color: #000; height: auto; @@ -255,13 +213,13 @@ body { @media (max-width: 767px) { - .findify-autocomplete .suggestions-wrapper.mobile-horizontal ul { + .findify-autocomplete .findify-suggestions-wrapper.findify-mobile-horizontal ul { display: flex; flex-wrap: wrap; margin-top: 20px; } - .findify-autocomplete .suggestions-wrapper.mobile-horizontal ul li { + .findify-autocomplete .findify-suggestions-wrapper.findify-mobile-horizontal ul li { background: #d3d3d3; padding: 2px 10px; border-radius: 90px; @@ -281,12 +239,12 @@ body { cursor: pointer; } - .findify-autocomplete .suggestions-wrapper.mobile-horizontal ul li:hover { + .findify-autocomplete .findify-suggestions-wrapper.findify-mobile-horizontal ul li:hover { cursor: pointer; background: #d9d9d9; } - .findify-autocomplete .suggestions-wrapper.mobile-horizontal ul li a { + .findify-autocomplete .findify-suggestions-wrapper.findify-mobile-horizontal ul li a { text-decoration: none; color: #000; height: auto; @@ -297,10 +255,10 @@ body { } -.findify-autocomplete .suggestions-wrapper .findify-suggestion-item a { +.findify-autocomplete .findify-suggestions-wrapper .findify-suggestion-item a { color: #c0c0c0; } -.findify-autocomplete .suggestions-wrapper .findify-suggestion-item a span { +.findify-autocomplete .findify-suggestions-wrapper .findify-suggestion-item a span { color: #1c1d1d; } /* end */ @@ -318,11 +276,11 @@ body { width: 100%; } -.findify-autocomplete-dropdown .suggestions-wrapper h3 { +.findify-autocomplete-dropdown .findify-suggestions-wrapper h3 { padding-left: 20px; } -.findify-autocomplete-dropdown .products-wrapper h3 { +.findify-autocomplete-dropdown .findify-products-wrapper h3 { } .findify-autocomplete-dropdown @@ -330,7 +288,7 @@ body { a.findify-view-all { } -.findify-autocomplete-dropdown .suggestions-wrapper ul { +.findify-autocomplete-dropdown .findify-suggestions-wrapper ul { padding-left: 20px; } @@ -347,24 +305,24 @@ body { .findify-autocomplete-fullscreen .findify-autocomplete-content { display: flex; } -.findify-autocomplete-fullscreen.suggestions-horizontal .findify-autocomplete-content{ +.findify-autocomplete-fullscreen.findify-suggestions-horizontal .findify-autocomplete-content{ flex-direction: column; } -.findify-autocomplete-fullscreen .suggestions-wrapper { +.findify-autocomplete-fullscreen .findify-suggestions-wrapper { flex: 0.5; } -.findify-autocomplete-fullscreen .suggestions-wrapper h2 { +.findify-autocomplete-fullscreen .findify-suggestions-wrapper h2 { padding-left: 30px; color: var(--findify-text-color); } -.findify-autocomplete-fullscreen .suggestions-wrapper ul { +.findify-autocomplete-fullscreen .findify-suggestions-wrapper ul { padding-left: 30px; } -.findify-autocomplete-fullscreen .products-wrapper { +.findify-autocomplete-fullscreen .findify-products-wrapper { padding-left: 30px; flex: 2; } @@ -385,13 +343,7 @@ body { overflow: scroll; } -.findify-autocomplete.findify-autocomplete-slide-in.animation-slide-back { - right: -100%; - transition: right 0.5s ease-in; -} - -.findify-autocomplete.findify-autocomplete-slide-in, -.findify-autocomplete.findify-autocomplete-slide-in.findify-hidden.animation { +.findify-autocomplete.findify-autocomplete-slide-in { display: block !important; width: 35%; right: 0; @@ -431,7 +383,7 @@ body { position: relative; } -.findify-autocomplete.findify-autocomplete-slide-in .products-container { +.findify-autocomplete.findify-autocomplete-slide-in .findify-products-container { padding-right: 0; } @@ -441,11 +393,11 @@ body { padding-right: 0; } -.findify-autocomplete.findify-autocomplete-slide-in .products-wrapper { +.findify-autocomplete.findify-autocomplete-slide-in .findify-products-wrapper { padding-left: 0; } -.findify-autocomplete.findify-autocomplete-slide-in .products-container > div { +.findify-autocomplete.findify-autocomplete-slide-in .findify-products-container > div { flex-basis: 50%; max-width: 50%; } @@ -454,7 +406,7 @@ body { /* desktop */ @media (min-width: 767px) { - .view-all-top { + .findify-view-all-top { display: none; } } @@ -462,12 +414,11 @@ body { /* mobile */ @media (max-width: 768px) { /* slide-in */ - .findify-autocomplete.findify-autocomplete-slide-in, - .findify-autocomplete.findify-autocomplete-slide-in.findify-hidden.animation { + .findify-autocomplete.findify-autocomplete-slide-in { width: 100%; } - .findify-autocomplete.findify-autocomplete-slide-in .products-wrapper { + .findify-autocomplete.findify-autocomplete-slide-in .findify-products-wrapper { padding-left: 0; } @@ -490,12 +441,12 @@ body { } /* - .findify-autocomplete .products-container > div{ + .findify-autocomplete .findify-products-container > div{ flex-basis: 50%; max-width: 50%; } */ - .findify-autocomplete .products-container > div { + .findify-autocomplete .findify-products-container > div { flex-basis: auto; max-width: initial; } @@ -506,21 +457,21 @@ body { white-space: normal; } - .findify-autocomplete-fullscreen .products-wrapper { + .findify-autocomplete-fullscreen .findify-products-wrapper { padding-top: 15px; } - .findify-autocomplete-fullscreen .suggestions-wrapper h2, - .findify-autocomplete-fullscreen .suggestions-wrapper ul, - .findify-autocomplete-fullscreen .products-wrapper, - .findify-autocomplete-dropdown .suggestions-wrapper h3, - .findify-autocomplete-dropdown .suggestions-wrapper ul, - .findify-autocomplete .products-wrapper { + .findify-autocomplete-fullscreen .findify-suggestions-wrapper h2, + .findify-autocomplete-fullscreen .findify-suggestions-wrapper ul, + .findify-autocomplete-fullscreen .findify-products-wrapper, + .findify-autocomplete-dropdown .findify-suggestions-wrapper h3, + .findify-autocomplete-dropdown .findify-suggestions-wrapper ul, + .findify-autocomplete .findify-products-wrapper { padding-left: 0; } - .findify-autocomplete .suggestions-wrapper ul, - .findify-autocomplete .suggestions-wrapper.suggestions-horizontal ul { + .findify-autocomplete .findify-suggestions-wrapper ul, + .findify-autocomplete .findify-suggestions-wrapper.findify-suggestions-horizontal ul { margin-top: 10px; } @@ -538,29 +489,29 @@ body { align-items: flex-end; } - .findify-autocomplete .products-container { + .findify-autocomplete .findify-products-container { padding-right: 0; flex-direction: column; flex-wrap: nowrap; } - .findify-autocomplete .products-container.mobile-products-per-row-2{ + .findify-autocomplete .findify-products-container.findify-mobile-products-per-row-2{ flex-direction: row; flex-wrap: wrap; } - .findify-autocomplete .products-container.mobile-products-per-row-2 div.findify-product-card{ + .findify-autocomplete .findify-products-container.findify-mobile-products-per-row-2 div.findify-product-card{ max-width: 50%; width: 50%; } - #findify-autocomplete .products-container.mobile-products-per-row-2 .findify-product-card{ + #findify-autocomplete .findify-products-container.findify-mobile-products-per-row-2 .findify-product-card{ flex-direction: column } - .view-all-bottom { + .findify-view-all-bottom { display: none; } /* dropdown end */ - .findify-autocomplete-content .content-wrapper { + .findify-autocomplete-content .findify-content-wrapper { margin-top: 10px; } @@ -576,16 +527,13 @@ body { width: 100%; } - #findify-autocomplete .findify-product-card .content-wrapper { + #findify-autocomplete .findify-product-card .findify-content-wrapper { display: flex; flex-direction: column; margin-left: 15px; width: 100%; } - #findify-autocomplete .price { - margin-top: 15px; - } } /* AUTOCOMPLETE CONTENT */ @@ -599,15 +547,10 @@ body { display: flex; flex-direction: column; } - .autocomplete-content-title { + .findify-autocomplete-content-title { font-weight: 400; margin-top: 0; margin-bottom: 0; color: var(--findify-text-color); } - .autocomplete-empty-content{ - font-size: 12px; - margin-top: 6px; - color: var(--findify-text-secondary-color) - } } diff --git a/assets/findify-content-tabs.css b/assets/findify-content-tabs.css index e427e49..2808624 100644 --- a/assets/findify-content-tabs.css +++ b/assets/findify-content-tabs.css @@ -26,7 +26,7 @@ .findify-tab:disabled > label { color: #c0c0c0; } -.findify-tab.active { +.findify-tab.findify-active { pointer-events: none; color: var(--findify-text-color); cursor: default; diff --git a/assets/findify-content-tabs.js b/assets/findify-content-tabs.js index 940c03a..9198ad7 100644 --- a/assets/findify-content-tabs.js +++ b/assets/findify-content-tabs.js @@ -25,10 +25,10 @@ const initFindifyTabsEvents = () => { } tabs = document.querySelectorAll(selectors.tab); for (i = 0; i < tabs.length; i++) { - tabs[i].className = tabs[i].className.replace(" active", ""); + tabs[i].className = tabs[i].className.replace(" findify-active", ""); } document.getElementById(selectors.id(tab_id)).style.display = "block"; - event.currentTarget.className += " active"; + event.currentTarget.className += " findify-active"; }; const init = () => { diff --git a/assets/findify-content.js b/assets/findify-content.js index bf58222..edd38e7 100644 --- a/assets/findify-content.js +++ b/assets/findify-content.js @@ -143,7 +143,7 @@ const initFindifyContentEvents = () => { const initPagination = () => { const links = document.querySelectorAll( - `#${id}-content .pagination__item.link` + `#${id}-content .findify-pagination__item.link` ); links.forEach((link) => diff --git a/assets/findify-filter-breadcrumb.css b/assets/findify-filter-breadcrumb.css index ba8226f..995c105 100644 --- a/assets/findify-filter-breadcrumb.css +++ b/assets/findify-filter-breadcrumb.css @@ -13,7 +13,7 @@ background: unset; } -.findify-filters-breadcrumbs-show-more.open svg { +.findify-filters-breadcrumbs-show-more.findify-open svg { transform: rotate(180deg); } @@ -23,7 +23,7 @@ } .findify-filters-breadcrumb-item .solid-circle, -.findify-filters-breadcrumb-item .circle-with-label { +.findify-filters-breadcrumb-item .findify-circle-with-label { height: 25px; width: 25px; } diff --git a/assets/findify-filter.css b/assets/findify-filter.css index e8132ef..5ba021c 100644 --- a/assets/findify-filter.css +++ b/assets/findify-filter.css @@ -28,38 +28,38 @@ #findify-filters-price .findify-filters--body-container{ margin-top: 10px; } -.price-input-container { +.findify-price-input-container { width: 100%; margin-top: 10px; padding: 0 10px; } -.price-input .price-field { +.findify-price-input .findify-price-field { display: flex; margin-bottom: 22px; } -.price-field span { +.findify-price-field span { margin-right: 10px; margin-top: 6px; font-size: 17px; } -.price-field input { +.findify-price-field input { font-size: 15px; font-family: "DM Sans", sans-serif; border-radius: 9px; border: 0px; width: 100%; } -.price-field input.min-input{ +.findify-price-field input.findify-min-input{ text-align: left; } -.price-field input.max-input{ +.findify-price-field input.findify-max-input{ text-align: right; } -.price-input { +.findify-price-input { display: flex; width: 100%; font-size: 19px; @@ -75,18 +75,18 @@ input::-webkit-inner-spin-button { margin: 0; } -.slider-container { +.findify-slider-container { width: 100%; } -.slider-container { +.findify-slider-container { height: 6px; position: relative; background: #e4e4e4; border-radius: 5px; } -.slider-container .price-slider { +.findify-slider-container .findify-price-slider { height: 100%; left: 0; right: 0; @@ -95,11 +95,11 @@ input::-webkit-inner-spin-button { background: #01940b; } -.range-input { +.findify-range-input { position: relative; } -.range-input input { +.findify-range-input input { position: absolute; width: 100%; height: 5px; @@ -133,7 +133,7 @@ button { } /* SECTION - HEADER & BODY EXPAND */ -.findify-search-section.filters-horizontal .findify-filters-body{ +.findify-search-section.findify-filters-horizontal .findify-filters-body{ position: absolute; z-index: 3; background: #fff; @@ -161,10 +161,10 @@ button { width: 260px; position: relative; } -.findify-filters-wrapper.absolute{ +.findify-filters-wrapper.findify-absolute{ position: absolute; } -.findify-filters-wrapper.fixed{ +.findify-filters-wrapper.findify-fixed{ position: fixed; top: 0; z-index: 3; @@ -353,14 +353,14 @@ button { /* ENDSECTION */ /* SECTION - Color filter */ -.body-wrapper-layout-color { +.findify-body-wrapper-layout-color { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 12px 0 10px; } -.body-wrapper-layout-color_with_label { +.findify-body-wrapper-layout-color_with_label { display: flex; flex-direction: column; gap: 3px; @@ -371,12 +371,12 @@ button { align-items: center; } -.solid-circle { +.findify-solid-circle { height: 35px; width: 35px; } -.circle-with-label { +.findify-circle-with-label { height: 30px; width: 30px; } @@ -389,7 +389,7 @@ button { /* ENDSECTION */ -.findify-filters-sidebar.open { +.findify-filters-sidebar.findify-open { display: flex; width: 260px } @@ -452,12 +452,12 @@ button { } /* SECTION - Price range filter */ -.price-range-container { +.findify-price-range-container { display: flex; justify-content: space-between; padding: 5px 12px 0 10px; } -.price-range-content { +.findify-price-range-content { display: flex; gap: 5px; } @@ -470,7 +470,7 @@ button { background: #fff; } -.price-range-input { +.findify-price-range-input { box-shadow: none; max-width: 50px; height: 30px; @@ -484,14 +484,14 @@ button { } /* Chrome, Safari, Edge, Opera */ -.price-range-input::-webkit-outer-spin-button, -.price-range-input::-webkit-inner-spin-button { +.findify-price-range-input::-webkit-outer-spin-button, +.findify-price-range-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } /* Firefox */ -.price-range-input[type="number"] { +.findify-price-range-input[type="number"] { -moz-appearance: textfield; } diff --git a/assets/findify-grid.css b/assets/findify-grid.css index 60f3a0f..fa6d054 100644 --- a/assets/findify-grid.css +++ b/assets/findify-grid.css @@ -1,28 +1,28 @@ -.findify-search-section.filters-right .desktop{ +.findify-search-section.findify-filters-right .findify-desktop{ overflow: hidden; } -.findify-search-section.filters-right .desktop .findify-search-header-toolbar, -.findify-search-section.filters-right .findify-search-main{ +.findify-search-section.findify-filters-right .findify-desktop .findify-search-header-toolbar, +.findify-search-section.findify-filters-right .findify-search-main{ flex-direction: row-reverse; } -.findify-search-section.filters-right .findify-search-main { +.findify-search-section.findify-filters-right .findify-search-main { flex-direction: row-reverse; } @media (min-width: 768px) { - .findify-search-section.filters-horizontal .findify-search-main{ + .findify-search-section.findify-filters-horizontal .findify-search-main{ flex-wrap: wrap; } - .findify-search-section.filters-horizontal .findify-filters-sidebar.open{ + .findify-search-section.findify-filters-horizontal .findify-filters-sidebar.findify-open{ width: 100%; flex-wrap: wrap; } - .findify-search-section.filters-horizontal .findify-filters-wrapper{ + .findify-search-section.findify-filters-horizontal .findify-filters-wrapper{ width: 100%; flex-direction: row; flex-wrap: wrap; max-width: 1100px; } - .findify-search-section.filters-horizontal #shopify-section-findify-filter-group{ + .findify-search-section.findify-filters-horizontal #shopify-section-findify-filter-group{ min-width: 210px; max-width: 210px; } @@ -147,10 +147,10 @@ b { display: none; } - .findify-search-section.filters-drawer .findify-search-header.mobile{ + .findify-search-section.findify-filters-drawer .findify-search-header.findify-mobile{ display: block; } - .findify-search-header.mobile { + .findify-search-header.findify-mobile { display: none; } @@ -164,7 +164,7 @@ b { } @media (max-width: 768px) { - .findify-search-header.desktop { + .findify-search-header.findify-desktop { display: none; } diff --git a/assets/findify-pagination.css b/assets/findify-pagination.css index 308ebdd..730946c 100644 --- a/assets/findify-pagination.css +++ b/assets/findify-pagination.css @@ -1,90 +1,90 @@ -.findify-pagination-wrapper { - margin-top: 4rem; - margin-bottom: 2rem; -} - -.findify-lazy-loading-pagination-container { - display: flex; - flex-direction: column-reverse; - align-items: center; - justify-content: center; -} - -@media screen and (min-width: 990px) { - .findify-pagination-wrapper { - margin-top: 5rem; - } -} - -.pagination__list { - display: flex; - flex-wrap: wrap; - justify-content: center; -} - -.pagination__list > li { - flex: 1 0 4.4rem; - max-width: 4.4rem; -} - -.pagination__list > li:not(:last-child) { - margin-right: 1rem; -} - -.pagination__item { - color: var(--findify-text-color); - display: inline-flex; - justify-content: center; - align-items: center; - position: relative; - height: 4.4rem; - width: 100%; - padding: 0; - text-decoration: none; -} - -a.pagination__item:hover::after { - height: 0.1rem; -} - -.pagination__item .icon-caret { - height: 0.6rem; -} - -.pagination__item--current::after { - height: 0.1rem; -} - -.pagination__item--current::after, -.pagination__item:hover::after { - content: ""; - display: block; - width: 2rem; - position: absolute; - bottom: 8px; - left: 50%; - transform: translateX(-50%); - background-color: currentColor; -} - -.pagination__item--next svg { - margin-left: -0.2rem; - transform: rotate(90deg); -} - -.pagination__item--next:hover svg { - transform: rotate(90deg) scale(1.07); -} - -.pagination__item--prev svg { - margin-right: -0.2rem; - transform: rotate(-90deg); -} - -.pagination__item--prev:hover svg { - transform: rotate(-90deg) scale(1.07); -} - -.pagination__item-arrow:hover::after { - display: none; -} +.findify-pagination-wrapper { + margin-top: 4rem; + margin-bottom: 2rem; +} + +.findify-lazy-loading-pagination-container { + display: flex; + flex-direction: column-reverse; + align-items: center; + justify-content: center; +} + +@media screen and (min-width: 990px) { + .findify-pagination-wrapper { + margin-top: 5rem; + } +} + +.findify-pagination__list { + display: flex; + flex-wrap: wrap; + justify-content: center; +} + +.findify-pagination__list > li { + flex: 1 0 4.4rem; + max-width: 4.4rem; +} + +.findify-pagination__list > li:not(:last-child) { + margin-right: 1rem; +} + +.findify-pagination__item { + color: var(--findify-text-color); + display: inline-flex; + justify-content: center; + align-items: center; + position: relative; + height: 4.4rem; + width: 100%; + padding: 0; + text-decoration: none; +} + +a.findify-pagination__item:hover::after { + height: 0.1rem; +} + +.findify-pagination__item .icon-caret { + height: 0.6rem; +} + +.findify-pagination__item--current::after { + height: 0.1rem; +} + +.findify-pagination__item--current::after, +.findify-pagination__item:hover::after { + content: ""; + display: block; + width: 2rem; + position: absolute; + bottom: 8px; + left: 50%; + transform: translateX(-50%); + background-color: currentColor; +} + +.findify-pagination__item--next svg { + margin-left: -0.2rem; + transform: rotate(90deg); +} + +.findify-pagination__item--next:hover svg { + transform: rotate(90deg) scale(1.07); +} + +.findify-pagination__item--prev svg { + margin-right: -0.2rem; + transform: rotate(-90deg); +} + +.findify-pagination__item--prev:hover svg { + transform: rotate(-90deg) scale(1.07); +} + +.findify-pagination__item-arrow:hover::after { + display: none; +} diff --git a/assets/findify-product-card.css b/assets/findify-product-card.css index 8219e9c..82352ff 100644 --- a/assets/findify-product-card.css +++ b/assets/findify-product-card.css @@ -10,7 +10,7 @@ min-height: 380px; } -.adapt { +.findify-adapt { width: 100%; aspect-ratio: 1/1.5; object-fit: cover; diff --git a/assets/findify-product-card.js b/assets/findify-product-card.js index 8c63392..eff832b 100644 --- a/assets/findify-product-card.js +++ b/assets/findify-product-card.js @@ -39,7 +39,7 @@ const initOnProductCardClick = (id, page, properties) => { const cleanActiveSwatches = (productCard) => { productCard.querySelectorAll('.findify-color-swatch').forEach((swatch) => - swatch.classList.remove('active')); + swatch.classList.remove('findify-active')); } const setProductUrl = (productCard, url) => { @@ -54,7 +54,7 @@ const onSwatchClick = (event, product_url, variant_url, variant_image) => { const productCard = targetedSwatch.closest('div[id].findify-product-card'); const swatchImage = productCard.querySelector(`.findify-product-swatch-image`); - if(targetedSwatch.classList.contains('active')) { + if(targetedSwatch.classList.contains('findify-active')) { cleanActiveSwatches(productCard); setProductUrl(productCard, product_url); @@ -62,7 +62,7 @@ const onSwatchClick = (event, product_url, variant_url, variant_image) => { } else { cleanActiveSwatches(productCard); - targetedSwatch.classList.add('active'); + targetedSwatch.classList.add('findify-active'); setProductUrl(productCard, variant_url); swatchImage.removeAttribute('hidden'); diff --git a/assets/findify-product-swatches.css b/assets/findify-product-swatches.css index 9a22821..aaa7725 100644 --- a/assets/findify-product-swatches.css +++ b/assets/findify-product-swatches.css @@ -32,7 +32,7 @@ position: relative; } -.findify-color-swatch.active { +.findify-color-swatch.findify-active { border: 1px solid green !important; } diff --git a/assets/findify-sidebar-mobile.css b/assets/findify-sidebar-mobile.css index a7936ee..d3cd3b6 100644 --- a/assets/findify-sidebar-mobile.css +++ b/assets/findify-sidebar-mobile.css @@ -8,13 +8,13 @@ } } -.filters-drawer .findify-modal .findify-filters-wrapper, -.filters-drawer .findify-modal .findify-filters-container{ +.findify-filters-drawer .findify-modal .findify-filters-wrapper, +.findify-filters-drawer .findify-modal .findify-filters-container{ width: 100%; } -.findify-search-section.filters-drawer{ - .no-scroll { +.findify-search-section.findify-filters-drawer{ + .findify-no-scroll { overflow: hidden; } @@ -28,31 +28,31 @@ top: 0; } - .left { + .findify-left { left: -100%; } - .right { + .findify-right { right: -100%; } - .findify-modal.animated-left { + .findify-modal.findify-animated-left { transition: 300ms left cubic-bezier(0.77, 0, 0.175, 1); } - .findify-modal.animated-right { + .findify-modal.findify-animated-right { transition: 300ms right cubic-bezier(0.77, 0, 0.175, 1); } - .findify-modal.animated { + .findify-modal.findify-animated { transition: 300ms left cubic-bezier(0.77, 0, 0.175, 1); } - .findify-modal.open-left { + .findify-modal.findify-open-left { left: 0; } - .findify-modal.open-right { + .findify-modal.findify-open-right { right: 0; } @@ -91,7 +91,7 @@ } } @media (max-width: 768px){ - .no-scroll { + .findify-no-scroll { overflow: hidden; } @@ -105,31 +105,31 @@ top: 0; } - .left { + .findify-left { left: -100%; } - .right { + .findify-right { right: -100%; } - .findify-modal.animated-left { + .findify-modal.findify-animated-left { transition: 300ms left cubic-bezier(0.77, 0, 0.175, 1); } - .findify-modal.animated-right { + .findify-modal.findify-animated-right { transition: 300ms right cubic-bezier(0.77, 0, 0.175, 1); } - .findify-modal.animated { + .findify-modal.findify-animated { transition: 300ms left cubic-bezier(0.77, 0, 0.175, 1); } - .findify-modal.open-left { + .findify-modal.findify-open-left { left: 0; } - .findify-modal.open-right { + .findify-modal.findify-open-right { right: 0; } diff --git a/assets/findify-sorting.css b/assets/findify-sorting.css index f18c03e..5d1a1c0 100644 --- a/assets/findify-sorting.css +++ b/assets/findify-sorting.css @@ -35,11 +35,11 @@ transform: rotate(0); } -.findify-sorting.open .findify-sorting-btn { +.findify-sorting.findify-open .findify-sorting-btn { border-bottom: none; } -.findify-sorting.open .findify-sorting-btn > svg { +.findify-sorting.findify-open .findify-sorting-btn > svg { transform: rotate(180deg); } @@ -58,7 +58,7 @@ z-index: 5; } -.findify-sorting.open .findify-sorting-list { +.findify-sorting.findify-open .findify-sorting-list { display: flex; } @@ -80,13 +80,13 @@ } @media (min-width: 767px) { - .findify-sorting.mobile { + .findify-sorting.findify-mobile { display: none; } } @media (max-width: 768px) { - .findify-sorting.desktop { + .findify-sorting.findify-desktop { display: none; } .findify-sorting-sidebar { From ea8d9ba88e86f0199d678b673ce78f880617abe0 Mon Sep 17 00:00:00 2001 From: rozhnovaYana Date: Thu, 12 Sep 2024 10:47:28 +0300 Subject: [PATCH 05/16] added liquid files --- assets/findify-autocomplete.css | 1 + assets/findify-grid.css | 4 +- sections/findify-autocomplete.liquid | 51 ++----- sections/findify-content.liquid | 4 +- sections/findify-filter-group.liquid | 77 ++++++----- sections/findify-grid-collection.liquid | 4 +- sections/findify-grid-search.liquid | 4 +- sections/findify-pagination.liquid | 65 +++++---- sections/findify-product-card.liquid | 67 ++++------ .../findify-autocomplete-content-block.liquid | 2 +- snippets/findify-autocomplete-view-all.liquid | 13 +- snippets/findify-content-tabs.liquid | 2 +- snippets/findify-filter-breadcrumb.liquid | 21 +-- snippets/findify-filter-checkbox.liquid | 28 ++-- snippets/findify-filter-color-value.liquid | 6 +- snippets/findify-filter-color.liquid | 31 +++-- snippets/findify-filter-price-range.liquid | 23 ++-- snippets/findify-filter-range-slider.liquid | 40 +++--- snippets/findify-filters.liquid | 124 ++++++++++-------- snippets/findify-product-image.liquid | 21 +-- snippets/findify-sorting.liquid | 58 +++++--- snippets/findify-toolbar-desktop.liquid | 18 ++- snippets/findify-toolbar-mobile.liquid | 15 ++- 23 files changed, 360 insertions(+), 319 deletions(-) diff --git a/assets/findify-autocomplete.css b/assets/findify-autocomplete.css index 2a345bd..daf355e 100644 --- a/assets/findify-autocomplete.css +++ b/assets/findify-autocomplete.css @@ -141,6 +141,7 @@ body { color: var(--findify-text-secondary-color); padding: 4px; text-decoration: none; + background: initial; } .findify-view-all label { diff --git a/assets/findify-grid.css b/assets/findify-grid.css index fa6d054..8efbc26 100644 --- a/assets/findify-grid.css +++ b/assets/findify-grid.css @@ -23,8 +23,8 @@ max-width: 1100px; } .findify-search-section.findify-filters-horizontal #shopify-section-findify-filter-group{ - min-width: 210px; - max-width: 210px; + min-width: 220px; + max-width: 220px; } } diff --git a/sections/findify-autocomplete.liquid b/sections/findify-autocomplete.liquid index e2bc2fb..e422155 100644 --- a/sections/findify-autocomplete.liquid +++ b/sections/findify-autocomplete.liquid @@ -1,9 +1,7 @@ {% include 'findify-autocomplete-connector' %} {%- if query != '' -%} - {%- assign suggestionsTitle = 'findify.autocomplete.search_suggestions' - | t - -%} + {%- assign suggestionsTitle = 'findify.autocomplete.search_suggestions' | t -%} {%- assign productsTitle = 'findify.autocomplete.product_matches' | t -%} {%- else -%} {%- assign suggestionsTitle = 'findify.autocomplete.trending_searches' | t -%} @@ -12,34 +10,27 @@
{% if results_count == '0' %}
-

- {{ 'findify.search.no_results_for' | t }} "{{ query | url_decode }}" -

+

{{ 'findify.search.no_results_for' | t }} "{{ query | url_decode }}"

{{ 'findify.search.no_results_message' | t }}

{% else %}

{{ suggestionsTitle }}

-
+

{{ productsTitle }}

- {% render 'findify-autocomplete-view-all', - basepath: basepath, - query: query, - position: 'top' - %} + {% render 'findify-autocomplete-view-all', basepath: basepath, query: query, position: 'top' %}
- {% render 'findify-autocomplete-content-block', - contents_param: contents_param, - content: contents[1] - %} + {% render 'findify-autocomplete-content-block', contents_param: contents_param, content: contents[1] %}
- {% render 'findify-autocomplete-view-all', - basepath: basepath, - query: query, - position: 'bottom' - %} + {% render 'findify-autocomplete-view-all', basepath: basepath, query: query, position: 'bottom' %} {% endif %} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/sections/findify-grid-collection.liquid b/sections/findify-grid-collection.liquid index e9a981d..7a3f14b 100644 --- a/sections/findify-grid-collection.liquid +++ b/sections/findify-grid-collection.liquid @@ -20,9 +20,9 @@ {% if one_open_filter == "true" %} findify-one-filter-open {% endif %} {% if all_filters_collapsed == "true" %} findify-filter-collapsed {% endif %} {% if all_filters_hidden == "true" %} findify-filter-hidden {% endif %} - {% if desktop_filter_layout != 'horizontal' %}filters-{{ desktop_filter_position }} {% endif %} + {% if desktop_filter_layout != 'horizontal' %}findify-filters-{{ desktop_filter_position }} {% endif %} {% if disable_search_input == 'true' %} findify-filters-disable_search_input {% endif %} - filters-{{ desktop_filter_layout }} + findify-filters-{{ desktop_filter_layout }} " >
diff --git a/sections/findify-grid-search.liquid b/sections/findify-grid-search.liquid index 81fe9f2..e543ccb 100644 --- a/sections/findify-grid-search.liquid +++ b/sections/findify-grid-search.liquid @@ -42,9 +42,9 @@ {% if one_open_filter == "true" %} findify-one-filter-open {% endif %} {% if all_filters_collapsed == "true" %} findify-filter-collapsed {% endif %} {% if all_filters_hidden == "true" %} findify-filter-hidden {% endif %} - {% if desktop_filter_layout != 'horizontal' %}filters-{{ desktop_filter_position }} {% endif %} + {% if desktop_filter_layout != 'horizontal' %}findify-filters-{{ desktop_filter_position }} {% endif %} {% if disable_search_input == 'true' %} findify-filters-disable_search_input {% endif %} - filters-{{ desktop_filter_layout }}" + findify-filters-{{ desktop_filter_layout }}" > {% if results_count > 0 %} diff --git a/sections/findify-pagination.liquid b/sections/findify-pagination.liquid index cd60a6c..3948072 100644 --- a/sections/findify-pagination.liquid +++ b/sections/findify-pagination.liquid @@ -1,4 +1,14 @@ -{%- assign page_url = content_for_header | split: '"pageurl":"' | last | split: '"' | first | split: request.host | last | replace: '\/', '/' | replace: '%20', ' ' | replace: '\u0026', '&' -%} +{%- assign page_url = content_for_header + | split: '"pageurl":"' + | last + | split: '"' + | first + | split: request.host + | last + | replace: '\/', '/' + | replace: '%20', ' ' + | replace: '\u0026', '&' +-%} {%- assign query_parameters = page_url | split: 'sections=findify-pagination&' | last -%} @@ -18,7 +28,7 @@ {%- assign next_title = nextPieces[1] -%} {%- assign next_url = nextPieces[2] | replace: '$', '&' -%} -{% if next_is_link contains "false" %} +{% if next_is_link contains 'false' %} {% assign next = false %} {% endif %} @@ -27,7 +37,7 @@ {%- assign previous_title = prevPieces[1] -%} {%- assign previous_url = prevPieces[2] | replace: '$', '&' -%} -{% if previous_is_link contains "false" %} +{% if previous_is_link contains 'false' %} {% assign previous = false %} {% endif %} @@ -36,15 +46,17 @@