From c51b4be43917bef193a5ab75a9b0ac6ed2132f07 Mon Sep 17 00:00:00 2001 From: Sofia Matulis Date: Mon, 15 Apr 2024 18:06:09 -0400 Subject: [PATCH 001/316] Fix selector for Quick Add Bulk (#3421) --- assets/quick-add-bulk.js | 6 +++--- sections/featured-collection.liquid | 2 +- sections/main-collection-product-grid.liquid | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/assets/quick-add-bulk.js b/assets/quick-add-bulk.js index f61118f23e6..52e2334a396 100644 --- a/assets/quick-add-bulk.js +++ b/assets/quick-add-bulk.js @@ -177,9 +177,9 @@ if (!customElements.get('quick-add-bulk')) { getSectionsToRender() { return [ { - id: `quick-add-bulk-${this.dataset.id}-${this.closest('.collection').dataset.id}`, - section: this.closest('.collection').dataset.id, - selector: `#quick-add-bulk-${this.dataset.id}-${this.closest('.collection').dataset.id}` + id: `quick-add-bulk-${this.dataset.id}-${this.closest('.collection-quick-add-bulk').dataset.id}`, + section: this.closest('.collection-quick-add-bulk').dataset.id, + selector: `#quick-add-bulk-${this.dataset.id}-${this.closest('.collection-quick-add-bulk').dataset.id}` }, { id: 'cart-icon-bubble', diff --git a/sections/featured-collection.liquid b/sections/featured-collection.liquid index a17db852788..65b7a3720f1 100644 --- a/sections/featured-collection.liquid +++ b/sections/featured-collection.liquid @@ -62,7 +62,7 @@ class="color-{{ section.settings.color_scheme }} isolate gradient" >
diff --git a/sections/main-collection-product-grid.liquid b/sections/main-collection-product-grid.liquid index 1eed77761cc..267be57df13 100644 --- a/sections/main-collection-product-grid.liquid +++ b/sections/main-collection-product-grid.liquid @@ -139,14 +139,15 @@ {%- else -%}
    {%- for product in collection.products -%} From b2b5883ea644b2746c951364849df849646806a7 Mon Sep 17 00:00:00 2001 From: Ludo Date: Wed, 17 Apr 2024 05:34:39 -0300 Subject: [PATCH 002/316] run linter in updates files for the latest release (#3422) --- assets/base.css | 20 ++- assets/cart.js | 7 +- assets/component-card.css | 99 ++++++++----- assets/component-menu-drawer.css | 2 +- assets/global.js | 54 ++++--- assets/product-info.js | 8 +- assets/quantity-popover.css | 3 +- assets/quantity-popover.js | 14 +- assets/quick-add-bulk.js | 89 ++++++----- assets/quick-add.css | 18 +-- assets/quick-order-list.css | 20 +-- assets/quick-order-list.js | 206 ++++++++++++++++---------- sections/collapsible-content.liquid | 5 +- sections/contact-form.liquid | 5 +- sections/email-signup-banner.liquid | 4 +- sections/image-banner.liquid | 5 +- sections/image-with-text.liquid | 5 +- sections/main-product.liquid | 2 +- sections/multirow.liquid | 5 +- sections/newsletter.liquid | 4 +- sections/page.liquid | 5 +- sections/rich-text.liquid | 5 +- snippets/product-media-gallery.liquid | 16 +- snippets/product-thumbnail.liquid | 119 ++++++++------- 24 files changed, 409 insertions(+), 311 deletions(-) diff --git a/assets/base.css b/assets/base.css index 34188cf5452..5c3a813b4fa 100644 --- a/assets/base.css +++ b/assets/base.css @@ -2263,13 +2263,25 @@ product-info .loading__spinner:not(.hidden) ~ *, } @keyframes translateAnnouncementSlideIn { - 0% {opacity: 0; transform: translateX(var(--announcement-translate-from))} - 100% {opacity: 1; transform: translateX(0)} + 0% { + opacity: 0; + transform: translateX(var(--announcement-translate-from)); + } + 100% { + opacity: 1; + transform: translateX(0); + } } @keyframes translateAnnouncementSlideOut { - 0% {opacity: 1; transform: translateX(0)} - 100% {opacity: 0; transform: translateX(var(--announcement-translate-to))} + 0% { + opacity: 1; + transform: translateX(0); + } + 100% { + opacity: 0; + transform: translateX(var(--announcement-translate-to)); + } } /* section-header */ diff --git a/assets/cart.js b/assets/cart.js index 7727d7ec629..c9bcc076431 100644 --- a/assets/cart.js +++ b/assets/cart.js @@ -43,7 +43,12 @@ class CartItems extends HTMLElement { } onChange(event) { - this.updateQuantity(event.target.dataset.index, event.target.value, document.activeElement.getAttribute('name'), event.target.dataset.quantityVariantId); + this.updateQuantity( + event.target.dataset.index, + event.target.value, + document.activeElement.getAttribute('name'), + event.target.dataset.quantityVariantId + ); } onCartUpdate() { diff --git a/assets/component-card.css b/assets/component-card.css index 4c6ff1236e3..c72491d8d59 100644 --- a/assets/component-card.css +++ b/assets/component-card.css @@ -58,7 +58,8 @@ top: calc(var(--border-width) * -1); left: calc(var(--border-width) * -1); border-radius: var(--border-radius); - box-shadow: var(--shadow-horizontal-offset) var(--shadow-vertical-offset) var(--shadow-blur-radius) rgba(var(--color-shadow), var(--shadow-opacity)); + box-shadow: var(--shadow-horizontal-offset) var(--shadow-vertical-offset) var(--shadow-blur-radius) + rgba(var(--color-shadow), var(--shadow-opacity)); } /* Needed for gradient continuity with or without animation, the transform scopes the gradient to its container which happens already when animation are turned on */ @@ -138,17 +139,18 @@ padding: 1.3rem 1rem; } -.card:not(.ratio)>.card__content { +.card:not(.ratio) > .card__content { grid-template-rows: max-content minmax(0, 1fr) max-content auto; } .card-information .card__information-volume-pricing-note { margin-top: 0.6rem; - line-height: calc(0.5 + .4 / var(--font-body-scale)); + line-height: calc(0.5 + 0.4 / var(--font-body-scale)); color: rgba(var(--color-foreground), 0.75); } -.card__information-volume-pricing-note--button, .card__information-volume-pricing-note--button.quantity-popover__info-button--icon-with-label { +.card__information-volume-pricing-note--button, +.card__information-volume-pricing-note--button.quantity-popover__info-button--icon-with-label { position: relative; z-index: 1; cursor: pointer; @@ -203,7 +205,10 @@ width: calc(100% + var(--border-width) + 3.5rem); } - .grid--6-col-desktop .card--standard .card__information-volume-pricing-note--button + .global-settings-popup.quantity-popover__info { + .grid--6-col-desktop + .card--standard + .card__information-volume-pricing-note--button + + .global-settings-popup.quantity-popover__info { width: calc(100% + var(--border-width) + 1rem); } } @@ -213,16 +218,29 @@ width: calc(3.5rem / var(--font-body-scale)); } - .grid--2-col-tablet-down .card--card .card__information-volume-pricing-note--button + .global-settings-popup.quantity-popover__info, .grid--2-col-tablet-down .card--standard .card__information-volume-pricing-note--button + .global-settings-popup.quantity-popover__info { + .grid--2-col-tablet-down + .card--card + .card__information-volume-pricing-note--button + + .global-settings-popup.quantity-popover__info, + .grid--2-col-tablet-down + .card--standard + .card__information-volume-pricing-note--button + + .global-settings-popup.quantity-popover__info { left: 50%; transform: translate(-50%); } - .grid--2-col-tablet-down .card--standard .card__information-volume-pricing-note--button + .global-settings-popup.quantity-popover__info { + .grid--2-col-tablet-down + .card--standard + .card__information-volume-pricing-note--button + + .global-settings-popup.quantity-popover__info { width: 100%; } - .grid--2-col-tablet-down .card--card .card__information-volume-pricing-note--button + .global-settings-popup.quantity-popover__info { + .grid--2-col-tablet-down + .card--card + .card__information-volume-pricing-note--button + + .global-settings-popup.quantity-popover__info { width: calc(100% + var(--border-width) + 4rem); } @@ -237,10 +255,10 @@ @media screen and (max-width: 989px) { .card-information quantity-popover .quantity__rules ~ volume-pricing { - margin-top: 0; + margin-top: 0; } - .card-information quantity-popover volume-pricing { + .card-information quantity-popover volume-pricing { margin-top: 4.2rem; } } @@ -267,7 +285,7 @@ justify-self: flex-end; } -.card:not(.card--horizontal)>.card__content>.card__badge { +.card:not(.card--horizontal) > .card__content > .card__badge { margin: 1.3rem; } @@ -278,7 +296,7 @@ width: 100%; } -.card__inner:not(.ratio)>.card__content { +.card__inner:not(.ratio) > .card__content { height: 100%; } @@ -297,7 +315,10 @@ font-size: calc(var(--font-heading-scale) * 1.2rem); } -.card--horizontal .card-information>*:not(.visually-hidden:first-child)+*:not(.rating):not(.card__information-volume-pricing-note) { +.card--horizontal + .card-information + > *:not(.visually-hidden:first-child) + + *:not(.rating):not(.card__information-volume-pricing-note) { margin-top: 0; } @@ -306,7 +327,6 @@ } @media only screen and (min-width: 750px) { - .card--horizontal .card__heading, .card--horizontal .price__container .price-item, .card--horizontal__quick-add { @@ -314,7 +334,7 @@ } } -.card--card.card--media>.card__content { +.card--card.card--media > .card__content { margin-top: calc(0rem - var(--image-padding)); } @@ -361,22 +381,21 @@ } @media screen and (min-width: 990px) { - - .card .media.media--hover-effect>img:only-child, - .card-wrapper .media.media--hover-effect>img:only-child { + .card .media.media--hover-effect > img:only-child, + .card-wrapper .media.media--hover-effect > img:only-child { transition: transform var(--duration-long) ease; } - .card:hover .media.media--hover-effect>img:first-child:only-child, - .card-wrapper:hover .media.media--hover-effect>img:first-child:only-child { + .card:hover .media.media--hover-effect > img:first-child:only-child, + .card-wrapper:hover .media.media--hover-effect > img:first-child:only-child { transform: scale(1.03); } - .card-wrapper:hover .media.media--hover-effect>img:first-child:not(:only-child) { + .card-wrapper:hover .media.media--hover-effect > img:first-child:not(:only-child) { opacity: 0; } - .card-wrapper:hover .media.media--hover-effect>img+img { + .card-wrapper:hover .media.media--hover-effect > img + img { opacity: 1; transition: transform var(--duration-long) ease; transform: scale(1.03); @@ -389,10 +408,10 @@ } .card--standard.card--media .card__inner .card__information, -.card--standard.card--text:not(.card--horizontal)>.card__content .card__heading:not(.card__heading--placeholder), -.card--standard:not(.card--horizontal)>.card__content .card__badge, -.card--standard.card--text.article-card>.card__content .card__information, -.card--standard>.card__content .card__caption { +.card--standard.card--text:not(.card--horizontal) > .card__content .card__heading:not(.card__heading--placeholder), +.card--standard:not(.card--horizontal) > .card__content .card__badge, +.card--standard.card--text.article-card > .card__content .card__information, +.card--standard > .card__content .card__caption { display: none; } @@ -400,18 +419,18 @@ width: 100%; } -.card--standard>.card__content { +.card--standard > .card__content { padding: 0; } -.card--standard>.card__content .card__information { +.card--standard > .card__content .card__information { padding-left: 0; padding-right: 0; } .card--card.card--media .card__inner .card__information, .card--card.card--text .card__inner, -.card--card.card--media>.card__content .card__badge { +.card--card.card--media > .card__content .card__badge { display: none; } @@ -442,7 +461,7 @@ overflow: hidden; } -.card-information>*+* { +.card-information > * + * { margin-top: 0.5rem; } @@ -450,29 +469,32 @@ width: 100%; } -.card-information>* { +.card-information > * { line-height: calc(1 + 0.4 / var(--font-body-scale)); color: rgb(var(--color-foreground)); } -.card-information>.price { +.card-information > .price { color: rgb(var(--color-foreground)); } -.card--horizontal .card-information>.price { +.card--horizontal .card-information > .price { color: rgba(var(--color-foreground), 0.75); } -.card-information>.rating { +.card-information > .rating { margin-top: 0.4rem; } /* Specificity needed due to the changes below */ -.card-information > *:not(.visually-hidden:first-child) + quantity-popover:not(.rating):not(.card__information-volume-pricing-note), .card-information .card__information-volume-pricing-note.card__information-volume-pricing-note--button { +.card-information + > *:not(.visually-hidden:first-child) + + quantity-popover:not(.rating):not(.card__information-volume-pricing-note), +.card-information .card__information-volume-pricing-note.card__information-volume-pricing-note--button { margin-top: 0; } -.card-information>*:not(.visually-hidden:first-child)+*:not(.rating):not(.card__information-volume-pricing-note) { +.card-information > *:not(.visually-hidden:first-child) + *:not(.rating):not(.card__information-volume-pricing-note) { margin-top: 0.7rem; } @@ -494,7 +516,10 @@ border: 0; /* Border is not currently compatible with image shapes for standard cards. */ background-color: transparent; - filter: drop-shadow(var(--shadow-horizontal-offset) var(--shadow-vertical-offset) var(--shadow-blur-radius) rgba(var(--color-shadow), var(--shadow-opacity))); + filter: drop-shadow( + var(--shadow-horizontal-offset) var(--shadow-vertical-offset) var(--shadow-blur-radius) + rgba(var(--color-shadow), var(--shadow-opacity)) + ); } .card--shape.card--standard:not(.card--text) .card__inner:after { diff --git a/assets/component-menu-drawer.css b/assets/component-menu-drawer.css index 4b5c2659051..2fc887dd153 100644 --- a/assets/component-menu-drawer.css +++ b/assets/component-menu-drawer.css @@ -221,7 +221,7 @@ details[open].menu-opening > .menu-drawer__submenu { .menu-drawer .list-social { justify-content: flex-start; - margin-left: -1.25rem + margin-left: -1.25rem; } .menu-drawer .list-social:empty { diff --git a/assets/global.js b/assets/global.js index 6221e726628..86f20390035 100644 --- a/assets/global.js +++ b/assets/global.js @@ -185,18 +185,18 @@ class QuantityInput extends HTMLElement { const previousValue = this.input.value; if (event.target.name === 'plus') { - if ((parseInt(this.input.dataset.min) > parseInt(this.input.step)) && this.input.value == 0) { + if (parseInt(this.input.dataset.min) > parseInt(this.input.step) && this.input.value == 0) { this.input.value = this.input.dataset.min; } else { - this.input.stepUp() - } + this.input.stepUp(); + } } else { this.input.stepDown(); } - + if (previousValue !== this.input.value) this.input.dispatchEvent(this.changeEvent); - if ((this.input.dataset.min === previousValue) && event.target.name === 'minus') { + if (this.input.dataset.min === previousValue && event.target.name === 'minus') { this.input.value = parseInt(this.input.min); } } @@ -373,8 +373,7 @@ class MenuDrawer extends HTMLElement { ); this.querySelectorAll( 'button:not(.localization-selector):not(.country-selector__close-button):not(.country-filter__reset-button)' - ).forEach((button) => button.addEventListener('click', this.onCloseButtonClick.bind(this)) - ); + ).forEach((button) => button.addEventListener('click', this.onCloseButtonClick.bind(this))); } onKeyUp(event) { @@ -779,9 +778,7 @@ class SlideshowComponent extends SliderComponent { this.autoplayButtonIsSetToPlay = true; this.play(); } else { - this.reducedMotion.matches || this.announcementBarArrowButtonWasClicked - ? this.pause() - : this.play(); + this.reducedMotion.matches || this.announcementBarArrowButtonWasClicked ? this.pause() : this.play(); } } @@ -845,10 +842,7 @@ class SlideshowComponent extends SliderComponent { event.target === this.sliderAutoplayButton || this.sliderAutoplayButton.contains(event.target); if (!this.autoplayButtonIsSetToPlay || focusedOnAutoplayButton) return; this.play(); - } else if ( - !this.reducedMotion.matches && - !this.announcementBarArrowButtonWasClicked - ) { + } else if (!this.reducedMotion.matches && !this.announcementBarArrowButtonWasClicked) { this.play(); } } @@ -890,9 +884,7 @@ class SlideshowComponent extends SliderComponent { autoRotateSlides() { const slideScrollPosition = - this.currentPage === this.sliderItems.length - ? 0 - : this.slider.scrollLeft + this.sliderItemOffset; + this.currentPage === this.sliderItems.length ? 0 : this.slider.scrollLeft + this.sliderItemOffset; this.setSlidePosition(slideScrollPosition); this.applyAnimationToAnnouncementBar(); @@ -956,7 +948,7 @@ class SlideshowComponent extends SliderComponent { const slideScrollPosition = this.slider.scrollLeft + this.sliderFirstItemNode.clientWidth * - (this.sliderControlLinksArray.indexOf(event.currentTarget) + 1 - this.currentPage); + (this.sliderControlLinksArray.indexOf(event.currentTarget) + 1 - this.currentPage); this.slider.scrollTo({ left: slideScrollPosition, }); @@ -1110,22 +1102,21 @@ class VariantSelects extends HTMLElement { if (productForm) productForm.handleErrorMessage(); } - updateMedia(html) { const mediaGallerySource = document.querySelector(`[id^="MediaGallery-${this.dataset.section}"] ul`); const mediaGalleryDestination = html.querySelector(`[id^="MediaGallery-${this.dataset.section}"] ul`); const refreshSourceData = () => { const mediaGallerySourceItems = Array.from(mediaGallerySource.querySelectorAll('li[data-media-id]')); - const sourceSet = new Set(mediaGallerySourceItems.map(item => item.dataset.mediaId)); - const sourceMap = new Map(mediaGallerySourceItems.map((item, index) => [item.dataset.mediaId, {item, index}])); + const sourceSet = new Set(mediaGallerySourceItems.map((item) => item.dataset.mediaId)); + const sourceMap = new Map(mediaGallerySourceItems.map((item, index) => [item.dataset.mediaId, { item, index }])); return [mediaGallerySourceItems, sourceSet, sourceMap]; }; if (mediaGallerySource && mediaGalleryDestination) { let [mediaGallerySourceItems, sourceSet, sourceMap] = refreshSourceData(); const mediaGalleryDestinationItems = Array.from(mediaGalleryDestination.querySelectorAll('li[data-media-id]')); - const destinationSet = new Set(mediaGalleryDestinationItems.map(({dataset}) => dataset.mediaId)); + const destinationSet = new Set(mediaGalleryDestinationItems.map(({ dataset }) => dataset.mediaId)); let shouldRefresh = false; // add items from new data not present in DOM @@ -1152,7 +1143,10 @@ class VariantSelects extends HTMLElement { const sourceData = sourceMap.get(destinationItem.dataset.mediaId); if (sourceData && sourceData.index !== destinationIndex) { - mediaGallerySource.insertBefore(sourceData.item, mediaGallerySource.querySelector(`li:nth-of-type(${destinationIndex + 1})`)); + mediaGallerySource.insertBefore( + sourceData.item, + mediaGallerySource.querySelector(`li:nth-of-type(${destinationIndex + 1})`) + ); // refresh source now that it has been modified [mediaGallerySourceItems, sourceSet, sourceMap] = refreshSourceData(); @@ -1160,7 +1154,9 @@ class VariantSelects extends HTMLElement { }); } - document.querySelector(`[id^="MediaGallery-${this.dataset.section}"]`).setActiveMedia(`${this.dataset.section}-${this.currentVariant.featured_media?.id}`); + document + .querySelector(`[id^="MediaGallery-${this.dataset.section}"]`) + .setActiveMedia(`${this.dataset.section}-${this.currentVariant.featured_media?.id}`); // update media modal const modalContent = document.querySelector(`#ProductModal-${this.dataset.section} .product-media-modal__content`); @@ -1173,7 +1169,8 @@ class VariantSelects extends HTMLElement { const sectionId = this.dataset.originalSection ? this.dataset.originalSection : this.dataset.section; fetch( - `${this.dataset.url}?variant=${requestedVariantId}§ion_id=${this.dataset.originalSection ? this.dataset.originalSection : this.dataset.section + `${this.dataset.url}?variant=${requestedVariantId}§ion_id=${ + this.dataset.originalSection ? this.dataset.originalSection : this.dataset.section }` ) .then((response) => response.text()) @@ -1202,7 +1199,9 @@ class VariantSelects extends HTMLElement { this.updateMedia(html); const pricePerItemDestination = document.getElementById(`Price-Per-Item-${this.dataset.section}`); - const pricePerItemSource = html.getElementById(`Price-Per-Item-${this.dataset.originalSection ? this.dataset.originalSection : this.dataset.section}`); + const pricePerItemSource = html.getElementById( + `Price-Per-Item-${this.dataset.originalSection ? this.dataset.originalSection : this.dataset.section}` + ); const volumePricingDestination = document.getElementById(`Volume-${this.dataset.section}`); const qtyRules = document.getElementById(`Quantity-Rules-${this.dataset.section}`); @@ -1232,8 +1231,7 @@ class VariantSelects extends HTMLElement { if (price) price.classList.remove('hidden'); - if (inventoryDestination) - inventoryDestination.classList.toggle('hidden', inventorySource.innerText === ''); + if (inventoryDestination) inventoryDestination.classList.toggle('hidden', inventorySource.innerText === ''); const addButtonUpdated = html.getElementById(`ProductSubmitButton-${sectionId}`); this.toggleAddButton( diff --git a/assets/product-info.js b/assets/product-info.js index 913c179145e..1fa35239125 100644 --- a/assets/product-info.js +++ b/assets/product-info.js @@ -54,7 +54,7 @@ if (!customElements.get('product-info')) { if (max) { this.input.max = max; } else { - this.input.removeAttribute('max') + this.input.removeAttribute('max'); } this.input.value = min; publish(PUB_SUB_EVENTS.quantityUpdate, undefined); @@ -91,10 +91,10 @@ if (!customElements.get('product-info')) { const attributes = ['data-cart-quantity', 'data-min', 'data-max', 'step']; for (let attribute of attributes) { const valueUpdated = updated.getAttribute(attribute); - if (valueUpdated !== null) { - current.setAttribute(attribute, valueUpdated) + if (valueUpdated !== null) { + current.setAttribute(attribute, valueUpdated); } else { - current.removeAttribute(attribute) + current.removeAttribute(attribute); } } } else { diff --git a/assets/quantity-popover.css b/assets/quantity-popover.css index 1aaa4976a7a..617923a2d22 100644 --- a/assets/quantity-popover.css +++ b/assets/quantity-popover.css @@ -100,7 +100,7 @@ quantity-popover quick-order-list-remove-button .button { justify-content: flex-end; } -.quantity-popover__info .volume-pricing-label~.button { +.quantity-popover__info .volume-pricing-label ~ .button { top: -0.2rem; } @@ -163,4 +163,3 @@ quantity-popover .quantity__button:not(:focus-visible):not(.focused), quantity-popover .quantity__input:not(:focus-visible):not(.focused) { background-color: initial; } - diff --git a/assets/quantity-popover.js b/assets/quantity-popover.js index 4795a78b954..af45660bbfa 100644 --- a/assets/quantity-popover.js +++ b/assets/quantity-popover.js @@ -48,12 +48,12 @@ if (!customElements.get('quantity-popover')) { if ((this.mql.matches && !isExpanded) || event.type === 'click') { button.setAttribute('aria-expanded', !isExpanded); - + this.popoverInfo.toggleAttribute('hidden'); - + button.classList.toggle('quantity-popover__info-button--open'); - this.infoButtonDesktop.classList.add('quantity-popover__info-button--icon-only--animation') + this.infoButtonDesktop.classList.add('quantity-popover__info-button--icon-only--animation'); } const isOpen = button.getAttribute('aria-expanded') === 'true'; @@ -62,16 +62,16 @@ if (!customElements.get('quantity-popover')) { button.focus(); button.addEventListener('keyup', (e) => { if (e.key === 'Escape') { - this.closePopover(e) + this.closePopover(e); } - }) + }); } } closePopover(event) { event.preventDefault(); const isButtonChild = this.infoButtonDesktop.contains(event.relatedTarget); - const isPopoverChild = this.popoverInfo.contains(event.relatedTarget) + const isPopoverChild = this.popoverInfo.contains(event.relatedTarget); const button = this.infoButtonDesktop && this.mql.matches ? this.infoButtonDesktop : this.infoButtonMobile; @@ -79,7 +79,7 @@ if (!customElements.get('quantity-popover')) { button.setAttribute('aria-expanded', 'false'); button.classList.remove('quantity-popover__info-button--open'); this.popoverInfo.setAttribute('hidden', ''); - this.infoButtonDesktop.classList.remove('quantity-popover__info-button--icon-only--animation') + this.infoButtonDesktop.classList.remove('quantity-popover__info-button--icon-only--animation'); } this.eventMouseEnterHappened = false; diff --git a/assets/quick-add-bulk.js b/assets/quick-add-bulk.js index 52e2334a396..b0aec8767ba 100644 --- a/assets/quick-add-bulk.js +++ b/assets/quick-add-bulk.js @@ -1,4 +1,3 @@ - if (!customElements.get('quick-add-bulk')) { customElements.define( 'quick-add-bulk', @@ -21,10 +20,9 @@ if (!customElements.get('quick-add-bulk')) { window.pageNumber = decodeURIComponent(pageParams.get('page') || ''); } - connectedCallback() { this.cartUpdateUnsubscriber = subscribe(PUB_SUB_EVENTS.cartUpdate, (event) => { - if (event.source === "quick-add") { + if (event.source === 'quick-add') { return; } // If its another section that made the update @@ -72,9 +70,13 @@ if (!customElements.get('quick-add-bulk')) { } cleanErrorMessageOnType(event) { - event.target.addEventListener('keypress', () => { - event.target.setCustomValidity(''); - }, { once: true }); + event.target.addEventListener( + 'keypress', + () => { + event.target.setCustomValidity(''); + }, + { once: true } + ); } onCartUpdate() { @@ -83,13 +85,15 @@ if (!customElements.get('quick-add-bulk')) { .then((response) => response.text()) .then((responseText) => { const html = new DOMParser().parseFromString(responseText, 'text/html'); - const sourceQty = html.querySelector(`#quick-add-bulk-${this.dataset.id}-${this.closest('.collection').dataset.id}`); + const sourceQty = html.querySelector( + `#quick-add-bulk-${this.dataset.id}-${this.closest('.collection').dataset.id}` + ); if (sourceQty) { this.innerHTML = sourceQty.innerHTML; } resolve(); }) - .catch(e => { + .catch((e) => { console.error(e); reject(e); }); @@ -98,14 +102,14 @@ if (!customElements.get('quick-add-bulk')) { updateCart(event) { this.lastActiveInputId = event.target.getAttribute('data-index'); - this.quantity = this.querySelector('quantity-input') + this.quantity = this.querySelector('quantity-input'); this.quantity.classList.add('quantity__input-disabled'); this.selectProgressBar().classList.remove('hidden'); const body = JSON.stringify({ quantity: event.target.value, id: event.target.getAttribute('data-index'), sections: this.getSectionsToRender().map((section) => section.section), - sections_url: this.getSectionsUrl() + sections_url: this.getSectionsUrl(), }); fetch(`${routes.cart_change_url}`, { ...fetchConfig('javascript'), ...{ body } }) @@ -127,11 +131,11 @@ if (!customElements.get('quick-add-bulk')) { this.renderSections(parsedState); - publish(PUB_SUB_EVENTS.cartUpdate, { source: "quick-add", cartData: parsedState }); - - }).catch((error) => { - console.log(error, 'error') + publish(PUB_SUB_EVENTS.cartUpdate, { source: 'quick-add', cartData: parsedState }); }) + .catch((error) => { + console.log(error, 'error'); + }); } addToCart(event) { @@ -141,10 +145,10 @@ if (!customElements.get('quick-add-bulk')) { items: [ { quantity: parseInt(event.target.value), - id: parseInt(this.dataset.id) - } + id: parseInt(this.dataset.id), + }, ], - sections: this.getSectionsToRender().map((section) => section.section) + sections: this.getSectionsToRender().map((section) => section.section), }); fetch(`${routes.cart_add_url}`, { ...fetchConfig('javascript'), ...{ body } }) @@ -168,10 +172,10 @@ if (!customElements.get('quick-add-bulk')) { this.renderSections(parsedState); publish(PUB_SUB_EVENTS.cartUpdate, { source: 'quick-add', cartData: parsedState }); - - }).catch((error) => { - console.error(error); }) + .catch((error) => { + console.error(error); + }); } getSectionsToRender() { @@ -179,51 +183,60 @@ if (!customElements.get('quick-add-bulk')) { { id: `quick-add-bulk-${this.dataset.id}-${this.closest('.collection-quick-add-bulk').dataset.id}`, section: this.closest('.collection-quick-add-bulk').dataset.id, - selector: `#quick-add-bulk-${this.dataset.id}-${this.closest('.collection-quick-add-bulk').dataset.id}` + selector: `#quick-add-bulk-${this.dataset.id}-${this.closest('.collection-quick-add-bulk').dataset.id}`, }, { id: 'cart-icon-bubble', section: 'cart-icon-bubble', - selector: '.shopify-section' + selector: '.shopify-section', }, { id: 'CartDrawer', selector: '#CartDrawer', - section: 'cart-drawer' - } + section: 'cart-drawer', + }, ]; } getSectionsUrl() { if (window.pageNumber) { - return `${window.location.pathname}?page=${window.pageNumber}` + return `${window.location.pathname}?page=${window.pageNumber}`; } else { - return `${window.location.pathname}` - } + return `${window.location.pathname}`; + } } getSectionInnerHTML(html, selector) { - return new DOMParser() - .parseFromString(html, 'text/html') - .querySelector(selector).innerHTML; + return new DOMParser().parseFromString(html, 'text/html').querySelector(selector).innerHTML; } renderSections(parsedState) { - this.getSectionsToRender().forEach((section => { + this.getSectionsToRender().forEach((section) => { const sectionElement = document.getElementById(section.id); - if (sectionElement && sectionElement.parentElement && sectionElement.parentElement.classList.contains('drawer')) { - parsedState.items.length > 0 ? sectionElement.parentElement.classList.remove('is-empty') : sectionElement.parentElement.classList.add('is-empty'); + if ( + sectionElement && + sectionElement.parentElement && + sectionElement.parentElement.classList.contains('drawer') + ) { + parsedState.items.length > 0 + ? sectionElement.parentElement.classList.remove('is-empty') + : sectionElement.parentElement.classList.add('is-empty'); setTimeout(() => { document.querySelector('#CartDrawer-Overlay').addEventListener('click', this.cart.close.bind(this.cart)); }); } - const elementToReplace = sectionElement && sectionElement.querySelector(section.selector) ? sectionElement.querySelector(section.selector) : sectionElement; + const elementToReplace = + sectionElement && sectionElement.querySelector(section.selector) + ? sectionElement.querySelector(section.selector) + : sectionElement; if (elementToReplace) { - elementToReplace.innerHTML = - this.getSectionInnerHTML(parsedState.sections[section.section], section.selector); + elementToReplace.innerHTML = this.getSectionInnerHTML( + parsedState.sections[section.section], + section.selector + ); } - })); + }); if (this.isEnterPressed) { this.querySelector(`#Quantity-${this.lastActiveInputId}`).select(); @@ -233,5 +246,5 @@ if (!customElements.get('quick-add-bulk')) { this.listenForKeydown(); } } -); + ); } diff --git a/assets/quick-add.css b/assets/quick-add.css index a4eb968f10a..b9d889ad5a9 100644 --- a/assets/quick-add.css +++ b/assets/quick-add.css @@ -82,7 +82,8 @@ margin-top: 0; } -.quick-add-modal__content-info--bulk .price, .quick-add-modal__content-info--bulk .card__information-volume-pricing-note { +.quick-add-modal__content-info--bulk .price, +.quick-add-modal__content-info--bulk .card__information-volume-pricing-note { display: inline-block; } @@ -111,7 +112,7 @@ .quick-add-modal__content-info--bulk .quick-add__product-media, .quick-add-modal__content-info--bulk .quick-add__product-container, -.quick-add-modal__content-info--bulk .quick-add__info { +.quick-add-modal__content-info--bulk .quick-add__info { width: 4.8rem; height: 7rem; } @@ -123,12 +124,12 @@ @media screen and (min-width: 990px) { .quick-add-modal__content-info--bulk .quick-add__product-media, .quick-add-modal__content-info--bulk .quick-add__product-container, - .quick-add-modal__content-info--bulk .quick-add__info { + .quick-add-modal__content-info--bulk .quick-add__info { width: 17rem; height: 22rem; } - .quick-add-modal__content-info--bulk-details, + .quick-add-modal__content-info--bulk-details, .quick-add-modal__content-info--bulk quick-order-list { padding: 0 2.5rem; } @@ -144,7 +145,7 @@ object-fit: cover; } -.quick-add-modal__content-info--bulk .quick-add__info { +.quick-add-modal__content-info--bulk .quick-add__info { display: flex; } @@ -169,18 +170,17 @@ } @media screen and (min-width: 989px) { - .quick-add-modal__content-info--bulk .quick-add__info { + .quick-add-modal__content-info--bulk .quick-add__info { flex-direction: column; position: sticky; top: 0; margin-top: -2.5rem; - padding-top: 2.5rem + padding-top: 2.5rem; } } - @media screen and (max-width: 990px) { - .quick-add-modal__content-info--bulk { + .quick-add-modal__content-info--bulk { flex-direction: column; } } diff --git a/assets/quick-order-list.css b/assets/quick-order-list.css index be0ba2c33f0..e2a3c010ab9 100644 --- a/assets/quick-order-list.css +++ b/assets/quick-order-list.css @@ -25,7 +25,7 @@ quick-order-list .quantity__button { .quick-order-list__total { padding-top: 2rem; - border-top: 0.1rem solid rgba(var(--color-foreground), .08); + border-top: 0.1rem solid rgba(var(--color-foreground), 0.08); } .variant-item__quantity .quantity:before { @@ -139,7 +139,7 @@ quick-order-list .quantity__button { line-height: calc(1 + 0.4 / var(--font-body-scale)); } -.variant-item__details>* { +.variant-item__details > * { margin: 0; max-width: 30rem; } @@ -153,7 +153,7 @@ quick-order-list .quantity__button { display: block; font-size: 1.6rem; letter-spacing: 0.06rem; - line-height: calc(1 + .5 / var(--font-body-scale)); + line-height: calc(1 + 0.5 / var(--font-body-scale)); } .variant-item__sku { @@ -321,8 +321,8 @@ quick-order-list-remove-button:hover .icon-remove { align-self: center; } -.variant-item .loading__spinner:not(.hidden)~*, -.variant-remove-total .loading__spinner:not(.hidden)~* { +.variant-item .loading__spinner:not(.hidden) ~ *, +.variant-remove-total .loading__spinner:not(.hidden) ~ * { visibility: hidden; } @@ -340,14 +340,14 @@ quick-order-list-remove-button:hover .icon-remove { order: 1; } -.variant-item__error-text+svg { +.variant-item__error-text + svg { flex-shrink: 0; width: 1.2rem; margin-right: 0.5rem; margin-top: 0.1rem; } -.variant-item__error-text:empty+svg { +.variant-item__error-text:empty + svg { display: none; } @@ -404,7 +404,7 @@ quick-order-list-remove-button:hover .icon-remove { grid-column: 5 / 3; } - .variant-item--no-media .variant-item__inner~.variant-item__quantity { + .variant-item--no-media .variant-item__inner ~ .variant-item__quantity { grid-column: 1 / 5; } @@ -462,11 +462,11 @@ quick-order-list-remove-button:hover .icon-remove { border-bottom: 0.1rem solid rgba(var(--color-foreground), 0.08); } - .quick-order-list__table th+th { + .quick-order-list__table th + th { padding-left: 5.4rem; } - .quick-order-list__table .quick-order-list__table-heading--wide+.quick-order-list__table-heading--wide { + .quick-order-list__table .quick-order-list__table-heading--wide + .quick-order-list__table-heading--wide { padding-left: 10rem; text-align: right; } diff --git a/assets/quick-order-list.js b/assets/quick-order-list.js index 38d4a15ca0f..bc4d6d0843f 100644 --- a/assets/quick-order-list.js +++ b/assets/quick-order-list.js @@ -22,7 +22,7 @@ if (!customElements.get('quick-order-list-remove-all-button')) { super(); this.quickOrderList = this.closest('quick-order-list'); const allVariants = this.quickOrderList.querySelectorAll('[data-quantity-variant-id]'); - const items = {} + const items = {}; let hasVariantsInCart = false; allVariants.forEach((variant) => { @@ -40,8 +40,8 @@ if (!customElements.get('quick-order-list-remove-all-button')) { this.actions = { confirm: 'confirm', remove: 'remove', - cancel: 'cancel' - } + cancel: 'cancel', + }; this.addEventListener('click', (event) => { event.preventDefault(); @@ -57,12 +57,14 @@ if (!customElements.get('quick-order-list-remove-all-button')) { } toggleConfirmation(showConfirmation, showInfo) { - this.quickOrderList.querySelector('.quick-order-list-total__confirmation').classList.toggle('hidden', showConfirmation); - this.quickOrderList.querySelector('.quick-order-list-total__info').classList.toggle('hidden', showInfo) + this.quickOrderList + .querySelector('.quick-order-list-total__confirmation') + .classList.toggle('hidden', showConfirmation); + this.quickOrderList.querySelector('.quick-order-list-total__info').classList.toggle('hidden', showInfo); } } ); -}; +} if (!customElements.get('quick-order-list')) { customElements.define( @@ -73,10 +75,10 @@ if (!customElements.get('quick-order-list')) { this.cart = document.querySelector('cart-drawer'); this.actions = { add: 'ADD', - update: 'UPDATE' - } + update: 'UPDATE', + }; - this.quickOrderListId = `quick-order-list-${this.dataset.productId}` + this.quickOrderListId = `quick-order-list-${this.dataset.productId}`; this.defineInputsAndQuickOrderTable(); this.variantItemStatusElement = document.getElementById('shopping-cart-variant-item-status'); @@ -90,7 +92,7 @@ if (!customElements.get('quick-order-list')) { if (this.stickyHeaderElement) { this.stickyHeader = { height: this.stickyHeaderElement.offsetHeight, - type: `${this.stickyHeaderElement.getAttribute('data-sticky-type')}` + type: `${this.stickyHeaderElement.getAttribute('data-sticky-type')}`, }; } @@ -99,14 +101,14 @@ if (!customElements.get('quick-order-list')) { window.addEventListener('resize', () => { this.totalBarPosition = window.innerHeight - this.getTotalBar().offsetHeight; - this.stickyHeader.height = this.stickyHeaderElement ? this.stickyHeaderElement.offsetHeight: 0; + this.stickyHeader.height = this.stickyHeaderElement ? this.stickyHeaderElement.offsetHeight : 0; }); } const pageParams = new URLSearchParams(window.location.search); window.pageNumber = decodeURIComponent(pageParams.get('page') || ''); form.addEventListener('submit', this.onSubmit.bind(this)); - this.addMultipleDebounce() + this.addMultipleDebounce(); } cartUpdateUnsubscriber = undefined; @@ -121,9 +123,9 @@ if (!customElements.get('quick-order-list')) { return; } // If its another section that made the update - this.refresh().then(()=> { + this.refresh().then(() => { this.defineInputsAndQuickOrderTable(); - this.addMultipleDebounce() + this.addMultipleDebounce(); }); }); this.sectionId = this.dataset.id; @@ -163,11 +165,15 @@ if (!customElements.get('quick-order-list')) { validateQuantity(event, name, index, inputValue, cartQuantity, quantity) { if (inputValue < event.target.dataset.min) { - this.setValidity(event, index, window.quickOrderListStrings.min_error.replace('[min]', event.target.dataset.min)) + this.setValidity( + event, + index, + window.quickOrderListStrings.min_error.replace('[min]', event.target.dataset.min) + ); } else if (inputValue > parseInt(event.target.max)) { - this.setValidity(event, index, window.quickOrderListStrings.max_error.replace('[max]', event.target.max)) + this.setValidity(event, index, window.quickOrderListStrings.max_error.replace('[max]', event.target.max)); } else if (inputValue % parseInt(event.target.step) != 0) { - this.setValidity(event, index, window.quickOrderListStrings.step_error.replace('[step]', event.target.step)) + this.setValidity(event, index, window.quickOrderListStrings.step_error.replace('[step]', event.target.step)); } else { event.target.setCustomValidity(''); event.target.reportValidity(); @@ -176,21 +182,30 @@ if (!customElements.get('quick-order-list')) { } else { this.updateQuantity(index, quantity, name, this.actions.add); } - } + } } setValidity(event, index, message) { event.target.setCustomValidity(message); event.target.reportValidity(); this.resetQuantityInput(index); - event.target.select() + event.target.select(); } validateInput(target) { if (target.max) { - return parseInt(target.value) == 0 || (parseInt(target.value) >= parseInt(target.dataset.min) && parseInt(target.value) <= parseInt(target.max) && parseInt(target.value) % parseInt(target.step) == 0); + return ( + parseInt(target.value) == 0 || + (parseInt(target.value) >= parseInt(target.dataset.min) && + parseInt(target.value) <= parseInt(target.max) && + parseInt(target.value) % parseInt(target.step) == 0) + ); } else { - return parseInt(target.value) == 0 || (parseInt(target.value) >= parseInt(target.dataset.min) && parseInt(target.value) % parseInt(target.step) == 0); + return ( + parseInt(target.value) == 0 || + (parseInt(target.value) >= parseInt(target.dataset.min) && + parseInt(target.value) % parseInt(target.step) == 0) + ); } } @@ -206,7 +221,7 @@ if (!customElements.get('quick-order-list')) { } resolve(); }) - .catch(e => { + .catch((e) => { console.error(e); reject(e); }); @@ -218,28 +233,28 @@ if (!customElements.get('quick-order-list')) { { id: this.quickOrderListId, section: document.getElementById(this.quickOrderListId).dataset.id, - selector: `#${this.quickOrderListId} .js-contents` + selector: `#${this.quickOrderListId} .js-contents`, }, { id: 'cart-icon-bubble', section: 'cart-icon-bubble', - selector: '.shopify-section' + selector: '.shopify-section', }, { id: `quick-order-list-live-region-text-${this.dataset.productId}`, section: 'cart-live-region-text', - selector: '.shopify-section' + selector: '.shopify-section', }, { id: `quick-order-list-total-${this.dataset.productId}`, section: document.getElementById(this.quickOrderListId).dataset.id, - selector: `#${this.quickOrderListId} .quick-order-list__total` + selector: `#${this.quickOrderListId} .quick-order-list__total`, }, { id: 'CartDrawer', selector: '#CartDrawer', - section: 'cart-drawer' - } + section: 'cart-drawer', + }, ]; } @@ -249,11 +264,11 @@ if (!customElements.get('quick-order-list')) { this.onChange(event); }, ON_CHANGE_DEBOUNCE_TIMER); qty.addEventListener('change', debouncedOnChange.bind(this)); - }) + }); } addDebounce(id) { - const element = this.querySelector(`#Variant-${id} quantity-input`) + const element = this.querySelector(`#Variant-${id} quantity-input`); const debouncedOnChange = debounce((event) => { this.onChange(event); }, ON_CHANGE_DEBOUNCE_TIMER); @@ -261,29 +276,43 @@ if (!customElements.get('quick-order-list')) { } renderSections(parsedState, id) { - this.getSectionsToRender().forEach((section => { + this.getSectionsToRender().forEach((section) => { const sectionElement = document.getElementById(section.id); - if (sectionElement && sectionElement.parentElement && sectionElement.parentElement.classList.contains('drawer')) { - parsedState.items.length > 0 ? sectionElement.parentElement.classList.remove('is-empty') : sectionElement.parentElement.classList.add('is-empty'); + if ( + sectionElement && + sectionElement.parentElement && + sectionElement.parentElement.classList.contains('drawer') + ) { + parsedState.items.length > 0 + ? sectionElement.parentElement.classList.remove('is-empty') + : sectionElement.parentElement.classList.add('is-empty'); setTimeout(() => { document.querySelector('#CartDrawer-Overlay').addEventListener('click', this.cart.close.bind(this.cart)); }); } - const elementToReplace = sectionElement && sectionElement.querySelector(section.selector) ? sectionElement.querySelector(section.selector) : sectionElement; + const elementToReplace = + sectionElement && sectionElement.querySelector(section.selector) + ? sectionElement.querySelector(section.selector) + : sectionElement; if (elementToReplace) { if (section.selector === `#${this.quickOrderListId} .js-contents` && id !== undefined) { - elementToReplace.querySelector(`#Variant-${id}`).innerHTML = - this.getSectionInnerHTML(parsedState.sections[section.section], `#Variant-${id}`); + elementToReplace.querySelector(`#Variant-${id}`).innerHTML = this.getSectionInnerHTML( + parsedState.sections[section.section], + `#Variant-${id}` + ); } else { - elementToReplace.innerHTML = this.getSectionInnerHTML(parsedState.sections[section.section], section.selector); + elementToReplace.innerHTML = this.getSectionInnerHTML( + parsedState.sections[section.section], + section.selector + ); } } - })); + }); this.defineInputsAndQuickOrderTable(); if (id) { this.addDebounce(id); } else { - this.addMultipleDebounce() + this.addMultipleDebounce(); } } @@ -307,13 +336,26 @@ if (!customElements.get('quick-order-list')) { this.scrollToCenter(); } } else { - const stickyHeaderBottomBorder = this.stickyHeaderElement && this.stickyHeaderElement.getBoundingClientRect().bottom; + const stickyHeaderBottomBorder = + this.stickyHeaderElement && this.stickyHeaderElement.getBoundingClientRect().bottom; const totalBarCrossesInput = inputBottomBorder > this.totalBarPosition; const inputOutsideOfViewPort = inputBottomBorder < this.inputFieldHeight; - const stickyHeaderCrossesInput = this.stickyHeaderElement && this.stickyHeader.type !== 'on-scroll-up' && this.stickyHeader.height > inputTopBorder; - const stickyHeaderScrollupCrossesInput = this.stickyHeaderElement && this.stickyHeader.type === 'on-scroll-up' && this.stickyHeader.height > inputTopBorder && stickyHeaderBottomBorder > 0; - - if (totalBarCrossesInput || inputOutsideOfViewPort || stickyHeaderCrossesInput || stickyHeaderScrollupCrossesInput) { + const stickyHeaderCrossesInput = + this.stickyHeaderElement && + this.stickyHeader.type !== 'on-scroll-up' && + this.stickyHeader.height > inputTopBorder; + const stickyHeaderScrollupCrossesInput = + this.stickyHeaderElement && + this.stickyHeader.type === 'on-scroll-up' && + this.stickyHeader.height > inputTopBorder && + stickyHeaderBottomBorder > 0; + + if ( + totalBarCrossesInput || + inputOutsideOfViewPort || + stickyHeaderCrossesInput || + stickyHeaderScrollupCrossesInput + ) { this.scrollToCenter(); } } @@ -329,7 +371,7 @@ if (!customElements.get('quick-order-list')) { } this.variantListInput = event.target; - this.variantListInput.select() + this.variantListInput.select(); if (this.allInputsArray.length !== 1) { this.variantListInput.addEventListener('keydown', (e) => { if (e.key === 'Enter') { @@ -337,15 +379,16 @@ if (!customElements.get('quick-order-list')) { e.target.blur(); if (this.validateInput(e.target)) { const currentIndex = this.allInputsArray.indexOf(e.target); - this.lastKey = e.shiftKey + this.lastKey = e.shiftKey; if (!e.shiftKey) { const nextIndex = currentIndex + 1; const nextVariant = this.allInputsArray[nextIndex] || this.allInputsArray[0]; nextVariant.select(); } else { const previousIndex = currentIndex - 1; - const previousVariant = this.allInputsArray[previousIndex] || this.allInputsArray[this.allInputsArray.length - 1]; - this.lastElement = previousVariant.dataset.index + const previousVariant = + this.allInputsArray[previousIndex] || this.allInputsArray[this.allInputsArray.length - 1]; + this.lastElement = previousVariant.dataset.index; previousVariant.select(); } } @@ -353,7 +396,6 @@ if (!customElements.get('quick-order-list')) { }); this.scrollQuickOrderListTable(); - } else { this.variantListInput.addEventListener('keydown', (e) => { if (e.key === 'Enter') { @@ -370,7 +412,7 @@ if (!customElements.get('quick-order-list')) { const body = JSON.stringify({ updates: items, sections: this.getSectionsToRender().map((section) => section.section), - sections_url: this.getSectionsUrl() + sections_url: this.getSectionsUrl(), }); this.updateMessage(); @@ -383,7 +425,8 @@ if (!customElements.get('quick-order-list')) { .then((state) => { const parsedState = JSON.parse(state); this.renderSections(parsedState); - }).catch(() => { + }) + .catch(() => { this.setErrorMessage(window.cartStrings.error); }) .finally(() => { @@ -393,9 +436,9 @@ if (!customElements.get('quick-order-list')) { getSectionsUrl() { if (window.pageNumber) { - return `${window.location.pathname}?page=${window.pageNumber}` + return `${window.location.pathname}?page=${window.pageNumber}`; } else { - return `${window.location.pathname}` + return `${window.location.pathname}`; } } @@ -408,7 +451,7 @@ if (!customElements.get('quick-order-list')) { quantity, id, sections: this.getSectionsToRender().map((section) => section.section), - sections_url: this.getSectionsUrl() + sections_url: this.getSectionsUrl(), }); let fetchConfigType; if (action === this.actions.add) { @@ -418,11 +461,11 @@ if (!customElements.get('quick-order-list')) { items: [ { quantity: parseInt(quantity), - id: parseInt(id) - } + id: parseInt(id), + }, ], sections: this.getSectionsToRender().map((section) => section.section), - sections_url: this.getSectionsUrl() + sections_url: this.getSectionsUrl(), }); } @@ -439,7 +482,9 @@ if (!customElements.get('quick-order-list')) { const items = document.querySelectorAll('.variant-item'); if (parsedState.description || parsedState.errors) { - const variantItem = document.querySelector(`[id^="Variant-${id}"] .variant-item__totals.small-hide .loading__spinner`); + const variantItem = document.querySelector( + `[id^="Variant-${id}"] .variant-item__totals.small-hide .loading__spinner` + ); variantItem.classList.add('loading__spinner--error'); this.resetQuantityInput(id, quantityElement); if (parsedState.errors) { @@ -468,13 +513,14 @@ if (!customElements.get('quick-order-list')) { if (hasError) { this.updateMessage(); } else if (action === this.actions.add) { - this.updateMessage(parseInt(quantity)) + this.updateMessage(parseInt(quantity)); } else if (action === this.actions.update) { - this.updateMessage(parseInt(quantity - quantityElement.dataset.cartQuantity)) + this.updateMessage(parseInt(quantity - quantityElement.dataset.cartQuantity)); } else { - this.updateMessage(-parseInt(quantityElement.dataset.cartQuantity)) + this.updateMessage(-parseInt(quantityElement.dataset.cartQuantity)); } - }).catch((error) => { + }) + .catch((error) => { this.querySelectorAll('.loading__spinner').forEach((overlay) => overlay.classList.add('hidden')); this.resetQuantityInput(id); console.error(error); @@ -482,8 +528,8 @@ if (!customElements.get('quick-order-list')) { }) .finally(() => { this.toggleLoading(id); - if (this.lastKey && (this.lastElement === id)) { - this.querySelector(`#Variant-${id} input`).select() + if (this.lastKey && this.lastElement === id) { + this.querySelector(`#Variant-${id} input`).select(); } }); } @@ -494,7 +540,9 @@ if (!customElements.get('quick-order-list')) { } setErrorMessage(message = null) { - this.errorMessageTemplate = this.errorMessageTemplate ?? document.getElementById(`QuickOrderListErrorTemplate-${this.dataset.productId}`).cloneNode(true); + this.errorMessageTemplate = + this.errorMessageTemplate ?? + document.getElementById(`QuickOrderListErrorTemplate-${this.dataset.productId}`).cloneNode(true); const errorElements = document.querySelectorAll('.quick-order-list-error'); errorElements.forEach((errorElement) => { @@ -511,8 +559,8 @@ if (!customElements.get('quick-order-list')) { const icons = this.querySelectorAll('.quick-order-list__message-icon'); if (quantity === null || isNaN(quantity)) { - messages.forEach(message => message.innerHTML = ''); - icons.forEach(icon => icon.classList.add('hidden')); + messages.forEach((message) => (message.innerHTML = '')); + icons.forEach((icon) => icon.classList.add('hidden')); return; } @@ -520,15 +568,18 @@ if (!customElements.get('quick-order-list')) { const absQuantity = Math.abs(quantity); const textTemplate = isQuantityNegative - ? (absQuantity === 1 ? window.quickOrderListStrings.itemRemoved : window.quickOrderListStrings.itemsRemoved) - : (quantity === 1 ? window.quickOrderListStrings.itemAdded : window.quickOrderListStrings.itemsAdded); + ? absQuantity === 1 + ? window.quickOrderListStrings.itemRemoved + : window.quickOrderListStrings.itemsRemoved + : quantity === 1 + ? window.quickOrderListStrings.itemAdded + : window.quickOrderListStrings.itemsAdded; - messages.forEach((msg) => msg.innerHTML = textTemplate.replace('[quantity]', absQuantity)); + messages.forEach((msg) => (msg.innerHTML = textTemplate.replace('[quantity]', absQuantity))); if (!isQuantityNegative) { icons.forEach((i) => i.classList.remove('hidden')); } - } updateError(updatedValue, id) { @@ -543,7 +594,7 @@ if (!customElements.get('quick-order-list')) { cleanErrors() { this.querySelectorAll('.desktop-row-error').forEach((error) => error.classList.add('hidden')); - this.querySelectorAll(`.variant-item__error-text`).forEach((error) => error.innerHTML = ''); + this.querySelectorAll(`.variant-item__error-text`).forEach((error) => (error.innerHTML = '')); } updateLiveRegions(id, message) { @@ -553,7 +604,8 @@ if (!customElements.get('quick-order-list')) { variantItemErrorDesktop.querySelector('.variant-item__error-text').innerHTML = message; variantItemErrorDesktop.closest('tr').classList.remove('hidden'); } - if (variantItemErrorMobile) variantItemErrorMobile.querySelector('.variant-item__error-text').innerHTML = message; + if (variantItemErrorMobile) + variantItemErrorMobile.querySelector('.variant-item__error-text').innerHTML = message; this.variantItemStatusElement.setAttribute('aria-hidden', true); @@ -566,9 +618,7 @@ if (!customElements.get('quick-order-list')) { } getSectionInnerHTML(html, selector) { - return new DOMParser() - .parseFromString(html, 'text/html') - .querySelector(selector).innerHTML; + return new DOMParser().parseFromString(html, 'text/html').querySelector(selector).innerHTML; } toggleLoading(id, enable) { @@ -580,10 +630,10 @@ if (!customElements.get('quick-order-list')) { [...quickOrderListItems].forEach((overlay) => overlay.classList.remove('hidden')); this.variantItemStatusElement.setAttribute('aria-hidden', false); } else { - quickOrderListItem.classList.remove('quick-order-list__container--disabled'); + quickOrderListItem.classList.remove('quick-order-list__container--disabled'); quickOrderListItems.forEach((overlay) => overlay.classList.add('hidden')); } } } ); -} \ No newline at end of file +} diff --git a/sections/collapsible-content.liquid b/sections/collapsible-content.liquid index 7018f1a679e..d1ada25f5de 100644 --- a/sections/collapsible-content.liquid +++ b/sections/collapsible-content.liquid @@ -112,10 +112,7 @@ "tag": "section", "class": "section", "disabled_on": { - "groups": [ - "header", - "footer" - ] + "groups": ["header", "footer"] }, "settings": [ { diff --git a/sections/contact-form.liquid b/sections/contact-form.liquid index 1c04f0c1dfe..e545933c533 100644 --- a/sections/contact-form.liquid +++ b/sections/contact-form.liquid @@ -139,10 +139,7 @@ "tag": "section", "class": "section", "disabled_on": { - "groups": [ - "header", - "footer" - ] + "groups": ["header", "footer"] }, "settings": [ { diff --git a/sections/email-signup-banner.liquid b/sections/email-signup-banner.liquid index 143d08a99be..464637c9ea2 100644 --- a/sections/email-signup-banner.liquid +++ b/sections/email-signup-banner.liquid @@ -385,8 +385,6 @@ ] } ], - "templates": [ - "password" - ] + "templates": ["password"] } {% endschema %} diff --git a/sections/image-banner.liquid b/sections/image-banner.liquid index 50f4bbf7151..126dad84f85 100644 --- a/sections/image-banner.liquid +++ b/sections/image-banner.liquid @@ -172,10 +172,7 @@ "tag": "section", "class": "section", "disabled_on": { - "groups": [ - "header", - "footer" - ] + "groups": ["header", "footer"] }, "settings": [ { diff --git a/sections/image-with-text.liquid b/sections/image-with-text.liquid index 5064234ef84..0a24e48a351 100644 --- a/sections/image-with-text.liquid +++ b/sections/image-with-text.liquid @@ -112,10 +112,7 @@ "name": "t:sections.image-with-text.name", "class": "section", "disabled_on": { - "groups": [ - "header", - "footer" - ] + "groups": ["header", "footer"] }, "settings": [ { diff --git a/sections/main-product.liquid b/sections/main-product.liquid index d3663e1dc5e..1e1573b513f 100644 --- a/sections/main-product.liquid +++ b/sections/main-product.liquid @@ -2273,4 +2273,4 @@ } ] } -{% endschema %} \ No newline at end of file +{% endschema %} diff --git a/sections/multirow.liquid b/sections/multirow.liquid index d7053efcd8a..2d242bd05a4 100644 --- a/sections/multirow.liquid +++ b/sections/multirow.liquid @@ -112,10 +112,7 @@ "name": "t:sections.multirow.name", "class": "section", "disabled_on": { - "groups": [ - "header", - "footer" - ] + "groups": ["header", "footer"] }, "settings": [ { diff --git a/sections/newsletter.liquid b/sections/newsletter.liquid index 90013a57d62..d9e510dc6e1 100644 --- a/sections/newsletter.liquid +++ b/sections/newsletter.liquid @@ -120,9 +120,7 @@ "tag": "section", "class": "section", "disabled_on": { - "groups": [ - "header" - ] + "groups": ["header"] }, "settings": [ { diff --git a/sections/page.liquid b/sections/page.liquid index 5bdddaa6095..24eccbc68b0 100644 --- a/sections/page.liquid +++ b/sections/page.liquid @@ -41,10 +41,7 @@ "tag": "section", "class": "section", "disabled_on": { - "groups": [ - "header", - "footer" - ] + "groups": ["header", "footer"] }, "settings": [ { diff --git a/sections/rich-text.liquid b/sections/rich-text.liquid index 60fc6fc5775..4a2914ce57b 100644 --- a/sections/rich-text.liquid +++ b/sections/rich-text.liquid @@ -100,10 +100,7 @@ "tag": "section", "class": "section", "disabled_on": { - "groups": [ - "header", - "footer" - ] + "groups": ["header", "footer"] }, "settings": [ { diff --git a/snippets/product-media-gallery.liquid b/snippets/product-media-gallery.liquid index 0eebcdf1dbb..d151c529c08 100644 --- a/snippets/product-media-gallery.liquid +++ b/snippets/product-media-gallery.liquid @@ -61,7 +61,7 @@ class="product__media-list contains-media grid grid--peek list-unstyled slider slider--mobile" role="list" > - {%- if product.selected_or_first_available_variant.featured_media != nil -%} + {%- if product.selected_or_first_available_variant.featured_media != null -%} {%- assign featured_media = product.selected_or_first_available_variant.featured_media -%}
  • + {%- if block.settings.enable_quick_add -%} + {% assign quick_add = "standard" %} + {%- else -%} + {% assign quick_add = "none" %} + {%- endif -%} {% render 'card-product', card_product: product, media_aspect_ratio: block.settings.image_ratio, show_secondary_image: false, lazy_load: false, - show_quick_add: block.settings.enable_quick_add, + quick_add: quick_add, section_id: section.id, horizontal_class: true, horizontal_quick_add: true From 87da4ff11c74518a8b02b8784d7d37a3a3abf661 Mon Sep 17 00:00:00 2001 From: Tyler Alsbury <60230011+tyleralsbury@users.noreply.github.com> Date: Mon, 22 Apr 2024 13:12:12 -0400 Subject: [PATCH 007/316] Modal colour scheme fix (#3432) --- snippets/card-product.liquid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/card-product.liquid b/snippets/card-product.liquid index 95385834756..a12e91e9136 100644 --- a/snippets/card-product.liquid +++ b/snippets/card-product.liquid @@ -416,7 +416,7 @@ {%- render 'loading-spinner' -%} - +
    Date: Fri, 26 Apr 2024 22:45:57 +0000 Subject: [PATCH 008/316] Update from Shopify for theme descora-webshop/main Committed from shop: Mein Shop --- config/settings_data.json | 185 +++++++++++++++++++++++++++++++++++++- templates/index.json | 25 ++++-- 2 files changed, 203 insertions(+), 7 deletions(-) diff --git a/config/settings_data.json b/config/settings_data.json index 0f7a06db992..14f465ba601 100644 --- a/config/settings_data.json +++ b/config/settings_data.json @@ -1,5 +1,188 @@ { - "current": "Default", + "current": { + "logo_width": 90, + "type_header_font": "assistant_n4", + "heading_scale": 100, + "type_body_font": "assistant_n4", + "body_scale": 100, + "page_width": 1200, + "spacing_sections": 0, + "spacing_grid_horizontal": 8, + "spacing_grid_vertical": 8, + "buttons_border_thickness": 1, + "buttons_border_opacity": 100, + "buttons_radius": 0, + "buttons_shadow_opacity": 0, + "buttons_shadow_horizontal_offset": 0, + "buttons_shadow_vertical_offset": 4, + "buttons_shadow_blur": 5, + "variant_pills_border_thickness": 1, + "variant_pills_border_opacity": 55, + "variant_pills_radius": 40, + "variant_pills_shadow_opacity": 0, + "variant_pills_shadow_horizontal_offset": 0, + "variant_pills_shadow_vertical_offset": 4, + "variant_pills_shadow_blur": 5, + "inputs_border_thickness": 1, + "inputs_border_opacity": 55, + "inputs_radius": 0, + "inputs_shadow_opacity": 0, + "inputs_shadow_horizontal_offset": 0, + "inputs_shadow_vertical_offset": 4, + "inputs_shadow_blur": 5, + "card_style": "standard", + "card_image_padding": 0, + "card_text_alignment": "left", + "card_color_scheme": "scheme-2", + "card_border_thickness": 0, + "card_border_opacity": 10, + "card_corner_radius": 0, + "card_shadow_opacity": 0, + "card_shadow_horizontal_offset": 0, + "card_shadow_vertical_offset": 4, + "card_shadow_blur": 5, + "collection_card_style": "standard", + "collection_card_image_padding": 0, + "collection_card_text_alignment": "left", + "collection_card_color_scheme": "scheme-2", + "collection_card_border_thickness": 0, + "collection_card_border_opacity": 10, + "collection_card_corner_radius": 0, + "collection_card_shadow_opacity": 0, + "collection_card_shadow_horizontal_offset": 0, + "collection_card_shadow_vertical_offset": 4, + "collection_card_shadow_blur": 5, + "blog_card_style": "standard", + "blog_card_image_padding": 0, + "blog_card_text_alignment": "left", + "blog_card_color_scheme": "scheme-2", + "blog_card_border_thickness": 0, + "blog_card_border_opacity": 10, + "blog_card_corner_radius": 0, + "blog_card_shadow_opacity": 0, + "blog_card_shadow_horizontal_offset": 0, + "blog_card_shadow_vertical_offset": 4, + "blog_card_shadow_blur": 5, + "text_boxes_border_thickness": 0, + "text_boxes_border_opacity": 10, + "text_boxes_radius": 0, + "text_boxes_shadow_opacity": 0, + "text_boxes_shadow_horizontal_offset": 0, + "text_boxes_shadow_vertical_offset": 4, + "text_boxes_shadow_blur": 5, + "media_border_thickness": 1, + "media_border_opacity": 5, + "media_radius": 0, + "media_shadow_opacity": 0, + "media_shadow_horizontal_offset": 0, + "media_shadow_vertical_offset": 4, + "media_shadow_blur": 5, + "popup_border_thickness": 1, + "popup_border_opacity": 10, + "popup_corner_radius": 0, + "popup_shadow_opacity": 5, + "popup_shadow_horizontal_offset": 0, + "popup_shadow_vertical_offset": 4, + "popup_shadow_blur": 5, + "drawer_border_thickness": 1, + "drawer_border_opacity": 10, + "drawer_shadow_opacity": 0, + "drawer_shadow_horizontal_offset": 0, + "drawer_shadow_vertical_offset": 4, + "drawer_shadow_blur": 5, + "badge_position": "bottom left", + "badge_corner_radius": 40, + "sale_badge_color_scheme": "scheme-5", + "sold_out_badge_color_scheme": "scheme-3", + "social_facebook_link": "", + "social_instagram_link": "", + "social_youtube_link": "", + "social_tiktok_link": "", + "social_twitter_link": "", + "social_snapchat_link": "", + "social_pinterest_link": "", + "social_tumblr_link": "", + "social_vimeo_link": "", + "predictive_search_enabled": true, + "predictive_search_show_vendor": false, + "predictive_search_show_price": false, + "currency_code_enabled": true, + "cart_type": "notification", + "show_vendor": false, + "show_cart_note": false, + "cart_drawer_collection": "", + "sections": { + "main-password-header": { + "type": "main-password-header", + "settings": { + "color_scheme": "scheme-1" + } + }, + "main-password-footer": { + "type": "main-password-footer", + "settings": { + "color_scheme": "scheme-1" + } + } + }, + "color_schemes": { + "scheme-1": { + "settings": { + "background": "#FFFFFF", + "background_gradient": "", + "text": "#121212", + "button": "#121212", + "button_label": "#FFFFFF", + "secondary_button_label": "#121212", + "shadow": "#121212" + } + }, + "scheme-2": { + "settings": { + "background": "#F3F3F3", + "background_gradient": "", + "text": "#121212", + "button": "#121212", + "button_label": "#F3F3F3", + "secondary_button_label": "#121212", + "shadow": "#121212" + } + }, + "scheme-3": { + "settings": { + "background": "#242833", + "background_gradient": "", + "text": "#FFFFFF", + "button": "#FFFFFF", + "button_label": "#000000", + "secondary_button_label": "#FFFFFF", + "shadow": "#121212" + } + }, + "scheme-4": { + "settings": { + "background": "#121212", + "background_gradient": "", + "text": "#FFFFFF", + "button": "#FFFFFF", + "button_label": "#121212", + "secondary_button_label": "#FFFFFF", + "shadow": "#121212" + } + }, + "scheme-5": { + "settings": { + "background": "#334FB4", + "background_gradient": "", + "text": "#FFFFFF", + "button": "#FFFFFF", + "button_label": "#334FB4", + "secondary_button_label": "#FFFFFF", + "shadow": "#121212" + } + } + } + }, "presets": { "Default": { "logo_width": 90, diff --git a/templates/index.json b/templates/index.json index 92d10b71ece..1da4e0db133 100644 --- a/templates/index.json +++ b/templates/index.json @@ -6,7 +6,7 @@ "heading": { "type": "heading", "settings": { - "heading": "Image banner", + "heading": "Descora Station", "heading_size": "h0" } }, @@ -21,7 +21,7 @@ "type": "buttons", "settings": { "button_label_1": "Shop all", - "button_link_1": "shopify://collections/all", + "button_link_1": "shopify:\/\/collections\/all", "button_style_secondary_1": true, "button_label_2": "", "button_link_2": "", @@ -41,6 +41,7 @@ "show_text_box": false, "desktop_content_alignment": "center", "color_scheme": "scheme-3", + "image_behavior": "none", "mobile_content_alignment": "center", "stack_images_on_mobile": false, "show_text_below": false @@ -68,6 +69,8 @@ "text" ], "settings": { + "desktop_content_position": "center", + "content_alignment": "center", "color_scheme": "scheme-1", "full_width": true, "padding_top": 40, @@ -79,17 +82,25 @@ "settings": { "title": "Featured products", "heading_size": "h2", + "description": "", + "show_description": false, + "description_style": "body", "collection": "all", "products_to_show": 8, "columns_desktop": 4, - "color_scheme": "scheme-1", + "full_width": false, "show_view_all": false, - "swipe_on_mobile": false, + "view_all_style": "solid", + "enable_desktop_slider": false, + "color_scheme": "scheme-1", "image_ratio": "adapt", + "image_shape": "default", "show_secondary_image": true, "show_vendor": false, "show_rating": false, + "quick_add": "none", "columns_mobile": "2", + "swipe_on_mobile": false, "padding_top": 28, "padding_bottom": 36 } @@ -127,6 +138,7 @@ "heading_size": "h2", "desktop_layout": "left", "mobile_layout": "collage", + "card_styles": "product-card-wrapper", "color_scheme": "scheme-1", "padding_top": 36, "padding_bottom": 36 @@ -136,8 +148,9 @@ "type": "video", "settings": { "heading": "", - "video_url": "https://www.youtube.com/watch?v=_9VUPq3SxOc", "heading_size": "h1", + "enable_video_looping": false, + "video_url": "https:\/\/www.youtube.com\/watch?v=_9VUPq3SxOc", "description": "", "full_width": false, "color_scheme": "scheme-1", @@ -191,9 +204,9 @@ "background_style": "none", "button_label": "", "button_link": "", - "swipe_on_mobile": false, "color_scheme": "scheme-1", "columns_mobile": "1", + "swipe_on_mobile": false, "padding_top": 36, "padding_bottom": 36 } From 6857ce08bc1cce302716feb02ec487d1b8c840ec Mon Sep 17 00:00:00 2001 From: Floggiee <131165799+Floggiee@users.noreply.github.com> Date: Sat, 27 Apr 2024 00:55:55 +0200 Subject: [PATCH 009/316] update --- templates/index.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/index.json b/templates/index.json index 1da4e0db133..7f803f675e4 100644 --- a/templates/index.json +++ b/templates/index.json @@ -13,7 +13,7 @@ "text": { "type": "text", "settings": { - "text": "Give customers details about the banner image(s) or content on the template.", + "text": "Cute and aesthetic desk accessories", "text_style": "body" } }, From 3b9ee9795df5381a8b3c39644c26fa9ed9a8676d Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 27 Apr 2024 18:31:37 +0000 Subject: [PATCH 010/316] Update from Shopify for theme descora-webshop/main Committed from shop: Mein Shop --- config/settings_data.json | 50 ++++++++++++++++++++++++-------------- sections/header-group.json | 16 +++++++++--- 2 files changed, 44 insertions(+), 22 deletions(-) diff --git a/config/settings_data.json b/config/settings_data.json index 14f465ba601..dde37bd7ee4 100644 --- a/config/settings_data.json +++ b/config/settings_data.json @@ -125,25 +125,28 @@ } } }, + "content_for_index": [ + + ], "color_schemes": { "scheme-1": { "settings": { - "background": "#FFFFFF", + "background": "#fbf9f9", "background_gradient": "", - "text": "#121212", - "button": "#121212", - "button_label": "#FFFFFF", - "secondary_button_label": "#121212", + "text": "#161313", + "button": "{{ shop.brand.colors.primary[0].background }}", + "button_label": "{{ shop.brand.colors.primary[0].background }}", + "secondary_button_label": "{{ shop.brand.colors.primary[0].background }}", "shadow": "#121212" } }, "scheme-2": { "settings": { - "background": "#F3F3F3", + "background": "#f3f3f3", "background_gradient": "", "text": "#121212", "button": "#121212", - "button_label": "#F3F3F3", + "button_label": "#f3f3f3", "secondary_button_label": "#121212", "shadow": "#121212" } @@ -152,10 +155,10 @@ "settings": { "background": "#242833", "background_gradient": "", - "text": "#FFFFFF", - "button": "#FFFFFF", + "text": "#ffffff", + "button": "#ffffff", "button_label": "#000000", - "secondary_button_label": "#FFFFFF", + "secondary_button_label": "#ffffff", "shadow": "#121212" } }, @@ -163,23 +166,34 @@ "settings": { "background": "#121212", "background_gradient": "", - "text": "#FFFFFF", - "button": "#FFFFFF", + "text": "#ffffff", + "button": "#ffffff", "button_label": "#121212", - "secondary_button_label": "#FFFFFF", + "secondary_button_label": "#ffffff", "shadow": "#121212" } }, "scheme-5": { "settings": { - "background": "#334FB4", + "background": "#334fb4", "background_gradient": "", - "text": "#FFFFFF", - "button": "#FFFFFF", - "button_label": "#334FB4", - "secondary_button_label": "#FFFFFF", + "text": "#ffffff", + "button": "#ffffff", + "button_label": "#334fb4", + "secondary_button_label": "#ffffff", "shadow": "#121212" } + }, + "scheme-15870743-b328-40f2-a548-8e25739dfe64": { + "settings": { + "background": "#fbf9f9", + "background_gradient": "", + "text": "#161313", + "button": "#161313", + "button_label": "#fbf9f9", + "secondary_button_label": "#161313", + "shadow": "#161313" + } } } }, diff --git a/sections/header-group.json b/sections/header-group.json index a9ac3a08a0d..53a7ad89800 100644 --- a/sections/header-group.json +++ b/sections/header-group.json @@ -9,25 +9,33 @@ "type": "announcement", "settings": { "text": "Welcome to our store", - "text_alignment": "center", - "color_scheme": "scheme-1", "link": "" } } }, "block_order": [ "announcement-bar-0" - ] + ], + "settings": { + "color_scheme": "scheme-1", + "show_line_separator": true, + "show_social": false, + "auto_rotate": false, + "change_slides_speed": 5, + "enable_country_selector": false, + "enable_language_selector": false + } }, "header": { "type": "header", "settings": { - "color_scheme": "scheme-1", "logo_position": "middle-left", "menu": "main-menu", "menu_type_desktop": "dropdown", "sticky_header_type": "on-scroll-up", "show_line_separator": true, + "color_scheme": "scheme-1", + "menu_color_scheme": "", "enable_country_selector": true, "enable_language_selector": true, "mobile_logo_position": "center", From ac115e1cdb0fadde0870c3e69e02f79d69e82048 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 27 Apr 2024 18:41:09 +0000 Subject: [PATCH 011/316] Update from Shopify for theme descora-webshop/main Committed from shop: Mein Shop --- config/settings_data.json | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/config/settings_data.json b/config/settings_data.json index dde37bd7ee4..077cbf957f9 100644 --- a/config/settings_data.json +++ b/config/settings_data.json @@ -135,8 +135,8 @@ "background_gradient": "", "text": "#161313", "button": "{{ shop.brand.colors.primary[0].background }}", - "button_label": "{{ shop.brand.colors.primary[0].background }}", - "secondary_button_label": "{{ shop.brand.colors.primary[0].background }}", + "button_label": "#161313", + "secondary_button_label": "{{ shop.brand.colors.secondary[0].background }}", "shadow": "#121212" } }, @@ -194,6 +194,17 @@ "secondary_button_label": "#161313", "shadow": "#161313" } + }, + "scheme-6b778a28-3eb6-42f7-a483-f3decbad892b": { + "settings": { + "background": "{{ shop.brand.colors.primary[0].background }}", + "background_gradient": "", + "text": "#161313", + "button": "{{ shop.brand.colors.secondary[0].background }}", + "button_label": "#fbf9f9", + "secondary_button_label": "{{ shop.brand.colors.secondary[0].background }}", + "shadow": "#121212" + } } } }, From 39bb93996ef05d404287c5abec322ff93cc37bbe Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 27 Apr 2024 18:42:41 +0000 Subject: [PATCH 012/316] Update from Shopify for theme descora-webshop/main Committed from shop: Mein Shop --- config/settings_data.json | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/config/settings_data.json b/config/settings_data.json index 077cbf957f9..e04b509aee9 100644 --- a/config/settings_data.json +++ b/config/settings_data.json @@ -136,7 +136,7 @@ "text": "#161313", "button": "{{ shop.brand.colors.primary[0].background }}", "button_label": "#161313", - "secondary_button_label": "{{ shop.brand.colors.secondary[0].background }}", + "secondary_button_label": "{{ shop.brand.colors.primary[0].background }}", "shadow": "#121212" } }, @@ -205,6 +205,28 @@ "secondary_button_label": "{{ shop.brand.colors.secondary[0].background }}", "shadow": "#121212" } + }, + "scheme-285911f8-4f01-4949-a476-2ff08da2b4d6": { + "settings": { + "background": "#fbf9f9", + "background_gradient": "", + "text": "#161313", + "button": "{{ shop.brand.colors.secondary[0].background }}", + "button_label": "#fbf9f9", + "secondary_button_label": "{{ shop.brand.colors.secondary[0].background }}", + "shadow": "#121212" + } + }, + "scheme-0c2e7ad3-991a-4392-883a-86759c5cf171": { + "settings": { + "background": "#fbf9f9", + "background_gradient": "", + "text": "#161313", + "button": "{{ shop.brand.colors.primary[0].foreground }}", + "button_label": "#161313", + "secondary_button_label": "{{ shop.brand.colors.primary[0].foreground }}", + "shadow": "#121212" + } } } }, From 9cb1b861e3587e8a70b010e1048caef6f35177eb Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 27 Apr 2024 18:55:02 +0000 Subject: [PATCH 013/316] Update from Shopify for theme descora-webshop/main Committed from shop: Mein Shop --- config/settings_data.json | 55 ++++++++++++++++++++++++++++++-------- sections/header-group.json | 6 ++--- 2 files changed, 47 insertions(+), 14 deletions(-) diff --git a/config/settings_data.json b/config/settings_data.json index e04b509aee9..50e074ae4ab 100644 --- a/config/settings_data.json +++ b/config/settings_data.json @@ -142,13 +142,13 @@ }, "scheme-2": { "settings": { - "background": "#f3f3f3", + "background": "#fbf9f9", "background_gradient": "", - "text": "#121212", - "button": "#121212", - "button_label": "#f3f3f3", - "secondary_button_label": "#121212", - "shadow": "#121212" + "text": "#161313", + "button": "#161313", + "button_label": "#fbf9f9", + "secondary_button_label": "#161313", + "shadow": "#161313" } }, "scheme-3": { @@ -186,12 +186,12 @@ }, "scheme-15870743-b328-40f2-a548-8e25739dfe64": { "settings": { - "background": "#fbf9f9", + "background": "#060404", "background_gradient": "", - "text": "#161313", - "button": "#161313", - "button_label": "#fbf9f9", - "secondary_button_label": "#161313", + "text": "#ece9e9", + "button": "#ece9e9", + "button_label": "#060404", + "secondary_button_label": "#ece9e9", "shadow": "#161313" } }, @@ -227,6 +227,39 @@ "secondary_button_label": "{{ shop.brand.colors.primary[0].foreground }}", "shadow": "#121212" } + }, + "scheme-6c45f782-57b9-48ae-8213-c75ab62c4284": { + "settings": { + "background": "#060404", + "background_gradient": "", + "text": "{{ shop.brand.colors.primary[0].background }}", + "button": "{{ shop.brand.colors.primary[0].background }}", + "button_label": "#161313", + "secondary_button_label": "{{ shop.brand.colors.primary[0].background }}", + "shadow": "#121212" + } + }, + "scheme-d3c596be-ed6f-4eaa-9ce9-304592ead2b1": { + "settings": { + "background": "#fbf9f9", + "background_gradient": "", + "text": "{{ shop.brand.colors.secondary[0].background }}", + "button": "{{ shop.brand.colors.secondary[0].background }}", + "button_label": "#161313", + "secondary_button_label": "{{ shop.brand.colors.secondary[0].background }}", + "shadow": "#121212" + } + }, + "scheme-016318c1-bb41-4323-a850-cac811480190": { + "settings": { + "background": "#fbf9f9", + "background_gradient": "", + "text": "{{ shop.brand.colors.primary[0].foreground }}", + "button": "{{ shop.brand.colors.primary[0].foreground }}", + "button_label": "#161313", + "secondary_button_label": "{{ shop.brand.colors.primary[0].foreground }}", + "shadow": "#121212" + } } } }, diff --git a/sections/header-group.json b/sections/header-group.json index 53a7ad89800..cf7c577f296 100644 --- a/sections/header-group.json +++ b/sections/header-group.json @@ -17,7 +17,7 @@ "announcement-bar-0" ], "settings": { - "color_scheme": "scheme-1", + "color_scheme": "scheme-d3c596be-ed6f-4eaa-9ce9-304592ead2b1", "show_line_separator": true, "show_social": false, "auto_rotate": false, @@ -29,13 +29,13 @@ "header": { "type": "header", "settings": { - "logo_position": "middle-left", + "logo_position": "middle-center", "menu": "main-menu", "menu_type_desktop": "dropdown", "sticky_header_type": "on-scroll-up", "show_line_separator": true, "color_scheme": "scheme-1", - "menu_color_scheme": "", + "menu_color_scheme": "scheme-d3c596be-ed6f-4eaa-9ce9-304592ead2b1", "enable_country_selector": true, "enable_language_selector": true, "mobile_logo_position": "center", From 3e67dafa46e01678a4d73eb000ed0e146735dfbe Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 27 Apr 2024 19:10:41 +0000 Subject: [PATCH 014/316] Update from Shopify for theme descora-webshop/main Committed from shop: Mein Shop --- sections/header-group.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sections/header-group.json b/sections/header-group.json index cf7c577f296..22f588459b8 100644 --- a/sections/header-group.json +++ b/sections/header-group.json @@ -35,7 +35,7 @@ "sticky_header_type": "on-scroll-up", "show_line_separator": true, "color_scheme": "scheme-1", - "menu_color_scheme": "scheme-d3c596be-ed6f-4eaa-9ce9-304592ead2b1", + "menu_color_scheme": "scheme-1", "enable_country_selector": true, "enable_language_selector": true, "mobile_logo_position": "center", From b5aeb2fad6ec05e619b813734433f3dca1edb8e9 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 27 Apr 2024 19:13:09 +0000 Subject: [PATCH 015/316] Update from Shopify for theme descora-webshop/main Committed from shop: Mein Shop --- config/settings_data.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/settings_data.json b/config/settings_data.json index 50e074ae4ab..f8ef2d893ec 100644 --- a/config/settings_data.json +++ b/config/settings_data.json @@ -199,10 +199,10 @@ "settings": { "background": "{{ shop.brand.colors.primary[0].background }}", "background_gradient": "", - "text": "#161313", - "button": "{{ shop.brand.colors.secondary[0].background }}", - "button_label": "#fbf9f9", - "secondary_button_label": "{{ shop.brand.colors.secondary[0].background }}", + "text": "#fbf9f9", + "button": "#fbf9f9", + "button_label": "#161313", + "secondary_button_label": "#fbf9f9", "shadow": "#121212" } }, From 4510465172b717d3e3f9a68266b0a66b93792037 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 27 Apr 2024 19:16:23 +0000 Subject: [PATCH 016/316] Update from Shopify for theme descora-webshop/main Committed from shop: Mein Shop --- config/settings_data.json | 14 +++++++------- sections/header-group.json | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config/settings_data.json b/config/settings_data.json index f8ef2d893ec..85ffd4ab3d8 100644 --- a/config/settings_data.json +++ b/config/settings_data.json @@ -133,7 +133,7 @@ "settings": { "background": "#fbf9f9", "background_gradient": "", - "text": "#161313", + "text": "{{ shop.brand.colors.primary[0].background }}", "button": "{{ shop.brand.colors.primary[0].background }}", "button_label": "#161313", "secondary_button_label": "{{ shop.brand.colors.primary[0].background }}", @@ -175,12 +175,12 @@ }, "scheme-5": { "settings": { - "background": "#334fb4", + "background": "{{ shop.brand.colors.secondary[0].background }}", "background_gradient": "", - "text": "#ffffff", - "button": "#ffffff", - "button_label": "#334fb4", - "secondary_button_label": "#ffffff", + "text": "#fbf9f9", + "button": "#fbf9f9", + "button_label": "{{ shop.brand.colors.secondary[0].background }}", + "secondary_button_label": "#fbf9f9", "shadow": "#121212" } }, @@ -201,7 +201,7 @@ "background_gradient": "", "text": "#fbf9f9", "button": "#fbf9f9", - "button_label": "#161313", + "button_label": "{{ shop.brand.colors.primary[0].background }}", "secondary_button_label": "#fbf9f9", "shadow": "#121212" } diff --git a/sections/header-group.json b/sections/header-group.json index 22f588459b8..eda9bf7dcd5 100644 --- a/sections/header-group.json +++ b/sections/header-group.json @@ -17,7 +17,7 @@ "announcement-bar-0" ], "settings": { - "color_scheme": "scheme-d3c596be-ed6f-4eaa-9ce9-304592ead2b1", + "color_scheme": "scheme-6b778a28-3eb6-42f7-a483-f3decbad892b", "show_line_separator": true, "show_social": false, "auto_rotate": false, @@ -34,8 +34,8 @@ "menu_type_desktop": "dropdown", "sticky_header_type": "on-scroll-up", "show_line_separator": true, - "color_scheme": "scheme-1", - "menu_color_scheme": "scheme-1", + "color_scheme": "scheme-d3c596be-ed6f-4eaa-9ce9-304592ead2b1", + "menu_color_scheme": "scheme-d3c596be-ed6f-4eaa-9ce9-304592ead2b1", "enable_country_selector": true, "enable_language_selector": true, "mobile_logo_position": "center", From 44fdc014770d95d4be2d15a4c89ebb616665f9ee Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 27 Apr 2024 19:26:49 +0000 Subject: [PATCH 017/316] Update from Shopify for theme descora-webshop/main Committed from shop: Mein Shop --- config/settings_data.json | 23 ++++++++++++----------- templates/index.json | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/config/settings_data.json b/config/settings_data.json index 85ffd4ab3d8..b348460ca5f 100644 --- a/config/settings_data.json +++ b/config/settings_data.json @@ -1,17 +1,18 @@ { "current": { "logo_width": 90, - "type_header_font": "assistant_n4", + "type_header_font": "poppins_n6", "heading_scale": 100, - "type_body_font": "assistant_n4", + "type_body_font": "poppins_n5", "body_scale": 100, "page_width": 1200, "spacing_sections": 0, "spacing_grid_horizontal": 8, "spacing_grid_vertical": 8, + "animations_hover_elements": "default", "buttons_border_thickness": 1, "buttons_border_opacity": 100, - "buttons_radius": 0, + "buttons_radius": 40, "buttons_shadow_opacity": 0, "buttons_shadow_horizontal_offset": 0, "buttons_shadow_vertical_offset": 4, @@ -25,7 +26,7 @@ "variant_pills_shadow_blur": 5, "inputs_border_thickness": 1, "inputs_border_opacity": 55, - "inputs_radius": 0, + "inputs_radius": 40, "inputs_shadow_opacity": 0, "inputs_shadow_horizontal_offset": 0, "inputs_shadow_vertical_offset": 4, @@ -36,7 +37,7 @@ "card_color_scheme": "scheme-2", "card_border_thickness": 0, "card_border_opacity": 10, - "card_corner_radius": 0, + "card_corner_radius": 40, "card_shadow_opacity": 0, "card_shadow_horizontal_offset": 0, "card_shadow_vertical_offset": 4, @@ -47,7 +48,7 @@ "collection_card_color_scheme": "scheme-2", "collection_card_border_thickness": 0, "collection_card_border_opacity": 10, - "collection_card_corner_radius": 0, + "collection_card_corner_radius": 40, "collection_card_shadow_opacity": 0, "collection_card_shadow_horizontal_offset": 0, "collection_card_shadow_vertical_offset": 4, @@ -58,14 +59,14 @@ "blog_card_color_scheme": "scheme-2", "blog_card_border_thickness": 0, "blog_card_border_opacity": 10, - "blog_card_corner_radius": 0, + "blog_card_corner_radius": 40, "blog_card_shadow_opacity": 0, "blog_card_shadow_horizontal_offset": 0, "blog_card_shadow_vertical_offset": 4, "blog_card_shadow_blur": 5, "text_boxes_border_thickness": 0, "text_boxes_border_opacity": 10, - "text_boxes_radius": 0, + "text_boxes_radius": 40, "text_boxes_shadow_opacity": 0, "text_boxes_shadow_horizontal_offset": 0, "text_boxes_shadow_vertical_offset": 4, @@ -79,7 +80,7 @@ "media_shadow_blur": 5, "popup_border_thickness": 1, "popup_border_opacity": 10, - "popup_corner_radius": 0, + "popup_corner_radius": 40, "popup_shadow_opacity": 5, "popup_shadow_horizontal_offset": 0, "popup_shadow_vertical_offset": 4, @@ -95,9 +96,9 @@ "sale_badge_color_scheme": "scheme-5", "sold_out_badge_color_scheme": "scheme-3", "social_facebook_link": "", - "social_instagram_link": "", + "social_instagram_link": "https:\/\/www.instagram.com\/descorastation\/", "social_youtube_link": "", - "social_tiktok_link": "", + "social_tiktok_link": "https:\/\/www.tiktok.com\/@descorastation", "social_twitter_link": "", "social_snapchat_link": "", "social_pinterest_link": "", diff --git a/templates/index.json b/templates/index.json index 7f803f675e4..a82db20e8de 100644 --- a/templates/index.json +++ b/templates/index.json @@ -40,7 +40,7 @@ "desktop_content_position": "bottom-center", "show_text_box": false, "desktop_content_alignment": "center", - "color_scheme": "scheme-3", + "color_scheme": "scheme-1", "image_behavior": "none", "mobile_content_alignment": "center", "stack_images_on_mobile": false, From b8bde6fadf4b3e3011abcf5fa11a3c3b441377e7 Mon Sep 17 00:00:00 2001 From: Floggiee <131165799+Floggiee@users.noreply.github.com> Date: Sat, 27 Apr 2024 22:53:13 +0200 Subject: [PATCH 018/316] Create configrator.liquid --- templates/configrator.liquid | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 templates/configrator.liquid diff --git a/templates/configrator.liquid b/templates/configrator.liquid new file mode 100644 index 00000000000..e69de29bb2d From a9adf8ac3b625d4f7b2df4b134cb5d32691b53f9 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 27 Apr 2024 21:00:17 +0000 Subject: [PATCH 019/316] Update from Shopify for theme descora-webshop/main Committed from shop: Mein Shop --- templates/page.configurator.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 templates/page.configurator.json diff --git a/templates/page.configurator.json b/templates/page.configurator.json new file mode 100644 index 00000000000..f2ee79be1f7 --- /dev/null +++ b/templates/page.configurator.json @@ -0,0 +1,14 @@ +{ + "sections": { + "main": { + "type": "main-page", + "settings": { + "padding_top": 28, + "padding_bottom": 28 + } + } + }, + "order": [ + "main" + ] +} From aa51f45dcb95081c9a2fd335016b550f861ac199 Mon Sep 17 00:00:00 2001 From: Floggiee <131165799+Floggiee@users.noreply.github.com> Date: Sat, 27 Apr 2024 23:09:51 +0200 Subject: [PATCH 020/316] update --- templates/configrator.liquid | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 templates/configrator.liquid diff --git a/templates/configrator.liquid b/templates/configrator.liquid deleted file mode 100644 index e69de29bb2d..00000000000 From 2f7528f8f533391b81d855c73afc367c8e434ccf Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 27 Apr 2024 21:12:15 +0000 Subject: [PATCH 021/316] Update from Shopify for theme descora-webshop/main Committed from shop: Mein Shop --- templates/page.customize.liquid | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 templates/page.customize.liquid diff --git a/templates/page.customize.liquid b/templates/page.customize.liquid new file mode 100644 index 00000000000..e69de29bb2d From 4e4d6a5d7a9908e749d8c44e7470f3f21ecb06cb Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 27 Apr 2024 21:13:44 +0000 Subject: [PATCH 022/316] Update from Shopify for theme descora-webshop/main Committed from shop: Mein Shop --- templates/page.configurator.json | 14 -------------- templates/page.customize.liquid | 0 2 files changed, 14 deletions(-) delete mode 100644 templates/page.configurator.json delete mode 100644 templates/page.customize.liquid diff --git a/templates/page.configurator.json b/templates/page.configurator.json deleted file mode 100644 index f2ee79be1f7..00000000000 --- a/templates/page.configurator.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "sections": { - "main": { - "type": "main-page", - "settings": { - "padding_top": 28, - "padding_bottom": 28 - } - } - }, - "order": [ - "main" - ] -} diff --git a/templates/page.customize.liquid b/templates/page.customize.liquid deleted file mode 100644 index e69de29bb2d..00000000000 From 5963c00ea2aab27d7320a1a516bf6110798fb86a Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 27 Apr 2024 21:14:00 +0000 Subject: [PATCH 023/316] Update from Shopify for theme descora-webshop/main Committed from shop: Mein Shop --- templates/page.configurator.liquid | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 templates/page.configurator.liquid diff --git a/templates/page.configurator.liquid b/templates/page.configurator.liquid new file mode 100644 index 00000000000..e69de29bb2d From c6c32c4cad3b385c84cff64470d900cc7e6492cd Mon Sep 17 00:00:00 2001 From: Floggiee <131165799+Floggiee@users.noreply.github.com> Date: Sat, 27 Apr 2024 23:18:04 +0200 Subject: [PATCH 024/316] added configurator --- templates/page.configurator.liquid | 77 ++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/templates/page.configurator.liquid b/templates/page.configurator.liquid index e69de29bb2d..7341df42b89 100644 --- a/templates/page.configurator.liquid +++ b/templates/page.configurator.liquid @@ -0,0 +1,77 @@ +{% form 'product', product, class: 'product-configurator' %} + + +
    + +
    +{% endform %} + +
    +

    Step 1: Choose Size

    + {% for option in product.options_with_values %} + {% if option.name == 'Size' %} +
    + + +
    + {% endif %} + {% endfor %} +
    + +
    +

    Step 2: Add Engraving

    +
    + + +
    +
    + + From db557b9c5c7b5b850bf306a6aad0bdbfebcf3b04 Mon Sep 17 00:00:00 2001 From: Floggiee <131165799+Floggiee@users.noreply.github.com> Date: Sat, 27 Apr 2024 23:41:28 +0200 Subject: [PATCH 025/316] update --- templates/page.configurator.liquid | 129 ++++++++++++++--------------- 1 file changed, 62 insertions(+), 67 deletions(-) diff --git a/templates/page.configurator.liquid b/templates/page.configurator.liquid index 7341df42b89..2fe6663b556 100644 --- a/templates/page.configurator.liquid +++ b/templates/page.configurator.liquid @@ -1,77 +1,72 @@ -{% form 'product', product, class: 'product-configurator' %} - + + -
    - -
    -{% endform %} + -
    -

    Step 1: Choose Size

    - {% for option in product.options_with_values %} - {% if option.name == 'Size' %} -
    - - -
    - {% endif %} - {% endfor %} -
    + + -
    -

    Step 2: Add Engraving

    -
    - - -
    -
    + + + + + + From ceaf9a16d696b07b5c0cd86b6519280790246638 Mon Sep 17 00:00:00 2001 From: Floggiee <131165799+Floggiee@users.noreply.github.com> Date: Sun, 28 Apr 2024 14:09:40 +0200 Subject: [PATCH 026/316] update --- templates/page.configurator.liquid | 195 ++++++++++++++++++++--------- 1 file changed, 139 insertions(+), 56 deletions(-) diff --git a/templates/page.configurator.liquid b/templates/page.configurator.liquid index 2fe6663b556..84abd4e2932 100644 --- a/templates/page.configurator.liquid +++ b/templates/page.configurator.liquid @@ -1,72 +1,155 @@ - - +{% assign color_options = 'light-pink,white' | split: ',' %} - + +
    +
    +

    Step 1: Select Product 1

    +
      + {% for product in collections.all.products %} + {% if product.available %} +
    • + + +
    • + {% endif %} + {% endfor %} +
    + +
    - - + +
    +

    Step 2: Select Color for Product 1

    +
      + {% for color in color_options %} +
    • + + +
      +
    • + {% endfor %} +
    + + +
    - + +
    +

    Step 3: Select Color for Product 2

    +
      + {% for color in color_options %} +
    • + + +
      +
    • + {% endfor %} +
    + + +
    +
    - - + + - // JavaScript for Step 3 - function addToCart() { - // Get selected value for Option 3 - var option3Value = document.getElementById('option3').value; + + From 2f7e3b8cb36fff5dbc178c66b409fdb81c560580 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 00:26:09 +0000 Subject: [PATCH 027/316] Update from Shopify for theme descora-webshop/main Committed from shop: Mein Shop --- config/settings_data.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/settings_data.json b/config/settings_data.json index b348460ca5f..614d9aa9739 100644 --- a/config/settings_data.json +++ b/config/settings_data.json @@ -1,6 +1,8 @@ { "current": { - "logo_width": 90, + "logo": "{{ shop.brand.logo }}", + "logo_width": 180, + "favicon": "{{ shop.brand.square_logo }}", "type_header_font": "poppins_n6", "heading_scale": 100, "type_body_font": "poppins_n5", From f4d17b7f9ca6d68fc1a40b7115f8070ad4036055 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 11:56:33 +0000 Subject: [PATCH 028/316] Update from Shopify for theme descora-webshop/main Committed from shop: Mein Shop --- templates/product.headphone-stand.json | 224 +++++++++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 templates/product.headphone-stand.json diff --git a/templates/product.headphone-stand.json b/templates/product.headphone-stand.json new file mode 100644 index 00000000000..2b478db03da --- /dev/null +++ b/templates/product.headphone-stand.json @@ -0,0 +1,224 @@ +{ + "sections": { + "main": { + "type": "main-product", + "blocks": { + "vendor": { + "type": "text", + "settings": { + "text": "{{ product.vendor }}", + "text_style": "uppercase" + } + }, + "title": { + "type": "title", + "settings": { + } + }, + "caption": { + "type": "text", + "settings": { + "text": "{{ product.metafields.descriptors.subtitle.value }}", + "text_style": "subtitle" + } + }, + "price": { + "type": "price", + "settings": { + } + }, + "variant_picker": { + "type": "variant_picker", + "settings": { + "picker_type": "button" + } + }, + "quantity_selector": { + "type": "quantity_selector", + "settings": { + } + }, + "buy_buttons": { + "type": "buy_buttons", + "settings": { + "show_dynamic_checkout": true, + "show_gift_card_recipient": true + } + }, + "description": { + "type": "description", + "settings": { + } + }, + "collapsible-row-0": { + "type": "collapsible_tab", + "settings": { + "heading": "Materials", + "icon": "leather", + "content": "", + "page": "" + } + }, + "collapsible-row-1": { + "type": "collapsible_tab", + "settings": { + "heading": "Shipping & Returns", + "icon": "truck", + "content": "", + "page": "" + } + }, + "collapsible-row-2": { + "type": "collapsible_tab", + "settings": { + "heading": "Dimensions", + "icon": "ruler", + "content": "", + "page": "" + } + }, + "collapsible-row-3": { + "type": "collapsible_tab", + "settings": { + "heading": "Care Instructions", + "icon": "heart", + "content": "", + "page": "" + } + }, + "share": { + "type": "share", + "settings": { + "share_label": "Share" + } + } + }, + "block_order": [ + "vendor", + "title", + "caption", + "price", + "variant_picker", + "quantity_selector", + "buy_buttons", + "description", + "collapsible-row-0", + "collapsible-row-1", + "collapsible-row-2", + "collapsible-row-3", + "share" + ], + "settings": { + "enable_sticky_info": true, + "media_size": "large", + "constrain_to_viewport": true, + "gallery_layout": "stacked", + "mobile_thumbnails": "hide", + "hide_variants": true, + "enable_video_looping": false, + "padding_top": 36, + "padding_bottom": 12 + } + }, + "image-with-text": { + "type": "image-with-text", + "blocks": { + "image-with-text-0": { + "type": "heading", + "settings": { + "heading": "Image with text", + "heading_size": "h1" + } + }, + "image-with-text-1": { + "type": "text", + "settings": { + "text": "

    Pair text with an image to focus on your chosen product, collection, or blog post. Add details on availability, style, or even provide a review.<\/p>", + "text_style": "body" + } + } + }, + "block_order": [ + "image-with-text-0", + "image-with-text-1" + ], + "settings": { + "height": "small", + "desktop_image_width": "medium", + "layout": "text_first", + "desktop_content_position": "top", + "desktop_content_alignment": "left", + "content_layout": "no-overlap", + "color_scheme": "scheme-2", + "mobile_content_alignment": "left", + "padding_top": 36, + "padding_bottom": 36 + } + }, + "multicolumn": { + "type": "multicolumn", + "blocks": { + "column-0": { + "type": "column", + "settings": { + "title": "Free Shipping", + "text": "

    Pair text with an image to focus on your chosen product, collection, or blog post. Add details on availability, style, or even provide a review.<\/p>", + "link_label": "", + "link": "" + } + }, + "column-1": { + "type": "column", + "settings": { + "title": "Hassle-Free Exchanges", + "text": "

    Pair text with an image to focus on your chosen product, collection, or blog post. Add details on availability, style, or even provide a review.<\/p>", + "link_label": "", + "link": "" + } + } + }, + "block_order": [ + "column-0", + "column-1" + ], + "settings": { + "title": "", + "heading_size": "h1", + "image_width": "full", + "image_ratio": "adapt", + "columns_desktop": 2, + "column_alignment": "left", + "background_style": "none", + "button_label": "", + "button_link": "", + "color_scheme": "scheme-1", + "columns_mobile": "1", + "swipe_on_mobile": false, + "padding_top": 36, + "padding_bottom": 36 + } + }, + "related-products": { + "type": "related-products", + "settings": { + "heading": "You may also like", + "heading_size": "h2", + "columns_desktop": 4, + "color_scheme": "scheme-1", + "image_ratio": "square", + "show_secondary_image": true, + "show_vendor": false, + "show_rating": false, + "columns_mobile": "2", + "padding_top": 36, + "padding_bottom": 28 + } + } + }, + "order": [ + "main", + "image-with-text", + "multicolumn", + "related-products" + ] +} From 571b931615dd2d0755449a4519768c9bb068bd03 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 12:05:45 +0000 Subject: [PATCH 029/316] Update from Shopify for theme descora-webshop/main Committed from shop: Mein Shop --- templates/product.headphone-stand.json | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/templates/product.headphone-stand.json b/templates/product.headphone-stand.json index 2b478db03da..1ca1e81eeef 100644 --- a/templates/product.headphone-stand.json +++ b/templates/product.headphone-stand.json @@ -3,13 +3,6 @@ "main": { "type": "main-product", "blocks": { - "vendor": { - "type": "text", - "settings": { - "text": "{{ product.vendor }}", - "text_style": "uppercase" - } - }, "title": { "type": "title", "settings": { @@ -30,7 +23,8 @@ "variant_picker": { "type": "variant_picker", "settings": { - "picker_type": "button" + "picker_type": "button", + "swatch_shape": "circle" } }, "quantity_selector": { @@ -94,7 +88,6 @@ } }, "block_order": [ - "vendor", "title", "caption", "price", @@ -110,9 +103,13 @@ ], "settings": { "enable_sticky_info": true, + "color_scheme": "scheme-d3c596be-ed6f-4eaa-9ce9-304592ead2b1", "media_size": "large", "constrain_to_viewport": true, + "media_fit": "contain", "gallery_layout": "stacked", + "media_position": "left", + "image_zoom": "lightbox", "mobile_thumbnails": "hide", "hide_variants": true, "enable_video_looping": false, @@ -149,7 +146,9 @@ "desktop_content_position": "top", "desktop_content_alignment": "left", "content_layout": "no-overlap", + "section_color_scheme": "", "color_scheme": "scheme-2", + "image_behavior": "none", "mobile_content_alignment": "left", "padding_top": 36, "padding_bottom": 36 @@ -203,9 +202,11 @@ "settings": { "heading": "You may also like", "heading_size": "h2", + "products_to_show": 4, "columns_desktop": 4, "color_scheme": "scheme-1", "image_ratio": "square", + "image_shape": "default", "show_secondary_image": true, "show_vendor": false, "show_rating": false, From 1af90294640b7849e5d6f627339129b3941ac5c3 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 21:03:43 +0000 Subject: [PATCH 030/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- config/settings_data.json | 2 +- sections/footer-group.json | 3 ++- templates/index.json | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/config/settings_data.json b/config/settings_data.json index 614d9aa9739..88ebccfc836 100644 --- a/config/settings_data.json +++ b/config/settings_data.json @@ -82,7 +82,7 @@ "media_shadow_blur": 5, "popup_border_thickness": 1, "popup_border_opacity": 10, - "popup_corner_radius": 40, + "popup_corner_radius": 20, "popup_shadow_opacity": 5, "popup_shadow_horizontal_offset": 0, "popup_shadow_vertical_offset": 4, diff --git a/sections/footer-group.json b/sections/footer-group.json index a9263d9b541..d730ccf6e7f 100644 --- a/sections/footer-group.json +++ b/sections/footer-group.json @@ -33,9 +33,10 @@ "footer-2" ], "settings": { - "color_scheme": "scheme-1", + "color_scheme": "scheme-d3c596be-ed6f-4eaa-9ce9-304592ead2b1", "newsletter_enable": true, "newsletter_heading": "Subscribe to our emails", + "enable_follow_on_shop": true, "show_social": true, "enable_country_selector": false, "enable_language_selector": false, diff --git a/templates/index.json b/templates/index.json index a82db20e8de..f285733719e 100644 --- a/templates/index.json +++ b/templates/index.json @@ -85,14 +85,14 @@ "description": "", "show_description": false, "description_style": "body", - "collection": "all", + "collection": "all-retail-items", "products_to_show": 8, "columns_desktop": 4, "full_width": false, "show_view_all": false, "view_all_style": "solid", "enable_desktop_slider": false, - "color_scheme": "scheme-1", + "color_scheme": "scheme-d3c596be-ed6f-4eaa-9ce9-304592ead2b1", "image_ratio": "adapt", "image_shape": "default", "show_secondary_image": true, @@ -139,7 +139,7 @@ "desktop_layout": "left", "mobile_layout": "collage", "card_styles": "product-card-wrapper", - "color_scheme": "scheme-1", + "color_scheme": "scheme-d3c596be-ed6f-4eaa-9ce9-304592ead2b1", "padding_top": 36, "padding_bottom": 36 } @@ -153,7 +153,7 @@ "video_url": "https:\/\/www.youtube.com\/watch?v=_9VUPq3SxOc", "description": "", "full_width": false, - "color_scheme": "scheme-1", + "color_scheme": "scheme-d3c596be-ed6f-4eaa-9ce9-304592ead2b1", "padding_top": 36, "padding_bottom": 36 } @@ -204,7 +204,7 @@ "background_style": "none", "button_label": "", "button_link": "", - "color_scheme": "scheme-1", + "color_scheme": "scheme-d3c596be-ed6f-4eaa-9ce9-304592ead2b1", "columns_mobile": "1", "swipe_on_mobile": false, "padding_top": 36, From d9cd44a1f7165dc831f28bd126fb8fdd10f333a6 Mon Sep 17 00:00:00 2001 From: Floggiee <131165799+Floggiee@users.noreply.github.com> Date: Tue, 30 Apr 2024 15:11:01 +0200 Subject: [PATCH 031/316] added swatches --- assets/base.css | 262 +++++++++++++++++++++------------------ assets/color-swatches.js | 61 +++++++++ assets/theme-editor.js | 2 + 3 files changed, 204 insertions(+), 121 deletions(-) create mode 100644 assets/color-swatches.js diff --git a/assets/base.css b/assets/base.css index 5c3a813b4fa..17e22f2ec9a 100644 --- a/assets/base.css +++ b/assets/base.css @@ -143,12 +143,12 @@ body:has(.section-header .drawer-menu) .announcement-bar-section .page-width { z-index: 0; } -.section + .section { +.section+.section { margin-top: var(--spacing-sections-mobile); } @media screen and (min-width: 750px) { - .section + .section { + .section+.section { margin-top: var(--spacing-sections-desktop); } } @@ -290,6 +290,7 @@ h1, } @media only screen and (min-width: 750px) { + h1, .h1 { font-size: calc(var(--font-heading-scale) * 4rem); @@ -302,6 +303,7 @@ h2, } @media only screen and (min-width: 750px) { + h2, .h2 { font-size: calc(var(--font-heading-scale) * 2.4rem); @@ -314,6 +316,7 @@ h3, } @media only screen and (min-width: 750px) { + h3, .h3 { font-size: calc(var(--font-heading-scale) * 1.8rem); @@ -333,6 +336,7 @@ h5, } @media only screen and (min-width: 750px) { + h5, .h5 { font-size: calc(var(--font-heading-scale) * 1.3rem); @@ -548,7 +552,7 @@ hr { fill: rgba(var(--color-foreground), 0.55); } -details > * { +details>* { box-sizing: border-box; } @@ -647,7 +651,7 @@ summary::-webkit-details-marker { position: relative; } -.disclosure-has-popup[open] > summary::before { +.disclosure-has-popup[open]>summary::before { position: fixed; top: 0; right: 0; @@ -660,20 +664,20 @@ summary::-webkit-details-marker { background: transparent; } -.disclosure-has-popup > summary::before { +.disclosure-has-popup>summary::before { display: none; } -.disclosure-has-popup[open] > summary + * { +.disclosure-has-popup[open]>summary+* { z-index: 100; } @media screen and (min-width: 750px) { - .disclosure-has-popup[open] > summary + * { + .disclosure-has-popup[open]>summary+* { z-index: 4; } - .facets .disclosure-has-popup[open] > summary + * { + .facets .disclosure-has-popup[open]>summary+* { z-index: 2; } } @@ -784,6 +788,7 @@ summary::-webkit-details-marker { } @media screen and (min-width: 990px) { + .title, .title-wrapper-with-link { margin: 5rem 0 3rem; @@ -827,7 +832,7 @@ summary::-webkit-details-marker { margin-top: 0; } -.title-wrapper--no-top-margin > .title { +.title-wrapper--no-top-margin>.title { margin-top: 0; } @@ -1088,7 +1093,7 @@ summary::-webkit-details-marker { background-color: transparent; } -.media > *:not(.zoom):not(.deferred-media__poster-button), +.media>*:not(.zoom):not(.deferred-media__poster-button), .media model-viewer { display: block; max-width: 100%; @@ -1099,7 +1104,7 @@ summary::-webkit-details-marker { width: 100%; } -.media > img { +.media>img { object-fit: cover; object-position: center center; transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); @@ -1130,7 +1135,7 @@ summary::-webkit-details-marker { border-radius: 50%; } -.media.media--hover-effect > img + img { +.media.media--hover-effect>img+img { opacity: 0; } @@ -1170,7 +1175,8 @@ button.shopify-payment-button__button--unbranded, --shadow-blur-radius: var(--buttons-shadow-blur-radius); --shadow-opacity: var(--buttons-shadow-opacity); --shadow-visible: var(--buttons-shadow-visible); - --border-offset: var(--buttons-border-offset); /* reduce radius edge artifacts */ + --border-offset: var(--buttons-border-offset); + /* reduce radius edge artifacts */ --border-opacity: calc(1 - var(--buttons-border-opacity)); border-radius: var(--buttons-radius-outset); position: relative; @@ -1189,8 +1195,7 @@ button.shopify-payment-button__button--unbranded { } .cart__dynamic-checkout-buttons iframe { - box-shadow: var(--shadow-horizontal-offset) var(--shadow-vertical-offset) var(--shadow-blur-radius) - rgba(var(--color-shadow), var(--shadow-opacity)); + box-shadow: var(--shadow-horizontal-offset) var(--shadow-vertical-offset) var(--shadow-blur-radius) rgba(var(--color-shadow), var(--shadow-opacity)); } .button, @@ -1226,8 +1231,7 @@ button.shopify-payment-button__button--unbranded { left: 0; z-index: -1; border-radius: var(--buttons-radius-outset); - box-shadow: var(--shadow-horizontal-offset) var(--shadow-vertical-offset) var(--shadow-blur-radius) - rgba(var(--color-shadow), var(--shadow-opacity)); + box-shadow: var(--shadow-horizontal-offset) var(--shadow-vertical-offset) var(--shadow-blur-radius) rgba(var(--color-shadow), var(--shadow-opacity)); } .button:after, @@ -1242,8 +1246,7 @@ button.shopify-payment-button__button--unbranded { left: var(--buttons-border-width); z-index: 1; border-radius: var(--buttons-radius); - box-shadow: 0 0 0 calc(var(--buttons-border-width) + var(--border-offset)) - rgba(var(--color-button-text), var(--border-opacity)), + box-shadow: 0 0 0 calc(var(--buttons-border-width) + var(--border-offset)) rgba(var(--color-button-text), var(--border-opacity)), 0 0 0 var(--buttons-border-width) rgba(var(--color-button), var(--alpha-button-background)); transition: box-shadow var(--duration-short) ease; } @@ -1253,8 +1256,7 @@ button.shopify-payment-button__button--unbranded { .customer button:hover::after, .shopify-payment-button__button--unbranded:hover::after { --border-offset: 1.3px; - box-shadow: 0 0 0 calc(var(--buttons-border-width) + var(--border-offset)) - rgba(var(--color-button-text), var(--border-opacity)), + box-shadow: 0 0 0 calc(var(--buttons-border-width) + var(--border-offset)) rgba(var(--color-button-text), var(--border-opacity)), 0 0 0 calc(var(--buttons-border-width) + 1px) rgba(var(--color-button), var(--alpha-button-background)); } @@ -1335,7 +1337,7 @@ button.shopify-payment-button__button--unbranded { } } -.button.loading > .loading__spinner { +.button.loading>.loading__spinner { top: 50%; left: 50%; transform: translate(-50%, -50%); @@ -1345,11 +1347,11 @@ button.shopify-payment-button__button--unbranded { align-items: center; } -.button.loading > .loading__spinner .spinner { +.button.loading>.loading__spinner .spinner { width: fit-content; } -.button.loading > .loading__spinner .path { +.button.loading>.loading__spinner .path { stroke: rgb(var(--color-button-text)); } @@ -1374,7 +1376,7 @@ button.shopify-payment-button__button--unbranded { min-height: 4.4rem; } -details[open] > .share-button__fallback { +details[open]>.share-button__fallback { animation: animateMenuOpen var(--duration-default) ease; } @@ -1434,8 +1436,7 @@ details[open] > .share-button__fallback { bottom: 0; left: 0; border-radius: var(--inputs-radius-outset); - box-shadow: var(--inputs-shadow-horizontal-offset) var(--inputs-shadow-vertical-offset) - var(--inputs-shadow-blur-radius) rgba(var(--color-shadow), var(--inputs-shadow-opacity)); + box-shadow: var(--inputs-shadow-horizontal-offset) var(--inputs-shadow-vertical-offset) var(--inputs-shadow-blur-radius) rgba(var(--color-shadow), var(--inputs-shadow-opacity)); z-index: -1; } @@ -1459,7 +1460,7 @@ details[open] > .share-button__fallback { transform: scale(1.07); } -.share-button__close:not(.hidden) + .share-button__copy { +.share-button__close:not(.hidden)+.share-button__copy { display: none; } @@ -1481,8 +1482,8 @@ details[open] > .share-button__fallback { z-index: 2; } -.field:not(:focus-visible):not(.focused) + .share-button__copy:not(:focus-visible):not(.focused), -.field:not(:focus-visible):not(.focused) + .share-button__close:not(:focus-visible):not(.focused) { +.field:not(:focus-visible):not(.focused)+.share-button__copy:not(:focus-visible):not(.focused), +.field:not(:focus-visible):not(.focused)+.share-button__close:not(:focus-visible):not(.focused) { background-color: inherit; } @@ -1534,7 +1535,7 @@ details[open] > .share-button__fallback { margin: var(--inputs-border-width); } -.share-button__message:not(:empty):not(.hidden) ~ * { +.share-button__message:not(:empty):not(.hidden)~* { display: none; } @@ -1575,8 +1576,7 @@ details[open] > .share-button__fallback { bottom: 0; left: 0; border-radius: var(--inputs-radius-outset); - box-shadow: var(--inputs-shadow-horizontal-offset) var(--inputs-shadow-vertical-offset) - var(--inputs-shadow-blur-radius) rgba(var(--color-shadow), var(--inputs-shadow-opacity)); + box-shadow: var(--inputs-shadow-horizontal-offset) var(--inputs-shadow-vertical-offset) var(--inputs-shadow-blur-radius) rgba(var(--color-shadow), var(--inputs-shadow-opacity)); z-index: -1; } @@ -1613,8 +1613,7 @@ details[open] > .share-button__fallback { .customer .field:hover.field:after, .customer select:hover.select:after, .localization-form__select:hover.localization-form__select:after { - box-shadow: 0 0 0 calc(0.1rem + var(--inputs-border-width)) - rgba(var(--color-foreground), var(--inputs-border-opacity)); + box-shadow: 0 0 0 calc(0.1rem + var(--inputs-border-width)) rgba(var(--color-foreground), var(--inputs-border-opacity)); outline: 0; border-radius: var(--inputs-radius); } @@ -1654,7 +1653,7 @@ details[open] > .share-button__fallback { /* Select */ .select .icon-caret, -.customer select + svg { +.customer select+svg { height: 0.6rem; pointer-events: none; position: absolute; @@ -1711,12 +1710,12 @@ details[open] > .share-button__fallback { line-height: 1.5; } -.field__input:focus ~ .field__label, -.field__input:not(:placeholder-shown) ~ .field__label, -.field__input:-webkit-autofill ~ .field__label, -.customer .field input:focus ~ label, -.customer .field input:not(:placeholder-shown) ~ label, -.customer .field input:-webkit-autofill ~ label { +.field__input:focus~.field__label, +.field__input:not(:placeholder-shown)~.field__label, +.field__input:-webkit-autofill~.field__label, +.customer .field input:focus~label, +.customer .field input:not(:placeholder-shown)~label, +.customer .field input:-webkit-autofill~label { font-size: 1rem; top: calc(var(--inputs-border-width) + 0.5rem); left: calc(var(--inputs-border-width) + 2rem); @@ -1760,14 +1759,14 @@ details[open] > .share-button__fallback { width: 4.4rem; } -.field__button > svg { +.field__button>svg { height: 2.5rem; width: 2.5rem; } -.field__input:-webkit-autofill ~ .field__button, -.field__input:-webkit-autofill ~ .field__label, -.customer .field input:-webkit-autofill ~ label { +.field__input:-webkit-autofill~.field__button, +.field__input:-webkit-autofill~.field__label, +.customer .field input:-webkit-autofill~label { color: rgb(0, 0, 0); } @@ -1883,8 +1882,7 @@ input[type='checkbox'] { bottom: 0; left: 0; border-radius: var(--inputs-radius-outset); - box-shadow: var(--inputs-shadow-horizontal-offset) var(--inputs-shadow-vertical-offset) - var(--inputs-shadow-blur-radius) rgba(var(--color-shadow), var(--inputs-shadow-opacity)); + box-shadow: var(--inputs-shadow-horizontal-offset) var(--inputs-shadow-vertical-offset) var(--inputs-shadow-blur-radius) rgba(var(--color-shadow), var(--inputs-shadow-opacity)); z-index: -1; } @@ -1980,7 +1978,7 @@ input[type='checkbox'] { margin-bottom: 0; } -.quantity__rules .divider + .divider::before { +.quantity__rules .divider+.divider::before { content: '\2022'; margin: 0 0.5rem; } @@ -1989,8 +1987,8 @@ input[type='checkbox'] { position: relative; } -product-info .loading__spinner:not(.hidden) ~ *, -.quantity__rules-cart .loading__spinner:not(.hidden) ~ * { +product-info .loading__spinner:not(.hidden)~*, +.quantity__rules-cart .loading__spinner:not(.hidden)~* { visibility: hidden; } @@ -2174,7 +2172,7 @@ product-info .loading__spinner:not(.hidden) ~ *, justify-content: flex-end; } -.localization-wrapper .localization-selector + .disclosure__list-wrapper { +.localization-wrapper .localization-selector+.disclosure__list-wrapper { animation: animateMenuOpen var(--duration-default) ease; } @@ -2267,6 +2265,7 @@ product-info .loading__spinner:not(.hidden) ~ *, opacity: 0; transform: translateX(var(--announcement-translate-from)); } + 100% { opacity: 1; transform: translateX(0); @@ -2278,6 +2277,7 @@ product-info .loading__spinner:not(.hidden) ~ *, opacity: 1; transform: translateX(0); } + 100% { opacity: 0; transform: translateX(var(--announcement-translate-to)); @@ -2310,7 +2310,7 @@ product-info .loading__spinner:not(.hidden) ~ *, z-index: 4; } -.section-header ~ .shopify-section-group-header-group { +.section-header~.shopify-section-group-header-group { z-index: initial; } @@ -2399,7 +2399,7 @@ product-info .loading__spinner:not(.hidden) ~ *, line-height: 0; } -.header > .header__heading-link { +.header>.header__heading-link { line-height: 0; } @@ -2437,6 +2437,7 @@ product-info .loading__spinner:not(.hidden) ~ *, } @media screen and (max-width: 989px) { + .header__heading, .header__heading-link { text-align: center; @@ -2454,6 +2455,7 @@ product-info .loading__spinner:not(.hidden) ~ *, } @media screen and (min-width: 990px) { + .header--middle-left .header__heading-link, .header--top-left .header__heading-link { margin-left: -0.75rem; @@ -2550,16 +2552,16 @@ product-info .loading__spinner:not(.hidden) ~ *, } /* Search */ -menu-drawer + .header__search { +menu-drawer+.header__search { display: none; } -.header > .header__search { +.header>.header__search { grid-area: left-icons; justify-self: start; } -.header--top-center.drawer-menu > .header__search { +.header--top-center.drawer-menu>.header__search { margin-left: 3.2rem; } @@ -2567,7 +2569,7 @@ menu-drawer + .header__search { grid-area: left-icons; } -.header:not(.header--has-menu) * > .header__search { +.header:not(.header--has-menu) *>.header__search { display: none; } @@ -2576,27 +2578,28 @@ menu-drawer + .header__search { line-height: 0; } -.header--top-center > .header__search { +.header--top-center>.header__search { display: none; } -.header--top-center * > .header__search { +.header--top-center *>.header__search { display: inline-flex; } @media screen and (min-width: 990px) { - .header:not(.header--top-center) * > .header__search, - .header--top-center > .header__search { + + .header:not(.header--top-center) *>.header__search, + .header--top-center>.header__search { display: inline-flex; } - .header:not(.header--top-center) > .header__search, - .header--top-center * > .header__search { + .header:not(.header--top-center)>.header__search, + .header--top-center *>.header__search { display: none; } } -details[open] > .search-modal { +details[open]>.search-modal { opacity: 1; animation: animateMenuOpen var(--duration-default) ease; } @@ -2680,36 +2683,36 @@ details[open] .modal-overlay::after { transition: transform 150ms ease, opacity 150ms ease; } -details:not([open]) > .header__icon--menu .icon-close, -details[open] > .header__icon--menu .icon-hamburger { +details:not([open])>.header__icon--menu .icon-close, +details[open]>.header__icon--menu .icon-hamburger { visibility: hidden; opacity: 0; transform: scale(0.8); } -.js details[open]:not(.menu-opening) > .header__icon--menu .icon-close { +.js details[open]:not(.menu-opening)>.header__icon--menu .icon-close { visibility: hidden; } -.js details[open]:not(.menu-opening) > .header__icon--menu .icon-hamburger { +.js details[open]:not(.menu-opening)>.header__icon--menu .icon-hamburger { visibility: visible; opacity: 1; transform: scale(1.07); } -.js details > .header__submenu { +.js details>.header__submenu { opacity: 0; transform: translateY(-1.5rem); } -details[open] > .header__submenu { +details[open]>.header__submenu { animation: animateMenuOpen var(--duration-default) ease; animation-fill-mode: forwards; z-index: 1; } @media (prefers-reduced-motion) { - details[open] > .header__submenu { + details[open]>.header__submenu { opacity: 1; transform: translateY(0); } @@ -2736,7 +2739,7 @@ details[open] > .header__submenu { justify-self: center; } - .header--top-center .header__inline-menu > .list-menu--inline { + .header--top-center .header__inline-menu>.list-menu--inline { justify-content: center; } @@ -2768,15 +2771,15 @@ details[open] > .header__submenu { text-underline-offset: 0.3rem; } -details[open] > .header__menu-item { +details[open]>.header__menu-item { text-decoration: underline; } -details[open]:hover > .header__menu-item { +details[open]:hover>.header__menu-item { text-decoration-thickness: 0.2rem; } -details[open] > .header__menu-item .icon-caret { +details[open]>.header__menu-item .icon-caret { transform: rotate(180deg); } @@ -2801,8 +2804,7 @@ details[open] > .header__menu-item .icon-caret { border-color: rgba(var(--color-foreground), var(--popup-border-opacity)); border-style: solid; border-width: var(--popup-border-width); - box-shadow: var(--popup-shadow-horizontal-offset) var(--popup-shadow-vertical-offset) var(--popup-shadow-blur-radius) - rgba(var(--color-shadow), var(--popup-shadow-opacity)); + box-shadow: var(--popup-shadow-horizontal-offset) var(--popup-shadow-vertical-offset) var(--popup-shadow-blur-radius) rgba(var(--color-shadow), var(--popup-shadow-opacity)); z-index: -1; } @@ -2839,8 +2841,8 @@ details[open] > .header__menu-item .icon-caret { position: static; } -header-menu > details, -details-disclosure > details { +header-menu>details, +details-disclosure>details { position: relative; } @@ -2933,8 +2935,7 @@ details-disclosure > details { bottom: calc(var(--text-boxes-border-width) * -1); left: calc(var(--text-boxes-border-width) * -1); border-radius: var(--text-boxes-radius); - box-shadow: var(--text-boxes-shadow-horizontal-offset) var(--text-boxes-shadow-vertical-offset) - var(--text-boxes-shadow-blur-radius) rgba(var(--color-shadow), var(--text-boxes-shadow-opacity)); + box-shadow: var(--text-boxes-shadow-horizontal-offset) var(--text-boxes-shadow-vertical-offset) var(--text-boxes-shadow-blur-radius) rgba(var(--color-shadow), var(--text-boxes-shadow-opacity)); z-index: -1; } @@ -2950,6 +2951,7 @@ details-disclosure > details { border-right: none; border-radius: 0; } + .content-container--full-width-mobile:after { display: none; } @@ -2971,8 +2973,7 @@ details-disclosure > details { bottom: calc(var(--media-border-width) * -1); left: calc(var(--media-border-width) * -1); border-radius: var(--media-radius); - box-shadow: var(--media-shadow-horizontal-offset) var(--media-shadow-vertical-offset) var(--media-shadow-blur-radius) - rgba(var(--color-shadow), var(--media-shadow-opacity)); + box-shadow: var(--media-shadow-horizontal-offset) var(--media-shadow-vertical-offset) var(--media-shadow-blur-radius) rgba(var(--color-shadow), var(--media-shadow-opacity)); z-index: -1; pointer-events: none; } @@ -3054,6 +3055,7 @@ details-disclosure > details { /* outline and border styling for Windows High Contrast Mode */ @media (forced-colors: active) { + .button, .shopify-challenge__button, .customer button { @@ -3089,11 +3091,11 @@ details-disclosure > details { display: block; } -.rte > *:first-child { +.rte>*:first-child { margin-top: 0; } -.rte > *:last-child { +.rte>*:last-child { margin-bottom: 0; } @@ -3113,8 +3115,7 @@ details-disclosure > details { max-width: 100%; border: var(--media-border-width) solid rgba(var(--color-foreground), var(--media-border-opacity)); border-radius: var(--media-radius); - box-shadow: var(--media-shadow-horizontal-offset) var(--media-shadow-vertical-offset) var(--media-shadow-blur-radius) - rgba(var(--color-shadow), var(--media-shadow-opacity)); + box-shadow: var(--media-shadow-horizontal-offset) var(--media-shadow-vertical-offset) var(--media-shadow-blur-radius) rgba(var(--color-shadow), var(--media-shadow-opacity)); margin-bottom: var(--media-shadow-vertical-offset); } @@ -3148,7 +3149,7 @@ details-disclosure > details { display: inline-flex; } -.rte blockquote > * { +.rte blockquote>* { margin: -0.5rem 0 -0.5rem 0; } @@ -3197,8 +3198,8 @@ details-disclosure > details { clip-path: inset(0); } -.animate--fixed > img:not(.zoom):not(.deferred-media__poster-button), -.animate--fixed > svg:not(.zoom):not(.deferred-media__poster-button) { +.animate--fixed>img:not(.zoom):not(.deferred-media__poster-button), +.animate--fixed>svg:not(.zoom):not(.deferred-media__poster-button) { position: fixed; height: 100vh; } @@ -3208,8 +3209,8 @@ details-disclosure > details { --zoom-in-ratio: 1; } -.animate--zoom-in > img, -.animate--zoom-in > svg { +.animate--zoom-in>img, +.animate--zoom-in>svg { transition: scale var(--duration-short) linear; scale: var(--zoom-in-ratio); } @@ -3217,8 +3218,9 @@ details-disclosure > details { /* Animations */ @media (prefers-reduced-motion: no-preference) { - .animate--ambient > img, - .animate--ambient > svg { + + .animate--ambient>img, + .animate--ambient>svg { animation: animateAmbient 30s linear infinite; } @@ -3226,6 +3228,7 @@ details-disclosure > details { 0% { transform: rotate(0deg) translateX(1em) rotate(0deg) scale(1.2); } + 100% { transform: rotate(360deg) translateX(1em) rotate(-360deg) scale(1.2); } @@ -3268,6 +3271,7 @@ details-disclosure > details { transform: translateY(2rem); opacity: 0.01; } + to { transform: translateY(0); opacity: 1; @@ -3278,6 +3282,7 @@ details-disclosure > details { from { opacity: 0.01; } + to { opacity: 1; } @@ -3287,6 +3292,7 @@ details-disclosure > details { /* Element Hovers: Vertical Lift, 3d Lift */ @media (prefers-reduced-motion: no-preference) and (hover: hover) { + .animate--hover-3d-lift .card-wrapper .card--card, .animate--hover-3d-lift .card-wrapper .card--standard .card__inner, .animate--hover-3d-lift .button:not(.button--tertiary), @@ -3305,19 +3311,22 @@ details-disclosure > details { .animate--hover-3d-lift .customer button:not([disabled]):hover, .animate--hover-3d-lift .shopify-payment-button__button:hover, .animate--hover-3d-lift .deferred-media:hover .deferred-media__poster-button { - transition: transform var(--duration-extended) ease, box-shadow var(--duration-long) ease; /* Slow the card transition speed while hover is active. */ + transition: transform var(--duration-extended) ease, box-shadow var(--duration-long) ease; + /* Slow the card transition speed while hover is active. */ transform: rotate(1deg); box-shadow: -1rem -1rem 1rem -1rem rgba(0, 0, 0, 0.05), 1rem 1rem 1rem -1rem rgba(0, 0, 0, 0.05), 0 0 0.5rem 0 rgba(255, 255, 255, 0), 0 2rem 3.5rem -2rem rgba(0, 0, 0, 0.5); } .animate--hover-3d-lift .deferred-media:hover .deferred-media__poster-button { - transform: translate(-50%, -50%) scale(1.05); /* Apply a specialized transform to the video play button. */ + transform: translate(-50%, -50%) scale(1.05); + /* Apply a specialized transform to the video play button. */ } .animate--hover-3d-lift .collage__item .card-wrapper:hover .card--card, .animate--hover-3d-lift .collage__item .card-wrapper:hover .card--standard .card__inner { - transform: rotate(0.5deg); /* Less intense rotation for collage items. */ + transform: rotate(0.5deg); + /* Less intense rotation for collage items. */ } .animate--hover-3d-lift .product-grid .grid__item:hover, @@ -3325,11 +3334,13 @@ details-disclosure > details { .animate--hover-3d-lift .collage__item:hover, .animate--hover-3d-lift .blog-articles .article:hover, .animate--hover-3d-lift .complementary-slide li:hover { - z-index: 2; /* Make sure the hovered card is the topmost card. */ + z-index: 2; + /* Make sure the hovered card is the topmost card. */ } .animate--hover-3d-lift .product-grid { - isolation: isolate; /* Ensure z-index changes here don't negatively effect other UI stacking. */ + isolation: isolate; + /* Ensure z-index changes here don't negatively effect other UI stacking. */ } .animate--hover-3d-lift .card-wrapper .card--shape.card--standard:not(.card--text) .card__inner { @@ -3338,17 +3349,14 @@ details-disclosure > details { } .animate--hover-3d-lift .card-wrapper:hover .card--shape.card--standard:not(.card--text) .card__inner { - transition: transform calc(2 * var(--duration-extended)) ease, filter var(--duration-long) ease; /* Slow the card transition speed while hover is active. */ + transition: transform calc(2 * var(--duration-extended)) ease, filter var(--duration-long) ease; + /* Slow the card transition speed while hover is active. */ filter: drop-shadow(0rem 2rem 2rem rgba(0, 0, 0, 0.15)) drop-shadow(0rem 1rem 1rem rgba(0, 0, 0, 0.15)); } .animate--hover-3d-lift .card-wrapper:hover .card--card:after, .animate--hover-3d-lift .card-wrapper:hover .card--standard .card__inner:after, - .animate--hover-3d-lift - .card-wrapper:hover - .card--shape.card--standard:not(.card--text) - .card__inner - .card__media:before { + .animate--hover-3d-lift .card-wrapper:hover .card--shape.card--standard:not(.card--text) .card__inner .card__media:before { background-image: var(--easter-egg); background-size: 250px 250px; mix-blend-mode: color-dodge; @@ -3356,11 +3364,7 @@ details-disclosure > details { z-index: 2; } - .animate--hover-3d-lift - .card-wrapper:hover - .card--shape.card--standard:not(.card--text) - .card__inner - .card__media:before { + .animate--hover-3d-lift .card-wrapper:hover .card--shape.card--standard:not(.card--text) .card__inner .card__media:before { content: ''; position: absolute; top: 0; @@ -3384,12 +3388,10 @@ details-disclosure > details { background-size: 400% 100%; background-position: 90% 0; background-repeat: no-repeat; - background-image: linear-gradient( - 135deg, - rgba(255, 255, 255, 0) 45%, - rgba(255, 255, 255, 1) 50%, - rgba(255, 255, 255, 0) 55% - ); + background-image: linear-gradient(135deg, + rgba(255, 255, 255, 0) 45%, + rgba(255, 255, 255, 1) 50%, + rgba(255, 255, 255, 0) 55%); } .animate--hover-3d-lift .card-wrapper:hover .card--card:before, @@ -3444,13 +3446,31 @@ details-disclosure > details { .animate--hover-vertical-lift .button:not([disabled]):hover:after, .animate--hover-vertical-lift .customer button:not([disabled]):hover:after, .animate--hover-vertical-lift .shopify-payment-button__button:not([disabled]):hover:after { - --border-offset: 0.3px; /* Default is 1.3px as defined above in this file. This removes 1px to prevent the border from growing on buttons when this effect is on. */ - box-shadow: 0 0 0 calc(var(--buttons-border-width) + var(--border-offset)) - rgba(var(--color-button-text), var(--border-opacity)), + --border-offset: 0.3px; + /* Default is 1.3px as defined above in this file. This removes 1px to prevent the border from growing on buttons when this effect is on. */ + box-shadow: 0 0 0 calc(var(--buttons-border-width) + var(--border-offset)) rgba(var(--color-button-text), var(--border-opacity)), 0 0 0 var(--buttons-border-width) rgba(var(--color-button), var(--alpha-button-background)); } .animate--hover-vertical-lift .button:not([disabled]).button--secondary:hover:after { - --border-offset: 0px; /* Prevent the border from growing on buttons when this effect is on. */ + --border-offset: 0px; + /* Prevent the border from growing on buttons when this effect is on. */ } } + + +/* Color Swatch Styles */ +.color-swatch { + display: inline-block; + width: 20px; + height: 20px; + border-radius: 50%; + margin-right: 5px; + cursor: pointer; + border: 1px solid #ccc; +} + +.color-swatch.active { + border-color: #000; + box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2); +} \ No newline at end of file diff --git a/assets/color-swatches.js b/assets/color-swatches.js new file mode 100644 index 00000000000..9722d99c226 --- /dev/null +++ b/assets/color-swatches.js @@ -0,0 +1,61 @@ +// Wait for the document to load +document.addEventListener('DOMContentLoaded', function () { + // Find all color option dropdowns or inputs + const colorOptions = document.querySelectorAll('.single-option-selector[data-option="Color scheme"]'); + + // Loop through each color option + colorOptions.forEach(function (colorOption) { + const productForm = colorOption.closest('form[action*="/cart/add"]'); + const colorSwatchesContainer = document.createElement('div'); + colorSwatchesContainer.classList.add('color-swatches'); + + // Get the available color variants + const variants = JSON.parse(productForm.querySelector('[type="application/json"]').innerHTML); + const colorVariants = variants.filter(variant => variant.available); + + // Create color swatches + colorVariants.forEach(function (variant) { + const swatch = document.createElement('span'); + swatch.classList.add('color-swatch'); + const colors = variant.option1.split('/'); + swatch.style.setProperty('--color1', colors[0]); + swatch.style.setProperty('--color2', colors[1] || colors[0]); + swatch.dataset.variantId = variant.id; + swatch.addEventListener('click', function () { + // Update the selected variant + const selectedVariantId = this.dataset.variantId; + productForm.querySelector('input[name="id"]').value = selectedVariantId; + + // Remove active class from previously active swatch + const activeSwatches = colorSwatchesContainer.querySelectorAll('.color-swatch.active'); + activeSwatches.forEach(function (activeSwatch) { + activeSwatch.classList.remove('active'); + }); + + // Add active class to the clicked swatch + this.classList.add('active'); + }); + + colorSwatchesContainer.appendChild(swatch); + }); + + // Add event listener to update swatches when variant changes + productForm.addEventListener('variant_change', function (event) { + const selectedVariantId = event.detail.variant.id; + const activeSwatches = colorSwatchesContainer.querySelectorAll('.color-swatch.active'); + activeSwatches.forEach(function (activeSwatch) { + activeSwatch.classList.remove('active'); + }); + + const selectedSwatch = colorSwatchesContainer.querySelector(`.color-swatch[data-variant-id="${selectedVariantId}"]`); + if (selectedSwatch) { + selectedSwatch.classList.add('active'); + } + }); + + // Replace the color option with the swatches container + const optionContainer = colorOption.closest('.selector-wrapper'); + optionContainer.parentNode.insertBefore(colorSwatchesContainer, optionContainer); + optionContainer.style.display = 'none'; + }); +}); \ No newline at end of file diff --git a/assets/theme-editor.js b/assets/theme-editor.js index 557c908a3b3..04a6ce9a800 100644 --- a/assets/theme-editor.js +++ b/assets/theme-editor.js @@ -1,3 +1,5 @@ +import "./color-swatches.js"; + function hideProductModal() { const productModal = document.querySelectorAll('product-modal[open]'); productModal && productModal.forEach((modal) => modal.hide()); From e58c125e19d89d461c1439233aa59ebec24d195b Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 11:47:44 +0000 Subject: [PATCH 032/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- sections/two-color-swatches.liquid | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sections/two-color-swatches.liquid diff --git a/sections/two-color-swatches.liquid b/sections/two-color-swatches.liquid new file mode 100644 index 00000000000..c7243ff4866 --- /dev/null +++ b/sections/two-color-swatches.liquid @@ -0,0 +1,6 @@ +{% schema %} + { + "name": "Section name", + "settings": [] + } +{% endschema %} \ No newline at end of file From b059bc998ef2d8811031818f621dc083acca3ead Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 12:04:33 +0000 Subject: [PATCH 033/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- sections/two-color-swatches.liquid | 35 +++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/sections/two-color-swatches.liquid b/sections/two-color-swatches.liquid index c7243ff4866..cc9ab990ba3 100644 --- a/sections/two-color-swatches.liquid +++ b/sections/two-color-swatches.liquid @@ -1,6 +1,31 @@ {% schema %} - { - "name": "Section name", - "settings": [] - } -{% endschema %} \ No newline at end of file +{ + "name": "Two color swatches", + "settings": [] +} +{% endschema %} + +

    + {% for variant in product.variants %} + {% assign color_values = variant.option1 | split: '/' %} + {% assign color1 = color_values[0] %} + {% assign color2 = color_values[1] | default: color1 %} + + {% render 'swatch-input', id: 'two-color-swatch-' | append: variant.id, type: 'radio', name: 'two-color-swatch', value: variant.id, swatch: color1, product_form_id: product_form_id, checked: variant.available, shape: 'square', color2: color2 %} + {% endfor %} +
    + + From e2416cecd6434274831fa6dab65c66596a6332bc Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 12:05:50 +0000 Subject: [PATCH 034/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- templates/product.headphone-stand.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/templates/product.headphone-stand.json b/templates/product.headphone-stand.json index 1ca1e81eeef..cd8ba01e551 100644 --- a/templates/product.headphone-stand.json +++ b/templates/product.headphone-stand.json @@ -85,6 +85,12 @@ "settings": { "share_label": "Share" } + }, + "custom_liquid_7Xg7jz": { + "type": "custom_liquid", + "settings": { + "custom_liquid": "
    \n {% for variant in product.variants %}\n {% assign color_values = variant.option2 | split: '\/' %}\n {% assign color1 = color_values[0] %}\n {% assign color2 = color_values[1] | default: color1 %}\n\n {% render 'swatch-input', id: 'two-color-swatch-' | append: variant.id, type: 'radio', name: 'two-color-swatch', value: variant.id, swatch: color1, product_form_id: product_form_id, checked: variant.available, shape: 'square', color2: color2 %}\n {% endfor %}\n<\/div>\n\n From 9c4446f76be523edd22709729c0c0bf5f7e7fbd7 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 12:18:55 +0000 Subject: [PATCH 039/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- templates/product.headphone-stand.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/templates/product.headphone-stand.json b/templates/product.headphone-stand.json index b62c256bf33..cf88044c0fb 100644 --- a/templates/product.headphone-stand.json +++ b/templates/product.headphone-stand.json @@ -27,6 +27,12 @@ "swatch_shape": "circle" } }, + "custom_liquid_7Xg7jz": { + "type": "custom_liquid", + "settings": { + "custom_liquid": "{% render 'two-color-swatches', product: product, product_form_id: product_form_id %}" + } + }, "quantity_selector": { "type": "quantity_selector", "settings": { @@ -85,12 +91,6 @@ "settings": { "share_label": "Share" } - }, - "custom_liquid_7Xg7jz": { - "type": "custom_liquid", - "settings": { - "custom_liquid": "{% render 'two-color-swatches', product: product, product_form_id: product_form_id %}" - } } }, "block_order": [ @@ -98,6 +98,7 @@ "caption", "price", "variant_picker", + "custom_liquid_7Xg7jz", "quantity_selector", "buy_buttons", "description", @@ -105,8 +106,7 @@ "collapsible-row-1", "collapsible-row-2", "collapsible-row-3", - "share", - "custom_liquid_7Xg7jz" + "share" ], "settings": { "enable_sticky_info": true, From e9a8e27bcaaa6d8a1451c671736c4aa6539df3b5 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 12:19:31 +0000 Subject: [PATCH 040/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- snippets/two-color-swatches.liquid | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/snippets/two-color-swatches.liquid b/snippets/two-color-swatches.liquid index e69de29bb2d..a50f8c22130 100644 --- a/snippets/two-color-swatches.liquid +++ b/snippets/two-color-swatches.liquid @@ -0,0 +1,24 @@ +
    + {% for variant in product.variants %} + {% assign color_values = variant.option1 | split: '/' %} + {% assign color1 = color_values[0] %} + {% assign color2 = color_values[1] | default: color1 %} + + {% render 'swatch-input', id: 'two-color-swatch-' | append: variant.id, type: 'radio', name: 'two-color-swatch', value: variant.id, swatch: color1, swatch_color: color1, product_form_id: product_form_id, checked: variant.available, shape: 'square', color2: color2 %} + {% endfor %} +
    + + From 4568bf2856cb58a1c710851b3cee8a53b8affae0 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 12:20:03 +0000 Subject: [PATCH 041/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- templates/product.headphone-stand.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/product.headphone-stand.json b/templates/product.headphone-stand.json index cf88044c0fb..76a514499f7 100644 --- a/templates/product.headphone-stand.json +++ b/templates/product.headphone-stand.json @@ -30,7 +30,7 @@ "custom_liquid_7Xg7jz": { "type": "custom_liquid", "settings": { - "custom_liquid": "{% render 'two-color-swatches', product: product, product_form_id: product_form_id %}" + "custom_liquid": "{% render 'swatch-input', id: 'two-color-swatch-' | append: variant.id, type: 'radio', name: 'two-color-swatch', value: variant.id, swatch: color1, swatch_color: color1, product_form_id: product_form_id, checked: variant.available, shape: 'square', color2: color2 %}" } }, "quantity_selector": { From 779549ff11174557011918a196fec9b7a0305718 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 12:25:36 +0000 Subject: [PATCH 042/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- snippets/two-color-swatches.liquid | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/snippets/two-color-swatches.liquid b/snippets/two-color-swatches.liquid index a50f8c22130..94877048ffd 100644 --- a/snippets/two-color-swatches.liquid +++ b/snippets/two-color-swatches.liquid @@ -4,7 +4,13 @@ {% assign color1 = color_values[0] %} {% assign color2 = color_values[1] | default: color1 %} - {% render 'swatch-input', id: 'two-color-swatch-' | append: variant.id, type: 'radio', name: 'two-color-swatch', value: variant.id, swatch: color1, swatch_color: color1, product_form_id: product_form_id, checked: variant.available, shape: 'square', color2: color2 %} +
    +
    +
    +
    {% endfor %}
    @@ -14,9 +20,9 @@ const productForm = document.querySelector(`form[id="${productFormId}"]`); twoColorSwatchesContainer.addEventListener('click', (event) => { - const targetSwatch = event.target.closest('.swatch-input__input'); + const targetSwatch = event.target.closest('.custom-swatch.available'); if (targetSwatch) { - const selectedVariantId = targetSwatch.value; + const selectedVariantId = targetSwatch.dataset.variantId; productForm.querySelector('input[name="id"]').value = selectedVariantId; productForm.dispatchEvent(new CustomEvent('variant_change')); } From 489eced58d6052dd840b3403b50746e73720c078 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 12:26:10 +0000 Subject: [PATCH 043/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- assets/base.css | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/assets/base.css b/assets/base.css index 17e22f2ec9a..f174091d89b 100644 --- a/assets/base.css +++ b/assets/base.css @@ -3459,18 +3459,25 @@ details-disclosure>details { } -/* Color Swatch Styles */ -.color-swatch { - display: inline-block; - width: 20px; +.custom-swatch { + display: inline-flex; + align-items: center; + width: 40px; height: 20px; - border-radius: 50%; - margin-right: 5px; - cursor: pointer; border: 1px solid #ccc; + cursor: pointer; + margin-right: 5px; + position: relative; + + &.unavailable { + opacity: 0.5; + cursor: not-allowed; + } +} + +.custom-swatch__color1, +.custom-swatch__color2 { + width: 50%; + height: 100%; } -.color-swatch.active { - border-color: #000; - box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2); -} \ No newline at end of file From a76f43d95093df489469469fed3d7aacd815ef6a Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 12:26:27 +0000 Subject: [PATCH 044/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- assets/base.css | 20 -------------------- snippets/two-color-swatches.liquid | 12 +++--------- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/assets/base.css b/assets/base.css index f174091d89b..ff4d88d3906 100644 --- a/assets/base.css +++ b/assets/base.css @@ -3459,25 +3459,5 @@ details-disclosure>details { } -.custom-swatch { - display: inline-flex; - align-items: center; - width: 40px; - height: 20px; - border: 1px solid #ccc; - cursor: pointer; - margin-right: 5px; - position: relative; - &.unavailable { - opacity: 0.5; - cursor: not-allowed; - } -} - -.custom-swatch__color1, -.custom-swatch__color2 { - width: 50%; - height: 100%; -} diff --git a/snippets/two-color-swatches.liquid b/snippets/two-color-swatches.liquid index 94877048ffd..a50f8c22130 100644 --- a/snippets/two-color-swatches.liquid +++ b/snippets/two-color-swatches.liquid @@ -4,13 +4,7 @@ {% assign color1 = color_values[0] %} {% assign color2 = color_values[1] | default: color1 %} -
    -
    -
    -
    + {% render 'swatch-input', id: 'two-color-swatch-' | append: variant.id, type: 'radio', name: 'two-color-swatch', value: variant.id, swatch: color1, swatch_color: color1, product_form_id: product_form_id, checked: variant.available, shape: 'square', color2: color2 %} {% endfor %}
    @@ -20,9 +14,9 @@ const productForm = document.querySelector(`form[id="${productFormId}"]`); twoColorSwatchesContainer.addEventListener('click', (event) => { - const targetSwatch = event.target.closest('.custom-swatch.available'); + const targetSwatch = event.target.closest('.swatch-input__input'); if (targetSwatch) { - const selectedVariantId = targetSwatch.dataset.variantId; + const selectedVariantId = targetSwatch.value; productForm.querySelector('input[name="id"]').value = selectedVariantId; productForm.dispatchEvent(new CustomEvent('variant_change')); } From 06f18804fc3f63bfa9a423218c98c46143ea0d62 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 12:27:42 +0000 Subject: [PATCH 045/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- assets/color-swatches.js | 61 ---------------------------------------- assets/theme-editor.js | 2 -- 2 files changed, 63 deletions(-) delete mode 100644 assets/color-swatches.js diff --git a/assets/color-swatches.js b/assets/color-swatches.js deleted file mode 100644 index 9722d99c226..00000000000 --- a/assets/color-swatches.js +++ /dev/null @@ -1,61 +0,0 @@ -// Wait for the document to load -document.addEventListener('DOMContentLoaded', function () { - // Find all color option dropdowns or inputs - const colorOptions = document.querySelectorAll('.single-option-selector[data-option="Color scheme"]'); - - // Loop through each color option - colorOptions.forEach(function (colorOption) { - const productForm = colorOption.closest('form[action*="/cart/add"]'); - const colorSwatchesContainer = document.createElement('div'); - colorSwatchesContainer.classList.add('color-swatches'); - - // Get the available color variants - const variants = JSON.parse(productForm.querySelector('[type="application/json"]').innerHTML); - const colorVariants = variants.filter(variant => variant.available); - - // Create color swatches - colorVariants.forEach(function (variant) { - const swatch = document.createElement('span'); - swatch.classList.add('color-swatch'); - const colors = variant.option1.split('/'); - swatch.style.setProperty('--color1', colors[0]); - swatch.style.setProperty('--color2', colors[1] || colors[0]); - swatch.dataset.variantId = variant.id; - swatch.addEventListener('click', function () { - // Update the selected variant - const selectedVariantId = this.dataset.variantId; - productForm.querySelector('input[name="id"]').value = selectedVariantId; - - // Remove active class from previously active swatch - const activeSwatches = colorSwatchesContainer.querySelectorAll('.color-swatch.active'); - activeSwatches.forEach(function (activeSwatch) { - activeSwatch.classList.remove('active'); - }); - - // Add active class to the clicked swatch - this.classList.add('active'); - }); - - colorSwatchesContainer.appendChild(swatch); - }); - - // Add event listener to update swatches when variant changes - productForm.addEventListener('variant_change', function (event) { - const selectedVariantId = event.detail.variant.id; - const activeSwatches = colorSwatchesContainer.querySelectorAll('.color-swatch.active'); - activeSwatches.forEach(function (activeSwatch) { - activeSwatch.classList.remove('active'); - }); - - const selectedSwatch = colorSwatchesContainer.querySelector(`.color-swatch[data-variant-id="${selectedVariantId}"]`); - if (selectedSwatch) { - selectedSwatch.classList.add('active'); - } - }); - - // Replace the color option with the swatches container - const optionContainer = colorOption.closest('.selector-wrapper'); - optionContainer.parentNode.insertBefore(colorSwatchesContainer, optionContainer); - optionContainer.style.display = 'none'; - }); -}); \ No newline at end of file diff --git a/assets/theme-editor.js b/assets/theme-editor.js index 04a6ce9a800..557c908a3b3 100644 --- a/assets/theme-editor.js +++ b/assets/theme-editor.js @@ -1,5 +1,3 @@ -import "./color-swatches.js"; - function hideProductModal() { const productModal = document.querySelectorAll('product-modal[open]'); productModal && productModal.forEach((modal) => modal.hide()); From e8a4447af143d993fec7ea610c73e99a0f9c3858 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 12:29:23 +0000 Subject: [PATCH 046/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- assets/base.css | 20 ++++++++++++++++++++ snippets/two-color-swatches.liquid | 12 +++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/assets/base.css b/assets/base.css index ff4d88d3906..f174091d89b 100644 --- a/assets/base.css +++ b/assets/base.css @@ -3459,5 +3459,25 @@ details-disclosure>details { } +.custom-swatch { + display: inline-flex; + align-items: center; + width: 40px; + height: 20px; + border: 1px solid #ccc; + cursor: pointer; + margin-right: 5px; + position: relative; + &.unavailable { + opacity: 0.5; + cursor: not-allowed; + } +} + +.custom-swatch__color1, +.custom-swatch__color2 { + width: 50%; + height: 100%; +} diff --git a/snippets/two-color-swatches.liquid b/snippets/two-color-swatches.liquid index a50f8c22130..94877048ffd 100644 --- a/snippets/two-color-swatches.liquid +++ b/snippets/two-color-swatches.liquid @@ -4,7 +4,13 @@ {% assign color1 = color_values[0] %} {% assign color2 = color_values[1] | default: color1 %} - {% render 'swatch-input', id: 'two-color-swatch-' | append: variant.id, type: 'radio', name: 'two-color-swatch', value: variant.id, swatch: color1, swatch_color: color1, product_form_id: product_form_id, checked: variant.available, shape: 'square', color2: color2 %} +
    +
    +
    +
    {% endfor %}
@@ -14,9 +20,9 @@ const productForm = document.querySelector(`form[id="${productFormId}"]`); twoColorSwatchesContainer.addEventListener('click', (event) => { - const targetSwatch = event.target.closest('.swatch-input__input'); + const targetSwatch = event.target.closest('.custom-swatch.available'); if (targetSwatch) { - const selectedVariantId = targetSwatch.value; + const selectedVariantId = targetSwatch.dataset.variantId; productForm.querySelector('input[name="id"]').value = selectedVariantId; productForm.dispatchEvent(new CustomEvent('variant_change')); } From f5cfeb87c10640567a6a28cff370cd9c2bb628f2 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 12:29:50 +0000 Subject: [PATCH 047/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- assets/base.css | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/assets/base.css b/assets/base.css index f174091d89b..b936d6fe77c 100644 --- a/assets/base.css +++ b/assets/base.css @@ -3459,6 +3459,7 @@ details-disclosure>details { } +/* Custom Two-Colored Swatches */ .custom-swatch { display: inline-flex; align-items: center; @@ -3468,11 +3469,11 @@ details-disclosure>details { cursor: pointer; margin-right: 5px; position: relative; +} - &.unavailable { - opacity: 0.5; - cursor: not-allowed; - } +.custom-swatch.unavailable { + opacity: 0.5; + cursor: not-allowed; } .custom-swatch__color1, From f4ba697ac3025feb266881172368f22a6d713859 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 12:30:19 +0000 Subject: [PATCH 048/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- templates/product.headphone-stand.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/product.headphone-stand.json b/templates/product.headphone-stand.json index 76a514499f7..cf88044c0fb 100644 --- a/templates/product.headphone-stand.json +++ b/templates/product.headphone-stand.json @@ -30,7 +30,7 @@ "custom_liquid_7Xg7jz": { "type": "custom_liquid", "settings": { - "custom_liquid": "{% render 'swatch-input', id: 'two-color-swatch-' | append: variant.id, type: 'radio', name: 'two-color-swatch', value: variant.id, swatch: color1, swatch_color: color1, product_form_id: product_form_id, checked: variant.available, shape: 'square', color2: color2 %}" + "custom_liquid": "{% render 'two-color-swatches', product: product, product_form_id: product_form_id %}" } }, "quantity_selector": { From 98a6935d6d2e94c9616b8afe55bbffd8c37558cb Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 12:42:04 +0000 Subject: [PATCH 049/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- sections/main-product.liquid | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sections/main-product.liquid b/sections/main-product.liquid index 3983a67003c..b20a904daff 100644 --- a/sections/main-product.liquid +++ b/sections/main-product.liquid @@ -451,7 +451,7 @@ %} {%- when 'variant_picker' -%} - {% render 'product-variant-picker', product: product, block: block, product_form_id: product_form_id %} + {% render 'two-color-swatches', product: product, product_form_id: product_form_id %} {%- when 'buy_buttons' -%} {%- render 'buy-buttons', block: block, @@ -560,9 +560,9 @@ -%}
  • {%- if block.settings.enable_quick_add -%} - {% assign quick_add = "standard" %} + {% assign quick_add = 'standard' %} {%- else -%} - {% assign quick_add = "none" %} + {% assign quick_add = 'none' %} {%- endif -%} {% render 'card-product', card_product: product, From b508aeb0db3e2c7f006f21757c14df6ac75e0154 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 12:44:20 +0000 Subject: [PATCH 050/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- snippets/two-color-swatches.liquid | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/snippets/two-color-swatches.liquid b/snippets/two-color-swatches.liquid index 94877048ffd..a50f8c22130 100644 --- a/snippets/two-color-swatches.liquid +++ b/snippets/two-color-swatches.liquid @@ -4,13 +4,7 @@ {% assign color1 = color_values[0] %} {% assign color2 = color_values[1] | default: color1 %} -
    -
    -
    -
    + {% render 'swatch-input', id: 'two-color-swatch-' | append: variant.id, type: 'radio', name: 'two-color-swatch', value: variant.id, swatch: color1, swatch_color: color1, product_form_id: product_form_id, checked: variant.available, shape: 'square', color2: color2 %} {% endfor %}
  • @@ -20,9 +14,9 @@ const productForm = document.querySelector(`form[id="${productFormId}"]`); twoColorSwatchesContainer.addEventListener('click', (event) => { - const targetSwatch = event.target.closest('.custom-swatch.available'); + const targetSwatch = event.target.closest('.swatch-input__input'); if (targetSwatch) { - const selectedVariantId = targetSwatch.dataset.variantId; + const selectedVariantId = targetSwatch.value; productForm.querySelector('input[name="id"]').value = selectedVariantId; productForm.dispatchEvent(new CustomEvent('variant_change')); } From 52f114aed641a5f1b7e88cc819cfa96e637b83d5 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 12:45:45 +0000 Subject: [PATCH 051/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- sections/main-product.liquid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sections/main-product.liquid b/sections/main-product.liquid index b20a904daff..8f6d3a94f79 100644 --- a/sections/main-product.liquid +++ b/sections/main-product.liquid @@ -451,7 +451,7 @@ %} {%- when 'variant_picker' -%} - {% render 'two-color-swatches', product: product, product_form_id: product_form_id %} + {% render 'product-variant-picker', product: product, block: block, product_form_id: product_form_id %} {%- when 'buy_buttons' -%} {%- render 'buy-buttons', block: block, From 05ad2a1c9ca9fbb785a52dea14d6d92cae88bbe1 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 12:58:54 +0000 Subject: [PATCH 052/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- templates/product.headphone-stand.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/product.headphone-stand.json b/templates/product.headphone-stand.json index cf88044c0fb..f109ade42a0 100644 --- a/templates/product.headphone-stand.json +++ b/templates/product.headphone-stand.json @@ -30,7 +30,7 @@ "custom_liquid_7Xg7jz": { "type": "custom_liquid", "settings": { - "custom_liquid": "{% render 'two-color-swatches', product: product, product_form_id: product_form_id %}" + "custom_liquid": "{% render 'swatch-input',\n id: product.id,\n name: product.name,\n value: #FF0000,\n swatch: swatch,\n product_form_id: product.id,\n checked: checked\n %}" } }, "quantity_selector": { From ecffc36347191bbfc5b6c16c3dbdbd71ec3e65a8 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 13:10:30 +0000 Subject: [PATCH 053/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- config/settings_data.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/settings_data.json b/config/settings_data.json index 88ebccfc836..13effe142ac 100644 --- a/config/settings_data.json +++ b/config/settings_data.json @@ -131,6 +131,15 @@ "content_for_index": [ ], + "blocks": { + "4571859552318407796": { + "type": "shopify:\/\/apps\/glo-color-swatch\/blocks\/app-embed-block\/4394f710-096c-4021-bbde-8ebb26057c11", + "disabled": false, + "settings": { + "customCssGCW": "" + } + } + }, "color_schemes": { "scheme-1": { "settings": { From 02c7c4c98e3c9c9ed7a42ae6d7097b13562be787 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 14:48:49 +0000 Subject: [PATCH 054/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- templates/product.headphone-stand.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/product.headphone-stand.json b/templates/product.headphone-stand.json index f109ade42a0..a2a638dd269 100644 --- a/templates/product.headphone-stand.json +++ b/templates/product.headphone-stand.json @@ -30,7 +30,7 @@ "custom_liquid_7Xg7jz": { "type": "custom_liquid", "settings": { - "custom_liquid": "{% render 'swatch-input',\n id: product.id,\n name: product.name,\n value: #FF0000,\n swatch: swatch,\n product_form_id: product.id,\n checked: checked\n %}" + "custom_liquid": "" } }, "quantity_selector": { From 78b661ece24ada075593431fe1432094a1504d6c Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 14:50:57 +0000 Subject: [PATCH 055/316] Update from Shopify for theme descora-webshop/main Committed from shop: Descora Station --- templates/product.headphone-stand.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/product.headphone-stand.json b/templates/product.headphone-stand.json index a2a638dd269..eaf935e5520 100644 --- a/templates/product.headphone-stand.json +++ b/templates/product.headphone-stand.json @@ -30,7 +30,7 @@ "custom_liquid_7Xg7jz": { "type": "custom_liquid", "settings": { - "custom_liquid": "" + "custom_liquid": " From d83393dca0647043a8e269ca96368e97b76a0a3c Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 31 Aug 2024 14:58:10 +0000 Subject: [PATCH 202/316] Update from Shopify for theme descora-webshop/descora-dawn-15 Committed from shop: Descora Station --- templates/product.headphone-stand.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/product.headphone-stand.json b/templates/product.headphone-stand.json index f1c1253b58d..c69c40f9a0c 100644 --- a/templates/product.headphone-stand.json +++ b/templates/product.headphone-stand.json @@ -32,7 +32,7 @@ "variant_picker": { "type": "variant_picker", "settings": { - "picker_type": "dropdown", + "picker_type": "button", "swatch_shape": "circle" } }, From cd7666b769c096dd34f48ba79b51c17a27da67e5 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 31 Aug 2024 14:59:27 +0000 Subject: [PATCH 203/316] Update from Shopify for theme descora-webshop/descora-dawn-15 Committed from shop: Descora Station --- config/settings_data.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/settings_data.json b/config/settings_data.json index 098d0ecdf73..7996e55695f 100644 --- a/config/settings_data.json +++ b/config/settings_data.json @@ -9,6 +9,9 @@ */ { "current": { + "optionName": "Color scheme", + "swatchType": "variantImage", + "swatchColors": "light pink - white:#000000\nwhite - light pink:#f5f5f5\nBlue:#005eff\nRed:#c9002c\nPink:#ffd5e6\nBrown:#a2896b\nOlive:#808000\nGreenRed:#008000#c9002c\nGreenRedBlue:#008000#c9002c#005eff", "logo": "{{ shop.brand.logo }}", "logo_width": 170, "favicon": "{{ shop.brand.square_logo }}", From 19ec64d8b2f108b228b5bc8fae0ae34fc4556880 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 31 Aug 2024 15:00:07 +0000 Subject: [PATCH 204/316] Update from Shopify for theme descora-webshop/descora-dawn-15 Committed from shop: Descora Station --- config/settings_data.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/settings_data.json b/config/settings_data.json index 7996e55695f..5cfe93180e1 100644 --- a/config/settings_data.json +++ b/config/settings_data.json @@ -9,7 +9,7 @@ */ { "current": { - "optionName": "Color scheme", + "optionName": "Color", "swatchType": "variantImage", "swatchColors": "light pink - white:#000000\nwhite - light pink:#f5f5f5\nBlue:#005eff\nRed:#c9002c\nPink:#ffd5e6\nBrown:#a2896b\nOlive:#808000\nGreenRed:#008000#c9002c\nGreenRedBlue:#008000#c9002c#005eff", "logo": "{{ shop.brand.logo }}", From 6015a9ec48fd7a3ea8f624efcd302f10141f111a Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 31 Aug 2024 15:01:28 +0000 Subject: [PATCH 205/316] Update from Shopify for theme descora-webshop/descora-dawn-15 Committed from shop: Descora Station --- config/settings_data.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/settings_data.json b/config/settings_data.json index 5cfe93180e1..1e19e09dddd 100644 --- a/config/settings_data.json +++ b/config/settings_data.json @@ -9,9 +9,9 @@ */ { "current": { - "optionName": "Color", + "optionName": "Color scheme", "swatchType": "variantImage", - "swatchColors": "light pink - white:#000000\nwhite - light pink:#f5f5f5\nBlue:#005eff\nRed:#c9002c\nPink:#ffd5e6\nBrown:#a2896b\nOlive:#808000\nGreenRed:#008000#c9002c\nGreenRedBlue:#008000#c9002c#005eff", + "swatchColors": "llight:#000000\npink:#f5f5f5\nBlue:#005eff\nRed:#c9002c\nPink:#ffd5e6\nBrown:#a2896b\nOlive:#808000\nGreenRed:#008000#c9002c\nGreenRedBlue:#008000#c9002c#005eff", "logo": "{{ shop.brand.logo }}", "logo_width": 170, "favicon": "{{ shop.brand.square_logo }}", From 6bb53712e72cba23ff63236ab38671f8c0ae4bd1 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 31 Aug 2024 15:01:44 +0000 Subject: [PATCH 206/316] Update from Shopify for theme descora-webshop/descora-dawn-15 Committed from shop: Descora Station --- config/settings_data.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/settings_data.json b/config/settings_data.json index 1e19e09dddd..5b8d25cffa1 100644 --- a/config/settings_data.json +++ b/config/settings_data.json @@ -9,8 +9,8 @@ */ { "current": { - "optionName": "Color scheme", - "swatchType": "variantImage", + "optionName": "Color", + "swatchType": "color", "swatchColors": "llight:#000000\npink:#f5f5f5\nBlue:#005eff\nRed:#c9002c\nPink:#ffd5e6\nBrown:#a2896b\nOlive:#808000\nGreenRed:#008000#c9002c\nGreenRedBlue:#008000#c9002c#005eff", "logo": "{{ shop.brand.logo }}", "logo_width": 170, From b0a60143804d13fa2f9051e08a6d103b49437332 Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 31 Aug 2024 15:06:26 +0000 Subject: [PATCH 207/316] Update from Shopify for theme descora-webshop/descora-dawn-15 Committed from shop: Descora Station --- snippets/color-option.liquid | 277 ++++++++++++++--------------------- 1 file changed, 113 insertions(+), 164 deletions(-) diff --git a/snippets/color-option.liquid b/snippets/color-option.liquid index c4ace0d25a3..bc505ef635e 100644 --- a/snippets/color-option.liquid +++ b/snippets/color-option.liquid @@ -1,182 +1,131 @@ -{%- liquid - assign variants_available_arr = product.variants | map: 'available' - assign variants_option1_arr = product.variants | map: 'option1' - assign variants_option2_arr = product.variants | map: 'option2' - assign variants_option3_arr = product.variants | map: 'option3' +{% comment %} + Renders color swatch options for product variants + Accepts: + - product: {Object} product object. + - option: {Object} current product_option object. + - block: {Object} block object. +{% endcomment %} - assign product_form_id = 'product-form-' | append: section.id - - assign swatchType = settings.swatchType - assign swatchStyle = settings.swatchStyle - assign swatchSize = settings.swatchSize - assign swatchColors = settings.swatchColors | newline_to_br | split: '
    ' --%} +{%- assign swatchType = settings.swatchType -%} +{%- assign swatchStyle = settings.swatchStyle -%} +{%- assign swatchSize = settings.swatchSize -%} +{%- assign swatchColors = settings.swatchColors | newline_to_br | split: '
    ' -%} -{%- for value in option.values -%} - {%- liquid - assign option_disabled = true +
    + {%- for value in option.values -%} + {%- assign color_swatch_id = value | handle -%} + {%- assign swatch_style = '' -%} - for option1_name in variants_option1_arr - case option.position - when 1 - if variants_option1_arr[forloop.index0] == value and variants_available_arr[forloop.index0] - assign option_disabled = false - endif - when 2 - if option1_name == product.selected_or_first_available_variant.option1 and variants_option2_arr[forloop.index0] == value and variants_available_arr[forloop.index0] - assign option_disabled = false - endif - when 3 - if option1_name == product.selected_or_first_available_variant.option1 and variants_option2_arr[forloop.index0] == product.selected_or_first_available_variant.option2 and variants_option3_arr[forloop.index0] == value and variants_available_arr[forloop.index0] - assign option_disabled = false - endif - endcase - endfor - -%} - - {%- if block.settings.picker_type == 'button' -%} - - {%- if swatchType == 'variantImage' -%} - - {%- else -%} - {%- liquid - for colorData in swatchColors - assign colorDataArr = colorData | split: ':' - assign ruleName = colorDataArr[0] | strip - if value == ruleName - assign colorCodes = colorDataArr[1] | strip | split: ',' - break - endif - endfor - -%} - + {%- break -%} + {%- endif -%} + {%- endfor -%} {%- endif -%} - {%- elsif block.settings.picker_type == 'dropdown' -%} - - {%- endif -%} -{%- endfor -%} + + {{ value }} + + {%- endfor -%} +
    From 8b93a1fc9ec0c70d7063a3d921551ed7446109ab Mon Sep 17 00:00:00 2001 From: "shopify[bot]" <79544226+shopify[bot]@users.noreply.github.com> Date: Sat, 31 Aug 2024 15:09:25 +0000 Subject: [PATCH 208/316] Update from Shopify for theme descora-webshop/descora-dawn-15 Committed from shop: Descora Station --- snippets/color-option.liquid | 87 +++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 41 deletions(-) diff --git a/snippets/color-option.liquid b/snippets/color-option.liquid index bc505ef635e..31505808e70 100644 --- a/snippets/color-option.liquid +++ b/snippets/color-option.liquid @@ -6,20 +6,25 @@ - block: {Object} block object. {% endcomment %} -{%- assign swatchType = settings.swatchType -%} -{%- assign swatchStyle = settings.swatchStyle -%} -{%- assign swatchSize = settings.swatchSize -%} -{%- assign swatchColors = settings.swatchColors | newline_to_br | split: '
    ' -%} +{%- assign swatch_type = settings.swatchType -%} +{%- assign swatch_style = settings.swatchStyle -%} +{%- assign swatch_size = settings.swatchSize -%} +{%- assign swatch_colors = settings.swatchColors | newline_to_br | split: '
    ' -%} -
    +
    {%- for value in option.values -%} - {%- assign color_swatch_id = value | handle -%} - {%- assign swatch_style = '' -%} - - {%- if swatchType == 'color' -%} - {%- for color in swatchColors -%} - {%- assign color_data = color | split: ':' -%} - {%- if color_data.first == value -%} - {%- assign swatch_style = 'background-color:' | append: color_data.last -%} - {%- break -%} - {%- endif -%} - {%- endfor -%} - {%- elsif swatchType == 'variantImage' -%} - {%- for variant in product.variants -%} - {%- if variant.options contains value -%} - {%- assign swatch_style = 'background-image: url(' - | append: variant.image - | image_url: width: swatchSize - | append: ')' - -%} - {%- break -%} - {%- endif -%} - {%- endfor -%} - {%- endif -%} + {%- liquid + assign color_swatch_id = section.id | append: '-' | append: option.position | append: '-' | append: forloop.index0 + assign swatch_style = '' + if swatch_type == 'color' + for color in swatch_colors + assign color_data = color | split: ':' + if color_data.first == value + assign swatch_style = 'background-color:' | append: color_data.last + break + endif + endfor + elsif swatch_type == 'variantImage' + for variant in product.variants + if variant.options contains value + assign swatch_style = 'background-image: url(' | append: variant.image | image_url: width: swatch_size | append: ')' + break + endif + endfor + endif + -%}