From 7415b0a8651b9b23077dce50cfd9bb949340476c Mon Sep 17 00:00:00 2001 From: gsragrotraders Date: Tue, 28 Apr 2026 16:27:00 +0530 Subject: [PATCH 1/3] Create sendriya-brand.css --- assets/sendriya-brand.css | 172 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 assets/sendriya-brand.css diff --git a/assets/sendriya-brand.css b/assets/sendriya-brand.css new file mode 100644 index 00000000000..90ccc05401d --- /dev/null +++ b/assets/sendriya-brand.css @@ -0,0 +1,172 @@ +/* SENDRIYA LIFE — BRAND OVERLAY CSS + Premium organic wellness · Inspired by thegoodleaf.in PDP + Loaded via layout/theme.liquid */ + +@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Poppins:wght@300;400;500;600;700&display=swap'); + +:root { + --sl-green-deep: #006838; + --sl-green-sage: #6F7E69; + --sl-orange: #E57152; + --sl-peach: #F2A263; + --sl-coral: #DD6C63; + --sl-rose: #B16776; + --sl-plum: #7C5366; + --sl-cream: #E3D4C6; + --sl-cream-light: #FAF6F0; + --sl-ink: #1F2A1F; + --sl-muted: #6B6B66; + --sl-font-heading: 'Playfair Display', 'Agatho', Georgia, serif; + --sl-font-body: 'Poppins', 'Inter', system-ui, sans-serif; + --sl-radius-card: 18px; + --sl-radius-pill: 999px; + --sl-shadow-soft: 0 4px 18px rgba(0,0,0,0.06); + --color-foreground: 31, 42, 31; + --color-background: 250, 246, 240; + --color-button: 0, 104, 56; + --color-button-text: 255, 255, 255; + --color-secondary-button: 31, 42, 31; + --color-link: 0, 104, 56; +} + +body, .gradient { + font-family: var(--sl-font-body) !important; + background: var(--sl-cream-light) !important; + color: var(--sl-ink); +} + +h1, h2, h3, .h1, .h2, .h3, +.product__title, .product__title h1, +.section-header__title, .banner__heading, .card__heading { + font-family: var(--sl-font-heading) !important; + font-weight: 600; + letter-spacing: -0.01em; + color: var(--sl-ink); +} + +.header { background: var(--sl-cream-light); border-bottom: 1px solid rgba(0,0,0,0.06); } +.header__heading-link, .header__menu-item { color: var(--sl-ink) !important; } +.header__menu-item:hover { color: var(--sl-green-deep) !important; } + +.button, button.shopify-payment-button__button { + border-radius: var(--sl-radius-pill) !important; + font-family: var(--sl-font-body) !important; + font-weight: 500; + letter-spacing: 0.02em; + padding: 14px 32px !important; + transition: transform .15s ease, box-shadow .15s ease; +} +.button--primary { background: var(--sl-green-deep) !important; color: #fff !important; border: none; } +.button--primary:hover { background: #00582f !important; transform: translateY(-1px); box-shadow: var(--sl-shadow-soft); } +.button--secondary { background: transparent !important; color: var(--sl-ink) !important; border: 1.5px solid var(--sl-ink) !important; } +.button--secondary:hover { background: var(--sl-ink) !important; color: #fff !important; } + +.product { background: var(--sl-cream-light); padding-top: 24px; } +.product__media-wrapper, .product__media-item, .product-media-container, +.product__media, .product__media img { + border-radius: var(--sl-radius-card) !important; + overflow: hidden; + background: #fff; +} +.product__title h1, .product__title { + font-size: clamp(2rem, 4vw, 3.25rem) !important; + line-height: 1.1; + margin-bottom: 12px; +} +.product__text.subtitle { + font-family: var(--sl-font-body); color: var(--sl-green-sage); + font-weight: 500; letter-spacing: 0.08em; + text-transform: uppercase; font-size: 0.78rem; +} + +.price__regular .price-item--regular, .price-item--regular { + font-family: var(--sl-font-heading); + font-size: 1.85rem; + color: var(--sl-green-deep); + font-weight: 600; +} + +.product__description, .rte { font-size: 1rem; line-height: 1.7; color: var(--sl-ink); } +.product__description p { margin-bottom: 1em; } + +.product-form__input input[type=radio] + label, .variant-input label { + border-radius: var(--sl-radius-pill) !important; + border: 1.5px solid rgba(0,0,0,0.15) !important; + padding: 8px 18px !important; + font-weight: 500; +} +.product-form__input input[type=radio]:checked + label { + background: var(--sl-green-deep) !important; + color: #fff !important; + border-color: var(--sl-green-deep) !important; +} + +.quantity { border-radius: var(--sl-radius-pill); border: 1.5px solid rgba(0,0,0,0.15); overflow: hidden; } + +.product-form__submit { + background: var(--sl-green-deep) !important; + color: #fff !important; + border-radius: var(--sl-radius-pill) !important; + font-weight: 600 !important; + letter-spacing: 0.04em; + text-transform: none; + font-size: 1rem !important; + padding: 16px 36px !important; +} +.product-form__submit:hover { background: #00582f !important; } + +.product-features, .product__benefits { + display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; +} +.product-feature-chip { + display: inline-flex; align-items: center; gap: 8px; + background: var(--sl-cream); color: var(--sl-green-deep); + border-radius: var(--sl-radius-pill); padding: 8px 16px; + font-size: 0.85rem; font-weight: 500; letter-spacing: 0.02em; +} +.product-feature-chip::before { content: '*'; color: var(--sl-orange); font-size: 0.9em; } + +.feature-card, .icon-with-text__item { + background: #fff; border-radius: var(--sl-radius-card); + padding: 24px; box-shadow: var(--sl-shadow-soft); text-align: center; +} +.feature-card__icon, .icon-with-text__icon { + width: 56px; height: 56px; margin: 0 auto 14px; + background: var(--sl-cream); border-radius: 50%; + display: flex; align-items: center; justify-content: center; + color: var(--sl-green-deep); font-size: 24px; +} +.feature-card__title { font-family: var(--sl-font-heading); font-size: 1.15rem; margin-bottom: 8px; } +.feature-card__body { font-size: 0.92rem; color: var(--sl-muted); line-height: 1.55; } + +.brand-marquee { + background: var(--sl-green-deep); color: var(--sl-cream-light); + padding: 14px 0; font-family: var(--sl-font-body); font-weight: 500; + letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.85rem; + overflow: hidden; white-space: nowrap; +} +.brand-marquee__inner { display: inline-flex; gap: 40px; animation: marquee 30s linear infinite; } +.brand-marquee__inner span::before { content: ' * '; color: var(--sl-orange); margin-right: 38px; } +@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } } + +.card-wrapper, .card { background: #fff !important; border-radius: var(--sl-radius-card) !important; overflow: hidden; } +.card__heading a { font-family: var(--sl-font-heading); font-size: 1.1rem; color: var(--sl-ink); } +.card-information .price { color: var(--sl-green-deep); font-weight: 600; } + +.footer { background: var(--sl-green-deep); color: var(--sl-cream-light); } +.footer a, .footer__list-item a { color: var(--sl-cream-light) !important; } +.footer__heading, .footer-block__heading { font-family: var(--sl-font-heading); color: #fff; } + +@media (max-width: 749px) { + .product-form { + position: sticky; bottom: 0; background: var(--sl-cream-light); + padding: 12px 16px; border-top: 1px solid rgba(0,0,0,0.08); z-index: 10; + } +} + +.banner__heading { font-size: clamp(2.5rem, 5.5vw, 4.5rem) !important; line-height: 1.05; } +.banner--medium { background: linear-gradient(135deg, #FAF6F0 0%, var(--sl-cream) 100%); } + +::selection { background: var(--sl-green-deep); color: #fff; } +a { color: var(--sl-green-deep); } +a:hover { color: var(--sl-orange); } From 87ba0004546792e5525754a636bd3c47b3928348 Mon Sep 17 00:00:00 2001 From: gsragrotraders Date: Tue, 28 Apr 2026 16:30:13 +0530 Subject: [PATCH 2/3] Update theme.liquid --- layout/theme.liquid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/theme.liquid b/layout/theme.liquid index 70db635823b..73641da8efd 100644 --- a/layout/theme.liquid +++ b/layout/theme.liquid @@ -296,7 +296,7 @@ document.documentElement.classList.add('shopify-design-mode'); } - + {{ 'sendriya-brand.css' | asset_url | stylesheet_tag }} From 8ff01070015c8fa5afefe199346dbfa16e431e47 Mon Sep 17 00:00:00 2001 From: Uday Gurram Date: Fri, 19 Jun 2026 21:30:09 +0530 Subject: [PATCH 3/3] Import live Shopify theme --- .github/CODE_OF_CONDUCT.md | 77 - .github/CONTRIBUTING.md | 151 - .github/ISSUE_TEMPLATE/Bug_issue.md | 24 - .github/ISSUE_TEMPLATE/Feature_request.md | 17 - .github/PULL_REQUEST_TEMPLATE.md | 43 - .github/dependabot.yaml | 6 - .github/workflows/ci.yml | 26 - .github/workflows/cla.yml | 22 - .github/workflows/stale.yml | 27 - .prettierrc.json | 12 - .theme-check.yml | 4 - .vscode/extensions.json | 3 - .vscode/settings.json | 15 - LICENSE.md | 9 - README.md | 99 - assets/animations.js | 102 - assets/banner-with-tabs.js | 111 + assets/base.css | 3597 ------- assets/buttons-with-icon-list.js | 108 + assets/cart-drawer.js | 136 - assets/cart-notification.js | 83 - assets/cart.css | 284 + assets/cart.js | 1163 ++- assets/collage.css | 202 - assets/collapsible-content.css | 128 - assets/collapsible-tabs.js | 40 + assets/collection-cards.js | 131 + assets/collection-item-slider.js | 122 + assets/collection-list.js | 118 + assets/collection-tabs.js | 73 + assets/collection.css | 289 + assets/compare.css | 216 + assets/compare.js | 602 ++ assets/complementary-product-slider.js | 119 + assets/component-accordion.css | 58 - assets/component-article-card.css | 165 +- assets/component-card-img-with-product.css | 46 + assets/component-card-shop-the-feed.css | 51 + assets/component-card.css | 595 -- assets/component-cart-drawer.css | 414 - assets/component-cart-items.css | 367 - assets/component-cart-notification.css | 123 - assets/component-cart.css | 222 - assets/component-collection-hero.css | 98 - assets/component-collection-item-slider.css | 18 + assets/component-complementary-products.css | 161 - assets/component-countdown-timer.css | 35 + assets/component-country-flag.css | 1064 +++ assets/component-custom-card.css | 11 + assets/component-custom-image-with-text.css | 49 + .../component-custom-text-card-with-image.css | 14 + assets/component-deferred-media.css | 77 +- assets/component-discounts.css | 30 - assets/component-facets.css | 1257 --- assets/component-grid-banner.css | 48 + assets/component-help-sidebar.css | 57 + assets/component-image-with-text.css | 417 - assets/component-list-menu.css | 30 - assets/component-list-payment.css | 22 - assets/component-list-social.css | 27 +- assets/component-localization-form.css | 451 - assets/component-lookbook-card-modal.css | 130 + assets/component-lookbook-card.css | 165 + assets/component-mega-menu.css | 87 - assets/component-menu-drawer.css | 243 - assets/component-modal-video.css | 102 - assets/component-model-viewer-ui.css | 22 +- assets/component-multicolumn-card.css | 139 + assets/component-newsletter.css | 71 - assets/component-pagination.css | 82 - assets/component-pickup-availability.css | 158 +- assets/component-predictive-search.css | 225 - assets/component-price.css | 100 - assets/component-product-model.css | 44 - assets/component-product-variant-picker.css | 242 +- assets/component-progress-bar.css | 33 - assets/component-rating.css | 64 - assets/component-search.css | 74 - assets/component-show-more.css | 10 - assets/component-slider.css | 377 - assets/component-slideshow.css | 201 - assets/component-swatch-input.css | 87 - assets/component-swatch.css | 25 - assets/component-tabs.css | 113 + assets/component-testimonial.css | 281 + assets/component-totals.css | 40 - assets/component-volume-pricing.css | 62 +- assets/constants.js | 9 - assets/countdown-timer.js | 172 + assets/customer.css | 816 +- assets/customer.js | 60 +- assets/details-disclosure.js | 53 - assets/details-modal.js | 47 - .../email-signup-banner-background-mobile.svg | 1 - assets/email-signup-banner-background.svg | 1 - assets/facets.js | 771 +- assets/favorite-products.js | 180 + assets/featured-collection.js | 137 + assets/footer.js | 28 + assets/gift-wrapping.js | 121 + assets/giftcard.css | 89 + assets/global.js | 1332 --- assets/header.js | 849 ++ assets/highlight-text-image.js | 35 + assets/icon-3d-model.svg | 1 - assets/icon-account.svg | 10 +- assets/icon-apple.svg | 1 - assets/icon-approximate-equal.svg | 4 + assets/icon-arrow-left.svg | 13 + assets/icon-arrow-right.svg | 9 + assets/icon-arrow.svg | 1 - assets/icon-banana.svg | 1 - assets/icon-bottle.svg | 1 - assets/icon-box.svg | 1 - assets/icon-caret-left.svg | 8 + assets/icon-caret-right.svg | 8 + assets/icon-caret.svg | 1 - assets/icon-carrot.svg | 1 - assets/icon-cart-empty.svg | 1 - assets/icon-cart.svg | 11 +- assets/icon-chat-bubble.svg | 1 - assets/icon-chat.svg | 1 + assets/icon-check-mark.svg | 1 - assets/icon-checkmark.svg | 1 - assets/icon-clipboard.svg | 1 - assets/icon-close-small.svg | 1 - assets/icon-close.svg | 12 +- assets/icon-copy.svg | 12 - assets/icon-dairy-free.svg | 1 - assets/icon-dairy.svg | 1 - assets/icon-discount.svg | 1 - assets/icon-download.svg | 1 + assets/icon-dryer.svg | 1 - assets/icon-error.svg | 1 - assets/icon-eye.svg | 1 - assets/icon-facebook.svg | 1 - assets/icon-filter.svg | 1 - assets/icon-fire.svg | 1 - assets/icon-gluten-free.svg | 1 - assets/icon-hamburger.svg | 11 +- assets/icon-headphone.svg | 3 + assets/icon-heart.svg | 2 +- assets/icon-home.svg | 8 + assets/icon-info.svg | 1 - assets/icon-instagram.svg | 1 - assets/icon-inventory-status.svg | 1 - assets/icon-iron.svg | 1 - assets/icon-leaf.svg | 1 - assets/icon-leather.svg | 1 - assets/icon-lightning-bolt.svg | 1 - assets/icon-lipstick.svg | 1 - assets/icon-lock.svg | 1 - assets/icon-map-pin.svg | 1 - assets/icon-minus.svg | 1 - assets/icon-nut-free.svg | 1 - assets/icon-padlock.svg | 1 - assets/icon-pants.svg | 1 - assets/icon-pause.svg | 2 +- assets/icon-paw-print.svg | 1 - assets/icon-pencil.svg | 10 + assets/icon-pepper.svg | 1 - assets/icon-perfume.svg | 1 - assets/icon-pinterest.svg | 1 - assets/icon-plane.svg | 1 - assets/icon-plant.svg | 1 - assets/icon-play-outline.svg | 1 + assets/icon-play.svg | 1 - assets/icon-plus.svg | 12 +- assets/icon-price-tag.svg | 1 - assets/icon-question-mark.svg | 1 - assets/icon-recycle.svg | 1 - assets/icon-remove.svg | 1 - assets/icon-reset.svg | 1 - assets/icon-return.svg | 1 - assets/icon-ruler.svg | 1 - assets/icon-search.svg | 10 +- assets/icon-serving-dish.svg | 1 - assets/icon-setting.svg | 1 + assets/icon-share.svg | 1 - assets/icon-shirt.svg | 1 - assets/icon-shoe.svg | 1 - assets/icon-shopify.svg | 1 - assets/icon-sign-in.svg | 1 + assets/icon-silhouette.svg | 1 - assets/icon-snapchat.svg | 1 - assets/icon-snowflake.svg | 1 - assets/icon-speaker-hifi.svg | 5 + assets/icon-speaker.svg | 1 + assets/icon-star.svg | 1 - assets/icon-stop.svg | 1 + assets/icon-stopwatch.svg | 1 - assets/icon-success.svg | 1 - assets/icon-tick.svg | 1 - assets/icon-tiktok.svg | 1 - assets/icon-truck.svg | 1 - assets/icon-tumblr.svg | 1 - assets/icon-twitter.svg | 1 - assets/icon-unavailable.svg | 1 - assets/icon-upload.svg | 1 + assets/icon-vimeo.svg | 1 - assets/icon-washing.svg | 1 - assets/icon-youtube.svg | 1 - assets/icon-zoom.svg | 1 - assets/image-cards.js | 113 + assets/image-comparison.js | 86 + assets/image-with-text-slider.js | 201 + assets/loading-spinner.svg | 1 - assets/localization-form.js | 206 - assets/lookbook-card.js | 75 + assets/lookbook-icon.js | 69 + assets/lookbook-slider.js | 127 + assets/magnify.js | 63 - assets/main-search.js | 45 - assets/mask-arch.svg | 5 - assets/mask-blobs.css | 8 - assets/media-gallery.js | 488 +- assets/mobile-sticky-bar.js | 96 + assets/multiple-product-bundles.js | 108 + assets/newsletter-section.css | 50 - assets/password-modal.js | 9 - assets/password.css | 131 + assets/password.js | 10 + assets/photoswipe-component.css | 491 + assets/photoswipe.js | 9 + assets/pickup-availability.js | 52 +- assets/predictive-search.js | 277 - assets/press.js | 103 + assets/price-per-item.js | 116 +- assets/product-form.js | 142 - assets/product-info.js | 529 +- assets/product-modal.js | 42 - assets/product-model.js | 19 +- assets/product-recommendations.js | 47 + assets/product-share.js | 45 + assets/product-slider.js | 160 + assets/product-tabs.js | 114 + assets/products-bundle-selection.js | 447 + assets/products-bundle.js | 509 + assets/pubsub.js | 25 - assets/quantity-popover.css | 168 - assets/quantity-popover.js | 121 +- assets/quick-add-bulk.js | 197 - assets/quick-add.css | 406 - assets/quick-add.js | 122 - assets/quick-comparison-table.js | 43 + assets/quick-order-list.css | 681 +- assets/quick-order-list.js | 859 +- assets/quick-view.js | 129 + assets/recently-viewed-products.js | 90 + assets/recipient-form.js | 20 +- assets/rtl.css | 99 + assets/scrolling-banner.js | 161 + assets/search-form.js | 47 - assets/search.js | 206 + assets/section-banner-with-tabs.css | 175 + assets/section-banners-with-categories.css | 41 + assets/section-blog-post.css | 175 - assets/section-brand-logos.css | 90 + assets/section-buttons-with-icon.css | 93 + assets/section-collapsible-tabs.css | 77 + assets/section-collection-cards.css | 40 + assets/section-collection-hero.css | 79 + .../section-collection-list-with-banner.css | 96 + assets/section-collection-list.css | 121 +- assets/section-collection-tabs.css | 168 + assets/section-comparison-table.css | 54 + assets/section-contact-form.css | 54 +- assets/section-countdown-timer.css | 70 + assets/section-custom-content.css | 1 + assets/section-email-signup-banner.css | 98 - assets/section-favorite-products.css | 123 + assets/section-featured-blog.css | 59 - assets/section-featured-collection.css | 29 + assets/section-featured-countdown-timer.css | 36 + assets/section-featured-product.css | 75 - assets/section-featured-products-tab.css | 91 + assets/section-footer.css | 508 - assets/section-highlight-text-image.css | 22 + assets/section-image-banner.css | 492 - assets/section-image-comparison.css | 269 + assets/section-image-with-feature.css | 60 + assets/section-image-with-text-slider.css | 77 + assets/section-image-with-text.css | 96 + assets/section-layered-images-with-text.css | 57 + assets/section-lookbook-banner.css | 10 + assets/section-lookbook-slider.css | 56 + assets/section-main-article.css | 90 + assets/section-main-blog.css | 76 +- assets/section-main-page.css | 23 - assets/section-main-product.css | 1948 ++-- assets/section-multicolumn.css | 233 - assets/section-multiple-product-bundles.css | 38 + assets/section-newsletter.css | 16 + assets/section-password.css | 321 - assets/section-press.css | 34 + assets/section-products-bundle-selection.css | 136 + assets/section-products-bundle.css | 143 + assets/section-promotion-banner.css | 96 + assets/section-quick-comparison-table.css | 100 + assets/section-related-products.css | 7 - assets/section-rich-text.css | 86 - assets/section-scrolling-banner.css | 86 + assets/section-scrolling-gallery-image.css | 31 + assets/section-slider-with-multicolumn.css | 20 + assets/section-slideshow-with-product.css | 100 + assets/section-slideshow.css | 128 + assets/section-spotlight-picks.css | 30 + assets/section-sticky-atc-bar-minimalist.css | 34 + assets/section-sticky-atc-bar.css | 88 + assets/section-testimonials-masonry.css | 26 + assets/section-testimonials.css | 39 + assets/sendriya-brand.css | 172 - assets/share.js | 56 - assets/shop-the-feed.js | 159 + assets/show-more.js | 6 +- assets/slider-with-multicolumn.js | 177 + assets/slideshow-component.js | 262 + assets/slideshow-with-product.js | 219 + assets/sparkle.gif | Bin 179349 -> 0 bytes assets/square.svg | 1 - assets/sticky-atc-bar-minimalist.js | 172 + assets/sticky-atc-bar.js | 200 + assets/subscription-popup.css | 56 + assets/subscription-popup.js | 126 + assets/template-collection.css | 99 - assets/template-giftcard.css | 324 - assets/testimonial.js | 278 + assets/theme-editor.js | 75 +- assets/theme.css | 8271 +++++++++++++++++ assets/theme.js | 3366 +++++++ assets/variant-selects.js | 100 + assets/vendor.css | 2 + assets/vendor.js | 4 + assets/video-section.css | 48 - config/settings_data.json | 2377 ++++- config/settings_schema.json | 2303 +++-- layout/password.liquid | 241 +- layout/theme.liquid | 413 +- locales/bg.json | 530 -- locales/cs.json | 554 -- locales/cs.schema.json | 3401 ------- locales/da.json | 530 -- locales/da.schema.json | 3401 ------- locales/de.json | 680 +- locales/de.schema.json | 6589 +++++++------ locales/el.json | 530 -- locales/en.default.json | 391 +- locales/en.default.schema.json | 6219 ++++++++----- locales/es.json | 702 +- locales/es.schema.json | 6511 +++++++------ locales/fi.json | 530 -- locales/fi.schema.json | 3401 ------- locales/fr.json | 698 +- locales/fr.schema.json | 6583 +++++++------ locales/hr.json | 542 -- locales/hu.json | 530 -- locales/id.json | 530 -- locales/it.json | 706 +- locales/it.schema.json | 6553 +++++++------ locales/ja.json | 530 -- locales/ja.schema.json | 3401 ------- locales/ko.json | 530 -- locales/ko.schema.json | 3401 ------- locales/lt.json | 554 -- locales/nb.json | 530 -- locales/nb.schema.json | 3401 ------- locales/nl.json | 530 -- locales/nl.schema.json | 3401 ------- locales/pl.json | 554 -- locales/pl.schema.json | 3401 ------- locales/pt-BR.json | 542 -- locales/pt-BR.schema.json | 3401 ------- locales/pt-PT.json | 542 -- locales/pt-PT.schema.json | 3401 ------- locales/ro.json | 542 -- locales/ru.json | 554 -- locales/sk.json | 554 -- locales/sl.json | 554 -- locales/sv.json | 530 -- locales/sv.schema.json | 3401 ------- locales/th.json | 530 -- locales/th.schema.json | 3401 ------- locales/tr.json | 530 -- locales/tr.schema.json | 3401 ------- locales/vi.json | 688 +- locales/vi.schema.json | 4544 +++++++++ locales/zh-CN.json | 530 -- locales/zh-CN.schema.json | 3401 ------- locales/zh-TW.json | 530 -- locales/zh-TW.schema.json | 3401 ------- release-notes.md | 1 - sections/announcement-bar.liquid | 566 +- sections/apps.liquid | 42 +- sections/banner-with-tabs.liquid | 966 ++ sections/banners-with-categories.liquid | 1346 +++ sections/brand-logos.liquid | 728 ++ sections/breadcrumbs.liquid | 155 + sections/bulk-quick-order-list.liquid | 15 - sections/buttons-with-icon.liquid | 670 ++ sections/cart-drawer.liquid | 1002 +- sections/cart-icon-bubble.liquid | 15 - sections/cart-live-region-text.liquid | 1 - sections/cart-notification-button.liquid | 1 - sections/cart-notification-product.liquid | 53 - sections/collage.liquid | 432 - sections/collapsible-content.liquid | 517 -- sections/collapsible-tabs.liquid | 1591 ++++ sections/collection-cards.liquid | 653 ++ sections/collection-list-slider.liquid | 736 ++ sections/collection-list-with-banner.liquid | 1386 +++ sections/collection-list.liquid | 901 +- sections/collection-tabs.liquid | 702 ++ sections/comparison-table.liquid | 2268 +++++ sections/contact-form.liquid | 1549 ++- sections/countdown-timer.liquid | 845 ++ sections/custom-content.liquid | 3224 +++++++ sections/custom-liquid.liquid | 41 +- sections/email-signup-banner.liquid | 409 - sections/favorite-products.liquid | 685 ++ sections/featured-blog.liquid | 830 +- sections/featured-collection.liquid | 1562 +++- sections/featured-countdown-timer.liquid | 1181 +++ sections/featured-product.liquid | 2479 +++-- sections/featured-products-tab.liquid | 565 ++ sections/footer-group.json | 267 +- sections/footer.liquid | 1380 ++- sections/grid-banner.liquid | 1239 +++ sections/header-group.json | 100 +- sections/header.liquid | 3377 ++++++- sections/highlight-text-with-image.liquid | 264 + sections/horizontal-products-list.liquid | 680 ++ sections/image-banner.liquid | 507 - sections/image-cards.liquid | 1189 +++ sections/image-comparison.liquid | 801 ++ sections/image-with-feature.liquid | 801 ++ sections/image-with-text-overlay.liquid | 743 ++ sections/image-with-text-slider.liquid | 824 ++ sections/image-with-text.liquid | 1140 ++- sections/layered-images-with-text.liquid | 700 ++ sections/lookbook-banner.liquid | 698 ++ sections/lookbook-slider.liquid | 774 ++ sections/main-404.liquid | 39 +- sections/main-account.liquid | 289 +- sections/main-activate-account.liquid | 201 +- sections/main-addresses.liquid | 637 +- sections/main-article.liquid | 1025 +- sections/main-blog.liquid | 545 +- sections/main-cart-footer.liquid | 188 - sections/main-cart-items.liquid | 496 - sections/main-cart.liquid | 1076 +++ sections/main-collection-banner.liquid | 495 +- sections/main-collection-product-grid.liquid | 1218 ++- sections/main-list-collections.liquid | 533 +- sections/main-login.liquid | 304 +- sections/main-order.liquid | 593 +- sections/main-page.liquid | 97 +- sections/main-password-footer.liquid | 55 +- sections/main-password-header.liquid | 92 +- sections/main-password.liquid | 94 + sections/main-product.liquid | 4237 ++++++--- sections/main-register.liquid | 272 +- sections/main-reset-password.liquid | 198 +- sections/main-search.liquid | 745 +- sections/mobile-sticky-bar.liquid | 351 + sections/multicolumn-icon.liquid | 1263 +++ sections/multicolumn.liquid | 1059 ++- sections/multiple-product-bundles.liquid | 1290 +++ sections/multirow.liquid | 415 - sections/newsletter.liquid | 768 +- sections/overlay-group.json | 343 + sections/page.liquid | 117 - sections/pickup-availability.liquid | 148 +- sections/popup.liquid | 862 ++ sections/predictive-search.liquid | 262 - sections/press.liquid | 483 + sections/product-compare-bar-item.liquid | 37 + sections/product-compare.liquid | 295 + sections/products-bundle-selection.liquid | 986 ++ sections/products-bundle.liquid | 701 ++ sections/promotion-banner.liquid | 1214 +++ sections/quick-comparison-table.liquid | 425 + sections/quick-order-list.liquid | 631 +- sections/quick-view.liquid | 1889 ++++ sections/recently-viewed-products.liquid | 547 ++ sections/related-products.liquid | 581 +- sections/rich-text.liquid | 720 +- sections/scrolling-banner.liquid | 1174 +++ sections/scrolling-gallery-image.liquid | 722 ++ sections/scrolling-promotion.liquid | 363 + sections/shop-the-feed.liquid | 965 ++ sections/slider-with-multicolumn.liquid | 1027 ++ sections/slideshow-with-product.liquid | 1143 +++ sections/slideshow.liquid | 1380 ++- sections/spacer.liquid | 102 + sections/spotlight-picks.liquid | 1083 +++ sections/tabs-content.liquid | 1918 ++++ sections/testimonials-masonry.liquid | 687 ++ sections/testimonials.liquid | 936 ++ sections/topbar.liquid | 389 + sections/video-hero.liquid | 726 ++ sections/video.liquid | 346 +- snippets/article-card.liquid | 155 - snippets/ask-question-form.liquid | 74 + snippets/back-to-top.liquid | 61 + snippets/button-icon.liquid | 14 + snippets/button.liquid | 69 + snippets/buy-buttons.liquid | 480 +- snippets/card-article-placeholder.liquid | 41 + snippets/card-article.liquid | 124 + snippets/card-collection.liquid | 264 +- snippets/card-image-boxed.liquid | 158 + snippets/card-image-with-product.liquid | 186 + snippets/card-image.liquid | 237 + snippets/card-product-boxed.liquid | 401 + snippets/card-product-bundle.liquid | 441 + snippets/card-product-horizontal.liquid | 235 + snippets/card-product-list.liquid | 275 + snippets/card-product-overlay.liquid | 238 + snippets/card-product-placeholder.liquid | 43 + snippets/card-product-with-selection.liquid | 360 + snippets/card-product.liquid | 991 +- ...cart-drawer-products-recommendation.liquid | 127 + snippets/cart-drawer.liquid | 581 -- snippets/cart-notification.liquid | 60 - snippets/collection-cards-item.liquid | 165 + snippets/collection-item-slider.liquid | 100 + snippets/countdown-timer.liquid | 68 + snippets/country-localization.liquid | 156 - snippets/country-selector.liquid | 81 + snippets/css-variables.liquid | 397 + snippets/desktop-menu.liquid | 208 + snippets/divider.liquid | 5 + snippets/facet-short.liquid | 26 + snippets/facets-active.liquid | 77 + snippets/facets-drawer.liquid | 95 + snippets/facets.liquid | 1226 +-- snippets/footer-image-text-left.liquid | 75 + snippets/footer-image-text-overlay.liquid | 81 + snippets/footer-image-text-top.liquid | 85 + snippets/free-shipping-goal.liquid | 22 + snippets/gift-card-recipient-form.liquid | 188 +- snippets/gift-wrapping.liquid | 43 + snippets/header-drawer.liquid | 295 - snippets/header-dropdown-menu.liquid | 103 - snippets/header-mega-menu.liquid | 94 - snippets/header-search.liquid | 108 - snippets/help-sidebar.liquid | 121 + snippets/highlight-text.liquid | 53 + snippets/icon-3d-model.liquid | 14 + snippets/icon-accordion.liquid | 4 - snippets/icon-account.liquid | 9 + snippets/icon-arrow-left.liquid | 13 + snippets/icon-arrow-right.liquid | 9 + snippets/icon-arrow-up-right.liquid | 11 + snippets/icon-caret-down.liquid | 8 + snippets/icon-caret-left.liquid | 8 + snippets/icon-caret-right.liquid | 8 + snippets/icon-caret-up.liquid | 12 + snippets/icon-cart.liquid | 15 + snippets/icon-check.liquid | 17 + snippets/icon-clock.liquid | 13 + snippets/icon-close.liquid | 11 + snippets/icon-discount.liquid | 9 + snippets/icon-empty-state.liquid | 7 + snippets/icon-envelope-simple.liquid | 12 + snippets/icon-error.liquid | 10 + snippets/icon-facebook.liquid | 10 + snippets/icon-funnel.liquid | 12 + snippets/icon-grid-column.liquid | 23 + snippets/icon-grid-four.liquid | 14 + snippets/icon-hamburger.liquid | 10 + snippets/icon-heart.liquid | 13 + snippets/icon-home.liquid | 8 + snippets/icon-instagram.liquid | 10 + snippets/icon-lightning-fill.liquid | 12 + snippets/icon-list-dashes.liquid | 17 + snippets/icon-minus.liquid | 10 + snippets/icon-padlock.liquid | 15 + snippets/icon-pencil.liquid | 10 + snippets/icon-pinterest.liquid | 10 + snippets/icon-play.liquid | 10 + snippets/icon-plus-toggle.liquid | 9 + snippets/icon-plus.liquid | 11 + snippets/icon-products.liquid | 11 + snippets/icon-question.liquid | 14 + snippets/icon-search.liquid | 9 + snippets/icon-share-fat.liquid | 12 + snippets/icon-share.liquid | 13 + snippets/icon-slider-next.liquid | 8 + snippets/icon-slider-prev.liquid | 8 + snippets/icon-snapchat.liquid | 13 + snippets/icon-storefront.liquid | 16 + snippets/icon-success.liquid | 10 + snippets/icon-tag.liquid | 9 + snippets/icon-testimonial.liquid | 127 + snippets/icon-tiktok.liquid | 11 + snippets/icon-trash.liquid | 5 + snippets/icon-truck.liquid | 18 + snippets/icon-tumblr.liquid | 10 + snippets/icon-twitter.liquid | 10 + snippets/icon-unavailable.liquid | 11 + snippets/icon-video.liquid | 14 + snippets/icon-vimeo.liquid | 10 + snippets/icon-with-text.liquid | 107 +- snippets/icon-youtube.liquid | 10 + snippets/icon-zoom.liquid | 12 + snippets/icons.liquid | 151 + snippets/js-variables.liquid | 76 + snippets/language-localization.liquid | 49 - snippets/language-selector.liquid | 54 + snippets/loading-spinner.liquid | 10 +- snippets/lookbook-card-hotspot.liquid | 80 + snippets/lookbook-card.liquid | 216 + snippets/lookbook-icon.liquid | 123 + snippets/mega-custom-card.liquid | 36 + snippets/mega-menu.liquid | 397 + snippets/menu-drawer-details.liquid | 334 + snippets/menu-drawer.liquid | 168 + snippets/newsletter-form.liquid | 95 + snippets/page-transition.liquid | 1 + snippets/pagination.liquid | 48 +- snippets/pcard-badges.liquid | 86 + snippets/pcard-color-swatch.liquid | 93 + snippets/pcard-flash-sale.liquid | 26 + snippets/pcard-quantity-break.liquid | 99 + snippets/predictive-search.liquid | 317 + snippets/price-facet.liquid | 45 - snippets/price.liquid | 191 +- snippets/product-badges.liquid | 84 + snippets/product-collapsible-tab.liquid | 28 + snippets/product-compare-bar.liquid | 46 + snippets/product-compare-variants.liquid | 135 + snippets/product-complementary.liquid | 159 + snippets/product-grid-icon-box.liquid | 33 + .../product-information-below-media.liquid | 27 + snippets/product-information-blocks.liquid | 555 ++ snippets/product-media-gallery.liquid | 381 +- snippets/product-media-modal.liquid | 57 - snippets/product-media.liquid | 120 - snippets/product-payment-info.liquid | 30 + snippets/product-pickup-availability.liquid | 38 + snippets/product-thumbnail.liquid | 245 +- snippets/product-variant-options.liquid | 110 +- snippets/product-variant-picker.liquid | 205 +- snippets/progress-bar.liquid | 5 - snippets/quantity-input.liquid | 41 +- snippets/quick-comparison-table-col.liquid | 76 + snippets/quick-order-list-row.liquid | 747 +- snippets/quick-order-list.liquid | 300 - snippets/quick-order-product-row.liquid | 41 - snippets/quick-view-modal.liquid | 36 + snippets/section-heading.liquid | 116 + snippets/share-button.liquid | 53 - snippets/social-icons.liquid | 164 +- snippets/social-sharing.liquid | 32 + snippets/sticky-atc-bar.liquid | 230 + snippets/swatch-input.liquid | 25 +- snippets/swatch.liquid | 117 +- snippets/testimonial-1.liquid | 143 + snippets/testimonial-2.liquid | 137 + snippets/testimonial-3.liquid | 185 + snippets/unit-price.liquid | 21 - snippets/video.liquid | 93 + templates/404.json | 14 +- templates/article.json | 126 +- templates/blog.json | 120 +- templates/cart.json | 151 +- .../collection.banner-as-background.json | 260 + templates/collection.banner-left.json | 377 + .../collection.banner-top-with-cards.json | 409 + .../collection.banner-without-image.json | 333 + templates/collection.json | 306 +- templates/customers/account.json | 12 +- templates/customers/activate_account.json | 12 +- templates/customers/addresses.json | 18 +- templates/customers/login.json | 12 +- templates/customers/order.json | 12 +- templates/customers/register.json | 12 +- templates/customers/reset_password.json | 12 +- templates/gift_card.liquid | 104 +- templates/index.json | 2108 ++++- templates/list-collections.json | 849 +- templates/page.about.json | 642 ++ templates/page.contact.json | 125 +- templates/page.customer-care.json | 137 + templates/page.faq.json | 563 ++ templates/page.find-a-store.json | 272 + templates/page.json | 11 +- templates/password.json | 55 +- templates/product.coming-soon.json | 1132 +++ templates/product.flash-sale.json | 1133 +++ templates/product.grid-2-columns.json | 1121 +++ templates/product.grid-mix.json | 1121 +++ templates/product.horizontal-thumbnails.json | 1121 +++ templates/product.json | 1164 ++- templates/product.out-of-stock.json | 1126 +++ templates/product.product-image-swatch.json | 1121 +++ templates/search.json | 17 +- translation.yml | 19 - 699 files changed, 161256 insertions(+), 120899 deletions(-) delete mode 100644 .github/CODE_OF_CONDUCT.md delete mode 100644 .github/CONTRIBUTING.md delete mode 100644 .github/ISSUE_TEMPLATE/Bug_issue.md delete mode 100644 .github/ISSUE_TEMPLATE/Feature_request.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/dependabot.yaml delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/cla.yml delete mode 100644 .github/workflows/stale.yml delete mode 100644 .prettierrc.json delete mode 100644 .theme-check.yml delete mode 100644 .vscode/extensions.json delete mode 100644 .vscode/settings.json delete mode 100644 LICENSE.md delete mode 100644 README.md delete mode 100644 assets/animations.js create mode 100644 assets/banner-with-tabs.js delete mode 100644 assets/base.css create mode 100644 assets/buttons-with-icon-list.js delete mode 100644 assets/cart-drawer.js delete mode 100644 assets/cart-notification.js create mode 100644 assets/cart.css delete mode 100644 assets/collage.css delete mode 100644 assets/collapsible-content.css create mode 100644 assets/collapsible-tabs.js create mode 100644 assets/collection-cards.js create mode 100644 assets/collection-item-slider.js create mode 100644 assets/collection-list.js create mode 100644 assets/collection-tabs.js create mode 100644 assets/collection.css create mode 100644 assets/compare.css create mode 100644 assets/compare.js create mode 100644 assets/complementary-product-slider.js delete mode 100644 assets/component-accordion.css create mode 100644 assets/component-card-img-with-product.css create mode 100644 assets/component-card-shop-the-feed.css delete mode 100644 assets/component-card.css delete mode 100644 assets/component-cart-drawer.css delete mode 100644 assets/component-cart-items.css delete mode 100644 assets/component-cart-notification.css delete mode 100644 assets/component-cart.css delete mode 100644 assets/component-collection-hero.css create mode 100644 assets/component-collection-item-slider.css delete mode 100644 assets/component-complementary-products.css create mode 100644 assets/component-countdown-timer.css create mode 100644 assets/component-country-flag.css create mode 100644 assets/component-custom-card.css create mode 100644 assets/component-custom-image-with-text.css create mode 100644 assets/component-custom-text-card-with-image.css delete mode 100644 assets/component-discounts.css delete mode 100644 assets/component-facets.css create mode 100644 assets/component-grid-banner.css create mode 100644 assets/component-help-sidebar.css delete mode 100644 assets/component-image-with-text.css delete mode 100644 assets/component-list-menu.css delete mode 100644 assets/component-list-payment.css delete mode 100644 assets/component-localization-form.css create mode 100644 assets/component-lookbook-card-modal.css create mode 100644 assets/component-lookbook-card.css delete mode 100644 assets/component-mega-menu.css delete mode 100644 assets/component-menu-drawer.css delete mode 100644 assets/component-modal-video.css create mode 100644 assets/component-multicolumn-card.css delete mode 100644 assets/component-newsletter.css delete mode 100644 assets/component-pagination.css delete mode 100644 assets/component-predictive-search.css delete mode 100644 assets/component-price.css delete mode 100644 assets/component-product-model.css delete mode 100644 assets/component-progress-bar.css delete mode 100644 assets/component-rating.css delete mode 100644 assets/component-search.css delete mode 100644 assets/component-show-more.css delete mode 100644 assets/component-slider.css delete mode 100644 assets/component-slideshow.css delete mode 100644 assets/component-swatch-input.css delete mode 100644 assets/component-swatch.css create mode 100644 assets/component-tabs.css create mode 100644 assets/component-testimonial.css delete mode 100644 assets/component-totals.css delete mode 100644 assets/constants.js create mode 100644 assets/countdown-timer.js delete mode 100644 assets/details-disclosure.js delete mode 100644 assets/details-modal.js delete mode 100644 assets/email-signup-banner-background-mobile.svg delete mode 100644 assets/email-signup-banner-background.svg create mode 100644 assets/favorite-products.js create mode 100644 assets/featured-collection.js create mode 100644 assets/footer.js create mode 100644 assets/gift-wrapping.js create mode 100644 assets/giftcard.css delete mode 100644 assets/global.js create mode 100644 assets/header.js create mode 100644 assets/highlight-text-image.js delete mode 100644 assets/icon-3d-model.svg delete mode 100644 assets/icon-apple.svg create mode 100644 assets/icon-approximate-equal.svg create mode 100644 assets/icon-arrow-left.svg create mode 100644 assets/icon-arrow-right.svg delete mode 100644 assets/icon-arrow.svg delete mode 100644 assets/icon-banana.svg delete mode 100644 assets/icon-bottle.svg delete mode 100644 assets/icon-box.svg create mode 100644 assets/icon-caret-left.svg create mode 100644 assets/icon-caret-right.svg delete mode 100644 assets/icon-caret.svg delete mode 100644 assets/icon-carrot.svg delete mode 100644 assets/icon-cart-empty.svg delete mode 100644 assets/icon-chat-bubble.svg create mode 100644 assets/icon-chat.svg delete mode 100644 assets/icon-check-mark.svg delete mode 100644 assets/icon-checkmark.svg delete mode 100644 assets/icon-clipboard.svg delete mode 100644 assets/icon-close-small.svg delete mode 100644 assets/icon-copy.svg delete mode 100644 assets/icon-dairy-free.svg delete mode 100644 assets/icon-dairy.svg delete mode 100644 assets/icon-discount.svg create mode 100644 assets/icon-download.svg delete mode 100644 assets/icon-dryer.svg delete mode 100644 assets/icon-error.svg delete mode 100644 assets/icon-eye.svg delete mode 100644 assets/icon-facebook.svg delete mode 100644 assets/icon-filter.svg delete mode 100644 assets/icon-fire.svg delete mode 100644 assets/icon-gluten-free.svg create mode 100644 assets/icon-headphone.svg create mode 100644 assets/icon-home.svg delete mode 100644 assets/icon-info.svg delete mode 100644 assets/icon-instagram.svg delete mode 100644 assets/icon-inventory-status.svg delete mode 100644 assets/icon-iron.svg delete mode 100644 assets/icon-leaf.svg delete mode 100644 assets/icon-leather.svg delete mode 100644 assets/icon-lightning-bolt.svg delete mode 100644 assets/icon-lipstick.svg delete mode 100644 assets/icon-lock.svg delete mode 100644 assets/icon-map-pin.svg delete mode 100644 assets/icon-minus.svg delete mode 100644 assets/icon-nut-free.svg delete mode 100644 assets/icon-padlock.svg delete mode 100644 assets/icon-pants.svg delete mode 100644 assets/icon-paw-print.svg create mode 100644 assets/icon-pencil.svg delete mode 100644 assets/icon-pepper.svg delete mode 100644 assets/icon-perfume.svg delete mode 100644 assets/icon-pinterest.svg delete mode 100644 assets/icon-plane.svg delete mode 100644 assets/icon-plant.svg create mode 100644 assets/icon-play-outline.svg delete mode 100644 assets/icon-play.svg delete mode 100644 assets/icon-price-tag.svg delete mode 100644 assets/icon-question-mark.svg delete mode 100644 assets/icon-recycle.svg delete mode 100644 assets/icon-remove.svg delete mode 100644 assets/icon-reset.svg delete mode 100644 assets/icon-return.svg delete mode 100644 assets/icon-ruler.svg delete mode 100644 assets/icon-serving-dish.svg create mode 100644 assets/icon-setting.svg delete mode 100644 assets/icon-share.svg delete mode 100644 assets/icon-shirt.svg delete mode 100644 assets/icon-shoe.svg delete mode 100644 assets/icon-shopify.svg create mode 100644 assets/icon-sign-in.svg delete mode 100644 assets/icon-silhouette.svg delete mode 100644 assets/icon-snapchat.svg delete mode 100644 assets/icon-snowflake.svg create mode 100644 assets/icon-speaker-hifi.svg create mode 100644 assets/icon-speaker.svg delete mode 100644 assets/icon-star.svg create mode 100644 assets/icon-stop.svg delete mode 100644 assets/icon-stopwatch.svg delete mode 100644 assets/icon-success.svg delete mode 100644 assets/icon-tick.svg delete mode 100644 assets/icon-tiktok.svg delete mode 100644 assets/icon-truck.svg delete mode 100644 assets/icon-tumblr.svg delete mode 100644 assets/icon-twitter.svg delete mode 100644 assets/icon-unavailable.svg create mode 100644 assets/icon-upload.svg delete mode 100644 assets/icon-vimeo.svg delete mode 100644 assets/icon-washing.svg delete mode 100644 assets/icon-youtube.svg delete mode 100644 assets/icon-zoom.svg create mode 100644 assets/image-cards.js create mode 100644 assets/image-comparison.js create mode 100644 assets/image-with-text-slider.js delete mode 100644 assets/loading-spinner.svg create mode 100644 assets/lookbook-card.js create mode 100644 assets/lookbook-icon.js create mode 100644 assets/lookbook-slider.js delete mode 100644 assets/magnify.js delete mode 100644 assets/main-search.js delete mode 100644 assets/mask-arch.svg delete mode 100644 assets/mask-blobs.css create mode 100644 assets/mobile-sticky-bar.js create mode 100644 assets/multiple-product-bundles.js delete mode 100644 assets/newsletter-section.css delete mode 100644 assets/password-modal.js create mode 100644 assets/password.css create mode 100644 assets/password.js create mode 100644 assets/photoswipe-component.css create mode 100644 assets/photoswipe.js delete mode 100644 assets/predictive-search.js create mode 100644 assets/press.js delete mode 100644 assets/product-form.js delete mode 100644 assets/product-modal.js create mode 100644 assets/product-recommendations.js create mode 100644 assets/product-share.js create mode 100644 assets/product-slider.js create mode 100644 assets/product-tabs.js create mode 100644 assets/products-bundle-selection.js create mode 100644 assets/products-bundle.js delete mode 100644 assets/pubsub.js delete mode 100644 assets/quantity-popover.css delete mode 100644 assets/quick-add-bulk.js delete mode 100644 assets/quick-add.css delete mode 100644 assets/quick-add.js create mode 100644 assets/quick-comparison-table.js create mode 100644 assets/quick-view.js create mode 100644 assets/recently-viewed-products.js create mode 100644 assets/rtl.css create mode 100644 assets/scrolling-banner.js delete mode 100644 assets/search-form.js create mode 100644 assets/search.js create mode 100644 assets/section-banner-with-tabs.css create mode 100644 assets/section-banners-with-categories.css delete mode 100644 assets/section-blog-post.css create mode 100644 assets/section-brand-logos.css create mode 100644 assets/section-buttons-with-icon.css create mode 100644 assets/section-collapsible-tabs.css create mode 100644 assets/section-collection-cards.css create mode 100644 assets/section-collection-hero.css create mode 100644 assets/section-collection-list-with-banner.css create mode 100644 assets/section-collection-tabs.css create mode 100644 assets/section-comparison-table.css create mode 100644 assets/section-countdown-timer.css create mode 100644 assets/section-custom-content.css delete mode 100644 assets/section-email-signup-banner.css create mode 100644 assets/section-favorite-products.css create mode 100644 assets/section-featured-collection.css create mode 100644 assets/section-featured-countdown-timer.css delete mode 100644 assets/section-featured-product.css create mode 100644 assets/section-featured-products-tab.css delete mode 100644 assets/section-footer.css create mode 100644 assets/section-highlight-text-image.css delete mode 100644 assets/section-image-banner.css create mode 100644 assets/section-image-comparison.css create mode 100644 assets/section-image-with-feature.css create mode 100644 assets/section-image-with-text-slider.css create mode 100644 assets/section-image-with-text.css create mode 100644 assets/section-layered-images-with-text.css create mode 100644 assets/section-lookbook-banner.css create mode 100644 assets/section-lookbook-slider.css create mode 100644 assets/section-main-article.css delete mode 100644 assets/section-main-page.css delete mode 100644 assets/section-multicolumn.css create mode 100644 assets/section-multiple-product-bundles.css create mode 100644 assets/section-newsletter.css delete mode 100644 assets/section-password.css create mode 100644 assets/section-press.css create mode 100644 assets/section-products-bundle-selection.css create mode 100644 assets/section-products-bundle.css create mode 100644 assets/section-promotion-banner.css create mode 100644 assets/section-quick-comparison-table.css delete mode 100644 assets/section-related-products.css delete mode 100644 assets/section-rich-text.css create mode 100644 assets/section-scrolling-banner.css create mode 100644 assets/section-scrolling-gallery-image.css create mode 100644 assets/section-slider-with-multicolumn.css create mode 100644 assets/section-slideshow-with-product.css create mode 100644 assets/section-slideshow.css create mode 100644 assets/section-spotlight-picks.css create mode 100644 assets/section-sticky-atc-bar-minimalist.css create mode 100644 assets/section-sticky-atc-bar.css create mode 100644 assets/section-testimonials-masonry.css create mode 100644 assets/section-testimonials.css delete mode 100644 assets/sendriya-brand.css delete mode 100644 assets/share.js create mode 100644 assets/shop-the-feed.js create mode 100644 assets/slider-with-multicolumn.js create mode 100644 assets/slideshow-component.js create mode 100644 assets/slideshow-with-product.js delete mode 100644 assets/sparkle.gif delete mode 100644 assets/square.svg create mode 100644 assets/sticky-atc-bar-minimalist.js create mode 100644 assets/sticky-atc-bar.js create mode 100644 assets/subscription-popup.css create mode 100644 assets/subscription-popup.js delete mode 100644 assets/template-collection.css delete mode 100644 assets/template-giftcard.css create mode 100644 assets/testimonial.js create mode 100644 assets/theme.css create mode 100644 assets/theme.js create mode 100644 assets/variant-selects.js create mode 100644 assets/vendor.css create mode 100644 assets/vendor.js delete mode 100644 assets/video-section.css delete mode 100644 locales/bg.json delete mode 100644 locales/cs.json delete mode 100644 locales/cs.schema.json delete mode 100644 locales/da.json delete mode 100644 locales/da.schema.json delete mode 100644 locales/el.json delete mode 100644 locales/fi.json delete mode 100644 locales/fi.schema.json delete mode 100644 locales/hr.json delete mode 100644 locales/hu.json delete mode 100644 locales/id.json delete mode 100644 locales/ja.json delete mode 100644 locales/ja.schema.json delete mode 100644 locales/ko.json delete mode 100644 locales/ko.schema.json delete mode 100644 locales/lt.json delete mode 100644 locales/nb.json delete mode 100644 locales/nb.schema.json delete mode 100644 locales/nl.json delete mode 100644 locales/nl.schema.json delete mode 100644 locales/pl.json delete mode 100644 locales/pl.schema.json delete mode 100644 locales/pt-BR.json delete mode 100644 locales/pt-BR.schema.json delete mode 100644 locales/pt-PT.json delete mode 100644 locales/pt-PT.schema.json delete mode 100644 locales/ro.json delete mode 100644 locales/ru.json delete mode 100644 locales/sk.json delete mode 100644 locales/sl.json delete mode 100644 locales/sv.json delete mode 100644 locales/sv.schema.json delete mode 100644 locales/th.json delete mode 100644 locales/th.schema.json delete mode 100644 locales/tr.json delete mode 100644 locales/tr.schema.json create mode 100644 locales/vi.schema.json delete mode 100644 locales/zh-CN.json delete mode 100644 locales/zh-CN.schema.json delete mode 100644 locales/zh-TW.json delete mode 100644 locales/zh-TW.schema.json delete mode 100644 release-notes.md create mode 100644 sections/banner-with-tabs.liquid create mode 100644 sections/banners-with-categories.liquid create mode 100644 sections/brand-logos.liquid create mode 100644 sections/breadcrumbs.liquid delete mode 100644 sections/bulk-quick-order-list.liquid create mode 100644 sections/buttons-with-icon.liquid delete mode 100644 sections/cart-icon-bubble.liquid delete mode 100644 sections/cart-live-region-text.liquid delete mode 100644 sections/cart-notification-button.liquid delete mode 100644 sections/cart-notification-product.liquid delete mode 100644 sections/collage.liquid delete mode 100644 sections/collapsible-content.liquid create mode 100644 sections/collapsible-tabs.liquid create mode 100644 sections/collection-cards.liquid create mode 100644 sections/collection-list-slider.liquid create mode 100644 sections/collection-list-with-banner.liquid create mode 100644 sections/collection-tabs.liquid create mode 100644 sections/comparison-table.liquid create mode 100644 sections/countdown-timer.liquid create mode 100644 sections/custom-content.liquid delete mode 100644 sections/email-signup-banner.liquid create mode 100644 sections/favorite-products.liquid create mode 100644 sections/featured-countdown-timer.liquid create mode 100644 sections/featured-products-tab.liquid create mode 100644 sections/grid-banner.liquid create mode 100644 sections/highlight-text-with-image.liquid create mode 100644 sections/horizontal-products-list.liquid delete mode 100644 sections/image-banner.liquid create mode 100644 sections/image-cards.liquid create mode 100644 sections/image-comparison.liquid create mode 100644 sections/image-with-feature.liquid create mode 100644 sections/image-with-text-overlay.liquid create mode 100644 sections/image-with-text-slider.liquid create mode 100644 sections/layered-images-with-text.liquid create mode 100644 sections/lookbook-banner.liquid create mode 100644 sections/lookbook-slider.liquid delete mode 100644 sections/main-cart-footer.liquid delete mode 100644 sections/main-cart-items.liquid create mode 100644 sections/main-cart.liquid create mode 100644 sections/main-password.liquid create mode 100644 sections/mobile-sticky-bar.liquid create mode 100644 sections/multicolumn-icon.liquid create mode 100644 sections/multiple-product-bundles.liquid delete mode 100644 sections/multirow.liquid create mode 100644 sections/overlay-group.json delete mode 100644 sections/page.liquid create mode 100644 sections/popup.liquid delete mode 100644 sections/predictive-search.liquid create mode 100644 sections/press.liquid create mode 100644 sections/product-compare-bar-item.liquid create mode 100644 sections/product-compare.liquid create mode 100644 sections/products-bundle-selection.liquid create mode 100644 sections/products-bundle.liquid create mode 100644 sections/promotion-banner.liquid create mode 100644 sections/quick-comparison-table.liquid create mode 100644 sections/quick-view.liquid create mode 100644 sections/recently-viewed-products.liquid create mode 100644 sections/scrolling-banner.liquid create mode 100644 sections/scrolling-gallery-image.liquid create mode 100644 sections/scrolling-promotion.liquid create mode 100644 sections/shop-the-feed.liquid create mode 100644 sections/slider-with-multicolumn.liquid create mode 100644 sections/slideshow-with-product.liquid create mode 100644 sections/spacer.liquid create mode 100644 sections/spotlight-picks.liquid create mode 100644 sections/tabs-content.liquid create mode 100644 sections/testimonials-masonry.liquid create mode 100644 sections/testimonials.liquid create mode 100644 sections/topbar.liquid create mode 100644 sections/video-hero.liquid delete mode 100644 snippets/article-card.liquid create mode 100644 snippets/ask-question-form.liquid create mode 100644 snippets/back-to-top.liquid create mode 100644 snippets/button-icon.liquid create mode 100644 snippets/button.liquid create mode 100644 snippets/card-article-placeholder.liquid create mode 100644 snippets/card-article.liquid create mode 100644 snippets/card-image-boxed.liquid create mode 100644 snippets/card-image-with-product.liquid create mode 100644 snippets/card-image.liquid create mode 100644 snippets/card-product-boxed.liquid create mode 100644 snippets/card-product-bundle.liquid create mode 100644 snippets/card-product-horizontal.liquid create mode 100644 snippets/card-product-list.liquid create mode 100644 snippets/card-product-overlay.liquid create mode 100644 snippets/card-product-placeholder.liquid create mode 100644 snippets/card-product-with-selection.liquid create mode 100644 snippets/cart-drawer-products-recommendation.liquid delete mode 100644 snippets/cart-drawer.liquid delete mode 100644 snippets/cart-notification.liquid create mode 100644 snippets/collection-cards-item.liquid create mode 100644 snippets/collection-item-slider.liquid create mode 100644 snippets/countdown-timer.liquid delete mode 100644 snippets/country-localization.liquid create mode 100644 snippets/country-selector.liquid create mode 100644 snippets/css-variables.liquid create mode 100644 snippets/desktop-menu.liquid create mode 100644 snippets/divider.liquid create mode 100644 snippets/facet-short.liquid create mode 100644 snippets/facets-active.liquid create mode 100644 snippets/facets-drawer.liquid create mode 100644 snippets/footer-image-text-left.liquid create mode 100644 snippets/footer-image-text-overlay.liquid create mode 100644 snippets/footer-image-text-top.liquid create mode 100644 snippets/free-shipping-goal.liquid create mode 100644 snippets/gift-wrapping.liquid delete mode 100644 snippets/header-drawer.liquid delete mode 100644 snippets/header-dropdown-menu.liquid delete mode 100644 snippets/header-mega-menu.liquid delete mode 100644 snippets/header-search.liquid create mode 100644 snippets/help-sidebar.liquid create mode 100644 snippets/highlight-text.liquid create mode 100644 snippets/icon-3d-model.liquid delete mode 100644 snippets/icon-accordion.liquid create mode 100644 snippets/icon-account.liquid create mode 100644 snippets/icon-arrow-left.liquid create mode 100644 snippets/icon-arrow-right.liquid create mode 100644 snippets/icon-arrow-up-right.liquid create mode 100644 snippets/icon-caret-down.liquid create mode 100644 snippets/icon-caret-left.liquid create mode 100644 snippets/icon-caret-right.liquid create mode 100644 snippets/icon-caret-up.liquid create mode 100644 snippets/icon-cart.liquid create mode 100644 snippets/icon-check.liquid create mode 100644 snippets/icon-clock.liquid create mode 100644 snippets/icon-close.liquid create mode 100644 snippets/icon-discount.liquid create mode 100644 snippets/icon-empty-state.liquid create mode 100644 snippets/icon-envelope-simple.liquid create mode 100644 snippets/icon-error.liquid create mode 100644 snippets/icon-facebook.liquid create mode 100644 snippets/icon-funnel.liquid create mode 100644 snippets/icon-grid-column.liquid create mode 100644 snippets/icon-grid-four.liquid create mode 100644 snippets/icon-hamburger.liquid create mode 100644 snippets/icon-heart.liquid create mode 100644 snippets/icon-home.liquid create mode 100644 snippets/icon-instagram.liquid create mode 100644 snippets/icon-lightning-fill.liquid create mode 100644 snippets/icon-list-dashes.liquid create mode 100644 snippets/icon-minus.liquid create mode 100644 snippets/icon-padlock.liquid create mode 100644 snippets/icon-pencil.liquid create mode 100644 snippets/icon-pinterest.liquid create mode 100644 snippets/icon-play.liquid create mode 100644 snippets/icon-plus-toggle.liquid create mode 100644 snippets/icon-plus.liquid create mode 100644 snippets/icon-products.liquid create mode 100644 snippets/icon-question.liquid create mode 100644 snippets/icon-search.liquid create mode 100644 snippets/icon-share-fat.liquid create mode 100644 snippets/icon-share.liquid create mode 100644 snippets/icon-slider-next.liquid create mode 100644 snippets/icon-slider-prev.liquid create mode 100644 snippets/icon-snapchat.liquid create mode 100644 snippets/icon-storefront.liquid create mode 100644 snippets/icon-success.liquid create mode 100644 snippets/icon-tag.liquid create mode 100644 snippets/icon-testimonial.liquid create mode 100644 snippets/icon-tiktok.liquid create mode 100644 snippets/icon-trash.liquid create mode 100644 snippets/icon-truck.liquid create mode 100644 snippets/icon-tumblr.liquid create mode 100644 snippets/icon-twitter.liquid create mode 100644 snippets/icon-unavailable.liquid create mode 100644 snippets/icon-video.liquid create mode 100644 snippets/icon-vimeo.liquid create mode 100644 snippets/icon-youtube.liquid create mode 100644 snippets/icon-zoom.liquid create mode 100644 snippets/icons.liquid create mode 100644 snippets/js-variables.liquid delete mode 100644 snippets/language-localization.liquid create mode 100644 snippets/language-selector.liquid create mode 100644 snippets/lookbook-card-hotspot.liquid create mode 100644 snippets/lookbook-card.liquid create mode 100644 snippets/lookbook-icon.liquid create mode 100644 snippets/mega-custom-card.liquid create mode 100644 snippets/mega-menu.liquid create mode 100644 snippets/menu-drawer-details.liquid create mode 100644 snippets/menu-drawer.liquid create mode 100644 snippets/newsletter-form.liquid create mode 100644 snippets/page-transition.liquid create mode 100644 snippets/pcard-badges.liquid create mode 100644 snippets/pcard-color-swatch.liquid create mode 100644 snippets/pcard-flash-sale.liquid create mode 100644 snippets/pcard-quantity-break.liquid create mode 100644 snippets/predictive-search.liquid delete mode 100644 snippets/price-facet.liquid create mode 100644 snippets/product-badges.liquid create mode 100644 snippets/product-collapsible-tab.liquid create mode 100644 snippets/product-compare-bar.liquid create mode 100644 snippets/product-compare-variants.liquid create mode 100644 snippets/product-complementary.liquid create mode 100644 snippets/product-grid-icon-box.liquid create mode 100644 snippets/product-information-below-media.liquid create mode 100644 snippets/product-information-blocks.liquid delete mode 100644 snippets/product-media-modal.liquid delete mode 100644 snippets/product-media.liquid create mode 100644 snippets/product-payment-info.liquid create mode 100644 snippets/product-pickup-availability.liquid delete mode 100644 snippets/progress-bar.liquid create mode 100644 snippets/quick-comparison-table-col.liquid delete mode 100644 snippets/quick-order-list.liquid delete mode 100644 snippets/quick-order-product-row.liquid create mode 100644 snippets/quick-view-modal.liquid create mode 100644 snippets/section-heading.liquid delete mode 100644 snippets/share-button.liquid create mode 100644 snippets/social-sharing.liquid create mode 100644 snippets/sticky-atc-bar.liquid create mode 100644 snippets/testimonial-1.liquid create mode 100644 snippets/testimonial-2.liquid create mode 100644 snippets/testimonial-3.liquid delete mode 100644 snippets/unit-price.liquid create mode 100644 snippets/video.liquid create mode 100644 templates/collection.banner-as-background.json create mode 100644 templates/collection.banner-left.json create mode 100644 templates/collection.banner-top-with-cards.json create mode 100644 templates/collection.banner-without-image.json create mode 100644 templates/page.about.json create mode 100644 templates/page.customer-care.json create mode 100644 templates/page.faq.json create mode 100644 templates/page.find-a-store.json create mode 100644 templates/product.coming-soon.json create mode 100644 templates/product.flash-sale.json create mode 100644 templates/product.grid-2-columns.json create mode 100644 templates/product.grid-mix.json create mode 100644 templates/product.horizontal-thumbnails.json create mode 100644 templates/product.out-of-stock.json create mode 100644 templates/product.product-image-swatch.json delete mode 100644 translation.yml diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md deleted file mode 100644 index b4350ac3777..00000000000 --- a/.github/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,77 +0,0 @@ - -# Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to make participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies within all project spaces, and it also applies when -an individual is representing the project or its community in public spaces. -Examples of representing a project or community include using an official -project e-mail address, posting via an official social media account, or acting -as an appointed representative at an online or offline event. Representation of -a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at . All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index e166efb37cb..00000000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1,151 +0,0 @@ -# Contributing - -[Before contributing](#before-contributing) | -[Scope](#scope) | -[Theme code principles](#theme-code-principles) | -[Contributing code](#contributing-code) | -[Reporting a bug](#reporting-a-bug) | -[Reviewing](#reviewing) - -We're really glad you're reading this, because we would love to have more developers contribute to this theme! If you're passionate about building for the next million entrepreneurs, you're in the right place. - -## Before contributing - -If you encounter a bug or think of a useful feature for Dawn, please [create a new issue](https://github.com/Shopify/dawn/issues/new). Creating an issue before jumping into code ensures we can discuss it and determine whether it aligns with the direction of the theme. - -If you want to contribute to the theme, regardless of whether it's a small bug fix or correcting a typo, please feel free to do so. Any help goes a long way! Also, contributions aren't necessarily all code related. Other contributions can be in the form of issues, pull requests, discussions, etc. - -## Scope - -This Github repository exists for the theme development community to discuss and solve problems directly related to Dawn. It **is not the place** to discuss general theme development problems, nor the place to seek help for non-Dawn related problems. - -Shopify theme development is a big topic and it's completely normal that you will encounter problems which might require you to reach out for help. In fact, we provide several knowledge and support platforms for theme development already: - -* [Shopify Development](https://shopify.dev/themes) -* [Shopify Help Center](https://help.shopify.com/themes) -* [Shopify Forum](https://ecommerce.shopify.com/forums) -* [Shopify Experts](https://experts.shopify.com/) - -## Theme code principles - -Before contributing to Dawn, please read the following theme code principles to better understand our fundamental approach to theme development. The expectation is that you follow these principles as you build for Dawn. - -### Why these principles? - -Browsers provide APIs to solve many problems: from [WebGL](https://en.wikipedia.org/wiki/WebGL) and [WASM](https://en.wikipedia.org/wiki/WebAssembly)-powered apps to static websites. The best APIs to use depends on the thing you’re building. Themes power ecommerce websites. In most cases, _Web-native_—making the most of the built-in features of browsers: HTTP, HTML, CSS, JavaScript, and the DOM—is a perfect fit for ecommerce websites. Ecommerce needs incredibly fast websites for mostly “logged out” traffic. - -### Web-native in its purest form - -_The most important principle._ - -Themes run on the [evergreen Web](https://www.w3.org/2001/tag/doc/evergreen-web/). We leverage the latest web browsers to their fullest, while maintaining support for the older ones through progressive enhancement—not polyfills. - -We write bespoke Web-native code with no abstractions. Frameworks, libraries, and dependencies don’t belong in our themes. - -We engage with the browser ecosystem on behalf of our merchants to make Web-native ecommerce the best it can be. - -“Don’t repeat yourself” is an anti-pattern. We do our utmost best to do more with less, but we don’t build abstractions around repetition. Instead, we use linting and testing to enforce consistently-good and up-to-date Web-native code. - -### Lean, fast, and reliable - -_The principle requirement._ - -Code must be lean, fast, and reliable. Our targets include: - -* Zero [Cumulative Layout Shift](https://web.dev/cls/) -* No DOM manipulation before user input -* No render-blocking JavaScript -* No [long tasks](https://developer.mozilla.org/en-US/docs/Web/API/Long_Tasks_API) - -Functionality and design defaults to “no” until it meets this requirement. Code ships on quality. - -We relentlessly and continuously optimize code within the constraint of being Web-native. If ever there is a feature that browsers have not made fast yet, we either don’t use it, or use it “as is” if it is fast enough. We trust that browsers will get faster over time. - -Themes must be built with purpose. They shouldn’t support each and every feature in Shopify. - -### Server-rendered - -_Our main constraint._ - -HTML must be rendered by Shopify servers using [Liquid](https://shopify.dev/api/liquid). Business logic and platform primitives such as translations and money formatting don’t belong on the client. - -Server-rendered doesn’t imply “full page reload”. Async and on-demand rendering of parts of the page is OK, but we do it sparingly as a progressive enhancement. - -### Functional, not pixel-perfect - -_No buyer is left behind._ - -The Web doesn’t require each page to be rendered pixel-perfect by each browser engine. Using semantic markup, progressive enhancement, and clever design, we ensure that themes remain functional regardless of the browser. - -And since legacy browsers are often the slowest, we don’t burden them with polyfills. We rely instead on the fail-open nature of the Web to provide them with a “minimal but functional” experience. - -## Contributing code - -You can follow these steps to go from setting up a store to creating a pull request for Dawn. - ->:information_source: We'll assume you're already set up with Git and GitHub (if you're not familiar with these, [start with these docs](https://docs.github.com/github/getting-started-with-github/quickstart/set-up-git)). - -1. Set up a [development store](https://shopify.dev/themes/tools/development-stores) so you can test your code changes (assuming you don't already have a store). -2. Install the [Shopify CLI](https://github.com/Shopify/shopify-cli) by following [these steps](https://shopify.dev/themes/tools/cli/installation). -3. Fork the repository, clone it and create a new branch: -```sh -git clone git@github.com:your-username/dawn.git -cd dawn -git checkout -b your-new-branch-name -``` -4. Launch a development server: -```sh -shopify theme serve -``` -5. Add your changes to the codebase. -6. Commit your changes: -```sh -git commit -a -m="Your commit message" -``` -7. Push your commit to your forked repository: -```sh -git push origin your-new-branch-name -``` -8. Open a pull request. See [GitHub's official documentation](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) for more details. -9. Before you can merge your pull request, you must sign Shopify's [Contributor License Agreement (CLA)](https://cla.shopify.com/). - -## Reporting a bug - -Bugs are tracked as [GitHub issues](https://github.com/Shopify/dawn/issues). Search open issues to see if someone else has reported a similar bug. If it's something new, [open an issue](https://github.com/Shopify/dawn/issues/new). We'll use the issue to have a conversation about the problem you want to fix. - -When creating a new issue, please ensure the issue is clear and include additional details to help maintainers reproduce it: - -* **Use a clear and descriptive title** for the issue to identify the problem. -* **Describe the exact steps which reproduce the problem** in as many details as possible. -* **Provide specific examples to demonstrate the steps.** Include links to files, or copy/pasteable snippets. If you're providing snippets in the issue, use Markdown code blocks. -* **Describe the behavior you observed** after following the steps and point out what exactly is the problem with that behavior. -* **Explain which behavior you expected to see** instead and why. -* **Include screenshots and animated GIFs** where possible. - -## Reviewing - -We (the Themes team) review every single PR. The purpose of reviews is to create the best version of Dawn we can for merchants, developers, and others who use it. - -:yellow_heart: Reviews are always respectful, acknowledging that everyone did the best possible job with the knowledge they had at the time. -:yellow_heart: Reviews discuss content, not the person who created it. -:yellow_heart: Reviews are constructive and start conversation around feedback. - -### Self review - -You should always review your own PR first. - -For code changes, make sure that you: -- [ ] Confirm that the changes meet our [theme code principles](#theme-code-principles). -- [ ] Check new or updated Liquid docs to confirm that the code used is up to date and isn't deprecated. -- [ ] If there are any failing checks in your PR, troubleshoot them until they're all passing. -- [ ] Add @Shopify/themes-front-end-developers as a reviewer. - -### Pull request template - -When you open a pull request, you must fill out the "Ready for review" template before we can review your PR. This template helps reviewers understand your changes and the purpose of your pull request. - -### Suggested changes - -We may ask for changes to be made before a PR can be merged, either using [suggested changes](https://docs.github.com/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request) or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch. - -As you update your PR and apply changes, mark each conversation as [resolved](https://docs.github.com/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations). diff --git a/.github/ISSUE_TEMPLATE/Bug_issue.md b/.github/ISSUE_TEMPLATE/Bug_issue.md deleted file mode 100644 index 240ad6046a6..00000000000 --- a/.github/ISSUE_TEMPLATE/Bug_issue.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Bug report -about: Use this template for reporting a bug -labels: bug ---- - -## Describe the current behavior - - -## Describe the expected behavior - - -## Version information (Dawn, browsers and operating systems) - -- Dawn Version: 7.0.1 -- Chrome Version 108.0.5359.124 -- macOS Version 13.1 - -## Possible solution - - -## Additional context/screenshots - - diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md deleted file mode 100644 index 7e3238d515f..00000000000 --- a/.github/ISSUE_TEMPLATE/Feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Use this template for suggesting a Dawn enhancement -labels: enhancement ---- - -## Describe the enhancement you'd like - - - -## Describe alternatives you've considered - - - -## Additional context/screenshots - - diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 6694546860d..00000000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,43 +0,0 @@ -### PR Summary: - - - - -### Why are these changes introduced? - -Fixes #0. - -### What approach did you take? - -### Other considerations - -### Decision log - -| # | Decision | Alternatives | Rationale | Downsides | -|---|---|---|---|---| -| 1 | | | | | - - -### Visual impact on existing themes - - - -### Testing steps/scenarios - -- [ ] Step 1 - -### Demo links - - -- [Store](url) -- [Editor](url) - -### Checklist -- [ ] Added PR summary for [release notes](https://themes.shopify.com/themes/dawn/styles/default#ReleaseNotes) -- [ ] Requested review from UX (Only for changes that are affecting the experience or perceivable visual details) -- [ ] Created a ticket for the [help.shopify.com](https://help.shopify.com) documentation team about updates to theme settings. (Internal-only task) -- [ ] Followed [theme code principles](https://github.com/Shopify/dawn/blob/main/.github/CONTRIBUTING.md#theme-code-principles) -- [ ] Linted with [Theme Check](https://github.com/Shopify/theme-check) -- [ ] Tested on [mobile](https://shopify.dev/themes/store/requirements#mobile-browser-requirements) -- [ ] Tested on [multiple browsers](https://shopify.dev/themes/store/requirements#desktop-browser-requirements) -- [ ] Tested for [accessibility](https://shopify.dev/themes/best-practices/accessibility) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml deleted file mode 100644 index c75e875a00b..00000000000 --- a/.github/dependabot.yaml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 -updates: - - package-ecosystem: github-actions - directory: "/" - schedule: - interval: weekly diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 3066b6a0d82..00000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: CI -on: [push] -jobs: - lhci: - name: Lighthouse - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Lighthouse - uses: shopify/lighthouse-ci-action@v1 - with: - store: ${{ secrets.SHOP_STORE_OS2 }} - password: ${{ secrets.SHOP_PASSWORD_OS2 }} - access_token: ${{ secrets.SHOP_ACCESS_TOKEN }} - collection_handle: all - lhci_github_app_token: ${{ secrets.LHCI_GITHUB_TOKEN }} - pull_theme: ${{ secrets.SHOP_PULL_THEME }} - theme-check: - name: Theme Check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Theme Check - uses: shopify/theme-check-action@v2 - with: - token: ${{ github.token }} diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml deleted file mode 100644 index 9c29c5c756a..00000000000 --- a/.github/workflows/cla.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Contributor License Agreement (CLA) - -on: - pull_request_target: - types: [opened, synchronize, reopened] - issue_comment: - types: [created] - -jobs: - cla: - runs-on: ubuntu-latest - if: | - (github.event.issue.pull_request - && !github.event.issue.pull_request.merged_at - && contains(github.event.comment.body, 'signed') - ) - || (github.event.pull_request && !github.event.pull_request.merged) - steps: - - uses: Shopify/shopify-cla-action@v1 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - cla-token: ${{ secrets.CLA_TOKEN }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 5eb1f676bd4..00000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,27 +0,0 @@ -# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. -# -# You can adjust the behavior by modifying this file. -# For more information, see: -# https://github.com/actions/stale -name: Mark stale issues and pull requests - -on: - schedule: - - cron: '38 16 * * *' - -jobs: - stale: - - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - - steps: - - uses: actions/stale@v5 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'This issue has been marked as stale due to inactivity for 60 days. Please comment or update if this is still relevant, otherwise it will be closed in 7 days.' - stale-pr-message: 'This pull request has been marked as stale due to inactivity for 60 days. If no further activity occurs, it will be closed in 7 days.' - stale-issue-label: 'inactive' - stale-pr-label: 'inactive' diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index a7785dfc0e2..00000000000 --- a/.prettierrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "printWidth": 120, - "singleQuote": true, - "overrides": [ - { - "files": "*.liquid", - "options": { - "singleQuote": false - } - } - ] -} diff --git a/.theme-check.yml b/.theme-check.yml deleted file mode 100644 index f905bd47a81..00000000000 --- a/.theme-check.yml +++ /dev/null @@ -1,4 +0,0 @@ -MatchingTranslations: - enabled: false -TemplateLength: - enabled: false diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index f6480c2e7a5..00000000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "recommendations": ["shopify.theme-check-vscode", "esbenp.prettier-vscode"] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 90abaf1f399..00000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "editor.formatOnSave": false, - "[javascript]": { - "editor.formatOnSave": true, - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[css]": { - "editor.formatOnSave": true - }, - "[liquid]": { - "editor.defaultFormatter": "Shopify.theme-check-vscode", - "editor.formatOnSave": true - }, - "themeCheck.checkOnSave": true -} diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index 7edb8f4b502..00000000000 --- a/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -Copyright (c) 2021-present Shopify Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, sell and/or create derivative works of the Software or any part thereof, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The rights granted above may only be exercised to develop themes that integrate or interoperate with Shopify software or services, and, if applicable, to distribute, offer for sale or otherwise make available any such themes via the Shopify Theme Store. All other uses of the Software are strictly prohibited. - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 3dea7f613e0..00000000000 --- a/README.md +++ /dev/null @@ -1,99 +0,0 @@ -# Dawn - -[![Build status](https://github.com/shopify/dawn/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Shopify/dawn/actions/workflows/ci.yml?query=branch%3Amain) -[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?color=informational)](/.github/CONTRIBUTING.md) - -[Getting started](#getting-started) | -[Staying up to date with Dawn changes](#staying-up-to-date-with-dawn-changes) | -[Developer tools](#developer-tools) | -[Contributing](#contributing) | -[Code of conduct](#code-of-conduct) | -[Theme Store submission](#theme-store-submission) | -[License](#license) - -Dawn represents a HTML-first, JavaScript-only-as-needed approach to theme development. It's Shopify's first source available theme with performance, flexibility, and [Online Store 2.0 features](https://www.shopify.com/partners/blog/shopify-online-store) built-in and acts as a reference for building Shopify themes. - -* **Web-native in its purest form:** Themes run on the [evergreen web](https://www.w3.org/2001/tag/doc/evergreen-web/). We leverage the latest web browsers to their fullest, while maintaining support for the older ones through progressive enhancement—not polyfills. -* **Lean, fast, and reliable:** Functionality and design defaults to “no” until it meets this requirement. Code ships on quality. Themes must be built with purpose. They shouldn’t support each and every feature in Shopify. -* **Server-rendered:** HTML must be rendered by Shopify servers using Liquid. Business logic and platform primitives such as translations and money formatting don’t belong on the client. Async and on-demand rendering of parts of the page is OK, but we do it sparingly as a progressive enhancement. -* **Functional, not pixel-perfect:** The Web doesn’t require each page to be rendered pixel-perfect by each browser engine. Using semantic markup, progressive enhancement, and clever design, we ensure that themes remain functional regardless of the browser. - -You can find a more detailed version of our theme code principles in the [contribution guide](https://github.com/Shopify/dawn/blob/main/.github/CONTRIBUTING.md#theme-code-principles). - -## Getting started -We recommend using Dawn as a starting point for theme development. [Learn more on Shopify.dev](https://shopify.dev/themes/getting-started/create). - -> If you're building a theme for the Shopify Theme Store, then you can use Dawn as a starting point. However, the theme that you submit needs to be [substantively different from Dawn](https://shopify.dev/themes/store/requirements#uniqueness) so that it provides added value for merchants. Learn about the [ways that you can use Dawn](https://shopify.dev/themes/tools/dawn#ways-to-use-dawn). - -Please note that the main branch may include code for features not yet released. The "stable" version of Dawn is available in the theme store. - -## Staying up to date with Dawn changes - -Say you're building a new theme off Dawn but you still want to be able to pull in the latest changes, you can add a remote `upstream` pointing to this Dawn repository. - -1. Navigate to your local theme folder. -2. Verify the list of remotes and validate that you have both an `origin` and `upstream`: -```sh -git remote -v -``` -3. If you don't see an `upstream`, you can add one that points to Shopify's Dawn repository: -```sh -git remote add upstream https://github.com/Shopify/dawn.git -``` -4. Pull in the latest Dawn changes into your repository: -```sh -git fetch upstream -git pull upstream main -``` - -## Developer tools - -There are a number of really useful tools that the Shopify Themes team uses during development. Dawn is already set up to work with these tools. - -### Shopify CLI - -[Shopify CLI](https://github.com/Shopify/shopify-cli) helps you build Shopify themes faster and is used to automate and enhance your local development workflow. It comes bundled with a suite of commands for developing Shopify themes—everything from working with themes on a Shopify store (e.g. creating, publishing, deleting themes) or launching a development server for local theme development. - -You can follow this [quick start guide for theme developers](https://shopify.dev/docs/themes/tools/cli) to get started. - -### Theme Check - -We recommend using [Theme Check](https://github.com/shopify/theme-check) as a way to validate and lint your Shopify themes. - -We've added Theme Check to Dawn's [list of VS Code extensions](/.vscode/extensions.json) so if you're using Visual Studio Code as your code editor of choice, you'll be prompted to install the [Theme Check VS Code](https://marketplace.visualstudio.com/items?itemName=Shopify.theme-check-vscode) extension upon opening VS Code after you've forked and cloned Dawn. - -You can also run it from a terminal with the following Shopify CLI command: - -```bash -shopify theme check -``` - -### Continuous Integration - -Dawn uses [GitHub Actions](https://github.com/features/actions) to maintain the quality of the theme. [This is a starting point](https://github.com/Shopify/dawn/blob/main/.github/workflows/ci.yml) and what we suggest to use in order to ensure you're building better themes. Feel free to build off of it! - -#### Shopify/lighthouse-ci-action - -We love fast websites! Which is why we created [Shopify/lighthouse-ci-action](https://github.com/Shopify/lighthouse-ci-action). This runs a series of [Google Lighthouse](https://developers.google.com/web/tools/lighthouse) audits for the home, product and collections pages on a store to ensure code that gets added doesn't degrade storefront performance over time. - -#### Shopify/theme-check-action - -Dawn runs [Theme Check](#Theme-Check) on every commit via [Shopify/theme-check-action](https://github.com/Shopify/theme-check-action). - -## Contributing - -Want to make commerce better for everyone by contributing to Dawn? We'd love your help! Please read our [contributing guide](https://github.com/Shopify/dawn/blob/main/.github/CONTRIBUTING.md) to learn about our development process, how to propose bug fixes and improvements, and how to build for Dawn. - -## Code of conduct - -All developers who wish to contribute through code or issues, please first read our [Code of Conduct](https://github.com/Shopify/dawn/blob/main/.github/CODE_OF_CONDUCT.md). - -## Theme Store submission - -The [Shopify Theme Store](https://themes.shopify.com/) is the place where Shopify merchants find the themes that they'll use to showcase and support their business. As a theme partner, you can create themes for the Shopify Theme Store and reach an international audience of an ever-growing number of entrepreneurs. - -Ensure that you follow the list of [theme store requirements](https://shopify.dev/themes/store/requirements) if you're interested in becoming a [Shopify Theme Partner](https://themes.shopify.com/services/themes/guidelines) and building themes for the Shopify platform. - -## License - -Copyright (c) 2021-present Shopify Inc. See [LICENSE](/LICENSE.md) for further details. diff --git a/assets/animations.js b/assets/animations.js deleted file mode 100644 index 2622f602e00..00000000000 --- a/assets/animations.js +++ /dev/null @@ -1,102 +0,0 @@ -const SCROLL_ANIMATION_TRIGGER_CLASSNAME = 'scroll-trigger'; -const SCROLL_ANIMATION_OFFSCREEN_CLASSNAME = 'scroll-trigger--offscreen'; -const SCROLL_ZOOM_IN_TRIGGER_CLASSNAME = 'animate--zoom-in'; -const SCROLL_ANIMATION_CANCEL_CLASSNAME = 'scroll-trigger--cancel'; - -// Scroll in animation logic -function onIntersection(elements, observer) { - elements.forEach((element, index) => { - if (element.isIntersecting) { - const elementTarget = element.target; - if (elementTarget.classList.contains(SCROLL_ANIMATION_OFFSCREEN_CLASSNAME)) { - elementTarget.classList.remove(SCROLL_ANIMATION_OFFSCREEN_CLASSNAME); - if (elementTarget.hasAttribute('data-cascade')) - elementTarget.setAttribute('style', `--animation-order: ${index};`); - } - observer.unobserve(elementTarget); - } else { - element.target.classList.add(SCROLL_ANIMATION_OFFSCREEN_CLASSNAME); - element.target.classList.remove(SCROLL_ANIMATION_CANCEL_CLASSNAME); - } - }); -} - -function initializeScrollAnimationTrigger(rootEl = document, isDesignModeEvent = false) { - const animationTriggerElements = Array.from(rootEl.getElementsByClassName(SCROLL_ANIMATION_TRIGGER_CLASSNAME)); - if (animationTriggerElements.length === 0) return; - - if (isDesignModeEvent) { - animationTriggerElements.forEach((element) => { - element.classList.add('scroll-trigger--design-mode'); - }); - return; - } - - const observer = new IntersectionObserver(onIntersection, { - rootMargin: '0px 0px -50px 0px', - }); - animationTriggerElements.forEach((element) => observer.observe(element)); -} - -// Zoom in animation logic -function initializeScrollZoomAnimationTrigger() { - if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return; - - const animationTriggerElements = Array.from(document.getElementsByClassName(SCROLL_ZOOM_IN_TRIGGER_CLASSNAME)); - - if (animationTriggerElements.length === 0) return; - - const scaleAmount = 0.2 / 100; - - animationTriggerElements.forEach((element) => { - let elementIsVisible = false; - const observer = new IntersectionObserver((elements) => { - elements.forEach((entry) => { - elementIsVisible = entry.isIntersecting; - }); - }); - observer.observe(element); - - element.style.setProperty('--zoom-in-ratio', 1 + scaleAmount * percentageSeen(element)); - - window.addEventListener( - 'scroll', - throttle(() => { - if (!elementIsVisible) return; - - element.style.setProperty('--zoom-in-ratio', 1 + scaleAmount * percentageSeen(element)); - }), - { passive: true } - ); - }); -} - -function percentageSeen(element) { - const viewportHeight = window.innerHeight; - const scrollY = window.scrollY; - const elementPositionY = element.getBoundingClientRect().top + scrollY; - const elementHeight = element.offsetHeight; - - if (elementPositionY > scrollY + viewportHeight) { - // If we haven't reached the image yet - return 0; - } else if (elementPositionY + elementHeight < scrollY) { - // If we've completely scrolled past the image - return 100; - } - - // When the image is in the viewport - const distance = scrollY + viewportHeight - elementPositionY; - let percentage = distance / ((viewportHeight + elementHeight) / 100); - return Math.round(percentage); -} - -window.addEventListener('DOMContentLoaded', () => { - initializeScrollAnimationTrigger(); - initializeScrollZoomAnimationTrigger(); -}); - -if (Shopify.designMode) { - document.addEventListener('shopify:section:load', (event) => initializeScrollAnimationTrigger(event.target, true)); - document.addEventListener('shopify:section:reorder', () => initializeScrollAnimationTrigger(document, true)); -} diff --git a/assets/banner-with-tabs.js b/assets/banner-with-tabs.js new file mode 100644 index 00000000000..636b0d9b161 --- /dev/null +++ b/assets/banner-with-tabs.js @@ -0,0 +1,111 @@ +if (!customElements.get('banner-with-tabs')) { + class BannerWithTabs extends TabsComponent { + constructor() { + super(); + this.totalItems = this.buttons.length; + this.addEventListener('tabChange', this.handleTabChange.bind(this)); + this.sectionId = this.dataset.sectionId; + this.section = document.querySelector(`.section-${this.sectionId}`); + + if (Shopify.designMode) { + document.addEventListener('shopify:block:select', (e) => { + if (e.detail.sectionId != this.sectionId) return; + let { target } = e; + const index = Number(target.dataset.index); + this.setActiveTab(index); + }); + } + } + + get panels() { + return Array.from(this.domNodes.tabPanels); + } + + get banners() { + return Array.from(this.section.querySelectorAll('.banner-with-tabs__banner')); + } + + handleTabChange(e) { + this.priorityItems = {}; + const { tabPanels } = this.domNodes; + + tabPanels.forEach((panel) => { + panel.classList.remove('active'); + }); + + this.banners.forEach((banner) => { + banner.classList.remove('active'); + }); + + e.detail.selectedTab.classList.add('active'); + this.banners[e.detail.selectedIndex].classList.add('active'); + + this.findSiblingItems(); + this.setStyle(); + } + + findSiblingItems() { + this.panels.forEach((panel) => { + panel.classList.remove('prev-item', 'next-item'); + }); + + this.prevItemsLength = this.selectedTab.dataset.index; + this.nextItemsLength = this.totalItems - this.selectedTab.dataset.index - 1 || 0; + + if (this.prevItemsLength > 0) { + for (let i=0; i < this.prevItemsLength; i++) { + this.panels[i].classList.add('prev-item'); + } + } + + if (this.nextItemsLength > 0) { + for (let i=0; i < this.nextItemsLength; i++) { + const index = this.totalItems - i - 1; + this.panels[index].classList.add('next-item'); + } + } + + this.prevItems = this.querySelectorAll('.prev-item'); + this.nextItems = this.querySelectorAll('.next-item'); + + this.prevItems.forEach((item,i) => { + const index = this.nextItemsLength + i + 1; + this.priorityItems[index] = {type: 'prev', item: item}; + }); + this.nextItems.forEach((item,i) => { + this.priorityItems[i+1] = {type: 'next', item: item}; + }); + this.priorityItems[0] = {type: 'active', item: this.selectedTab}; + } + + setStyle() { + for (const [i, obj] of Object.entries(this.priorityItems)) { + const index = parseInt(i); + const { type, item } = obj + const transform = `translate3d(0, ${index * 22}px, 0) scale(${1 - index * 0.07})`; + + item.style.setProperty('--card-transform', transform); + item.style.setProperty('--card-z-index', Object.entries(this.priorityItems).length - index + 1); + } + } + + attributeChangedCallback(name, oldValue, newValue) { + if (name === 'data-selected' && oldValue !== null && oldValue !== newValue) { + const fromElement = this.section.querySelector(`.banner-with-tabs__banner[data-index="${oldValue}"]`); + const toElement = this.section.querySelector(`.banner-with-tabs__banner[data-index="${newValue}"]`); + + setTimeout(() => { + if (toElement.classList.contains('active')) { + const motionEls = toElement.querySelectorAll('motion-element'); + motionEls.forEach((motionEl) => { + setTimeout(() => { + motionEl && motionEl.refreshAnimation(); + }); + }); + } + }); + } + } + } + customElements.define('banner-with-tabs', BannerWithTabs); +} diff --git a/assets/base.css b/assets/base.css deleted file mode 100644 index c8c0d4cbde1..00000000000 --- a/assets/base.css +++ /dev/null @@ -1,3597 +0,0 @@ -:root { - --alpha-button-background: 1; - --alpha-button-border: 1; - --alpha-link: 0.85; - --alpha-badge-border: 0.1; - --focused-base-outline: 0.2rem solid rgba(var(--color-foreground), 0.5); - --focused-base-outline-offset: 0.3rem; - --focused-base-box-shadow: 0 0 0 0.3rem rgb(var(--color-background)), 0 0 0.5rem 0.4rem rgba(var(--color-foreground), 0.3); -} - -.product-card-wrapper .card, -.contains-card--product { - --border-radius: var(--product-card-corner-radius); - --border-width: var(--product-card-border-width); - --border-opacity: var(--product-card-border-opacity); - --shadow-horizontal-offset: var(--product-card-shadow-horizontal-offset); - --shadow-vertical-offset: var(--product-card-shadow-vertical-offset); - --shadow-blur-radius: var(--product-card-shadow-blur-radius); - --shadow-opacity: var(--product-card-shadow-opacity); - --shadow-visible: var(--product-card-shadow-visible); - --image-padding: var(--product-card-image-padding); - --text-alignment: var(--product-card-text-alignment); -} - -.collection-card-wrapper .card, -.contains-card--collection { - --border-radius: var(--collection-card-corner-radius); - --border-width: var(--collection-card-border-width); - --border-opacity: var(--collection-card-border-opacity); - --shadow-horizontal-offset: var(--collection-card-shadow-horizontal-offset); - --shadow-vertical-offset: var(--collection-card-shadow-vertical-offset); - --shadow-blur-radius: var(--collection-card-shadow-blur-radius); - --shadow-opacity: var(--collection-card-shadow-opacity); - --shadow-visible: var(--collection-card-shadow-visible); - --image-padding: var(--collection-card-image-padding); - --text-alignment: var(--collection-card-text-alignment); -} - -.article-card-wrapper .card, -.contains-card--article { - --border-radius: var(--blog-card-corner-radius); - --border-width: var(--blog-card-border-width); - --border-opacity: var(--blog-card-border-opacity); - --shadow-horizontal-offset: var(--blog-card-shadow-horizontal-offset); - --shadow-vertical-offset: var(--blog-card-shadow-vertical-offset); - --shadow-blur-radius: var(--blog-card-shadow-blur-radius); - --shadow-opacity: var(--blog-card-shadow-opacity); - --shadow-visible: var(--blog-card-shadow-visible); - --image-padding: var(--blog-card-image-padding); - --text-alignment: var(--blog-card-text-alignment); -} - -.contains-content-container, -.content-container { - --border-radius: var(--text-boxes-radius); - --border-width: var(--text-boxes-border-width); - --border-opacity: var(--text-boxes-border-opacity); - --shadow-horizontal-offset: var(--text-boxes-shadow-horizontal-offset); - --shadow-vertical-offset: var(--text-boxes-shadow-vertical-offset); - --shadow-blur-radius: var(--text-boxes-shadow-blur-radius); - --shadow-opacity: var(--text-boxes-shadow-opacity); - --shadow-visible: var(--text-boxes-shadow-visible); -} - -.contains-media, -.global-media-settings { - --border-radius: var(--media-radius); - --border-width: var(--media-border-width); - --border-opacity: var(--media-border-opacity); - --shadow-horizontal-offset: var(--media-shadow-horizontal-offset); - --shadow-vertical-offset: var(--media-shadow-vertical-offset); - --shadow-blur-radius: var(--media-shadow-blur-radius); - --shadow-opacity: var(--media-shadow-opacity); - --shadow-visible: var(--media-shadow-visible); -} - -/* base */ - -.page-width { - max-width: var(--page-width); - margin: 0 auto; - padding: 0 1.5rem; -} - -body:has(.section-header .drawer-menu) .announcement-bar-section .page-width { - max-width: 100%; -} - -.page-width.drawer-menu { - max-width: 100%; -} - -.page-width-desktop { - padding: 0; - margin: 0 auto; -} - -.utility-bar__grid.page-width { - padding-left: 3rem; - padding-right: 3rem; -} - -@media screen and (min-width: 750px) { - .page-width { - padding: 0 5rem; - } - - .header.page-width, - .utility-bar__grid.page-width { - padding-left: 3.2rem; - padding-right: 3.2rem; - } - - .page-width--narrow { - padding: 0 9rem; - } - - .page-width-desktop { - padding: 0; - } - - .page-width-tablet { - padding: 0 5rem; - } -} - -@media screen and (min-width: 990px) { - .header:not(.drawer-menu).page-width { - padding-left: 5rem; - padding-right: 5rem; - } - - .page-width--narrow { - max-width: 72.6rem; - padding: 0; - } - - .page-width-desktop { - max-width: var(--page-width); - padding: 0 5rem; - } -} - -.isolate { - position: relative; - z-index: 0; -} - -.section + .section { - margin-top: var(--spacing-sections-mobile); -} - -@media screen and (min-width: 750px) { - .section + .section { - margin-top: var(--spacing-sections-desktop); - } -} - -.element-margin-top { - margin-top: 5rem; -} - -@media screen and (min-width: 750px) { - .element-margin { - margin-top: calc(5rem + var(--page-width-margin)); - } -} - -.background-secondary { - background-color: rgba(var(--color-foreground), 0.04); -} - -.grid-auto-flow { - display: grid; - grid-auto-flow: column; -} - -.page-margin, -.shopify-challenge__container { - margin: 7rem auto; -} - -.rte-width { - max-width: 82rem; - margin: 0 auto 2rem; -} - -.list-unstyled { - margin: 0; - padding: 0; - list-style: none; -} - -.hidden { - display: none !important; -} - -.visually-hidden { - position: absolute !important; - overflow: hidden; - width: 1px; - height: 1px; - margin: -1px; - padding: 0; - border: 0; - clip: rect(0 0 0 0); - word-wrap: normal !important; -} - -.visually-hidden--inline { - margin: 0; - height: 1em; -} - -.overflow-hidden { - overflow: hidden; -} - -.skip-to-content-link:focus { - z-index: 9999; - position: inherit; - overflow: auto; - width: auto; - height: auto; - clip: auto; -} - -.full-width-link { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 2; -} - -::selection { - background-color: rgba(var(--color-foreground), 0.2); -} - -.text-body { - font-size: 1.5rem; - letter-spacing: 0.06rem; - line-height: calc(1 + 0.8 / var(--font-body-scale)); - font-family: var(--font-body-family); - font-style: var(--font-body-style); - font-weight: var(--font-body-weight); -} - -h1, -h2, -h3, -h4, -h5, -.h0, -.h1, -.h2, -.h3, -.h4, -.h5 { - font-family: var(--font-heading-family); - font-style: var(--font-heading-style); - font-weight: var(--font-heading-weight); - letter-spacing: calc(var(--font-heading-scale) * 0.06rem); - color: rgb(var(--color-foreground)); - line-height: calc(1 + 0.3 / max(1, var(--font-heading-scale))); - word-break: break-word; -} - -.hxxl { - font-size: clamp(calc(var(--font-heading-scale) * 5.6rem), 14vw, calc(var(--font-heading-scale) * 7.2rem)); - line-height: 1.1; -} - -.hxl { - font-size: calc(var(--font-heading-scale) * 5rem); - line-height: calc(1 + 0.3 / max(1, var(--font-heading-scale))); -} - -@media only screen and (min-width: 750px) { - .hxl { - font-size: calc(var(--font-heading-scale) * 6.2rem); - } -} - -.h0 { - font-size: calc(var(--font-heading-scale) * 4rem); -} - -@media only screen and (min-width: 750px) { - .h0 { - font-size: calc(var(--font-heading-scale) * 5.2rem); - } -} - -h1, -.h1 { - font-size: calc(var(--font-heading-scale) * 3rem); -} - -@media only screen and (min-width: 750px) { - h1, - .h1 { - font-size: calc(var(--font-heading-scale) * 4rem); - } -} - -h2, -.h2 { - font-size: calc(var(--font-heading-scale) * 2rem); -} - -@media only screen and (min-width: 750px) { - h2, - .h2 { - font-size: calc(var(--font-heading-scale) * 2.4rem); - } -} - -h3, -.h3 { - font-size: calc(var(--font-heading-scale) * 1.7rem); -} - -@media only screen and (min-width: 750px) { - h3, - .h3 { - font-size: calc(var(--font-heading-scale) * 1.8rem); - } -} - -h4, -.h4 { - font-family: var(--font-heading-family); - font-style: var(--font-heading-style); - font-size: calc(var(--font-heading-scale) * 1.5rem); -} - -h5, -.h5 { - font-size: calc(var(--font-heading-scale) * 1.2rem); -} - -@media only screen and (min-width: 750px) { - h5, - .h5 { - font-size: calc(var(--font-heading-scale) * 1.3rem); - } -} - -h6, -.h6 { - color: rgba(var(--color-foreground), 0.75); - margin-block-start: 1.67em; - margin-block-end: 1.67em; -} - -blockquote { - font-style: italic; - color: rgba(var(--color-foreground), 0.75); - border-left: 0.2rem solid rgba(var(--color-foreground), 0.2); - padding-left: 1rem; -} - -@media screen and (min-width: 750px) { - blockquote { - padding-left: 1.5rem; - } -} - -.caption { - font-size: 1rem; - letter-spacing: 0.07rem; - line-height: calc(1 + 0.7 / var(--font-body-scale)); -} - -@media screen and (min-width: 750px) { - .caption { - font-size: 1.2rem; - } -} - -.caption-with-letter-spacing { - font-size: 1rem; - letter-spacing: 0.13rem; - line-height: calc(1 + 0.2 / var(--font-body-scale)); - text-transform: uppercase; -} - -.caption-with-letter-spacing--medium { - font-size: 1.2rem; - letter-spacing: 0.16rem; -} - -.caption-with-letter-spacing--large { - font-size: 1.4rem; - letter-spacing: 0.18rem; -} - -.caption-large, -.customer .field input, -.customer select, -.field__input, -.form__label, -.select__select { - font-size: 1.3rem; - line-height: calc(1 + 0.5 / var(--font-body-scale)); - letter-spacing: 0.04rem; -} - -.color-foreground { - color: rgb(var(--color-foreground)); -} - -table:not([class]) { - table-layout: fixed; - border-collapse: collapse; - font-size: 1.4rem; - border-style: hidden; - box-shadow: 0 0 0 0.1rem rgba(var(--color-foreground), 0.2); - /* draws the table border */ -} - -table:not([class]) td, -table:not([class]) th { - padding: 1em; - border: 0.1rem solid rgba(var(--color-foreground), 0.2); -} - -@media screen and (max-width: 749px) { - .small-hide { - display: none !important; - } -} - -@media screen and (min-width: 750px) and (max-width: 989px) { - .medium-hide { - display: none !important; - } -} - -@media screen and (min-width: 990px) { - .large-up-hide { - display: none !important; - } -} - -.left { - text-align: left; -} - -.center { - text-align: center; -} - -.right { - text-align: right; -} - -.uppercase { - text-transform: uppercase; -} - -.light { - opacity: 0.7; -} - -a:empty, -ul:empty, -dl:empty, -div:empty, -section:empty, -article:empty, -p:empty, -h1:empty, -h2:empty, -h3:empty, -h4:empty, -h5:empty, -h6:empty { - display: none; -} - -.link, -.customer a { - cursor: pointer; - display: inline-block; - border: none; - box-shadow: none; - text-decoration: underline; - text-underline-offset: 0.3rem; - color: rgb(var(--color-link)); - background-color: transparent; - font-size: 1.4rem; - font-family: inherit; -} - -.link--text { - color: rgb(var(--color-foreground)); -} - -.link--text:hover { - color: rgba(var(--color-foreground), 0.75); -} - -.link-with-icon { - display: inline-flex; - font-size: 1.4rem; - font-weight: 600; - letter-spacing: 0.1rem; - text-decoration: none; - margin-bottom: 4.5rem; - white-space: nowrap; -} - -.link-with-icon .icon { - width: 1.5rem; - margin-left: 1rem; -} - -a:not([href]) { - cursor: not-allowed; -} - -.circle-divider::after { - content: '\2022'; - margin: 0 1.3rem 0 1.5rem; -} - -.circle-divider:last-of-type::after { - display: none; -} - -hr { - border: none; - height: 0.1rem; - background-color: rgba(var(--color-foreground), 0.2); - display: block; - margin: 5rem 0; -} - -@media screen and (min-width: 750px) { - hr { - margin: 7rem 0; - } -} - -.full-unstyled-link { - text-decoration: none; - color: currentColor; - display: block; -} - -.placeholder { - background-color: rgba(var(--color-foreground), 0.04); - color: rgba(var(--color-foreground), 0.55); - fill: rgba(var(--color-foreground), 0.55); -} - -details > * { - box-sizing: border-box; -} - -.break { - word-break: break-word; -} - -.visibility-hidden { - visibility: hidden; -} - -@media (prefers-reduced-motion) { - .motion-reduce { - transition: none !important; - animation: none !important; - } -} - -:root { - --duration-short: 100ms; - --duration-default: 200ms; - --duration-announcement-bar: 250ms; - --duration-medium: 300ms; - --duration-long: 500ms; - --duration-extra-long: 600ms; - --duration-extra-longer: 750ms; - --duration-extended: 3s; - --ease-out-slow: cubic-bezier(0, 0, 0.3, 1); - --animation-slide-in: slideIn var(--duration-extra-long) var(--ease-out-slow) forwards; - --animation-fade-in: fadeIn var(--duration-extra-long) var(--ease-out-slow); -} - -.underlined-link, -.customer a, -.inline-richtext a { - text-underline-offset: 0.3rem; - text-decoration-thickness: 0.1rem; - transition: text-decoration-thickness ease 100ms; -} - -.underlined-link, -.customer a { - color: rgba(var(--color-link), var(--alpha-link)); -} - -.inline-richtext a, -.rte.inline-richtext a { - color: currentColor; -} - -.underlined-link:hover, -.customer a:hover, -.inline-richtext a:hover { - color: rgb(var(--color-link)); - text-decoration-thickness: 0.2rem; -} - -.icon-arrow { - width: 1.5rem; -} - -h3 .icon-arrow, -.h3 .icon-arrow { - width: calc(var(--font-heading-scale) * 1.5rem); -} - -/* arrow animation */ -.animate-arrow .icon-arrow path { - transform: translateX(-0.25rem); - transition: transform var(--duration-short) ease; -} - -.animate-arrow:hover .icon-arrow path { - transform: translateX(-0.05rem); -} - -.svg-wrapper { - display: inline-flex; - justify-content: center; - align-items: center; - width: 20px; - height: 20px; -} - -.svg-wrapper > svg { - height: 100%; - width: 100%; -} - -/* base-details-summary */ -summary { - cursor: pointer; - list-style: none; - position: relative; -} - -summary .icon-caret { - position: absolute; - height: 0.6rem; - right: 1.5rem; - top: calc(50% - 0.2rem); -} - -summary::-webkit-details-marker { - display: none; -} - -.disclosure-has-popup { - position: relative; -} - -.disclosure-has-popup[open] > summary::before { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 2; - display: block; - cursor: default; - content: ' '; - background: transparent; -} - -.disclosure-has-popup > summary::before { - display: none; -} - -.disclosure-has-popup[open] > summary + * { - z-index: 100; -} - -@media screen and (min-width: 750px) { - .disclosure-has-popup[open] > summary + * { - z-index: 4; - } - - .facets .disclosure-has-popup[open] > summary + * { - z-index: 2; - } -} - -.placeholder-svg { - height: 100%; - width: 100%; -} - -/* base-focus */ -/* - Focus ring - default (with offset) -*/ - -*:focus { - outline: 0; - box-shadow: none; -} - -*:focus-visible { - outline: var(--focused-base-outline); - outline-offset: var(--focused-base-outline-offset); - box-shadow: var(--focused-base-box-shadow); -} - -/* Fallback - for browsers that don't support :focus-visible, a fallback is set for :focus */ -.focused { - outline: var(--focused-base-outline); - outline-offset: var(--focused-base-outline-offset); - box-shadow: var(--focused-base-box-shadow); -} - -/* - Focus ring - inset -*/ - -.focus-inset:focus-visible { - outline: 0.2rem solid rgba(var(--color-foreground), 0.5); - outline-offset: -0.2rem; - box-shadow: 0 0 0.2rem 0 rgba(var(--color-foreground), 0.3); -} - -.focused.focus-inset { - outline: 0.2rem solid rgba(var(--color-foreground), 0.5); - outline-offset: -0.2rem; - box-shadow: 0 0 0.2rem 0 rgba(var(--color-foreground), 0.3); -} - -/* - Focus ring - none -*/ - -/* Dangerous for a11y - Use with care */ -.focus-none { - box-shadow: none !important; - outline: 0 !important; -} - -.focus-offset:focus-visible { - outline: 0.2rem solid rgba(var(--color-foreground), 0.5); - outline-offset: 1rem; - box-shadow: 0 0 0 1rem rgb(var(--color-background)), 0 0 0.2rem 1.2rem rgba(var(--color-foreground), 0.3); -} - -.focus-offset.focused { - outline: 0.2rem solid rgba(var(--color-foreground), 0.5); - outline-offset: 1rem; - box-shadow: 0 0 0 1rem rgb(var(--color-background)), 0 0 0.2rem 1.2rem rgba(var(--color-foreground), 0.3); -} - -/* component-title */ -.title, -.title-wrapper-with-link { - margin: 3rem 0 2rem; -} - -.title-wrapper-with-link .title { - margin: 0; -} - -.title .link { - font-size: inherit; -} - -.title-wrapper { - margin-bottom: 3rem; -} - -.title-wrapper-with-link { - display: flex; - justify-content: space-between; - align-items: flex-end; - gap: 1rem; - margin-bottom: 3rem; - flex-wrap: wrap; -} - -.title--primary { - margin: 4rem 0; -} - -.title-wrapper--self-padded-tablet-down, -.title-wrapper--self-padded-mobile { - padding-left: 1.5rem; - padding-right: 1.5rem; -} - -@media screen and (min-width: 750px) { - .title-wrapper--self-padded-mobile { - padding-left: 0; - padding-right: 0; - } -} - -@media screen and (min-width: 990px) { - .title, - .title-wrapper-with-link { - margin: 5rem 0 3rem; - } - - .title--primary { - margin: 2rem 0; - } - - .title-wrapper-with-link { - align-items: center; - } - - .title-wrapper-with-link .title { - margin-bottom: 0; - } - - .title-wrapper--self-padded-tablet-down { - padding-left: 0; - padding-right: 0; - } -} - -.title-wrapper-with-link .link-with-icon { - margin: 0; - flex-shrink: 0; - display: flex; - align-items: center; -} - -.title-wrapper-with-link .link-with-icon .svg-wrapper { - width: 1.5rem; -} - -.title-wrapper-with-link a { - margin-top: 0; - flex-shrink: 0; -} - -.title-wrapper--no-top-margin { - margin-top: 0; -} - -.title-wrapper--no-top-margin > .title { - margin-top: 0; -} - -.subtitle { - font-size: 1.8rem; - line-height: calc(1 + 0.8 / var(--font-body-scale)); - letter-spacing: 0.06rem; - color: rgba(var(--color-foreground), 0.7); -} - -.subtitle--small { - font-size: 1.4rem; - letter-spacing: 0.1rem; -} - -.subtitle--medium { - font-size: 1.6rem; - letter-spacing: 0.08rem; -} - -/* component-grid */ -.grid { - display: flex; - flex-wrap: wrap; - margin-bottom: 2rem; - padding: 0; - list-style: none; - column-gap: var(--grid-mobile-horizontal-spacing); - row-gap: var(--grid-mobile-vertical-spacing); -} - -@media screen and (min-width: 750px) { - .grid { - column-gap: var(--grid-desktop-horizontal-spacing); - row-gap: var(--grid-desktop-vertical-spacing); - } -} - -.grid:last-child { - margin-bottom: 0; -} - -.grid__item { - width: calc(25% - var(--grid-mobile-horizontal-spacing) * 3 / 4); - max-width: calc(50% - var(--grid-mobile-horizontal-spacing) / 2); - flex-grow: 1; - flex-shrink: 0; -} - -@media screen and (min-width: 750px) { - .grid__item { - width: calc(25% - var(--grid-desktop-horizontal-spacing) * 3 / 4); - max-width: calc(50% - var(--grid-desktop-horizontal-spacing) / 2); - } -} - -.grid--gapless.grid { - column-gap: 0; - row-gap: 0; -} - -@media screen and (max-width: 749px) { - .grid__item.slider__slide--full-width { - width: 100%; - max-width: none; - } -} - -.grid--1-col .grid__item { - max-width: 100%; - width: 100%; -} - -.grid--3-col .grid__item { - width: calc(33.33% - var(--grid-mobile-horizontal-spacing) * 2 / 3); -} - -@media screen and (min-width: 750px) { - .grid--3-col .grid__item { - width: calc(33.33% - var(--grid-desktop-horizontal-spacing) * 2 / 3); - } -} - -.grid--2-col .grid__item { - width: calc(50% - var(--grid-mobile-horizontal-spacing) / 2); -} - -@media screen and (min-width: 750px) { - .grid--2-col .grid__item { - width: calc(50% - var(--grid-desktop-horizontal-spacing) / 2); - } - - .grid--4-col-tablet .grid__item { - width: calc(25% - var(--grid-desktop-horizontal-spacing) * 3 / 4); - } - - .grid--3-col-tablet .grid__item { - width: calc(33.33% - var(--grid-desktop-horizontal-spacing) * 2 / 3); - } - - .grid--2-col-tablet .grid__item { - width: calc(50% - var(--grid-desktop-horizontal-spacing) / 2); - } -} - -@media screen and (max-width: 989px) { - .grid--1-col-tablet-down .grid__item { - width: 100%; - max-width: 100%; - } - - .slider--tablet.grid--peek { - margin: 0; - width: 100%; - } - - .slider--tablet.grid--peek .grid__item { - box-sizing: content-box; - margin: 0; - } - - .slider.slider--tablet .scroll-trigger.animate--slide-in, - .slider.slider--mobile .scroll-trigger.animate--slide-in { - animation: none; - opacity: 1; - transform: inherit; - } - - .scroll-trigger:not(.scroll-trigger--offscreen) .slider--tablet { - animation: var(--animation-slide-in); - } -} - -@media screen and (min-width: 990px) { - .grid--6-col-desktop .grid__item { - width: calc(16.66% - var(--grid-desktop-horizontal-spacing) * 5 / 6); - max-width: calc(16.66% - var(--grid-desktop-horizontal-spacing) * 5 / 6); - } - - .grid--5-col-desktop .grid__item { - width: calc(20% - var(--grid-desktop-horizontal-spacing) * 4 / 5); - max-width: calc(20% - var(--grid-desktop-horizontal-spacing) * 4 / 5); - } - - .grid--4-col-desktop .grid__item { - width: calc(25% - var(--grid-desktop-horizontal-spacing) * 3 / 4); - max-width: calc(25% - var(--grid-desktop-horizontal-spacing) * 3 / 4); - } - - .grid--3-col-desktop .grid__item { - width: calc(33.33% - var(--grid-desktop-horizontal-spacing) * 2 / 3); - max-width: calc(33.33% - var(--grid-desktop-horizontal-spacing) * 2 / 3); - } - - .grid--2-col-desktop .grid__item { - width: calc(50% - var(--grid-desktop-horizontal-spacing) / 2); - max-width: calc(50% - var(--grid-desktop-horizontal-spacing) / 2); - } - - .slider.slider--desktop .scroll-trigger.animate--slide-in { - animation: none; - opacity: 1; - transform: inherit; - } - - .scroll-trigger:not(.scroll-trigger--offscreen) .slider--desktop { - animation: var(--animation-slide-in); - } -} - -@media screen and (min-width: 990px) { - .grid--1-col-desktop { - flex: 0 0 100%; - max-width: 100%; - } - - .grid--1-col-desktop .grid__item { - width: 100%; - max-width: 100%; - } -} - -@media screen and (max-width: 749px) { - .grid--peek.slider--mobile { - margin: 0; - width: 100%; - } - - .grid--peek.slider--mobile .grid__item { - box-sizing: content-box; - margin: 0; - } - - .grid--peek .grid__item { - min-width: 35%; - } - - .grid--peek.slider .grid__item:first-of-type { - margin-left: 1.5rem; - } - - /* Fix to show some space at the end of our sliders in all browsers */ - .grid--peek.slider:after { - margin-left: calc(-1 * var(--grid-mobile-horizontal-spacing)); - } - - .grid--2-col-tablet-down .grid__item { - width: calc(50% - var(--grid-mobile-horizontal-spacing) / 2); - } - - .slider--tablet.grid--peek.grid--2-col-tablet-down .grid__item, - .grid--peek .grid__item { - width: calc(50% - var(--grid-mobile-horizontal-spacing) - 3rem); - } - - .slider--tablet.grid--peek.grid--1-col-tablet-down .grid__item, - .slider--mobile.grid--peek.grid--1-col-tablet-down .grid__item { - width: calc(100% - var(--grid-mobile-horizontal-spacing) - 3rem); - } -} - -@media screen and (min-width: 750px) and (max-width: 989px) { - .slider--tablet.grid--peek .grid__item { - width: calc(25% - var(--grid-desktop-horizontal-spacing) - 3rem); - } - - .slider--tablet.grid--peek.grid--3-col-tablet .grid__item { - width: calc(33.33% - var(--grid-desktop-horizontal-spacing) - 3rem); - } - - .slider--tablet.grid--peek.grid--2-col-tablet .grid__item, - .slider--tablet.grid--peek.grid--2-col-tablet-down .grid__item { - width: calc(50% - var(--grid-desktop-horizontal-spacing) - 3rem); - } - - .slider--tablet.grid--peek .grid__item:first-of-type { - margin-left: 1.5rem; - } - - .grid--2-col-tablet-down .grid__item { - width: calc(50% - var(--grid-desktop-horizontal-spacing) / 2); - } - - .grid--1-col-tablet-down.grid--peek .grid__item { - width: calc(100% - var(--grid-desktop-horizontal-spacing) - 3rem); - } -} - -/* component-media */ -.media { - display: block; - background-color: rgba(var(--color-foreground), 0.1); - position: relative; - overflow: hidden; -} - -.media--transparent { - background-color: transparent; -} - -.media > *:not(.zoom):not(.deferred-media__poster-button), -.media model-viewer { - display: block; - max-width: 100%; - position: absolute; - top: 0; - left: 0; - height: 100%; - width: 100%; -} - -.media > img { - object-fit: cover; - object-position: center center; - transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); -} - -.media--square { - padding-bottom: 100%; -} - -.media--portrait { - padding-bottom: 125%; -} - -.media--landscape { - padding-bottom: 66.6%; -} - -.media--cropped { - padding-bottom: 56%; -} - -.media--16-9 { - padding-bottom: 56.25%; -} - -.media--circle { - padding-bottom: 100%; - border-radius: 50%; -} - -.media.media--hover-effect > img + img { - opacity: 0; -} - -@media screen and (min-width: 990px) { - .media--cropped { - padding-bottom: 63%; - } -} - -deferred-media { - display: block; -} - -/* component-button */ -/* Button - default */ - -.button--secondary, -.button--tertiary { - --color-button: var(--color-secondary-button); - --color-button-text: var(--color-secondary-button-text); -} - -.button--tertiary { - --alpha-button-background: 0; - --alpha-button-border: 0.2; -} - -.button, -.shopify-challenge__button, -.customer button, -button.shopify-payment-button__button--unbranded { - --shadow-horizontal-offset: var(--buttons-shadow-horizontal-offset); - --shadow-vertical-offset: var(--buttons-shadow-vertical-offset); - --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-opacity: calc(1 - var(--buttons-border-opacity)); - border-radius: var(--buttons-radius-outset); - position: relative; -} - -.button, -.shopify-challenge__button, -.customer button, -button.shopify-payment-button__button--unbranded { - min-width: calc(12rem + var(--buttons-border-width) * 2); - min-height: calc(4.5rem + var(--buttons-border-width) * 2); -} - -.button, -.shopify-challenge__button, -.customer button { - display: inline-flex; - justify-content: center; - align-items: center; - border: 0; - padding: 0 3rem; - cursor: pointer; - font: inherit; - font-size: 1.5rem; - text-decoration: none; - color: rgb(var(--color-button-text)); - transition: box-shadow var(--duration-short) ease; - -webkit-appearance: none; - appearance: none; - background-color: rgba(var(--color-button), var(--alpha-button-background)); -} - -.button:before, -.shopify-challenge__button:before, -.customer button:before, -.shopify-payment-button__button--unbranded:before { - content: ''; - position: absolute; - top: 0; - right: 0; - bottom: 0; - 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)); -} - -.button:after, -.shopify-challenge__button:after, -.customer button:after, -.shopify-payment-button__button--unbranded:after { - content: ''; - position: absolute; - top: var(--buttons-border-width); - right: var(--buttons-border-width); - bottom: var(--buttons-border-width); - 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)), - 0 0 0 var(--buttons-border-width) rgba(var(--color-button), var(--alpha-button-background)); - transition: box-shadow var(--duration-short) ease; -} - -.button:not([disabled]):hover::after, -.shopify-challenge__button:hover::after, -.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)), - 0 0 0 calc(var(--buttons-border-width) + 1px) rgba(var(--color-button), var(--alpha-button-background)); -} - -.button--secondary:after { - --border-opacity: var(--buttons-border-opacity); -} - -.button:focus-visible, -.button:focus, -.button.focused, -.shopify-payment-button__button--unbranded:focus-visible, -.shopify-payment-button__button--unbranded:focus { - outline: 0; - box-shadow: 0 0 0 0.3rem rgb(var(--color-background)), 0 0 0 0.5rem rgba(var(--color-foreground), 0.5), - 0 0 0.5rem 0.4rem rgba(var(--color-foreground), 0.3); -} - -.button:focus:not(:focus-visible):not(.focused), -.shopify-payment-button__button--unbranded:focus:not(:focus-visible):not(.focused) { - box-shadow: inherit; -} - -.button::selection, -.shopify-challenge__button::selection, -.customer button::selection { - background-color: rgba(var(--color-button-text), 0.3); -} - -.button, -.button-label, -.shopify-challenge__button, -.customer button { - font-size: 1.5rem; - letter-spacing: 0.1rem; - line-height: calc(1 + 0.2 / var(--font-body-scale)); -} - -.button--tertiary { - font-size: 1.2rem; - padding: 1rem 1.5rem; - min-width: calc(9rem + var(--buttons-border-width) * 2); - min-height: calc(3.5rem + var(--buttons-border-width) * 2); -} - -.button--small { - padding: 1.2rem 2.6rem; -} - -/* Shopify Accelerated Checkout */ - -shopify-accelerated-checkout { - --shopify-accelerated-checkout-button-border-radius: var(--buttons-radius-outset); - --shopify-accelerated-checkout-button-box-shadow: var(--shadow-horizontal-offset) var(--shadow-vertical-offset) var(--shadow-blur-radius) - rgba(var(--color-shadow), var(--shadow-opacity)); -} -shopify-accelerated-checkout-cart { - --shopify-accelerated-checkout-button-border-radius: var(--buttons-radius-outset); - --shopify-accelerated-checkout-button-box-shadow: var(--shadow-horizontal-offset) var(--shadow-vertical-offset) var(--shadow-blur-radius) - rgba(var(--color-shadow), var(--shadow-opacity)); -} - - -/* Button - other */ - -.button:disabled, -.button[aria-disabled='true'], -.button.disabled, -.customer button:disabled, -.customer button[aria-disabled='true'], -.customer button.disabled, -.quantity__button.disabled { - cursor: not-allowed; - opacity: 0.5; -} - -.button--full-width { - display: flex; - width: 100%; -} - -.button.loading { - color: transparent; - position: relative; -} - -@media screen and (forced-colors: active) { - .button.loading { - color: rgb(var(--color-foreground)); - } -} - -.button.loading > .loading__spinner { - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - position: absolute; - height: 100%; - display: flex; - align-items: center; -} - -.button.loading > .loading__spinner .spinner { - width: fit-content; -} - -.button.loading > .loading__spinner .path { - stroke: rgb(var(--color-button-text)); -} - -/* Button - social share */ - -.share-button { - display: block; - position: relative; -} - -.share-button details { - width: fit-content; -} - -.share-button__button { - font-size: 1.4rem; - display: flex; - align-items: center; - color: rgb(var(--color-link)); - margin-left: 0; - padding-left: 0; - min-height: 4.4rem; -} - -details[open] > .share-button__fallback { - animation: animateMenuOpen var(--duration-default) ease; -} - -.share-button__button:hover { - text-decoration: underline; - text-underline-offset: 0.3rem; -} - -.share-button__button, -.share-button__fallback button { - cursor: pointer; - background-color: transparent; - border: none; -} - -.share-button__button .icon-share { - height: 1.2rem; - margin-right: 1rem; - min-width: 1.3rem; -} - -.share-button__fallback { - display: flex; - align-items: center; - position: absolute; - top: 3rem; - left: 0.1rem; - z-index: 3; - width: 100%; - min-width: max-content; - border-radius: var(--inputs-radius); - border: 0; -} - -.share-button__fallback:after { - pointer-events: none; - content: ''; - position: absolute; - top: var(--inputs-border-width); - right: var(--inputs-border-width); - bottom: var(--inputs-border-width); - left: var(--inputs-border-width); - border: 0.1rem solid transparent; - border-radius: var(--inputs-radius); - box-shadow: 0 0 0 var(--inputs-border-width) rgba(var(--color-foreground), var(--inputs-border-opacity)); - transition: box-shadow var(--duration-short) ease; - z-index: 1; -} - -.share-button__fallback:before { - background: rgb(var(--color-background)); - pointer-events: none; - content: ''; - position: absolute; - top: 0; - right: 0; - 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)); - z-index: -1; -} - -.share-button__fallback button { - width: 4.4rem; - height: 4.4rem; - padding: 0; - flex-shrink: 0; - display: flex; - justify-content: center; - align-items: center; - position: relative; - right: var(--inputs-border-width); -} - -.share-button__fallback button:hover { - color: rgba(var(--color-foreground), 0.75); -} - -.share-button__fallback button:hover .svg-wrapper { - transform: scale(1.07); -} - -.share-button__close:not(.hidden) + .share-button__copy { - display: none; -} - -.share-button__close, -.share-button__copy { - background-color: transparent; - color: rgb(var(--color-foreground)); -} - -.share-button__copy:focus-visible, -.share-button__close:focus-visible { - background-color: rgb(var(--color-background)); - z-index: 2; -} - -.share-button__copy:focus, -.share-button__close:focus { - background-color: rgb(var(--color-background)); - 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) { - background-color: inherit; -} - -.share-button__fallback .field:after, -.share-button__fallback .field:before { - content: none; -} - -.share-button__fallback .field { - border-radius: 0; - min-width: auto; - min-height: auto; - transition: none; -} - -.share-button__fallback .field__input:focus, -.share-button__fallback .field__input:-webkit-autofill { - outline: 0.2rem solid rgba(var(--color-foreground), 0.5); - outline-offset: 0.1rem; - box-shadow: 0 0 0 0.1rem rgb(var(--color-background)), 0 0 0.5rem 0.4rem rgba(var(--color-foreground), 0.3); -} - -.share-button__fallback .field__input { - box-shadow: none; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - filter: none; - min-width: auto; - min-height: auto; -} - -.share-button__fallback .field__input:hover { - box-shadow: none; -} - -.share-button__fallback .icon { - width: 1.5rem; - height: 1.5rem; -} - -.share-button__message:not(:empty) { - display: flex; - align-items: center; - width: 100%; - height: 100%; - margin-top: 0; - padding: 0.8rem 0 0.8rem 1.5rem; - margin: var(--inputs-border-width); -} - -.share-button__message:not(:empty):not(.hidden) ~ * { - display: none; -} - -/* component-form */ -.field__input, -.select__select, -.customer .field input, -.customer select { - -webkit-appearance: none; - appearance: none; - background-color: rgb(var(--color-background)); - color: rgb(var(--color-foreground)); - font-family: var(--font-body-family); - font-style: var(--font-body-style); - font-weight: var(--font-body-weight); - font-size: 1.6rem; - width: 100%; - box-sizing: border-box; - transition: box-shadow var(--duration-short) ease; - border-radius: var(--inputs-radius); - height: 4.5rem; - min-height: calc(var(--inputs-border-width) * 2); - min-width: calc(7rem + (var(--inputs-border-width) * 2)); - position: relative; - border: 0; -} - -.field:before, -.select:before, -.customer .field:before, -.customer select:before, -.localization-form__select:before { - pointer-events: none; - content: ''; - position: absolute; - top: 0; - right: 0; - 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)); - z-index: -1; -} - -.field:after, -.select:after, -.customer .field:after, -.customer select:after, -.localization-form__select:after { - pointer-events: none; - content: ''; - position: absolute; - top: var(--inputs-border-width); - right: var(--inputs-border-width); - bottom: var(--inputs-border-width); - left: var(--inputs-border-width); - border: 0.1rem solid transparent; - border-radius: var(--inputs-radius); - box-shadow: 0 0 0 var(--inputs-border-width) rgba(var(--color-foreground), var(--inputs-border-opacity)); - transition: box-shadow var(--duration-short) ease; - z-index: 1; -} - -.select__select { - font-family: var(--font-body-family); - font-style: var(--font-body-style); - font-weight: var(--font-body-weight); - font-size: 1.2rem; - color: rgba(var(--color-foreground), 0.75); -} - -.field:hover.field:after, -.select:hover.select:after, -.select__select:hover.select__select:after, -.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)); - outline: 0; - border-radius: var(--inputs-radius); -} - -.field__input:focus-visible, -.select__select:focus-visible, -.customer .field input:focus-visible, -.customer select:focus-visible, -.localization-form__select:focus-visible.localization-form__select:after { - box-shadow: 0 0 0 calc(0.1rem + var(--inputs-border-width)) rgba(var(--color-foreground)); - outline: 0; - border-radius: var(--inputs-radius); -} - -.field__input:focus, -.select__select:focus, -.customer .field input:focus, -.customer select:focus, -.localization-form__select:focus.localization-form__select:after { - box-shadow: 0 0 0 calc(0.1rem + var(--inputs-border-width)) rgba(var(--color-foreground)); - outline: 0; - border-radius: var(--inputs-radius); -} - -.localization-form__select:focus { - outline: 0; - box-shadow: none; -} - -.text-area, -.select { - display: flex; - position: relative; - width: 100%; -} - -/* Select */ - -.select .svg-wrapper, -.customer select + .svg-wrapper { - height: 0.6rem; - width: 1rem; - pointer-events: none; - position: absolute; - top: calc(50% - 0.2rem); - right: 0; -} - -.select__select, -.customer select { - cursor: pointer; - line-height: calc(1 + 0.6 / var(--font-body-scale)); - padding: 0 calc(var(--inputs-border-width) + 3rem) 0 2rem; - margin: var(--inputs-border-width); - min-height: calc(var(--inputs-border-width) * 2); -} - -/* Field */ - -.field { - position: relative; - width: 100%; - display: flex; - transition: box-shadow var(--duration-short) ease; -} - -.customer .field { - display: flex; -} - -.field--with-error { - flex-wrap: wrap; -} - -.field__input, -.customer .field input { - flex-grow: 1; - text-align: left; - padding: 1.5rem; - margin: var(--inputs-border-width); - transition: box-shadow var(--duration-short) ease; -} - -.field__label, -.customer .field label { - font-size: 1.6rem; - left: calc(var(--inputs-border-width) + 2rem); - top: calc(1rem + var(--inputs-border-width)); - margin-bottom: 0; - pointer-events: none; - position: absolute; - transition: top var(--duration-short) ease, font-size var(--duration-short) ease; - color: rgba(var(--color-foreground), 0.75); - letter-spacing: 0.1rem; - 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 { - font-size: 1rem; - top: calc(var(--inputs-border-width) + 0.5rem); - left: calc(var(--inputs-border-width) + 2rem); - letter-spacing: 0.04rem; -} - -.field__input:focus, -.field__input:not(:placeholder-shown), -.field__input:-webkit-autofill, -.customer .field input:focus, -.customer .field input:not(:placeholder-shown), -.customer .field input:-webkit-autofill { - padding: 2.2rem 1.5rem 0.8rem 2rem; - margin: var(--inputs-border-width); -} - -.field__input::-webkit-search-cancel-button, -.customer .field input::-webkit-search-cancel-button { - display: none; -} - -.field__input::placeholder, -.customer .field input::placeholder { - opacity: 0; -} - -.field__button { - align-items: center; - background-color: transparent; - border: 0; - color: currentColor; - cursor: pointer; - display: flex; - height: 4.4rem; - justify-content: center; - overflow: hidden; - padding: 0; - position: absolute; - right: 0; - top: 0; - width: 4.4rem; -} - -.field__button > .svg-wrapper { - height: 2.5rem; - width: 2.5rem; -} - -.field__input:-webkit-autofill ~ .field__button, -.field__input:-webkit-autofill ~ .field__label, -.customer .field input:-webkit-autofill ~ label { - color: rgb(0, 0, 0); -} - -/* Text area */ - -.text-area { - font-family: var(--font-body-family); - font-style: var(--font-body-style); - font-weight: var(--font-body-weight); - min-height: 10rem; - resize: none; -} - -input[type='checkbox'] { - display: inline-block; - width: auto; - margin-right: 0.5rem; -} - -/* Form global */ - -.form__label { - display: block; - margin-bottom: 0.6rem; -} - -.form__message { - align-items: center; - display: flex; - font-size: 1.4rem; - line-height: 1; - margin-top: 1rem; -} - -.form__message--large { - font-size: 1.6rem; -} - -.customer .field .form__message { - font-size: 1.4rem; - text-align: left; -} - -.form__message .icon, -.customer .form__message .svg-wrapper { - flex-shrink: 0; - height: 1.3rem; - margin-right: 0.5rem; - width: 1.3rem; -} - -.form__message--large .icon, -.customer .form__message .svg-wrapper { - height: 1.5rem; - width: 1.5rem; - margin-right: 1rem; -} - -.customer .field .form__message .svg-wrapper { - align-self: start; -} - -.form-status { - margin: 0; - font-size: 1.6rem; -} - -.form-status-list { - padding: 0; - margin: 2rem 0 4rem; -} - -.form-status-list li { - list-style-position: inside; -} - -.form-status-list .link::first-letter { - text-transform: capitalize; -} - -/* component-quantity */ -.quantity { - color: rgba(var(--color-foreground)); - position: relative; - width: calc(14rem / var(--font-body-scale) + var(--inputs-border-width) * 2); - display: flex; - border-radius: var(--inputs-radius); - min-height: calc((var(--inputs-border-width) * 2) + 4.5rem); -} - -.quantity:after { - pointer-events: none; - content: ''; - position: absolute; - top: var(--inputs-border-width); - right: var(--inputs-border-width); - bottom: var(--inputs-border-width); - left: var(--inputs-border-width); - border: 0.1rem solid transparent; - border-radius: var(--inputs-radius); - box-shadow: 0 0 0 var(--inputs-border-width) rgba(var(--color-foreground), var(--inputs-border-opacity)); - transition: box-shadow var(--duration-short) ease; - z-index: 1; -} - -.quantity:before { - background: rgb(var(--color-background)); - pointer-events: none; - content: ''; - position: absolute; - top: 0; - right: 0; - 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)); - z-index: -1; -} - -.quantity__input { - color: currentColor; - font-family: var(--font-body-family); - font-style: var(--font-body-style); - font-weight: var(--font-body-weight); - font-size: 1.6rem; - font-weight: 500; - opacity: 0.85; - text-align: center; - background-color: transparent; - border: 0; - padding: 0 0.5rem; - width: 100%; - flex-grow: 1; - -webkit-appearance: none; - appearance: none; -} - -.quantity__button { - width: calc(4.5rem / var(--font-body-scale)); - flex-shrink: 0; - font-size: 1.8rem; - border: 0; - background-color: transparent; - cursor: pointer; - display: flex; - align-items: center; - justify-content: center; - color: rgb(var(--color-foreground)); - padding: 0; -} - -.quantity__button:first-child { - margin-left: calc(var(--inputs-border-width)); -} - -.quantity__button:last-child { - margin-right: calc(var(--inputs-border-width)); -} - -.quantity__button .svg-wrapper { - width: 1rem; - pointer-events: none; -} - -.quantity__button:focus-visible, -.quantity__input:focus-visible { - background-color: rgb(var(--color-background)); - z-index: 2; -} - -.quantity__button:focus, -.quantity__input:focus { - background-color: rgb(var(--color-background)); - z-index: 2; -} - -.quantity__button:not(:focus-visible):not(.focused), -.quantity__input:not(:focus-visible):not(.focused) { - box-shadow: inherit; - background-color: inherit; -} - -.quantity__input:-webkit-autofill, -.quantity__input:-webkit-autofill:hover, -.quantity__input:-webkit-autofill:active { - box-shadow: 0 0 0 10rem rgb(var(--color-background)) inset !important; - -webkit-box-shadow: 0 0 0 10rem rgb(var(--color-background)) inset !important; -} - -.quantity__input::-webkit-outer-spin-button, -.quantity__input::-webkit-inner-spin-button { - -webkit-appearance: none; - margin: 0; -} - -.quantity__input[type='number'] { - -moz-appearance: textfield; -} - -.quantity__rules { - margin-top: 0.5rem; - position: relative; - font-size: 1.2rem; -} - -.quantity__rules .caption { - display: inline-block; - margin-top: 0; - margin-bottom: 0; -} - -.quantity__rules .divider + .divider::before { - content: '\2022'; - margin: 0 0.5rem; -} - -.quantity__rules-cart { - position: relative; -} - -.product__info-container .loading__spinner:not(.hidden) ~ *, -.quantity__rules-cart .loading__spinner:not(.hidden) ~ * { - visibility: hidden; -} - -/* component-modal */ -.modal__toggle { - list-style-type: none; -} - -.modal__toggle-close { - display: none; -} - -.modal__toggle-open { - display: flex; -} - -.modal__close-button.link { - display: flex; - justify-content: center; - align-items: center; - padding: 0rem; - height: 4.4rem; - width: 4.4rem; - background-color: transparent; -} - -.modal__close-button .icon { - width: 1.7rem; - height: 1.7rem; -} - -.modal__content { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background: rgb(var(--color-background)); - z-index: 4; - display: flex; - justify-content: center; - align-items: center; -} - -.media-modal { - cursor: zoom-out; -} - -.media-modal .deferred-media { - cursor: initial; -} - -/* component-cart-count-bubble */ -.cart-count-bubble:empty { - display: none; -} - -.cart-count-bubble { - position: absolute; - background-color: rgb(var(--color-button)); - color: rgb(var(--color-button-text)); - height: 1.7rem; - width: 1.7rem; - border-radius: 100%; - display: flex; - justify-content: center; - align-items: center; - font-size: 0.9rem; - bottom: 0.8rem; - left: 2.2rem; - line-height: calc(1 + 0.1 / var(--font-body-scale)); -} - -/* utility-bar */ -.utility-bar { - height: 100%; -} - -.utility-bar--bottom-border { - border-bottom: 0.1rem solid rgba(var(--color-foreground), 0.08); -} - -@media screen and (min-width: 990px) { - .utility-bar--bottom-border-social-only { - border-bottom: 0.1rem solid rgba(var(--color-foreground), 0.08); - } -} - -.utility-bar__grid { - display: grid; - grid-template-columns: 1fr; - grid-template-areas: 'announcements'; -} - -.utility-bar__grid .list-social { - justify-content: flex-start; - align-content: center; - margin-left: -1.2rem; - grid-area: social-icons; -} - -@media screen and (max-width: 989px) { - .utility-bar .utility-bar__grid .list-social { - display: none; - } -} - -.utility-bar .list-social__item .icon { - scale: 0.9; -} - -@media screen and (min-width: 990px) { - .utility-bar__grid--3-col { - grid-template-columns: 3fr 4fr 3fr; - grid-template-areas: 'social-icons announcements language-currency'; - } - - .utility-bar__grid--2-col { - grid-template-columns: 1fr 1fr; - grid-template-areas: 'social-icons language-currency'; - } - - .announcement-bar.announcement-bar--one-announcement, - .announcement-bar--one-announcement .announcement-bar__link { - width: fit-content; - margin: auto; - } -} - -.announcement-bar, -.announcement-bar__announcement { - color: rgb(var(--color-foreground)); - width: 100%; - height: 100%; - display: flex; - justify-content: center; - flex-wrap: wrap; - align-content: center; - grid-area: announcements; -} - -.announcement-bar .slider--everywhere { - margin-bottom: 0; - scroll-behavior: auto; -} - -.utility-bar__grid .announcement-bar-slider { - width: 100%; -} - -.utility-bar__grid .announcement-bar-slider { - width: 100%; -} - -.announcement-bar-slider, -.announcement-bar-slider .slider { - width: 100%; -} - -.announcement-bar .slider-button--next { - margin-right: -1.5rem; - min-width: 44px; -} - -.announcement-bar .slider-button--prev { - margin-left: -1.5rem; - min-width: 44px; -} - -.announcement-bar .slider-button--next:focus-visible, -.announcement-bar .slider-button--prev:focus-visible, -.utility-bar .list-social__link:focus-visible { - outline-offset: -0.3rem; - box-shadow: 0 0 0 -0.2rem rgb(var(--color-foreground)); -} - -.localization-wrapper { - grid-area: language-currency; - align-self: center; - display: flex; - justify-content: flex-end; -} - -.localization-wrapper .localization-selector + .disclosure__list-wrapper { - animation: animateMenuOpen var(--duration-default) ease; -} - -.utility-bar .localization-wrapper .disclosure .localization-form__select, -.utility-bar .localization-wrapper .disclosure__link { - font-size: calc(var(--font-heading-scale) * 1.3rem); -} - -@media screen and (min-width: 990px) { - body:has(.section-header .header:not(.drawer-menu)) .utility-bar .page-width { - padding-left: 5rem; - padding-right: 5rem; - } - - .announcement-bar-slider { - width: 60%; - } - - .announcement-bar .slider-button { - height: 3.8rem; - } -} - -.announcement-bar__link { - display: flex; - width: 100%; - text-decoration: none; - height: 100%; - justify-content: center; - align-items: center; -} - -.announcement-bar__link:hover { - text-decoration: underline; -} - -.announcement-bar__link .icon-arrow { - display: inline-block; - pointer-events: none; - margin-left: 0.8rem; - vertical-align: middle; - margin-bottom: 0.2rem; -} - -.announcement-bar__message { - text-align: center; - padding: 1rem 0; - margin: 0; - letter-spacing: 0.1rem; - min-height: 3.8rem; -} - -.announcement-bar-slider--fade-in-next .announcement-bar__message, -.announcement-bar-slider--fade-in-previous .announcement-bar__message, -.announcement-bar-slider--fade-out-next .announcement-bar__message, -.announcement-bar-slider--fade-out-previous .announcement-bar__message { - animation-duration: var(--duration-announcement-bar); - animation-timing-function: ease-in-out; - animation-fill-mode: forwards; -} - -.announcement-bar-slider--fade-in-next .announcement-bar__message { - --announcement-translate-from: -1.5rem; - /* Prevent flicker */ - opacity: 0; - animation-name: translateAnnouncementSlideIn; - animation-delay: var(--duration-announcement-bar); -} - -.announcement-bar-slider--fade-in-previous .announcement-bar__message { - --announcement-translate-from: 1.5rem; - /* Prevent flicker */ - opacity: 0; - animation-name: translateAnnouncementSlideIn; - animation-delay: var(--duration-announcement-bar); -} - -.announcement-bar-slider--fade-out-next .announcement-bar__message { - --announcement-translate-to: 1.5rem; - animation-name: translateAnnouncementSlideOut; -} - -.announcement-bar-slider--fade-out-previous .announcement-bar__message { - --announcement-translate-to: -1.5rem; - animation-name: translateAnnouncementSlideOut; -} - -@keyframes translateAnnouncementSlideIn { - 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)); - } -} - -/* section-header */ -.section-header.shopify-section-group-header-group { - z-index: 3; -} - -.shopify-section-header-sticky { - position: sticky; - top: 0; -} - -.shopify-section-header-hidden { - top: calc(-1 * var(--header-height)); -} - -.shopify-section-header-hidden.menu-open { - top: 0; -} - -.section-header.animate { - transition: top 0.15s ease-out; -} - -.shopify-section-group-header-group { - z-index: 4; -} - -.section-header ~ .shopify-section-group-header-group { - z-index: initial; -} - -/* Main Header Layout */ -.header-wrapper { - display: block; - position: relative; - background-color: rgb(var(--color-background)); -} - -.header-wrapper--border-bottom { - border-bottom: 0.1rem solid rgba(var(--color-foreground), 0.08); -} - -.header { - display: grid; - grid-template-areas: 'left-icons heading icons'; - grid-template-columns: 1fr 2fr 1fr; - align-items: center; -} - -@media screen and (max-width: 749px) { - .header--has-app { - grid-template-columns: auto 1fr auto; - } -} - -@media screen and (min-width: 990px) { - .header { - grid-template-columns: 1fr auto 1fr; - } - - .header--top-left, - .header--middle-left:not(.header--has-menu) { - grid-template-areas: - 'heading icons' - 'navigation navigation'; - grid-template-columns: 1fr auto; - } - - .header--top-left.drawer-menu, - .header--middle-left.drawer-menu { - grid-template-areas: 'navigation heading icons'; - grid-template-columns: auto 1fr auto; - column-gap: 1rem; - } - - .header--middle-left { - grid-template-areas: 'heading navigation icons'; - grid-template-columns: auto auto 1fr; - column-gap: 2rem; - } - - .header--middle-center:not(.drawer-menu) { - grid-template-areas: 'navigation heading icons'; - grid-template-columns: 1fr auto 1fr; - column-gap: 2rem; - } - - .header--middle-center a.header__heading-link { - text-align: center; - } - - .header--top-center { - grid-template-areas: - 'left-icons heading icons' - 'navigation navigation navigation'; - } - - .header--top-center.drawer-menu { - grid-template-areas: 'left-icons heading icons'; - grid-template-columns: 1fr auto 1fr; - } - - .header:not(.header--middle-left, .header--middle-center) .header__inline-menu { - margin-top: 1.05rem; - } -} - -.header *[tabindex='-1']:focus { - outline: none; -} - -.header__heading { - margin: 0; - line-height: 0; -} - -.header > .header__heading-link { - line-height: 0; -} - -.header__heading, -.header__heading-link { - grid-area: heading; - justify-self: center; -} - -.header__heading-link { - display: inline-block; - padding: 0.75rem; - text-decoration: none; - word-break: break-word; -} - -.header__heading-link:hover .h2 { - color: rgb(var(--color-foreground)); -} - -.header__heading-link .h2 { - line-height: 1; - color: rgba(var(--color-foreground), 0.75); -} - -.header__heading-logo { - height: auto; - max-width: 100%; -} - -.header__heading-logo-wrapper { - width: 100%; - display: inline-block; - transition: width 0.3s cubic-bezier(0.52, 0, 0.61, 0.99); -} - -@media screen and (max-width: 989px) { - .header__heading, - .header__heading-link { - text-align: center; - } - - .header--mobile-left .header__heading, - .header--mobile-left .header__heading-link { - text-align: left; - justify-self: start; - } - - .header--mobile-left { - grid-template-columns: auto 2fr 1fr; - } -} - -@media screen and (min-width: 990px) { - .header--middle-left .header__heading-link, - .header--top-left .header__heading-link { - margin-left: -0.75rem; - } - - .header__heading, - .header__heading-link { - justify-self: start; - } - - .header--middle-center .header__heading-link, - .header--middle-center .header__heading { - justify-self: center; - text-align: center; - } - - .header--top-center .header__heading-link, - .header--top-center .header__heading { - justify-self: center; - text-align: center; - } -} - -/* Header icons */ -.header__icons { - display: flex; - grid-area: icons; - justify-self: end; - padding-right: 0.8rem; -} - -.header__icons .shopify-app-block { - max-width: 4.4rem; - max-height: 4.4rem; - overflow: hidden; -} - -.header__icon:not(.header__icon--summary), -.header__icon span { - display: flex; - align-items: center; - justify-content: center; -} - -.header__icon { - color: rgb(var(--color-foreground)); -} - -.header__icon span { - height: 100%; -} - -.header__icon .svg-wrapper { - width: 44px; - height: 44px; -} - -.header__icon::after { - content: none; -} - -.header__icon:hover .icon, -.modal__close-button:hover .icon { - transform: scale(1.07); -} - -.header__icon .icon { - height: 2rem; - width: 2rem; - fill: none; - vertical-align: middle; -} - -.header__icon, -.header__icon--cart .icon { - height: 4.4rem; - width: 4.4rem; - padding: 0; -} - -.header__icon--cart { - position: relative; - margin-right: -1.2rem; -} - -.header__icon--menu[aria-expanded='true']::before { - content: ''; - top: 100%; - left: 0; - height: calc(var(--viewport-height, 100vh) - (var(--header-bottom-position, 100%))); - width: 100%; - display: block; - position: absolute; - background: rgba(var(--color-foreground), 0.5); -} - -.header__icon--account shop-user-avatar { - --shop-avatar-size: 2.8rem; -} - -details .header__icon-close { - display: none; -} - -details[open] .header__icon-close { - display: inline-block; -} - -account-icon { - display: flex; -} - -/* Search */ -menu-drawer + .header__search { - display: none; -} - -.header > .header__search { - grid-area: left-icons; - justify-self: start; -} - -.header--top-center.drawer-menu > .header__search { - margin-left: 3.2rem; -} - -.header--top-center header-drawer { - grid-area: left-icons; -} - -.header:not(.header--has-menu) * > .header__search { - display: none; -} - -.header__search { - display: inline-flex; - line-height: 0; -} - -.header--top-center > .header__search { - display: none; -} - -.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 { - display: inline-flex; - } - - .header:not(.header--top-center) > .header__search, - .header--top-center * > .header__search { - display: none; - } -} - -details[open] > .search-modal { - opacity: 1; - animation: animateMenuOpen var(--duration-default) ease; -} - -details[open] .modal-overlay { - display: block; -} - -details[open] .modal-overlay::after { - position: absolute; - content: ''; - background-color: rgb(var(--color-foreground), 0.5); - top: 100%; - left: 0; - right: 0; - height: 100vh; -} - -.search-modal { - opacity: 0; - border-bottom: 0.1rem solid rgba(var(--color-foreground), 0.08); - min-height: calc(100% + var(--inputs-margin-offset) + (2 * var(--inputs-border-width))); - height: 100%; -} - -.search-modal__content { - display: flex; - align-items: center; - justify-content: center; - width: 100%; - height: 100%; - padding: 0 5rem 0 1rem; - line-height: calc(1 + 0.8 / var(--font-body-scale)); - position: relative; -} - -.search-modal__content-bottom { - bottom: calc((var(--inputs-margin-offset) / 2)); -} - -.search-modal__content-top { - top: calc((var(--inputs-margin-offset) / 2)); -} - -.search-modal__form { - width: 100%; -} - -.search-modal__close-button { - position: absolute; - right: 0.3rem; -} - -@media screen and (min-width: 750px) { - .search-modal__close-button { - right: 1rem; - } - - .search-modal__content { - padding: 0 6rem; - } -} - -@media screen and (min-width: 990px) { - .search-modal__form { - max-width: 74.2rem; - } - - .search-modal__close-button { - position: initial; - margin-left: 0.5rem; - } -} - -/* Header menu drawer */ -.header__icon--menu .icon { - display: block; - position: absolute; - opacity: 1; - transform: scale(1); - transition: transform 150ms ease, opacity 150ms ease; -} - -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 { - visibility: hidden; -} - -.js details[open]:not(.menu-opening) > .header__icon--menu .icon-hamburger { - visibility: visible; - opacity: 1; - transform: scale(1.07); -} - -.js details > .header__submenu { - opacity: 0; - transform: translateY(-1.5rem); -} - -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 { - opacity: 1; - transform: translateY(0); - } -} - -/* Header menu */ -.header__inline-menu { - margin-left: -1.2rem; - grid-area: navigation; - display: none; -} - -.header--top-center .header__inline-menu, -.header--top-center .header__heading-link { - margin-left: 0; -} - -@media screen and (min-width: 990px) { - .header__inline-menu { - display: block; - } - - .header--top-center .header__inline-menu { - justify-self: center; - } - - .header--top-center .header__inline-menu > .list-menu--inline { - justify-content: center; - } - - .header--middle-left .header__inline-menu { - margin-left: 0; - } -} - -.header__menu { - padding: 0 1rem; -} - -.header__menu-item { - padding: 1.2rem; - text-decoration: none; - color: rgba(var(--color-foreground), 0.75); -} - -.header__menu-item:hover { - color: rgb(var(--color-foreground)); -} - -.header__menu-item span { - transition: text-decoration var(--duration-short) ease; -} - -.header__menu-item:hover span { - text-decoration: underline; - text-underline-offset: 0.3rem; -} - -details[open] > .header__menu-item { - text-decoration: underline; -} - -details[open]:hover > .header__menu-item { - text-decoration-thickness: 0.2rem; -} - -details[open] > .header__menu-item .icon-caret { - transform: rotate(180deg); -} - -.header__active-menu-item { - transition: text-decoration-thickness var(--duration-short) ease; - color: rgb(var(--color-foreground)); - text-decoration: underline; - text-underline-offset: 0.3rem; -} - -.header__menu-item:hover .header__active-menu-item { - text-decoration-thickness: 0.2rem; -} - -.header__submenu { - transition: opacity var(--duration-default) ease, transform var(--duration-default) ease; -} - -.global-settings-popup, -.header__submenu.global-settings-popup { - border-radius: var(--popup-corner-radius); - 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)); - z-index: -1; -} - -.header__submenu.list-menu { - padding: 1rem 0; -} - -.header__submenu .header__submenu { - background-color: rgba(var(--color-foreground), 0.03); - padding: 1rem 0; - margin: 1rem 0; -} - -.header__submenu .header__menu-item:after { - right: 2rem; -} - -.header__submenu .header__menu-item { - justify-content: space-between; - padding: 0.8rem 2rem; -} - -.header__submenu .header__menu-item:hover { - text-decoration-line: underline; -} - -.header__menu-item .icon-caret { - right: 0.8rem; -} - -.header__submenu .icon-caret { - flex-shrink: 0; - margin-left: 1rem; - position: static; -} - -header-menu > details, -details-disclosure > details { - position: relative; -} - -@keyframes animateMenuOpen { - 0% { - opacity: 0; - transform: translateY(-1.5rem); - } - - 100% { - opacity: 1; - transform: translateY(0); - } -} - -.overflow-hidden-mobile, -.overflow-hidden-tablet, -.overflow-hidden-desktop { - overflow: hidden; -} - -@media screen and (min-width: 750px) { - .overflow-hidden-mobile { - overflow: auto; - } -} - -@media screen and (min-width: 990px) { - .overflow-hidden-tablet { - overflow: auto; - } -} - -.badge { - border: 1px solid transparent; - border-radius: var(--badge-corner-radius); - display: inline-block; - font-size: 1.2rem; - letter-spacing: 0.1rem; - line-height: 1; - padding: 0.5rem 1.3rem 0.6rem 1.3rem; - text-align: center; - background-color: rgb(var(--color-badge-background)); - border-color: rgba(var(--color-badge-border), var(--alpha-badge-border)); - color: rgb(var(--color-badge-foreground)); - word-break: break-word; -} - -.gradient { - background: rgb(var(--color-background)); - background: var(--gradient-background); - background-attachment: fixed; -} - -@media screen and (forced-colors: active) { - .icon { - color: CanvasText; - fill: CanvasText !important; - } - - .icon-close-small path { - stroke: CanvasText; - } -} - -.ratio { - display: flex; - position: relative; - align-items: stretch; -} - -.ratio::before { - content: ''; - width: 0; - height: 0; - padding-bottom: var(--ratio-percent); -} - -.content-container { - border-radius: var(--text-boxes-radius); - border: var(--text-boxes-border-width) solid rgba(var(--color-foreground), var(--text-boxes-border-opacity)); - position: relative; -} - -.content-container:after { - content: ''; - position: absolute; - top: calc(var(--text-boxes-border-width) * -1); - right: calc(var(--text-boxes-border-width) * -1); - 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)); - z-index: -1; -} - -.content-container--full-width:after { - left: 0; - right: 0; - border-radius: 0; -} - -@media screen and (max-width: 749px) { - .content-container--full-width-mobile { - border-left: none; - border-right: none; - border-radius: 0; - } - .content-container--full-width-mobile:after { - display: none; - } -} - -.global-media-settings { - position: relative; - border: var(--media-border-width) solid rgba(var(--color-foreground), var(--media-border-opacity)); - border-radius: var(--media-radius); - overflow: visible !important; - background-color: rgb(var(--color-background)); -} - -.global-media-settings:after { - content: ''; - position: absolute; - top: calc(var(--media-border-width) * -1); - right: calc(var(--media-border-width) * -1); - 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)); - z-index: -1; - pointer-events: none; -} - -.global-media-settings--no-shadow { - overflow: hidden !important; -} - -.global-media-settings--no-shadow:after { - content: none; -} - -.global-media-settings img, -.global-media-settings iframe, -.global-media-settings model-viewer, -.global-media-settings video, -.global-media-settings .placeholder-svg { - border-radius: calc(var(--media-radius) - var(--media-border-width)); -} - -.content-container--full-width, -.global-media-settings--full-width, -.global-media-settings--full-width img, -.global-media-settings--full-width video, -.global-media-settings--full-width iframe, -.global-media-settings--full-width .placeholder-svg { - border-radius: 0; - border-left: none; - border-right: none; -} - -/* check for flexbox gap in older Safari versions */ -@supports not (inset: 10px) { - .grid { - margin-left: calc(-1 * var(--grid-mobile-horizontal-spacing)); - } - - .grid__item { - padding-left: var(--grid-mobile-horizontal-spacing); - padding-bottom: var(--grid-mobile-vertical-spacing); - } - - @media screen and (min-width: 750px) { - .grid { - margin-left: calc(-1 * var(--grid-desktop-horizontal-spacing)); - } - - .grid__item { - padding-left: var(--grid-desktop-horizontal-spacing); - padding-bottom: var(--grid-desktop-vertical-spacing); - } - } - - .grid--gapless .grid__item { - padding-left: 0; - padding-bottom: 0; - } - - @media screen and (min-width: 749px) { - .grid--peek .grid__item { - padding-left: var(--grid-mobile-horizontal-spacing); - } - } - - .product-grid .grid__item { - padding-bottom: var(--grid-mobile-vertical-spacing); - } - - @media screen and (min-width: 750px) { - .product-grid .grid__item { - padding-bottom: var(--grid-desktop-vertical-spacing); - } - } -} - -.font-body-bold { - font-weight: var(--font-body-weight-bold); -} - -/* outline and border styling for Windows High Contrast Mode */ -@media (forced-colors: active) { - .button, - .shopify-challenge__button, - .customer button { - border: transparent solid 1px; - } - - .button:focus-visible, - .button:focus, - .button.focused, - .shopify-payment-button__button--unbranded:focus-visible, - .shopify-payment-button [role='button']:focus-visible, - .shopify-payment-button__button--unbranded:focus, - .shopify-payment-button [role='button']:focus { - outline: solid transparent 1px; - } - - .field__input:focus, - .select__select:focus, - .customer .field input:focus, - .customer select:focus, - .localization-form__select:focus.localization-form__select:after { - outline: transparent solid 1px; - } - - .localization-form__select:focus { - outline: transparent solid 1px; - } -} - -.rte:after { - clear: both; - content: ''; - display: block; -} - -.rte > *:first-child { - margin-top: 0; -} - -.rte > *:last-child { - margin-bottom: 0; -} - -.rte table { - table-layout: fixed; -} - -@media screen and (min-width: 750px) { - .rte table td { - padding-left: 1.2rem; - padding-right: 1.2rem; - } -} - -.rte img { - height: auto; - 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)); - margin-bottom: var(--media-shadow-vertical-offset); -} - -.rte ul, -.rte ol { - list-style-position: inside; - padding-left: 2rem; -} - -.rte li { - list-style: inherit; -} - -.rte li:last-child { - margin-bottom: 0; -} - -.rte a { - color: rgba(var(--color-link), var(--alpha-link)); - text-underline-offset: 0.3rem; - text-decoration-thickness: 0.1rem; - transition: text-decoration-thickness var(--duration-short) ease; -} - -.rte a:hover { - color: rgb(var(--color-link)); - text-decoration-thickness: 0.2rem; -} - -.rte blockquote { - display: inline-flex; -} - -.rte blockquote > * { - margin: -0.5rem 0 -0.5rem 0; -} - -/* Image mask global styles */ - -.shape--mask { - display: block; - height: 0; - width: 0; -} - -.shape--arch { - clip-path: url('#Shape-Arch'); -} - -.shape--blob { - clip-path: polygon(var(--shape--blob-1)); -} - -.shape--chevronleft { - clip-path: polygon(100% 0%, 85% 50%, 100% 100%, 15% 100%, 0% 50%, 15% 0%); -} - -.shape--chevronright { - clip-path: polygon(85% 0%, 100% 50%, 85% 100%, 0% 100%, 15% 50%, 0% 0%); -} - -.shape--circle { - clip-path: circle(closest-side); -} - -.shape--diamond { - clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); -} - -.shape--parallelogram { - clip-path: polygon(15% 0, 100% 0%, 85% 100%, 0% 100%); -} - -.shape--round { - clip-path: ellipse(45% 45% at 50% 50%); -} - -/* Fixed background */ -.animate--fixed { - clip-path: inset(0); -} - -.animate--fixed > img:not(.zoom):not(.deferred-media__poster-button), -.animate--fixed > svg:not(.zoom):not(.deferred-media__poster-button) { - position: fixed; - height: 100vh; -} - -/* Zoom in image on scroll */ -.animate--zoom-in { - --zoom-in-ratio: 1; -} - -.animate--zoom-in > img, -.animate--zoom-in > .svg-wrapper { - transition: scale var(--duration-short) linear; - scale: var(--zoom-in-ratio); -} - -/* Animations */ - -@media (prefers-reduced-motion: no-preference) { - .animate--ambient > img, - .animate--ambient > .svg-wrapper { - animation: animateAmbient 30s linear infinite; - } - - @keyframes animateAmbient { - 0% { - transform: rotate(0deg) translateX(1em) rotate(0deg) scale(1.2); - } - 100% { - transform: rotate(360deg) translateX(1em) rotate(-360deg) scale(1.2); - } - } - - .scroll-trigger.animate--fade-in, - .scroll-trigger.animate--slide-in { - opacity: 0.01; - } - - .scroll-trigger.animate--slide-in { - transform: translateY(2rem); - } - - .scroll-trigger:not(.scroll-trigger--offscreen).animate--fade-in { - opacity: 1; - animation: var(--animation-fade-in); - } - - .scroll-trigger:not(.scroll-trigger--offscreen).animate--slide-in { - animation: var(--animation-slide-in); - animation-delay: calc(var(--animation-order) * 75ms); - } - - .scroll-trigger.scroll-trigger--design-mode.animate--fade-in, - .scroll-trigger.scroll-trigger--design-mode.animate--slide-in, - .scroll-trigger.scroll-trigger--design-mode .slider, - .scroll-trigger:not(.scroll-trigger--offscreen).scroll-trigger--cancel { - opacity: 1; - animation: none; - transition: none; - transform: none; - } - - .scroll-trigger.scroll-trigger--design-mode.animate--slide-in { - transform: translateY(0); - } - - @keyframes slideIn { - from { - transform: translateY(2rem); - opacity: 0.01; - } - to { - transform: translateY(0); - opacity: 1; - } - } - - @keyframes fadeIn { - from { - opacity: 0.01; - } - to { - opacity: 1; - } - } -} - -/* 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), - .animate--hover-3d-lift .shopify-challenge__button, - .animate--hover-3d-lift .customer button, - .animate--hover-3d-lift .shopify-payment-button__button, - .animate--hover-3d-lift .deferred-media .deferred-media__poster-button { - transition: transform var(--duration-long) ease, box-shadow var(--duration-long) ease; - transform-origin: center; - } - - .animate--hover-3d-lift .card-wrapper:hover .card--card, - .animate--hover-3d-lift .card-wrapper:hover .card--standard .card__inner, - .animate--hover-3d-lift .button:not(.button--tertiary):not([disabled]):hover, - .animate--hover-3d-lift .shopify-challenge__button:not([disabled]):hover, - .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. */ - 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. */ - } - - .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. */ - } - - .animate--hover-3d-lift .product-grid .grid__item:hover, - .animate--hover-3d-lift .collection-list .grid__item:hover, - .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. */ - } - - .animate--hover-3d-lift .product-grid { - 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 { - box-shadow: none; - transition: transform var(--duration-long) ease, filter var(--duration-long) ease; - } - - .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. */ - 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 { - background-image: var(--easter-egg); - background-size: 250px 250px; - mix-blend-mode: color-dodge; - pointer-events: none; - z-index: 2; - } - - .animate--hover-3d-lift - .card-wrapper:hover - .card--shape.card--standard:not(.card--text) - .card__inner - .card__media:before { - content: ''; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - } - - .animate--hover-3d-lift .card-wrapper .card--card:before, - .animate--hover-3d-lift .card-wrapper .card--standard .card__media:after { - content: ''; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - opacity: 0; - pointer-events: none; - transition: background-position calc(2 * var(--duration-extended)) ease, opacity var(--duration-default) ease; - mix-blend-mode: overlay; - 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% - ); - } - - .animate--hover-3d-lift .card-wrapper:hover .card--card:before, - .animate--hover-3d-lift .card-wrapper:hover .card--standard .card__media:after { - opacity: 0.2; - transition: background-position 6s ease, opacity var(--duration-long) ease; - background-position: left; - z-index: 2; - } - - :root { - --easter-egg: none; - --sparkle: url('./sparkle.gif'); - } - - .animate--hover-vertical-lift .button:not(.button--tertiary), - .animate--hover-vertical-lift .shopify-challenge__button, - .animate--hover-vertical-lift .customer button, - .animate--hover-vertical-lift .shopify-payment-button__button { - transition: transform var(--duration-default) var(--ease-out-slow); - } - - .animate--hover-vertical-lift .card-wrapper .card--card, - .animate--hover-vertical-lift .card-wrapper .card--standard .card__inner { - transition: transform var(--duration-medium) var(--ease-out-slow); - } - - .animate--hover-vertical-lift .card-wrapper:hover .card--card, - .animate--hover-vertical-lift .card-wrapper:hover .card--standard .card__inner { - transform: translateY(-0.75rem); - } - - .animate--hover-vertical-lift .card-wrapper:active .card--card, - .animate--hover-vertical-lift .card-wrapper:active .card--standard .card__inner { - transform: translateY(-0.5rem); - } - - .animate--hover-vertical-lift .button:not(.button--tertiary):not([disabled]):hover, - .animate--hover-vertical-lift .shopify-challenge__button:not([disabled]):hover, - .animate--hover-vertical-lift .customer button:not([disabled]):hover, - .animate--hover-vertical-lift .shopify-payment-button__button:hover { - transform: translateY(-0.25rem); - } - - .animate--hover-vertical-lift .button:not(.button--tertiary):not([disabled]):active, - .animate--hover-vertical-lift .shopify-challenge__button:not([disabled]):active, - .animate--hover-vertical-lift .customer button:not([disabled]):active, - .animate--hover-vertical-lift .shopify-payment-button__button:active { - transform: translateY(0); - } - - .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)), - 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. */ - } -} - -/* Loading spinner */ -.loading__spinner { - position: absolute; - z-index: 1; - width: 1.8rem; -} - -.loading__spinner { - width: 1.8rem; - display: inline-block; -} - -.spinner { - animation: rotator 1.4s linear infinite; -} - -@keyframes rotator { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(270deg); - } -} - -.path { - stroke-dasharray: 280; - stroke-dashoffset: 0; - transform-origin: center; - stroke: rgb(var(--color-foreground)); - animation: dash 1.4s ease-in-out infinite; -} - -@media screen and (forced-colors: active) { - .path { - stroke: CanvasText; - } -} - -@keyframes dash { - 0% { - stroke-dashoffset: 280; - } - 50% { - stroke-dashoffset: 75; - transform: rotate(135deg); - } - 100% { - stroke-dashoffset: 280; - transform: rotate(450deg); - } -} - -.loading__spinner:not(.hidden) + .cart-item__price-wrapper, -.loading__spinner:not(.hidden) ~ cart-remove-button { - opacity: 50%; -} - -.loading__spinner:not(.hidden) ~ cart-remove-button { - pointer-events: none; - cursor: default; -} - -/* Progress bar */ -.progress-bar-container { - width: 100%; - margin: auto; -} - -.progress-bar { - height: 0.13rem; - width: 100%; -} - -.progress-bar-value { - width: 100%; - height: 100%; - background-color: rgb(var(--color-foreground)); - animation: indeterminateAnimation var(--duration-extra-longer) infinite ease-in-out; - transform-origin: 0; -} - -.progress-bar .progress-bar-value { - display: block; -} - -@keyframes indeterminateAnimation { - 0% { - transform: translateX(-20%) scaleX(0); - } - 40% { - transform: translateX(30%) scaleX(0.7); - } - 100% { - transform: translateX(100%) scaleX(0); - } -} diff --git a/assets/buttons-with-icon-list.js b/assets/buttons-with-icon-list.js new file mode 100644 index 00000000000..d557c0c3dfa --- /dev/null +++ b/assets/buttons-with-icon-list.js @@ -0,0 +1,108 @@ +if (!customElements.get('button-list')) { + class CollectionList extends HTMLElement { + constructor() { + super(); + } + + connectedCallback() { + this.selectors = { + sliderWrapper: '.button-list__items', + nextEl: '.swiper-button-next', + prevEl: '.swiper-button-prev', + }; + this.classes = { + grid: 'f-flex', + swiper: 'swiper', + swiperWrapper: 'swiper-wrapper', + }; + + this.sectionId = this.dataset.sectionId; + this.section = this.closest(`.section-${this.sectionId}`); + this.sliderWrapper = this.querySelector(this.selectors.sliderWrapper); + this.slides = this.sliderWrapper.querySelectorAll('.swiper-slide'); + + this.enableSlider = this.dataset.enableSlider === 'true'; + + this.sliderInstance = false; + + if (this.enableSlider) { + this.init(); + document.addEventListener('matchMobile', () => { + this.init(); + }); + document.addEventListener('unmatchMobile', () => { + this.init(); + }); + } + } + + init() { + if (FoxTheme.config.mqlMobile) { + this.destroySlider(); + } else { + this.initSlider(); + } + } + + initSlider() { + const columnGap = window.getComputedStyle(this.sliderWrapper).getPropertyValue('--column-gap'); + const spaceBetween = parseFloat(columnGap.replace('rem', '')) * 10 || 12; + const sliderOptions = { + slidesPerView: 'auto', + centeredSlides: false, + spaceBetween: spaceBetween, + navigation: { + nextEl: this.section.querySelector(this.selectors.nextEl), + prevEl: this.section.querySelector(this.selectors.prevEl), + }, + pagination: false, + threshold: 2, + }; + + if (typeof this.sliderInstance !== 'object') { + this.classList.add(this.classes.swiper); + this.sliderWrapper.classList.remove(this.classes.grid); + this.sliderWrapper.classList.add(this.classes.swiperWrapper); + this.sliderInstance = new window.FoxTheme.Carousel(this, sliderOptions); + this.sliderInstance.init(); + + const focusableElements = FoxTheme.a11y.getFocusableElements(this); + focusableElements.forEach((element) => { + element.addEventListener('focusin', () => { + const slide = element.closest('.swiper-slide'); + this.sliderInstance.slider.slideTo(this.sliderInstance.slider.slides.indexOf(slide)); + }); + }); + + this.sliderInstance.slider.on('progress', ({ progress }) => { + this.updateSliderReach(progress === 0 ? 'begin' : progress === 1 ? 'end' : 'progress'); + }); + } + + if (Shopify.designMode && typeof this.sliderInstance === 'object') { + document.addEventListener('shopify:block:select', (e) => { + if (e.detail.sectionId != this.sectionId) return; + let { target } = e; + const index = Number(target.dataset.index); + + this.sliderInstance.slider.slideTo(index); + }); + } + } + + destroySlider() { + this.classList.remove(this.classes.swiper); + this.sliderWrapper.classList.remove(this.classes.swiperWrapper); + this.sliderWrapper.classList.add(this.classes.grid); + if (typeof this.sliderInstance === 'object') { + this.sliderInstance.slider.destroy(); + this.sliderInstance = false; + } + } + + updateSliderReach = (position) => { + this.dataset.sliderReach = position; + }; + } + customElements.define('button-list', CollectionList); +} diff --git a/assets/cart-drawer.js b/assets/cart-drawer.js deleted file mode 100644 index ad37f3cb871..00000000000 --- a/assets/cart-drawer.js +++ /dev/null @@ -1,136 +0,0 @@ -class CartDrawer extends HTMLElement { - constructor() { - super(); - - this.addEventListener('keyup', (evt) => evt.code === 'Escape' && this.close()); - this.querySelector('#CartDrawer-Overlay').addEventListener('click', this.close.bind(this)); - this.setHeaderCartIconAccessibility(); - } - - setHeaderCartIconAccessibility() { - const cartLink = document.querySelector('#cart-icon-bubble'); - if (!cartLink) return; - - cartLink.setAttribute('role', 'button'); - cartLink.setAttribute('aria-haspopup', 'dialog'); - cartLink.addEventListener('click', (event) => { - event.preventDefault(); - this.open(cartLink); - }); - cartLink.addEventListener('keydown', (event) => { - if (event.code.toUpperCase() === 'SPACE') { - event.preventDefault(); - this.open(cartLink); - } - }); - } - - open(triggeredBy) { - if (triggeredBy) this.setActiveElement(triggeredBy); - const cartDrawerNote = this.querySelector('[id^="Details-"] summary'); - if (cartDrawerNote && !cartDrawerNote.hasAttribute('role')) this.setSummaryAccessibility(cartDrawerNote); - // here the animation doesn't seem to always get triggered. A timeout seem to help - setTimeout(() => { - this.classList.add('animate', 'active'); - }); - - this.addEventListener( - 'transitionend', - () => { - const containerToTrapFocusOn = this.classList.contains('is-empty') - ? this.querySelector('.drawer__inner-empty') - : document.getElementById('CartDrawer'); - const focusElement = this.querySelector('.drawer__inner') || this.querySelector('.drawer__close'); - trapFocus(containerToTrapFocusOn, focusElement); - }, - { once: true } - ); - - document.body.classList.add('overflow-hidden'); - } - - close() { - this.classList.remove('active'); - removeTrapFocus(this.activeElement); - document.body.classList.remove('overflow-hidden'); - } - - setSummaryAccessibility(cartDrawerNote) { - cartDrawerNote.setAttribute('role', 'button'); - cartDrawerNote.setAttribute('aria-expanded', 'false'); - - if (cartDrawerNote.nextElementSibling.getAttribute('id')) { - cartDrawerNote.setAttribute('aria-controls', cartDrawerNote.nextElementSibling.id); - } - - cartDrawerNote.addEventListener('click', (event) => { - event.currentTarget.setAttribute('aria-expanded', !event.currentTarget.closest('details').hasAttribute('open')); - }); - - cartDrawerNote.parentElement.addEventListener('keyup', onKeyUpEscape); - } - - renderContents(parsedState) { - this.querySelector('.drawer__inner').classList.contains('is-empty') && - this.querySelector('.drawer__inner').classList.remove('is-empty'); - this.productId = parsedState.id; - this.getSectionsToRender().forEach((section) => { - const sectionElement = section.selector - ? document.querySelector(section.selector) - : document.getElementById(section.id); - - if (!sectionElement) return; - sectionElement.innerHTML = this.getSectionInnerHTML(parsedState.sections[section.id], section.selector); - }); - - setTimeout(() => { - this.querySelector('#CartDrawer-Overlay').addEventListener('click', this.close.bind(this)); - this.open(); - }); - } - - getSectionInnerHTML(html, selector = '.shopify-section') { - return new DOMParser().parseFromString(html, 'text/html').querySelector(selector).innerHTML; - } - - getSectionsToRender() { - return [ - { - id: 'cart-drawer', - selector: '#CartDrawer', - }, - { - id: 'cart-icon-bubble', - }, - ]; - } - - getSectionDOM(html, selector = '.shopify-section') { - return new DOMParser().parseFromString(html, 'text/html').querySelector(selector); - } - - setActiveElement(element) { - this.activeElement = element; - } -} - -customElements.define('cart-drawer', CartDrawer); - -class CartDrawerItems extends CartItems { - getSectionsToRender() { - return [ - { - id: 'CartDrawer', - section: 'cart-drawer', - selector: '.drawer__inner', - }, - { - id: 'cart-icon-bubble', - section: 'cart-icon-bubble', - selector: '.shopify-section', - }, - ]; - } -} - -customElements.define('cart-drawer-items', CartDrawerItems); diff --git a/assets/cart-notification.js b/assets/cart-notification.js deleted file mode 100644 index 7e8a06cdf2e..00000000000 --- a/assets/cart-notification.js +++ /dev/null @@ -1,83 +0,0 @@ -class CartNotification extends HTMLElement { - constructor() { - super(); - - this.notification = document.getElementById('cart-notification'); - this.header = document.querySelector('sticky-header'); - this.onBodyClick = this.handleBodyClick.bind(this); - - this.notification.addEventListener('keyup', (evt) => evt.code === 'Escape' && this.close()); - this.querySelectorAll('button[type="button"]').forEach((closeButton) => - closeButton.addEventListener('click', this.close.bind(this)) - ); - } - - open() { - this.notification.classList.add('animate', 'active'); - - this.notification.addEventListener( - 'transitionend', - () => { - this.notification.focus(); - trapFocus(this.notification); - }, - { once: true } - ); - - document.body.addEventListener('click', this.onBodyClick); - } - - close() { - this.notification.classList.remove('active'); - document.body.removeEventListener('click', this.onBodyClick); - - removeTrapFocus(this.activeElement); - } - - renderContents(parsedState) { - this.cartItemKey = parsedState.key; - this.getSectionsToRender().forEach((section) => { - document.getElementById(section.id).innerHTML = this.getSectionInnerHTML( - parsedState.sections[section.id], - section.selector - ); - }); - - if (this.header) this.header.reveal(); - this.open(); - } - - getSectionsToRender() { - return [ - { - id: 'cart-notification-product', - selector: `[id="cart-notification-product-${this.cartItemKey}"]`, - }, - { - id: 'cart-notification-button', - }, - { - id: 'cart-icon-bubble', - }, - ]; - } - - getSectionInnerHTML(html, selector = '.shopify-section') { - return new DOMParser().parseFromString(html, 'text/html').querySelector(selector).innerHTML; - } - - handleBodyClick(evt) { - const target = evt.target; - if (target !== this.notification && !target.closest('cart-notification')) { - const disclosure = target.closest('details-disclosure, header-menu'); - this.activeElement = disclosure ? disclosure.querySelector('summary') : null; - this.close(); - } - } - - setActiveElement(element) { - this.activeElement = element; - } -} - -customElements.define('cart-notification', CartNotification); diff --git a/assets/cart.css b/assets/cart.css new file mode 100644 index 00000000000..840ecf14913 --- /dev/null +++ b/assets/cart.css @@ -0,0 +1,284 @@ +.cart table thead tr th { + padding-block: 1rem; + padding-inline-end: 1rem; +} +.cart table thead tr th:not(:first-child) { + width: 20%; +} +.cart tbody tr { + border-block-start: 0.1rem solid rgba(var(--color-border), var(--color-border-alpha, 1)); +} +.cart tbody tr td { + padding-block: 2rem; + padding-inline-end: 2rem; +} +@media (max-width: 1023.98px) { + .cart tbody tr td:first-child { + padding-inline-end: 0; + } +} +.cart tbody tr td:last-child { + padding-inline-end: 0; +} +.cart tbody tr:last-child { + border-block-end: 0.1rem solid rgba(var(--color-border), var(--color-border-alpha, 1)); +} +@media (max-width: 1023.98px) { + .cart tbody tr:first-child { + border-block-start: 0; + } + .cart tbody tr:first-child td:first-child { + padding-block-start: 0; + } +} +@media (min-width: 768px) { + .cart .cart__inner { + padding-inline-end: 3rem; + } +} +@media (min-width: 1024px) { + .cart .cart__inner { + padding-inline-end: 6rem; + } +} +.cart .cart__header { + margin-block-end: 3.4rem; +} +.cart .free-shipping-goal { + margin-block-end: 2.4rem; +} +.cart .free-shipping-goal + .cart__form { + margin-block-start: 0; +} +@media (max-width: 767.98px) { + .cart .free-shipping-goal + .cart__form { + margin-block-start: 0; + } +} +.cart__addon { + background-color: rgb(var(--color-secondary-background)); + border-radius: var(--buttons-radius); + transition: border-radius 0.3s ease-out; +} +.cart__addon.active { + border-radius: min(var(--buttons-radius), 1rem); +} +.cart__addon summary { + line-height: 1.625; + padding: 1.6rem 2rem; + border: none; +} +.cart__addon summary svg { + flex-shrink: 0; +} +.cart__addon details { + border: none; +} +.cart__addon .accordion-details__content { + padding-block-end: 0; +} +.cart__addon + .cart__addon { + margin-block-start: -0.8rem; +} +.cart__addon .form-control { + --color-field: var(--color-background); +} +.cart-accordion-details .accordion-details__summary + .accordion-details__content { + padding: 0 1.6rem 2rem; +} +@media (min-width: 768px) { + .cart__footer { + flex: 0 0 36%; + } +} +@media (min-width: 1024px) { + .cart__footer { + flex: 0 0 30%; + } +} +@media (max-width: 767.98px) { + .cart__footer { + margin-block-start: 2.4rem; + } +} +.header-pinned .cart__footer { + --offset-top: calc(var(--header-height) + 2rem); +} +.cart__footer-wrapper { + width: 100%; +} +.cart.is-empty .cart__header { + display: none; +} +.cart__empty .f-grid { + --f-columns-lg: 4; + --f-columns-md: 3; +} +.cart:not(.is-empty) .cart__empty { + display: none; +} +.cart-item__quantity, .cart-item__total { + width: 150px; +} + +.cart .free-shipping-goal .progress-bar::before, +.cart-drawer[active] .free-shipping-goal .progress-bar::before { + --scale-x: var(--percent); +} + +.cart-drawer { + --swiper-navigation-size: 3.8rem; + --color-cart-bubble: rgb(var(--color-foreground)); + --checkbox-size: 1.6rem; + --loading-size: 1.6rem; +} +@media (max-width: 639.98px) { + .cart-drawer__header { + padding: 1.2rem 1.6rem; + } +} +.cart-drawer__footer { + --page-padding: 3rem; + border-top: 0.1rem solid rgba(var(--color-foreground), 0.1); + padding: 2.4rem 3rem; + box-shadow: 0px -5px 10px 0px rgba(var(--color-foreground), 0.08); +} +@media (max-width: 639.98px) { + .cart-drawer__footer { + --page-padding: 1.6rem; + padding: 2rem 1.6rem 2.4rem; + } +} +.cart-drawer .drawer__body { + --cart-padding-start: 1.6rem; + --cart-padding-x: 3rem; + --cart-padding-end: 2.4rem; + padding: var(--cart-padding-start) var(--cart-padding-x) var(--cart-padding-end); +} +@media (max-width: 639.98px) { + .cart-drawer .drawer__body { + --cart-padding-start: 1.2rem; + --cart-padding-x: 1.6rem; + } +} +.cart-drawer__empty { + padding-top: 2rem; +} +@media (max-width: 639.98px) { + .cart-drawer__empty { + padding-top: 1.2rem; + } +} +.cart-drawer .free-shipping-goal { + margin-block-end: 2.4rem; +} +.cart-drawer .drawer__header { + padding: 0; +} +.cart-drawer__message { + padding: 1.2rem 1.5rem; +} +.cart-drawer__addons > .btn { + padding-inline: 1.2rem; +} + +.cart-item__media { + flex: 0 0 12rem; +} +@media (max-width: 767.98px) { + .cart-item__media { + flex: 0 0 10rem; + } +} +@media (max-width: 365px) { + .cart-item__media { + flex: 0 0 8rem; + } +} +.cart-item__title { + line-height: 1.5; +} +.cart-item .price--on-sale .price__regular { + color: rgb(var(--color-product-price-sale)); +} +.cart-item__remove { + width: 3rem; + height: 3rem; + margin-inline-end: -0.7rem; +} +@media (max-width: 1023.98px) { + .cart-item__product--info .template-content { + width: 100%; + } +} +.cart-item .volume-pricing-toggle { + height: auto; +} +.cart-item__options dd { + margin-inline-start: 0; +} + +.cart-quantity { + --buttons-height: 3.8rem; + --quantity-button-width: 3.5rem; + min-height: 3.8rem; + width: 9rem; +} +.cart-quantity .quantity__button { + width: 3.5rem; +} + +.cart-quantity-gift-wrap .quantity__input { + min-width: 4rem; +} + +.cart-addons-drawer__content { + padding: 2.4rem; +} +.cart-addons-drawer__inner { + max-height: calc(100% - 6rem); +} + +.recommendation-collection { + --buttons-height: 3.2rem; + --f-columns-mobile: 2; + --f-column-gap-mobile: 1.2rem; + --f-row-gap-mobile: 2rem; + --f-column-gap-lg: 3rem; + --f-row-gap-lg: 3rem; +} + +.cart-drawer-products-recommendation { + margin: 0 calc(var(--cart-padding-x) * -1) calc(var(--cart-padding-end) * -1); + padding: 2.4rem var(--cart-padding-x) var(--cart-padding-end); +} +@media (min-width: 640px) { + .cart-drawer-products-recommendation .swipe-mobile { + --page-padding: 3rem; + } +} +.cart-drawer-products-recommendation--horizontal-list:has(.cart-drawer-products-recommendation__header) .cart-drawer-products-recommendation__header { + padding-inline-end: 9rem; +} +.cart-drawer-products-recommendation--horizontal-list:has(.cart-drawer-products-recommendation__header) .swiper-controls { + position: absolute; + top: 0; + inset-inline-end: 0; + margin-block: 0; +} +.cart-drawer-products-recommendation--horizontal-list:has(.cart-drawer-products-recommendation__header) .line-height-placeholder { + display: block; +} + +.free-shipping-goal { + color: rgb(var(--color-progress-bar)); +} +.free-shipping-goal__label--success { + display: none; +} +.free-shipping-goal--done .free-shipping-goal__label--success { + display: block; +} +.free-shipping-goal--done .free-shipping-goal__label--default { + display: none; +} diff --git a/assets/cart.js b/assets/cart.js index eb9b75f698e..9cbc1527cc6 100644 --- a/assets/cart.js +++ b/assets/cart.js @@ -1,297 +1,1018 @@ -class CartRemoveButton extends HTMLElement { +class CartDrawer extends DrawerComponent { constructor() { super(); + window.FoxKitSections = FoxTheme.utils.getSectionId(this); + this.onCartRefreshListener = this.onCartRefresh.bind(this); + this.getSectionToRenderListener = this.getSectionToRender.bind(this); + } - this.addEventListener('click', (event) => { - event.preventDefault(); - const cartItems = this.closest('cart-items') || this.closest('cart-drawer-items'); - cartItems.updateQuantity(this.dataset.index, 0, event); - }); + get requiresBodyAppended() { + return false; + } + + get sectionId() { + return this.getAttribute('data-section-id'); + } + + connectedCallback() { + super.connectedCallback(); + + document.addEventListener('cart:grouped-sections', this.getSectionToRenderListener); + document.addEventListener('cart:refresh', this.onCartRefreshListener); + } + + disconnectedCallback() { + super.disconnectedCallback(); + document.removeEventListener('cart:grouped-sections', this.getSectionToRenderListener); + document.removeEventListener('cart:refresh', this.onCartRefreshListener); + } + + getSectionToRender(event) { + event.detail.sections.push(FoxTheme.utils.getSectionId(this)); + } + + show(focusElement = null, animate = true) { + super.show(focusElement, animate); + + if (this.open && !Shopify.designMode) { + FoxTheme.a11y.trapFocus(this, this.focusElement); + } + } + + async onCartRefresh(event) { + try { + // Fetch both HTML and JSON data in parallel for better performance + const [htmlResponse, cartResponse] = await Promise.all([ + fetch(`${FoxTheme.routes.root_url}?section_id=${this.sectionId}`), + fetch(`${FoxTheme.routes.cart_url}.js`), + ]); + + if (!htmlResponse.ok || !cartResponse.ok) { + throw new Error('Failed to fetch cart data'); + } + + const [responseText, cartData] = await Promise.all([htmlResponse.text(), cartResponse.json()]); + + const parser = new DOMParser(); + const parsedHTML = parser.parseFromString(responseText, 'text/html'); + const sectionToRender = parsedHTML.getElementById(`CartDrawer-${this.sectionId}`); + + if (!sectionToRender) { + console.warn('Cart drawer section not found in response'); + return; + } + + // Add sections data to cartData for pubsub system + cartData.sections = {}; + cartData.sections[this.sectionId] = sectionToRender.innerHTML; + + FoxTheme.pubsub.publish(FoxTheme.pubsub.PUB_SUB_EVENTS.cartUpdate, { + cart: cartData, + }); + + if (event.detail && event.detail.open === true) { + this.show(); + } + } catch (error) { + console.error('Error refreshing cart:', error); + } } } +customElements.define('cart-drawer', CartDrawer); + +class CartAddonModal extends ModalComponent { + constructor() { + super(); + } -customElements.define('cart-remove-button', CartRemoveButton); + /** + * To avoid lost focus input elements + */ + get focusElement() { + return this.querySelector('input, textarea, select') || this.querySelector('button'); + } +} +customElements.define('cart-addon-modal', CartAddonModal); class CartItems extends HTMLElement { constructor() { super(); - this.lineItemStatusElement = - document.getElementById('shopping-cart-line-item-status') || document.getElementById('CartDrawer-LineItemStatus'); - const debouncedOnChange = debounce((event) => { - this.onChange(event); - }, ON_CHANGE_DEBOUNCE_TIMER); + this.formEl = this.closest('form'); + this.submitBtnEl = document.querySelector(`button[form="${this.formEl?.id}"]`); + this.submitBtnEl && this.submitBtnEl.addEventListener('click', this.onCartSubmit.bind(this)); - this.addEventListener('change', debouncedOnChange.bind(this)); - } + this.addEventListener('change', (event) => { + const target = event.target; + if (target && target.closest('quantity-input')) { + FoxTheme.utils.debounce(this.onChange(event), 300); + } + }); + this.cartUpdateUnsubscriber = FoxTheme.pubsub.subscribe( + FoxTheme.pubsub.PUB_SUB_EVENTS.cartUpdate, + this.onCartUpdate.bind(this) + ); + + this.cartItemProducts = this.querySelectorAll('.cart-item__product'); + this.cartItemQuantitys = this.querySelectorAll('.cart-item__quantity'); + + const loadTemplateContent = (elements, parentSelector) => { + elements.forEach((element) => { + const template = element.querySelector('template'); + const templateContent = template && document.importNode(template.content, true); + const parent = element.querySelector(parentSelector); + + if (parent && template && !parent.querySelector('.template-content')) { + const contentWrapper = document.createElement('div'); + contentWrapper.classList.add('template-content'); + contentWrapper.appendChild(templateContent); + parent.appendChild(contentWrapper); + } + }); + }; - cartUpdateUnsubscriber = undefined; + const removeTemplateContent = (elements, parentSelector) => { + elements.forEach((element) => { + const parent = element.querySelector(parentSelector); + const templateContent = parent?.querySelector('.template-content'); - connectedCallback() { - this.cartUpdateUnsubscriber = subscribe(PUB_SUB_EVENTS.cartUpdate, (event) => { - if (event.source === 'cart-items') { - return; + if (templateContent) { + parent.removeChild(templateContent); + } + }); + }; + + const handleTabletMatch = () => { + loadTemplateContent(this.cartItemProducts, '.cart-item__product--info'); + removeTemplateContent(this.cartItemQuantitys, '.cart-item__quantity-wrapper'); + }; + + const handleTabletUnmatch = () => { + removeTemplateContent(this.cartItemProducts, '.cart-item__product--info'); + loadTemplateContent(this.cartItemQuantitys, '.cart-item__quantity-wrapper'); + }; + + const mqlTablet = window.matchMedia(FoxTheme.config.mediaQueryTablet); + FoxTheme.config.mqlTablet = mqlTablet.matches; + + if (FoxTheme.config.mqlTablet) { + handleTabletMatch(); + } else { + handleTabletUnmatch(); + } + + mqlTablet.onchange = (event) => { + if (event.matches) { + handleTabletMatch(); + } else { + FoxTheme.config.mqlTablet = false; + handleTabletUnmatch(); } - return this.onCartUpdate(); - }); + }; + + window.FoxKitSections = FoxTheme.utils.getSectionId(this); } + cartUpdateUnsubscriber = undefined; + disconnectedCallback() { if (this.cartUpdateUnsubscriber) { this.cartUpdateUnsubscriber(); } } - resetQuantityInput(id) { - const input = this.querySelector(`#Quantity-${id}`); - input.value = input.getAttribute('value'); - this.isEnterPressed = false; + onChange(event) { + this.updateQuantity( + event.target.dataset.index, + event.target.value, + document.activeElement.getAttribute('name'), + event.target + ); + } + + onCartError(errors, target) { + if (target) { + this.hideLoader(target.getAttribute('data-index')); + this.setValidity(target, errors); + return; + } else { + window.location.href = FoxTheme.routes.cart_url; + } + alert(errors); + } + + onCartSubmit(event) { + this.clearValidity(this.formEl); + + if (!this.formEl.checkValidity()) { + return; + } + } + + clearValidity(form) { + form.querySelectorAll('input, select, textarea').forEach((el) => { + el.setCustomValidity(''); + }); } - setValidity(event, index, message) { - event.target.setCustomValidity(message); - event.target.reportValidity(); - this.resetQuantityInput(index); - event.target.select(); + setValidity(target, message) { + target.setCustomValidity(message); + target.reportValidity(); + target.value = target.defaultValue; + target.select(); } - validateQuantity(event) { - const inputValue = parseInt(event.target.value); - const index = event.target.dataset.index; - let message = ''; + onCartUpdate(event) { + if (event.cart.errors) { + this.onCartError(event.cart.errors, event.target); + return; + } + if (typeof event.cart.sections === 'undefined') { + return; + } + + const sectionId = FoxTheme.utils.getSectionId(this); + const sectionToRender = new DOMParser().parseFromString(event.cart.sections[sectionId], 'text/html'); + + const cartDrawer = document.querySelector(`#CartDrawer-${sectionId}`); + const cartDrawerBody = document.querySelector(`#CartDrawerBody-${sectionId}`); + const cartDrawerFooter = document.querySelector(`#CartDrawerFooter-${sectionId}`); + const cartDrawerEmpty = document.querySelector(`#CartDrawerEmpty-${sectionId}`); + if (cartDrawer) { + const cartDrawerBodyUpdate = sectionToRender.querySelector(`#CartDrawerBody-${sectionId}`); + const cartDrawerFooterUpdate = sectionToRender.querySelector(`#CartDrawerFooter-${sectionId}`); + const cartDrawerEmptyUpdate = sectionToRender.querySelector(`#CartDrawerEmpty-${sectionId}`); + + if (cartDrawerBodyUpdate) { + cartDrawerBody.innerHTML = cartDrawerBodyUpdate.innerHTML; + } + if (cartDrawerFooterUpdate) { + cartDrawerFooter.innerHTML = cartDrawerFooterUpdate.innerHTML; + } + + if (cartDrawerEmptyUpdate) { + cartDrawerEmpty.innerHTML = cartDrawerEmptyUpdate.innerHTML; + } + + if (event.cart.item_count > 0) { + cartDrawerBody.classList.remove('hidden'); + cartDrawerFooter.classList.remove('hidden'); + cartDrawerEmpty.classList.add('hidden'); + } else { + cartDrawerBody.classList.add('hidden'); + cartDrawerFooter.classList.add('hidden'); + cartDrawerEmpty.classList.remove('hidden'); + } + } - if (inputValue < event.target.dataset.min) { - message = window.quickOrderListStrings.min_error.replace('[min]', event.target.dataset.min); - } else if (inputValue > parseInt(event.target.max)) { - message = window.quickOrderListStrings.max_error.replace('[max]', event.target.max); - } else if (inputValue % parseInt(event.target.step) !== 0) { - message = window.quickOrderListStrings.step_error.replace('[step]', event.target.step); + const mainCart = document.querySelector(`#MainCart-${sectionId}`); + if (mainCart) { + const updatedElement = sectionToRender.querySelector(`#MainCart-${sectionId}`); + if (updatedElement) { + mainCart.innerHTML = updatedElement.innerHTML; + if (event.cart.item_count > 0) { + mainCart.closest('.cart').classList.remove('is-empty'); + } else { + mainCart.closest('.cart').classList.add('is-empty'); + } + } else { + mainCart.closest('.cart').classList.add('is-empty'); + mainCart.remove(); + } } - if (message) { - this.setValidity(event, index, message); + const lineItem = + document.getElementById(`CartItem-${event.line}`) || document.getElementById(`CartDrawer-Item-${event.line}`); + + if (lineItem && lineItem.querySelector(`[name="${event.name}"]`)) { + FoxTheme.a11y.trapFocus(mainCart || cartDrawer, lineItem.querySelector(`[name="${event.name}"]`)); + } else if (event.cart.item_count === 0) { + cartDrawer + ? FoxTheme.a11y.trapFocus(cartDrawer, cartDrawer.querySelector('a')) + : FoxTheme.a11y.trapFocus(document.querySelector('.cart__empty'), document.querySelector('a')); } else { - event.target.setCustomValidity(''); - event.target.reportValidity(); - this.updateQuantity( - index, - inputValue, - event, - document.activeElement.getAttribute('name'), - event.target.dataset.quantityVariantId - ); + cartDrawer + ? FoxTheme.a11y.trapFocus(cartDrawer, cartDrawer.querySelector('.cart-item__title')) + : FoxTheme.a11y.trapFocus(mainCart, mainCart.querySelector('.cart-item__title')); + } + + document.dispatchEvent( + new CustomEvent('cart:updated', { + detail: { + cart: event.cart, + }, + }) + ); + } + + updateQuantity(line, quantity, name, target) { + this.showLoader(line); + + let sectionsToBundle = []; + document.documentElement.dispatchEvent( + new CustomEvent('cart:grouped-sections', { bubbles: true, detail: { sections: sectionsToBundle } }) + ); + + const body = JSON.stringify({ + line, + quantity, + sections: sectionsToBundle, + }); + + fetch(`${FoxTheme.routes.cart_change_url}`, { ...FoxTheme.utils.fetchConfig(), ...{ body } }) + .then((response) => response.json()) + .then((parsedState) => { + FoxTheme.pubsub.publish(FoxTheme.pubsub.PUB_SUB_EVENTS.cartUpdate, { cart: parsedState, target, line, name }); + }) + .catch((error) => { + console.log(error); + }); + } + + showLoader(line) { + const sectionId = FoxTheme.utils.getSectionId(this); + const loaders = document.querySelectorAll(`#Loader-${sectionId}-${line}`); + if (loaders) { + loaders.forEach((loader) => { + loader.classList.add('btn--loading'); + }); + } + } + + hideLoader(line) { + const sectionId = FoxTheme.utils.getSectionId(this); + const loaders = document.querySelectorAll(`#Loader-${sectionId}-${line}`); + if (loaders) { + loaders.forEach((loader) => { + loader.classList.remove('btn--loading'); + }); + } + } +} +customElements.define('cart-items', CartItems); + +class CartRemoveItem extends HTMLAnchorElement { + constructor() { + super(); + + this.addEventListener('click', (event) => { + event.preventDefault(); + + const cartItems = this.closest('cart-items'); + cartItems.updateQuantity(this.dataset.index, 0); + }); + } +} +customElements.define('cart-remove-item', CartRemoveItem, { extends: 'a' }); + +class CartNote extends HTMLElement { + constructor() { + super(); + + this.addEventListener('change', FoxTheme.utils.debounce(this.onChange.bind(this), 300)); + + if (this.button && this.cartNoteDetailsSummary) { + this.button.addEventListener('click', () => { + this.cartNoteDetailsSummary.close(); + }); } } + get cartNoteDetailsSummary() { + return this.closest('[is="accordion-details"]'); + } + + get button() { + return this.querySelector('[type="button"]'); + } + onChange(event) { - this.validateQuantity(event); - } - - onCartUpdate() { - if (this.tagName === 'CART-DRAWER-ITEMS') { - return fetch(`${routes.cart_url}?section_id=cart-drawer`) - .then((response) => response.text()) - .then((responseText) => { - const html = new DOMParser().parseFromString(responseText, 'text/html'); - const selectors = ['cart-drawer-items', '.cart-drawer__footer']; - for (const selector of selectors) { - const targetElement = document.querySelector(selector); - const sourceElement = html.querySelector(selector); - if (targetElement && sourceElement) { - targetElement.replaceWith(sourceElement); - } - } - }) - .catch((e) => { - console.error(e); + const body = JSON.stringify({ note: event.target.value }); + fetch(`${FoxTheme.routes.cart_update_url}`, { ...FoxTheme.utils.fetchConfig(), ...{ body } }); + } +} +customElements.define('cart-note', CartNote); + +class CartDiscount extends HTMLFormElement { + constructor() { + super(); + + this.addEventListener('submit', this.handleFormSubmit.bind(this)); + } + + get submitEl() { + return (this._submitEl = this._submitEl || this.querySelector('[type="submit"]')); + } + + get messageEl() { + return (this._messageEl = this._messageEl || this.querySelector('.form__message')); + } + + get couponEl() { + return (this._couponEl = this._couponEl || this.querySelector('input[name="discount"]')); + } + + get cartAddonDrawer() { + return this.closest('.cart-addons-drawer'); + } + + get cartDiscountsEl() { + return document.querySelector('.cart__discounts'); + } + + getDiscounts() { + const discounts = []; + + if (this.cartDiscountsEl) { + const items = this.cartDiscountsEl.querySelectorAll('.discount'); + items && + items.forEach((item) => { + discounts.push(item.dataset.discountCode); }); + } + + return discounts; + } + + handleFormSubmit(event) { + event.preventDefault(); + + if (this.submitEl.getAttribute('aria-disabled') === 'true') return; + + this.displayFormErrors(); + + const newDiscountCode = this.couponEl.value; + const discounts = this.getDiscounts(); + + if (discounts.includes(newDiscountCode)) { + this.displayFormErrors(FoxTheme.cartStrings.duplicateDiscountError); + return; + } + + discounts.push(newDiscountCode); + + let sectionsToBundle = []; + document.documentElement.dispatchEvent( + new CustomEvent('cart:grouped-sections', { bubbles: true, detail: { sections: sectionsToBundle } }) + ); + + const config = FoxTheme.utils.fetchConfig('javascript'); + config.headers['X-Requested-With'] = 'XMLHttpRequest'; + delete config.headers['Content-Type']; + + const formData = new FormData(); + formData.append('sections', sectionsToBundle); + formData.append('sections_url', window.location.pathname); + formData.append('discount', discounts.join(',')); + + config.body = formData; + + this.submitEl.setAttribute('aria-disabled', 'true'); + this.submitEl.classList.add('btn--loading'); + + fetch(FoxTheme.routes.cart_update_url, config) + .then((response) => response.json()) + .then(async (parsedState) => { + if ( + parsedState.discount_codes.find((/** @type {{ code: string; applicable: boolean; }} */ discount) => { + return discount.code === newDiscountCode && discount.applicable === false; + }) + ) { + this.couponEl.value = ''; + this.displayFormErrors(FoxTheme.cartStrings.applyDiscountError); + return; + } + + if (this.cartAddonDrawer) { + this.cartAddonDrawer.hide(); + } + + const cartJson = await (await fetch(`${FoxTheme.routes.cart_url}`, { ...FoxTheme.utils.fetchConfig() })).json(); + cartJson['sections'] = parsedState['sections']; + + this.updateCartState(cartJson); + }) + .catch((e) => { + console.error(e); + }) + .finally(() => { + this.submitEl.removeAttribute('aria-disabled'); + this.submitEl.classList.remove('btn--loading'); + }); + } + + updateCartState = (cartJson) => { + FoxTheme.pubsub.publish(FoxTheme.pubsub.PUB_SUB_EVENTS.cartUpdate, { cart: cartJson }); + }; + + displayFormErrors = (errorMessage = false) => { + if (!this.messageEl) { + if (errorMessage !== false) { + alert(errorMessage); + } } else { - return fetch(`${routes.cart_url}?section_id=main-cart-items`) - .then((response) => response.text()) - .then((responseText) => { - const html = new DOMParser().parseFromString(responseText, 'text/html'); - const sourceQty = html.querySelector('cart-items'); - this.innerHTML = sourceQty.innerHTML; - }) - .catch((e) => { - console.error(e); - }); + this.messageEl.classList.toggle('!hidden', !errorMessage); + if (errorMessage !== false) { + this.messageEl.innerText = errorMessage; + } } + }; +} +customElements.define('cart-discount', CartDiscount, { extends: 'form' }); + +class CartDiscountRemove extends HTMLButtonElement { + constructor() { + super(); + + this.selectors = { + list: '.cart__discounts', + item: '.discount', + }; + + this.clickHandler = this.handleClick.bind(this); } - getSectionsToRender() { - return [ - { - id: 'main-cart-items', - section: document.getElementById('main-cart-items').dataset.id, - selector: '.js-contents', - }, - { - id: 'cart-icon-bubble', - section: 'cart-icon-bubble', - selector: '.shopify-section', - }, - { - id: 'cart-live-region-text', - section: 'cart-live-region-text', - selector: '.shopify-section', - }, - { - id: 'main-cart-footer', - section: document.getElementById('main-cart-footer').dataset.id, - selector: '.js-contents', - }, - ]; + connectedCallback() { + this.listEl = this.closest(this.selectors.list); + + this.addEventListener('click', this.clickHandler); + } + + disconnectedCallback() { + this.removeEventListener('click', this.clickHandler); + } + + handleClick(event) { + event.preventDefault(); + if (this.getAttribute('aria-disabled') === 'true') return; + + this.setAttribute('aria-disabled', 'true'); + this.classList.add('btn--loading'); + + this.discounts = []; + + const thisItem = this.closest('li'); + const items = this.listEl.querySelectorAll(this.selectors.item); + items && + items.forEach((item) => { + if (item != thisItem) { + this.discounts.push(item.dataset.discountCode); + } + }); + + this.updateCartDiscounts(); + } + + updateCartDiscounts() { + let sectionsToBundle = []; + document.documentElement.dispatchEvent( + new CustomEvent('cart:grouped-sections', { bubbles: true, detail: { sections: sectionsToBundle } }) + ); + + const config = FoxTheme.utils.fetchConfig('javascript'); + config.headers['X-Requested-With'] = 'XMLHttpRequest'; + delete config.headers['Content-Type']; + + const formData = new FormData(); + formData.append('sections', sectionsToBundle); + formData.append('sections_url', window.location.pathname); + formData.append('discount', this.discounts.join(',')); + + config.body = formData; + + fetch(FoxTheme.routes.cart_update_url, config) + .then((response) => response.json()) + .then(async (parsedState) => { + const cartJson = await (await fetch(`${FoxTheme.routes.cart_url}`, { ...FoxTheme.utils.fetchConfig() })).json(); + cartJson['sections'] = parsedState['sections']; + + this.updateCartState(cartJson); + }) + .catch((e) => { + console.error(e); + }); + } + + updateCartState = (cartJson) => { + FoxTheme.pubsub.publish(FoxTheme.pubsub.PUB_SUB_EVENTS.cartUpdate, { cart: cartJson }); + }; +} +customElements.define('cart-discount-remove', CartDiscountRemove, { extends: 'button' }); + +class CalculateShipping extends CartAddonModal { + constructor() { + super(); + this.countryProvince = this.querySelector('country-province'); + this.isCountrySetup = false; + } + static get observedAttributes() { + return [...super.observedAttributes, 'data-show']; + } + show() { + super.show(); + this.setAttribute('data-show', true); + } + + hide() { + super.hide(); + this.setAttribute('data-show', false); } - updateQuantity(line, quantity, event, name, variantId) { - const eventTarget = event.currentTarget instanceof CartRemoveButton ? 'clear' : 'change'; - const cartPerformanceUpdateMarker = CartPerformance.createStartingMarker(`${eventTarget}:user-action`); + attributeChangedCallback(name, oldValue, newValue) { + super.attributeChangedCallback(name, oldValue, newValue); + if (name === 'data-show' && newValue === 'true' && !this.isCountrySetup && this.countryProvince) { + const template = this.countryProvince.querySelector('template'); + const templateContent = document.importNode(template.content, true); + this.countryProvince.countryElement.appendChild(templateContent); + this.countryProvince.init(); + this.isCountrySetup = true; + } + } +} +customElements.define('calculate-shipping', CalculateShipping); +class CountryProvinceForm extends HTMLElement { + constructor() { + super(); + this.provinceElement = this.querySelector('[name="address[province]"]'); + this.countryElement = this.querySelector('[name="address[country]"]'); + this.template = this.dataset.template; + this.countryElement.addEventListener('change', this.handleCountryChange.bind(this)); + if (this.template && this.template === 'cart') { + this.init(); + } + } + + init() { + if (this.getAttribute('country') !== '') { + this.countryElement.selectedIndex = Math.max( + 0, + Array.from(this.countryElement.options).findIndex((option) => option.textContent === this.dataset.country) + ); + this.countryElement.dispatchEvent(new Event('change')); + } else { + this.handleCountryChange(); + } + } + + handleCountryChange() { + const option = this.countryElement.options[this.countryElement.selectedIndex], + provinces = JSON.parse(option.dataset.provinces); + + this.provinceElement.closest('.form-field').hidden = provinces.length === 0; + + if (provinces.length === 0) { + return; + } + + this.provinceElement.innerHTML = ''; - this.enableLoading(line); + provinces.forEach((data) => { + const selected = data[1] === this.dataset.province; + this.provinceElement.options.add(new Option(data[1], data[0], selected, selected)); + }); + } +} +customElements.define('country-province', CountryProvinceForm); + +class ShippingCalculator extends HTMLFormElement { + constructor() { + super(); + + this.submitButton = this.querySelector('[type="submit"]'); + this.resultsElement = this.lastElementChild; + + this.submitButton.addEventListener('click', this.handleFormSubmit.bind(this)); + } + + handleFormSubmit(event) { + event.preventDefault(); + + const zip = this.querySelector('[name="address[zip]"]').value, + country = this.querySelector('[name="address[country]"]').value, + province = this.querySelector('[name="address[province]"]').value; + + this.submitButton.classList.add('btn--loading'); const body = JSON.stringify({ - line, - quantity, - sections: this.getSectionsToRender().map((section) => section.section), - sections_url: window.location.pathname, + shipping_address: { zip, country, province }, + }); + let sectionUrl = `${FoxTheme.routes.cart_url}/shipping_rates.json`; + + sectionUrl = sectionUrl.replace('//', '/'); + + fetch(sectionUrl, { ...FoxTheme.utils.fetchConfig('javascript'), ...{ body } }) + .then((response) => response.json()) + .then((parsedState) => { + if (parsedState.shipping_rates) { + this.formatShippingRates(parsedState.shipping_rates); + } else { + this.formatError(parsedState); + } + }) + .catch((e) => { + console.error(e); + }) + .finally(() => { + this.resultsElement.hidden = false; + this.submitButton.classList.remove('btn--loading'); + }); + } + + formatError(errors) { + const shippingRatesList = Object.keys(errors).map((errorKey) => { + return `
  • ${errors[errorKey]}
  • `; + }); + this.resultsElement.innerHTML = ` +
    +

    ${FoxTheme.shippingCalculatorStrings.error}

    +
      ${shippingRatesList.join('')}
    +
    + `; + } + + formatShippingRates(shippingRates) { + const shippingRatesList = shippingRates.map(({ presentment_name, currency, price }) => { + return `
  • ${presentment_name}: ${currency} ${price}
  • `; }); + this.resultsElement.innerHTML = ` +
    +

    ${ + shippingRates.length === 0 + ? FoxTheme.shippingCalculatorStrings.notFound + : shippingRates.length === 1 + ? FoxTheme.shippingCalculatorStrings.oneResult + : FoxTheme.shippingCalculatorStrings.multipleResults + }

    + ${ + shippingRatesList === '' + ? '' + : `
      ${shippingRatesList.join('')}
    ` + } +
    + `; + } +} +customElements.define('shipping-calculator', ShippingCalculator, { extends: 'form' }); + +class CartDrawerProductsRecommendation extends HTMLElement { + constructor() { + super(); + this.carousel = false; + this.isLoading = false; + + this.classes = { + grid: 'f-grid', + swiper: 'swiper', + swiperWrapper: 'swiper-wrapper', + loading: 'is-loading', + }; + + // Handle Safari separately + const isSafari = navigator.userAgent.includes('Safari') && !navigator.userAgent.includes('Chrome'); + if (isSafari) { + this.init(); + } else { + FoxTheme.Motion.inView(this, this.init.bind(this), { margin: '600px 0px 600px 0px' }); + } + } + + disconnectedCallback() { + // Cleanup + this.destroyCarousel(); + const mql = window.matchMedia(FoxTheme.config.mediaQueryMobile); + mql.removeEventListener('change', this.handleCarousel.bind(this)); + } + + init() { + if (this.isLoading || !this.dataset.url) return; - fetch(`${routes.cart_change_url}`, { ...fetchConfig(), ...{ body } }) + this.isLoading = true; + this.classList.add(this.classes.loading); + + fetch(this.dataset.url) .then((response) => { + if (!response.ok) throw new Error('Network response was not ok'); return response.text(); }) - .then((state) => { - const parsedState = JSON.parse(state); - - CartPerformance.measure(`${eventTarget}:paint-updated-sections`, () => { - const quantityElement = - document.getElementById(`Quantity-${line}`) || document.getElementById(`Drawer-quantity-${line}`); - const items = document.querySelectorAll('.cart-item'); - - if (parsedState.errors) { - quantityElement.value = quantityElement.getAttribute('value'); - this.updateLiveRegions(line, parsedState.errors); - return; - } - - this.classList.toggle('is-empty', parsedState.item_count === 0); - const cartDrawerWrapper = document.querySelector('cart-drawer'); - const cartFooter = document.getElementById('main-cart-footer'); - - if (cartFooter) cartFooter.classList.toggle('is-empty', parsedState.item_count === 0); - if (cartDrawerWrapper) cartDrawerWrapper.classList.toggle('is-empty', parsedState.item_count === 0); - - this.getSectionsToRender().forEach((section) => { - const elementToReplace = - document.getElementById(section.id).querySelector(section.selector) || - document.getElementById(section.id); - elementToReplace.innerHTML = this.getSectionInnerHTML( - parsedState.sections[section.section], - section.selector - ); - }); - const updatedValue = parsedState.items[line - 1] ? parsedState.items[line - 1].quantity : undefined; - let message = ''; - if (items.length === parsedState.items.length && updatedValue !== parseInt(quantityElement.value)) { - if (typeof updatedValue === 'undefined') { - message = window.cartStrings.error; - } else { - message = window.cartStrings.quantityError.replace('[quantity]', updatedValue); - } - } - this.updateLiveRegions(line, message); - - const lineItem = - document.getElementById(`CartItem-${line}`) || document.getElementById(`CartDrawer-Item-${line}`); - if (lineItem && lineItem.querySelector(`[name="${name}"]`)) { - cartDrawerWrapper - ? trapFocus(cartDrawerWrapper, lineItem.querySelector(`[name="${name}"]`)) - : lineItem.querySelector(`[name="${name}"]`).focus(); - } else if (parsedState.item_count === 0 && cartDrawerWrapper) { - trapFocus(cartDrawerWrapper.querySelector('.drawer__inner-empty'), cartDrawerWrapper.querySelector('a')); - } else if (document.querySelector('.cart-item') && cartDrawerWrapper) { - trapFocus(cartDrawerWrapper, document.querySelector('.cart-item__name')); - } - }); - - publish(PUB_SUB_EVENTS.cartUpdate, { source: 'cart-items', cartData: parsedState, variantId: variantId }); + .then((responseText) => { + const sectionInnerHTML = new DOMParser() + .parseFromString(responseText, 'text/html') + .querySelector('.shopify-section'); + + if (!sectionInnerHTML) return; + + const recommendations = sectionInnerHTML.querySelector('cart-drawer-products-recommendation'); + if (recommendations?.innerHTML.trim().length) { + this.innerHTML = recommendations.innerHTML; + const mql = window.matchMedia(FoxTheme.config.mediaQueryMobile); + mql.addEventListener('change', this.handleCarousel.bind(this)); + this.handleCarousel(); + this.dispatchEvent(new CustomEvent('recommendations:loaded')); + } else { + this.closest('.shopify-section')?.remove(); + } }) - .catch(() => { - this.querySelectorAll('.loading__spinner').forEach((overlay) => overlay.classList.add('hidden')); - const errors = document.getElementById('cart-errors') || document.getElementById('CartDrawer-CartErrors'); - errors.textContent = window.cartStrings.error; + .catch((error) => { + console.error('Error loading recommendations:', error); + this.classList.add('has-error'); }) .finally(() => { - this.disableLoading(line); - CartPerformance.measureFromMarker(`${eventTarget}:user-action`, cartPerformanceUpdateMarker); + this.isLoading = false; + this.classList.remove(this.classes.loading); }); } - updateLiveRegions(line, message) { - const lineItemError = - document.getElementById(`Line-item-error-${line}`) || document.getElementById(`CartDrawer-LineItemError-${line}`); - if (lineItemError) lineItemError.querySelector('.cart-item__error-text').textContent = message; + initCarousel() { + if (!this.wrapper?.innerHTML.trim().length) { + this.classList.add('hidden'); + return; + } - this.lineItemStatusElement.setAttribute('aria-hidden', true); + if (typeof this.carousel !== 'object') { + try { + this.container.classList.add(this.classes.swiper); + this.wrapper.classList.remove(this.classes.grid); + this.wrapper.classList.add(this.classes.swiperWrapper); + + let options = { + slidesPerView: this.columns, + spaceBetween: 8, + loop: false, + navigation: { + nextEl: this.sliderNext, + prevEl: this.sliderPrev, + }, + }; + + const paginationEl = this.querySelector('.swiper-pagination'); + if (paginationEl) { + options = { + ...options, + pagination: { + el: paginationEl, + clickable: true, + type: 'fraction', + }, + }; + } + + this.carousel = new FoxTheme.Carousel(this.slideContainer, options); + + if (this.carousel) { + this.carousel.init(); + this.calcNavButtonsPosition(); + } + } catch (error) { + console.error('Error initializing carousel:', error); + this.destroyCarousel(); + } + } + } - const cartStatus = - document.getElementById('cart-live-region-text') || document.getElementById('CartDrawer-LiveRegionText'); - cartStatus.setAttribute('aria-hidden', false); + handleCarousel() { + const containerEl = this.container; + this.columns = containerEl.dataset.columns; + this.enableSliderMobile = containerEl.dataset.enableSliderMobile === 'true'; - setTimeout(() => { - cartStatus.setAttribute('aria-hidden', true); - }, 1000); + if (FoxTheme.config.mqlMobile) { + this.enableSliderMobile ? this.initCarousel() : this.destroyCarousel(); + } else { + this.initCarousel(); + } } - getSectionInnerHTML(html, selector) { - return new DOMParser().parseFromString(html, 'text/html').querySelector(selector).innerHTML; + destroyCarousel() { + if (!this.wrapper?.innerHTML.trim().length) { + this.classList.add('hidden'); + return; + } + this.container?.classList.remove(this.classes.swiper); + this.wrapper?.classList.remove(this.classes.swiperWrapper); + this.wrapper?.classList.add(this.classes.grid); + + if (typeof this.sliderInstance !== 'object') return; + this.carousel.slider.destroy(); + this.carousel = false; } - enableLoading(line) { - const mainCartItems = document.getElementById('main-cart-items') || document.getElementById('CartDrawer-CartItems'); - mainCartItems.classList.add('cart__items--disabled'); + calcNavButtonsPosition() { + if (!this.dataset.calcButtonPosition === 'true') return; + const firstMedia = this.querySelector('.product-card__image-wrapper'); + if (firstMedia && firstMedia.clientHeight > 0) { + this.style.setProperty('--swiper-navigation-top-offset', parseInt(firstMedia.clientHeight) / 2 + 'px'); + } + } - const cartItemElements = this.querySelectorAll(`#CartItem-${line} .loading__spinner`); - const cartDrawerItemElements = this.querySelectorAll(`#CartDrawer-Item-${line} .loading__spinner`); + get slideContainer() { + return this.querySelector('.swiper'); + } - [...cartItemElements, ...cartDrawerItemElements].forEach((overlay) => overlay.classList.remove('hidden')); + get sliderPagination() { + return this.querySelector('.swiper-pagination'); + } - document.activeElement.blur(); - this.lineItemStatusElement.setAttribute('aria-hidden', false); + get sliderNext() { + return this.querySelector('.swiper-button-next'); } - disableLoading(line) { - const mainCartItems = document.getElementById('main-cart-items') || document.getElementById('CartDrawer-CartItems'); - mainCartItems.classList.remove('cart__items--disabled'); + get sliderPrev() { + return this.querySelector('.swiper-button-prev'); + } - const cartItemElements = this.querySelectorAll(`#CartItem-${line} .loading__spinner`); - const cartDrawerItemElements = this.querySelectorAll(`#CartDrawer-Item-${line} .loading__spinner`); + get container() { + return this.querySelector('.cart-drawer-products-recommendation__container'); + } - cartItemElements.forEach((overlay) => overlay.classList.add('hidden')); - cartDrawerItemElements.forEach((overlay) => overlay.classList.add('hidden')); + get wrapper() { + return this.querySelector('.cart-drawer-products-recommendation__wrapper'); } } +customElements.define('cart-drawer-products-recommendation', CartDrawerProductsRecommendation); -customElements.define('cart-items', CartItems); +class MainCart extends HTMLElement { + constructor() { + super(); -if (!customElements.get('cart-note')) { - customElements.define( - 'cart-note', - class CartNote extends HTMLElement { - constructor() { - super(); - - this.addEventListener( - 'input', - debounce((event) => { - const body = JSON.stringify({ note: event.target.value }); - fetch(`${routes.cart_update_url}`, { ...fetchConfig(), ...{ body } }).then(() => - CartPerformance.measureFromEvent('note-update:user-action', event) - ); - }, ON_CHANGE_DEBOUNCE_TIMER) - ); - } + document.addEventListener('cart:grouped-sections', this.getSectionToRender.bind(this)); + } + + getSectionToRender(event) { + event.detail.sections.push(FoxTheme.utils.getSectionId(this)); + } +} +customElements.define('main-cart', MainCart); + +class FreeShippingGoal extends HTMLElement { + constructor() { + super(); + this.selectors = { + leftToSpend: '[data-left-to-spend]', + }; + this.goal = Number(this.dataset.minimumAmount) * Number(window.Shopify.currency.rate || 1) || 0; + this.progress = this.querySelector('progress-bar'); + this.money_format = window.FoxTheme.settings.moneyFormat; + } + + connectedCallback() { + this.updateShippingGloal(Number(this.dataset.cartTotal)); + document.addEventListener('cart:updated', (event) => { + this.updateShippingGloal(event.detail.cart.items_subtotal_price); + }); + } + + updateShippingGloal(amount) { + if (amount > 0) { + this.classList.remove('hidden'); + } else { + this.classList.add('hidden'); } - ); + + this.cartTotal = amount / 100; + this.goalLeft = this.goal - this.cartTotal; + this.goalDone = this.goalLeft <= 0; + + this.percent = (this.cartTotal * 100) / this.goal; + + if (this.percent >= 100) this.percent = 100; + + if (this.cartTotal >= this.goal) { + this.progress.style.setProperty('--percent', `${this.percent}%`); + this.classList.add('free-shipping-goal--done'); + this.progress.dataset.value = this.cartTotal; + this.progress.dataset.max = this.goal; + } else { + let spend = (this.goal - this.cartTotal) * 100; + this.querySelector(this.selectors.leftToSpend).innerHTML = FoxTheme.Currency.formatMoney( + spend, + this.money_format + ); + this.classList.remove('free-shipping-goal--done'); + this.progress.style.setProperty('--percent', `${this.percent}%`); + this.progress.dataset.value = this.cartTotal; + this.progress.dataset.max = this.goal; + } + } } +customElements.define('free-shipping-goal', FreeShippingGoal); + +window.FoxKitAddToCart = async (payload) => { + if (!payload?.properties?.['_FoxKit offer']) return; + + const cartJson = await ( + await fetch(`${FoxTheme.routes.cart_url}`, { + ...FoxTheme.utils.fetchConfig(), + }) + ).json(); + cartJson['sections'] = payload['sections']; + FoxTheme.pubsub.publish(FoxTheme.pubsub.PUB_SUB_EVENTS.cartUpdate, { cart: cartJson }); + + document.dispatchEvent( + new CustomEvent('product-ajax:added', { + detail: { + product: payload, + }, + }) + ); +}; diff --git a/assets/collage.css b/assets/collage.css deleted file mode 100644 index 67618cca1a9..00000000000 --- a/assets/collage.css +++ /dev/null @@ -1,202 +0,0 @@ -.collage-wrapper-title { - margin-top: 0; - margin-bottom: 3rem; -} - -.collage { - display: grid; -} - -.collage__item > * { - width: 100%; -} - -.collage__item .card__content { - flex-grow: initial; -} - -@media screen and (max-width: 749px) { - .collage { - grid-column-gap: var(--grid-mobile-horizontal-spacing); - grid-row-gap: var(--grid-mobile-vertical-spacing); - } - - .collage--mobile { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - - .collage--mobile .collage__item--left:nth-child(3n - 2) { - grid-column: span 2; - } - - .collage--mobile .collage__item--left:nth-child(3n - 2):nth-last-child(2) { - grid-column: span 1; - } - - .collage--mobile .collage__item--left:nth-child(3n) { - grid-column-start: 2; - } - - .collage--mobile .collage__item--right:nth-child(3n - 2) { - grid-column-start: 1; - } - - .collage--mobile .collage__item--right:nth-child(3n - 2):last-child { - grid-column: span 2; - } - - .collage--mobile .collage__item--right:nth-child(3n - 1) { - grid-column-start: 2; - } - - .collage--mobile .collage__item--right:nth-child(3n) { - grid-column: 1 / span 2; - } -} - -@media screen and (min-width: 750px) { - .collage { - grid-auto-flow: column; - grid-column-gap: var(--grid-desktop-horizontal-spacing); - grid-row-gap: var(--grid-desktop-vertical-spacing); - grid-template-columns: repeat(3, minmax(0, 1fr)); - } - - .collage__item--left:nth-child(3n - 2) { - grid-column: 1 / span 2; - grid-row: span 2; - } - - .collage__item--left:nth-child(3n - 2):last-child { - grid-column: 1 / span 3; - } - - .collage__item--left:nth-child(3n - 1), - .collage__item--left:nth-child(3n) { - grid-column-start: 3; - } - - .collage__item--left:nth-child(3n - 1):last-child { - grid-row: span 2; - } - - .collage__item--right:nth-child(3n - 2) { - grid-column: 1 / span 1; - grid-row: span 1; - } - - .collage__item--right:nth-child(3n - 2):last-child { - grid-column: 1 / span 3; - } - - .collage__item--right:nth-child(3n - 1) { - grid-column-start: 1; - } - - .collage__item--right:nth-child(3n-1):last-child { - grid-column: span 2; - } - - .collage__item--right:nth-child(3n) { - grid-column: 2 / span 2; - grid-row: span 2; - } - - .collage__item--collection:only-child, - .collage__item--product:only-child { - justify-self: center; - max-width: 73rem; - width: 100%; - } -} - -.collage-card { - height: 100%; - position: relative; - border-radius: var(--border-radius); - border: var(--border-width) solid rgba(var(--color-foreground), var(--border-opacity)); - padding: var(--image-padding); -} - -/* Needed for gradient continuity with or without animation, background-attachment: local scopes the gradient to its container which happens automatically when a transform is applied (animation on scroll) */ -.collage-card.gradient { - transform: perspective(0); -} - -.collage-card:after { - content: ''; - position: absolute; - z-index: -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)); - width: calc(var(--border-width) * 2 + 100%); - height: calc(var(--border-width) * 2 + 100%); - top: calc(var(--border-width) * -1); - left: calc(var(--border-width) * -1); -} - -.collage-card.product-card-wrapper { - --border-radius: var(--product-card-corner-radius); - --border-width: var(--product-card-border-width); - --border-opacity: var(--product-card-border-opacity); - --shadow-horizontal-offset: var(--product-card-shadow-horizontal-offset); - --shadow-vertical-offset: var(--product-card-shadow-vertical-offset); - --shadow-blur-radius: var(--product-card-shadow-blur-radius); - --shadow-opacity: var(--product-card-shadow-opacity); - --shadow-visible: var(--product-card-shadow-visible); - --image-padding: var(--product-card-image-padding); -} - -.collage-card .media { - height: 100%; - overflow: hidden; - border-radius: calc(var(--border-radius) - var(--border-width) - var(--image-padding)); -} - -.collage-card .deferred-media { - height: 100%; - overflow: visible; -} - -.collage-card__link { - display: block; - height: 100%; -} - -.collage-card .deferred-media__poster { - background-color: transparent; - border: 0; -} - -.collage-card .deferred-media__poster:after { - content: ''; - position: absolute; - z-index: 1; - outline-offset: 0.3rem; - bottom: calc(var(--border-width) * -1); - left: calc(var(--border-width) * -1); - right: calc(var(--border-width) * -1); - top: calc(var(--border-width) * -1); -} - -.collage-card .deferred-media__poster:focus:after { - box-shadow: 0 0 0 0.3rem rgb(var(--color-background)), 0 0 0.5rem 0.4rem rgba(var(--color-foreground), 0.3); - outline: 0.2rem solid rgba(var(--color-foreground), 0.5); -} - -.collage-card .deferred-media__poster:focus-visible:after { - box-shadow: 0 0 0 0.3rem rgb(var(--color-background)), 0 0 0.5rem 0.4rem rgba(var(--color-foreground), 0.3); - outline: 0.2rem solid rgba(var(--color-foreground), 0.5); -} - -.collage-card .deferred-media__poster:focus:not(:focus-visible), -.collage-card .deferred-media__poster:focus:not(:focus-visible):after { - outline: none; - box-shadow: none; -} - -.collage-card .deferred-media__poster:focus { - outline: none; - box-shadow: none; -} diff --git a/assets/collapsible-content.css b/assets/collapsible-content.css deleted file mode 100644 index 232ce8da717..00000000000 --- a/assets/collapsible-content.css +++ /dev/null @@ -1,128 +0,0 @@ -.collapsible-content { - position: relative; - z-index: 0; -} - -.collapsible-section-layout { - padding-bottom: 5rem; - padding-top: 5rem; -} - -@media screen and (min-width: 750px) { - .collapsible-section-layout { - padding-bottom: 7rem; - padding-top: 7rem; - } -} - -/* Needed for gradient continuity with or without animation so that transparent PNG images come up as we would expect */ -.collapsible-content__media { - background: transparent; -} - -.collapsible-content__media--small { - height: 19.4rem; -} - -.collapsible-content__media--large { - height: 43.5rem; -} - -@media screen and (min-width: 750px) { - .collapsible-content__media--small { - height: 31.4rem; - } - - .collapsible-content__media--large { - height: 69.5rem; - } -} - -@media screen and (min-width: 750px) { - .collapsible-content__grid--reverse { - flex-direction: row-reverse; - } -} - -.collapsible-content-wrapper-narrow { - margin: 0 auto; - padding-right: 1.5rem; - padding-left: 1.5rem; - max-width: 73.4rem; -} - -.collapsible-content__header { - word-break: break-word; -} - -.collapsible-content__heading { - margin-bottom: 2rem; - margin-top: 0; -} - -@media screen and (min-width: 750px) { - .collapsible-content__heading { - margin-bottom: 3rem; - } -} - -.collapsible-none-layout .accordion + .accordion { - border-top: 0; -} - -.collapsible-row-layout .accordion:not(:first-child):not(.color-scheme-1) { - margin-top: 1rem; -} - -.caption-with-letter-spacing + h2 { - margin-top: 1rem; -} - -@media screen and (min-width: 750px) { - .collapsible-content .accordion { - margin-top: 0; - } -} - -.collapsible-row-layout .accordion { - border: var(--text-boxes-border-width) solid rgba(var(--color-foreground), var(--text-boxes-border-opacity)); - margin-bottom: 1.5rem; - /* Needed for gradient continuity with or without animation, the transform scopes the gradient to its container which happens already when animation are turned on */ - transform: perspective(0); -} - -.collapsible-row-layout .accordion summary, -.collapsible-row-layout .accordion .accordion__content { - padding: 1.5rem; -} - -.collapsible-row-layout .accordion .accordion__content { - padding-top: 0; -} - -.collapsible-content summary:hover { - background: rgba(var(--color-foreground), 0.04); -} - -.collapsible-content summary:hover .accordion__title { - text-decoration: underline; - text-underline-offset: 0.3rem; -} - -/* check for flexbox gap in older Safari versions */ -@supports not (inset: 10px) { - @media screen and (min-width: 750px) { - .collapsible-content__grid:not(.collapsible-content__grid--reverse) .grid__item:last-child, - .collapsible-content__grid--reverse .collapsible-content__grid-item { - padding-left: 5rem; - padding-right: 0; - } - } - - @media screen and (min-width: 990px) { - .collapsible-content__grid:not(.collapsible-content__grid--reverse) .grid__item:last-child, - .collapsible-content__grid--reverse .collapsible-content__grid-item { - padding-left: 7rem; - } - } -} diff --git a/assets/collapsible-tabs.js b/assets/collapsible-tabs.js new file mode 100644 index 00000000000..5c88218fcdd --- /dev/null +++ b/assets/collapsible-tabs.js @@ -0,0 +1,40 @@ +if (!customElements.get('collapsible-tabs')) { + customElements.define( + 'collapsible-tabs', + class CollapsibleTabs extends HTMLElement { + constructor() { + super(); + } + + connectedCallback() { + this.detailsElements = this.querySelectorAll('.accordion-details'); + this.colorScheme = this.dataset.colorScheme; + + this.detailsElements.length > 0 && + this.detailsElements.forEach((details) => { + details.open ? this.handleOpen(details) : this.handleClose(details); + details.addEventListener('toggle', this.onToggle.bind(this)); + }); + } + + onToggle(event) { + const activeDetails = event.target; + if (activeDetails.open) { + this.handleOpen(activeDetails); + } else { + this.handleClose(activeDetails); + } + } + + handleOpen(details) { + const parent = details.closest('.accordion-item'); + parent.classList.contains('accordion-card') && parent.classList.add(this.colorScheme); + } + + handleClose(details) { + const parent = details.closest('.accordion-item'); + parent.classList.contains('accordion-card') && parent.classList.remove(this.colorScheme); + } + } + ); +} diff --git a/assets/collection-cards.js b/assets/collection-cards.js new file mode 100644 index 00000000000..544c35ef957 --- /dev/null +++ b/assets/collection-cards.js @@ -0,0 +1,131 @@ +if (!customElements.get('collection-cards')) { + customElements.define( + 'collection-cards', + class CollectionCards extends HTMLElement { + constructor() { + super(); + } + + connectedCallback() { + this.selectors = { + cardsWrap: '.collection-cards__inner', + nextEl: '.swiper-button-next', + prevEl: '.swiper-button-prev', + }; + + this.classes = { + grid: 'f-grid', + swiper: 'swiper', + swiperWrapper: 'swiper-wrapper', + }; + + this.sectionId = this.dataset.sectionId; + this.section = this.closest(`.section-${this.sectionId}`); + this.enableSlider = this.dataset.enableSlider === 'true'; + this.items = parseInt(this.dataset.items) || 2; + this.tabletItems = parseInt(this.dataset.tabletItems) || 2; + this.totalItems = parseInt(this.dataset.totalItems) || 0; + this.cardsWrap = this.querySelector(this.selectors.cardsWrap); + + this.sliderInstance = false; + if (!this.enableSlider) return; + + if (!this.cardsWrap) return; + + const mql = window.matchMedia(FoxTheme.config.mediaQueryMobile); + mql.onchange = this.init.bind(this); + + const mqlTablet = window.matchMedia(FoxTheme.config.mediaQueryTablet); + mqlTablet.onchange = this.init.bind(this); + + this.init(); + } + + init() { + if (FoxTheme.config.mqlMobile) { + this.destroySlider(); + } else { + const currentItems = FoxTheme.config.mqlTablet ? this.tabletItems : this.items; + + if (this.totalItems > currentItems) { + this.initSlider(); + } else { + this.destroySlider(); + } + } + } + + initSlider() { + if (typeof this.sliderInstance === 'object') return; + + const columnGap = window.getComputedStyle(this.cardsWrap).getPropertyValue('--f-column-gap'); + const spaceBetween = parseFloat(columnGap.replace('rem', '')) * 10; + + this.sliderOptions = { + slidesPerView: 2, + spaceBetween: spaceBetween, + navigation: { + nextEl: this.section.querySelector(this.selectors.nextEl), + prevEl: this.section.querySelector(this.selectors.prevEl), + }, + breakpoints: { + 768: { + slidesPerView: this.tabletItems, + }, + 1024: { + slidesPerView: this.items, + }, + }, + loop: false, + threshold: 2, + mousewheel: { + enabled: true, + forceToAxis: true, + }, + }; + + this.classList.add(this.classes.swiper); + this.cardsWrap.classList.remove(this.classes.grid); + this.cardsWrap.classList.add(this.classes.swiperWrapper); + + this.sliderInstance = new window.FoxTheme.Carousel(this, this.sliderOptions, [FoxTheme.Swiper.Mousewheel]); + this.sliderInstance.init(); + this.handleAccessibility(); + } + + handleAccessibility() { + const focusableElements = FoxTheme.a11y.getFocusableElements(this); + + focusableElements.forEach((element) => { + element.addEventListener('focusin', (event) => { + if (event.relatedTarget !== null) { + if (element.closest('.swiper-slide')) { + const slide = element.closest('.swiper-slide'); + this.sliderInstance.slider.slideTo(this.sliderInstance.slider.slides.indexOf(slide)); + } + } else { + element.blur(); + } + }); + }); + + if (Shopify.designMode) { + document.addEventListener('shopify:block:select', (e) => { + if (e.detail.sectionId !== this.sectionId) return; + const index = Number(e.target.dataset.index); + this.sliderInstance.slider.slideTo(index); + }); + } + } + + destroySlider() { + this.classList.remove(this.classes.swiper); + this.cardsWrap.classList.remove(this.classes.swiperWrapper); + this.cardsWrap.classList.add(this.classes.grid); + if (typeof this.sliderInstance !== 'object') return; + this.sliderInstance.slider.destroy(); + this.sliderInstance = false; + } + } + ); +} diff --git a/assets/collection-item-slider.js b/assets/collection-item-slider.js new file mode 100644 index 00000000000..848922b0dc6 --- /dev/null +++ b/assets/collection-item-slider.js @@ -0,0 +1,122 @@ +if (!customElements.get('collection-item-slider')) { + customElements.define( + 'collection-item-slider', + class CollectionItemSlider extends HTMLElement { + constructor() { + super(); + } + + connectedCallback() { + this.enableSlider = this.dataset.enableSlider === 'true'; + this.enableSliderMobile = this.dataset.enableSliderMobile === 'true'; + if (!this.enableSlider && !this.enableSliderMobile) return; + + this.selectors = { + productsWrap: '.collection-item-slider__products-wrap', + products: '.collection-item-slider__products', + }; + + this.classes = { + grid: 'f-grid', + swiper: 'swiper', + swiperWrapper: 'swiper-wrapper', + }; + + this.productsWrap = this.querySelector(this.selectors.productsWrap); + this.products = this.querySelector(this.selectors.products); + this.sliderInstance = false; + const mql = window.matchMedia(FoxTheme.config.mediaQueryMobile); + mql.onchange = this.init.bind(this); + this.init(); + } + + init() { + if (FoxTheme.config.mqlMobile) { + if (this.enableSliderMobile) { + this.initSlider(); + } else { + this.destroySlider(); + } + } else { + if (this.enableSlider) { + this.initSlider(); + } else { + this.destroySlider(); + } + } + } + + + initSlider() { + if (typeof this.sliderInstance === 'object') return; + + const items = parseInt(this.dataset.items); + const columnGap = window.getComputedStyle(this.products).getPropertyValue('--f-column-gap'); + const spaceBetween = parseFloat(columnGap.replace('rem', '')) * 10; + + this.sliderOptions = { + slidesPerView: 'auto', + spaceBetween: spaceBetween, + breakpoints: { + 768: { + slidesPerView: items, + }, + }, + navigation: { + nextEl: this.querySelector('.swiper-button-next'), + prevEl: this.querySelector('.swiper-button-prev'), + }, + loop: true, + threshold: 2, + }; + + this.productsWrap.classList.add(this.classes.swiper); + this.products.classList.remove(this.classes.grid); + this.products.classList.add(this.classes.swiperWrapper); + this.sliderInstance = new window.FoxTheme.Carousel(this.productsWrap, this.sliderOptions); + this.sliderInstance.init(); + + this.handleAccessibility(); + this.fixQuickviewDuplicate(); + } + + handleAccessibility() { + const focusableElements = FoxTheme.a11y.getFocusableElements(this); + + focusableElements.forEach((element) => { + element.addEventListener('focusin', (event) => { + if (event.relatedTarget !== null) { + if (element.closest('.swiper-slide')) { + const slide = element.closest('.swiper-slide'); + this.sliderInstance.slider.slideTo(this.sliderInstance.slider.slides.indexOf(slide)); + } + } else { + element.blur(); + } + }); + }); + } + + destroySlider() { + this.productsWrap.classList.remove(this.classes.swiper); + this.products.classList.remove(this.classes.swiperWrapper); + this.products.classList.add(this.classes.grid); + if (typeof this.sliderInstance !== 'object') return; + this.sliderInstance.slider.destroy(); + this.sliderInstance = false; + } + + fixQuickviewDuplicate() { + let modalIds = []; + Array.from(this.querySelectorAll('quick-view-modal')).forEach((modal) => { + const modalID = modal.getAttribute('id'); + if (modalIds.includes(modalID)) { + modal.remove(); + } else { + modalIds.push(modalID); + } + }); + } + } + ); +} diff --git a/assets/collection-list.js b/assets/collection-list.js new file mode 100644 index 00000000000..35af257d729 --- /dev/null +++ b/assets/collection-list.js @@ -0,0 +1,118 @@ +if (!customElements.get('collection-list')) { + class CollectionList extends HTMLElement { + constructor() { + super(); + } + + connectedCallback() { + this.selectors = { + sliderWrapper: '.collection-list__items', + nextEl: '.swiper-button-next', + prevEl: '.swiper-button-prev', + }; + + this.classes = { + grid: 'f-grid', + swiper: 'swiper', + swiperWrapper: 'swiper-wrapper', + }; + + this.sectionId = this.dataset.sectionId; + this.section = this.closest(`.section-${this.sectionId}`); + this.sliderWrapper = this.querySelector(this.selectors.sliderWrapper); + this.cardStyle = this.dataset.cardStyle; + this.itemSize = this.dataset.itemSize; + this.columnsDesktop = this.dataset.columnsDesktop; + + this.sliderInstance = false; + + const mql = window.matchMedia(FoxTheme.config.mediaQueryMobile); + mql.onchange = this.init.bind(this); + this.init(); + } + + init() { + if (FoxTheme.config.mqlMobile) { + this.destroySlider(); + } else { + this.initSlider(); + } + } + + initSlider() { + const sliderOptions = { + modules: [FoxTheme.Swiper.Navigation, FoxTheme.Swiper.Pagination, FoxTheme.Swiper.Mousewheel], + slidesPerView: 'auto', + spaceBetween: 8, + navigation: { + nextEl: this.section.querySelector(this.selectors.nextEl), + prevEl: this.section.querySelector(this.selectors.prevEl), + }, + pagination: false, + loop: false, + threshold: 2, + mousewheel: { + enabled: true, + forceToAxis: true, + }, + breakpoints: { + 768: { + spaceBetween: this.cardStyle == 'card' ? 8 : 20, + slidesPerView: this.itemSize == 'fixed' ? (this.columnsDesktop > 4 ? 4 : this.columnsDesktop) : 'auto', + }, + 1024: { + spaceBetween: this.cardStyle == 'card' ? 8 : 20, + slidesPerView: + this.itemSize == 'fixed' + ? this.columnsDesktop > 6 + ? this.columnsDesktop - 1 + : this.columnsDesktop + : 'auto', + }, + 1280: { + spaceBetween: this.cardStyle == 'card' ? 8 : 20, + slidesPerView: this.itemSize == 'fixed' ? this.columnsDesktop : 'auto', + }, + }, + }; + + if (typeof this.sliderInstance !== 'object') { + this.classList.add(this.classes.swiper); + this.sliderWrapper.classList.remove(this.classes.grid); + this.sliderWrapper.classList.add(this.classes.swiperWrapper); + + this.sliderInstance = new window.FoxTheme.Carousel(this, sliderOptions); + this.sliderInstance.init(); + + const focusableElements = FoxTheme.a11y.getFocusableElements(this); + + focusableElements.forEach((element) => { + element.addEventListener('focusin', () => { + const slide = element.closest('.swiper-slide'); + this.sliderInstance.slider.slideTo(this.sliderInstance.slider.slides.indexOf(slide)); + }); + }); + + if (Shopify.designMode) { + document.addEventListener('shopify:block:select', (e) => { + if (e.detail.sectionId != this.sectionId) return; + let { target } = e; + const index = Number(target.dataset.index); + + this.sliderInstance.slider.slideTo(index); + }); + } + } + } + + destroySlider() { + this.classList.remove(this.classes.swiper); + this.sliderWrapper.classList.remove(this.classes.swiperWrapper); + this.sliderWrapper.classList.add(this.classes.grid); + if (typeof this.sliderInstance !== 'object') return; + this.sliderInstance.slider.destroy(); + this.sliderInstance = false; + } + } + customElements.define('collection-list', CollectionList); +} diff --git a/assets/collection-tabs.js b/assets/collection-tabs.js new file mode 100644 index 00000000000..2a55d02bfb8 --- /dev/null +++ b/assets/collection-tabs.js @@ -0,0 +1,73 @@ +if (!customElements.get('collection-tabs')) { + customElements.define( + 'collection-tabs', + class CollectionTabs extends HTMLElement { + constructor() { + super(); + + this.tab = this.querySelector('tabs-component'); + this.tabPanels = this.querySelectorAll('[role="tabpanel"]'); + this.tabNavs = this.querySelectorAll('[role="tab"]'); + this.contentWrapper = this.querySelector('.collection-tabs__content'); + this.imagesWrapper = this.querySelector('.collection-tabs__images'); + this.tooltipEl = this.querySelector('.tooltip-element'); + this.alignItems = window.getComputedStyle(this).getPropertyValue('align-items'); + + this.init(); + } + + connectedCallback() { + this.tab.addEventListener('tabChange', (event) => { + this.handleTabChange(event); + }); + } + + init() { + this.handleTooltip(0); + this.calculatePadding(); + window.addEventListener('resize', this.calculatePadding.bind(this)); + } + + handleTabChange(event) { + const {selectedIndex} = event.detail; + this.handleTooltip(selectedIndex); + + this.imagesWrapper.querySelectorAll('.collection-tabs__image').forEach((image) => image.classList.remove('is-active')); + this.imagesWrapper.querySelector(`.collection-tabs__image[data-index="${selectedIndex}"]`).classList.add('is-active'); + } + + handleTooltip(tabIndex) { + if (!window.matchMedia("(hover: hover)").matches) return; + const currentTab = this.tabPanels[tabIndex]; + const productListWrapper = currentTab.querySelector('.collection-tab__products'); + const hoverEls = productListWrapper.querySelectorAll('a'); + + hoverEls.forEach((el) => { + el.addEventListener('mousemove', (e) => { + const { target } = e; + const title = target.dataset.title; + + this.tooltipEl.innerHTML = title; + + this.tooltipEl.style.opacity = '1'; + this.tooltipEl.style.top = `${e.clientY - this.tooltipEl.offsetHeight - 5}px`; + this.tooltipEl.style.left = `${e.clientX}px`; + }); + + el.addEventListener('mouseleave', (e) => { + this.tooltipEl.style.opacity = '0'; + }) + }); + } + + calculatePadding() { + const contentHeight = this.contentWrapper.offsetHeight + const ImageHeight = this.imagesWrapper.offsetHeight + const diff = Math.abs(ImageHeight - contentHeight); + + if ( this.alignItems === 'center' || diff < 0 ) return; + this.contentWrapper.style.marginTop = `${diff / 2}px` + } + } + ); +} diff --git a/assets/collection.css b/assets/collection.css new file mode 100644 index 00000000000..2f9746a9343 --- /dev/null +++ b/assets/collection.css @@ -0,0 +1,289 @@ +.collection__content { + --facet-width: clamp(220px, calc(20% + 0.6rem), 330px); +} +.collection__content #FacetFiltersContainer { + flex: 0 0 var(--facet-width); + padding-inline-end: 3rem; +} +.collection__toolbar { + background: rgb(var(--color-background)); + padding-block: 1.2rem; + margin-bottom: 1.2rem; +} +.collection__toolbar-left { + gap: 1.6rem; +} +@media (min-width: 1024px) { + .collection__toolbar-left { + gap: 1.6rem 2.4rem; + } +} +.collection__toolbar-right { + gap: 1.6rem; +} +@media (min-width: 1024px) { + .collection__toolbar-right { + gap: 1.6rem 3.2rem; + } +} +.collection .card-media { + height: 100%; +} +.collection .card-media--link { + height: 100%; +} +.collection .card-media__media { + height: 100%; +} + +.facet-accordion-details { + border-bottom: 0.1rem solid rgba(var(--color-border), var(--color-border-alpha, 1)); +} +.facet-accordion-details .accordion-details__summary { + padding-block: 2.4rem; + border: 0; +} +.facet-accordion-details .accordion-details__content { + padding-block: 0 2.4rem; + margin-top: -1.2rem; +} +.facet-accordion-details:nth-child(2) .accordion-details__summary { + padding-top: 0; +} +.facet-accordion-details:last-child { + border-bottom: 0; +} +.facet-accordion-details:last-child .accordion-details__content { + padding-bottom: 0; +} + +price-range { + gap: 1.8rem; +} + +.facet-range { + -webkit-appearance: none; + appearance: none; + background: none; + height: 0.4rem; + vertical-align: top; + margin: 0; +} +.facet-range__max { + inset-block-start: 0; + inset-inline-start: 0; +} +.facet-range-wrapper { + --range-min: 0%; + --range-max: 100%; + background: linear-gradient(to var(--transform-origin-end), rgba(var(--color-border), var(--color-border-alpha, 1)) var(--range-min), rgb(var(--color-foreground)) var(--range-min), rgb(var(--color-foreground)) var(--range-max), rgba(var(--color-border), var(--color-border-alpha, 1)) var(--range-max)); + border-radius: 0; + height: 0.4rem; +} +.facet-range__input { + -webkit-appearance: textfield; + appearance: textfield; +} +.facet-range__input::-webkit-inner-spin-button, .facet-range__input::-webkit-outer-spin-button { + -webkit-appearance: none; + margin: 0; +} +.facet-range::-webkit-slider-thumb { + -webkit-margin-before: -6px; + -webkit-appearance: none; + border: 1px solid rgb(var(--color-foreground)); + background-color: rgb(var(--color-background)); + border-radius: 100%; + box-shadow: none; + cursor: pointer; + height: 16px; + margin-block-start: -6px; + position: relative; + width: 16px; + z-index: 1; +} +.facet-range::-webkit-slider-runnable-track { + background-color: #ccc; + border: none; + border-radius: 2px; + cursor: pointer; + height: 4px; + width: 100%; +} +.facet-range::-moz-range-thumb { + background-color: rgb(var(--color-background)); + border: 2px solid rgb(var(--color-foreground)); + border-radius: 100%; + cursor: pointer; + height: 12px; + width: 12px; +} +.facet-range::-moz-range-progress, .facet-range::-moz-range-track { + border: none; + border-radius: 2px; + cursor: pointer; + height: 4px; + width: 100%; +} +.facet-range::-webkit-slider-runnable-track { + background: none; +} +.facet-range::-moz-range-progress { + background-color: rgb(var(--color-foreground)); +} +.facet-range::-moz-range-track { + background-color: rgb(var(--border-color)); +} +.facet-range::-webkit-slider-thumb { + pointer-events: auto; +} +.facet-range::-moz-range-thumb { + pointer-events: auto; +} +.facet-range::-moz-range-progress, .facet-range::-moz-range-track { + background: none; +} +@media not screen and (pointer: fine) { + .facet-range::-webkit-slider-thumb { + height: 20px; + margin-block-start: -9px; + width: 20px; + } + .facet-range::-moz-range-thumb { + height: 16px; + width: 16px; + } +} + +.facet-remove { + height: auto; + font-weight: inherit; + padding-inline: 1.2rem; + padding-block: 0.3rem; +} +.facet-remove .swatch-color { + --swatch-size: 1.6rem; + border: 0; +} + +.facet-short select { + --inputs-border-width: 1px; + background-color: rgb(var(--color-background)); + color: rgb(var(--color-foreground)); + border-color: rgba(var(--color-border), var(--color-border-alpha, 1)); +} + +.facet-drawer .drawer__body { + padding-bottom: 0; +} +.facet-drawer .drawer__sticky--bottom { + width: auto; + padding: 2rem; + margin-inline: -2rem; +} + +.facet-drawer-button { + padding-inline: 1.6rem; +} + +.facet-short-drawer { + padding-block-end: 2.4rem; + margin-block-end: 2.4rem; + border-bottom: 0.1rem solid rgba(var(--color-border), var(--color-border-alpha, 1)); +} + +.facets-active { + margin-bottom: 2.4rem; +} +.facets-active a:nth-last-child(1 of .facet-remove) { + margin-inline-end: 2rem; +} + +#ProductsList[data-layout=grid] .product-card-style-card .article-card__media { + margin: 0; + border-radius: var(--pcard-radius) var(--pcard-radius) 0 0; +} +#ProductsList[data-layout=grid] .product-card-style-card .article-card__content { + padding: 1.2rem; +} +#ProductsList[data-layout=list] { + display: block !important; +} +#ProductsList[data-layout=list] .product-card__wrapper { + display: flex; + align-items: center; + gap: 2rem 2.4rem; +} +#ProductsList[data-layout=list] .product-card__image-wrapper { + flex-shrink: 0; + width: var(--pcard-media-width, 16.5rem); + max-width: 50%; +} +#ProductsList[data-layout=list] .product-card__info { + text-align: start; + flex-grow: 1; + padding: 0; +} +#ProductsList[data-layout=list] .product-card__swatches, +#ProductsList[data-layout=list] .product-card .f-price { + justify-content: flex-start; +} +#ProductsList[data-layout=list] .article-card { + display: flex; + align-items: center; + gap: 2rem 2.4rem; +} +#ProductsList[data-layout=list] .article-card__media { + flex-shrink: 0; + width: var(--pcard-media-width, 16.5rem); + max-width: 50%; + margin: 0; +} +#ProductsList[data-layout=list] .article-card__content { + text-align: start; + flex-grow: 1; + padding: 0; +} +#ProductsList[data-layout=list] .image-column { + display: none; +} +#ProductsList[data-layout=list] .product-card-style-card .product-card__image-wrapper { + border-radius: var(--pcard-radius); +} +#ProductsList[data-layout=list].products-list--list-standard .f-column { + padding-bottom: 2.4rem; + margin-bottom: 2.4rem; + border-bottom: 0.1rem solid rgba(var(--color-border), var(--color-border-alpha, 1)); +} +#ProductsList[data-layout=list].products-list--list-standard .f-column:last-child { + margin-bottom: 0; +} +#ProductsList[data-layout=list].products-list--list-card .f-column { + margin-bottom: 1rem; +} +#ProductsList[data-layout=list].products-list--list-card .f-column:last-child { + margin-bottom: 0; +} +#ProductsList[data-layout=list].products-list--list-card .product-card { + padding: 1.6rem; + border-radius: var(--pcard-radius); +} +@media (min-width: 768px) { + #ProductsList[data-layout=list].products-list--list-standard { + --pcard-media-width: 24.4rem; + } + #ProductsList[data-layout=list].products-list--list-card { + --pcard-media-width: 18rem; + } + #ProductsList[data-layout=list] .product-card__image-wrapper { + max-width: 30%; + margin-inline-end: 0.8rem; + } + #ProductsList[data-layout=list] .product-card__list-actions { + display: flex; + } + #ProductsList[data-layout=list] .article-card__media { + max-width: 30%; + margin-inline-end: 0.8rem; + } +} diff --git a/assets/compare.css b/assets/compare.css new file mode 100644 index 00000000000..a76ca51fa92 --- /dev/null +++ b/assets/compare.css @@ -0,0 +1,216 @@ +.product-card__compare { + position: absolute; + top: 1rem; + inset-inline-end: 1rem; +} +.product-card__compare label:before { + content: ""; + position: absolute; + inset: -9px; +} + +.compare-bar { + --item-width: 7rem; + position: fixed; + bottom: 0; + transform: translateY(100%); + box-shadow: 0 -6px 10px rgba(var(--color-foreground), 0.08); + will-change: transform; + transition: transform 0.3s; +} +.compare-bar__list-wrap { + padding-block: 1.2rem 0.6rem; + margin-bottom: 0.6rem; +} +.compare-bar__list { + margin-top: 0.8rem; +} +.compare-bar__actions-wrap { + padding-block: 1.2rem; +} +.compare-bar__item { + position: relative; + border-radius: var(--small-blocks-radius); + width: var(--item-width); + height: var(--item-width); +} +.compare-bar__item:has(.media-wrapper) { + margin-inline-end: 0.6rem; +} +.compare-bar__item:not(:has(.media-wrapper)) { + background: #f3f3f3; + border: 2px dashed rgba(var(--color-foreground), 0.2); +} +.compare-bar__item-remove { + position: absolute; + top: -0.8rem; + inset-inline-end: -0.6rem; + padding: 0; + height: 2.4rem; + width: 2.4rem; + box-shadow: 0 0 8px rgba(var(--color-foreground), 0.15); +} +.compare-bar__toggle-list { + height: auto; + padding: 0; +} +.compare-bar__toggle-list:before { + content: ""; + position: absolute; + inset: -0.9rem; +} +.compare-bar__toggle-list .icon { + transition: all var(--duration-default); +} +.is-show-list .compare-bar__toggle-list .icon { + transform: rotate(180deg); +} +.compare-bar__clear-mobile { + padding-block: 0.6rem 1.8rem; +} +@media (max-width: 767.98px) { + .compare-bar { + padding: 0; + } + .compare-bar__inner > * { + padding-inline: var(--page-padding); + } + .compare-bar__list-wrap { + width: 100%; + border-top: 1px solid rgba(var(--color-border), var(--color-border-alpha, 1)); + } + .compare-bar__list { + padding-inline: 1.5rem; + margin-inline: -1.5rem; + } + .compare-bar:not(.is-show-list) .compare-bar__list-wrap, .compare-bar:not(.is-show-list) .compare-bar__clear-mobile { + display: none !important; + } +} + +.compare-drawer { + --heading-col-width: 18rem; + --product-col-width: 23.2rem; + --modal-gap: 3rem; + --modal-width: max( + 71rem, + calc(var(--number-items, 2) * var(--product-col-width) + var(--heading-col-width) + 6.6rem) + ); +} +.compare-drawer__title { + margin-bottom: 1.6rem; +} + +.compare-table { + border-collapse: collapse; + width: 100%; + table-layout: fixed; + border: 0; +} +.compare-table-container { + max-width: 100%; +} +.compare-table th, +.compare-table td { + position: relative; + padding: var(--col-gap-y, 2rem) var(--col-gap-x, 1.6rem); + text-align: start; + vertical-align: top; + z-index: 0; + width: var(--product-col-width); +} +.compare-table th:before, +.compare-table td:before { + content: ""; + position: absolute; + inset: 0; + z-index: -1; + border: 0.1rem solid rgba(var(--color-border), var(--color-border-alpha, 1)); + border-bottom-width: 0; + border-inline-start-width: 0; + pointer-events: none; +} +.compare-table th:first-child, +.compare-table td:first-child { + width: var(--heading-col-width); +} +.compare-table th:last-child:before, +.compare-table td:last-child:before { + border-inline-end-width: 0; +} +.compare-table tr:first-child td:before { + border-top-width: 0; +} +.compare-table tr[data-compare-key=info] td { + padding: 2.4rem 3.2rem; +} +.compare-table tr[data-compare-key=info]:first-child td:before { + top: 2.4rem; +} +.compare-table__col-info { + padding-top: 1.2rem; +} +.compare-table__col-info .btn { + margin-top: 1.2rem; +} +.compare-table--remove { + position: absolute; + top: -1.1rem; + inset-inline-end: -1.4rem; + padding: 0; + height: 3.2rem; + width: 3.2rem; + box-shadow: 0 0 8px rgba(var(--color-foreground), 0.15); +} + +@media (min-width: 768px) { + .compare-table th:first-child, + .compare-table td:first-child { + z-index: 9; + position: sticky; + inset-inline-start: 0; + } +} +@media (max-width: 767.98px) { + .compare-drawer { + --modal-gap: 3.2rem 1.6rem; + --heading-col-width: 10rem; + --product-col-width: 16rem; + } + .compare-drawer__title { + margin-bottom: 0.8rem; + } + .compare-table { + --col-gap-x: 1.2rem; + --col-gap-y: 1.2rem; + font-size: calc(var(--font-body-size) * 0.8); + line-height: 2rem; + } + .compare-table tr[data-compare-key=info] td { + padding: 1.6rem 1.5rem 1.2rem; + } + .compare-table tr[data-compare-key=info]:first-child td:before { + top: 1.6rem; + } + .compare-table .product-featured-image { + margin-inline: 1.5rem; + } + .compare-table--remove { + top: -0.8rem; + inset-inline-end: -1.1rem; + width: 2.4rem; + height: 2.4rem; + } +} +.is-product-comparing { + padding-bottom: var(--compare-bar-height); +} +.is-product-comparing .product-card__quickview { + display: none; +} +.is-product-comparing .product-card__compare { + display: block !important; +} +.is-product-comparing .compare-bar { + transform: translateZ(0); +} diff --git a/assets/compare.js b/assets/compare.js new file mode 100644 index 00000000000..14546645a6d --- /dev/null +++ b/assets/compare.js @@ -0,0 +1,602 @@ +class CompareUtils { + static cookieName = 'hypertheme:compare-products'; + + /** + * + * @returns {array} + */ + static getSelectedProducts() { + const products = FoxTheme.utils.getStorage(this.cookieName); + return products || []; + } + + static setSelectedProducts(products) { + if (products.length > 0) { + FoxTheme.utils.setStorage(this.cookieName, products); + } else { + localStorage.removeItem(this.cookieName); + } + } + + static getProductsCount() { + return this.getSelectedProducts().length; + } + + /** + * Check the given product id in compare list. + * @param {*} productId + * @returns {boolean} + */ + static isProductInList(productId) { + const products = this.getSelectedProducts(); + + return products.find((product) => product.id === productId); + } + + /** + * + * @param {*} productId + * @param {*} productUrl + * @returns {boolean} True if the product added to list. + */ + static addToList(productId, productUrl) { + let products = FoxTheme.utils.getStorage(this.cookieName) || []; + + if (products.length < FoxTheme.compare.maxProductsInCompare) { + if (!products.some((product) => product.id === productId)) { + products.push({ id: productId, url: productUrl }); + } + + this.setSelectedProducts(products); + this.updateCompareCheckboxes(products); + + FoxTheme.pubsub.publish('compare:add', { products: products, productId: productId, productUrl: productUrl }); + + return true; + } else { + alert(FoxTheme.compare.alertMessage); + + return false; + } + } + + static removeFromList(productId) { + let products = this.getSelectedProducts(); + if (products) { + products = products.filter((product) => product.id !== productId); + } + this.setSelectedProducts(products); + this.updateCompareCheckboxes(products); + FoxTheme.pubsub.publish('compare:remove', { products: products, productId: productId }); + } + + static clearList() { + const products = this.getSelectedProducts(); + if (products) { + products.forEach((product) => { + this.removeFromList(product.id); + }); + } + } + + static updateCompareCheckboxes(products = null) { + products = products || this.getSelectedProducts(); + document.querySelectorAll('.js-compare-checkbox').forEach((checkbox) => { + checkbox.checked = products.filter((product) => product.id === checkbox.dataset.productId).length; + }); + } + + static getTemplateUrl(productUrl, queryObj = {}) { + let url = productUrl; + const separator = productUrl.includes('?') ? '&' : '?'; + const params = new URLSearchParams(); + + for (const key in queryObj) { + if (Object.prototype.hasOwnProperty.call(queryObj, key)) { + params.append(key, queryObj[key]); + } + } + + // Append parameters to the URL if any were added. + if (Array.from(params).length > 0) { + url += `${separator}${params.toString()}`; + } + + return url; + } + + static getCompareBarItemTemplate(productUrl) { + return this.getTemplateUrl(productUrl, { + sections: 'product-compare-bar-item', + }); + } +} + +class CompareSwitch extends HTMLElement { + constructor() { + super(); + + this.cookieName = 'hypertheme:compare-is-active'; + + this.classes = { + isActive: 'is-product-comparing', + }; + + this.checkboxEl = this.querySelector('input'); + this.onChangeHandler = this.onChange.bind(this); + } + + connectedCallback() { + this.init(); + this.checkboxEl.addEventListener('change', this.onChangeHandler); + } + + disconnectedCallback() { + this.checkboxEl.removeEventListener('change', this.onChangeHandler); + } + + init() { + if (FoxTheme.config.hasLocalStorage) { + const isActive = window.localStorage.getItem(this.cookieName) === 'true'; + if (isActive) { + this.checkboxEl.checked = isActive; + this.handleChange(isActive); + } + } + } + + onChange(evt) { + evt.preventDefault(); + + this.handleChange(this.checkboxEl.checked); + } + + handleChange(isActive) { + requestAnimationFrame(() => { + if (isActive) { + document.body.classList.add(this.classes.isActive); + } else { + document.body.classList.remove(this.classes.isActive); + } + }); + + FoxTheme.pubsub.publish('compare:toggle', { isActive: isActive }); + + if (FoxTheme.config.hasLocalStorage) { + window.localStorage.setItem(this.cookieName, isActive); + } + } +} +customElements.define('compare-switch', CompareSwitch); + +class CompareCheckbox extends HTMLElement { + constructor() { + super(); + + this.checkboxEl = this.querySelector('input'); + this.onChangeHandler = this.onChange.bind(this); + } + + connectedCallback() { + this.init(); + this.checkboxEl.addEventListener('change', this.onChangeHandler); + } + + disconnectedCallback() { + this.checkboxEl.removeEventListener('change', this.onChangeHandler); + } + + init() { + const { productId } = this.checkboxEl.dataset; + this.checkboxEl.checked = CompareUtils.isProductInList(productId); + } + + onChange(evt) { + evt.preventDefault(); + + const { productId, productUrl } = this.checkboxEl.dataset; + + if (this.checkboxEl.checked) { + const isAdded = CompareUtils.addToList(productId, productUrl); + if (!isAdded) { + this.checkboxEl.checked = false; + } + } else { + CompareUtils.removeFromList(productId); + } + } +} +customElements.define('compare-checkbox', CompareCheckbox); + +class CompareRemove extends HTMLButtonElement { + constructor() { + super(); + + this.onClickHandler = this.onClick.bind(this); + this.addEventListener('click', this.onClick.bind(this)); + } + + onClick(event) { + event.preventDefault(); + + const { productId } = this.dataset; + const { target } = event; + + CompareUtils.removeFromList(productId); + + const compareModal = target.closest('.compare-drawer'); + if (compareModal) { + compareModal.updateProductsCount(); + } + + if (CompareUtils.getProductsCount() < 2) { + compareModal && compareModal.hide(); + } else { + const compareTable = target.closest('.compare-table'); + if (compareTable) { + const cell = target.closest('td'); + const colIndex = cell.cellIndex; + + const rows = compareTable.querySelectorAll('tr'); + rows.forEach((row) => { + const cellToRemove = row.cells[colIndex]; + if (cellToRemove) { + cellToRemove.remove(); + } + }); + } + } + } + + disconnectedCallback() { + this.removeEventListener('click', this.onClickHandler); + } +} +customElements.define('compare-remove', CompareRemove, { extends: 'button' }); + +class CompareBar extends HTMLElement { + constructor() { + super(); + + this.selectors = { + openBtn: '.compare-bar__open', + clearBtns: ['.compare-bar__clear'], + toggleList: '.compare-bar__toggle-list', + list: '.compare-bar__list', + counter: '.compare-bar__counter', + }; + + this.classes = { + listVisible: 'is-show-list', + }; + + this.abortController = new AbortController(); + this.elements = FoxTheme.utils.queryDomNodes(this.selectors, this); + this.atLeastItemToShow = Math.min(5, FoxTheme.compare.maxProductsInCompare); // Total compare products and placeholders. + + this.elements.clearBtns.forEach((clearBtn) => { + clearBtn.addEventListener('click', this.handleClear.bind(this), { + signal: this.abortController.signal, + }); + }); + + this.elements.toggleList.addEventListener('click', this.handleToggleList.bind(this), { + signal: this.abortController.signal, + }); + + this.itemAddUnsubscriber = FoxTheme.pubsub.subscribe('compare:add', this.onItemAdded.bind(this)); + this.itemRemoveUnsubscriber = FoxTheme.pubsub.subscribe('compare:remove', this.onItemRemoved.bind(this)); + } + + itemAddUnsubscriber = undefined; + itemRemoveUnsubscriber = undefined; + + connectedCallback() { + this.renderBar(); + const mql = window.matchMedia(FoxTheme.config.mediaQueryMobile); + mql.onchange = this.setHeight.bind(this); + this.setHeight(); + } + + disconnectedCallback() { + this.abortController.abort(); + + if (this.itemAddUnsubscriber) { + this.itemAddUnsubscriber(); + } + + if (this.itemRemoveUnsubscriber) { + this.itemRemoveUnsubscriber(); + } + } + + onItemAdded(event) { + const { products, productId, productUrl } = event; + + this.appendBarItem(products, productId, productUrl); + this.toggleCompareButton(products.length); + this.updateCounters(products.length); + } + + onItemRemoved(event) { + const { products, productId } = event; + const itemToDelete = this.elements.list.querySelector(`.compare-bar__item[data-product-id="${productId}"]`); + + itemToDelete && itemToDelete.remove(); + this.toggleCompareButton(products.length); + this.updateCounters(products.length); + this.removePlaceholdes(); + this.addPlaceholders(products.length); + } + + async renderBar() { + const products = CompareUtils.getSelectedProducts(); + + let output = ''; + const compareItemHtmls = await this.getBarItems(products); + compareItemHtmls.forEach((htmlStr) => { + output += htmlStr; + }); + + this.removePlaceholdes(); + this.elements.list.innerHTML = output; + this.addPlaceholders(products.length); + + this.toggleCompareButton(products.length); + this.updateCounters(products.length); + } + + async getBarItems(products) { + const tmps = []; + await Promise.all( + products.map(async (product) => { + const fetchUrl = CompareUtils.getCompareBarItemTemplate(product.url); + await fetch(CompareUtils.getCompareBarItemTemplate(product.url)) + .then((response) => response.json()) + .then((response) => { + const parser = new DOMParser(); + const doc = parser.parseFromString(response['product-compare-bar-item'], 'text/html'); + const itemHtml = doc.querySelector('.shopify-section'); + + tmps[product.id] = itemHtml.innerHTML; + }); + }) + ); + + const returns = []; + products.forEach((product) => returns.push(tmps[product.id])); + return returns; + } + + async appendBarItem(products, productId, productUrl) { + this.removePlaceholdes(); + this.elements.list.insertAdjacentHTML( + 'beforeend', + `
  • ` + ); + this.addPlaceholders(products.length); + + await fetch(CompareUtils.getCompareBarItemTemplate(productUrl)) + .then((response) => response.json()) + .then((response) => { + const parser = new DOMParser(); + const doc = parser.parseFromString(response['product-compare-bar-item'], 'text/html'); + const itemHtml = doc.querySelector('.shopify-section'); + + const itemEl = this.elements.list.querySelector('[data-product-id="' + productId + '"]'); + if (itemEl) { + itemEl.outerHTML = itemHtml.innerHTML; + } + }); + } + + handleToggleList(event) { + event.preventDefault(); + + if (this.classList.contains(this.classes.listVisible)) { + this.classList.remove(this.classes.listVisible); + } else { + this.classList.add(this.classes.listVisible); + } + + this.setHeight(); + } + + handleClear() { + CompareUtils.clearList(); + } + + toggleCompareButton(count) { + this.elements.openBtn.disabled = !(count > 1); + } + + updateCounters(count) { + this.elements.counter.innerText = count; + } + + removePlaceholdes() { + Array.from(this.elements.list.querySelectorAll('li')).forEach((li) => { + if (li.classList.contains('compare-bar__item-placeholder')) { + li.remove(); + } + }); + } + + addPlaceholders(count) { + const placeholderCount = this.atLeastItemToShow - count; + + for (let i = 0; i < placeholderCount; i++) { + const placeholderItem = document.createElement('li'); + + placeholderItem.classList.add('compare-bar__item', 'compare-bar__item-placeholder'); + this.elements.list.appendChild(placeholderItem); + } + } + + setHeight() { + requestAnimationFrame(() => { + const offsetHeight = Math.round(this.offsetHeight); + document.documentElement.style.setProperty('--compare-bar-height', `${offsetHeight}px`); + }); + } +} +customElements.define('compare-bar', CompareBar); + +class CompareDrawer extends DrawerComponent { + constructor() { + super(); + + this.selectors = { + table: '.compare-table', + }; + + this.classesToRemoveOnLoad = 'drawer--loading'; + } + + get requiresBodyAppended() { + return false; + } + + get selector() { + return '.product-comparison-table'; + } + + get sourceSelector() { + return '#MainProduct-compare__rows'; + } + + get placeholderSelector() { + return '#MainProduct-compare__placeholder'; + } + + getSectionId() { + let sectionId = FoxTheme.ProductCompareSectionId || false; + + if (!sectionId) { + // Get section id from overlay groups. + const sectionEl = document.querySelector('.section-group-overlay-product-compare'); + if (sectionEl) { + sectionId = FoxTheme.utils.getSectionId(sectionEl); + } + + // Cache for better performance. + FoxTheme.ProductCompareSectionId = sectionId; + } + + return sectionId; + } + + // shouleBeShow() { + // const sectionId = this.getSectionId(); + // return typeof sectionId === 'string'; + // } + + prepareToShow() { + super.prepareToShow(); + this.renderCompareTable(); + } + + async renderCompareTable() { + const drawerContent = this.querySelector(this.selector); + const sectionId = this.getSectionId(); + + const products = CompareUtils.getSelectedProducts(); + + this.updateProductsCount(); + + this.elements = FoxTheme.utils.queryDomNodes(this.selectors, this); + const tableRows = this.elements.table.querySelectorAll('tbody tr'); + let compareRows = await this.getCompareTableRows(products); + + if (Shopify.designMode) { + // Append placeholder items in editor mode. + let maxPlaceholderItems = 3; + + if (compareRows.length == 2) { + maxPlaceholderItems = 2; + } + + let numberPlaceholderItems = + compareRows.length > 0 ? maxPlaceholderItems - compareRows.length : maxPlaceholderItems; + + if (numberPlaceholderItems > 0) { + const placeholderRows = this.getCompareTablePlaceholderRows(numberPlaceholderItems); + + compareRows = compareRows.concat(placeholderRows); + + this.updateProductsCount(maxPlaceholderItems); + } + } + + compareRows.forEach((compareRow) => { + tableRows.forEach((row) => { + const compareKey = row.dataset.compareKey; + const compareCol = compareRow.querySelector(`td[data-compare-key="${compareKey}"]`); + row.appendChild(compareCol); + }); + }); + + setTimeout(() => { + this.classList.remove(this.classesToRemoveOnLoad); + }, 300); + } + + updateProductsCount(count) { + this.style.setProperty('--number-items', count || CompareUtils.getProductsCount()); + } + + async getCompareTableRows(products) { + const tmps = []; + const sectionId = this.getSectionId(); + await Promise.all( + products.map(async (product) => { + const fetchUrl = CompareUtils.getTemplateUrl(product.url, { + section_id: sectionId, + }); + await fetch(fetchUrl) + .then((response) => response.text()) + .then((responseText) => { + const rowTemplate = new DOMParser() + .parseFromString(responseText, 'text/html') + .querySelector(this.sourceSelector); + + tmps[product.id] = rowTemplate.content.cloneNode(true); + }); + }) + ); + + const returns = []; + products.forEach((product) => returns.push(tmps[product.id])); + return returns; + } + + getCompareTablePlaceholderRows(count) { + const rowTemplate = this.querySelector(this.placeholderSelector); + + const returns = []; + for (let i = 0; i < count; i++) { + returns.push(rowTemplate.content.cloneNode(true)); + } + + return returns; + } + + disconnectedCallback() { + super.disconnectedCallback(); + this.handleAfterHide(); + } + + handleAfterHide() { + super.handleAfterHide(); + // Clean the table. + this.querySelectorAll('.compare-table > tbody > tr').forEach((row) => { + const nonLabelCells = row.querySelectorAll('td:not(.td-label)'); + nonLabelCells.forEach((cell) => { + cell.remove(); + }); + }); + + this.classList.add(this.classesToRemoveOnLoad); + } +} +customElements.define('compare-drawer', CompareDrawer); diff --git a/assets/complementary-product-slider.js b/assets/complementary-product-slider.js new file mode 100644 index 00000000000..87b329f652d --- /dev/null +++ b/assets/complementary-product-slider.js @@ -0,0 +1,119 @@ +if (!customElements.get('complementary-product-slider')) { + customElements.define( + 'complementary-product-slider', + class ComplementaryProductSlider extends HTMLElement { + constructor() { + super(); + + this.enableSliderDesktop = this.dataset.enableSliderDesktop === 'true'; + this.enableSliderMobile = this.dataset.enableSliderMobile === 'true'; + + this.selectors = { + productsWrap: '.products-wrap', + products: '.products', + pagination: '.swiper-pagination', + }; + + this.classes = { + grid: 'f-grid', + swiper: 'swiper', + swiperWrapper: 'swiper-wrapper', + }; + + this.productsWrap = this.querySelector(this.selectors.productsWrap); + this.products = this.querySelector(this.selectors.products); + this.sliderInstance = false; + + const mql = window.matchMedia(FoxTheme.config.mediaQueryMobile); + mql.onchange = this.init.bind(this); + this.init(); + } + + init() { + if (FoxTheme.config.mqlMobile) { + this.enableSliderMobile ? this.initSlider() : this.destroySlider(); + } else { + this.enableSliderDesktop ? this.initSlider() : this.destroySlider(); + } + } + + initSlider() { + if (typeof this.sliderInstance !== 'object') { + const columnsDesktop = this.dataset.columnsDesktop; + const columnsMobile = this.dataset.columnsMobile; + const columnGap = window.getComputedStyle(this.products).getPropertyValue('--f-column-gap'); + const spaceBetween = columnGap !== '' ? parseFloat(columnGap.replace('rem', '')) * 10 : 10; + + this.sliderOptions = { + slidesPerView: columnsMobile, + breakpoints: { + 768: { + slidesPerView: columnsDesktop, + }, + }, + spaceBetween: spaceBetween, + loop: true, + grabCursor: false, + allowTouchMove: true, + autoHeight: true, + navigation: { + prevEl: this.querySelector('.swiper-button-prev'), + nextEl: this.querySelector('.swiper-button-next'), + }, + }; + + const paginationEl = this.querySelector(this.selectors.pagination); + if (paginationEl) { + this.sliderOptions = { + ...this.sliderOptions, + pagination: { + el: paginationEl, + clickable: true, + type: 'fraction', + }, + }; + } + + this.productsWrap.classList.add(this.classes.swiper); + this.products.classList.remove(this.classes.grid); + this.products.classList.add(this.classes.swiperWrapper); + this.sliderInstance = new window.FoxTheme.Carousel(this.productsWrap, this.sliderOptions); + this.sliderInstance.init(); + + this.fixQuickviewDuplicate(); + this.calcNavButtonsPosition(); + } + } + + fixQuickviewDuplicate() { + let modalIds = []; + Array.from(this.querySelectorAll('quick-view-modal')).forEach((modal) => { + const modalID = modal.getAttribute('id'); + if (modalIds.includes(modalID)) { + modal.remove(); + } else { + modalIds.push(modalID); + } + }); + } + + calcNavButtonsPosition() { + if (!this.dataset.calcButtonPosition === 'true') return; + + const firstMedia = this.querySelector('.product-card__image-wrapper'); + if (firstMedia && firstMedia.clientHeight > 0) { + this.style.setProperty('--swiper-navigation-top-offset', parseInt(firstMedia.clientHeight) / 2 + 'px'); + } + } + + destroySlider() { + this.productsWrap.classList.remove(this.classes.swiper); + this.products.classList.remove(this.classes.swiperWrapper); + this.products.classList.add(this.classes.grid); + if (typeof this.sliderInstance !== 'object') return; + this.sliderInstance.slider.destroy(); + this.sliderInstance = false; + } + } + ); +} diff --git a/assets/component-accordion.css b/assets/component-accordion.css deleted file mode 100644 index 188ff803da6..00000000000 --- a/assets/component-accordion.css +++ /dev/null @@ -1,58 +0,0 @@ -.accordion summary { - display: flex; - position: relative; - line-height: 1; - padding: 1.5rem 0; -} - -.accordion .summary__title { - display: flex; - flex: 1; -} - -.accordion .summary__title + .icon-caret { - height: calc(var(--font-heading-scale) * 0.6rem); -} - -.accordion + .accordion { - margin-top: 0; - border-top: none; -} - -.accordion { - margin-top: 2.5rem; - margin-bottom: 0; - border-top: 0.1rem solid rgba(var(--color-foreground), 0.08); - border-bottom: 0.1rem solid rgba(var(--color-foreground), 0.08); -} - -.accordion__title { - display: inline-block; - max-width: calc(100% - 6rem); - min-height: 1.6rem; - margin: 0; - word-break: break-word; -} - -.accordion .svg-wrapper { - align-self: center; - fill: rgb(var(--color-foreground)); - height: calc(var(--font-heading-scale) * 2rem); - margin-right: calc(var(--font-heading-scale) * 1rem); - width: calc(var(--font-heading-scale) * 2rem); -} - -.accordion details[open] > summary .icon-caret { - transform: rotate(180deg); -} - -.accordion__content { - margin-bottom: 1.5rem; - word-break: break-word; - overflow-x: auto; - padding: 0 0.6rem; -} - -.accordion__content img { - max-width: 100%; -} diff --git a/assets/component-article-card.css b/assets/component-article-card.css index 998f100cbe9..5fb924b34c3 100644 --- a/assets/component-article-card.css +++ b/assets/component-article-card.css @@ -1,142 +1,65 @@ -@media screen and (max-width: 749px) { - .articles-wrapper .article { - width: 100%; - } -} - -.article { - display: flex; - align-items: center; -} - -.article.grid__item { - padding: 0; -} - -.grid--peek .article-card { - box-sizing: border-box; -} - -.article-card__image-wrapper > a { - display: block; -} - -.article-card__title { - text-decoration: none; - word-break: break-word; +.article-card__media { + margin-bottom: 2.4rem; } - -.article-card__title a:after { - bottom: 0; - content: ''; - height: 100%; - left: 0; - position: absolute; - right: 0; - top: 0; - width: 100%; - z-index: 1; -} - -.article-card__link.link { - padding: 0; -} - -.article-card__link { - text-underline-offset: 0.3rem; -} - -.article-card .card__heading { - margin-bottom: 0.6rem; -} - -.blog-articles .article-card .card__information, -.blog__posts .article-card .card__information { - padding-left: 2rem; - padding-right: 2rem; -} - -.article-card__info { - padding-top: 0.4rem; +.article-card__content-inner > * + * { + margin: 0.8rem 0 0; } - -.article-card__footer { - letter-spacing: 0.1rem; - font-size: 1.4rem; +.article-card__button { + margin-top: 1.2rem; } - -.article-card__footer:not(:last-child) { - margin-bottom: 1rem; +.article-card__tags { + font-size: 1.2rem; } - -.article-card__footer:last-child { - margin-top: auto; +.article-card__separator { + width: 4px; + height: 4px; + background: rgb(var(--color-subtext)); } - -.article-card__excerpt { - width: 100%; - margin-top: 1.2rem; +.article-card--horizontal .article-card__content-inner > * + * { + margin: 1.2rem 0 0; } - -.article-card__link:not(:only-child) { - margin-right: 3rem; +.article-card--horizontal .article-card__button { + margin-top: 3.2rem; } - -@media screen and (min-width: 990px) { - .article-card__link:not(:only-child) { - margin-right: 4rem; +@media (max-width: 1023.98px) { + .article-card--horizontal .article-card__button { + margin-top: 2.4rem; } } - -.article-card__image--small .ratio::before { - padding-bottom: 11rem; +.article-card--horizontal .article-card__excerpt { + margin-top: 2rem; } - -.article-card__image--medium .ratio::before { - padding-bottom: 22rem; +@media (max-width: 1023.98px) { + .article-card--horizontal .article-card__excerpt { + margin-top: 1.6rem; + } } - -.article-card__image--large .ratio::before { - padding-bottom: 33rem; +.article-card--horizontal:has(.article-card__media) { + column-gap: 5rem; } - -@media screen and (min-width: 750px) { - .article-card__image--small .ratio::before { - padding-bottom: 14.3rem; - } - - .article-card__image--medium .ratio::before { - padding-bottom: 21.9rem; +@media (max-width: 1023.98px) { + .article-card--horizontal:has(.article-card__media) { + column-gap: 3rem; } - - .article-card__image--large .ratio::before { - padding-bottom: 27.5rem; + .article-card--horizontal:has(.article-card__media) .article-card__content { + padding-inline: 0; } } -@media screen and (min-width: 990px) { - .article-card__image--small .ratio::before { - padding-bottom: 17.7rem; +@media (min-width: 768px) { + .article-card--horizontal { + display: flex; + align-items: center; } - - .article-card__image--medium .ratio::before { - padding-bottom: 30.7rem; + .article-card--horizontal .article-card__media { + width: 60%; + margin-bottom: 0; } - - .article-card__image--large .ratio::before { - padding-bottom: 40.7rem; + .article-card--horizontal .article-card__content { + width: 40%; } -} - -/* check for flexbox gap in older Safari versions */ -@supports not (inset: 10px) { - .articles-wrapper.grid { - margin: 0 0 5rem 0; - } - - @media screen and (min-width: 750px) { - .articles-wrapper.grid { - margin-bottom: 7rem; - } + .article-card--horizontal .article-card__content-inner { + width: max(45rem, 100% - 10rem); + max-width: 100%; } } diff --git a/assets/component-card-img-with-product.css b/assets/component-card-img-with-product.css new file mode 100644 index 00000000000..b123407a49b --- /dev/null +++ b/assets/component-card-img-with-product.css @@ -0,0 +1,46 @@ +.pr-img-card { + box-sizing: border-box; +} +.pr-img-card:hover .hover-scale-up { + --scale-x: 1.015; + --scale-y: 1.015; +} +.pr-img-card .bg-overlay { + background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%); +} +.pr-img-card__contents { + position: absolute; + bottom: 0; + inset-inline: 0; + background-color: transparent; + gap: 2rem; +} +.pr-img-card__contents-header { + padding-inline: 1.6rem; +} +.pr-img-card__product { + padding: 1.2rem; + background-color: rgba(var(--color-foreground), 0.1); + backdrop-filter: blur(70px); + --pcard-info-gap: 0; +} +.pr-img-card__product .product-card__image { + width: 5rem; +} +.pr-img-card .f-price { + --color-product-price-regular: rgb(var(--color-foreground)); +} +@media (max-width: 767.98px) { + .pr-img-card__contents { + gap: 1.6rem; + } + .pr-img-card__contents-header { + padding-inline: 1.2rem; + } + .pr-img-card__product { + padding: 1.2rem; + } + .pr-img-card__product .product-card__image { + width: 5rem; + } +} diff --git a/assets/component-card-shop-the-feed.css b/assets/component-card-shop-the-feed.css new file mode 100644 index 00000000000..d2d0650bbba --- /dev/null +++ b/assets/component-card-shop-the-feed.css @@ -0,0 +1,51 @@ +.stf-card__avatar { + width: 4rem; +} +.stf-card__info { + margin-block-end: 1.2rem; +} +.stf-card__product { + --buttons-width: 3.2rem; + margin-block-start: 1.6rem; +} +@media (max-width: 767.98px) { + .stf-card__product { + margin-block-start: 1.2rem; + } +} +.stf-card__product-media { + width: 4rem; +} +.stf-card--has-bg { + padding: 1.6rem; +} +@media (max-width: 767.98px) { + .stf-card--has-bg { + padding: 1.2rem; + } +} +.stf-card__play-button { + width: 6rem; + aspect-ratio: 1; + color: rgb(var(--color-button-text)); + background-color: rgba(var(--color-button), 0.3); +} +.stf-card__image { + opacity: 1; + transition: 0.55s cubic-bezier(0.4, 0, 0.2, 1); +} +.stf-card__image img { + width: 100%; + height: 100%; + object-fit: cover; +} +.stf-card__video { + opacity: 0; + transition: 0.55s cubic-bezier(0.4, 0, 0.2, 1); +} +.stf-card.is-hovering:has(.stf-card__video[loaded]) .stf-card__video { + opacity: 1; +} +.stf-card.is-hovering:has(.stf-card__video[loaded]) .stf-card__image { + opacity: 0; +} diff --git a/assets/component-card.css b/assets/component-card.css deleted file mode 100644 index c72491d8d59..00000000000 --- a/assets/component-card.css +++ /dev/null @@ -1,595 +0,0 @@ -.card-wrapper { - color: inherit; - height: 100%; - position: relative; - text-decoration: none; -} - -.card { - text-decoration: none; - text-align: var(--text-alignment); -} - -.card:not(.ratio) { - display: flex; - flex-direction: column; - height: 100%; -} - -.card.card--horizontal { - --text-alignment: left; - --image-padding: 0rem; - flex-direction: row; - align-items: flex-start; - gap: 1.5rem; -} - -.card--horizontal.ratio:before { - padding-bottom: 0; -} - -.card--card.card--horizontal { - padding: 1.2rem; -} - -.card--card.card--horizontal.card--text { - column-gap: 0; -} - -.card--card { - height: 100%; -} - -.card--card, -.card--standard .card__inner { - position: relative; - box-sizing: border-box; - border-radius: var(--border-radius); - border: var(--border-width) solid rgba(var(--color-foreground), var(--border-opacity)); -} - -.card--card:after, -.card--standard .card__inner:after { - content: ''; - position: absolute; - z-index: -1; - width: calc(var(--border-width) * 2 + 100%); - height: calc(var(--border-width) * 2 + 100%); - 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)); -} - -/* Needed for gradient continuity with or without animation, the transform scopes the gradient to its container which happens already when animation are turned on */ -.card--card.gradient, -.card__inner.gradient { - transform: perspective(0); -} - -/* Needed for gradient continuity with or without animation so that transparent PNG images come up as we would expect */ -.card__inner.color-scheme-1 { - background: transparent; -} - -.card .card__inner .card__media { - overflow: hidden; - /* Fix for Safari border bug on hover */ - z-index: 0; - border-radius: calc(var(--border-radius) - var(--border-width) - var(--image-padding)); -} - -.card--card .card__inner .card__media { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} - -.card--standard.card--text { - background-color: transparent; -} - -.card-information { - text-align: var(--text-alignment); -} - -.card__media, -.card .media { - bottom: 0; - position: absolute; - top: 0; -} - -.card .media { - width: 100%; -} - -.card__media { - margin: var(--image-padding); - width: calc(100% - 2 * var(--image-padding)); -} - -.card--standard .card__media { - margin: var(--image-padding); -} - -.card__inner { - width: 100%; -} - -.card--media .card__inner .card__content { - position: relative; - padding: calc(var(--image-padding) + 1rem); -} - -.card__content { - display: grid; - grid-template-rows: minmax(0, 1fr) max-content minmax(0, 1fr); - padding: 1rem; - width: 100%; - flex-grow: 1; -} - -.card__content--auto-margins { - grid-template-rows: minmax(0, auto) max-content minmax(0, auto); -} - -.card__information { - grid-row-start: 2; - padding: 1.3rem 1rem; -} - -.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 + 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 { - position: relative; - z-index: 1; - cursor: pointer; - padding: 0; - margin: 0; - text-align: var(--text-alignment); - min-width: auto; -} - -.card__information-volume-pricing-note--button:hover { - text-decoration: underline; -} - -.card__information-volume-pricing-note--button + .global-settings-popup.quantity-popover__info { - transform: initial; - top: auto; - bottom: 4rem; - max-width: 20rem; - width: calc(95% + 2rem); -} - -.card__information-volume-pricing-note--button + .global-settings-popup.quantity-popover__info span:first-of-type { - padding-right: 0.3rem; -} - -.card__information-volume-pricing-note--button-right + .global-settings-popup.quantity-popover__info { - right: 0; - left: auto; -} - -.card__information-volume-pricing-note--button-center + .global-settings-popup.quantity-popover__info { - left: 50%; - transform: translate(-50%); -} - -.card__information-volume-pricing-note--button + .global-settings-popup.quantity-popover__info .quantity__rules { - text-align: left; -} - -@media screen and (min-width: 990px) { - .grid--6-col-desktop .card__content quick-add-bulk .quantity { - width: auto; - } - - .grid--6-col-desktop .card__content quick-add-bulk .quantity__button { - width: calc(3rem / var(--font-body-scale)); - } - - .grid--6-col-desktop .card__information-volume-pricing-note--button + .global-settings-popup.quantity-popover__info { - left: 50%; - transform: translate(-50%); - 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 { - width: calc(100% + var(--border-width) + 1rem); - } -} - -@media screen and (max-width: 749px) { - .grid--2-col-tablet-down .card__content quick-add-bulk .quantity__button { - 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 { - left: 50%; - transform: translate(-50%); - } - - .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 { - width: calc(100% + var(--border-width) + 4rem); - } - - .grid--2-col-tablet-down .card__content quick-add-bulk .quantity { - width: auto; - } -} - -.card-information quantity-popover volume-pricing { - margin-top: 0; -} - -@media screen and (max-width: 989px) { - .card-information quantity-popover .quantity__rules ~ volume-pricing { - margin-top: 0; - } - - .card-information quantity-popover volume-pricing { - margin-top: 4.2rem; - } -} - -@media screen and (min-width: 750px) { - .card__information { - padding-bottom: 1.7rem; - padding-top: 1.7rem; - } -} - -.card__badge { - align-self: flex-end; - grid-row-start: 3; - justify-self: flex-start; -} - -.card__badge.top { - align-self: flex-start; - grid-row-start: 1; -} - -.card__badge.right { - justify-self: flex-end; -} - -.card:not(.card--horizontal) > .card__content > .card__badge { - margin: 1.3rem; -} - -.card__media .media img { - height: 100%; - object-fit: cover; - object-position: center center; - width: 100%; -} - -.card__inner:not(.ratio) > .card__content { - height: 100%; -} - -.card__heading { - margin-top: 0; - margin-bottom: 0; -} - -.card__heading:last-child { - margin-bottom: 0; -} - -.card--horizontal .card__heading, -.card--horizontal .price__container .price-item, -.card--horizontal__quick-add { - 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) { - margin-top: 0; -} - -.card--horizontal__quick-add:before { - box-shadow: none; -} - -@media only screen and (min-width: 750px) { - .card--horizontal .card__heading, - .card--horizontal .price__container .price-item, - .card--horizontal__quick-add { - font-size: calc(var(--font-heading-scale) * 1.3rem); - } -} - -.card--card.card--media > .card__content { - margin-top: calc(0rem - var(--image-padding)); -} - -.card--standard.card--text a::after, -.card--card .card__heading a::after { - bottom: calc(var(--border-width) * -1); - left: calc(var(--border-width) * -1); - right: calc(var(--border-width) * -1); - top: calc(var(--border-width) * -1); -} - -.card__heading a::after { - bottom: 0; - content: ''; - left: 0; - position: absolute; - right: 0; - top: 0; - z-index: 1; -} - -.card__heading a:after { - outline-offset: 0.3rem; -} - -.card__heading a:focus:after { - box-shadow: 0 0 0 0.3rem rgb(var(--color-background)), 0 0 0.5rem 0.4rem rgba(var(--color-foreground), 0.3); - outline: 0.2rem solid rgba(var(--color-foreground), 0.5); -} - -.card__heading a:focus-visible:after { - box-shadow: 0 0 0 0.3rem rgb(var(--color-background)), 0 0 0.5rem 0.4rem rgba(var(--color-foreground), 0.3); - outline: 0.2rem solid rgba(var(--color-foreground), 0.5); -} - -.card__heading a:focus:not(:focus-visible):after { - box-shadow: none; - outline: 0; -} - -.card__heading a:focus { - box-shadow: none; - outline: 0; -} - -@media screen and (min-width: 990px) { - .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 { - transform: scale(1.03); - } - - .card-wrapper:hover .media.media--hover-effect > img:first-child:not(:only-child) { - opacity: 0; - } - - .card-wrapper:hover .media.media--hover-effect > img + img { - opacity: 1; - transition: transform var(--duration-long) ease; - transform: scale(1.03); - } - - .underline-links-hover:hover a { - text-decoration: underline; - text-underline-offset: 0.3rem; - } -} - -.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 { - display: none; -} - -.card--standard:not(.card--horizontal) .placeholder-svg { - width: 100%; -} - -.card--standard > .card__content { - padding: 0; -} - -.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 { - display: none; -} - -.card--horizontal .card__badge, -.card--horizontal.card--text .card__inner { - display: none; -} - -.card--extend-height { - height: 100%; -} - -.card--extend-height.card--standard.card--text, -.card--extend-height.card--media { - display: flex; - flex-direction: column; -} - -.card--extend-height.card--standard.card--text .card__inner, -.card--extend-height.card--media .card__inner { - flex-grow: 1; -} - -.card .icon-wrap { - margin-left: 0.8rem; - white-space: nowrap; - transition: transform var(--duration-short) ease; - overflow: hidden; -} - -.card-information > * + * { - margin-top: 0.5rem; -} - -.card-information { - width: 100%; -} - -.card-information > * { - line-height: calc(1 + 0.4 / var(--font-body-scale)); - color: rgb(var(--color-foreground)); -} - -.card-information > .price { - color: rgb(var(--color-foreground)); -} - -.card--horizontal .card-information > .price { - color: rgba(var(--color-foreground), 0.75); -} - -.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 { - margin-top: 0; -} - -.card-information > *:not(.visually-hidden:first-child) + *:not(.rating):not(.card__information-volume-pricing-note) { - margin-top: 0.7rem; -} - -.card-information .caption { - letter-spacing: 0.07rem; -} - -.card-article-info { - margin-top: 1rem; -} - -/* Card Shapes */ - -.card--shape .card__content { - padding-top: 0; -} - -.card--shape.card--standard:not(.card--text) .card__inner { - 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)) - ); -} - -.card--shape.card--standard:not(.card--text) .card__inner:after { - display: none; -} - -.grid__item:nth-child(2n) .shape--blob { - clip-path: polygon(var(--shape--blob-2)); -} - -.grid__item:nth-child(3n) .shape--blob { - clip-path: polygon(var(--shape--blob-3)); -} - -.grid__item:nth-child(4n) .shape--blob { - clip-path: polygon(var(--shape--blob-4)); -} - -.grid__item:nth-child(5n) .shape--blob { - clip-path: polygon(var(--shape--blob-5)); -} - -.grid__item:nth-child(7n) .shape--blob { - clip-path: polygon(var(--shape--blob-6)); -} - -.grid__item:nth-child(8n) .shape--blob { - clip-path: polygon(var(--shape--blob-1)); -} - -/* Card Shape Hover Rules */ - -@media (prefers-reduced-motion: no-preference) { - .product-card-wrapper .shape--round { - transition: clip-path var(--duration-long) ease; - } - - .product-card-wrapper:hover .shape--round { - clip-path: ellipse(47% 47% at 50% 50%); - } - - .product-card-wrapper .shape--blob { - transition: clip-path var(--duration-long) ease-in-out; - } - - .product-card-wrapper:hover .shape--blob { - clip-path: polygon(var(--shape--blob-5)); - } - - .grid__item:nth-child(2n) .product-card-wrapper:hover .shape--blob { - clip-path: polygon(var(--shape--blob-6)); - } - - .grid__item:nth-child(3n) .product-card-wrapper:hover .shape--blob { - clip-path: polygon(var(--shape--blob-1)); - } - - .grid__item:nth-child(4n) .product-card-wrapper:hover .shape--blob { - clip-path: polygon(var(--shape--blob-2)); - } - - .grid__item:nth-child(5n) .product-card-wrapper:hover .shape--blob { - clip-path: polygon(var(--shape--blob-3)); - } - - .grid__item:nth-child(7n) .product-card-wrapper:hover .shape--blob { - clip-path: polygon(var(--shape--blob-4)); - } - - .grid__item:nth-child(8n) .product-card-wrapper:hover .shape--blob { - clip-path: polygon(var(--shape--blob-5)); - } -} diff --git a/assets/component-cart-drawer.css b/assets/component-cart-drawer.css deleted file mode 100644 index 7729a2df9fb..00000000000 --- a/assets/component-cart-drawer.css +++ /dev/null @@ -1,414 +0,0 @@ -.drawer { - position: fixed; - z-index: 1000; - left: 0; - top: 0; - width: 100vw; - height: 100%; - display: flex; - justify-content: flex-end; - background-color: rgba(var(--color-foreground), 0.5); - transition: visibility var(--duration-default) ease; -} - -.drawer.active { - visibility: visible; -} - -.drawer__inner { - height: 100%; - width: 40rem; - max-width: calc(100vw - 3rem); - padding: 0 1.5rem; - border: 0.1rem solid rgba(var(--color-foreground), 0.2); - border-right: 0; - overflow: hidden; - display: flex; - flex-direction: column; - transform: translateX(100%); - transition: transform var(--duration-default) ease; -} - -.drawer__inner-empty { - height: 100%; - padding: 0 1.5rem; - overflow: hidden; - display: flex; - flex-direction: column; -} - -.cart-drawer__warnings { - display: flex; - flex-direction: column; - flex: 1; - justify-content: center; -} - -cart-drawer.is-empty .drawer__inner { - display: grid; - grid-template-rows: 1fr; - align-items: center; - padding: 0; -} - -cart-drawer.is-empty .drawer__header { - display: none; -} - -cart-drawer:not(.is-empty) .cart-drawer__warnings, -cart-drawer:not(.is-empty) .cart-drawer__collection { - display: none; -} - -.cart-drawer__warnings--has-collection .cart__login-title { - margin-top: 2.5rem; -} - -.drawer.active .drawer__inner { - transform: translateX(0); -} - -.drawer__header { - position: relative; - padding: 1.5rem 0; - display: flex; - justify-content: space-between; - align-items: center; -} - -.drawer__heading { - margin: 0 0 1rem; -} - -.drawer__close { - display: inline-block; - padding: 0; - min-width: 4.4rem; - min-height: 4.4rem; - box-shadow: 0 0 0 0.2rem rgba(var(--color-button), 0); - position: absolute; - top: 10px; - right: -10px; - color: rgb(var(--color-foreground)); - background-color: transparent; - border: none; - cursor: pointer; -} - -.cart-drawer__warnings .drawer__close { - right: 5px; -} - -.drawer__close .svg-wrapper { - height: 2rem; - width: 2rem; -} - -.drawer__contents { - flex-grow: 1; - display: flex; - flex-direction: column; -} - -.drawer__footer { - border-top: 0.1rem solid rgba(var(--color-foreground), 0.2); - padding: 1.5rem 0; -} - -cart-drawer-items.is-empty + .drawer__footer { - display: none; -} - -.drawer__footer > details { - margin-top: -1.5rem; - border-bottom: 0.1rem solid rgba(var(--color-foreground), 0.2); -} - -.drawer__footer > details[open] { - padding-bottom: 1.5rem; -} - -.drawer__footer summary { - display: flex; - position: relative; - line-height: 1; - padding: 1.5rem 2.8rem 1.5rem 0; -} - -.drawer__footer > details + .cart-drawer__footer { - padding-top: 1.5rem; -} - -cart-drawer { - position: fixed; - top: 0; - left: 0; - width: 100vw; - height: 100%; -} - -.cart-drawer__overlay { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; -} - -.cart-drawer__overlay:empty { - display: block; -} - -.cart-drawer__form { - flex-grow: 1; - display: flex; - flex-wrap: wrap; -} - -.cart-drawer__collection { - margin: 0 2.5rem 1.5rem; -} - -.cart-drawer .drawer__cart-items-wrapper { - flex-grow: 1; -} - -.cart-drawer .cart-items, -.cart-drawer tbody { - display: block; - width: 100%; -} - -.cart-drawer thead { - display: inline-table; - width: 100%; -} - -cart-drawer-items { - overflow: auto; - flex: 1; -} - -@media screen and (max-height: 650px) { - cart-drawer-items { - overflow: visible; - } - - .drawer__inner { - overflow: scroll; - } -} - -.cart-drawer .cart-item { - display: grid; - grid-template: repeat(2, auto) / repeat(4, 1fr); - gap: 1rem; - margin-bottom: 0; -} - -.cart-drawer .cart-item:last-child { - margin-bottom: 1rem; -} - -.cart-drawer .cart-item__media { - grid-row: 1 / 3; -} - -.cart-drawer .cart-item__image { - max-width: 100%; -} - -.cart-drawer .cart-item__nested-line .cart-item__image { - max-width: 60%; - float: right; -} - -.cart-drawer .cart-items thead { - margin-bottom: 0.5rem; -} - -.cart-drawer .cart-items thead th:first-child, -.cart-drawer .cart-items thead th:last-child { - width: 0; - padding: 0; -} - -.cart-drawer .cart-items thead th:nth-child(2) { - width: 50%; - padding-left: 0; -} - -.cart-drawer .cart-items thead tr { - display: table-row; - margin-bottom: 0; -} - -.cart-drawer .cart-items th { - border-bottom: 0.1rem solid rgba(var(--color-foreground), 0.08); -} - -.cart-drawer .cart-item:last-child { - margin-bottom: 1.5rem; -} - -.cart-drawer .cart-item .loading__spinner { - right: 5px; - padding-top: 2.5rem; -} - -.cart-drawer .cart-items td { - padding-top: 1.7rem; -} - -.cart-drawer .cart-items .cart-item__nested-line td:not(.cart-item__quantity) { - padding-top: 1rem; -} - -.cart-drawer .cart-item > td + td { - padding-left: 1rem; -} - -.cart-drawer .cart-item__details { - width: auto; - grid-column: 2 / 4; -} - -.cart-drawer .cart-item__totals { - pointer-events: none; - display: flex; - align-items: flex-start; - justify-content: flex-end; -} - -.cart-drawer.cart-drawer .cart-item__price-wrapper > *:only-child { - margin-top: 0; -} - -.cart-drawer .cart-item__price-wrapper .cart-item__discounted-prices { - display: flex; - flex-direction: column; - gap: 0.6rem; -} - -.cart-drawer .unit-price { - margin-top: 0.6rem; -} - -.cart-drawer .cart-items .cart-item__quantity { - padding-top: 0; - grid-column: 2 / 5; -} - -@media screen and (max-width: 749px) { - .cart-drawer .cart-item cart-remove-button { - margin-left: 0; - } -} - -.cart-drawer__footer > * + * { - margin-top: 1rem; -} - -.cart-drawer .totals { - justify-content: space-between; -} - -.cart-drawer .price { - line-height: 1; -} - -.cart-drawer .tax-note { - margin: 1.2rem 0 2rem auto; - text-align: left; -} - -.cart-drawer .product-option dd { - word-break: break-word; -} - -.cart-drawer details[open] > summary .icon-caret { - transform: rotate(180deg); -} - -.cart-drawer .cart__checkout-button { - max-width: none; -} - -.drawer__footer .cart__dynamic-checkout-buttons { - max-width: 100%; -} - -.drawer__footer #dynamic-checkout-cart ul { - flex-wrap: wrap !important; - flex-direction: row !important; - margin: 0.5rem -0.5rem 0 0 !important; - gap: 0.5rem; -} - -.drawer__footer [data-shopify-buttoncontainer] { - justify-content: flex-start; -} - -.drawer__footer #dynamic-checkout-cart ul > li { - flex-basis: calc(50% - 0.5rem) !important; - margin: 0 !important; -} - -.drawer__footer #dynamic-checkout-cart ul > li:only-child { - flex-basis: 100% !important; - margin-right: 0.5rem !important; -} - -@media screen and (min-width: 750px) { - .drawer__footer #dynamic-checkout-cart ul > li { - flex-basis: calc(100% / 3 - 0.5rem) !important; - margin: 0 !important; - } - - .drawer__footer #dynamic-checkout-cart ul > li:first-child:nth-last-child(2), - .drawer__footer #dynamic-checkout-cart ul > li:first-child:nth-last-child(2) ~ li, - .drawer__footer #dynamic-checkout-cart ul > li:first-child:nth-last-child(4), - .drawer__footer #dynamic-checkout-cart ul > li:first-child:nth-last-child(4) ~ li { - flex-basis: calc(50% - 0.5rem) !important; - } -} - -cart-drawer-items::-webkit-scrollbar { - width: 3px; -} - -cart-drawer-items::-webkit-scrollbar-thumb { - background-color: rgba(var(--color-foreground), 0.7); - border-radius: 100px; -} - -cart-drawer-items::-webkit-scrollbar-track-piece { - margin-top: 31px; -} - -.cart-drawer .quantity-popover-container { - padding: 0; -} - -.cart-drawer .quantity-popover__info.global-settings-popup { - transform: translateY(0); - top: 100%; -} - -.cart-drawer .cart-item__error { - margin-top: 0.8rem; -} - -.cart-drawer .quantity-popover__info + .cart-item__error { - margin-top: 0.2rem; -} - -@media screen and (min-width: 750px) { - .cart-drawer .cart-item__quantity--info quantity-popover > * { - padding-left: 0; - } - - .cart-drawer .cart-item__error { - margin-left: 0; - } -} diff --git a/assets/component-cart-items.css b/assets/component-cart-items.css deleted file mode 100644 index c41d3a040b4..00000000000 --- a/assets/component-cart-items.css +++ /dev/null @@ -1,367 +0,0 @@ -cart-items .title-wrapper-with-link { - margin-top: 0; -} - -.cart-items td, -.cart-items th { - padding: 0; - border: none; -} - -.cart-items th { - text-align: left; - padding-bottom: 1.8rem; - opacity: 0.85; - font-weight: normal; -} - -.cart-item__quantity-wrapper { - display: flex; -} - -.cart-item__totals { - position: relative; -} - -.cart-items *.right { - text-align: right; -} - -.cart-item__image-container { - display: inline-flex; - align-items: flex-start; -} - -.cart-item__nested-line .cart-item__image-container { - min-width: calc(10rem / var(--font-body-scale)); - justify-content: right; - img { - width: 60%; - } -} - -.cart-item__image-container:after { - content: none; -} - -.cart-item__image { - height: auto; - max-width: calc(10rem / var(--font-body-scale)); -} - -@media screen and (min-width: 750px) { - .cart-item__image { - max-width: 100%; - } -} - -.cart-item__details { - font-size: 1.6rem; - line-height: calc(1 + 0.4 / var(--font-body-scale)); -} - -.cart-item__details > * { - margin: 0; - max-width: 30rem; -} - -.cart-item__details > * + * { - margin-top: 0.6rem; -} - -.cart-item__media { - position: relative; -} - -.cart-item__link { - display: block; - bottom: 0; - left: 0; - position: absolute; - right: 0; - top: 0; - width: 100%; - height: 100%; -} - -.cart-item__name { - text-decoration: none; - display: block; -} - -.cart-item__name:hover { - text-decoration: underline; - text-underline-offset: 0.3rem; - text-decoration-thickness: 0.2rem; -} - -.cart-item__price-wrapper > * { - display: block; - margin: 0; - padding: 0; -} - -.cart-item__discounted-prices dd { - margin: 0; -} - -.cart-item__discounted-prices .cart-item__old-price { - font-size: 1.4rem; -} - -.cart-item__old-price { - opacity: 0.7; -} - -.cart-item__final-price { - font-weight: 400; -} - -.product-option { - font-size: 1.4rem; - word-break: break-word; - line-height: calc(1 + 0.5 / var(--font-body-scale)); -} - -.cart-item cart-remove-button { - display: flex; - margin-left: 1rem; -} - -@media screen and (min-width: 750px) and (max-width: 989px) { - .cart-item cart-remove-button { - width: 4.5rem; - height: 4.5rem; - } -} - -cart-remove-button .button { - min-width: calc(4.5rem / var(--font-body-scale)); - min-height: 4.5rem; - padding: 0; - margin: 0 0.1rem 0.1rem 0; -} - -cart-remove-button .button:before, -cart-remove-button .button:after { - content: none; -} - -cart-remove-button .button:not([disabled]):hover { - color: rgb(var(--color-foreground)); -} - -@media screen and (min-width: 750px) { - cart-remove-button .button { - min-width: 3.5rem; - min-height: 3.5rem; - } -} - -cart-remove-button .icon-remove { - height: 1.5rem; - width: 1.5rem; -} - -.cart-item .loading__spinner { - top: 0; - left: auto; - right: auto; - bottom: 0; - padding: 0; -} - -@media screen and (min-width: 750px) { - .cart-item .loading__spinner { - right: 0; - padding-top: 4.5rem; - bottom: auto; - } -} - -.cart-item .loading__spinner:not(.hidden) ~ * { - visibility: hidden; -} - -.cart-item__error { - display: flex; - align-items: flex-start; - margin-top: 0.2rem; - width: min-content; - min-width: 100%; -} - -.cart-item__error-text { - font-size: 1.3rem; - line-height: 1.4; - letter-spacing: 0.04rem; - order: 1; -} - -.cart-item__error-text + .svg-wrapper { - flex-shrink: 0; - width: 1.5rem; - height: 1.5rem; - margin-right: 0.7rem; - margin-top: 0.25rem; -} - -.cart-item__error-text:empty + .svg-wrapper { - display: none; -} - -.product-option + .product-option { - margin-top: 0.4rem; -} - -.product-option * { - display: inline; - margin: 0; -} - -.cart-items thead th { - text-transform: uppercase; -} - -@media screen and (max-width: 749px) { - .cart-items, - .cart-items thead, - .cart-items tbody { - display: block; - width: 100%; - } - - .cart-items thead tr { - display: flex; - justify-content: space-between; - border-bottom: 0.1rem solid rgba(var(--color-foreground), 0.2); - margin-bottom: 4rem; - } - - .cart-item { - display: grid; - grid-template: repeat(2, auto) / repeat(4, 1fr); - gap: 1.5rem; - margin-bottom: 3.5rem; - } - - .cart-item:has(+ .cart-item__nested-line) { - margin-bottom: 1.5rem; - } - - .cart-item:last-child { - margin-bottom: 0; - } - - .cart-item__media { - grid-row: 1 / 3; - } - - .cart-item__details { - grid-column: 2 / 4; - } - - .cart-item__quantity { - grid-column: 2 / 5; - } - - .cart-item__quantity-wrapper { - flex-wrap: wrap; - } - - .cart-item__totals { - display: flex; - align-items: flex-start; - justify-content: flex-end; - } -} - -@media screen and (min-width: 750px) { - .cart-items { - border-spacing: 0; - border-collapse: separate; - box-shadow: none; - width: 100%; - display: table; - } - - .cart-items th { - border-bottom: 0.1rem solid rgba(var(--color-foreground), 0.08); - } - - .cart-items thead th:first-child { - width: 50%; - } - - .cart-items th + th { - padding-left: 4rem; - } - - .cart-items td { - vertical-align: top; - padding-top: 4rem; - } - - .cart-items .cart-item__nested-line td { - padding-top: 1rem; - } - - .cart-item { - display: table-row; - } - - .cart-item > td + td { - padding-left: 4rem; - } - - .cart-item__details { - width: 35rem; - } - - .cart-item__media { - width: 10rem; - } - - .cart-item__price-wrapper > *:only-child:not(.cart-item__discounted-prices) { - margin-top: 1rem; - } - - .cart-item__error { - margin-left: 0.3rem; - } -} - -@media screen and (min-width: 990px) { - .cart-item .cart-item__quantity, - .cart-items .cart-items__heading--wide { - padding-left: 6rem; - } - - .cart-item__details { - width: 50rem; - } - - .cart-items thead th:first-child { - width: 60%; - } -} - -@media screen and (min-width: 750px) { - .cart-items .cart-items__heading--quantity, - .cart-item .cart-item__quantity, - .cart-item__quantity--info quantity-popover > * { - padding-left: 5rem; - } - - .cart-item .cart-item__quantity--info, - .cart-item__quantity--info .cart-item__quantity-wrapper, - .cart-item__quantity--info .cart-items__info { - padding-left: 0; - } -} - -@media screen and (max-width: 989px) { - .cart-items .quantity-popover__info-button { - padding-left: 0; - } -} diff --git a/assets/component-cart-notification.css b/assets/component-cart-notification.css deleted file mode 100644 index 7af62a676ce..00000000000 --- a/assets/component-cart-notification.css +++ /dev/null @@ -1,123 +0,0 @@ -.cart-notification-wrapper { - position: relative; -} - -.cart-notification-wrapper .cart-notification { - display: block; -} - -.cart-notification { - border-bottom-right-radius: var(--popup-corner-radius); - border-bottom-left-radius: var(--popup-corner-radius); - border-color: rgba(var(--color-foreground), var(--popup-border-opacity)); - border-style: solid; - border-width: 0 0 var(--popup-border-width); - padding: 2.5rem 3.5rem; - position: absolute; - right: 0; - transform: translateY(-100%); - visibility: hidden; - width: 100%; - 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; -} - -.cart-notification.focused { - box-shadow: 0 0 0.2rem 0 rgba(var(--color-foreground), 0.3), - var(--popup-shadow-horizontal-offset) var(--popup-shadow-vertical-offset) var(--popup-shadow-blur-radius) - rgba(var(--color-shadow), var(--popup-shadow-opacity)); -} - -.cart-notification:focus-visible { - box-shadow: 0 0 0.2rem 0 rgba(var(--color-foreground), 0.3), - var(--popup-shadow-horizontal-offset) var(--popup-shadow-vertical-offset) var(--popup-shadow-blur-radius) - rgba(var(--color-shadow), var(--popup-shadow-opacity)); -} - -@media screen and (min-width: 750px) { - .header-wrapper:not(.header-wrapper--border-bottom) + cart-notification .cart-notification { - border-top-width: var(--popup-border-width); - } - - .cart-notification { - border-width: 0 var(--popup-border-width) var(--popup-border-width); - max-width: 36.8rem; - right: 2.2rem; - } -} - -@media screen and (min-width: 990px) { - .cart-notification-wrapper:is(.page-width) > .cart-notification { - right: 4rem; - } -} - -.cart-notification.animate { - transition: transform var(--duration-short) ease, visibility 0s var(--duration-short) ease; -} - -.cart-notification.active { - transform: translateY(0); - transition: transform var(--duration-default) ease, visibility 0s; - visibility: visible; -} - -.cart-notification__header { - align-items: flex-start; - display: flex; -} - -.cart-notification__heading { - align-items: center; - display: flex; - flex-grow: 1; - margin-bottom: 0; - margin-top: 0; -} - -.cart-notification__heading .icon-checkmark { - color: rgb(var(--color-foreground)); - margin-right: 1rem; - width: 1.3rem; -} - -.cart-notification__close { - margin-top: -2rem; - margin-right: -3rem; -} - -.cart-notification__links { - text-align: center; -} - -.cart-notification__links > * { - margin-top: 1rem; -} - -.cart-notification-product { - align-items: flex-start; - display: flex; - padding-bottom: 3rem; - padding-top: 2rem; -} - -.cart-notification-product dl { - margin-bottom: 0; - margin-top: 0; -} - -.cart-notification-product__image { - display: inline-flex; - margin-right: 1.5rem; - margin-top: 0.5rem; -} - -.cart-notification-product__image:after { - content: none; -} - -.cart-notification-product__name { - margin-bottom: 0.5rem; - margin-top: 0; -} diff --git a/assets/component-cart.css b/assets/component-cart.css deleted file mode 100644 index 6e4d5c15ade..00000000000 --- a/assets/component-cart.css +++ /dev/null @@ -1,222 +0,0 @@ -.cart { - position: relative; - display: block; -} - -.cart__empty-text, -.is-empty .cart__contents, -cart-items.is-empty .title-wrapper-with-link, -.is-empty .cart__footer { - display: none; -} - -.is-empty .cart__empty-text, -.is-empty .cart__warnings { - display: block; -} - -.cart__warnings { - display: none; - text-align: center; - padding: 3rem 0 1rem; -} - -.cart__empty-text { - margin: 4.5rem 0 2rem; -} - -.cart__contents > * + * { - margin-top: 2.5rem; -} - -.cart__login-title { - margin: 5.5rem 0 0.5rem; -} - -.cart__login-paragraph { - margin-top: 0.8rem; -} - -.cart__login-paragraph a { - font-size: inherit; -} - -@media screen and (min-width: 990px) { - .cart__warnings { - padding: 7rem 0 1rem; - } - - .cart__empty-text { - margin: 0 0 3rem; - } -} - -cart-items { - display: block; -} - -.cart__items { - position: relative; - padding-bottom: 3rem; - border-bottom: 0.1rem solid rgba(var(--color-foreground), 0.08); -} - -.cart__items--disabled { - pointer-events: none; -} - -.cart__footer-wrapper:last-child .cart__footer { - padding-bottom: 5rem; -} - -.cart__footer > div:only-child { - margin-left: auto; -} - -.cart__footer > * + * { - margin-top: 6.5rem; -} - -.cart__footer .discounts { - margin-bottom: 1rem; -} - -.cart__note { - height: fit-content; - top: 2.5rem; -} - -.cart__note label { - display: flex; - align-items: flex-end; - position: absolute; - line-height: 1; - height: 1.8rem; - top: -3rem; - color: rgba(var(--color-foreground), 0.75); -} - -.cart__note .field__input { - height: 100%; - position: relative; - border-radius: var(--inputs-radius); - padding: 1rem 2rem; -} - -.cart__note .text-area { - resize: vertical; -} - -.cart__note:after, -.cart__note:hover.cart__note:after, -.cart__note:before, -.cart__note:hover.cart__note:before, -.cart__note .field__input:focus, -.cart__note .field__input { - border-bottom-right-radius: 0; -} - -@media screen and (min-width: 750px) { - .cart__items { - grid-column-start: 1; - grid-column-end: 3; - padding-bottom: 4rem; - } - - .cart__contents > * + * { - margin-top: 0; - } - - .cart__items + .cart__footer { - grid-column: 2; - } - - .cart__footer { - display: flex; - justify-content: space-between; - border: 0; - } - - .cart__footer-wrapper:last-child { - padding-top: 0; - } - - .cart__footer > * { - width: 35rem; - } - - .cart__footer > * + * { - margin-left: 4rem; - margin-top: 0; - } -} - -.cart__ctas button { - width: 100%; -} - -.cart__ctas > * + * { - margin-top: 1rem; -} - -.cart__update-button { - margin-bottom: 1rem; -} - -.cart__dynamic-checkout-buttons { - max-width: 36rem; - margin: 0 auto; -} - -.cart__dynamic-checkout-buttons:has(.dynamic-checkout__content:empty) { - margin: 0; -} - -.cart__blocks > * + * { - margin-top: 1rem; -} - -.cart-note__label { - display: inline-block; - margin-bottom: 1rem; - line-height: calc(1 + 1 / var(--font-body-scale)); -} - -.tax-note { - margin: 2.2rem 0 1.6rem auto; - text-align: center; - display: block; -} - -.cart__checkout-button { - max-width: 36rem; -} - -.cart__ctas { - text-align: center; -} - -@media screen and (min-width: 750px) { - .cart-note { - max-width: 35rem; - } - - .cart__update-button { - margin-bottom: 0; - margin-right: 0.8rem; - } - - .tax-note { - margin-bottom: 2.2rem; - text-align: right; - } - - [data-shopify-buttoncontainer] { - justify-content: flex-end; - } - - .cart__ctas { - display: flex; - gap: 1rem; - } -} diff --git a/assets/component-collection-hero.css b/assets/component-collection-hero.css deleted file mode 100644 index 9ceadf0ca2a..00000000000 --- a/assets/component-collection-hero.css +++ /dev/null @@ -1,98 +0,0 @@ -.collection-hero__inner { - display: flex; - flex-direction: column; -} - -.collection-hero--with-image .collection-hero__inner { - margin-bottom: 0; - padding-bottom: 2rem; -} - -@media screen and (min-width: 750px) { - .collection-hero.collection-hero--with-image { - padding: calc(4rem + var(--page-width-margin)) 0 calc(4rem + var(--page-width-margin)); - overflow: hidden; - } - - .collection-hero--with-image .collection-hero__inner { - padding-bottom: 0; - } -} - -.collection-hero__text-wrapper { - flex-basis: 100%; -} - -@media screen and (min-width: 750px) { - .collection-hero { - padding: 0; - } - - .collection-hero__inner { - align-items: center; - flex-direction: row; - padding-bottom: 0; - } -} - -.collection-hero__title { - margin: 2.5rem 0; -} - -.collection-hero__title + .collection-hero__description { - margin-top: 1.5rem; - margin-bottom: 1.5rem; - font-size: 1.6rem; - line-height: calc(1 + 0.5 / var(--font-body-scale)); -} - -@media screen and (min-width: 750px) { - .collection-hero__title + .collection-hero__description { - font-size: 1.8rem; - margin-top: 2rem; - margin-bottom: 2rem; - } - - .collection-hero__description { - max-width: 66.67%; - } - - .collection-hero--with-image .collection-hero__description { - max-width: 100%; - } -} - -.collection-hero--with-image .collection-hero__title { - margin: 0; -} - -.collection-hero--with-image .collection-hero__text-wrapper { - padding: 5rem 0 4rem; -} - -.collection-hero__image-container { - 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)); -} - -@media screen and (max-width: 749px) { - .collection-hero__image-container { - height: 20rem; - } -} - -@media screen and (min-width: 750px) { - .collection-hero--with-image .collection-hero__text-wrapper { - padding: 4rem 2rem 4rem 0; - flex-basis: 50%; - } - - .collection-hero__image-container { - align-self: stretch; - flex: 1 0 50%; - margin-left: 3rem; - min-height: 20rem; - } -} diff --git a/assets/component-collection-item-slider.css b/assets/component-collection-item-slider.css new file mode 100644 index 00000000000..d3a8e32fccd --- /dev/null +++ b/assets/component-collection-item-slider.css @@ -0,0 +1,18 @@ +.collection-item-slider { + gap: 2.4rem; +} +.collection-item-slider + .collection-item-slider { + margin-top: 3.2rem; +} + +@media (min-width: 768px) { + .collection-item-slider { + gap: 3.2rem; + } + .collection-item-slider + .collection-item-slider { + margin-top: 4rem; + } + .collection-item-slider__header .swiper-controls { + --swiper-controls-top-offset: 0; + } +} diff --git a/assets/component-complementary-products.css b/assets/component-complementary-products.css deleted file mode 100644 index 5555777868f..00000000000 --- a/assets/component-complementary-products.css +++ /dev/null @@ -1,161 +0,0 @@ -.complementary-products__container { - display: flex; - flex-direction: column; - gap: 1.3rem; -} - -product-recommendations:not(.is-accordion) .complementary-products__container { - margin-top: 1.5rem; -} - -.complementary-products__container > details[open] { - padding-bottom: 1.5rem; -} - -.complementary-slider { - margin-top: 0; - gap: 0; -} - -.complementary-slide { - --shadow-padding-sides: calc((var(--shadow-horizontal-offset) + var(--shadow-blur-radius)) * var(--shadow-visible)); - --shadow-padding-sides-negative: calc( - (var(--shadow-horizontal-offset) * -1 + var(--shadow-blur-radius)) * var(--shadow-visible) - ); -} - -.complementary-slide > ul { - display: flex; - flex-direction: column; - gap: var(--grid-mobile-vertical-spacing); -} - -.complementary-slide.complementary-slide--standard > ul { - gap: calc(var(--grid-mobile-vertical-spacing) + 8px); -} - -@media screen and (min-width: 750px) { - .complementary-slide > ul { - gap: var(--grid-desktop-vertical-spacing); - } - - .complementary-slide.complementary-slide--standard > ul { - gap: calc(var(--grid-desktop-vertical-spacing) + 8px); - } -} - -.complementary-slide.grid__item { - width: 100%; - padding-top: max(var(--focus-outline-padding), var(--shadow-padding-top)); - padding-bottom: max(var(--focus-outline-padding), var(--shadow-padding-bottom)); - padding-right: max(var(--focus-outline-padding), var(--shadow-padding-sides)); - padding-left: max(var(--focus-outline-padding), var(--shadow-padding-sides-negative)); -} - -.complementary-slide .card-wrapper { - height: auto; -} - -.complementary-products > .summary__title { - display: flex; - line-height: 1; - padding: 1.5rem 0; -} - -.accordion + product-recommendations .accordion, -product-recommendations.is-accordion + .accordion { - margin-top: 0; - border-top: none; -} - -.complementary-products > .summary__title .icon-accordion { - fill: rgb(var(--color-foreground)); - height: calc(var(--font-heading-scale) * 2rem); - margin-right: calc(var(--font-heading-scale) * 1rem); - width: calc(var(--font-heading-scale) * 2rem); -} - -.complementary-products__container .card--card .card__content, -.complementary-products__container .card--horizontal .card__information { - padding: 0; -} - -.complementary-products__container .card--horizontal .card__inner { - max-width: 20%; -} - -@media screen and (min-width: 750px) and (max-width: 1200px) { - .complementary-products__container .card--horizontal .card__inner { - max-width: 25%; - } -} - -.complementary-slide .card--text .card__content { - grid-template-rows: minmax(0, 1fr) max-content auto; -} - -.complementary-products__container .card--card.card--media > .card__content { - margin-top: 0; -} - -.complementary-products-contains-quick-add .underline-links-hover:hover a { - text-decoration: initial; -} - -.complementary-products-contains-quick-add .card__heading:hover a { - text-decoration: underline; -} - -.complementary-products__container .card--card .card__inner .card__media { - border-radius: calc(var(--corner-radius) - var(--border-width) - var(--image-padding)); -} - -.complementary-products__container .card--horizontal .quick-add { - margin: 0; - max-width: 20rem; -} - -.complementary-products__container .quick-add__submit { - padding: 1.5rem 0; - min-height: inherit; -} - -.complementary-products__container .quick-add__submit .icon-plus { - width: 1.2rem; -} - -.complementary-products__container .icon-wrap { - display: flex; -} - -.complementary-products .sold-out-message:not(.hidden) + .icon-wrap { - display: none; -} - -.complementary-products__container .quick-add__submit:not(.animate-arrow) .icon-wrap { - transition: transform var(--duration-short) ease; -} - -.complementary-products__container .quick-add__submit:not(.animate-arrow):hover .icon-wrap { - transform: rotate(90deg); -} - -.complementary-products__container .quick-add__submit:after, -.complementary-products__container .quick-add__submit:hover:after { - box-shadow: none; -} - -.complementary-products__container .card--horizontal .quick-add, -.complementary-products__container .card__badge { - justify-self: var(--text-alignment); -} - -.product--no-media .complementary-products__container .price { - text-align: var(--text-alignment); -} - -@media screen and (min-width: 750px) { - .complementary-products__container .price--on-sale .price-item--regular { - font-size: 1.3rem; - } -} diff --git a/assets/component-countdown-timer.css b/assets/component-countdown-timer.css new file mode 100644 index 00000000000..893f56227d9 --- /dev/null +++ b/assets/component-countdown-timer.css @@ -0,0 +1,35 @@ +.countdown-timer__block { + min-width: 2.7rem; + margin: 0 1.5rem; +} +@media (min-width: 768px) { + .countdown-timer__block { + min-width: 4.2rem; + margin: 0 1.6rem; + } +} +.countdown-timer__block div { + line-height: 1; +} +.countdown-timer__block div::after { + content: ":"; + position: absolute; + top: 50%; + inset-inline-end: -1.9rem; + font-size: 0.5em; + transform: translateY(-50%); +} +@media (min-width: 768px) { + .countdown-timer__block div::after { + inset-inline-end: -2.4rem; + } +} +.countdown-timer__block:first-child { + margin-inline-start: 0; +} +.countdown-timer__block:last-child { + margin-inline-end: 0; +} +.countdown-timer__block:last-child div::after { + display: none; +} diff --git a/assets/component-country-flag.css b/assets/component-country-flag.css new file mode 100644 index 00000000000..fc43b6d2441 --- /dev/null +++ b/assets/component-country-flag.css @@ -0,0 +1,1064 @@ +.f-country-flags { + background: -webkit-image-set(url("//cdn.shopify.com/s/files/1/0646/2118/3226/t/6/assets/country-flags.png?v=37230036826556269641671675075") 1x, url("//cdn.shopify.com/s/files/1/0646/2118/3226/t/6/assets/country-flags-2x.png?v=119388446682176363021671675075") 2x) no-repeat top left; + background: image-set(url("//cdn.shopify.com/s/files/1/0646/2118/3226/t/6/assets/country-flags.png?v=37230036826556269641671675075") 1x, url("//cdn.shopify.com/s/files/1/0646/2118/3226/t/6/assets/country-flags-2x.png?v=119388446682176363021671675075") 2x) no-repeat top left; + width: 20px; + height: 20px; + flex-shrink: 0; + display: inline-block; +} + +.f-country-flags--AD { + background-position: 0 0; +} + +.f-country-flags--AE { + background-position: -21px 0; +} + +.f-country-flags--AF { + background-position: 0 -21px; +} + +.f-country-flags--African_nion { + background-position: -21px -21px; +} + +.f-country-flags--AG { + background-position: -42px 0; +} + +.f-country-flags--AI { + background-position: -42px -21px; +} + +.f-country-flags--AL { + background-position: 0 -42px; +} + +.f-country-flags--AM { + background-position: -21px -42px; +} + +.f-country-flags--AMS { + background-position: -42px -42px; +} + +.f-country-flags--AO { + background-position: -63px 0; +} + +.f-country-flags--AQ { + background-position: -63px -21px; +} + +.f-country-flags--AR { + background-position: -63px -42px; +} + +.f-country-flags--AS { + background-position: 0 -63px; +} + +.f-country-flags--AT { + background-position: -21px -63px; +} + +.f-country-flags--AU { + background-position: -42px -63px; +} + +.f-country-flags--AW { + background-position: -63px -63px; +} + +.f-country-flags--AX { + background-position: -84px 0; +} + +.f-country-flags--AZ { + background-position: -84px -21px; +} + +.f-country-flags--BA { + background-position: -84px -42px; +} + +.f-country-flags--BB { + background-position: -84px -63px; +} + +.f-country-flags--BD { + background-position: 0 -84px; +} + +.f-country-flags--BE { + background-position: -21px -84px; +} + +.f-country-flags--BF { + background-position: -42px -84px; +} + +.f-country-flags--BG { + background-position: -63px -84px; +} + +.f-country-flags--BH { + background-position: -84px -84px; +} + +.f-country-flags--BI { + background-position: -105px 0; +} + +.f-country-flags--BJ { + background-position: -105px -21px; +} + +.f-country-flags--BL { + background-position: -105px -42px; +} + +.f-country-flags--BM { + background-position: -105px -63px; +} + +.f-country-flags--BN { + background-position: -105px -84px; +} + +.f-country-flags--BO { + background-position: 0 -105px; +} + +.f-country-flags--BQ-BO { + background-position: -21px -105px; +} + +.f-country-flags--BQ-SA { + background-position: -42px -105px; +} + +.f-country-flags--BQ-SE { + background-position: -63px -105px; +} + +.f-country-flags--BR { + background-position: -84px -105px; +} + +.f-country-flags--BS { + background-position: -105px -105px; +} + +.f-country-flags--BT { + background-position: -126px 0; +} + +.f-country-flags--BV { + background-position: -126px -21px; +} + +.f-country-flags--BW { + background-position: -126px -42px; +} + +.f-country-flags--BY { + background-position: -126px -63px; +} + +.f-country-flags--BZ { + background-position: -126px -84px; +} + +.f-country-flags--CA { + background-position: -126px -105px; +} + +.f-country-flags--CC { + background-position: 0 -126px; +} + +.f-country-flags--CD { + background-position: -21px -126px; +} + +.f-country-flags--CF { + background-position: -42px -126px; +} + +.f-country-flags--CG { + background-position: -63px -126px; +} + +.f-country-flags--CH { + background-position: -84px -126px; +} + +.f-country-flags--CI { + background-position: -105px -126px; +} + +.f-country-flags--CK { + background-position: -126px -126px; +} + +.f-country-flags--CL { + background-position: -147px 0; +} + +.f-country-flags--CM { + background-position: -147px -21px; +} + +.f-country-flags--CN { + background-position: -147px -42px; +} + +.f-country-flags--CO { + background-position: -147px -63px; +} + +.f-country-flags--CR { + background-position: -147px -84px; +} + +.f-country-flags--CU { + background-position: -147px -105px; +} + +.f-country-flags--CV { + background-position: -147px -126px; +} + +.f-country-flags--CW { + background-position: 0 -147px; +} + +.f-country-flags--CX { + background-position: -21px -147px; +} + +.f-country-flags--CY { + background-position: -42px -147px; +} + +.f-country-flags--CZ { + background-position: -63px -147px; +} + +.f-country-flags--DE { + background-position: -84px -147px; +} + +.f-country-flags--DJ { + background-position: -105px -147px; +} + +.f-country-flags--DK { + background-position: -126px -147px; +} + +.f-country-flags--DM { + background-position: -147px -147px; +} + +.f-country-flags--DO { + background-position: -168px 0; +} + +.f-country-flags--DZ { + background-position: -168px -21px; +} + +.f-country-flags--EC { + background-position: -168px -42px; +} + +.f-country-flags--EE { + background-position: -168px -63px; +} + +.f-country-flags--EG { + background-position: -168px -84px; +} + +.f-country-flags--EH { + background-position: -168px -105px; +} + +.f-country-flags--ER { + background-position: -168px -126px; +} + +.f-country-flags--ES { + background-position: -168px -147px; +} + +.f-country-flags--ET { + background-position: 0 -168px; +} + +.f-country-flags--EUROPE { + background-position: -21px -168px; +} + +.f-country-flags--FI { + background-position: -42px -168px; +} + +.f-country-flags--FJ { + background-position: -63px -168px; +} + +.f-country-flags--FK { + background-position: -84px -168px; +} + +.f-country-flags--FM { + background-position: -105px -168px; +} + +.f-country-flags--FO { + background-position: -126px -168px; +} + +.f-country-flags--FR { + background-position: -147px -168px; +} + +.f-country-flags--GA { + background-position: -168px -168px; +} + +.f-country-flags--GB { + background-position: -189px -63px; +} + +.f-country-flags--GB-NIR { + background-position: -189px -21px; +} + +.f-country-flags--GB-SCT { + background-position: -189px -42px; +} + +.f-country-flags--GB-UKM { + background-position: -189px -63px; +} + +.f-country-flags--GB-WLS { + background-position: -189px -84px; +} + +.f-country-flags--GD { + background-position: -189px -105px; +} + +.f-country-flags--GE { + background-position: -189px -126px; +} + +.f-country-flags--GF { + background-position: -189px -147px; +} + +.f-country-flags--GG { + background-position: -189px -168px; +} + +.f-country-flags--GH { + background-position: 0 -189px; +} + +.f-country-flags--GI { + background-position: -21px -189px; +} + +.f-country-flags--GL { + background-position: -42px -189px; +} + +.f-country-flags--GM { + background-position: -63px -189px; +} + +.f-country-flags--GN { + background-position: -84px -189px; +} + +.f-country-flags--GP { + background-position: -105px -189px; +} + +.f-country-flags--GP { + background-position: -126px -189px; +} + +.f-country-flags--GQ { + background-position: -147px -189px; +} + +.f-country-flags--GR { + background-position: -168px -189px; +} + +.f-country-flags--GS { + background-position: -189px -189px; +} + +.f-country-flags--GT { + background-position: -210px 0; +} + +.f-country-flags--GU { + background-position: -210px -21px; +} + +.f-country-flags--GW { + background-position: -210px -42px; +} + +.f-country-flags--GY { + background-position: -210px -63px; +} + +.f-country-flags--HK { + background-position: -210px -84px; +} + +.f-country-flags--HM { + background-position: -210px -105px; +} + +.f-country-flags--HN { + background-position: -210px -126px; +} + +.f-country-flags--HR { + background-position: -210px -147px; +} + +.f-country-flags--HT { + background-position: -210px -168px; +} + +.f-country-flags--HU { + background-position: -210px -189px; +} + +.f-country-flags--ID { + background-position: 0 -210px; +} + +.f-country-flags--IE { + background-position: -21px -210px; +} + +.f-country-flags--IL { + background-position: -42px -210px; +} + +.f-country-flags--IM { + background-position: -63px -210px; +} + +.f-country-flags--IN { + background-position: -84px -210px; +} + +.f-country-flags--IO { + background-position: -105px -210px; +} + +.f-country-flags--IQ { + background-position: -126px -210px; +} + +.f-country-flags--IR { + background-position: -147px -210px; +} + +.f-country-flags--IS { + background-position: -168px -210px; +} + +.f-country-flags--IT { + background-position: -189px -210px; +} + +.f-country-flags--JE { + background-position: -210px -210px; +} + +.f-country-flags--JM { + background-position: -231px 0; +} + +.f-country-flags--JO { + background-position: -231px -21px; +} + +.f-country-flags--JP { + background-position: -231px -42px; +} + +.f-country-flags--KG { + background-position: -231px -63px; +} + +.f-country-flags--KH { + background-position: -231px -84px; +} + +.f-country-flags--KI { + background-position: -231px -105px; +} + +.f-country-flags--KM { + background-position: -231px -126px; +} + +.f-country-flags--KN { + background-position: -231px -147px; +} + +.f-country-flags--KN-SK { + background-position: -231px -168px; +} + +.f-country-flags--KP { + background-position: -231px -189px; +} + +.f-country-flags--KR { + background-position: -231px -210px; +} + +.f-country-flags--KW { + background-position: 0 -231px; +} + +.f-country-flags--KY { + background-position: -21px -231px; +} + +.f-country-flags--KZ { + background-position: -42px -231px; +} + +.f-country-flags--LA { + background-position: -63px -231px; +} + +.f-country-flags--LB { + background-position: -84px -231px; +} + +.f-country-flags--LC { + background-position: -105px -231px; +} + +.f-country-flags--LI { + background-position: -126px -231px; +} + +.f-country-flags--LK { + background-position: -147px -231px; +} + +.f-country-flags--LR { + background-position: -168px -231px; +} + +.f-country-flags--LS { + background-position: -189px -231px; +} + +.f-country-flags--LT { + background-position: -210px -231px; +} + +.f-country-flags--LU { + background-position: -231px -231px; +} + +.f-country-flags--LV { + background-position: -252px 0; +} + +.f-country-flags--LY { + background-position: -252px -21px; +} + +.f-country-flags--MA { + background-position: -252px -42px; +} + +.f-country-flags--MC { + background-position: -252px -63px; +} + +.f-country-flags--MD { + background-position: -252px -84px; +} + +.f-country-flags--ME { + background-position: -252px -105px; +} + +.f-country-flags--MF { + background-position: -252px -126px; +} + +.f-country-flags--MG { + background-position: -252px -147px; +} + +.f-country-flags--MH { + background-position: -252px -168px; +} + +.f-country-flags--MK { + background-position: -252px -189px; +} + +.f-country-flags--ML { + background-position: -252px -210px; +} + +.f-country-flags--MM { + background-position: -252px -231px; +} + +.f-country-flags--MN { + background-position: 0 -252px; +} + +.f-country-flags--MO { + background-position: -21px -252px; +} + +.f-country-flags--MP { + background-position: -42px -252px; +} + +.f-country-flags--MQ { + background-position: -63px -252px; +} + +.f-country-flags--MQ-UNF { + background-position: -84px -252px; +} + +.f-country-flags--MR { + background-position: -105px -252px; +} + +.f-country-flags--MS { + background-position: -126px -252px; +} + +.f-country-flags--MT { + background-position: -147px -252px; +} + +.f-country-flags--MU { + background-position: -168px -252px; +} + +.f-country-flags--MV { + background-position: -189px -252px; +} + +.f-country-flags--MW { + background-position: -210px -252px; +} + +.f-country-flags--MX { + background-position: -231px -252px; +} + +.f-country-flags--MY { + background-position: -252px -252px; +} + +.f-country-flags--MZ { + background-position: -273px 0; +} + +.f-country-flags--NA { + background-position: -273px -21px; +} + +.f-country-flags--NC { + background-position: -273px -42px; +} + +.f-country-flags--NE { + background-position: -273px -63px; +} + +.f-country-flags--NF { + background-position: -273px -84px; +} + +.f-country-flags--NG { + background-position: -273px -105px; +} + +.f-country-flags--NI { + background-position: -273px -126px; +} + +.f-country-flags--NL { + background-position: -273px -147px; +} + +.f-country-flags--NO { + background-position: -273px -168px; +} + +.f-country-flags--NP { + background-position: -273px -189px; +} + +.f-country-flags--NR { + background-position: -273px -210px; +} + +.f-country-flags--NU { + background-position: -273px -231px; +} + +.f-country-flags--NZ { + background-position: -273px -252px; +} + +.f-country-flags--OM { + background-position: 0 -273px; +} + +.f-country-flags--PA { + background-position: -21px -273px; +} + +.f-country-flags--PE { + background-position: -42px -273px; +} + +.f-country-flags--PF { + background-position: -63px -273px; +} + +.f-country-flags--PG { + background-position: -84px -273px; +} + +.f-country-flags--PH { + background-position: -105px -273px; +} + +.f-country-flags--PK { + background-position: -126px -273px; +} + +.f-country-flags--PL { + background-position: -147px -273px; +} + +.f-country-flags--PM { + background-position: -168px -273px; +} + +.f-country-flags--Pf-UNF { + background-position: -189px -273px; +} + +.f-country-flags--PN { + background-position: -210px -273px; +} + +.f-country-flags--PR { + background-position: -231px -273px; +} + +.f-country-flags--PS { + background-position: -252px -273px; +} + +.f-country-flags--PT { + background-position: -273px -273px; +} + +.f-country-flags--PW { + background-position: -294px 0; +} + +.f-country-flags--PY { + background-position: -294px -21px; +} + +.f-country-flags--QA { + background-position: -294px -42px; +} + +.f-country-flags--RAINBOW { + background-position: -294px -63px; +} + +.f-country-flags--RE { + background-position: -294px -84px; +} + +.f-country-flags--RO { + background-position: -294px -105px; +} + +.f-country-flags--RS { + background-position: -294px -126px; +} + +.f-country-flags--RU { + background-position: -294px -147px; +} + +.f-country-flags--RW { + background-position: -294px -168px; +} + +.f-country-flags--SA { + background-position: -294px -189px; +} + +.f-country-flags--SB { + background-position: -294px -210px; +} + +.f-country-flags--SC { + background-position: -294px -231px; +} + +.f-country-flags--SD { + background-position: -294px -252px; +} + +.f-country-flags--SE { + background-position: -294px -273px; +} + +.f-country-flags--SG { + background-position: 0 -294px; +} + +.f-country-flags--SH { + background-position: -21px -294px; +} + +.f-country-flags--SI { + background-position: -42px -294px; +} + +.f-country-flags--SJ { + background-position: -63px -294px; +} + +.f-country-flags--SK { + background-position: -84px -294px; +} + +.f-country-flags--SL { + background-position: -105px -294px; +} + +.f-country-flags--SM { + background-position: -126px -294px; +} + +.f-country-flags--SN { + background-position: -147px -294px; +} + +.f-country-flags--SO { + background-position: -168px -294px; +} + +.f-country-flags--SR { + background-position: -189px -294px; +} + +.f-country-flags--SS { + background-position: -210px -294px; +} + +.f-country-flags--ST { + background-position: -231px -294px; +} + +.f-country-flags--SV { + background-position: -252px -294px; +} + +.f-country-flags--SX { + background-position: -273px -294px; +} + +.f-country-flags--SY { + background-position: -294px -294px; +} + +.f-country-flags--SZ { + background-position: -315px 0; +} + +.f-country-flags--TC { + background-position: -315px -21px; +} + +.f-country-flags--TD { + background-position: -315px -42px; +} + +.f-country-flags--TF { + background-position: -315px -63px; +} + +.f-country-flags--TG { + background-position: -315px -84px; +} + +.f-country-flags--TH { + background-position: -315px -105px; +} + +.f-country-flags--TJ { + background-position: -315px -126px; +} + +.f-country-flags--TK { + background-position: -315px -147px; +} + +.f-country-flags--TL { + background-position: -315px -168px; +} + +.f-country-flags--TM { + background-position: -315px -189px; +} + +.f-country-flags--TN { + background-position: -315px -210px; +} + +.f-country-flags--TO { + background-position: -315px -231px; +} + +.f-country-flags--TR { + background-position: -315px -252px; +} + +.f-country-flags--TT { + background-position: -315px -273px; +} + +.f-country-flags--TV { + background-position: -315px -294px; +} + +.f-country-flags--TW { + background-position: 0 -315px; +} + +.f-country-flags--TZ { + background-position: -21px -315px; +} + +.f-country-flags--UA { + background-position: -42px -315px; +} + +.f-country-flags--UG { + background-position: -63px -315px; +} + +.f-country-flags--UM { + background-position: -84px -315px; +} + +.f-country-flags--Union_f_outh_merican_ations { + background-position: -105px -315px; +} + +.f-country-flags--US { + background-position: -126px -315px; +} + +.f-country-flags--UY { + background-position: -147px -315px; +} + +.f-country-flags--UZ { + background-position: -168px -315px; +} + +.f-country-flags--VA { + background-position: -189px -315px; +} + +.f-country-flags--VC { + background-position: -210px -315px; +} + +.f-country-flags--VE { + background-position: -231px -315px; +} + +.f-country-flags--VG { + background-position: -252px -315px; +} + +.f-country-flags--VI { + background-position: -273px -315px; +} + +.f-country-flags--VN { + background-position: -294px -315px; +} + +.f-country-flags--VU { + background-position: -315px -315px; +} + +.f-country-flags--WF { + background-position: -336px 0; +} + +.f-country-flags--WS { + background-position: -336px -21px; +} + +.f-country-flags--XK { + background-position: -336px -42px; +} + +.f-country-flags--YE { + background-position: -336px -63px; +} + +.f-country-flags--YT-UNF { + background-position: -336px -84px; +} + +.f-country-flags--ZA { + background-position: -336px -105px; +} + +.f-country-flags--ZM { + background-position: -336px -126px; +} + +.f-country-flags--ZW { + background-position: -336px -147px; +} diff --git a/assets/component-custom-card.css b/assets/component-custom-card.css new file mode 100644 index 00000000000..cc4cbe28ba2 --- /dev/null +++ b/assets/component-custom-card.css @@ -0,0 +1,11 @@ +.custom-card { + border: 0.1rem solid rgba(var(--color-border), var(--color-border-alpha, 1)); +} +.custom-card__info { + padding-block: var(--padding-y, 2.4rem); + padding-inline: var(--padding-x, 2.4rem); +} +.custom-card--small { + --padding-y: 1.6rem; + --padding-x: 1.6rem; +} diff --git a/assets/component-custom-image-with-text.css b/assets/component-custom-image-with-text.css new file mode 100644 index 00000000000..11df920786b --- /dev/null +++ b/assets/component-custom-image-with-text.css @@ -0,0 +1,49 @@ +.custom-image-with-text__image .media-wrapper { + width: max(88%, 100% - 50px); +} +.custom-image-with-text--no-badge .custom-image-with-text__image .media-wrapper { + width: 100%; +} +.custom-image-with-text__badge { + width: var(--badge-mb-size, 8.8rem); + height: var(--badge-mb-size, 8.8rem); + border-radius: 50%; + inset-inline-end: 0; + z-index: 1; + top: 5%; +} +.custom-image-with-text__badge > div { + transform: rotate(-12deg); + line-height: 1.14; + font-size: 1.2rem; +} +.custom-image-with-text__image, .custom-image-with-text__text { + width: 100%; +} +.custom-image-with-text__wrapper { + gap: 2rem; +} +@media (min-width: 1024px) { + .custom-image-with-text__wrapper { + gap: 0.2rem; + } + .custom-image-with-text__wrapper.custom-image-with-text--no-badge { + column-gap: 4rem; + } + .custom-image-with-text__image { + flex: 0 0 56%; + } + .custom-image-with-text__text { + flex: 0 0 44%; + } + .custom-image-with-text--no-badge .custom-image-with-text__image, .custom-image-with-text--no-badge .custom-image-with-text__text { + flex: 1; + } + .custom-image-with-text__badge { + width: var(--badge-size, 10rem); + height: var(--badge-size, 10rem); + } + .custom-image-with-text__badge > div { + font-size: 1.4rem; + } +} diff --git a/assets/component-custom-text-card-with-image.css b/assets/component-custom-text-card-with-image.css new file mode 100644 index 00000000000..c86f7f98525 --- /dev/null +++ b/assets/component-custom-text-card-with-image.css @@ -0,0 +1,14 @@ +.custom-text-card-with-image__image { + width: var(--image-width); + max-width: 100%; + margin-inline: auto; +} +.custom-text-card-with-image__image:not(:first-child) { + margin-top: 3rem !important; +} +.custom-text-card-with-image__image:not(:last-child) { + margin-bottom: 3rem; +} +.custom-text-card-with-image .rich-text { + padding: 4.8rem 3rem; +} diff --git a/assets/component-deferred-media.css b/assets/component-deferred-media.css index 978d9c97250..e032eb375a6 100644 --- a/assets/component-deferred-media.css +++ b/assets/component-deferred-media.css @@ -1,3 +1,6 @@ +.deferred-media { + overflow: hidden; +} .deferred-media__poster { background-color: transparent; border: none; @@ -9,63 +12,30 @@ overflow: hidden; border-radius: calc(var(--border-radius) - var(--border-width)); } - -.media > .deferred-media__poster { +.media .deferred-media__poster { display: flex; align-items: center; justify-content: center; } - .deferred-media__poster img { width: auto; max-width: 100%; height: 100%; } - -.deferred-media { - overflow: hidden; +.deferred-media__poster:focus-visible, .deferred-media__poster:focus { + outline: none; + box-shadow: 0 0 0 1px rgba(var(--color-foreground)); +} +.deferred-media__poster:focus:not(:focus-visible) { + outline: 0; + box-shadow: none; } - .deferred-media:not([loaded]) template { z-index: -1; } - .deferred-media[loaded] > .deferred-media__poster { display: none; } - -.deferred-media__poster:focus-visible { - outline: none; - box-shadow: 0 0 0 var(--media-border-width) rgba(var(--color-foreground), var(--media-border-opacity)), - 0 0 0 calc(var(--media-border-width) + 0.3rem) rgb(var(--color-background)), - 0 0 0 calc(var(--media-border-width) + 0.5rem) rgba(var(--color-foreground), 0.5); - border-radius: calc(var(--media-radius) - var(--media-border-width)); -} - -.deferred-media__poster:focus { - outline: none; - box-shadow: 0 0 0 var(--media-border-width) rgba(var(--color-foreground), var(--media-border-opacity)), - 0 0 0 calc(var(--media-border-width) + 0.3rem) rgb(var(--color-background)), - 0 0 0 calc(var(--media-border-width) + 0.5rem) rgba(var(--color-foreground), 0.5); - border-radius: calc(var(--media-radius) - var(--media-border-width)); -} - -.global-media-settings--full-width .deferred-media__poster, -.global-media-settings--full-width .deferred-media__poster:is(:focus, :focus-visible) { - border-radius: 0; -} - -/* outline styling for Windows High Contrast Mode */ -@media (forced-colors: active) { - .deferred-media__poster:focus { - outline: transparent solid 1px; - } -} -.deferred-media__poster:focus:not(:focus-visible) { - outline: 0; - box-shadow: none; -} - .deferred-media__poster-button { background-color: rgb(var(--color-background)); border: 0.1rem solid rgba(var(--color-foreground), 0.1); @@ -80,19 +50,30 @@ left: 50%; top: 50%; transform: translate(-50%, -50%) scale(1); - transition: transform var(--duration-short) ease, color var(--duration-short) ease; + transition: transform var(--duration-default) ease, color var(--duration-default) ease; z-index: 1; } - .deferred-media__poster-button:hover { transform: translate(-50%, -50%) scale(1.1); } - .deferred-media__poster-button .icon { - width: 2rem; - height: 2rem; + width: 2.8rem; + height: 2.8rem; } -.deferred-media__poster-button .icon-play { - margin-left: 0.2rem; +/* outline styling for Windows High Contrast Mode */ +@media (forced-colors: active) { + .deferred-media__poster:focus { + outline: transparent solid 1px; + } +} +.deferred-media > *:not(.zoom):not(.deferred-media__poster), +model-viewer { + display: block; + max-width: 100%; + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; } diff --git a/assets/component-discounts.css b/assets/component-discounts.css deleted file mode 100644 index 1a4ed6da7a9..00000000000 --- a/assets/component-discounts.css +++ /dev/null @@ -1,30 +0,0 @@ -.discounts { - font-size: 1.2rem; -} - -.discounts__discount { - display: flex; - align-items: center; - line-height: calc(1 + 0.5 / var(--font-body-scale)); -} - -.discounts__discount svg { - color: rgba(var(--color-button), var(--alpha-button-background)); -} - -.discounts__discount--position { - justify-content: center; -} - -@media screen and (min-width: 750px) { - .discounts__discount--position { - justify-content: flex-end; - } -} - -.discounts__discount > .icon { - color: rgb(var(--color-foreground)); - width: 1.2rem; - height: 1.2rem; - margin-right: 0.7rem; -} diff --git a/assets/component-facets.css b/assets/component-facets.css deleted file mode 100644 index da3d9d951e7..00000000000 --- a/assets/component-facets.css +++ /dev/null @@ -1,1257 +0,0 @@ -.facets-container { - display: grid; - grid-template-columns: repeat(2, auto); - grid-template-rows: repeat(2, auto); - padding-top: 1rem; -} - -.active-facets-mobile { - margin-bottom: 0.5rem; -} - -.mobile-facets__list { - overflow-y: auto; -} - -@media screen and (min-width: 750px) { - .facets-container > * + * { - margin-top: 0; - } - - .facets__form .product-count { - grid-column-start: 3; - align-self: flex-start; - } -} - -@media screen and (max-width: 989px) { - .facets-container { - grid-template-columns: auto minmax(0, max-content); - column-gap: 2rem; - } -} - -.facet-filters { - align-items: flex-start; - display: flex; - grid-column: 2; - grid-row: 1; - padding-left: 2.5rem; -} - -@media screen and (min-width: 990px) { - .facet-filters { - padding-left: 3rem; - } -} - -.facet-filters__label { - display: block; - color: rgba(var(--color-foreground), 0.85); - font-size: 1.4rem; - margin: 0 2rem 0 0; -} - -.facet-filters__summary { - display: flex; - align-items: center; - justify-content: space-between; - font-size: 1.4rem; - cursor: pointer; - height: 4.5rem; - padding: 0 1.5rem; - min-width: 25rem; - margin-top: 2.4rem; - border: 0.1rem solid rgba(var(--color-foreground), 0.55); -} - -.facet-filters__summary::after { - position: static; -} - -.facet-filters__field { - align-items: center; - display: flex; - flex-grow: 1; - justify-content: flex-end; -} - -.facet-filters__field .select { - width: auto; -} - -.facet-filters__field .select:after, -.facet-filters__field .select:before, -.mobile-facets__sort .select:after, -.mobile-facets__sort .select:before { - content: none; -} - -.facet-filters__field .select__select, -.mobile-facets__sort .select__select { - border-radius: 0; - min-width: auto; - min-height: auto; - transition: none; -} - -.select .icon-caret { - width: 10px; -} - -.facet-filters button { - margin-left: 2.5rem; -} - -.facet-filters__sort { - background-color: transparent; - border: 0; - border-radius: 0; - font-size: 1.4rem; - height: auto; - line-height: calc(1 + 0.5 / var(--font-body-scale)); - margin: 0; - padding-left: 0; - padding-right: 1.75rem; -} - -.facet-filters__sort + .icon-caret { - right: 0; -} - -@media screen and (forced-colors: active) { - .facet-filters__sort { - border: none; - } -} - -.facet-filters__sort, -.facet-filters__sort:hover { - box-shadow: none; - filter: none; - transition: none; -} - -.mobile-facets__sort .select__select:focus-visible { - outline: 0.2rem solid rgba(var(--color-foreground), 0.5); - outline-offset: 0.3rem; - box-shadow: 0 0 0 0.3rem rgb(var(--color-background)), 0 0 0.5rem 0.4rem rgba(var(--color-foreground), 0.3); -} - -.mobile-facets__sort .select__select.focused { - outline: 0.2rem solid rgba(var(--color-foreground), 0.5); - outline-offset: 0.3rem; - box-shadow: 0 0 0 0.3rem rgb(var(--color-background)), 0 0 0.5rem 0.4rem rgba(var(--color-foreground), 0.3); -} - -.facet-filters__sort:focus-visible { - outline: 0.2rem solid rgba(var(--color-foreground), 0.5); - outline-offset: 1rem; - box-shadow: 0 0 0 1rem rgb(var(--color-background)), 0 0 0.2rem 1.2rem rgba(var(--color-foreground), 0.3); -} - -.facet-filters__sort.focused { - outline: 0.2rem solid rgba(var(--color-foreground), 0.5); - outline-offset: 1rem; - box-shadow: 0 0 0 1rem rgb(var(--color-background)), 0 0 0.2rem 1.2rem rgba(var(--color-foreground), 0.3); -} - -.facets { - display: block; - grid-column-start: span 2; -} - -.facets__form { - display: grid; - gap: 0 3.5rem; - grid-template-columns: 1fr max-content max-content; - margin-bottom: 0.5rem; -} - -.facets__wrapper { - align-items: center; - align-self: flex-start; - grid-column: 1; - grid-row: 1; - display: flex; - flex-wrap: wrap; -} - -.facets__heading { - display: block; - color: rgba(var(--color-foreground), 0.85); - font-size: 1.4rem; - margin: -1.5rem 2rem 0 0; -} - -.facets__reset { - margin-left: auto; -} - -.facets__disclosure { - margin-right: 3.5rem; -} - -.facets__summary { - color: rgba(var(--color-foreground), 0.75); - font-size: 1.4rem; - padding: 0 1.75rem 0 0; - margin-bottom: 1.5rem; -} - -.facets__summary .svg-wrapper { - height: auto; - width: auto; -} - -.facets__disclosure fieldset { - padding: 0; - margin: 0; - border: 0; -} - -.facets__disclosure[open] .facets__summary, -.facets__summary:hover { - color: rgb(var(--color-foreground)); -} - -.facets__disclosure[open] .facets__display, -.facets__disclosure-vertical[open] .facets__display-vertical { - animation: animateMenuOpen var(--duration-default) ease; -} - -.facets__summary span:first-of-type { - transition: text-decoration var(--duration-short) ease; -} - -.facets__summary:hover .facets__summary-label { - text-decoration: underline; - text-underline-offset: 0.3rem; -} - -.facets__and-helptext { - color: rgba(var(--color-foreground), 0.5); - font-size: calc(var(--font-heading-scale) * 1.2rem); - line-height: calc(var(--font-heading-scale) * 1.2rem); -} - -@media only screen and (min-width: 750px) { - .facets__and-helptext { - font-size: calc(var(--font-heading-scale) * 1.3rem); - line-height: calc(var(--font-heading-scale) * 1.3rem); - } -} - -.facets__disclosure .facets__and-helptext, -.facets__disclosure-vertical .facets__and-helptext { - display: none; -} - -.facets__disclosure[open] .facets__and-helptext, -.facets__disclosure-vertical[open] .facets__and-helptext { - display: block; -} - -.disclosure-has-popup[open] > .facets__summary::before { - z-index: 2; -} - -.facets__summary > span { - line-height: calc(1 + 0.3 / var(--font-body-scale)); -} - -.facets__summary .icon-caret { - right: 0; -} - -.facets__display { - border-width: var(--popup-border-width); - border-style: solid; - border-color: rgba(var(--color-foreground), var(--popup-border-opacity)); - border-radius: var(--popup-corner-radius); - 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)); - background-color: rgb(var(--color-background)); - position: absolute; - top: calc(100% + 0.5rem); - left: -1.2rem; - width: 35rem; - max-height: 55rem; - overflow-y: auto; -} - -.facets__header { - border-bottom: 1px solid rgba(var(--color-foreground), 0.2); - padding: 1.5rem 2rem; - display: flex; - justify-content: space-between; - font-size: 1.4rem; - position: sticky; - top: 0; - background-color: rgb(var(--color-background)); - z-index: 1; -} - -.facets__header facet-remove { - align-self: center; -} - -.facets__list { - padding: 0.5rem 2rem; -} - -.facets-layout-grid { - display: grid; - grid-template-columns: repeat(3, minmax(0, 1fr)); - text-align: center; - padding: 2rem 2.4rem; -} - -.facets-layout-list--swatch { - --swatch-input--size: 2.4rem; -} - -.facets-layout-grid.facets-layout-grid { - gap: 1rem; -} - -.facets-layout-grid.facets__list--vertical { - padding: 1rem 0; -} - -.facets__item { - display: flex; - align-items: center; -} - -/* Hover/focus state */ -.facets-layout-list .facets__label:hover .facet-checkbox__text-label, -.facets-layout-list input:focus ~ .facet-checkbox__text-label { - text-decoration: underline; -} - -.facets-layout-grid > * { - align-items: flex-start; -} - -.facets-layout-grid .facets__label { - display: flex; - flex-direction: column; - padding: 0; - height: 100%; - font-size: 1.3rem; -} - -/* Image filter specific styles */ -.facets-layout-grid .facets__image-wrapper { - display: block; - position: relative; - aspect-ratio: 1 / 1; - min-height: 0; - padding: 0.4rem; -} - -.facets__image { - width: 100%; - height: 100%; - object-fit: contain; -} - -/* Default state */ -.facets-layout-grid--image .facets__label { - outline-style: solid; - outline-color: transparent; - transition-property: outline-color, outline-width, box-shadow; - transition-duration: var(--duration-short); - transition-timing-function: ease; -} - -.facets-layout-grid--image .facet-checkbox__text { - padding: 0.4rem; -} - -/* Active state */ -.facets-layout-grid--image .facets__label.active { - outline-color: rgb(var(--color-foreground)); - outline-width: 0.1rem; -} - -/* Hover state */ -.facets-layout-grid--image .facets__label:hover { - outline-color: rgba(var(--color-foreground), 0.4); - outline-width: 0.2rem; -} - -/* Focus visible */ -.facets-layout-grid--image .facets__label:has(:focus-visible) { - outline-color: rgba(var(--color-foreground), 0.5); - outline-width: 0.2rem; - box-shadow: 0px 0px 3px 1px rgba(var(--color-foreground), 0.25); -} - -/* Focused state */ -.facets-layout-grid--image .facets__label.active:has(:focus-visible) { - outline-color: rgb(var(--color-foreground)); - outline-width: 0.1rem; - box-shadow: 0 0 0 0.3rem rgb(var(--color-background)), 0 0 0 0.5rem rgba(var(--color-foreground), 0.5), - 0 0 0.7rem 0.1rem rgba(var(--color-foreground), 0.25); -} - -/* Disabled state */ -.facets-layout-grid--image .facets__label.disabled { - /* Note: disabled gets its transparency set by a parent, so no need to set an alpha here. Also, we move the outline to the child when disabled */ - outline: none; -} - -.facets-layout-grid--image .facets__label.disabled .facets__image-wrapper { - outline: 0.1rem solid rgb(var(--color-foreground)); -} - -.facets-layout-grid--image .facets__label.disabled .facets__image-wrapper:before { - content: ''; - position: absolute; - bottom: 0; - left: 0; - /* 100% * square root of 2, this is not a magic number, it is math! */ - width: 141.4%; - height: 0.1rem; - background-color: rgb(var(--color-foreground)); - transform: rotate(-45deg); - transform-origin: left; -} - -.facets-layout-grid--image .facets__label.disabled .disabled-line { - position: absolute; - inset: 0; - height: 100%; - width: 100%; - background: transparent; - margin: 0; -} - -.facets-layout-grid--image .facets__label.disabled .disabled-line line { - stroke: rgb(var(--color-foreground)); - stroke-width: 1; -} - -/* End of image filter specific styles */ - -.list-menu__item label, -.list-menu__item input[type='checkbox'] { - cursor: pointer; -} - -.facet-checkbox { - padding: 1rem 2rem 1rem 0; - flex-grow: 1; - position: relative; - font-size: 1.4rem; - display: flex; - word-break: break-word; -} - -/* Hover, active, and focus states */ -.facets__label:hover, -.facets__label.active, -.facets__label:has(:focus-visible) { - color: rgba(var(--color-foreground), 1); -} - -/* Disabled state */ -.facets-layout .facets__label.disabled { - pointer-events: none; -} - -.facets-layout:not(.facets-layout-list--swatch, .facets-layout-grid--image) .facets__label.disabled { - opacity: 0.4; -} - -.facets-layout-grid--image .facets__label.disabled .facets__image-wrapper { - opacity: 0.2; -} - -:is(.facets-layout-list--swatch, .facets-layout-grid--image) .facets__label.disabled .facet-checkbox__text { - opacity: 0.4; -} - -/* End disabled state */ - -.facets-layout-list--text input[type='checkbox'] { - position: absolute; - opacity: 1; - width: 1.6rem; - height: 1.6rem; - top: 0.7rem; - left: -0.4rem; - z-index: -1; - appearance: none; - -webkit-appearance: none; -} - -.facets-layout-grid input[type='checkbox'], -.facets-layout-list--swatch input[type='checkbox'] { - position: absolute; - inset: 0; - z-index: 1; - margin: 0; - opacity: 0; - width: 100%; - height: 100%; -} - -.facets-layout-list--swatch .facets__label { - display: flex; - align-items: center; - gap: 0.8rem; -} - -.swatch-input-wrapper { - display: flex; -} - -.facet-checkbox > svg, -.facet-checkbox > .svg-wrapper { - background-color: rgb(var(--color-background)); - margin-right: 1.2rem; - flex-shrink: 0; -} - -.facet-checkbox .svg-wrapper { - visibility: hidden; - position: absolute; - left: 0.3rem; - z-index: 5; - top: 1.4rem; - width: 1.1rem; - height: 0.7rem; -} - -.facet-checkbox > input[type='checkbox']:checked ~ .svg-wrapper > .icon-checkmark { - visibility: visible; -} - -@media screen and (forced-colors: active) { - .facet-checkbox > svg { - background-color: inherit; - border: 0.1rem solid rgb(var(--color-background)); - } - - .facet-checkbox > input[type='checkbox']:checked ~ .svg-wrapper > .icon-checkmark { - border: none; - } -} - -.facets__price { - display: flex; - padding: 2rem; -} - -.facets__price .field + .field-currency { - margin-left: 2rem; -} - -.facets__price .field { - align-items: center; -} - -.facets__price .field-currency { - align-self: center; - margin-right: 0.6rem; -} - -.facets__price .field__label { - left: 1.5rem; -} - -button.facets__button { - min-height: 0; - margin: 0 0 0 0.5rem; - box-shadow: none; - padding-top: 1.4rem; - padding-bottom: 1.4rem; -} - -.active-facets { - display: flex; - flex-wrap: wrap; - width: 100%; - grid-column: 1 / -1; - grid-row: 2; - margin-top: -0.5rem; -} - -.active-facets__button { - display: block; - margin-right: 1.5rem; - margin-top: 1.5rem; - padding-left: 0.2rem; - padding-right: 0.2rem; - text-decoration: none; -} - -span.active-facets__button-inner { - color: rgb(var(--color-foreground)); - box-shadow: 0 0 0 0.1rem rgb(var(--color-foreground)); - border-radius: 2.6rem; - font-size: 1rem; - min-height: 0; - min-width: 0; - padding: 0.25rem 1.25rem; - display: flex; - align-items: center; -} - -span.active-facets__button-inner:before, -span.active-facets__button-inner:after { - display: none; -} - -.active-facets__button-wrapper { - align-items: center; - display: flex; - justify-content: center; - padding-top: 1.5rem; -} - -.active-facets__button-wrapper * { - font-size: 1rem; -} - -@media screen and (min-width: 990px) { - .active-facets__button { - margin-right: 1.5rem; - } - - .active-facets__button-wrapper *, - span.active-facets__button-inner { - font-size: 1.4rem; - } -} - -@media screen and (max-width: 989px) { - .active-facets { - margin: 0 -1.2rem -1.2rem; - } - - .active-facets__button, - .active-facets__button-remove { - margin: 0; - padding: 1.2rem; - } - - span.active-facets__button-inner { - padding-bottom: 0.1rem; - padding-top: 0.1rem; - } - - .active-facets__button-wrapper { - padding-top: 0; - margin-left: 1.2rem; - } -} - -.active-facets__button:hover .active-facets__button-inner { - box-shadow: 0 0 0 0.2rem rgb(var(--color-foreground)); -} - -.active-facets__button--light .active-facets__button-inner { - box-shadow: 0 0 0 0.1rem rgba(var(--color-foreground), 0.2); -} - -.active-facets__button--light:hover .active-facets__button-inner { - box-shadow: 0 0 0 0.2rem rgba(var(--color-foreground), 0.4); -} - -a.active-facets__button:focus-visible { - outline: none; - box-shadow: none; -} - -/* outline styling for Windows High Contrast Mode */ -@media (forced-colors: active) { - a.active-facets__button:focus-visible { - outline: transparent solid 1px; - } -} -a.active-facets__button.focused { - outline: none; - box-shadow: none; -} - -a.active-facets__button:focus-visible .active-facets__button-inner { - box-shadow: 0 0 0 0.1rem rgba(var(--color-foreground), 0.2), 0 0 0 0.2rem rgb(var(--color-background)), - 0 0 0 0.4rem rgb(var(--color-foreground)); - outline: none; -} - -a.active-facets__button.focused .active-facets__button-inner { - box-shadow: 0 0 0 0.1rem rgba(var(--color-foreground), 0.2), 0 0 0 0.2rem rgb(var(--color-background)), - 0 0 0 0.4rem rgb(var(--color-foreground)); - outline: none; -} - -.active-facets__button .svg-wrapper { - align-self: center; - flex-shrink: 0; - margin-left: 0.6rem; - margin-right: -0.2rem; - pointer-events: none; - width: 1.2rem; -} - -@media all and (min-width: 990px) { - .active-facets__button .svg-wrapper { - margin-right: -0.4rem; - margin-top: 0.1rem; - width: 1.2rem; - } -} - -.active-facets facet-remove:only-child { - display: none; -} - -.facets-vertical .active-facets .active-facets-vertical-filter:only-child > facet-remove { - display: none; -} - -.facets-vertical .active-facets-vertical-filter { - display: flex; - width: 100%; - justify-content: space-between; -} - -.facets-vertical .active-facets-vertical-filter .active-facets__button-wrapper { - padding-top: 0; - display: flex; - align-items: flex-start; -} - -.facets-vertical .active-facets__button { - margin-top: 0; -} - -.active-facets__button.disabled, -.mobile-facets__clear.disabled { - pointer-events: none; -} - -.mobile-facets__clear-wrapper { - align-items: center; - display: flex; - justify-content: center; -} - -.mobile-facets { - position: fixed; - top: 0; - left: 0; - right: 0; - bottom: 0; - z-index: 100; - background-color: rgba(var(--color-foreground), 0.5); - pointer-events: none; -} - -.mobile-facets__disclosure { - display: flex; -} - -.mobile-facets__wrapper { - margin-left: 0; - display: flex; -} - -.mobile-facets__wrapper .disclosure-has-popup[open] > summary::before { - height: 100vh; - z-index: 3; -} - -.mobile-facets__inner { - background-color: rgb(var(--color-background)); - width: calc(100% - 5rem); - margin-left: auto; - height: 100%; - overflow-y: auto; - pointer-events: all; - transition: transform var(--duration-default) ease; - max-width: 37.5rem; - display: flex; - flex-direction: column; - border-color: rgba(var(--color-foreground), var(--drawer-border-opacity)); - border-style: solid; - border-width: 0 0 0 var(--drawer-border-width); - filter: drop-shadow( - var(--drawer-shadow-horizontal-offset) var(--drawer-shadow-vertical-offset) var(--drawer-shadow-blur-radius) - rgba(var(--color-shadow), var(--drawer-shadow-opacity)) - ); -} - -.menu-opening .mobile-facets__inner { - transform: translateX(0); -} - -.js .disclosure-has-popup:not(.menu-opening) .mobile-facets__inner { - transform: translateX(105vw); -} - -.mobile-facets__header { - border-bottom: 0.1rem solid rgba(var(--color-foreground), 0.08); - padding: 1rem 2.5rem; - text-align: center; - display: flex; - position: sticky; - top: 0; - z-index: 2; -} - -.mobile-facets__header-inner { - flex-grow: 1; - position: relative; -} - -.mobile-facets__info { - padding: 0 2.6rem; -} - -.mobile-facets__heading { - font-size: calc(var(--font-heading-scale) * 1.4rem); - margin: 0; -} - -.mobile-facets__count { - color: rgba(var(--color-foreground), 0.7); - font-size: 1.3rem; - margin: 0; - flex-grow: 1; -} - -.mobile-facets__open-wrapper { - display: inline-block; -} - -.mobile-facets__open { - text-align: left; - width: 100%; - padding-top: 0.5rem; - padding-bottom: 0.5rem; - display: flex; - align-items: center; - color: rgba(var(--color-link), var(--alpha-link)); -} - -.mobile-facets__open:hover { - color: rgb(var(--color-link)); -} - -.mobile-facets__open:hover line, -.mobile-facets__open:hover circle { - stroke: rgb(var(--color-link)); -} - -.mobile-facets__open-label { - transition: text-decoration var(--duration-short) ease; -} - -.mobile-facets__open:hover .mobile-facets__open-label { - text-decoration: underline; - text-underline-offset: 0.3rem; -} - -.mobile-facets__open > * + * { - margin-left: 1rem; -} - -.mobile-facets__open .svg-wrapper { - width: 2rem; -} - -.mobile-facets__open line, -.mobile-facets__open circle { - stroke: rgba(var(--color-link), var(--alpha-link)); -} - -.mobile-facets__close { - display: none; - align-items: center; - justify-content: center; - position: fixed; - top: 0.7rem; - right: 1rem; - width: 4.4rem; - height: 4.4rem; - z-index: 101; - opacity: 0; - transition: opacity var(--duration-short) ease; -} - -.mobile-facets__close .svg-wrapper { - width: 2.2rem; -} - -details.menu-opening .mobile-facets__close { - display: flex; - opacity: 1; -} - -details.menu-opening .mobile-facets__close .svg-wrapper { - margin: 0; -} - -.mobile-facets__close-button { - align-items: center; - background-color: transparent; - font-size: 1.4rem; - font: inherit; - letter-spacing: inherit; - margin-top: 1.5rem; - padding: 1.2rem 2.6rem; - text-decoration: none; - - display: grid; - grid-template-columns: min-content 1fr; - text-align: start; -} - -.mobile-facets__close-button > .facets__and-helptext { - grid-column-start: 2; -} - -.mobile-facets__close-button .icon-arrow { - transform: rotate(180deg); - margin-right: 1rem; -} - -.mobile-facets__main { - padding: 2.7rem 0 0; - position: relative; - z-index: 1; - flex-grow: 1; - display: flex; - flex-direction: column; - overflow-y: auto; -} - -.mobile-facets__details[open] .icon-caret { - transform: rotate(180deg); -} - -.mobile-facets__highlight { - position: absolute; - top: 0px; - left: 0px; - right: 0px; - bottom: 0px; - display: block; - background-color: rgba(var(--color-foreground), 0.04); - opacity: 0; - visibility: hidden; -} - -.mobile-facets__checkbox:checked + .mobile-facets__highlight { - opacity: 1; - visibility: visible; -} - -.mobile-facets__summary { - padding: 1.3rem 2.5rem; -} - -.mobile-facets__summary .svg-wrapper { - margin-left: auto; -} - -.mobile-facets__summary > div { - display: flex; - align-items: center; -} - -.js .mobile-facets__submenu { - position: absolute; - top: 0; - width: 100%; - bottom: 0; - left: 0; - z-index: 3; - transform: translateX(100%); - visibility: hidden; - display: flex; - flex-direction: column; -} - -.js details[open] > .mobile-facets__submenu { - transition: transform 0.4s cubic-bezier(0.29, 0.63, 0.44, 1), visibility 0.4s cubic-bezier(0.29, 0.63, 0.44, 1); -} - -.js details[open].menu-opening > .mobile-facets__submenu { - transform: translateX(0); - visibility: visible; -} - -.js .menu-drawer__submenu .mobile-facets__submenu { - overflow-y: auto; -} - -.js .mobile-facets .submenu-open { - visibility: hidden; /* hide menus from screen readers when hidden by submenu */ -} - -.mobile-facets__item { - position: relative; -} - -input.mobile-facets__checkbox { - border: 0; - position: absolute; - width: 1.6rem; - height: 1.6rem; - position: absolute; - left: 2.1rem; - top: 1.2rem; - z-index: 0; - appearance: none; - -webkit-appearance: none; -} - -.mobile-facets__label { - padding: 1.5rem 2rem 1.5rem 2.5rem; - width: 100%; - transition: background-color 0.2s ease; - word-break: break-word; - display: flex; -} - -.mobile-facets__label > svg { - background-color: rgb(var(--color-background)); - position: relative; - z-index: 2; - margin-right: 1.2rem; - flex-shrink: 0; -} - -.mobile-facets__label .icon-checkmark { - position: absolute; - top: 1.9rem; - left: 2.8rem; - visibility: hidden; - width: 11px; - height: 9px; -} - -.mobile-facets__label > input[type='checkbox']:checked ~ .icon-checkmark { - visibility: visible; -} - -.mobile-facets__arrow, -.mobile-facets__summary .icon-caret { - margin-left: auto; - display: block; -} - -.mobile-facets__footer { - border-top: 0.1rem solid rgba(var(--color-foreground), 0.08); - padding: 2rem; - bottom: 0; - position: sticky; - display: flex; - z-index: 2; - margin-top: auto; - background-color: rgb(var(--color-background)); - background: var(--gradient-background); -} - -.mobile-facets__footer > * + * { - margin-left: 1rem; -} - -.mobile-facets__footer > * { - width: 50%; -} - -.mobile-facets__sort { - display: flex; - justify-content: space-between; -} - -.mobile-facets__sort label { - flex-shrink: 0; -} - -.mobile-facets__sort .select { - width: auto; -} - -.mobile-facets__sort .select .icon-caret { - right: 0; -} - -.mobile-facets__sort .select__select { - background-color: transparent; - border-radius: 0; - box-shadow: none; - filter: none; - margin-left: 0.5rem; - margin-right: 0.5rem; - padding-left: 0.5rem; - padding-right: 1.5rem; -} - -.product-count { - align-self: center; - position: relative; - text-align: right; -} - -.product-count__text { - font-size: 1.4rem; - line-height: calc(1 + 0.5 / var(--font-body-scale)); - margin: 0; -} - -#ProductCountDesktop.loading, -#ProductCount.loading { - visibility: hidden; -} - -.product-count .loading__spinner, -.product-count-vertical .loading__spinner { - position: absolute; - padding-top: 0.6rem; - right: 0; - top: 50%; - transform: translateY(-50%); - width: 1.8rem; -} - -@media screen and (min-width: 750px) { - .facets-vertical { - display: flex; - } - - .facets-wrap-vertical { - border: none; - padding-left: 0; - } - - .facets__form-vertical { - display: flex; - flex-direction: column; - width: 26rem; - } - - .facets__disclosure-vertical { - border-top: 0.1rem solid rgba(var(--color-foreground), 0.1); - margin-right: 0; - } - - .facets-vertical .facets__summary { - padding-top: 1.5rem; - margin-bottom: 0; - padding-bottom: 1.5rem; - } - - .facets__heading--vertical { - margin: 0 0 1.5rem 0; - font-size: 1.5rem; - } - - .facets__header-vertical { - padding: 1.5rem 2rem 1.5rem 0; - font-size: 1.4rem; - } - - .facets__display-vertical { - padding-bottom: 1.5rem; - } - - .facets-vertical .facets-wrapper { - padding-right: 3rem; - } - - .facets-vertical .facets-wrapper--no-filters { - display: none; - } - - .facets-vertical .product-grid-container { - width: 100%; - } - - .facets-vertical-form { - display: flex; - justify-content: flex-end; - } - - .product-count-vertical { - margin-left: 3.5rem; - position: relative; - } - - .facets-vertical .active-facets__button-wrapper { - margin-bottom: 2rem; - } - - .facets-vertical .facets__price { - padding: 0.5rem 0.5rem 0.5rem 0; - } - - .facets-vertical .facets__price .field:last-of-type { - margin-left: 1rem; - } - - .facets-vertical .active-facets__button { - margin-bottom: 1.5rem; - } - - .facets-vertical .facet-checkbox input[type='checkbox'] { - z-index: 0; - } - - .facets-vertical .active-facets facet-remove:last-of-type { - margin-bottom: 1rem; - } - - .facets-vertical .active-facets { - margin: 0; - align-items: flex-start; - } - - .facets__disclosure-vertical[open] .facets__summary .icon-caret { - transform: rotate(180deg); - } - - .facets-container-drawer { - display: flex; - flex-flow: row wrap; - align-items: center; - column-gap: 0; - } - - .facets-container-drawer .mobile-facets__wrapper { - margin-right: 2rem; - flex-grow: 1; - } - - .facets-container-drawer .product-count { - margin: 0 0 0.5rem 3.5rem; - } - - .facets-container-drawer .facets-pill { - width: 100%; - } - - .facets-container-drawer .facets__form { - display: block; - } -} - -@media screen and (min-width: 750px) and (max-width: 989px) { - .facets-vertical .active-facets__button { - padding: 1rem; - margin-bottom: 0; - margin-left: -0.5rem; - } - - .facets-vertical .active-facets__button-remove { - padding: 0 1rem 1rem; - } -} diff --git a/assets/component-grid-banner.css b/assets/component-grid-banner.css new file mode 100644 index 00000000000..be75a7123d0 --- /dev/null +++ b/assets/component-grid-banner.css @@ -0,0 +1,48 @@ +.grid-banner__inner { + --f-row-gap: var(--f-column-gap); +} +@media (min-width: 768px) { + .grid-banner__inner { + grid-auto-rows: var(--grid-auto-rows, 30rem); + } +} +@media (min-width: 768px) { + .grid-banner__item { + --x-cell-c-span: auto / span var(--cell-c-span); + --x-cell-r-span: auto / span var(--cell-r-span); + grid-column: var(--x-cell-c-span, auto/span 1); + grid-row: var(--x-cell-r-span, auto/span 1); + } +} +.grid-banner .card-media { + height: 100%; +} +@media (max-width: 767.98px) { + .grid-banner .card-media__content-wrapper { + width: 100%; + } +} +@media (min-width: 768px) { + .grid-banner .f-grid-auto-rows--auto { + --grid-auto-rows: auto; + } + .grid-banner .f-grid-auto-rows--small { + --grid-auto-rows: 25rem; + } + .grid-banner .f-grid-auto-rows--medium { + --grid-auto-rows: 30rem; + } + .grid-banner .f-grid-auto-rows--large { + --grid-auto-rows: 35rem; + } +} +@media (max-width: 767.98px) { + .grid-banner .card-media--extra-small { + --padding-y: 2rem; + --padding-x: 2rem; + } + .grid-banner .card-media--small { + --padding-y: 2.4rem; + --padding-x: 2.4rem; + } +} diff --git a/assets/component-help-sidebar.css b/assets/component-help-sidebar.css new file mode 100644 index 00000000000..ccd158c1474 --- /dev/null +++ b/assets/component-help-sidebar.css @@ -0,0 +1,57 @@ +.help-sidebar__wrapper { + gap: 2.4rem 3rem; +} +.help-sidebar__sidebar { + position: relative; + padding-inline: 3rem 0; + flex: 0 0 clamp(38rem, 48rem, 40%); +} +.help-sidebar__sidebar:before { + content: ""; + position: absolute; + top: 0; + inset-inline: 0 auto; + width: 1px; + height: 100%; + background-color: rgba(var(--color-foreground), 0.1); +} +.help-sidebar__icon-text { + margin-top: 2.4rem; +} +.help-sidebar__icon-text .icon { + color: rgb(var(--icon-color)); +} +.help-sidebar__button { + margin-top: 2.4rem; +} + +@media (min-width: 768px) { + .help-sidebar__button { + margin-top: 2.4rem; + } + .help-sidebar__icon-text-1 { + margin-top: 2.4rem; + } + .help-sidebar--left .help-sidebar__sidebar { + padding-inline: 0 3rem; + order: -99; + } + .help-sidebar--left .help-sidebar__sidebar:before { + inset-inline: auto 0; + } +} +@media (max-width: 1279.98px) { + .help-sidebar__sidebar { + flex: 0 0 33rem; + } +} +@media (max-width: 767.98px) { + .help-sidebar__sidebar { + padding-inline: 0; + padding-top: 2.4rem; + } + .help-sidebar__sidebar:before { + width: 100%; + height: 1px; + } +} diff --git a/assets/component-image-with-text.css b/assets/component-image-with-text.css deleted file mode 100644 index 5a97c82c009..00000000000 --- a/assets/component-image-with-text.css +++ /dev/null @@ -1,417 +0,0 @@ -.image-with-text .grid { - margin-bottom: 0; -} - -.image-with-text .grid__item { - position: relative; -} - -@media screen and (min-width: 750px) { - .image-with-text__grid--reverse { - flex-direction: row-reverse; - } -} - -.image-with-text__media { - min-height: 100%; - overflow: visible; -} - -.image-with-text__media--small { - height: 19.4rem; -} - -.image-with-text__media--medium { - height: 29.6rem; -} - -.image-with-text__media--large { - height: 43.5rem; -} - -@media screen and (min-width: 750px) { - .image-with-text__media--small { - height: 31.4rem; - } - - .image-with-text__media--medium { - height: 46rem; - } - - .image-with-text__media--large { - height: 69.5rem; - } -} - -.image-with-text__media--placeholder { - position: relative; - overflow: hidden; -} - -.image-with-text__media--placeholder:after { - content: ''; - position: absolute; - background: rgba(var(--color-foreground), 0.04); -} - -.image-with-text__media--placeholder.image-with-text__media--adapt { - height: 20rem; -} - -@media screen and (min-width: 750px) { - .image-with-text__media--placeholder.image-with-text__media--adapt { - height: 30rem; - } -} - -.image-with-text__media--placeholder > svg { - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - width: 100%; - height: 100%; - fill: currentColor; -} - -.image-with-text__media--placeholder:is(.animate--ambient, .animate--zoom-in) > .svg-wrapper { - top: 0; - left: 0; - transform: translate(0); -} - -.image-with-text__content { - align-items: flex-start; - display: flex; - flex-direction: column; - height: 100%; - justify-content: center; - align-self: center; - padding: 4rem calc(4rem / var(--font-body-scale)) 5rem; - position: relative; - z-index: 1; -} - -.image-with-text .grid__item::after { - content: ''; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: -1; -} - -.image-with-text:not(.image-with-text--overlap) .image-with-text__media-item:after { - 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)); -} - -.image-with-text:not(.image-with-text--overlap) .image-with-text__text-item:after { - 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)); -} - -.image-with-text .image-with-text__media-item > * { - border-radius: var(--media-radius); - overflow: hidden; - 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)); -} - -.image-with-text .global-media-settings { - overflow: hidden !important; -} - -.image-with-text .image-with-text__text-item > * { - border-radius: var(--text-boxes-radius); - overflow: hidden; - 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)); -} - -.image-with-text:not(.image-with-text--overlap) .image-with-text__media-item > *, -.image-with-text:not(.image-with-text--overlap) .image-with-text__text-item > * { - box-shadow: none; -} - -@media screen and (max-width: 749px) { - .image-with-text.collapse-corners:not(.image-with-text--overlap) .image-with-text__media-item:after, - .image-with-text.collapse-corners:not(.image-with-text--overlap) .grid__item .image-with-text__media, - .image-with-text.collapse-corners:not(.image-with-text--overlap) .image-with-text__media img, - .image-with-text.collapse-corners:not(.image-with-text--overlap) .image-with-text__media .placeholder-svg { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - } - - .image-with-text.collapse-corners:not(.image-with-text--overlap) .image-with-text__text-item:after, - .image-with-text.collapse-corners:not(.image-with-text--overlap) .grid__item .image-with-text__content { - border-top-left-radius: 0; - border-top-right-radius: 0; - } - - .image-with-text.collapse-borders:not(.image-with-text--overlap) .image-with-text__content { - border-top: 0; - } -} - -.image-with-text__content--mobile-right > * { - align-self: flex-end; - text-align: right; -} - -.image-with-text__content--mobile-center > * { - align-self: center; - text-align: center; -} - -.image-with-text--overlap .image-with-text__content { - width: 90%; - margin: -3rem auto 0; -} - -@media screen and (min-width: 750px) { - .image-with-text__grid--reverse .image-with-text__content { - margin-left: auto; - } - - .image-with-text__content--bottom { - justify-content: flex-end; - align-self: flex-end; - } - - .image-with-text__content--top { - justify-content: flex-start; - align-self: flex-start; - } - - .image-with-text__content--desktop-right > * { - align-self: flex-end; - text-align: right; - } - - .image-with-text__content--desktop-left > * { - align-self: flex-start; - text-align: left; - } - - .image-with-text__content--desktop-center > * { - align-self: center; - text-align: center; - } - - .image-with-text--overlap .image-with-text__text-item { - display: flex; - padding: 3rem 0; - } - - .image-with-text--overlap .image-with-text__content { - height: auto; - width: calc(100% + 4rem); - min-width: calc(100% + 4rem); - margin-top: 0; - margin-left: -4rem; - } - - .image-with-text--overlap .image-with-text__grid--reverse .image-with-text__content { - margin-left: 0; - margin-right: -4rem; - } - - .image-with-text--overlap .image-with-text__grid--reverse .image-with-text__text-item { - justify-content: flex-end; - } - - .image-with-text--overlap .image-with-text__media-item--top { - align-self: flex-start; - } - - .image-with-text--overlap .image-with-text__media-item--middle { - align-self: center; - } - - .image-with-text--overlap .image-with-text__media-item--bottom { - align-self: flex-end; - } - - .image-with-text__media-item--small, - .image-with-text__media-item--large + .image-with-text__text-item { - flex-grow: 0; - } - - .image-with-text.collapse-corners:not(.image-with-text--overlap) - .grid:not(.image-with-text__grid--reverse) - .image-with-text__media-item:after, - .image-with-text.collapse-corners:not(.image-with-text--overlap) - .grid:not(.image-with-text__grid--reverse) - .image-with-text__media, - .image-with-text.collapse-corners:not(.image-with-text--overlap) - .grid:not(.image-with-text__grid--reverse) - .image-with-text__media - img, - .image-with-text.collapse-corners:not(.image-with-text--overlap) - .grid:not(.image-with-text__grid--reverse) - .image-with-text__media - .placeholder-svg, - .image-with-text.collapse-corners:not(.image-with-text--overlap) - .image-with-text__grid--reverse - .image-with-text__text-item:after, - .image-with-text.collapse-corners:not(.image-with-text--overlap) - .image-with-text__grid--reverse - .image-with-text__content, - .image-with-text.collapse-corners:not(.image-with-text--overlap) - .image-with-text__grid--reverse - .image-with-text__content:after { - border-top-right-radius: 0; - border-bottom-right-radius: 0; - } - - .image-with-text.collapse-corners:not(.image-with-text--overlap) - .grid:not(.image-with-text__grid--reverse) - .image-with-text__text-item:after, - .image-with-text.collapse-corners:not(.image-with-text--overlap) - .grid:not(.image-with-text__grid--reverse) - .image-with-text__content, - .image-with-text.collapse-corners:not(.image-with-text--overlap) - .grid:not(.image-with-text__grid--reverse) - .image-with-text__content:after, - .image-with-text.collapse-corners:not(.image-with-text--overlap) - .image-with-text__grid--reverse - .image-with-text__media-item:after, - .image-with-text.collapse-corners:not(.image-with-text--overlap) - .image-with-text__grid--reverse - .image-with-text__media, - .image-with-text.collapse-corners:not(.image-with-text--overlap) - .image-with-text__grid--reverse - .image-with-text__media - img, - .image-with-text.collapse-corners:not(.image-with-text--overlap) - .image-with-text__grid--reverse - .image-with-text__media - .placeholder-svg { - border-top-left-radius: 0; - border-bottom-left-radius: 0; - } - - .image-with-text.collapse-borders:not(.image-with-text--overlap) - .grid:not(.image-with-text__grid--reverse) - .image-with-text__content { - border-left: 0; - } - - .image-with-text.collapse-borders:not(.image-with-text--overlap) - .image-with-text__grid--reverse - .image-with-text__content { - border-right: 0; - } -} - -.image-with-text:not(.collapse-corners, .image-with-text--overlap) .image-with-text__media-item { - z-index: 2; -} - -/* Needed for gradient continuity with or without animation so that transparent PNG images come up as we would expect */ -.image-with-text.image-with-text--overlap .backround-transparent, -.image-with-text:not(.image-with-text--overlap) .background-transparent { - background: transparent; -} - -/* Needed for gradient continuity with or without animation, the transform scopes the gradient to its container which happens already when animation are turned on */ -.image-with-text .gradient { - transform: perspective(0); -} - -.image-with-text__content { - 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)); - word-break: break-word; -} - -@media screen and (min-width: 990px) { - .image-with-text__content { - padding: 6rem 7rem 7rem; - } -} - -.image-with-text__content > * + * { - margin-top: 2rem; -} - -.image-with-text__content > .image-with-text__text:empty ~ a { - margin-top: 2rem; -} - -.image-with-text__content > :first-child:is(.image-with-text__heading), -.image-with-text__text--caption + .image-with-text__heading, -.image-with-text__text--caption:first-child { - margin-top: 0; -} - -.image-with-text__content :last-child:is(.image-with-text__heading), -.image-with-text__text--caption { - margin-bottom: 0; -} - -.image-with-text__content .button + .image-with-text__text { - margin-top: 2rem; -} - -.image-with-text__content .image-with-text__text + .button { - margin-top: 3rem; -} - -.image-with-text__heading { - margin-bottom: 0; -} - -.image-with-text__text p { - margin-top: 0; - margin-bottom: 1rem; -} - -@media screen and (max-width: 749px) { - .collapse-padding .image-with-text__grid .image-with-text__content { - padding-left: 0; - padding-right: 0; - } -} - -@media screen and (min-width: 750px) { - .collapse-padding - .image-with-text__grid:not(.image-with-text__grid--reverse) - .image-with-text__content:not(.image-with-text__content--desktop-center) { - padding-right: 0; - } - - .collapse-padding - .image-with-text__grid--reverse - .image-with-text__content:not(.image-with-text__content--desktop-center) { - padding-left: 0; - } -} - -/* check for flexbox gap in older Safari versions */ -@supports not (inset: 10px) { - .image-with-text .grid { - margin-left: 0; - } -} - -/* - Multirow - note: consider removing from this stylesheet if multirow-specific styles increase signficantly -*/ -.multirow__inner { - display: flex; - flex-direction: column; - row-gap: var(--grid-mobile-vertical-spacing); -} - -@media screen and (min-width: 750px) { - .multirow__inner { - row-gap: var(--grid-desktop-vertical-spacing); - } -} diff --git a/assets/component-list-menu.css b/assets/component-list-menu.css deleted file mode 100644 index 09f76ba95e8..00000000000 --- a/assets/component-list-menu.css +++ /dev/null @@ -1,30 +0,0 @@ -.list-menu--right { - right: 0; -} - -.list-menu--disclosure { - position: absolute; - min-width: 100%; - width: 20rem; - border: 1px solid rgba(var(--color-foreground), 0.2); -} - -.list-menu--disclosure:focus { - outline: none; -} - -.list-menu__item--active { - text-decoration: underline; - text-underline-offset: 0.3rem; -} - -.list-menu__item--active:hover { - text-decoration-thickness: 0.2rem; -} - -.list-menu--disclosure.localization-selector { - max-height: 18rem; - overflow: auto; - width: 10rem; - padding: 0.5rem; -} diff --git a/assets/component-list-payment.css b/assets/component-list-payment.css deleted file mode 100644 index 62a506265dd..00000000000 --- a/assets/component-list-payment.css +++ /dev/null @@ -1,22 +0,0 @@ -.list-payment { - display: flex; - flex-wrap: wrap; - justify-content: center; - margin: -0.5rem 0; - padding-top: 1rem; - padding-left: 0; -} - -@media screen and (min-width: 750px) { - .list-payment { - justify-content: flex-end; - margin: -0.5rem; - padding-top: 0; - } -} - -.list-payment__item { - align-items: center; - display: flex; - padding: 0.5rem; -} diff --git a/assets/component-list-social.css b/assets/component-list-social.css index a6c04c14873..8f95d4153e5 100644 --- a/assets/component-list-social.css +++ b/assets/component-list-social.css @@ -1,32 +1,21 @@ .list-social { display: flex; flex-wrap: wrap; - justify-content: flex-end; -} - -@media only screen and (max-width: 749px) { - .list-social { - justify-content: center; - } -} - -.list-social__item .icon { - height: 2.2rem; - width: 2.2rem; + column-gap: var(--social-item-gap-x, 3rem); + row-gap: var(--social-item-gap-y, 2rem); } .list-social__link { align-items: center; display: flex; - padding: 1.1rem; - color: rgb(var(--color-foreground)); + position: relative; } - -.utility-bar .list-social__link { - padding: 0 0.8rem; - height: 3.8rem; +.list-social__link::before { + content: ""; + position: absolute; + inset: -1rem; } .list-social__link:hover .icon { - transform: scale(1.07); + transform: scale(1.04); } diff --git a/assets/component-localization-form.css b/assets/component-localization-form.css deleted file mode 100644 index 3e13eb405bc..00000000000 --- a/assets/component-localization-form.css +++ /dev/null @@ -1,451 +0,0 @@ -.localization-form { - display: flex; - flex-direction: column; - flex: auto 1 0; - padding: 1rem; - margin: 0 auto; -} - -.localization-form:only-child { - display: inline-flex; - flex-wrap: wrap; - flex: initial; - padding: 1rem 0; -} - -.localization-form:only-child .button, -.localization-form:only-child .localization-form__select { - margin: 1rem 1rem 0.5rem; - flex-grow: 1; -} - -@media screen and (min-width: 750px) { - .localization-form { - padding: 1rem 2rem 1rem 0; - } - - .localization-form:first-of-type { - padding-left: 0; - } - - .localization-form:only-child { - justify-content: start; - width: auto; - margin: 0 1rem 0 0; - } - - .localization-form:only-child .button, - .localization-form:only-child .localization-form__select { - margin: 1rem 0; - } -} - -.localization-form .button { - padding: 1rem; -} - -.localization-form__currency { - opacity: 0; - transition: opacity 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94); - white-space: nowrap; - padding-right: 1.7rem; -} - -@media screen and (max-width: 749px) { - .localization-form .button { - word-break: break-all; - } - - .localization-form__currency { - opacity: 1; - } -} - -.localization-form__select { - border-radius: var(--inputs-radius-outset); - position: relative; - margin-bottom: 1.5rem; - padding-left: 1rem; - text-align: left; - min-height: calc(4rem + var(--inputs-border-width) * 2); - min-width: calc(7rem + var(--inputs-border-width) * 2); -} - -.disclosure__button.localization-form__select { - padding: calc(2rem + var(--inputs-border-width)); - background: rgb(var(--color-background)); -} - -.localization-form__select .icon-caret { - position: absolute; - content: ''; - height: 0.6rem; - right: calc(var(--inputs-border-width) + 1.5rem); - top: calc(50% - 0.2rem); -} - -.localization-selector.link { - text-decoration: none; - appearance: none; - -webkit-appearance: none; - -moz-appearance: none; - color: rgb(var(--color-foreground)); - width: 100%; - padding-right: 4rem; - padding-bottom: 1.5rem; -} - -.disclosure .localization-form__select { - padding-top: 1.5rem; -} - -.localization-selector option { - color: #000000; -} - -.localization-selector + .disclosure__list-wrapper { - opacity: 1; - animation: animateLocalization var(--duration-default) ease; -} - -.disclosure { - position: relative; -} - -.disclosure__button { - align-items: center; - cursor: pointer; - display: flex; - height: 4rem; - padding: 0 1.5rem 0 1.5rem; - font-size: 1.3rem; - background-color: transparent; -} - -.disclosure__list-wrapper { - border-width: var(--popup-border-width); - border-style: solid; - border-color: rgba(var(--color-foreground), var(--popup-border-opacity)); - overflow: hidden; - position: absolute; - bottom: 100%; - transform: translateY(-1rem); - z-index: 2; - background-color: rgb(var(--color-background)); - border-radius: var(--popup-corner-radius); - 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)); - max-height: 27.5rem; -} - -.disclosure__list { - position: relative; - overflow-y: auto; - font-size: 1.4rem; - padding-bottom: 0.5rem; - padding-top: 0.5rem; - scroll-padding: 0.5rem 0; - max-height: 20.5rem; - max-width: 25.5rem; - min-width: 12rem; - width: max-content; -} - -.country-selector__list { - padding-bottom: 0.95rem; - padding-top: 0; -} - -.country-selector__list--with-multiple-currencies { - width: 25.5rem; -} - -.country-selector__close-button { - display: none; -} - -.country-filter { - display: flex; - justify-content: end; - align-items: center; - gap: 0.5rem; - padding: 1.5rem 1.5rem 0.6rem; - position: sticky; - top: -0.02rem; - background-color: rgb(var(--color-background)); - z-index: 6; -} - -.country-filter__input { - min-width: 200px; -} - -.country-filter__reset-button, -.country-filter__search-icon { - right: calc(var(--inputs-border-width)); - top: var(--inputs-border-width); -} - -.country-filter__reset-button:not(:focus-visible)::after, -.country-filter__reset-button:not(:focus)::after { - display: block; - height: calc(100% - 1.8rem); - content: ''; - position: absolute; - right: 0; -} - -.country-filter__reset-button:focus, -.country-filter__reset-button:focus-visible { - background-color: rgb(var(--color-background)); - z-index: 4; -} - -.country-filter__reset-button:not(:focus-visible):not(.focused) { - box-shadow: inherit; - background-color: inherit; -} - -.country-filter__reset-button:hover .icon { - transform: scale(1.07); -} - -.country-filter__reset-button .icon.icon-close, -.country-filter__search-icon .icon { - height: 1.8rem; - width: 1.8rem; - stroke-width: 0.1rem; -} - -.country-filter__search-icon { - transition: opacity var(--duration-short) ease, visibility var(--duration-short) ease; - opacity: 1; - visibility: visible; - pointer-events: none; - cursor: text; -} - -.country-filter__search-icon--hidden { - opacity: 0; - visibility: hidden; -} - -@media screen and (max-width: 749px) { - .disclosure__list-wrapper.country-selector:not([hidden]) + .country-selector__overlay:empty { - display: block; - } - - .country-selector__overlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: rgba(var(--color-foreground), 0.5); - z-index: 3; - animation: animateLocalization var(--duration-default) ease; - } - - .disclosure__list-wrapper.country-selector { - position: fixed; - bottom: -1rem; - left: 0; - width: 100%; - height: 80%; - max-height: 80vh; - border-radius: 0; - border: none; - box-shadow: none; - z-index: 4; - } - - .disclosure__list.country-selector__list { - max-height: 85%; - min-width: 100%; - margin-bottom: 0; - z-index: 5; - } - - .country-selector__close-button.link { - display: flex; - justify-content: center; - align-items: center; - padding: 0rem; - background-color: transparent; - height: 4.4rem; - width: 4.4rem; - } - - .country-selector__close-button .icon { - width: 2rem; - height: 2rem; - } - - .country-filter { - padding: 1.5rem 2rem 0.6rem 1.5rem; - } -} - -@media screen and (min-width: 750px) { - .country-filter--no-padding { - padding: 0; - } -} - -.countries { - padding-top: 0.6rem; -} - -.popular-countries { - border-bottom: 1px solid rgba(var(--color-foreground), 0.2); - padding-bottom: 0.6rem; - padding-top: 0.6rem; -} - -.disclosure__item { - position: relative; -} - -.disclosure__link { - display: grid; - grid-template-columns: auto 1fr auto; - gap: 0.5rem; - padding: 0.9rem 1.5rem; - text-decoration: none; - line-height: calc(1 + 0.8 / var(--font-body-scale)); - color: rgba(var(--color-foreground), 0.75); - word-break: break-word; -} - -.disclosure__link:hover { - color: rgb(var(--color-foreground)); -} - -.disclosure__link .icon-checkmark { - width: 1rem; - margin-right: 0.2rem; -} - -.disclosure__link:hover .localization-form__currency, -.disclosure__link:focus-visible .localization-form__currency, -.disclosure__link:focus .localization-form__currency { - display: inline-block; - opacity: 1; -} - -.disclosure__button[aria-expanded='true'] .icon-caret { - transform: rotate(180deg); -} - -/* Header localization */ -.header-localization .localization-form:only-child { - margin: 0; - padding: 0; -} - -.header-localization .disclosure .localization-form__select { - font-size: 1.4rem; - letter-spacing: 0.06rem; - height: auto; - min-height: initial; - background: transparent; -} - -.header-localization .disclosure .localization-form__select:hover { - text-decoration: underline; -} - -.header-localization .localization-form__select.link:after, -.header-localization .localization-form__select.link:before { - box-shadow: none; -} - -.header-localization .localization-form__select.link:focus-visible { - outline: 0.2rem solid rgba(var(--color-foreground), 0.5); - outline-offset: -0.2rem; - box-shadow: 0 0 0.2rem 0 rgba(var(--color-foreground), 0.3); -} - -/* Header icons (desktop) */ -.desktop-localization-wrapper { - display: flex; - flex-wrap: wrap; - justify-content: flex-end; -} - -.desktop-localization-wrapper .localization-selector + .disclosure__list-wrapper { - animation: animateMenuOpen var(--duration-default) ease; -} - -.desktop-localization-wrapper .localization-form:only-child { - padding: 0; -} - -.header-localization:not(.menu-drawer__localization) { - align-items: center; -} - -.js .header-localization:not(.menu-drawer__localization) .localization-form__select { - padding: 0 2.7rem 0 1.2rem; - width: max-content; - height: 3.8rem; -} - -.header-localization:not(.menu-drawer__localization) .localization-form:only-child .localization-form__select { - margin: 0; -} - -.header-localization:not(.menu-drawer__localization).localization-form__select > span { - max-width: 20ch; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; -} - -.header-localization:not(.menu-drawer__localization) localization-form:only-child .localization-form__select > span { - max-width: 26ch; -} - -.header-localization:not(.menu-drawer__localization) .localization-form__select .icon-caret { - right: 0.8rem; -} - -.header-localization:not(.menu-drawer__localization) .disclosure__list-wrapper { - bottom: initial; - top: 100%; - right: 0; - transform: translateY(0); -} - -/* Menu drawer */ -@media screen and (min-width: 990px) { - .menu-drawer__localization { - display: none; - } -} - -.menu-drawer__localization localization-form { - display: block; -} - -.menu-drawer__localization .localization-form__select { - background-color: initial; - margin-top: 0; - padding: 1rem 3.6rem 1rem 0rem; -} - -.menu-drawer__localization .localization-form { - padding: 0; -} - -.menu-drawer__localization .localization-form:only-child .localization-form__select { - margin: 0; -} - -.menu-drawer__localization + .list-social { - margin-top: 1rem; -} - -.language-selector .disclosure__list { - min-width: 200px; -} diff --git a/assets/component-lookbook-card-modal.css b/assets/component-lookbook-card-modal.css new file mode 100644 index 00000000000..c56313aa2bb --- /dev/null +++ b/assets/component-lookbook-card-modal.css @@ -0,0 +1,130 @@ +/** + * Lookbook card modal using in Lookbook cards section. + */ +.lbcard { + box-sizing: border-box; +} +.lbcard__popup { + padding: 0; + justify-content: center; + align-items: flex-end; +} +.lbcard__popup .drawer__inner { + width: 100%; + max-width: 100%; + max-height: 100%; + padding: 0 0 1.6rem; +} +@media (max-width: 767.98px) { + .lbcard__popup .drawer__inner { + border-radius: 0; + transform: translateY(100%); + } +} +@media (max-width: 767.98px) { + .lbcard__popup[active] .drawer__inner { + transform: translateY(0); + } +} +.lbcard__popup-header { + position: relative; + padding: 1.2rem 1.6rem; + padding-inline-end: 3rem; + min-height: 2rem; + border-bottom: 0.1rem solid rgba(var(--color-border), var(--color-border-alpha, 1)); +} +.lbcard__popup-btn-close { + position: absolute; + top: 50%; + inset-inline-end: 1.6rem; + transform: translateY(-50%); + width: 2rem; + height: 2rem; +} +.lbcard__popup-btn-close:before { + content: ""; + position: absolute; + left: -1rem; + top: -1rem; + width: 4rem; + height: 4rem; +} +.lbcard__popup-btn-trigger { + position: absolute !important; + bottom: 2rem; + inset-inline-end: 2rem; + --btn-trigger-padding: 1.2rem; + padding: 0 var(--btn-trigger-padding); +} +@media (max-width: 767.98px) { + .lbcard__popup-btn-trigger { + bottom: 1rem; + inset-inline-end: 1rem; + } +} +@media (min-width: 768px) { + .lbcard__popup { + position: absolute; + align-items: flex-end; + justify-content: flex-end; + padding: 2rem; + z-index: 1; + } + .lbcard__popup .fixed-overlay { + opacity: 0 !important; + position: absolute; + } + .lbcard__popup .drawer__inner { + width: clamp(50%, 37.5rem, 100%); + height: auto; + } +} +@media (min-width: 1280px) { + .lbcard__popup { + padding: 3rem; + } +} +.lbcard.is-open .lbcard__popup-btn-trigger { + opacity: 0; +} +.lbcard__product { + padding: 1.6rem; +} +.lbcard__product:last-child { + padding-bottom: 0; +} +.lbcard__product + .lbcard__product { + border-top: 0.1rem solid rgba(var(--color-border), var(--color-border-alpha, 1)); +} +.lbcard__product-thumbnail { + width: 7.5rem; +} +@media (max-width: 767.98px) { + .lbcard__product-thumbnail { + width: 5rem; + } +} +.lbcard__product .btn { + width: 3.2rem; + height: 3.2rem; +} +.lbcard__image { + opacity: 1; + transition: 0.55s cubic-bezier(0.4, 0, 0.2, 1); +} +.is-hovering .lbcard__image { + opacity: 0; +} +.lbcard__video { + opacity: 0; + transition: 0.55s cubic-bezier(0.4, 0, 0.2, 1); +} +.is-hovering .lbcard__video { + opacity: 1; +} +.lbcard__play-button { + width: 6rem; + aspect-ratio: 1/1; + color: rgb(var(--color-button-text)); + background-color: rgba(var(--color-button-text), 0.3); +} diff --git a/assets/component-lookbook-card.css b/assets/component-lookbook-card.css new file mode 100644 index 00000000000..2afdd53279d --- /dev/null +++ b/assets/component-lookbook-card.css @@ -0,0 +1,165 @@ +.lookbook-card:has(.lookbook-icon:hover) { + z-index: 1; +} + +.lookbook-icon { + --pin-color: 0, 0, 0; + --pin-background: 255, 255, 255; + --card-transform: 0; + top: var(--top); + left: var(--left); + transform: translate(calc(var(--left) * -1), calc(var(--top) * -1)); + cursor: pointer; + aspect-ratio: 1; +} +@media (max-width: 767.98px) { + .lookbook-icon { + top: var(--top-mobile, var(--top)); + left: var(--left-mobile, var(--left)); + transform: translate(calc(var(--left-mobile, var(--left)) * -1), calc(var(--top-mobile, var(--top)) * -1)); + } +} +.lookbook-icon__pin { + cursor: pointer; + border-radius: 50%; + width: 100%; + aspect-ratio: 1; +} +.lookbook-icon--plus { + width: 3.2rem; +} +.lookbook-icon--plus .lookbook-icon__pin { + color: rgb(var(--pin-color)); + background-color: rgb(var(--pin-background)); + box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.12); +} +.lookbook-icon--dot { + width: 4.8rem; +} +.lookbook-icon--dot .lookbook-icon__pin { + box-shadow: 0px 4px 9px 0px rgba(0, 0, 0, 0.2); + background-color: rgb(var(--pin-background)); + width: 33.33%; + z-index: 3; + transition: all 0.4s; +} +.lookbook-icon--dot:before, .lookbook-icon--dot:after { + content: ""; + border-radius: 50%; + position: absolute; + width: 100%; + aspect-ratio: 1; + pointer-events: none; + transform: translateZ(0) scale(1); +} +.lookbook-icon--dot:before { + background-color: rgba(var(--pin-background), 0.2); + width: 66.66%; + z-index: 2; + transition: all 0.4s; +} +.lookbook-icon--dot:after { + border: 1px solid rgba(var(--pin-background), 0); + background-color: rgba(0, 0, 0, 0.2); + animation: 1.5s dotscale ease infinite; + z-index: 1; + transition: all 0.4s; +} +.lookbook-icon--dot.is-active:before, +.lookbook-icon--dot.is-active .lookbook-icon__pin, .lookbook-icon--dot:hover:before, +.lookbook-icon--dot:hover .lookbook-icon__pin, .lookbook-icon--dot:focus:before, +.lookbook-icon--dot:focus .lookbook-icon__pin { + width: 50%; +} +.lookbook-icon--dot.is-active:after, .lookbook-icon--dot:hover:after, .lookbook-icon--dot:focus:after { + border-color: rgba(var(--pin-background), 0.5); +} +.lookbook-icon--dark { + --pin-color: 255, 255, 255; + --pin-background: 0, 0, 0; +} +.lookbook-icon.is-active, .lookbook-icon:hover, .lookbook-icon:focus { + z-index: 1; +} +.lookbook-icon.is-active .lookbook-icon__pin path.vertical, .lookbook-icon:hover .lookbook-icon__pin path.vertical, .lookbook-icon:focus .lookbook-icon__pin path.vertical { + transform: rotate(270deg); +} +.lookbook-icon__card { + gap: 1.2rem; + top: 100%; + left: 50%; + z-index: 11; + width: var(--card-w, 26.6rem); + padding: var(--card-p, 1.2rem); + transition: 0.3s all ease-out; + opacity: 0; + visibility: hidden; + pointer-events: none; + inset: var(--card-inset); + transform: translate3d(var(--card-transform), 10px, 0); + box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.12); + cursor: auto; + --pcard-info-gap: 0; + overflow: visible; + -webkit-mask-image: none; +} +.lookbook-icon__card .product-card__image { + width: 7rem; + flex-shrink: 0; +} +.lookbook-icon__card-image { + width: 5rem; + flex-shrink: 0; +} +.lookbook-icon:focus .lookbook-icon__card, .lookbook-icon:hover .lookbook-icon__card, .lookbook-icon.is-active .lookbook-icon__card { + opacity: 1; + visibility: visible; + transform: translate3d(var(--card-transform), 0, 0); + pointer-events: auto; +} +.lookbook-icon__card:before, .lookbook-icon__card:after { + content: ""; + width: 100%; + height: 1.4rem; + position: absolute; + left: 0; +} +.lookbook-icon__card:before { + top: 100%; +} +.lookbook-icon__card:after { + bottom: 100%; +} +@media (max-width: 767.98px) { + .lookbook-icon__card { + width: 24.6rem; + } + .lookbook-icon__card .product-card__image { + width: 5rem; + } +} +.lookbook-icon[data-position=bottom] { + --card-inset: calc(100% + 1.2rem) 50% auto 50%; + --card-transform: -50%; +} +.lookbook-icon[data-position=top] { + --card-inset: auto 50% calc(100% + 1.2rem) 50%; + --card-transform: -50%; +} +.lookbook-icon[data-position=bottom-left] { + --card-inset: calc(100% + 1.2rem) 0 auto auto; +} +.lookbook-icon[data-position=top-left] { + --card-inset: auto 0 calc(100% + 1.2rem) auto; +} +.lookbook-icon[data-position=bottom-right] { + --card-inset: calc(100% + 1.2rem) auto auto 0; +} +.lookbook-icon[data-position=top-right] { + --card-inset: auto auto calc(100% + 1.2rem) 0; +} +.lookbook-icon .lookbook-icon__pin path.vertical { + transform: rotate(0deg); + transform-origin: center; + transition: transform var(--animation-default); +} diff --git a/assets/component-mega-menu.css b/assets/component-mega-menu.css deleted file mode 100644 index 4c0d1782ba9..00000000000 --- a/assets/component-mega-menu.css +++ /dev/null @@ -1,87 +0,0 @@ -.mega-menu { - position: static; -} - -.mega-menu__content { - background-color: rgb(var(--color-background)); - border-left: 0; - border-radius: 0; - border-right: 0; - left: 0; - overflow-y: auto; - padding-bottom: 3rem; - padding-top: 3rem; - position: absolute; - right: 0; - top: 100%; -} - -.shopify-section-header-sticky .mega-menu__content { - max-height: calc(100vh - var(--header-bottom-position-desktop, 20rem) - 4rem); -} - -.header-wrapper--border-bottom .mega-menu__content { - border-top: 0; -} - -.js .mega-menu__content { - opacity: 0; - transform: translateY(-1.5rem); -} - -.mega-menu[open] .mega-menu__content { - opacity: 1; - transform: translateY(0); -} - -.mega-menu__list { - display: grid; - gap: 1.8rem 4rem; - grid-template-columns: repeat(6, minmax(0, 1fr)); - list-style: none; -} - -.mega-menu__link { - color: rgba(var(--color-foreground), 0.75); - display: block; - line-height: calc(1 + 0.3 / var(--font-body-scale)); - padding-bottom: 0.6rem; - padding-top: 0.6rem; - text-decoration: none; - transition: text-decoration var(--duration-short) ease; - word-wrap: break-word; -} - -.mega-menu__link--level-2 { - font-weight: bold; -} - -.header--top-center .mega-menu__list { - display: flex; - justify-content: center; - flex-wrap: wrap; - column-gap: 0; -} - -.header--top-center .mega-menu__list > li { - width: 16%; - padding-right: 2.4rem; -} - -.mega-menu__link:hover, -.mega-menu__link--active { - color: rgb(var(--color-foreground)); - text-decoration: underline; -} - -.mega-menu__link--active:hover { - text-decoration-thickness: 0.2rem; -} - -.mega-menu .mega-menu__list--condensed { - display: block; -} - -.mega-menu__list--condensed .mega-menu__link { - font-weight: normal; -} diff --git a/assets/component-menu-drawer.css b/assets/component-menu-drawer.css deleted file mode 100644 index 319a4edb535..00000000000 --- a/assets/component-menu-drawer.css +++ /dev/null @@ -1,243 +0,0 @@ -.header__icon--menu { - position: initial; -} - -.js menu-drawer > details > summary::before, -.js menu-drawer > details[open]:not(.menu-opening) > summary::before { - content: ''; - position: absolute; - cursor: default; - width: 100%; - height: calc(100vh - 100%); - height: calc(var(--viewport-height, 100vh) - (var(--header-bottom-position, 100%))); - top: 100%; - left: 0; - background: rgba(var(--color-foreground), 0.5); - opacity: 0; - visibility: hidden; - z-index: 2; - transition: opacity 0s, visibility 0s; -} - -menu-drawer > details[open] > summary::before { - visibility: visible; - opacity: 1; - transition: opacity var(--duration-default) ease, visibility var(--duration-default) ease; -} - -.menu-drawer { - position: absolute; - transform: translateX(-100%); - visibility: hidden; - z-index: 3; - left: 0; - top: 100%; - width: 100%; - padding: 0; - background-color: rgb(var(--color-background)); - overflow-x: hidden; - filter: drop-shadow( - var(--drawer-shadow-horizontal-offset) var(--drawer-shadow-vertical-offset) var(--drawer-shadow-blur-radius) - rgba(var(--color-shadow), var(--drawer-shadow-opacity)) - ); -} - -.js .menu-drawer { - height: calc(100vh - 100%); - height: calc(var(--viewport-height, 100vh) - (var(--header-bottom-position, 100%))); -} - -.js details[open] > .menu-drawer, -.js details[open] > .menu-drawer__submenu { - transition: transform var(--duration-default) ease, visibility var(--duration-default) ease; -} - -.js details[open].menu-opening > .menu-drawer, -details[open].menu-opening > .menu-drawer__submenu { - transform: translateX(0); - visibility: visible; -} - -.js .menu-drawer__navigation .submenu-open { - visibility: hidden; /* hide menus from screen readers when hidden by submenu */ -} - -@media screen and (min-width: 750px) { - .menu-drawer { - width: 40rem; - border-width: 0 var(--drawer-border-width) 0 0; - border-style: solid; - border-color: rgba(var(--color-foreground), var(--drawer-border-opacity)); - } -} - -.menu-drawer__inner-container { - position: relative; - height: 100%; -} - -.menu-drawer__navigation-container { - display: grid; - grid-template-rows: 1fr auto; - align-content: space-between; - overflow-y: auto; - height: 100%; -} - -.menu-drawer__navigation { - padding: 3rem 0; -} - -.menu-drawer__inner-submenu { - height: 100%; - overflow-x: hidden; - overflow-y: auto; -} - -.js .menu-drawer__menu li { - margin-bottom: 0.2rem; -} - -.menu-drawer__menu-item { - padding: 1.1rem 3rem; - text-decoration: none; - font-size: 1.8rem; -} - -.menu-drawer summary.menu-drawer__menu-item { - padding-right: 5.2rem; -} - -.menu-drawer__menu-item--active, -.menu-drawer__menu-item:focus, -.menu-drawer__close-button:focus, -.menu-drawer__menu-item:hover, -.menu-drawer__close-button:hover { - color: rgb(var(--color-foreground)); - background-color: rgba(var(--color-foreground), 0.04); -} - -.menu-drawer__menu-item--active:hover { - background-color: rgba(var(--color-foreground), 0.08); -} - -.js .menu-drawer__menu-item .icon-caret { - display: none; -} - -.menu-drawer__menu-item > .svg-wrapper { - width: 15px; - position: absolute; - right: 3rem; - top: 50%; - transform: translateY(-50%); -} - -.js .menu-drawer__submenu { - position: absolute; - top: 0; - width: 100%; - bottom: 0; - left: 0; - background-color: rgb(var(--color-background)); - z-index: 1; - transform: translateX(100%); - visibility: hidden; -} - -.js .menu-drawer__submenu .menu-drawer__submenu { - overflow-y: auto; -} - -.menu-drawer__close-button { - margin-top: 1.5rem; - padding: 1.2rem 2.6rem 1.2rem 3rem; - text-decoration: none; - display: flex; - align-items: center; - font-size: 1.4rem; - width: 100%; - background-color: transparent; - font-family: var(--font-body-family); - font-style: var(--font-body-style); - text-align: left; -} - -.menu-drawer__close-button .svg-wrapper { - transform: rotate(180deg); - margin-right: 1rem; - width: 15px; -} - -.menu-drawer__utility-links { - padding: 0; - background-color: rgba(var(--color-foreground), 0.03); - position: relative; -} - -.header--has-social .menu-drawer__utility-links { - padding: 2rem 3rem; -} - -@media screen and (max-width: 749px) { - .header--has-account:where(:not(.header--has-social):not(.header--has-localizations)) .menu-drawer__utility-links { - padding: 2rem 3rem; - } -} - -@media screen and (max-width: 989px) { - .header--has-localizations:where(:not(.header--has-social)) .menu-drawer__utility-links { - padding: 2rem 3rem; - } -} - -.menu-drawer__account { - display: inline-flex; - align-items: center; - text-decoration: none; - padding: 1rem 0; - font-size: 1.4rem; - color: rgb(var(--color-foreground)); - margin-bottom: 0; -} - -.menu-drawer__utility-links:has(.menu-drawer__localization) .menu-drawer__account { - margin: 0; -} - -.menu-drawer__account account-icon > .svg-wrapper { - height: 2rem; - width: 2rem; - margin-right: 1rem; -} - -.menu-drawer__account shop-user-avatar { - --shop-avatar-size: 2.4rem; - margin-right: 0.55rem; - margin-left: -0.45rem; -} - -.menu-drawer__account:hover account-icon > .svg-wrapper { - transform: scale(1.07); -} - -.menu-drawer .list-social { - justify-content: flex-start; - margin-left: -1.25rem; -} - -.menu-drawer .list-social:empty { - display: none; -} - -.menu-drawer .list-social__link { - padding: 1.1rem 1.1rem; -} - -@media screen and (max-width: 749px) { - .menu-drawer.country-selector-open { - transform: none !important; - filter: none !important; - transition: none !important; - } -} diff --git a/assets/component-modal-video.css b/assets/component-modal-video.css deleted file mode 100644 index 19a8d6babe8..00000000000 --- a/assets/component-modal-video.css +++ /dev/null @@ -1,102 +0,0 @@ -.modal-video { - background: rgba(var(--color-foreground), 0.2); - box-sizing: border-box; - height: 100%; - left: 0; - margin: 0 auto; - opacity: 0; - overflow: auto; - position: fixed; - top: 0; - visibility: hidden; - width: 100%; - z-index: -1; -} - -.modal-video[open] { - opacity: 1; - visibility: visible; - z-index: 101; -} - -.modal-video__content { - background-color: rgb(var(--color-background)); - height: 100%; - margin: 0; - overflow: auto; - padding: 0; - position: absolute; - width: 100%; -} - -.modal-video__toggle { - align-items: center; - background-color: rgb(var(--color-background)); - border-radius: 50%; - border: 0.1rem solid rgba(var(--color-foreground), 0.1); - color: rgba(var(--color-foreground), 0.55); - cursor: pointer; - display: flex; - justify-content: center; - margin: 0 0 0 auto; - padding: 1.2rem; - position: fixed; - right: 0.5rem; - top: 2rem; - width: 4rem; - z-index: 2; -} - -@media screen and (min-width: 750px) { - .modal-video__toggle { - right: 4.8rem; - top: 3.5rem; - } -} - -@media screen and (min-width: 990px) { - .modal-video__toggle { - right: 4.3rem; - top: 3rem; - } -} - -.modal-video__toggle .icon { - height: auto; - margin: 0; - width: 2.2rem; -} - -.modal-video__content-info { - height: calc(100% - 6rem); - margin: 0 auto; - padding-top: 8rem; - width: calc(100% - 1rem); -} - -@media screen and (min-width: 750px) { - .modal-video__content-info { - height: calc(100% - 7.5rem); - padding-top: 9.5rem; - width: calc(100% - 9.6rem); - } -} - -@media screen and (min-width: 990px) { - .modal-video__content-info { - height: calc(100% - 7rem); - padding-top: 9rem; - width: calc(100% - 8.6rem); - } -} - -.modal-video__video, -.modal-video__video iframe { - height: 100%; - width: 100%; -} - -.modal-video__video iframe { - position: static; - border: 0; -} diff --git a/assets/component-model-viewer-ui.css b/assets/component-model-viewer-ui.css index 8da5b150d20..d33fd723767 100644 --- a/assets/component-model-viewer-ui.css +++ b/assets/component-model-viewer-ui.css @@ -1,42 +1,40 @@ +.shopify-model-viewer-ui { + width: 100%; + height: 100%; +} .shopify-model-viewer-ui .shopify-model-viewer-ui__controls-area { background: rgb(var(--color-background)); border-color: rgba(var(--color-foreground), 0.04); } - .shopify-model-viewer-ui .shopify-model-viewer-ui__button { color: rgba(var(--color-foreground), 0.75); } - .shopify-model-viewer-ui .shopify-model-viewer-ui__button--control:hover { color: rgba(var(--color-foreground), 0.55); } - -.shopify-model-viewer-ui .shopify-model-viewer-ui__button--control:active, -.shopify-model-viewer-ui .shopify-model-viewer-ui__button--control.focus-visible:focus { +.shopify-model-viewer-ui .shopify-model-viewer-ui__button--control:active, .shopify-model-viewer-ui .shopify-model-viewer-ui__button--control.focus-visible:focus { color: rgba(var(--color-foreground), 0.55); background: rgba(var(--color-foreground), 0.04); } - .shopify-model-viewer-ui .shopify-model-viewer-ui__button--control:not(:last-child):after { border-color: rgba(var(--color-foreground), 0.04); } - .shopify-model-viewer-ui .shopify-model-viewer-ui__button--poster { border-radius: 50%; color: rgb(var(--color-foreground)); background: rgb(var(--color-background)); border-color: rgba(var(--color-foreground), 0.1); transform: translate(-50%, -50%) scale(1); - transition: transform var(--duration-short) ease, color var(--duration-short) ease; + transition: transform var(--duration-default) ease, color var(--duration-default) ease; +} +.shopify-model-viewer-ui .shopify-model-viewer-ui__button--poster[hidden] { + display: none !important; } - .shopify-model-viewer-ui .shopify-model-viewer-ui__poster-control-icon { width: 4.8rem; height: 4.8rem; margin-top: 0.3rem; } - -.shopify-model-viewer-ui .shopify-model-viewer-ui__button--poster:hover, -.shopify-model-viewer-ui .shopify-model-viewer-ui__button--poster:focus { +.shopify-model-viewer-ui .shopify-model-viewer-ui__button--poster:hover, .shopify-model-viewer-ui .shopify-model-viewer-ui__button--poster:focus { transform: translate(-50%, -50%) scale(1.1); } diff --git a/assets/component-multicolumn-card.css b/assets/component-multicolumn-card.css new file mode 100644 index 00000000000..961f090ab29 --- /dev/null +++ b/assets/component-multicolumn-card.css @@ -0,0 +1,139 @@ +.multicolumn-card:not(.color-scheme-inherit) { + --px: 2rem; + --py: 2.4rem; + padding: var(--py) var(--px); +} +@media (max-width: 767.98px) { + .multicolumn-card:not(.color-scheme-inherit) { + --px: 1.6rem; + } +} +.multicolumn-card-wrapper:not(.color-scheme-inherit) { + transition: box-shadow var(--duration-default) ease-in-out; + border-radius: var(--blocks-radius); +} +.multicolumn-card-wrapper:not(.color-scheme-inherit):hover { + box-shadow: 0 0 3.2rem 0 rgba(var(--color-foreground), 0.1); +} +.multicolumn-card__image { + display: inline-block; + vertical-align: top; + max-width: 100%; + width: var(--icon-size); + margin-bottom: var(--image-spacing-bottom, 2rem); + height: fit-content; +} +@media (max-width: 767.98px) { + .multicolumn-card__image { + margin-bottom: var(--image-spacing-bottom-mobile, 1.6rem); + } +} +.multicolumn-card--image-full { + --icon-size: 100%; +} +.multicolumn-card--image-full img { + width: 100%; +} +.multicolumn-card--image-icon { + --icon-size: var(--img-max); +} +@media (max-width: 767.98px) { + .multicolumn-card--image-icon { + --icon-size: var(--img-max-mb); + } +} +.multicolumn-card--image-icon .multicolumn-card__image { + color: var(--icon-color); +} +.multicolumn-card--layout-left .multicolumn-card__image { + margin: 0; +} +.multicolumn-card--layout-left .rich-text--tight { + --text-margin-top: 0.4rem; + --child-margin-top: 1.6rem; +} +.multicolumn-card__title, .multicolumn-card__text { + word-break: break-word; +} +.multicolumn-card__count { + grid-template-columns: fit-content(100%) 1fr; + margin-bottom: var(--count-spacing, 1.2rem); +} +@media (max-width: 767.98px) { + .multicolumn-card__count { + margin-bottom: var(--count-spacing-mobile, 0.8rem); + } +} +.multicolumn-card__count::after { + content: ""; + width: 100%; + height: 2px; + display: block; + border-bottom: 2px dashed rgba(var(--color-border), var(--color-border-alpha, 1)); +} +.multicolumn-card__divider { + position: absolute; + top: 0; + inset-inline-end: calc(-1 * var(--f-column-gap) / 2); + border-inline-end: 1px solid rgba(var(--color-border), var(--color-border-alpha, 1)); + height: 100%; +} + +.multicolumn-card-wrapper:last-child .multicolumn-card__divider { + display: none; +} + +@media (max-width: 767.98px) { + .swipe-mobile .multicolumn-card-wrapper .multicolumn-card__divider { + display: block; + } + .swipe-mobile .multicolumn-card-wrapper:last-child .multicolumn-card__divider { + display: none; + } +} +@media (min-width: 1280px) { + .hidden--desktop { + display: none; + } +} +@media (min-width: 1024px) and (max-width: 1279.98px) { + .hidden--laptop { + display: none; + } +} +@media (min-width: 768px) and (max-width: 1023.98px) { + .hidden--tablet { + display: none; + } +} +@media (max-width: 767.98px) { + .hidden--mobile { + display: none; + } +} + +@media (min-width: 768px) { + .section__content.swiper { + width: 100%; + } +} +@media (min-width: 768px) and (max-width: 1023.98px) { + .multicolumn-icon.section-header-standing-column .section__header { + text-align: center; + } +} +@media (min-width: 1024px) { + .multicolumn-icon.section-header-standing-column .section__container { + display: grid; + grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); + column-gap: var(--header-padding-bottom-large); + } + .multicolumn-icon.section-header-standing-column .section__content { + grid-area: 1/2/end/end; + } + .multicolumn-icon.section-header-standing-column .section__header { + --header-padding-bottom: 0; + row-gap: 4rem; + margin: 0; + } +} diff --git a/assets/component-newsletter.css b/assets/component-newsletter.css deleted file mode 100644 index 719c13fd20e..00000000000 --- a/assets/component-newsletter.css +++ /dev/null @@ -1,71 +0,0 @@ -.newsletter-form { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - width: 100%; - position: relative; -} - -@media screen and (min-width: 750px) { - .newsletter-form { - align-items: flex-start; - margin: 0 auto; - max-width: 36rem; - } -} - -.newsletter-form__field-wrapper { - width: 100%; -} - -.newsletter-form__field-wrapper .field__input { - padding-right: 5rem; -} - -.newsletter-form__field-wrapper .field { - z-index: 0; -} - -.newsletter-form__message { - justify-content: center; - margin-bottom: 0; -} - -.newsletter-form__message--success { - margin-top: 2rem; -} - -@media screen and (min-width: 750px) { - .newsletter-form__message { - justify-content: flex-start; - } -} - -.newsletter-form__button { - width: 4.4rem; - margin: 0; - right: var(--inputs-border-width); - top: 0; - height: 100%; - z-index: 2; -} - -.newsletter-form__button:focus-visible { - box-shadow: 0 0 0 0.3rem rgb(var(--color-background)), 0 0 0 0.4rem rgba(var(--color-foreground)); - background-color: rgb(var(--color-background)); -} - -.newsletter-form__button:focus { - box-shadow: 0 0 0 0.3rem rgb(var(--color-background)), 0 0 0 0.4rem rgba(var(--color-foreground)); - background-color: rgb(var(--color-background)); -} - -.newsletter-form__button:not(:focus-visible):not(.focused) { - box-shadow: inherit; - background-color: inherit; -} - -.newsletter-form__button .icon { - width: 1.5rem; -} diff --git a/assets/component-pagination.css b/assets/component-pagination.css deleted file mode 100644 index 5232c3933d9..00000000000 --- a/assets/component-pagination.css +++ /dev/null @@ -1,82 +0,0 @@ -.pagination-wrapper { - margin-top: 4rem; -} - -@media screen and (min-width: 990px) { - .pagination-wrapper { - margin-top: 5rem; - } -} - -.pagination__list { - display: flex; - flex-wrap: wrap; - justify-content: center; -} - -.pagination__list > li { - flex: 1 0 4.4rem; - max-width: 4.4rem; -} - -.pagination__list > li:not(:last-child) { - margin-right: 1rem; -} - -.pagination__item { - color: rgb(var(--color-foreground)); - display: inline-flex; - justify-content: center; - align-items: center; - position: relative; - height: 4.4rem; - width: 100%; - padding: 0; - text-decoration: none; -} - -a.pagination__item:hover::after { - height: 0.1rem; -} - -.pagination__item .icon-caret { - height: 0.6rem; -} - -.pagination__item--current::after { - height: 0.1rem; -} - -.pagination__item--current::after, -.pagination__item:hover::after { - content: ''; - display: block; - width: 2rem; - position: absolute; - bottom: 8px; - left: 50%; - transform: translateX(-50%); - background-color: currentColor; -} - -.pagination__item--next .icon { - margin-left: -0.2rem; - transform: rotate(90deg); -} - -.pagination__item--next:hover .icon { - transform: rotate(90deg) scale(1.07); -} - -.pagination__item--prev .icon { - margin-right: -0.2rem; - transform: rotate(-90deg); -} - -.pagination__item--prev:hover .icon { - transform: rotate(-90deg) scale(1.07); -} - -.pagination__item-arrow:hover::after { - display: none; -} diff --git a/assets/component-pickup-availability.css b/assets/component-pickup-availability.css index d99933b5cc2..8364a31f411 100644 --- a/assets/component-pickup-availability.css +++ b/assets/component-pickup-availability.css @@ -1,175 +1,55 @@ pickup-availability { display: block; } - pickup-availability[available] { - min-height: 8rem; + min-height: 8.4rem; } .pickup-availability-preview { - align-items: flex-start; - display: flex; - gap: 0.2rem; - padding: 1rem 2rem 0 0; -} - -.pickup-availability-preview .icon { - flex-shrink: 0; - height: 1.8rem; + gap: 1.2rem; + border: 0.1rem solid rgba(var(--color-border), var(--color-border-alpha, 1)); + padding: 1.5rem 1.6rem; } - -.pickup-availability-preview .icon-unavailable { - height: 1.6rem; - margin-top: 0.1rem; +.pickup-availability-info { + padding-inline-end: 4rem; } - .pickup-availability-button { - background-color: transparent; - color: rgba(var(--color-foreground), 0.75); - letter-spacing: 0.06rem; - padding: 0 0 0.2rem; - text-align: left; - text-decoration: underline; + position: absolute; + top: 50%; + transform: translateY(-50%); + inset-inline: auto 0; } - -.pickup-availability-button:hover { - color: rgb(var(--color-foreground)); -} - -.pickup-availability-info * { - margin: 0 0 0.6rem; -} - -pickup-availability-drawer { - background-color: rgb(var(--color-background)); - height: 100%; - opacity: 0; - overflow-y: auto; - padding: 2rem; - position: fixed; - top: 0; - right: 0; - z-index: 4; - transition: opacity var(--duration-default) ease, transform var(--duration-default) ease; - transform: translateX(100%); - width: 100%; - border-width: 0 0 0 var(--drawer-border-width); - border-color: rgba(var(--color-foreground), var(--drawer-border-opacity)); - border-style: solid; - filter: drop-shadow( - var(--drawer-shadow-horizontal-offset) var(--drawer-shadow-vertical-offset) var(--drawer-shadow-blur-radius) - rgba(var(--color-shadow), var(--drawer-shadow-opacity)) - ); -} - -pickup-availability-drawer[open] { - transform: translateX(0); - opacity: 1; -} - -@media screen and (min-width: 750px) { - pickup-availability-drawer { - transform: translateX(100%); - width: 37.5rem; - } - - pickup-availability-drawer[open] { - opacity: 1; - transform: translateX(0); - animation: animateDrawerOpen var(--duration-default) ease; - } -} - .pickup-availability-header { - align-items: flex-start; - display: flex; - justify-content: space-between; - margin-bottom: 1.2rem; -} - -.pickup-availability-drawer-title { - margin: 0.5rem 0 0; -} - -.pickup-availability-header .icon { - width: 2rem; -} - -.pickup-availability-drawer-button { - background-color: transparent; - border: none; - color: rgb(var(--color-foreground)); - cursor: pointer; - display: block; - height: 4.4rem; - padding: 1.2rem; - width: 4.4rem; -} - -.pickup-availability-drawer-button:hover { - color: rgba(var(--color-foreground), 0.75); + margin: 0 1rem 1.6rem 0; } - .pickup-availability-variant { - font-size: 1.3rem; - line-height: calc(1 + 0.2 / var(--font-body-scale)); - margin: 0 0 1.2rem; + margin: 0.8rem 0 0; text-transform: capitalize; } - .pickup-availability-variant > * + strong { - margin-left: 1rem; + margin-inline-start: 1rem; } - .pickup-availability-list__item { border-bottom: 0.1rem solid rgba(var(--color-foreground), 0.08); - padding: 2rem 0; + padding: 1.6rem 0; } - .pickup-availability-list__item:first-child { border-top: 0.1rem solid rgba(var(--color-foreground), 0.08); } - .pickup-availability-list__item > * { margin: 0; } - .pickup-availability-list__item > * + * { margin-top: 1rem; } - +.pickup-availability-list__item .icon { + position: relative; + top: calc((var(--font-body-size) * var(--font-body-line-height) - 1.6rem) / 2); + flex-shrink: 0; +} .pickup-availability-address { font-style: normal; - font-size: 1.2rem; - line-height: calc(1 + 0.5 / var(--font-body-scale)); } - .pickup-availability-address p { margin: 0; } - -@keyframes animateDrawerOpen { - @media screen and (max-width: 749px) { - 0% { - opacity: 0; - transform: translateX(100%); - } - - 100% { - opacity: 1; - transform: translateX(0); - } - } - - @media screen and (min-width: 750px) { - 0% { - opacity: 0; - transform: translateX(100%); - } - - 100% { - opacity: 1; - transform: translateX(0); - } - } -} diff --git a/assets/component-predictive-search.css b/assets/component-predictive-search.css deleted file mode 100644 index 13718b01fc6..00000000000 --- a/assets/component-predictive-search.css +++ /dev/null @@ -1,225 +0,0 @@ -.predictive-search { - display: none; - position: absolute; - top: calc(100% + 0.1rem); - left: -0.1rem; - border-width: var(--popup-border-width); - border-style: solid; - border-color: rgba(var(--color-foreground), var(--popup-border-opacity)); - background-color: rgb(var(--color-background)); - z-index: 3; - border-bottom-right-radius: var(--popup-corner-radius); - border-bottom-left-radius: var(--popup-corner-radius); - 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)); - overflow-y: auto; - -webkit-overflow-scrolling: touch; -} - -.predictive-search--search-template { - z-index: 2; - width: calc(100% + 0.2rem); -} - -.predictive-search__results-groups-wrapper { - display: flex; - border-bottom: 0.1rem solid rgba(var(--color-foreground), 0.08); - padding-bottom: 1rem; -} - -@media screen and (max-width: 749px) { - .predictive-search--header { - right: 0; - left: 0; - top: 100%; - } - - .predictive-search__results-groups-wrapper { - flex-direction: column; - } - - .predictive-search__results-groups-wrapper:not(.predictive-search__results-groups-wrapper--no-suggestions) { - /* On mobile, when there are no suggestions the first .predictive-search__results-groups-wrapper - * is virtually empty due to a display: hidden on the predictive-search__pages-wrapper child. - * This causes the gap to render and look like a big top margin */ - gap: 2rem; - } -} - -@media screen and (min-width: 750px) { - .predictive-search { - border-top: none; - width: calc(100% + 0.2rem); - } - - .header predictive-search { - position: relative; - } -} - -predictive-search[open] .predictive-search, -predictive-search[loading] .predictive-search { - display: block; -} - -.predictive-search__result-group { - display: flex; - flex-direction: column; - flex: 1 1 auto; - gap: 2rem; -} - -.predictive-search__result-group:first-child .predictive-search__pages-wrapper { - display: none; -} - -@media screen and (min-width: 750px) { - .predictive-search__results-groups-wrapper--no-products .predictive-search__result-group:nth-child(2), - .predictive-search__result-group:last-child .predictive-search__pages-wrapper { - display: none; - } - .predictive-search__result-group:first-child .predictive-search__pages-wrapper { - display: initial; - } - .predictive-search__result-group:first-child { - flex: 0 0 26.4rem; - } - .predictive-search__results-groups-wrapper--no-products .predictive-search__result-group:first-child, - .predictive-search__result-group:only-child { - flex-grow: 1; - } -} - -.predictive-search__heading { - border-bottom: 0.1rem solid rgba(var(--color-foreground), 0.08); - margin: 0 2rem; - padding: 1.5rem 0 0.75rem; - color: rgba(var(--color-foreground), 0.7); -} - -predictive-search .spinner { - width: 1.5rem; - height: 1.5rem; - line-height: 0; -} - -predictive-search:not([loading]) .predictive-search__loading-state, -predictive-search:not([loading]) .predictive-search-status__loading { - display: none; -} - -predictive-search[loading] .predictive-search__loading-state { - display: flex; - justify-content: center; - padding: 1rem; -} - -predictive-search[loading] .predictive-search__search-for-button { - display: none; -} - -predictive-search[loading] .predictive-search__results-groups-wrapper ~ .predictive-search__loading-state { - display: none; -} - -predictive-search[loading] .predictive-search__results-groups-wrapper ~ .predictive-search__search-for-button { - display: initial; -} - -.predictive-search__list-item[aria-selected='true'] > *, -.predictive-search__list-item:hover > *, -.predictive-search__item[aria-selected='true'], -.predictive-search__item:hover { - color: rgb(var(--color-foreground)); - background-color: rgba(var(--color-foreground), 0.04); -} - -.predictive-search__list-item[aria-selected='true'] .predictive-search__item-heading, -.predictive-search__list-item:hover .predictive-search__item-heading { - text-decoration: underline; - text-underline-offset: 0.3rem; -} - -.predictive-search__item { - display: flex; - padding: 1rem 2rem; - text-align: left; - text-decoration: none; - width: 100%; -} - -.predictive-search__item--link-with-thumbnail { - display: grid; - grid-template-columns: 5rem 1fr; - grid-column-gap: 2rem; - grid-template-areas: 'product-image product-content'; -} - -.predictive-search__item-content { - grid-area: product-content; - display: flex; - flex-direction: column; -} - -.predictive-search__item-content--centered { - justify-content: center; -} - -.predictive-search__item-vendor { - font-size: 0.9rem; -} - -.predictive-search__item-heading { - margin: 0; -} - -.predictive-search__item-query-result *:not(mark) { - font-weight: bolder; -} - -.predictive-search__item-query-result mark { - color: rgba(var(--color-foreground), 0.75); -} - -.predictive-search__item-query-result mark { - background-color: transparent; -} - -.predictive-search__item .price { - color: rgba(var(--color-foreground), 0.7); - font-size: 1.2rem; -} - -.predictive-search__item-vendor + .predictive-search__item-heading, -.predictive-search .price { - margin-top: 0.5rem; -} - -.predictive-search__item--term { - justify-content: space-between; - align-items: center; - padding: 1.3rem 2rem; - word-break: break-all; - line-height: calc(1 + 0.4 / var(--font-body-scale)); -} - -@media screen and (min-width: 750px) { - .predictive-search__item--term { - padding-top: 1rem; - padding-bottom: 1rem; - } -} - -.predictive-search__item--term .icon-arrow { - width: calc(var(--font-heading-scale) * 1.4rem); - height: calc(var(--font-heading-scale) * 1.4rem); - flex-shrink: 0; - margin-left: calc(var(--font-heading-scale) * 2rem); - color: rgb(var(--color-link)); -} - -.predictive-search__image { - grid-area: product-image; - object-fit: contain; - font-family: 'object-fit: contain'; -} diff --git a/assets/component-price.css b/assets/component-price.css deleted file mode 100644 index 72406b172f5..00000000000 --- a/assets/component-price.css +++ /dev/null @@ -1,100 +0,0 @@ -.price { - font-size: 1.6rem; - letter-spacing: 0.1rem; - line-height: calc(1 + 0.5 / var(--font-body-scale)); - color: rgb(var(--color-foreground)); -} - -.price > * { - display: inline-block; - vertical-align: top; -} - -.price.price--unavailable { - visibility: hidden; -} - -.price--end { - text-align: right; -} - -.price .price-item { - display: inline-block; - margin: 0 1rem 0 0; -} - -.price__regular .price-item--regular { - margin-right: 0; -} - -.price:not(.price--show-badge) .price-item--last:last-of-type { - margin: 0; -} - -@media screen and (min-width: 750px) { - .price { - margin-bottom: 0; - } -} - -.price--large { - font-size: 1.6rem; - line-height: calc(1 + 0.5 / var(--font-body-scale)); - letter-spacing: 0.13rem; -} - -@media screen and (min-width: 750px) { - .price--large { - font-size: 1.8rem; - } -} - -.price--sold-out .price__availability, -.price__regular { - display: block; -} - -.price__sale, -.price__availability, -.price .price__badge-sale, -.price .price__badge-sold-out, -.price--on-sale .price__regular, -.price--on-sale .price__availability { - display: none; -} - -.price--sold-out .price__badge-sold-out, -.price--on-sale .price__badge-sale, -.volume-pricing--sale-badge .price__badge-sale { - display: inline-block; -} - -.volume-pricing--sale-badge .price__badge-sale { - margin-left: 0.5rem; -} - -.price--on-sale .price__sale { - display: initial; - flex-direction: row; - flex-wrap: wrap; -} - -.price--center { - display: initial; - justify-content: center; -} - -.price--on-sale .price-item--regular { - text-decoration: line-through; - color: rgba(var(--color-foreground), 0.75); - font-size: 1.3rem; -} - -.unit-price { - display: block; - font-size: 1.1rem; - letter-spacing: 0.04rem; - line-height: calc(1 + 0.2 / var(--font-body-scale)); - margin-top: 0.2rem; - color: rgba(var(--color-foreground), 0.7); -} diff --git a/assets/component-product-model.css b/assets/component-product-model.css deleted file mode 100644 index 4fcdc11aa72..00000000000 --- a/assets/component-product-model.css +++ /dev/null @@ -1,44 +0,0 @@ -.product__xr-button { - background: rgba(var(--color-foreground), 0.08); - color: rgb(var(--color-foreground)); - margin: 1rem auto; - box-shadow: none; - display: flex; -} - -.button.product__xr-button:hover { - box-shadow: none; -} - -.product__xr-button[data-shopify-xr-hidden] { - visibility: hidden; -} - -.shopify-design-mode .product__xr-button[data-shopify-xr-hidden] { - display: none; -} - -@media screen and (max-width: 749px) { - slider-component .product__xr-button { - display: none; - } - - .active .product__xr-button:not([data-shopify-xr-hidden]) { - display: block; - } -} - -@media screen and (min-width: 750px) { - slider-component + .button.product__xr-button { - display: none; - } - - .product__xr-button[data-shopify-xr-hidden] { - display: none; - } -} - -.product__xr-button .icon { - width: 1.4rem; - margin-right: 1rem; -} diff --git a/assets/component-product-variant-picker.css b/assets/component-product-variant-picker.css index b698ab80049..ee24aba6338 100644 --- a/assets/component-product-variant-picker.css +++ b/assets/component-product-variant-picker.css @@ -1,152 +1,182 @@ variant-selects { display: block; } - -.product--no-media .product-form__input--pill, -.product--no-media .product-form__input--swatch, -.product--no-media .product-form__input--dropdown { - display: flex; - align-items: center; - justify-content: center; - text-align: center; -} - -.product--no-media .product-form__input.product-form__input--pill, -.product--no-media .product-form__input.product-form__input--swatch { - flex-wrap: wrap; - margin: 0 auto 1.2rem auto; -} - -.product--no-media .product-form__input--dropdown { - flex-direction: column; - max-width: 100%; +variant-selects input:is([type=checkbox], [type=radio]):is(:disabled, .disabled) + label { + cursor: pointer; } -:is(.product-form__input--pill, .product-form__input--swatch) .form__label { - margin-bottom: 0.2rem; +.product-form__input { + /* Custom styles for Pill display type */ } - -.product-form__input input[type='radio'] { +.product-form__input input[type=radio] { clip: rect(0, 0, 0, 0); overflow: hidden; position: absolute; height: 1px; width: 1px; } - -.product-form__input input[type='radio']:not(.disabled):not(.visually-disabled) + label > .label-unavailable { +.product-form__input input[type=radio]:not(.disabled):not(.visually-disabled) + label > .label-unavailable { display: none; } - .product-form__input--dropdown { --swatch-input--size: 2rem; margin-bottom: 1.6rem; } - -.product-form__input--dropdown .dropdown-swatch + select { - padding-left: calc(2.4rem + var(--swatch-input--size)); -} - .product-form__input--dropdown .dropdown-swatch { position: absolute; - left: 1.6rem; + inset-inline-start: 1.6rem; top: calc(50% - var(--swatch-input--size) / 2); width: var(--swatch-input--size); height: var(--swatch-input--size); z-index: 1; } - -/* Custom styles for Pill display type */ -.product-form__input--pill input[type='radio'] + label { - border: var(--variant-pills-border-width) solid rgba(var(--color-foreground), var(--variant-pills-border-opacity)); - background-color: rgb(var(--color-background)); - color: rgba(var(--color-foreground)); - border-radius: var(--variant-pills-radius); - color: rgb(var(--color-foreground)); - display: inline-block; - margin: 0.7rem 0.5rem 0.2rem 0; - padding: 1rem 2rem; - font-size: 1.4rem; - letter-spacing: 0.1rem; - line-height: 1; - text-align: center; - transition: border var(--duration-short) ease; - cursor: pointer; - position: relative; +.product-form__input--dropdown .dropdown-swatch + select { + padding-inline-start: calc(2.4rem + var(--swatch-input--size)); } - -.product-form__input--pill input[type='radio'] + label:before { - content: ''; - position: absolute; - top: calc(var(--variant-pills-border-width) * -1); - right: calc(var(--variant-pills-border-width) * -1); - bottom: calc(var(--variant-pills-border-width) * -1); - left: calc(var(--variant-pills-border-width) * -1); - z-index: -1; - border-radius: var(--variant-pills-radius); - box-shadow: var(--variant-pills-shadow-horizontal-offset) var(--variant-pills-shadow-vertical-offset) - var(--variant-pills-shadow-blur-radius) rgba(var(--color-shadow), var(--variant-pills-shadow-opacity)); +.product-form__input--button { + --variant-pills-border-width: 1px; } - -.product-form__input--pill input[type='radio'] + label:hover { - border-color: rgb(var(--color-foreground)); +.product-form__input--button input[type=radio] + label { + display: flex; + align-items: center; + justify-content: center; + text-align: center; + position: relative; + cursor: pointer; + margin: 0; + padding: 0 2rem; + min-height: var(--buttons-height); + min-width: var(--buttons-height); + transition: all var(--duration-default) ease; + color: rgb(var(--color-foreground)); + background-color: rgb(var(--color-background)); + border: var(--variant-pills-border-width) solid rgb(var(--color-foreground)); + border-radius: var(--variant-pills-radius, var(--buttons-radius)); } - -.product-form__input--pill input[type='radio']:checked + label { +.product-form__input--button input[type=radio] + label:hover { background-color: rgb(var(--color-foreground)); color: rgb(var(--color-background)); } - -@media screen and (forced-colors: active) { - .product-form__input--pill input[type='radio']:checked + label { - text-decoration: underline; - } - - .product-form__input--pill input[type='radio']:focus-visible + label { - outline: transparent solid 1px; - outline-offset: 2px; - } +.product-form__input--button input[type=radio]:checked + label { + background-color: rgb(var(--color-foreground)); + color: rgb(var(--color-background)); } - -.product-form__input--pill input[type='radio']:checked + label::selection { +.product-form__input--button input[type=radio]:checked + label::selection { background-color: rgba(var(--color-background), 0.3); } - -.product-form__input--pill input[type='radio']:disabled + label, -.product-form__input--pill input[type='radio'].disabled + label { - border-color: rgba(var(--color-foreground), 0.1); - color: rgba(var(--color-foreground), 0.6); - text-decoration: line-through; +.product-form__input--button input[type=radio]:disabled + label, .product-form__input--button input[type=radio].disabled + label { + border-color: var(--color-foreground-lighten-19); + color: var(--color-foreground-lighten-19); } - -.product-form__input--pill input[type='radio'].disabled:checked + label, -.product-form__input--pill input[type='radio']:disabled:checked + label { - color: rgba(var(--color-background), 0.6); +.product-form__input--button input[type=radio]:disabled + label:before, .product-form__input--button input[type=radio].disabled + label:before { + content: ""; + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + background: linear-gradient(to bottom left, transparent calc(50% - var(--variant-pills-border-width)), var(--color-foreground-lighten-19) 50%, transparent calc(50% + var(--variant-pills-border-width))) no-repeat; + border-radius: inherit; + z-index: 1; } -.product-form__input--pill input[type='radio']:focus-visible + label { - box-shadow: 0 0 0 0.3rem rgb(var(--color-background)), 0 0 0 0.5rem rgba(var(--color-foreground), 0.55); +.product-form__input--button input[type=radio]:disabled + label:hover, .product-form__input--button input[type=radio].disabled + label:hover { + color: rgb(var(--color-background)); } - -/* Fallback */ -.product-form__input--pill input[type='radio'].focused + label { +.product-form__input--button input[type=radio]:disabled:checked + label, .product-form__input--button input[type=radio].disabled:checked + label { + color: rgba(var(--color-background), 0.5); +} +.product-form__input--button input[type=radio]:disabled:checked + label:before, .product-form__input--button input[type=radio].disabled:checked + label:before { + background: linear-gradient(to bottom left, transparent calc(50% - var(--variant-pills-border-width)), rgba(var(--color-background), 0.5) 50%, transparent calc(50% + var(--variant-pills-border-width))) no-repeat; +} +.product-form__input--button input[type=radio]:focus-visible + label, .product-form__input--button input[type=radio].focused + label { box-shadow: 0 0 0 0.3rem rgb(var(--color-background)), 0 0 0 0.5rem rgba(var(--color-foreground), 0.55); } - -/* Custom styles for Swatch display type */ +.product-form__input--button-square { + --swatch-radius: 0; +} +.product-form__input--button-square input[type=radio] + label, +.product-form__input--button-square input[type=radio] + label > .swatch-color { + border-radius: 0; +} +.product-form__input--button-square input[type=radio] + label:not([data-swatch-type=variant_image], +[data-swatch-type=color_swatch], +[data-swatch-type=shopify_swatch], +[data-swatch-type=text]) { + padding: 0 0.8rem; +} +.product-form__input--button-circle { + --swatch-radius: 9999px; +} +.product-form__input--button-circle input[type=radio] + label:not([data-swatch-type=variant_image], +[data-swatch-type=color_swatch], +[data-swatch-type=shopify_swatch]) { + border-radius: calc(var(--buttons-height) / 2); +} +.product-form__input--button-circle input[type=radio] + label:not([data-swatch-type=variant_image], +[data-swatch-type=color_swatch], +[data-swatch-type=shopify_swatch], +[data-swatch-type=text]) { + padding: 0 0.8rem; +} +.product-form__input--button-standard { + --swatch-radius: var(--small-blocks-radius); + --variant-pills-radius: var(--small-blocks-radius); +} +.product-form__input--color .swatch-color, .product-form__input--swatch .swatch-color { + background: var(--swatch-background); + background-position: var(--swatch-focal-point, 50%); + background-size: cover; + min-width: calc(var(--swatch-size) - 0.2rem); + min-height: calc(var(--swatch-size) - 0.2rem); + border-radius: var(--swatch-radius); + position: relative; +} +.product-form__input--color .swatch-color:before, .product-form__input--swatch .swatch-color:before { + content: ""; + position: absolute; + inset: 0; + border-radius: inherit; + transition: all var(--duration-default); +} +.product-form__input--color .swatch-color:before, .product-form__input--swatch .swatch-color:before { + opacity: 0; + box-shadow: 0 0 0 0.1rem rgba(var(--color-border), var(--color-border-alpha, 1)), 0 0 0 0.4rem rgb(var(--color-background)), 0 0 0 0.5rem var(--active-shadow-color); +} +.product-form__input--color .swatch-color:after, .product-form__input--swatch .swatch-color:after { + display: none; +} +.product-form__input--color input[type=radio]:checked + label .swatch-color, .product-form__input--swatch input[type=radio]:checked + label .swatch-color { + --active-shadow-color: rgb(var(--color-foreground)); +} +.product-form__input--color input[type=radio]:checked + label .swatch-color:before, .product-form__input--swatch input[type=radio]:checked + label .swatch-color:before { + opacity: 1; +} +.product-form__input--color input[type=radio]:is(.disabled) + label, .product-form__input--swatch input[type=radio]:is(.disabled) + label { + opacity: 1; +} +.product-form__input--color input[type=radio]:is(.disabled) + label .swatch-color, .product-form__input--swatch input[type=radio]:is(.disabled) + label .swatch-color { + opacity: 0.5; +} +.product-form__input--color input[type=radio]:is(.disabled) + label .swatch-color:before, .product-form__input--swatch input[type=radio]:is(.disabled) + label .swatch-color:before { + background: linear-gradient(to bottom left, transparent calc(50% - 0.5px), var(--color-foreground-lighten-19) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)); + opacity: 1; + box-shadow: none; +} +.product-form__input--color input[type=radio]:is(.disabled):checked + label .swatch-color:before, .product-form__input--swatch input[type=radio]:is(.disabled):checked + label .swatch-color:before { + inset: -0.5rem; + box-shadow: 0 0 0 0.1rem var(--color-foreground-lighten-19); +} .product-form__input--swatch { display: flex; flex-wrap: wrap; } -.product-form__input--swatch .swatch-input__input + .swatch-input__label { - --swatch-input--size: 3.6rem; - - margin: 0.7rem 1.2rem 0.2rem 0; -} - -@media screen and (min-width: 750px) { - .product-form__input--swatch .swatch-input__input + .swatch-input__label { - --swatch-input--size: 2.8rem; +@media screen and (forced-colors: active) { + .product-form__input--button input[type=radio]:checked + label { + text-decoration: underline; + } + .product-form__input--button input[type=radio]:focus-visible + label { + outline: transparent solid 1px; + outline-offset: 2px; } } -/* End custom styles for Swatch display type */ diff --git a/assets/component-progress-bar.css b/assets/component-progress-bar.css deleted file mode 100644 index 64c009dbcf1..00000000000 --- a/assets/component-progress-bar.css +++ /dev/null @@ -1,33 +0,0 @@ -.progress-bar-container { - width: 100%; - margin: auto; -} - -.progress-bar { - height: 0.13rem; - width: 100%; -} - -.progress-bar-value { - width: 100%; - height: 100%; - background-color: rgb(var(--color-foreground)); - animation: indeterminateAnimation var(--duration-extra-longer) infinite ease-in-out; - transform-origin: 0; -} - -.progress-bar .progress-bar-value { - display: block; -} - -@keyframes indeterminateAnimation { - 0% { - transform: translateX(-20%) scaleX(0); - } - 40% { - transform: translateX(30%) scaleX(0.7); - } - 100% { - transform: translateX(100%) scaleX(0); - } -} diff --git a/assets/component-rating.css b/assets/component-rating.css deleted file mode 100644 index 05bbcfc96b0..00000000000 --- a/assets/component-rating.css +++ /dev/null @@ -1,64 +0,0 @@ -.product--no-media .rating-wrapper { - text-align: center; -} - -.rating { - display: inline-block; - margin: 0; -} - -.product .rating-star { - --letter-spacing: 0.8; - --font-size: 1.7; -} - -.card-wrapper .rating-star { - --letter-spacing: 0.7; - --font-size: 1.4; -} - -.rating-star { - --color-rating-star: rgb(var(--color-foreground)); - --percent: calc( - ( - var(--rating) / var(--rating-max) + var(--rating-decimal) * var(--font-size) / - (var(--rating-max) * (var(--letter-spacing) + var(--font-size))) - ) * 100% - ); - letter-spacing: calc(var(--letter-spacing) * 1rem); - font-size: calc(var(--font-size) * 1rem); - line-height: 1; - display: inline-block; - font-family: Times; - margin: 0; -} - -.rating-star::before { - content: '★★★★★'; - background: linear-gradient( - 90deg, - var(--color-rating-star) var(--percent), - rgba(var(--color-foreground), 0.15) var(--percent) - ); - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; -} - -.rating-text { - display: none; -} - -.rating-count { - display: inline-block; - margin: 0; -} - -@media (forced-colors: active) { - .rating { - display: none; - } - - .rating-text { - display: block; - } -} diff --git a/assets/component-search.css b/assets/component-search.css deleted file mode 100644 index 5a04cb5e587..00000000000 --- a/assets/component-search.css +++ /dev/null @@ -1,74 +0,0 @@ -.search__input.field__input { - padding-right: 9.8rem; -} - -.search__button { - right: var(--inputs-border-width); - top: var(--inputs-border-width); -} - -.reset__button { - right: calc(var(--inputs-border-width) + 4.4rem); - top: var(--inputs-border-width); -} - -.reset__button:not(:focus-visible)::after { - border-right: 0.1rem solid rgba(var(--color-foreground), 0.08); - display: block; - height: calc(100% - 1.6rem); - content: ''; - position: absolute; - right: 0; -} - -.reset__button:not(:focus)::after { - border-right: 0.1rem solid rgba(var(--color-foreground), 0.08); - display: block; - height: calc(100% - 1.8rem); - content: ''; - position: absolute; - right: 0; -} - -.search__button:focus-visible, -.reset__button:focus-visible { - background-color: rgb(var(--color-background)); - z-index: 4; -} - -.search__button:focus, -.reset__button:focus { - background-color: rgb(var(--color-background)); - z-index: 4; -} - -.search__button:not(:focus-visible):not(.focused), -.reset__button:not(:focus-visible):not(.focused) { - box-shadow: inherit; - background-color: inherit; -} - -.search__button:hover .icon, -.reset__button:hover .icon { - transform: scale(1.07); -} - -.search__button .icon { - height: 1.8rem; - width: 1.8rem; -} - -.reset__button .icon.icon-close { - height: 1.8rem; - width: 1.8rem; - stroke-width: 0.1rem; -} - -/* Remove extra spacing for search inputs in Safari */ -input::-webkit-search-decoration { - -webkit-appearance: none; -} - -.template-search__results { - position: relative; -} diff --git a/assets/component-show-more.css b/assets/component-show-more.css deleted file mode 100644 index 7e39d02e070..00000000000 --- a/assets/component-show-more.css +++ /dev/null @@ -1,10 +0,0 @@ -.button-show-more { - padding-left: 0; - justify-content: flex-start; - padding-bottom: 1.1rem; -} - -.button-show-more, -.button-show-less { - margin-top: 1.5rem; -} diff --git a/assets/component-slider.css b/assets/component-slider.css deleted file mode 100644 index c0c197ecb64..00000000000 --- a/assets/component-slider.css +++ /dev/null @@ -1,377 +0,0 @@ -slider-component { - --desktop-margin-left-first-item: max( - 5rem, - calc((100vw - var(--page-width) + 10rem - var(--grid-desktop-horizontal-spacing)) / 2) - ); - position: relative; - display: block; -} - -slider-component.slider-component-full-width { - --desktop-margin-left-first-item: 1.5rem; -} - -@media screen and (max-width: 749px) { - slider-component.page-width { - padding: 0 1.5rem; - } -} - -@media screen and (min-width: 749px) and (max-width: 990px) { - slider-component.page-width { - padding: 0 5rem; - } -} - -.slider__slide { - --focus-outline-padding: 0.5rem; - --shadow-padding-top: calc((var(--shadow-vertical-offset) * -1 + var(--shadow-blur-radius)) * var(--shadow-visible)); - --shadow-padding-bottom: calc((var(--shadow-vertical-offset) + var(--shadow-blur-radius)) * var(--shadow-visible)); - scroll-snap-align: start; - flex-shrink: 0; - padding-bottom: 0; -} - -@media screen and (max-width: 749px) { - .slider.slider--mobile { - position: relative; - flex-wrap: inherit; - overflow-x: auto; - scroll-snap-type: x mandatory; - scroll-behavior: smooth; - scroll-padding-left: 1.5rem; - -webkit-overflow-scrolling: touch; - margin-bottom: 1rem; - } - - /* Fix to show some space at the end of our sliders in all browsers */ - .slider--mobile:after { - content: ''; - width: 0; - padding-left: 1.5rem; - } - - .slider.slider--mobile .slider__slide { - margin-bottom: 0; - padding-top: max(var(--focus-outline-padding), var(--shadow-padding-top)); - padding-bottom: max(var(--focus-outline-padding), var(--shadow-padding-bottom)); - } - - .slider.slider--mobile.contains-card--standard .slider__slide:not(.collection-list__item--no-media) { - padding-bottom: var(--focus-outline-padding); - } - - .slider.slider--mobile.contains-content-container .slider__slide { - --focus-outline-padding: 0rem; - } -} - -@media screen and (min-width: 750px) { - .slider.slider--tablet-up { - position: relative; - flex-wrap: inherit; - overflow-x: auto; - scroll-snap-type: x mandatory; - scroll-behavior: smooth; - scroll-padding-left: 1rem; - -webkit-overflow-scrolling: touch; - } - - .slider.slider--tablet-up .slider__slide { - margin-bottom: 0; - } -} - -@media screen and (max-width: 989px) { - .slider.slider--tablet { - position: relative; - flex-wrap: inherit; - overflow-x: auto; - scroll-snap-type: x mandatory; - scroll-behavior: smooth; - scroll-padding-left: 1.5rem; - -webkit-overflow-scrolling: touch; - margin-bottom: 1rem; - } - - /* Fix to show some space at the end of our sliders in all browsers */ - .slider--tablet:after { - content: ''; - width: 0; - padding-left: 1.5rem; - margin-left: calc(-1 * var(--grid-desktop-horizontal-spacing)); - } - - .slider.slider--tablet .slider__slide { - margin-bottom: 0; - padding-top: max(var(--focus-outline-padding), var(--shadow-padding-top)); - padding-bottom: max(var(--focus-outline-padding), var(--shadow-padding-bottom)); - } - - .slider.slider--tablet.contains-card--standard .slider__slide:not(.collection-list__item--no-media) { - padding-bottom: var(--focus-outline-padding); - } - - .slider.slider--tablet.contains-content-container .slider__slide { - --focus-outline-padding: 0rem; - } -} - -.slider--everywhere { - position: relative; - flex-wrap: inherit; - overflow-x: auto; - scroll-snap-type: x mandatory; - scroll-behavior: smooth; - -webkit-overflow-scrolling: touch; - margin-bottom: 1rem; -} - -.slider.slider--everywhere .slider__slide { - margin-bottom: 0; - scroll-snap-align: center; -} - -@media screen and (min-width: 990px) { - .slider-component-desktop.page-width { - max-width: none; - } - - .slider--desktop { - position: relative; - flex-wrap: inherit; - overflow-x: auto; - scroll-snap-type: x mandatory; - scroll-behavior: smooth; - -webkit-overflow-scrolling: touch; - margin-bottom: 1rem; - scroll-padding-left: var(--desktop-margin-left-first-item); - } - - /* Fix to show some space at the end of our sliders in all browsers */ - .slider--desktop:after { - content: ''; - width: 0; - padding-left: 5rem; - margin-left: calc(-1 * var(--grid-desktop-horizontal-spacing)); - } - - .slider.slider--desktop .slider__slide { - margin-bottom: 0; - padding-top: max(var(--focus-outline-padding), var(--shadow-padding-top)); - padding-bottom: max(var(--focus-outline-padding), var(--shadow-padding-bottom)); - } - - .slider--desktop .slider__slide:first-child { - margin-left: var(--desktop-margin-left-first-item); - scroll-margin-left: var(--desktop-margin-left-first-item); - } - - .slider-component-full-width .slider--desktop { - scroll-padding-left: 1.5rem; - } - - .slider-component-full-width .slider--desktop .slider__slide:first-child { - margin-left: 1.5rem; - scroll-margin-left: 1.5rem; - } - - /* Fix to show some space at the end of our sliders in all browsers */ - .slider-component-full-width .slider--desktop:after { - padding-left: 1.5rem; - } - - .slider--desktop.grid--5-col-desktop .grid__item { - width: calc((100% - var(--desktop-margin-left-first-item)) / 5 - var(--grid-desktop-horizontal-spacing) * 2); - } - - .slider--desktop.grid--4-col-desktop .grid__item { - width: calc((100% - var(--desktop-margin-left-first-item)) / 4 - var(--grid-desktop-horizontal-spacing) * 3); - } - - .slider--desktop.grid--3-col-desktop .grid__item { - width: calc((100% - var(--desktop-margin-left-first-item)) / 3 - var(--grid-desktop-horizontal-spacing) * 4); - } - - .slider--desktop.grid--2-col-desktop .grid__item { - width: calc((100% - var(--desktop-margin-left-first-item)) / 2 - var(--grid-desktop-horizontal-spacing) * 5); - } - - .slider--desktop.grid--1-col-desktop .grid__item { - width: calc((100% - var(--desktop-margin-left-first-item)) - var(--grid-desktop-horizontal-spacing) * 9); - } - - .slider.slider--desktop.contains-card--standard .slider__slide:not(.collection-list__item--no-media) { - padding-bottom: var(--focus-outline-padding); - } - - .slider.slider--desktop.contains-content-container .slider__slide { - --focus-outline-padding: 0rem; - } -} - -@media (prefers-reduced-motion) { - .slider { - scroll-behavior: auto; - } -} - -/* Scrollbar */ - -.slider { - scrollbar-color: rgb(var(--color-foreground)) rgba(var(--color-foreground), 0.04); - -ms-overflow-style: none; - scrollbar-width: none; -} - -.slider::-webkit-scrollbar { - height: 0.4rem; - width: 0.4rem; - display: none; -} - -.slider::-webkit-scrollbar-thumb { - background-color: rgb(var(--color-foreground)); - border-radius: 0.4rem; - border: 0; -} - -.slider::-webkit-scrollbar-track { - background: rgba(var(--color-foreground), 0.04); - border-radius: 0.4rem; -} - -.slider-counter { - display: flex; - justify-content: center; - min-width: 4.4rem; -} - -@media screen and (min-width: 750px) { - .slider-counter--dots { - margin: 0 1.2rem; - } -} - -.slider-counter__link { - padding: 1rem; -} - -@media screen and (max-width: 749px) { - .slider-counter__link { - padding: 0.7rem; - } -} - -.slider-counter__link--dots .dot { - width: 1rem; - height: 1rem; - border-radius: 50%; - border: 0.1rem solid rgba(var(--color-foreground), 0.5); - padding: 0; - display: block; -} - -.slider-counter__link--active.slider-counter__link--dots .dot { - background-color: rgb(var(--color-foreground)); -} - -@media screen and (forced-colors: active) { - .slider-counter__link--active.slider-counter__link--dots .dot { - background-color: CanvasText; - } -} - -.slider-counter__link--dots:not(.slider-counter__link--active):hover .dot { - border-color: rgb(var(--color-foreground)); -} - -.slider-counter__link--dots .dot, -.slider-counter__link--numbers { - transition: transform 0.2s ease-in-out; -} - -.slider-counter__link--active.slider-counter__link--numbers, -.slider-counter__link--dots:not(.slider-counter__link--active):hover .dot, -.slider-counter__link--numbers:hover { - transform: scale(1.1); -} - -.slider-counter__link--numbers { - color: rgba(var(--color-foreground), 0.5); - text-decoration: none; -} - -.slider-counter__link--numbers:hover { - color: rgb(var(--color-foreground)); -} - -.slider-counter__link--active.slider-counter__link--numbers { - text-decoration: underline; - color: rgb(var(--color-foreground)); -} - -.slider-buttons { - display: flex; - align-items: center; - justify-content: center; -} - -@media screen and (min-width: 990px) { - .slider:not(.slider--everywhere):not(.slider--desktop) + .slider-buttons { - display: none; - } -} - -@media screen and (max-width: 989px) { - .slider--desktop:not(.slider--tablet) + .slider-buttons { - display: none; - } -} - -@media screen and (min-width: 750px) { - .slider--mobile + .slider-buttons { - display: none; - } -} - -.slider-button { - color: rgba(var(--color-foreground), 0.75); - background: transparent; - border: none; - cursor: pointer; - width: 44px; - height: 44px; - display: flex; - align-items: center; - justify-content: center; -} - -.slider-button:not([disabled]):hover { - color: rgb(var(--color-foreground)); -} - -.slider-button .icon { - height: 0.6rem; -} - -.slider-button[disabled] .icon { - color: rgba(var(--color-foreground), 0.3); - cursor: not-allowed; -} - -.slider-button--next .icon { - transform: rotate(-90deg); -} - -.slider-button--prev .icon { - transform: rotate(90deg); -} - -.slider-button--next:not([disabled]):hover .icon { - transform: rotate(-90deg) scale(1.1); -} - -.slider-button--prev:not([disabled]):hover .icon { - transform: rotate(90deg) scale(1.1); -} diff --git a/assets/component-slideshow.css b/assets/component-slideshow.css deleted file mode 100644 index 9c2cfb5a2b5..00000000000 --- a/assets/component-slideshow.css +++ /dev/null @@ -1,201 +0,0 @@ -slideshow-component { - position: relative; - display: flex; - flex-direction: column; -} - -slideshow-component .slideshow.banner { - flex-direction: row; - flex-wrap: nowrap; - margin: 0; - gap: 0; - overflow-y: hidden; -} - -.slideshow__slide { - padding: 0; - position: relative; - display: flex; - flex-direction: column; - visibility: visible; -} - -@media screen and (max-width: 749px) { - .slideshow--placeholder.banner--mobile-bottom.banner--adapt_image .slideshow__media, - .slideshow--placeholder.banner--adapt_image:not(.banner--mobile-bottom) { - height: 28rem; - } -} - -@media screen and (min-width: 750px) { - .slideshow--placeholder.banner--adapt_image { - height: 56rem; - } -} - -.slideshow__text.banner__box { - display: flex; - flex-direction: column; - justify-content: center; - max-width: 54.5rem; -} - -.slideshow__text > * { - max-width: 100%; -} - -@media screen and (max-width: 749px) { - slideshow-component.page-width .slideshow__text { - border-right: var(--text-boxes-border-width) solid rgba(var(--color-foreground), var(--text-boxes-border-opacity)); - border-left: var(--text-boxes-border-width) solid rgba(var(--color-foreground), var(--text-boxes-border-opacity)); - } - - .banner--mobile-bottom .slideshow__text.banner__box { - max-width: 100%; - } - - .banner--mobile-bottom .slideshow__text-wrapper { - flex-grow: 1; - } - - .banner--mobile-bottom .slideshow__text.banner__box { - height: 100%; - } - - .banner--mobile-bottom .slideshow__text .button { - flex-grow: 0; - } - - .slideshow__text.slideshow__text-mobile--left { - align-items: flex-start; - text-align: left; - } - - .slideshow__text.slideshow__text-mobile--right { - align-items: flex-end; - text-align: right; - } -} - -@media screen and (min-width: 750px) { - .slideshow__text.slideshow__text--left { - align-items: flex-start; - text-align: left; - } - - .slideshow__text.slideshow__text--right { - align-items: flex-end; - text-align: right; - } -} - -.slideshow:not(.banner--mobile-bottom) .slideshow__text-wrapper { - height: 100%; -} - -@media screen and (min-width: 750px) { - .slideshow__text-wrapper.banner__content { - height: 100%; - padding: 5rem; - } -} - -.slideshow__controls { - border: 0.1rem solid rgba(var(--color-foreground), 0.08); -} - -.slideshow__controls--top { - order: 2; - z-index: 1; -} - -@media screen and (max-width: 749px) { - .slideshow__controls--border-radius-mobile { - border-bottom-right-radius: var(--text-boxes-radius); - border-bottom-left-radius: var(--text-boxes-radius); - } -} - -.spaced-section--full-width:last-child slideshow-component:not(.page-width) .slideshow__controls { - border-bottom: none; -} - -@media screen and (min-width: 750px) { - .slideshow__controls { - position: relative; - } -} - -slideshow-component:not(.page-width) .slider-buttons { - border-right: 0; - border-left: 0; -} - -.slideshow__control-wrapper { - display: flex; -} - -.slideshow__autoplay { - position: absolute; - right: 0; - border-left: none; - display: flex; - justify-content: center; - align-items: center; -} - -@media screen and (max-width: 749px) { - slideshow-component.page-width .slideshow__autoplay { - right: 1.5rem; - } -} - -@media screen and (min-width: 750px) { - .slideshow__autoplay.slider-button { - position: inherit; - margin-left: 0.6rem; - padding: 0 0 0 0.6rem; - border-left: 0.1rem solid rgba(var(--color-foreground), 0.08); - } -} - -.slideshow__autoplay .icon.icon-play, -.slideshow__autoplay .icon.icon-pause { - display: block; - position: absolute; - opacity: 1; - transform: scale(1); - transition: transform 150ms ease, opacity 150ms ease; - width: 0.8rem; - height: 1.2rem; -} - -.slideshow__autoplay .icon.icon-play { - height: 1rem; -} - -.slideshow__autoplay path { - fill: rgba(var(--color-foreground), 0.75); -} - -.slideshow__autoplay:hover path { - fill: rgb(var(--color-foreground)); -} - -@media screen and (forced-colors: active) { - .slideshow__autoplay path, - .slideshow__autoplay:hover path { - fill: CanvasText; - } -} - -.slideshow__autoplay:hover .svg-wrapper { - transform: scale(1.1); -} - -.slideshow__autoplay--paused .icon-pause, -.slideshow__autoplay:not(.slideshow__autoplay--paused) .icon-play { - visibility: hidden; - opacity: 0; - transform: scale(0.8); -} diff --git a/assets/component-swatch-input.css b/assets/component-swatch-input.css deleted file mode 100644 index f81d93883d2..00000000000 --- a/assets/component-swatch-input.css +++ /dev/null @@ -1,87 +0,0 @@ -/* swatch-input lives in its own file for reusability of the swatch in other areas than the product form context */ -.swatch-input__input + .swatch-input__label { - --swatch-input--border-radius: 50%; - display: inline-block; - max-width: 100%; - border-radius: var(--swatch-input--border-radius); - cursor: pointer; - outline-offset: 0.2rem; - outline-color: transparent; - outline-style: solid; - transition-property: outline-color, outline-width, box-shadow; - transition-duration: var(--duration-short); - transition-timing-function: ease; - forced-color-adjust: none; -} - -.swatch-input__input + .swatch-input__label.swatch-input__label--square { - --swatch-input--border-radius: 0.2rem; -} - -/* Active state */ -.swatch-input__input:active + .swatch-input__label, -.swatch-input__input:checked + .swatch-input__label { - outline: 0.1rem solid rgb(var(--color-foreground)); -} - -/* Hover state */ -.swatch-input__input + .swatch-input__label:hover, -.swatch-input__input:hover + .swatch-input__label { - outline: 0.2rem solid rgba(var(--color-foreground), 0.4); -} - -/* Focus visible */ -.swatch-input__input:focus-visible + .swatch-input__label { - outline: 0.2rem solid rgba(var(--color-foreground), 0.5); - box-shadow: 0 0 0 0.2rem rgb(var(--color-background)), 0 0 0.1rem 0.5rem rgba(var(--color-foreground), 0.25); -} - -/* Active and focused */ -.swatch-input__input:active:focus-visible + .swatch-input__label, -.swatch-input__input:checked:focus-visible + .swatch-input__label { - outline: 0.1rem solid rgb(var(--color-foreground)); - box-shadow: 0 0 0 0.2rem rgb(var(--color-background)), 0 0 0.1rem 0.4rem rgba(var(--color-foreground), 0.25); -} - -/* Visually disabled */ -.swatch-input__input.visually-disabled:not(:active):not(:checked) + .swatch-input__label { - transition: none; -} -.swatch-input__input.visually-disabled:not(:active):not(:checked) + .swatch-input__label:hover { - outline: none; -} - -/* Actually disabled */ -.swatch-input__input:disabled + .swatch-input__label { - pointer-events: none; -} - -/* Overrides for swatch snippet when used inside disabled swatch-input */ -.swatch-input__input:disabled + .swatch-input__label > .swatch, -.swatch-input__input.visually-disabled + .swatch-input__label > .swatch { - position: relative; - overflow: hidden; -} - -/* Disabled styles */ -.swatch-input__input:disabled + .swatch-input__label > .swatch, -.swatch-input__input.visually-disabled + .swatch-input__label > .swatch { - opacity: 0.4; -} - -/* Display crossed out line over swatch when input is disabled */ -.swatch-input__input:disabled + .swatch-input__label > .swatch::after, -.swatch-input__input.visually-disabled + .swatch-input__label > .swatch::after { - /* Diagonal of a square = length of the side * sqrt(2) */ - --diagonal--size: calc(var(--swatch-input--size) * 1.414); - --crossed-line--size: 0.1rem; - content: ''; - position: absolute; - bottom: calc(var(--crossed-line--size) * -0.5); - left: 0; - width: var(--diagonal--size); - height: var(--crossed-line--size); - background-color: rgb(var(--color-foreground)); - transform: rotate(-45deg); - transform-origin: left; -} diff --git a/assets/component-swatch.css b/assets/component-swatch.css deleted file mode 100644 index ab4a83c23aa..00000000000 --- a/assets/component-swatch.css +++ /dev/null @@ -1,25 +0,0 @@ -/* swatch lives in its own file for reusability of the swatch in swatch-input and dropdown */ -.swatch { - --swatch--size: var(--swatch-input--size, 4.4rem); - --swatch--border-radius: var(--swatch-input--border-radius, 50%); - - display: block; - width: var(--swatch--size); - max-width: 100%; - aspect-ratio: 1 / 1; - background: var(--swatch--background); - background-position: var(--swatch-focal-point, initial); - background-size: cover; - background-origin: border-box; - border: 0.1rem solid rgba(var(--color-foreground), 0.15); - border-radius: var(--swatch--border-radius); -} - -.swatch--square { - --swatch--border-radius: var(--swatch-input--border-radius, 0.2rem); -} - -.swatch--unavailable { - border-style: dashed; - border-color: rgba(var(--color-foreground), 0.5); -} diff --git a/assets/component-tabs.css b/assets/component-tabs.css new file mode 100644 index 00000000000..da3ac30a135 --- /dev/null +++ b/assets/component-tabs.css @@ -0,0 +1,113 @@ +.tabs__header { + --tab-spacing: 6rem; + --tab-spacing-mobile: 2.4rem; + margin-bottom: var(--header-padding-bottom); + column-gap: 1.6rem; +} +.tabs__header--horizontal .section__header { + --header-padding-bottom: 0; + --header-padding-bottom-mobile: 1.2rem; +} +.tabs__nav-wrap { + display: flex; + position: relative; + overflow: hidden; + max-width: 100%; +} +.tabs__nav { + display: inline-grid; + grid-auto-flow: column; + grid-auto-columns: max-content; + justify-content: flex-start; + vertical-align: top; + overflow-y: hidden; + overflow-x: auto; + -ms-overflow-style: none; + scrollbar-width: none; + gap: 0 var(--tab-spacing); +} +.tabs__nav::-webkit-scrollbar { + display: none; +} +.no-js .tabs__nav { + display: none; +} +.tabs__tab { + position: relative; + cursor: pointer; + transition: all var(--duration-default); + background: none !important; + border: none; + white-space: unset; + height: auto; + margin: 0; + color: var(--color-tab-normal, rgb(var(--color-foreground))); +} +.tabs__tab:hover, .tabs__tab[aria-selected=true] { + color: var(--color-tab-active, rgb(var(--color-foreground))); +} +.no-js .tabs__content { + display: block; +} +.tabs__content .icon-with-text .icon { + --icon-size: 2.4rem; +} +.tabs-nav--headings .tabs__header { + --color-tab-normal: rgba(var(--color-foreground), 0.3); + position: relative; +} +.tabs-nav--headings .tabs__header:before { + content: ""; + position: absolute; + bottom: 0; + left: 0; + right: 0; + height: 1px; + background: rgba(var(--color-foreground), 0.2); +} +.tabs-nav--headings .tabs__tab { + padding: 0 0 1.2rem !important; +} +.tabs-nav--headings .tabs__tab:after { + width: 0; + transform: none; + height: 2px; +} +.tabs-nav--headings .tabs__tab[aria-selected=true]:after { + width: 100%; +} +.tabs-nav--buttons .tabs__header { + --tab-spacing: 0.8rem; + --tab-spacing-mobile: 0.8rem; +} +.tabs-nav--buttons [role=tab] { + padding: 0 2rem; + border-color: rgba(var(--color-foreground), 0.2); +} +.tabs-nav--buttons [role=tab][aria-selected=true] { + color: rgb(var(--color-button-text)); +} +.tabs-nav--buttons [role=tab][aria-selected=true]:before { + width: calc(100% + var(--buttons-border-width, 0px)); +} + +@media (max-width: 767.98px) { + .tabs__header { + margin-bottom: var(--header-padding-bottom-mobile); + } + .tabs__nav-wrap { + justify-content: center; + min-width: 100%; + max-width: calc(100% + 3rem); + margin-inline: -1.5rem; + } + .tabs__nav { + gap: 0 var(--tab-spacing-mobile); + padding-inline: 1.5rem; + } +} +@media (min-width: 768px) { + .help-sidebar__wrapper > .tabs { + overflow: hidden; + } +} diff --git a/assets/component-testimonial.css b/assets/component-testimonial.css new file mode 100644 index 00000000000..59b76274c78 --- /dev/null +++ b/assets/component-testimonial.css @@ -0,0 +1,281 @@ +.testimonial { + --avatar-size: 5rem; + box-sizing: border-box; +} +.testimonial__header { + align-items: baseline; +} +.testimonial__icon { + display: flex; + align-items: center; + line-height: 1; + column-gap: 0.4rem; +} +.testimonial__icon:not(:first-child) { + margin-top: var(--mt, 1.6rem); +} +.testimonial__content:not(:first-child) { + margin-top: var(--mt, 1.6rem); +} +.testimonial__avatar { + width: var(--avatar-size); + height: var(--avatar-size); + flex-shrink: 0; +} +.testimonial__author { + vertical-align: middle; +} +.testimonial__author:not(:first-child) { + margin-top: var(--mt, 3.2rem); +} +.testimonial__product { + display: flex; + align-items: center; + gap: 1.2rem; + padding-top: 1.2rem; + margin-top: 2.4rem; + border-top: 1px solid rgba(var(--color-border), var(--color-border-alpha, 1)); +} +.testimonial__product span { + flex-shrink: 0; + width: 4rem; +} +.testimonials--slider .testimonial--layout-1 { + padding-inline: var(--p-inline); +} +@media (min-width: 1024px) { + .testimonials--slider .testimonial--layout-1 { + --p-inline: 3rem; + } +} +@media (min-width: 1280px) { + .testimonials--slider .testimonial--layout-1 { + --p-inline: 5rem; + } +} +@media (min-width: ) { + .testimonials--slider .testimonial--layout-1 { + --p-inline: 9rem; + } +} +.testimonial--layout-1 .testimonial__container.testimonial--has-bg { + padding: 2.4rem; +} +@media (max-width: 767.98px) { + .testimonial--layout-1 .testimonial__container.testimonial--has-bg { + padding: 1.6rem; + } +} +.testimonial--layout-1 .testimonial__content { + --mt: 3.2rem; +} +@media (max-width: 767.98px) { + .testimonial--layout-1 .testimonial__content { + --mt: 2.4rem; + } +} +.testimonial--layout-1 .testimonial__image { + margin-bottom: 3.2rem; +} +@media (max-width: 767.98px) { + .testimonial--layout-1 .testimonial__author { + --mt: 2.4rem; + } +} +@media (min-width: 1024px) { + .testimonial--layout-1:has(.testimonial__image) .testimonial__wrapper { + display: grid; + grid-template-columns: 1fr minmax(min(260px, 40%), auto); + column-gap: 1.2rem; + } + .testimonial--layout-1:has(.testimonial__image) .testimonial__image { + align-self: self-start; + margin-bottom: 0; + } + .testimonial--layout-1:has(.testimonial__image) .testimonial__inner { + order: -1; + } +} +.testimonial--layout-2.testimonial--has-bg { + padding: 2rem 1.6rem; +} +@media (max-width: 767.98px) { + .testimonial--layout-2.testimonial--has-bg { + padding: 1.6rem; + } +} +.testimonial--layout-2 .testimonial__icon { + --mt: 1.6rem; + column-gap: 0.2rem; +} +@media (max-width: 767.98px) { + .testimonial--layout-2 .testimonial__icon { + --mt: 0.8rem; + } +} +.testimonial--layout-2 .testimonial__image { + margin-bottom: 1.6rem; +} +@media (min-width: 768px) { + .testimonial--layout-2:has(.testimonial__image) .testimonial__wrapper { + display: grid; + grid-template-columns: 1fr minmax(min(160px, 35%), auto); + column-gap: 1.2rem; + } + .testimonial--layout-2:has(.testimonial__image) .testimonial__image { + align-self: self-start; + margin-bottom: 0; + } + .testimonial--layout-2:has(.testimonial__image) .testimonial__inner { + order: -1; + } +} +.testimonial--layout-3 { + --padding-x: 1.6rem; +} +.testimonial--layout-3 .testimonial__icon { + margin-block-end: 0.8rem; +} +.testimonial--layout-3 .testimonial__content { + margin-block-start: 0.8rem; +} +.testimonial--layout-3 .testimonial__author { + --mt: 1.2rem; +} +.testimonial--layout-3 .testimonial__inner { + padding-block-start: 2rem; +} +.testimonial--layout-3 .testimonial__product { + margin-block-start: 1.6rem; +} +.testimonial--layout-3 .testimonial__float-product { + position: absolute; + inset-inline-end: 1rem; + inset-block-end: 1rem; +} +.testimonial--layout-3 .testimonial__float-product > span { + width: 5rem; + height: 5rem; +} +@media (max-width: 767.98px) { + .testimonial--layout-3 .testimonial__image { + height: auto; + } + .testimonial--layout-3 .testimonial__wrapper, .testimonial--layout-3 .testimonial__inner { + border-radius: 0; + } + .testimonial--layout-3 .testimonial__header { + cursor: auto; + } + .testimonial--layout-3 .testimonial__wrapper { + flex: 1; + } + .testimonial--layout-3 .testimonial__inner { + height: 100%; + } + .testimonial--layout-3:not(.testimonial--color-inherit-mobile) { + border-radius: var(--blocks-radius-mobile); + overflow: hidden; + -webkit-mask-image: -webkit-radial-gradient(white, black); + } + .testimonial--layout-3:not(.testimonial--color-inherit-mobile) .blocks-radius { + --blocks-radius-mobile: 0; + } + .testimonial--layout-3:not(.testimonial--color-inherit-mobile) .testimonial__inner { + padding-inline: var(--padding-x); + padding-block: 2rem 1.6rem; + } +} +@media (min-width: 768px) { + .testimonial--layout-3 .testimonial__wrapper { + padding: 2rem; + position: absolute; + inset: 0; + } + .testimonial--layout-3 .testimonial__wrapper.has-overlay { + background: linear-gradient(180deg, rgba(var(--color-background), 0) 0%, rgba(var(--color-background), 0.5) 100%); + } + .testimonial--layout-3 .testimonial__header *, .testimonial--layout-3 .testimonial__author *, .testimonial--layout-3 .testimonial__content, .testimonial--layout-3 .testimonial__product { + transition: all 0.4s; + } + .testimonial--layout-3 .testimonial__toggle { + width: auto; + height: auto; + padding: 0; + border: 0; + position: absolute; + inset-inline-end: 0; + inset-block-end: 0; + } + .testimonial--layout-3 .testimonial__toggle svg { + transform: rotate(135deg); + transition: transform 0.4s; + transition-delay: 0.2s; + } + .testimonial--layout-3 .testimonial__header { + pointer-events: none; + } + .testimonial--layout-3 .testimonial__header[role=button] { + pointer-events: all; + cursor: pointer; + } + .testimonial--layout-3 .testimonial__inner { + padding-block-start: 2.4rem; + transition: all 0.4s; + max-height: 100%; + display: flex; + flex-direction: column; + } + .testimonial--layout-3 .testimonial__summary { + display: grid; + grid-template-rows: 0fr; + min-height: 0; + transition: grid-template-rows 0.4s; + } + .testimonial--layout-3 .testimonial__summary-inner { + display: flex; + flex-direction: column; + min-height: 0; + } + .testimonial--layout-3 .testimonial__summary-inner > *:last-child { + padding-block-end: 1.6rem; + } + .testimonial--layout-3 .testimonial__content::-webkit-scrollbar { + width: 0.5rem; + } + .testimonial--layout-3 .testimonial__content::-webkit-scrollbar-thumb { + background-color: rgba(var(--color-foreground), 0.4); + border-radius: 0.3rem; + } + .testimonial--layout-3:not([open]) .testimonial__inner { + background-color: transparent; + } + .testimonial--layout-3[open] .testimonial__toggle { + inset-block-end: calc(100% - 2.4rem); + } + .testimonial--layout-3[open] .testimonial__toggle svg { + transform: rotate(0deg); + } + .testimonial--layout-3[open] .testimonial__inner { + background-color: rgb(var(--color-background)); + padding-inline: var(--padding-x); + } + .testimonial--layout-3[open] .testimonial__summary { + grid-template-rows: 1fr; + transition-delay: 0.2s; + } +} + +.no-js .testimonial--layout-3 .testimonial__toggle { + display: none; +} +.no-js .testimonial--layout-3 .testimonial__inner { + background-color: rgb(var(--color-background)); + padding-inline: var(--padding-x); +} +.no-js .testimonial--layout-3 .testimonial__summary { + grid-template-rows: 1fr; +} +.no-js .testimonial--layout-3 .testimonial__content { + overflow: auto; +} diff --git a/assets/component-totals.css b/assets/component-totals.css deleted file mode 100644 index 97fa7f83ae3..00000000000 --- a/assets/component-totals.css +++ /dev/null @@ -1,40 +0,0 @@ -.totals { - display: flex; - justify-content: center; - align-items: flex-end; -} - -.totals > * { - font-size: 1.6rem; - margin: 0; -} - -.totals > h2 { - font-size: calc(var(--font-heading-scale) * 1.6rem); -} - -.totals * { - line-height: 1; -} - -.totals > * + * { - margin-left: 2rem; -} - -.totals__total { - margin-top: .5rem; -} - -.totals__total-value { - font-size: 1.8rem; -} - -.cart__ctas + .totals { - margin-top: 2rem; -} - -@media all and (min-width: 750px) { - .totals { - justify-content: flex-end; - } -} diff --git a/assets/component-volume-pricing.css b/assets/component-volume-pricing.css index f23c9b21d68..561419588ad 100644 --- a/assets/component-volume-pricing.css +++ b/assets/component-volume-pricing.css @@ -1,10 +1,15 @@ volume-pricing { - display: block; - margin-top: 2rem; + padding-inline: 2rem; + padding-block: 1.6rem; + background: rgba(var(--color-foreground), 0.04); +} + +volume-pricing:empty { + display: none; } volume-pricing li:nth-child(odd) { - background: rgba(var(--color-foreground), 0.04); + background: rgb(var(--color-background)); } volume-pricing ul { @@ -14,57 +19,16 @@ volume-pricing ul { volume-pricing li { font-size: 1.4rem; letter-spacing: 0.06rem; - padding: 0.6rem 0.8rem; + padding: 1rem 1.2rem; display: flex; justify-content: space-between; } -div.volume-pricing-note { - margin-top: -2.6rem; -} - -.product--no-media .volume-pricing-note { - text-align: center; -} - -.product--no-media volume-pricing { - width: 30rem; -} - -.volume-pricing-note span, -volume-pricing .label-show-more { - font-size: 1.2rem; - letter-spacing: 0.07rem; +volume-pricing .caption { + margin-block-end: 1.2rem; } volume-pricing show-more-button { - margin-top: 0.8rem; -} - -.product-form__input price-per-item, -.price-per-item__container { - display: flex; - align-items: center; - gap: 1rem; -} - -.product-form__input .price-per-item { - color: rgba(var(--color-foreground)); - font-size: 1.4rem; - letter-spacing: 0.06rem; -} - -.price-per-item dl { - margin: 0; -} - -.price-per-item dd { - margin-left: 0; -} - -.price-per-item__container .variant-item__old-price, -.price__regular .variant-item__old-price { - color: rgba(var(--color-foreground), 0.75); - font-size: 1.2rem; - letter-spacing: 0.07rem; + display: inline-block; + margin-block-start: 1.2rem; } diff --git a/assets/constants.js b/assets/constants.js deleted file mode 100644 index 8c405e63e66..00000000000 --- a/assets/constants.js +++ /dev/null @@ -1,9 +0,0 @@ -const ON_CHANGE_DEBOUNCE_TIMER = 300; - -const PUB_SUB_EVENTS = { - cartUpdate: 'cart-update', - quantityUpdate: 'quantity-update', - optionValueSelectionChange: 'option-value-selection-change', - variantChange: 'variant-change', - cartError: 'cart-error', -}; diff --git a/assets/countdown-timer.js b/assets/countdown-timer.js new file mode 100644 index 00000000000..1cbb0e7d809 --- /dev/null +++ b/assets/countdown-timer.js @@ -0,0 +1,172 @@ +if (!customElements.get('countdown-timer')) { + customElements.define( + 'countdown-timer', + class CountdownTimer extends HTMLElement { + constructor() { + super(); + + this.init(); + } + + init() { + this.MS_IN_SEC = 1000; + this.MS_IN_MIN = 60 * this.MS_IN_SEC; + this.MS_IN_HRS = 60 * this.MS_IN_MIN; + this.MS_IN_DAY = 24 * this.MS_IN_HRS; + + this.selectorMapping = { + day: '[data-timer-day]', + hour: '[data-timer-hour]', + minute: '[data-timer-minute]', + second: '[data-timer-second]', + }; + this.units = ['day', 'hour', 'minute', 'second']; + this.type = this.dataset.type; + this.duration = this.dataset.duration; + this.loop = false; + this.shouldAddLeadingZero = true; + + this.initCountdown(); + } + + initCountdown() { + switch (this.type) { + case 'fixed_time': + const countdownData = this.dataset.dueDate; + if (countdownData) { + this.targetTime = new Date(countdownData).getTime(); + } + break; + default: // Evergreen. + this.targetTime = this.getEvergreenDueDate().getTime(); + break; + } + + if (!this.targetTime) { + return; + } + + this.startTime = Date.now(); + if (this.targetTime > this.startTime) { + this.fetchDomElements(); + this.beginCountdown(); + } + } + + fetchDomElements() { + this.elements = {}; + this.units.forEach((unit) => { + this.elements[unit] = this.querySelector(this.selectorMapping[unit]); + }); + } + + beginCountdown() { + this.intervalId = setInterval(() => { + const remainingTime = this.targetTime - Date.now(); + if (remainingTime <= 0) { + this.terminateCountdown(); + } else { + this.updateDisplay(remainingTime); + } + }, 1000); + this.classList.remove('hidden'); + } + + updateDisplay(remainingTime) { + const timeComponents = this.computeTimeComponents(remainingTime); + this.units.forEach((unit) => { + if (this.elements[unit]) { + this.elements[unit].textContent = this.formatTimeComponent(timeComponents[unit]); + } + }); + } + + computeTimeComponents(ms) { + return { + day: Math.floor(ms / this.MS_IN_DAY), + hour: Math.floor((ms % this.MS_IN_DAY) / this.MS_IN_HRS), + minute: Math.floor((ms % this.MS_IN_HRS) / this.MS_IN_MIN), + second: Math.floor((ms % this.MS_IN_MIN) / this.MS_IN_SEC), + }; + } + + formatTimeComponent(value) { + return this.shouldAddLeadingZero && value < 10 ? `0${value}` : value.toString(); + } + + terminateCountdown() { + clearInterval(this.intervalId); + if (this.loop) { + this.beginCountdown(); + } else { + this.classList.add('hidden'); + } + } + + resetCountdown() { + clearInterval(this.intervalId); + this.units.forEach((unit) => { + if (this.elements[unit]) { + this.elements[unit].textContent = '00'; + } + }); + } + + getEvergreenDueDate() { + let intervalHrs; + const now = new Date(); + const dueDate = new Date(now); + + switch (this.duration) { + case 'every_month': + dueDate.setMonth(dueDate.getMonth() + 1); // Next month. + dueDate.setDate(1); // Start from the 1st day of the next month. + dueDate.setHours(0, 0, 0, 0); + return dueDate; + case 'every_week': + const dayOfWeek = now.getDay(); + const daysUntilNextWeek = 7 - dayOfWeek; + dueDate.setDate(now.getDate() + daysUntilNextWeek); // Move to next Sunday. + dueDate.setHours(0, 0, 0, 0); // Set the time to 00:00:00. + return dueDate; + case 'every_2_hrs': + intervalHrs = 2; + break; + case 'every_6_hrs': + intervalHrs = 6; + break; + case 'every_12_hrs': + intervalHrs = 12; + break; + case 'every_24_hrs': + intervalHrs = 24; + break; + } + + const currentHour = now.getHours(); + + // Possible start points based on the interval. + const startPoints = []; + for (let i = 0; i < 24; i += intervalHrs) { + startPoints.push(i); + } + + // Find the next start point. + for (let i = 0; i < startPoints.length; i++) { + if ( + currentHour < startPoints[i] || + (currentHour === startPoints[i] && now.getMinutes() === 0 && now.getSeconds() === 0) + ) { + dueDate.setHours(startPoints[i], 0, 0, 0); + return dueDate; + } + } + + // If no future point today, roll over to the first point tomorrow. + dueDate.setDate(dueDate.getDate() + 1); + dueDate.setHours(startPoints[0], 0, 0, 0); + return dueDate; + } + } + ); +} diff --git a/assets/customer.css b/assets/customer.css index 474c5921e8a..2e70bd54043 100644 --- a/assets/customer.css +++ b/assets/customer.css @@ -1,357 +1,74 @@ -.customer:not(.account):not(.order) { - margin: 0 auto; - max-width: 33.4rem; - padding-left: 1.5rem; - padding-right: 1.5rem; - text-align: center; -} - -@media screen and (min-width: 750px) { - .customer:not(.account):not(.order) { - max-width: 47.8rem; - } -} - -.customer > h1, -.customer__title { - margin-top: 0; -} - -.customer form { - margin-top: 4rem; -} - -.customer button { - margin: 4rem 0 1.5rem; -} - -.customer ul { - line-height: calc(1 + 0.6 / var(--font-body-scale)); - padding-left: 4.4rem; - text-align: left; - margin-bottom: 4rem; -} - -.customer ul a { - display: inline; -} - -.customer strong { - font-weight: normal; - color: rgb(var(--color-foreground)); -} - -.customer h2.form__message { - font-size: calc(var(--font-heading-scale) * 1.8rem); -} - -@media only screen and (min-width: 750px) { - .customer h2.form__message { - font-size: calc(var(--font-heading-scale) * 2.2rem); - } -} - -.customer .field { - margin: 2rem 0 0 0; -} - -.customer .field:first-of-type { - margin-top: 0; -} - -/* Customer Table */ -.customer table { - table-layout: auto; - border-collapse: collapse; - border-bottom: 0.01rem solid rgba(var(--color-foreground), 0.08); - box-shadow: none; +/* Login/Register */ +.login .section__wrapper, +.register .section__wrapper, +.activate .section__wrapper, +.reset-password .section__wrapper { width: 100%; - font-size: 1.6rem; - position: relative; -} - -@media screen and (min-width: 750px) { - .customer table { - border: none; - box-shadow: 0 0 0 0.1rem rgba(var(--color-foreground), 0.08); - } -} - -@media screen and (forced-colors: active) { - .customer table { - border-top: 0.1rem solid transparent; - border-bottom: 0.1rem solid transparent; - } -} - -.customer tbody { - color: rgb(var(--color-foreground)); -} - -.customer th, -.customer td { - font-weight: 400; - line-height: 1; - border: none; - padding: 0; -} - -@media screen and (min-width: 750px) { - .customer td { - padding-right: 2.2rem; - } -} - -.customer tbody td { - padding-top: 1rem; - padding-bottom: 1rem; -} - -.customer td:empty { - display: initial; -} - -.customer thead th { - font-size: 1.2rem; - letter-spacing: 0.07rem; - text-transform: uppercase; -} - -.customer tbody td:first-of-type { - padding-top: 4rem; -} - -@media screen and (min-width: 750px) { - .customer th, - .customer td:first-of-type { - text-align: left; - padding-left: 0; - padding-right: 2.2rem; - } - - .customer thead th, - .customer tbody td { - padding-top: 2.4rem; - padding-bottom: 2.4rem; - } - - .customer th:first-of-type, - .customer td:first-of-type { - padding-left: 2.2rem; - } - - .customer tbody td { - vertical-align: top; - } - - .customer tbody td:first-of-type { - padding-top: 2.4rem; - } -} - -.customer tbody td:last-of-type { - padding-bottom: 4rem; -} - -@media screen and (min-width: 750px) { - .customer tbody td:last-of-type { - padding-bottom: 0; - } -} - -.customer tbody tr { - border-top: 0.01rem solid rgba(var(--color-foreground), 0.08); -} - -@media screen and (min-width: 750px) { - .customer tbody tr:first-of-type { - border-top: none; - } -} - -@media screen and (forced-colors: active) { - .customer tbody tr { - border-top: 0.1rem solid transparent; - } -} - -.customer tfoot td:first-of-type, -.customer tfoot td { - padding-top: 0.6rem; - padding-bottom: 0.6rem; -} - -.customer tfoot td:first-of-type { - text-align: left; -} - -.customer tfoot tr:first-of-type td { - padding-top: 4rem; -} - -@media screen and (min-width: 750px) { - .customer tfoot tr:first-of-type td, - .customer tfoot tr:first-of-type th { - padding-top: 2.4rem; - } -} - -.customer tfoot tr:last-of-type td { - padding-bottom: 4rem; -} - -@media screen and (min-width: 750px) { - .customer tfoot tr:last-of-type td, - .customer tfoot tr:last-of-type th { - padding-bottom: 2.4rem; - } -} - -/* works around colspan phantom border issues */ -.customer thead::after, -.customer tfoot::before { - content: ' '; - height: 0.1rem; - width: 100%; - display: block; - position: absolute; - left: 0; - background: rgba(var(--color-foreground), 0.08); -} - -@media screen and (forced-colors: active) { - .customer thead::after, - .customer tfoot::before { - background: CanvasText; - } -} - -/* mobile table overrides */ -@media screen and (max-width: 749px) { - .customer thead, - .customer th, - .customer tfoot td:first-of-type { - display: none; - } - - .customer td { - display: flex; - text-align: right; - } - - .customer td::before { - color: rgba(var(--color-foreground), 0.75); - content: attr(data-label); - font-size: 1.4rem; - padding-right: 2rem; - text-transform: uppercase; - flex-grow: 1; - text-align: left; - } - - .customer td:first-of-type { - display: flex; - align-items: center; - } - - .customer tr { - display: flex; - flex-direction: column; - justify-content: flex-start; - width: 100%; - } -} - -/* Pagination */ -.customer .pagination { - margin-top: 5rem; - margin-bottom: 7rem; -} - -@media screen and (min-width: 990px) { - .customer .pagination { - margin-top: 7rem; - margin-bottom: 10rem; - } -} - -.customer .pagination ul { - display: flex; - justify-content: center; - list-style: none; - padding: 0; -} - -.customer .pagination li { - flex: 1 1; - max-width: 4rem; -} - -.customer .pagination li:not(:last-child) { - margin-right: 1rem; -} - -.customer .pagination li :first-child { - display: inline-flex; - justify-content: center; - align-items: center; - position: relative; - height: 4rem; - width: 100%; - padding: 0; - text-decoration: none; -} - -.customer .pagination li :first-child .svg-wrapper { - height: 0.6rem; -} - -.customer .pagination li:first-of-type .svg-wrapper { - margin-left: -0.2rem; - transform: rotate(90deg); -} - -.customer .pagination li:last-of-type .svg-wrapper { - margin-right: -0.2rem; - transform: rotate(-90deg); -} - -.customer .pagination li [aria-current]::after { - content: ''; - display: block; - width: 2rem; - height: 0.01rem; - position: absolute; - bottom: 0.08rem; - left: 50%; - transform: translateX(-50%); - background-color: currentColor; -} - -/* Login */ -.login a { - display: block; + max-width: 50rem; + padding: 0 1.5rem; margin: 0 auto; - width: fit-content; -} - -.login a[href='#recover'] { - margin-left: 0; - margin-right: 0; -} - -.login .field + a { - margin-top: 1rem; -} - -.login p { - margin: 1.5rem 0; } - -.login h3 { - margin-top: 1.5rem; - text-align: left; - font-size: calc(var(--font-heading-scale) * 1.6rem); +.login p, +.register p, +.activate p, +.reset-password p { + margin: 1.2rem 0 0; +} +.login .form-field + a, +.register .form-field + a, +.activate .form-field + a, +.reset-password .form-field + a { + margin-top: 0.8rem; +} +.login form, +.register form, +.activate form, +.reset-password form { + margin: 2.4rem 0 0; +} +.login form button, +.login form .btn--secondary, +.register form button, +.register form .btn--secondary, +.activate form button, +.activate form .btn--secondary, +.reset-password form button, +.reset-password form .btn--secondary { + margin-top: 2.4rem; +} +.login form button + a, +.login form .btn--secondary + a, +.register form button + a, +.register form .btn--secondary + a, +.activate form button + a, +.activate form .btn--secondary + a, +.reset-password form button + a, +.reset-password form .btn--secondary + a { + margin-top: 1.6rem; +} +.login form button + button, +.login form .btn--secondary + button, +.register form button + button, +.register form .btn--secondary + button, +.activate form button + button, +.activate form .btn--secondary + button, +.reset-password form button + button, +.reset-password form .btn--secondary + button { + margin-top: 1.6rem; +} +@media (max-width: 767.98px) { + .login form, + .register form, + .activate form, + .reset-password form { + margin-top: 2rem; + } + .login form button, + .register form button, + .activate form button, + .reset-password form button { + margin-top: 2rem; + } } #customer_login_guest button { @@ -385,370 +102,91 @@ margin-bottom: 0; } -.activate button[name='decline'], -.addresses li > button, -.addresses form button[type] { - background-color: rgba(var(--color-background), var(--alpha-button-background)); - color: rgb(var(--color-link)); -} - -@media only screen and (min-width: 750px) { - .activate button[name='decline'] { - margin-top: inherit; - margin-left: 1rem; - } -} - -/* Account/Order */ -:is(.account, .order) { - margin: 0 auto; - max-width: var(--page-width); - padding-left: 2rem; - padding-right: 2rem; -} - -@media screen and (min-width: 750px) { - :is(.account, .order) { - padding-left: 5rem; - padding-right: 5rem; - } -} - -@media screen and (min-width: 990px) { - :is(.account, .order) > div:nth-of-type(2) { - display: flex; - margin-top: 5rem; - } -} - -@media screen and (min-width: 990px) { - :is(.account, .order) > div:nth-of-type(2) > div:first-of-type { - flex-grow: 1; - padding-right: 3.2rem; - } -} - -@media screen and (min-width: 750px) and (max-width: 989px) { - .order > div:nth-of-type(2) > div:last-of-type { - display: flex; - } - - .order > div:nth-of-type(2) > div:last-of-type div { - padding-right: 3.2rem; - } -} - -:is(.account, .order) p { - margin: 0 0 2rem; - font-size: 1.6rem; -} - -:is(.account, .order) h1 { - margin-bottom: 1rem; -} - -:is(.account, .order) h2 { - margin-top: 4rem; - margin-bottom: 1rem; -} - -@media screen and (min-width: 990px) { - :is(.account, .order) h2 { - margin-top: 0; - } -} - -.account h1 + a { - display: inline-flex; - align-items: center; -} - -.account a .svg-wrapper { - width: 1.5rem; - margin-bottom: -0.03rem; - margin-right: 1rem; -} - -@media screen and (min-width: 750px) { - .account thead th:last-child, - .account td:last-child { - text-align: right; - } - - .account table td:first-of-type { - padding-top: 1.2rem; - padding-bottom: 1.2rem; - } -} - -.account table td:first-of-type a { - padding: 1.1rem 1.5rem; - text-decoration: none; - box-shadow: 0 0 0 0.1rem rgba(var(--color-link), 0.2); - border: 0.1rem solid transparent; - font-size: 1.2rem; -} - -.account table td:first-of-type a:hover { - box-shadow: 0 0 0 0.2rem rgba(var(--color-link), 0.2); -} - -.order td:first-of-type { - align-items: initial; -} - -@media screen and (min-width: 750px) { - .order thead th:nth-last-child(-n + 3), - .order td:nth-last-child(-n + 3) { - text-align: right; - } -} - -.order tfoot tr:last-of-type td, -.order tfoot tr:last-of-type th { - font-size: 2.2rem; - padding-top: 1.5rem; - padding-bottom: 4rem; +.customer__header { + margin-bottom: 4rem; } - -@media screen and (min-width: 750px) { - .order tfoot tr:last-of-type td, - .order tfoot tr:last-of-type th { - padding-bottom: 2.4rem; +@media (max-width: 767.98px) { + .customer__header { + margin-bottom: 3.2rem; } } - -.order tfoot tr:last-of-type td:before { - font-size: 2.2rem; -} - -.order table p, -.order > div:nth-of-type(2) > div:first-of-type h2, -.order > div:nth-of-type(2) > div:last-of-type h2 + p { - margin-bottom: 0; -} - -.order > div:nth-of-type(2) > div:first-of-type h2 ~ p { - margin-bottom: 0; - font-size: 1.4rem; -} - -.order > div:nth-of-type(2) > div:first-of-type h2 ~ p:last-of-type { - margin-bottom: 3rem; -} - -.order .item-props { - font-size: 1.4rem; - margin-top: 0.05px; +.customer__body { display: flex; - flex-direction: column; + gap: 3.2rem; } - -.order .item-props > span { - word-break: break-all; - line-height: calc(1 + 0.2 / var(--font-body-scale)); -} - -.order .fulfillment { - width: fit-content; - border: 0.01rem solid rgba(var(--color-foreground), 0.2); - padding: 1rem; - margin-top: 1rem; - font-size: 1.4rem; - text-align: left; +.customer__sidebar { + flex: 0 0 32rem; + align-self: self-start; } - -.order .fulfillment a { - margin: 0.7rem 0; -} - -.order .fulfillment span { - display: block; +.customer__sidebar p { + color: rgba(var(--color-subtext), var(--color-subtext-alpha, 1)); + margin: 0; } - -.order .cart-discount { - display: block; - margin-top: 1rem; - margin-bottom: 0.5rem; - font-size: 1.2rem; +.customer__widget { + padding: 2.4rem; + background-color: rgb(var(--color-secondary-background)); } - -@media screen and (min-width: 750px) { - .order td .cart-discount { - display: none; - } +.customer__content { + flex: 1; } - -.order tbody ul { - list-style: none; - font-size: 1.2rem; - text-align: right; - padding-left: 0; - margin-top: 1rem; - margin-bottom: 0; +.customer .rich-text { + margin-bottom: 2.4rem; } - -@media screen and (min-width: 750px) { - .order tbody ul { - text-align: left; +@media (max-width: 767.98px) { + .customer .rich-text { + margin-bottom: 1.2rem; } } - -.order table a { - line-height: calc(1 + 0.3 / var(--font-body-scale)); -} - -.order tbody tr:first-of-type td:first-of-type > div { - display: flex; - flex-direction: column; - align-items: flex-end; -} - -@media screen and (min-width: 750px) { - .order tbody tr:first-of-type td:first-of-type > div { - align-items: flex-start; +@media (max-width: 1023.98px) { + .customer__body { + flex-direction: column; } -} - -.order .properties { - font-size: 1.4rem; - margin-top: 1rem; -} - -.order .properties span { - display: block; - line-height: calc(1 + 0.2 / var(--font-body-scale)); -} - -.order .svg-wrapper { - width: 1.1rem; - color: rgb(var(--color-foreground)); - margin-right: 0.5rem; -} - -.order dl { - margin: 0; -} - -.order dd { - margin-left: 0; - line-height: calc(1 + 0.3 / var(--font-body-scale)); -} - -.order dd s { - color: rgba(var(--color-foreground), 0.7); -} - -.order .unit-price { - font-size: 1.1rem; - letter-spacing: 0.07rem; - line-height: calc(1 + 0.2 / var(--font-body-scale)); - margin-top: 0.2rem; - color: rgba(var(--color-foreground), 0.7); -} - -.order .regular-price { - font-size: 1.3rem; -} - -/* Addresses */ -.addresses li > button { - margin-left: 0.5rem; - margin-right: 0.5rem; -} - -.addresses li > button + button, -.addresses form button + button { - margin-top: 0rem; -} - -@media screen and (min-width: 750px) { - .addresses li > button:first-of-type { - margin-top: 3rem; + .customer__sidebar { + flex: 0 0 100%; + min-width: 100%; } } -.addresses form button:first-of-type { - margin-right: 1rem; +/* Account */ +/* Order */ +.order-total-amount { + margin-top: 2.4rem; } - -label[for='AddressCountryNew'], -label[for='AddressProvinceNew'] { - display: block; - font-size: 1.4rem; - margin-bottom: 0.6rem; +.order-total-amount li + li { + margin-top: 0.8rem; } -.addresses form { - display: flex; - flex-flow: row wrap; -} - -.addresses form > div { +/* Address */ +.addresses .section__wrapper { width: 100%; - text-align: left; -} - -.addresses ul { - list-style: none; - padding-left: 0; - text-align: center; -} - -li[data-address] { - margin-top: 5rem; -} - -.addresses [aria-expanded='false'] ~ div[id] { - display: none; -} - -.addresses [aria-expanded='true'] ~ div[id] { - display: block; -} - -.addresses h2 { - text-align: left; + max-width: 79rem; + padding: 0 1.5rem; + margin: 0 auto; } - -li[data-address] > h2 { - text-align: center; - font-size: calc(var(--font-heading-scale) * 1.8rem); - margin-bottom: 0; +.addresses [data-address] { + padding: 2.4rem 3.2rem; + margin-bottom: 2.4rem; } - -@media only screen and (min-width: 750px) { - li[data-address] > h2 { - font-size: calc(var(--font-heading-scale) * 2.2rem); +@media (max-width: 767.98px) { + .addresses [data-address] { + padding: 1.6rem; + margin-bottom: 1.2rem; } } - -.addresses ul p { - margin-bottom: 0; +.addresses__edit-form { + margin-top: 2.4rem; + padding-top: 2.4rem; + border-top: 1px solid rgba(var(--color-border), var(--color-border-alpha, 1)); } -.addresses input[type='checkbox'] { - margin-top: 2rem; - margin-left: 0; +.address-info__default-badge { + margin-bottom: 0.4rem; } - -@media only screen and (min-width: 750px) { - .addresses form > div:nth-of-type(1) { - margin-right: 2rem; - } - - .addresses form > div:nth-of-type(2) { - margin-top: 0; - } - - .addresses form > div:nth-of-type(1), - .addresses form > div:nth-of-type(2) { - box-sizing: border-box; - flex-basis: calc(50% - 1rem); - } +.address-info p { + margin: 0; } - -.addresses form > div:nth-of-type(7), -.addresses form > div:nth-of-type(7) + div[id] { - margin-top: 1.5rem; +.address-info button { + padding: 0; + height: auto; + line-height: normal; } diff --git a/assets/customer.js b/assets/customer.js index c608ccedd2e..735b95a224f 100644 --- a/assets/customer.js +++ b/assets/customer.js @@ -1,19 +1,14 @@ -const selectors = { - customerAddresses: '[data-customer-addresses]', - addressCountrySelect: '[data-address-country-select]', - addressContainer: '[data-address]', - toggleAddressButton: 'button[aria-expanded]', - cancelAddressButton: 'button[type="reset"]', - deleteAddressButton: 'button[data-confirm-message]', -}; - -const attributes = { - expanded: 'aria-expanded', - confirmMessage: 'data-confirm-message', -}; - class CustomerAddresses { constructor() { + this.selectors = { + customerAddresses: '[data-customer-addresses]', + addressCountrySelect: '[data-address-country-select]', + toggleAddressButton: '[data-toggle-target]', + deleteAddressButton: 'button[data-confirm-message]', + }; + this.attributes = { + confirmMessage: 'data-confirm-message', + }; this.elements = this._getElements(); if (Object.keys(this.elements).length === 0) return; this._setupCountries(); @@ -21,15 +16,14 @@ class CustomerAddresses { } _getElements() { - const container = document.querySelector(selectors.customerAddresses); + const container = document.querySelector(this.selectors.customerAddresses); return container ? { container, - addressContainer: container.querySelector(selectors.addressContainer), - toggleButtons: document.querySelectorAll(selectors.toggleAddressButton), - cancelButtons: container.querySelectorAll(selectors.cancelAddressButton), - deleteButtons: container.querySelectorAll(selectors.deleteAddressButton), - countrySelects: container.querySelectorAll(selectors.addressCountrySelect), + addressContainer: container.querySelector(this.selectors.addressContainer), + toggleButtons: document.querySelectorAll(this.selectors.toggleAddressButton), + deleteButtons: container.querySelectorAll(this.selectors.deleteAddressButton), + countrySelects: container.querySelectorAll(this.selectors.addressCountrySelect), } : {}; } @@ -52,34 +46,24 @@ class CustomerAddresses { _setupEventListeners() { this.elements.toggleButtons.forEach((element) => { - element.addEventListener('click', this._handleAddEditButtonClick); - }); - this.elements.cancelButtons.forEach((element) => { - element.addEventListener('click', this._handleCancelButtonClick); + element.addEventListener('click', (e) => { + const {currentTarget} = e; + const toggleTarget = document.getElementById(`${currentTarget.dataset.toggleTarget}`); + toggleTarget.classList.toggle('hidden'); + // toggleTarget.classList.toggle('active'); + }); }); this.elements.deleteButtons.forEach((element) => { element.addEventListener('click', this._handleDeleteButtonClick); }); } - _toggleExpanded(target) { - target.setAttribute(attributes.expanded, (target.getAttribute(attributes.expanded) === 'false').toString()); - } - - _handleAddEditButtonClick = ({ currentTarget }) => { - this._toggleExpanded(currentTarget); - }; - - _handleCancelButtonClick = ({ currentTarget }) => { - this._toggleExpanded(currentTarget.closest(selectors.addressContainer).querySelector(`[${attributes.expanded}]`)); - }; - _handleDeleteButtonClick = ({ currentTarget }) => { // eslint-disable-next-line no-alert - if (confirm(currentTarget.getAttribute(attributes.confirmMessage))) { + if (confirm(currentTarget.getAttribute(this.attributes.confirmMessage))) { Shopify.postLink(currentTarget.dataset.target, { parameters: { _method: 'delete' }, }); } }; -} +} \ No newline at end of file diff --git a/assets/details-disclosure.js b/assets/details-disclosure.js deleted file mode 100644 index b4680b7db8f..00000000000 --- a/assets/details-disclosure.js +++ /dev/null @@ -1,53 +0,0 @@ -class DetailsDisclosure extends HTMLElement { - constructor() { - super(); - this.mainDetailsToggle = this.querySelector('details'); - this.content = this.mainDetailsToggle.querySelector('summary').nextElementSibling; - - this.mainDetailsToggle.addEventListener('focusout', this.onFocusOut.bind(this)); - this.mainDetailsToggle.addEventListener('toggle', this.onToggle.bind(this)); - } - - onFocusOut() { - setTimeout(() => { - if (!this.contains(document.activeElement)) this.close(); - }); - } - - onToggle() { - if (!this.animations) this.animations = this.content.getAnimations(); - - if (this.mainDetailsToggle.hasAttribute('open')) { - this.animations.forEach((animation) => animation.play()); - } else { - this.animations.forEach((animation) => animation.cancel()); - } - } - - close() { - this.mainDetailsToggle.removeAttribute('open'); - this.mainDetailsToggle.querySelector('summary').setAttribute('aria-expanded', false); - } -} - -customElements.define('details-disclosure', DetailsDisclosure); - -class HeaderMenu extends DetailsDisclosure { - constructor() { - super(); - this.header = document.querySelector('.header-wrapper'); - } - - onToggle() { - if (!this.header) return; - this.header.preventHide = this.mainDetailsToggle.open; - - if (document.documentElement.style.getPropertyValue('--header-bottom-position-desktop') !== '') return; - document.documentElement.style.setProperty( - '--header-bottom-position-desktop', - `${Math.floor(this.header.getBoundingClientRect().bottom)}px` - ); - } -} - -customElements.define('header-menu', HeaderMenu); diff --git a/assets/details-modal.js b/assets/details-modal.js deleted file mode 100644 index 4d7002db6da..00000000000 --- a/assets/details-modal.js +++ /dev/null @@ -1,47 +0,0 @@ -class DetailsModal extends HTMLElement { - constructor() { - super(); - this.detailsContainer = this.querySelector('details'); - this.summaryToggle = this.querySelector('summary'); - - this.detailsContainer.addEventListener('keyup', (event) => event.code.toUpperCase() === 'ESCAPE' && this.close()); - this.summaryToggle.addEventListener('click', this.onSummaryClick.bind(this)); - this.querySelector('button[type="button"]').addEventListener('click', this.close.bind(this)); - - this.summaryToggle.setAttribute('role', 'button'); - } - - isOpen() { - return this.detailsContainer.hasAttribute('open'); - } - - onSummaryClick(event) { - event.preventDefault(); - event.target.closest('details').hasAttribute('open') ? this.close() : this.open(event); - } - - onBodyClick(event) { - if (!this.contains(event.target) || event.target.classList.contains('modal-overlay')) this.close(false); - } - - open(event) { - this.onBodyClickEvent = this.onBodyClickEvent || this.onBodyClick.bind(this); - event.target.closest('details').setAttribute('open', true); - document.body.addEventListener('click', this.onBodyClickEvent); - document.body.classList.add('overflow-hidden'); - - trapFocus( - this.detailsContainer.querySelector('[tabindex="-1"]'), - this.detailsContainer.querySelector('input:not([type="hidden"])') - ); - } - - close(focusToggle = true) { - removeTrapFocus(focusToggle ? this.summaryToggle : null); - this.detailsContainer.removeAttribute('open'); - document.body.removeEventListener('click', this.onBodyClickEvent); - document.body.classList.remove('overflow-hidden'); - } -} - -customElements.define('details-modal', DetailsModal); diff --git a/assets/email-signup-banner-background-mobile.svg b/assets/email-signup-banner-background-mobile.svg deleted file mode 100644 index 6197f1ca4ba..00000000000 --- a/assets/email-signup-banner-background-mobile.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/email-signup-banner-background.svg b/assets/email-signup-banner-background.svg deleted file mode 100644 index 9d05efff8fd..00000000000 --- a/assets/email-signup-banner-background.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/facets.js b/assets/facets.js index 9305e5f3c69..f084976665a 100644 --- a/assets/facets.js +++ b/assets/facets.js @@ -1,365 +1,612 @@ -class FacetFiltersForm extends HTMLElement { +class FacetShort extends HTMLSelectElement { constructor() { super(); - this.onActiveFilterClick = this.onActiveFilterClick.bind(this); + this.initMotionInView(); + this.addEventListener('change', this.onSelectChange.bind(this)); + } - this.debouncedOnSubmit = debounce((event) => { - this.onSubmitHandler(event); - }, 800); + get options() { + return this.getElementsByTagName('option'); + } - const facetForm = this.querySelector('form'); - facetForm.addEventListener('input', this.debouncedOnSubmit.bind(this)); + get fakeSelectElement() { + return this.previousElementSibling; + } - const facetWrapper = this.querySelector('#FacetsWrapperDesktop'); - if (facetWrapper) facetWrapper.addEventListener('keyup', onKeyUpEscape); + initMotionInView() { + FoxTheme.Motion.inView(this, this.calcSelectWidth.bind(this), { margin: '200px 0px 200px 0px' }); } - static setListeners() { - const onHistoryChange = (event) => { - const searchParams = event.state ? event.state.searchParams : FacetFiltersForm.searchParamsInitial; - if (searchParams === FacetFiltersForm.searchParamsPrev) return; - FacetFiltersForm.renderPage(searchParams, null, false); - }; - window.addEventListener('popstate', onHistoryChange); + calcSelectWidth() { + const selectStyle = window.getComputedStyle(this); + const selectedOptionText = this.options[this.selectedIndex].text; + + const textElement = this.createTextElement(selectedOptionText, selectStyle); + document.body.appendChild(textElement); + const selectWidth = textElement.offsetWidth; + textElement.remove(); + + this.style.setProperty('--width', `${selectWidth + 22}px`); } - static toggleActiveFacets(disable = true) { - document.querySelectorAll('.js-facet-remove').forEach((element) => { - element.classList.toggle('disabled', disable); - }); + createTextElement(text, style) { + const textElement = document.createElement('span'); + textElement.style.fontFamily = style.fontFamily; + textElement.style.fontSize = style.fontSize; + textElement.style.fontWeight = style.fontWeight; + textElement.style.visibility = 'hidden'; + textElement.style.position = 'absolute'; + textElement.innerHTML = text; + return textElement; } - static renderPage(searchParams, event, updateURLHash = true) { - FacetFiltersForm.searchParamsPrev = searchParams; - const sections = FacetFiltersForm.getSections(); - const countContainer = document.getElementById('ProductCount'); - const countContainerDesktop = document.getElementById('ProductCountDesktop'); - const loadingSpinners = document.querySelectorAll( - '.facets-container .loading__spinner, facet-filters-form .loading__spinner' - ); - loadingSpinners.forEach((spinner) => spinner.classList.remove('hidden')); - document.getElementById('ProductGridContainer').querySelector('.collection').classList.add('loading'); - if (countContainer) { - countContainer.classList.add('loading'); - } - if (countContainerDesktop) { - countContainerDesktop.classList.add('loading'); + onSelectChange(event) { + this.calcSelectWidth(); + this.updateFormParams(event); + } + + updateFormParams(event) { + const form = this.getClosestFacetForm() || this.getFirstFacetForm(); + + if (form) { + const url = new URL(window.location.href); + url.searchParams.set('sort_by', event.target.value); + url.searchParams.set('section_id', FoxTheme.utils.getSectionId(form)); + url.searchParams.delete('page'); + form.renderSection(url.toString(), event); } + } + + getClosestFacetForm() { + return this.closest('form[is="facet-form"]'); + } + + getFirstFacetForm() { + return document.querySelector('form[is="facet-form"]'); + } +} +customElements.define('facet-short', FacetShort, { extends: 'select' }); + +class PriceRange extends HTMLElement { + constructor() { + super(); - sections.forEach((section) => { - const url = `${window.location.pathname}?section_id=${section.section}&${searchParams}`; - const filterDataUrl = (element) => element.url === url; + this.minRangeInput = this.querySelector('input[type="range"]:first-child'); + this.maxRangeInput = this.querySelector('input[type="range"]:last-child'); + this.minPriceInput = this.querySelector('input[name="filter.v.price.gte"]'); + this.maxPriceInput = this.querySelector('input[name="filter.v.price.lte"]'); - FacetFiltersForm.filterData.some(filterDataUrl) - ? FacetFiltersForm.renderSectionFromCache(filterDataUrl, event) - : FacetFiltersForm.renderSectionFromFetch(url, event); + this.minPriceInput.addEventListener('focus', this.minPriceInput.select); + this.maxPriceInput.addEventListener('focus', this.maxPriceInput.select); + this.minPriceInput.addEventListener('change', this.handleInputMinChange.bind(this)); + this.maxPriceInput.addEventListener('change', this.handleInputMaxChange.bind(this)); + + this.minRangeInput.addEventListener('change', this.handleRangeMinChange.bind(this)); + this.maxRangeInput.addEventListener('change', this.handleRangeMaxChange.bind(this)); + this.minRangeInput.addEventListener('input', this.handleRangeMinInput.bind(this)); + this.maxRangeInput.addEventListener('input', this.handleRangeMaxInput.bind(this)); + } + + handleInputMinChange(event) { + event.preventDefault(); + event.target.value = Math.max( + Math.min(parseInt(event.target.value), parseInt(this.maxPriceInput.value || event.target.max) - 1), + event.target.min + ); + this.minRangeInput.value = event.target.value; + this.minRangeInput.parentElement.style.setProperty( + '--range-min', + `${(parseInt(this.minRangeInput.value) / parseInt(this.minRangeInput.max)) * 100}%` + ); + } + + handleInputMaxChange(event) { + event.preventDefault(); + event.target.value = Math.min( + Math.max(parseInt(event.target.value), parseInt(this.minPriceInput.value || event.target.min) + 1), + event.target.max + ); + this.maxRangeInput.value = event.target.value; + this.maxRangeInput.parentElement.style.setProperty( + '--range-max', + `${(parseInt(this.maxRangeInput.value) / parseInt(this.maxRangeInput.max)) * 100}%` + ); + } + + handleRangeMinChange(event) { + event.stopPropagation(); + this.minPriceInput.value = event.target.value; + this.minPriceInput.dispatchEvent(new Event('change', { bubbles: true })); + } + + handleRangeMaxChange(event) { + event.stopPropagation(); + this.maxPriceInput.value = event.target.value; + this.maxPriceInput.dispatchEvent(new Event('change', { bubbles: true })); + } + + handleRangeMinInput(event) { + event.target.value = Math.min( + parseInt(event.target.value), + parseInt(this.maxPriceInput.value || event.target.max) - 1 + ); + event.target.parentElement.style.setProperty( + '--range-min', + `${(parseInt(event.target.value) / parseInt(event.target.max)) * 100}%` + ); + this.minPriceInput.value = event.target.value; + } + + handleRangeMaxInput(event) { + event.target.value = Math.max( + parseInt(event.target.value), + parseInt(this.minPriceInput.value || event.target.min) + 1 + ); + event.target.parentElement.style.setProperty( + '--range-max', + `${(parseInt(event.target.value) / parseInt(event.target.max)) * 100}%` + ); + this.maxPriceInput.value = event.target.value; + } +} +customElements.define('price-range', PriceRange); + +class FacetForm extends HTMLFormElement { + constructor() { + super(); + + this.dirty = false; + this.cachedMap = new Map(); + + this.addEventListener('change', this.onFormChange); + this.addEventListener('submit', this.onFormSubmit); + } + + onFormChange() { + this.dirty = true; + this.dispatchEvent(new Event('submit', { cancelable: true })); + } + + onFormSubmit(event) { + event.preventDefault(); + if (!this.dirty) return; + + const url = this.buildUrl().toString(); + this.renderSection(url, event); + } + + buildUrl() { + const searchParams = new URLSearchParams(new FormData(this)); + const url = new URL(this.action); + + url.search = ''; + searchParams.forEach((value, key) => url.searchParams.append(key, value)); + + ['page', 'filter.v.price.gte', 'filter.v.price.lte'].forEach((item) => { + if (url.searchParams.get(item) === '') { + url.searchParams.delete(item); + } }); - if (updateURLHash) FacetFiltersForm.updateURLHash(searchParams); + url.searchParams.set('section_id', FoxTheme.utils.getSectionId(this)); + return url; } - static renderSectionFromFetch(url, event) { - fetch(url) - .then((response) => response.text()) - .then((responseText) => { - const html = responseText; - FacetFiltersForm.filterData = [...FacetFiltersForm.filterData, { html, url }]; - FacetFiltersForm.renderFilters(html, event); - FacetFiltersForm.renderProductGridContainer(html); - FacetFiltersForm.renderProductCount(html); - if (typeof initializeScrollAnimationTrigger === 'function') initializeScrollAnimationTrigger(html.innerHTML); + updateURLHash(url) { + const clonedUrl = new URL(url); + clonedUrl.searchParams.delete('section_id'); + history.replaceState({}, '', clonedUrl.toString()); + } + + beforeRenderSection() { + const container = document.getElementById('ProductGridContainer'); + const loadings = document.querySelectorAll('[data-facet-loading]'); + const translateY = FoxTheme.config.motionReduced ? 0 : 50; + + FoxTheme.Motion.timeline([[container, { y: translateY, opacity: 0 }, { duration: 0 }]]); + + setTimeout(() => { + const target = document.querySelector('.collection'); + window.scrollTo({ + top: target.getBoundingClientRect().top + window.scrollY - 200, + behavior: FoxTheme.config.motionReduced ? 'auto' : 'smooth', }); + if (loadings) { + loadings.forEach((loading) => { + loading.classList.add('btn--loading'); + }); + } + }, 100); } - static renderSectionFromCache(filterDataUrl, event) { - const html = FacetFiltersForm.filterData.find(filterDataUrl).html; - FacetFiltersForm.renderFilters(html, event); - FacetFiltersForm.renderProductGridContainer(html); - FacetFiltersForm.renderProductCount(html); - if (typeof initializeScrollAnimationTrigger === 'function') initializeScrollAnimationTrigger(html.innerHTML); + afterRenderSection() { + const container = document.getElementById('ProductGridContainer'); + const items = container.querySelectorAll('.product-card'); + const loadings = document.querySelectorAll('[data-facet-loading]'); + const translateY = FoxTheme.config.motionReduced ? 0 : 50; + + FoxTheme.Motion.timeline([ + [container, { y: [translateY, 0], opacity: [0, 1] }], + [ + items, + { y: [translateY, 0], opacity: [0, 1], visibility: ['hidden', 'visible'] }, + { duration: 0.5, delay: FoxTheme.config.motionReduced ? 0 : FoxTheme.Motion.stagger(0.1) }, + ], + ]); + + if (loadings) { + loadings.forEach((loading) => { + loading.classList.remove('btn--loading'); + }); + } + + document.dispatchEvent(new CustomEvent('collection:rerendered')); } - static renderProductGridContainer(html) { - document.getElementById('ProductGridContainer').innerHTML = new DOMParser() - .parseFromString(html, 'text/html') - .getElementById('ProductGridContainer').innerHTML; + renderSection(url, event) { + this.cachedMap.has(url) ? this.renderSectionFromCache(url, event) : this.renderSectionFromFetch(url, event); - document - .getElementById('ProductGridContainer') - .querySelectorAll('.scroll-trigger') - .forEach((element) => { - element.classList.add('scroll-trigger--cancel'); + if (this.hasAttribute('data-history')) this.updateURLHash(url); + + this.dirty = false; + } + + renderSectionFromFetch(url, event) { + this.beforeRenderSection(); + const start = performance.now(); + + fetch(url) + .then((response) => response.text()) + .then((responseText) => { + const execution = performance.now() - start; + + setTimeout( + () => { + this.renderFilters(responseText, event); + this.renderFiltersActive(responseText); + this.renderProductGridContainer(responseText); + this.renderFacetFiltersContainer(responseText); + this.renderProductCount(responseText); + this.renderSortBy(responseText); + this.renderSortByMobile(responseText); + + FoxTheme.pubsub.publish(FoxTheme.pubsub.PUB_SUB_EVENTS.facetUpdate, { responseText: responseText }); + this.cachedMap.set(url, responseText); + + this.afterRenderSection(); + }, + execution > 250 ? 0 : 250 + ); }); } - static renderProductCount(html) { - const count = new DOMParser().parseFromString(html, 'text/html').getElementById('ProductCount').innerHTML; - const container = document.getElementById('ProductCount'); - const containerDesktop = document.getElementById('ProductCountDesktop'); - container.innerHTML = count; - container.classList.remove('loading'); - if (containerDesktop) { - containerDesktop.innerHTML = count; - containerDesktop.classList.remove('loading'); - } - const loadingSpinners = document.querySelectorAll( - '.facets-container .loading__spinner, facet-filters-form .loading__spinner' - ); - loadingSpinners.forEach((spinner) => spinner.classList.add('hidden')); + renderSectionFromCache(url, event) { + this.beforeRenderSection(); + + setTimeout(() => { + const responseText = this.cachedMap.get(url); + this.renderFilters(responseText, event); + this.renderFiltersActive(responseText); + this.renderProductGridContainer(responseText); + this.renderFacetFiltersContainer(responseText); + this.renderProductCount(responseText); + this.renderSortBy(responseText); + this.renderSortByMobile(responseText); + + FoxTheme.pubsub.publish(FoxTheme.pubsub.PUB_SUB_EVENTS.facetUpdate, { responseText: responseText }); + + this.afterRenderSection(); + }, 250); } - static renderFilters(html, event) { - const parsedHTML = new DOMParser().parseFromString(html, 'text/html'); - const facetDetailsElementsFromFetch = parsedHTML.querySelectorAll( - '#FacetFiltersForm .js-filter, #FacetFiltersFormMobile .js-filter, #FacetFiltersPillsForm .js-filter' + renderFilters(responseText, event) { + const parsedHTML = new DOMParser().parseFromString(responseText, 'text/html'); + const facetElements = parsedHTML.querySelectorAll( + '#FacetFiltersContainer [data-filter], #MobileFacetFiltersContainer [data-filter], #DrawerFacetFiltersContainer [data-filter]' ); - const facetDetailsElementsFromDom = document.querySelectorAll( - '#FacetFiltersForm .js-filter, #FacetFiltersFormMobile .js-filter, #FacetFiltersPillsForm .js-filter' + + const facetElementsFormDom = document.querySelectorAll( + '#FacetFiltersContainer [data-filter], #MobileFacetFiltersContainer [data-filter], #DrawerFacetFiltersContainer [data-filter]' ); - // Remove facets that are no longer returned from the server - Array.from(facetDetailsElementsFromDom).forEach((currentElement) => { - if (!Array.from(facetDetailsElementsFromFetch).some(({ id }) => currentElement.id === id)) { - currentElement.remove(); + Array.from(facetElementsFormDom).forEach((currentElement) => { + if (!Array.from(facetElements).some(({ id }) => currentElement.id === id)) { + currentElement.classList.add('hidden'); } }); - const matchesId = (element) => { - const jsFilter = event ? event.target.closest('.js-filter') : undefined; - return jsFilter ? element.id === jsFilter.id : false; + const matchesIndex = (element) => { + const jsFilter = event ? event.target.closest('[data-filter]') : undefined; + return jsFilter ? element.dataset.index === jsFilter.dataset.index : false; }; - - const facetsToRender = Array.from(facetDetailsElementsFromFetch).filter((element) => !matchesId(element)); - const countsToRender = Array.from(facetDetailsElementsFromFetch).find(matchesId); - - facetsToRender.forEach((elementToRender, index) => { - const currentElement = document.getElementById(elementToRender.id); - // Element already rendered in the DOM so just update the innerHTML - if (currentElement) { - document.getElementById(elementToRender.id).innerHTML = elementToRender.innerHTML; - } else { - if (index > 0) { - const { className: previousElementClassName, id: previousElementId } = facetsToRender[index - 1]; - // Same facet type (eg horizontal/vertical or drawer/mobile) - if (elementToRender.className === previousElementClassName) { - document.getElementById(previousElementId).after(elementToRender); - return; - } - } - - if (elementToRender.parentElement) { - document.querySelector(`#${elementToRender.parentElement.id} .js-filter`).before(elementToRender); + const facetsToRender = Array.from(facetElements).filter((element) => !matchesIndex(element)); + + facetsToRender.forEach((element) => { + const filter = document.querySelector(`[data-filter][data-index="${element.dataset.index}"]`); + if (filter !== null) { + filter.classList.remove('hidden'); + if (filter.tagName === 'DETAILS') { + filter.querySelector('summary + *').innerHTML = element.querySelector('summary + *').innerHTML; + } else { + filter.innerHTML = element.innerHTML; } } }); + } - FacetFiltersForm.renderActiveFacets(parsedHTML); - FacetFiltersForm.renderAdditionalElements(parsedHTML); + renderFiltersActive(responseText) { + const id = 'FacetFiltersActive'; + if (document.getElementById(id) === null) return; + const parsedHTML = new DOMParser().parseFromString(responseText, 'text/html'); - if (countsToRender) { - const closestJSFilterID = event.target.closest('.js-filter').id; + document.getElementById(id).innerHTML = parsedHTML.getElementById(id) && parsedHTML.getElementById(id).innerHTML; + } - if (closestJSFilterID) { - FacetFiltersForm.renderCounts(countsToRender, event.target.closest('.js-filter')); - FacetFiltersForm.renderMobileCounts(countsToRender, document.getElementById(closestJSFilterID)); + renderProductGridContainer(responseText) { + const id = 'ProductGridContainer'; + if (document.getElementById(id) === null) return; + const parsedHTML = new DOMParser().parseFromString(responseText, 'text/html'); - const newFacetDetailsElement = document.getElementById(closestJSFilterID); - const newElementSelector = newFacetDetailsElement.classList.contains('mobile-facets__details') - ? `.mobile-facets__close-button` - : `.facets__summary`; - const newElementToActivate = newFacetDetailsElement.querySelector(newElementSelector); + document.getElementById(id).innerHTML = parsedHTML.getElementById(id) && parsedHTML.getElementById(id).innerHTML; - const isTextInput = event.target.getAttribute('type') === 'text'; + const layoutSwitcher = document.querySelector('layout-switcher'); + if (layoutSwitcher) layoutSwitcher.onButtonClick(layoutSwitcher.querySelector('.btn--active')); + } - if (newElementToActivate && !isTextInput) newElementToActivate.focus(); - } - } + renderFacetFiltersContainer(responseText) { + const id = 'FacetFiltersContainer'; + if (document.getElementById(id) === null) return; + const parsedHTML = new DOMParser().parseFromString(responseText, 'text/html'); + + document.getElementById(id).innerHTML = parsedHTML.getElementById(id) && parsedHTML.getElementById(id).innerHTML; } - static renderActiveFacets(html) { - const activeFacetElementSelectors = ['.active-facets-mobile', '.active-facets-desktop']; + renderProductCount(responseText) { + const id = 'ProductCount'; + if (document.getElementById(id) === null) return; + const parsedHTML = new DOMParser().parseFromString(responseText, 'text/html'); - activeFacetElementSelectors.forEach((selector) => { - const activeFacetsElement = html.querySelector(selector); - if (!activeFacetsElement) return; - document.querySelector(selector).innerHTML = activeFacetsElement.innerHTML; - }); + document.getElementById(id).innerHTML = parsedHTML.getElementById(id) && parsedHTML.getElementById(id).innerHTML; + } + + renderSortBy(responseText) { + const id = 'SortByContainer'; + if (document.getElementById(id) === null) return; + const parsedHTML = new DOMParser().parseFromString(responseText, 'text/html'); - FacetFiltersForm.toggleActiveFacets(false); + document.getElementById(id).innerHTML = parsedHTML.getElementById(id) && parsedHTML.getElementById(id).innerHTML; } - static renderAdditionalElements(html) { - const mobileElementSelectors = ['.mobile-facets__open', '.mobile-facets__count', '.sorting']; + renderSortByMobile(responseText) { + const id = 'SortByContainerMobile'; + if (document.getElementById(id) === null) return; + const parsedHTML = new DOMParser().parseFromString(responseText, 'text/html'); - mobileElementSelectors.forEach((selector) => { - if (!html.querySelector(selector)) return; - document.querySelector(selector).innerHTML = html.querySelector(selector).innerHTML; - }); + document.getElementById(id).innerHTML = parsedHTML.getElementById(id) && parsedHTML.getElementById(id).innerHTML; + } +} +customElements.define('facet-form', FacetForm, { extends: 'form' }); - document.getElementById('FacetFiltersFormMobile').closest('menu-drawer').bindEvents(); +class FacetRemove extends HTMLAnchorElement { + constructor() { + super(); + this.addEventListener('click', this.onClick); } - static renderCounts(source, target) { - const targetSummary = target.querySelector('.facets__summary'); - const sourceSummary = source.querySelector('.facets__summary'); + onClick(event) { + const form = this.closest('form[is="facet-form"]') || document.querySelector('form[is="facet-form"]'); - if (sourceSummary && targetSummary) { - targetSummary.outerHTML = sourceSummary.outerHTML; + if (form) { + event.preventDefault(); + + const url = new URL(this.href); + url.searchParams.set('section_id', FoxTheme.utils.getSectionId(form)); + form.renderSection(url.toString(), event); } + } +} +customElements.define('facet-remove', FacetRemove, { extends: 'a' }); + +class FacetCount extends HTMLElement { + constructor() { + super(); + } - const targetHeaderElement = target.querySelector('.facets__header'); - const sourceHeaderElement = source.querySelector('.facets__header'); + facetUpdateUnsubscriber = undefined; - if (sourceHeaderElement && targetHeaderElement) { - targetHeaderElement.outerHTML = sourceHeaderElement.outerHTML; + connectedCallback() { + this.facetUpdateUnsubscriber = FoxTheme.pubsub.subscribe( + FoxTheme.pubsub.PUB_SUB_EVENTS.facetUpdate, + this.onFacetUpdate.bind(this) + ); + } + + disconnectedCallback() { + if (this.facetUpdateUnsubscriber) { + this.facetUpdateUnsubscriber(); } + } - const targetWrapElement = target.querySelector('.facets-wrap'); - const sourceWrapElement = source.querySelector('.facets-wrap'); + get itemCount() { + return parseInt(this.innerText.replace(/\D/g, '')); + } - if (sourceWrapElement && targetWrapElement) { - const isShowingMore = Boolean(target.querySelector('show-more-button .label-show-more.hidden')); - if (isShowingMore) { - sourceWrapElement - .querySelectorAll('.facets__item.hidden') - .forEach((hiddenItem) => hiddenItem.classList.replace('hidden', 'show-more-item')); - } + onFacetUpdate(event) { + const parsedHTML = new DOMParser().parseFromString(event.responseText, 'text/html'); + const facetCount = parsedHTML.querySelector('facet-count'); + this.innerText = facetCount && facetCount.innerHTML; + this.hidden = this.itemCount === 0; + } +} +customElements.define('facet-count', FacetCount); - targetWrapElement.outerHTML = sourceWrapElement.outerHTML; - } +class FacetToggler extends HTMLButtonElement { + constructor() { + super(); + this.onClickHandler = this.onClick.bind(this); } - static renderMobileCounts(source, target) { - const targetFacetsList = target.querySelector('.mobile-facets__list'); - const sourceFacetsList = source.querySelector('.mobile-facets__list'); + connectedCallback() { + this.facetEl = document.getElementById('FacetFiltersContainer'); + this.addEventListener('click', this.onClickHandler); + } + + disconnectedCallback() { + this.removeEventListener('click', this.onClickHandler); + } - if (sourceFacetsList && targetFacetsList) { - targetFacetsList.outerHTML = sourceFacetsList.outerHTML; + onClick(evt) { + evt.preventDefault(); + + if (this.facetEl.classList.contains('xl:block')) { + this.facetEl.classList.remove('xl:block'); + } else { + this.facetEl.classList.add('xl:block'); } } +} +customElements.define('facet-toggler', FacetToggler, { extends: 'button' }); - static updateURLHash(searchParams) { - history.pushState({ searchParams }, '', `${window.location.pathname}${searchParams && '?'.concat(searchParams)}`); +class LoadMoreButton extends HTMLButtonElement { + constructor() { + super(); + this.onClickHandler = this.onClick.bind(this); } - static getSections() { - return [ - { - section: document.getElementById('product-grid').dataset.id, - }, - ]; + connectedCallback() { + this.addEventListener('click', this.onClickHandler); + + if (this.getAttribute('type') == 'infinite') { + FoxTheme.Motion.inView(this, this.onClickHandler, { margin: '200px 0px 200px 0px' }); + } } - createSearchParams(form) { - const formData = new FormData(form); - return new URLSearchParams(formData).toString(); + disconnectedCallback() { + this.removeEventListener('click', this.onClickHandler); } - onSubmitForm(searchParams, event) { - FacetFiltersForm.renderPage(searchParams, event); + onClick() { + if (this.classList.contains('btn--loading')) return; + this.loadingState(); + + const url = this.setUrl().toString(); + + fetch(url) + .then((response) => response.text()) + .then((responseText) => { + this.renderPagination(responseText); + this.renderProductGridContainer(responseText); + }); } - onSubmitHandler(event) { - event.preventDefault(); - const sortFilterForms = document.querySelectorAll('facet-filters-form form'); - if (event.srcElement.className == 'mobile-facets__checkbox') { - const searchParams = this.createSearchParams(event.target.closest('form')); - this.onSubmitForm(searchParams, event); + renderPagination(responseText) { + const productGridContainer = document.getElementById('ProductGridContainer'); + if (productGridContainer === null) return; + + const parsedHTML = new DOMParser().parseFromString(responseText, 'text/html'); + const pagination = productGridContainer.querySelector('.pagination'); + const source = parsedHTML.querySelector('.pagination'); + + if (source) { + pagination.innerHTML = source.innerHTML; } else { - const forms = []; - const isMobile = event.target.closest('form').id === 'FacetFiltersFormMobile'; + pagination.remove(); + } + } - sortFilterForms.forEach((form) => { - if (!isMobile) { - if (form.id === 'FacetSortForm' || form.id === 'FacetFiltersForm' || form.id === 'FacetSortDrawerForm') { - forms.push(this.createSearchParams(form)); - } - } else if (form.id === 'FacetFiltersFormMobile') { - forms.push(this.createSearchParams(form)); - } + renderProductGridContainer(responseText) { + const productGridContainer = document.getElementById('ProductGridContainer'); + if (productGridContainer === null) return; + + const parsedHTML = new DOMParser().parseFromString(responseText, 'text/html'); + const productList = productGridContainer.querySelector('.products-list'); + const source = parsedHTML.querySelector('.products-list'); + + if (source && productList) { + source.querySelectorAll('.f-column').forEach((item) => { + productList.appendChild(item); }); - this.onSubmitForm(forms.join('&'), event); } } - onActiveFilterClick(event) { - event.preventDefault(); - FacetFiltersForm.toggleActiveFacets(); - const url = - event.currentTarget.href.indexOf('?') == -1 - ? '' - : event.currentTarget.href.slice(event.currentTarget.href.indexOf('?') + 1); - FacetFiltersForm.renderPage(url); + setUrl() { + const url = new URL(this.getAttribute('action')); + url.searchParams.set('section_id', FoxTheme.utils.getSectionId(this)); + return url; } -} -FacetFiltersForm.filterData = []; -FacetFiltersForm.searchParamsInitial = window.location.search.slice(1); -FacetFiltersForm.searchParamsPrev = window.location.search.slice(1); -customElements.define('facet-filters-form', FacetFiltersForm); -FacetFiltersForm.setListeners(); + loadingState() { + this.classList.add('pointer-events-none'); + this.classList.add('btn--loading'); + } +} +customElements.define('load-more-button', LoadMoreButton, { extends: 'button' }); -class PriceRange extends HTMLElement { +class LayoutSwitcher extends HTMLElement { constructor() { super(); - this.querySelectorAll('input').forEach((element) => { - element.addEventListener('change', this.onRangeChange.bind(this)); - element.addEventListener('keydown', this.onKeyDown.bind(this)); + this.cookieName = 'hypertheme:collection-layout'; + + this.initLayoutMode(); + this.buttons.forEach((button) => { + button.addEventListener('click', this.onButtonClick.bind(this)); }); - this.setMinAndMaxValues(); } - onRangeChange(event) { - this.adjustToValidValues(event.currentTarget); - this.setMinAndMaxValues(); + get buttons() { + return this.querySelectorAll('button'); } - onKeyDown(event) { - if (event.metaKey) return; - - const pattern = /[0-9]|\.|,|'| |Tab|Backspace|Enter|ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Delete|Escape/; - if (!event.key.match(pattern)) event.preventDefault(); + /** + * @param {event|element} evt + */ + onButtonClick(evt) { + const target = evt.currentTarget ? evt.currentTarget : evt; + this.changeLayout(target, target.dataset.layoutMode); } - setMinAndMaxValues() { - const inputs = this.querySelectorAll('input'); - const minInput = inputs[0]; - const maxInput = inputs[1]; - if (maxInput.value) minInput.setAttribute('data-max', maxInput.value); - if (minInput.value) maxInput.setAttribute('data-min', minInput.value); - if (minInput.value === '') maxInput.setAttribute('data-min', 0); - if (maxInput.value === '') minInput.setAttribute('data-max', maxInput.getAttribute('data-max')); - } + initLayoutMode() { + if (FoxTheme.config.hasLocalStorage) { + const layoutMode = window.localStorage.getItem(this.cookieName); - adjustToValidValues(input) { - const value = Number(input.value); - const min = Number(input.getAttribute('data-min')); - const max = Number(input.getAttribute('data-max')); - - if (value < min) input.value = min; - if (value > max) input.value = max; + if (layoutMode !== null) { + const target = this.querySelector(`button[data-layout-mode="${layoutMode}"]`); + if (target) { + this.changeLayout(target, layoutMode); + } + } + } } -} -customElements.define('price-range', PriceRange); + changeLayout(target, layoutMode) { + const productGrid = document.getElementById('ProductsList'); + if (!productGrid) return; + + productGrid.dataset.layout = layoutMode; + + const { gridClass, listClass } = productGrid.dataset; + if ((gridClass || listClass) && gridClass !== listClass) { + const productCards = productGrid.querySelectorAll('.product-card'); + productCards && + productCards.forEach((card) => { + if ('grid' === layoutMode) { + listClass && card.classList.remove(listClass); + gridClass && card.classList.add(gridClass); + } else { + gridClass && card.classList.remove(gridClass); + listClass && card.classList.add(listClass); + } + }); + } -class FacetRemove extends HTMLElement { - constructor() { - super(); - const facetLink = this.querySelector('a'); - facetLink.setAttribute('role', 'button'); - facetLink.addEventListener('click', this.closeFilter.bind(this)); - facetLink.addEventListener('keyup', (event) => { - event.preventDefault(); - if (event.code.toUpperCase() === 'SPACE') this.closeFilter(event); + this.buttons.forEach((button) => { + button.classList.remove('btn--active'); }); - } + target.classList.add('btn--active'); - closeFilter(event) { - event.preventDefault(); - const form = this.closest('facet-filters-form') || document.querySelector('facet-filters-form'); - form.onActiveFilterClick(event); + if (FoxTheme.config.hasLocalStorage) { + window.localStorage.setItem(this.cookieName, layoutMode); + } } } - -customElements.define('facet-remove', FacetRemove); +customElements.define('layout-switcher', LayoutSwitcher); diff --git a/assets/favorite-products.js b/assets/favorite-products.js new file mode 100644 index 00000000000..ee33ef771ae --- /dev/null +++ b/assets/favorite-products.js @@ -0,0 +1,180 @@ +if (!customElements.get('favorite-products')) { + customElements.define( + 'favorite-products', + class FavoriteProducts extends HTMLElement { + constructor() { + super(); + } + + connectedCallback() { + this.enableSlider = this.dataset.enableSlider === 'true'; + + this.sectionId = this.dataset.sectionId; + this.testimonialsWrapper = this.querySelector('.favorite-products__testimonials'); + this.productWrapper = this.querySelector('.favorite-products__products'); + this.mediaWrapper = this.querySelector('.favorite-products__media'); + + this.TestimonialSlider = false; + this.ProductSlider = false; + this.MediaSlider = false; + + if (!this.enableSlider) return; + + this.initSlider(); + } + + get layout() { + return this.dataset.layout; + } + + get paginationType() { + return this.dataset.paginationType; + } + + get paginationTypeMobile() { + return this.dataset.paginationTypeMobile; + } + + initSlider() { + this.currentPaginationType = this.paginationType; + this.initProductSlider(); + this.initMediaSlider(); + this.initTestimonialSlider(); + + this.TestimonialSlider.slider.on('slideChange', (swiper) => { + const { slides, activeIndex } = swiper; + const currentSlide = slides[activeIndex]; + + this.refreshAnimation(this.ProductSlider.slider.slides[activeIndex]); + this.refreshAnimation(this.MediaSlider.slider.slides[activeIndex]); + this.updateControlsScheme(currentSlide); + + this.ProductSlider.slider.slideTo(activeIndex); + }); + + this.ProductSlider.slider.on('slideChange', (swiper) => { + const { activeIndex } = swiper; + this.MediaSlider.slider.slideTo(activeIndex); + }); + + this.MediaSlider.slider.on('slideChange', (swiper) => { + const { activeIndex } = swiper; + this.TestimonialSlider.slider.slideTo(activeIndex); + }); + + if (Shopify.designMode) { + document.addEventListener('shopify:block:select', (e) => { + if (e.detail.sectionId != this.sectionId) return; + let { target } = e; + const index = Number(target.dataset.index); + + this.TestimonialSlider.slider.slideTo(index); + }); + } + + this.fixQuickviewDuplicate(); + } + + initProductSlider() { + const additionModules = [FoxTheme.Swiper.EffectFade]; + const sliderOptions = { + slidesPerView: 1, + loop: false, + threshold: 2, + }; + + if (this.layout === 'content-left') { + sliderOptions.effect = 'fade'; + sliderOptions.fadeEffect = { + crossFade: true, + } + sliderOptions.autoHeight = true; + } + + this.ProductSlider = new window.FoxTheme.Carousel(this.productWrapper, sliderOptions, additionModules); + this.ProductSlider.init(); + } + + initMediaSlider() { + const sliderOptions = { + slidesPerView: 1, + loop: false, + threshold: 2, + allowTouchMove: false, + }; + + this.MediaSlider = new window.FoxTheme.Carousel(this.mediaWrapper.querySelector('.swiper'), sliderOptions); + this.MediaSlider.init(); + } + + initTestimonialSlider() { + const sliderOptions = { + slidesPerView: 1, + navigation: { + nextEl: this.querySelector('.swiper-button-next'), + prevEl: this.querySelector('.swiper-button-prev'), + }, + pagination: { + el: this.querySelector('.swiper-pagination'), + clickable: true, + type: this.paginationTypeMobile + }, + loop: false, + threshold: 2, + on: { + init: this.handleAfterInit.bind(this), + }, + }; + + this.TestimonialSlider = new window.FoxTheme.Carousel( + this.testimonialsWrapper.querySelector('.swiper'), + sliderOptions + ); + this.TestimonialSlider.init(); + } + + updateControlsScheme(activeSlide) { + if (this.testimonialsWrapper) { + const classesToRemove = Array.from(this.testimonialsWrapper.classList).filter((className) => + className.startsWith('color-') + ); + classesToRemove.forEach((className) => this.testimonialsWrapper.classList.remove(className)); + const colorScheme = activeSlide.dataset.colorScheme; + this.testimonialsWrapper.classList.add(colorScheme); + } + } + + handleAfterInit() { + // Fix active bullet not transition on the first time. + const activeBullet = this.querySelector('.swiper-pagination-bullet-active'); + + if (activeBullet) { + activeBullet.classList.remove('swiper-pagination-bullet-active'); + activeBullet.offsetHeight; // Trigger reflow. + activeBullet.classList.add('swiper-pagination-bullet-active'); + } + } + + refreshAnimation(activeSlide) { + if (!activeSlide) return; + activeSlide.querySelectorAll('motion-element').forEach((motionEl) => { + setTimeout(() => { + motionEl && motionEl.refreshAnimation(); + }); + }); + } + + fixQuickviewDuplicate() { + let modalIds = []; + Array.from(this.querySelectorAll('quick-view-modal')).forEach((modal) => { + const modalID = modal.getAttribute('id'); + if (modalIds.includes(modalID)) { + modal.remove(); + } else { + modalIds.push(modalID); + } + }); + } + } + ); +} diff --git a/assets/featured-collection.js b/assets/featured-collection.js new file mode 100644 index 00000000000..0c318c44513 --- /dev/null +++ b/assets/featured-collection.js @@ -0,0 +1,137 @@ +if (!customElements.get('featured-collection')) { + customElements.define( + 'featured-collection', + class FeaturedCollection extends HTMLElement { + constructor() { + super(); + } + + connectedCallback() { + this.selectors = { + sliderWrapper: '.featured-collection__items', + nextEl: '.swiper-button-next', + prevEl: '.swiper-button-prev', + pagination: '.swiper-pagination', + }; + this.classes = { + grid: 'f-grid', + swiper: 'swiper', + swiperWrapper: 'swiper-wrapper', + }; + + this.blockId = this.dataset.blockId; + this.block = this.closest(`[data-id="${this.blockId}"`); + this.sliderWrapper = this.querySelector(this.selectors.sliderWrapper); + + this.enableSlider = this.dataset.enableSlider === 'true'; + this.items = parseInt(this.dataset.items); + this.tabletItems = parseInt(this.dataset.tabletItems); + this.laptopItems = parseInt(this.dataset.laptopItems); + this.paginationType = this.dataset.paginationType || 'bullets'; + + this.sliderInstance = false; + + if (!this.enableSlider) return; + + const mql = window.matchMedia(FoxTheme.config.mediaQueryMobile); + mql.onchange = this.init.bind(this); + this.init(); + } + + init() { + if (FoxTheme.config.mqlMobile) { + this.destroySlider(); + } else { + this.initSlider(); + } + } + + initSlider() { + if (typeof this.sliderInstance === 'object') return; + const columnGap = window.getComputedStyle(this.sliderWrapper).getPropertyValue('--f-column-gap'); + const spaceBetween = parseFloat(columnGap.replace('rem', '')) * 10; + + this.sliderOptions = { + slidesPerView: 2, + spaceBetween: spaceBetween, + navigation: { + nextEl: this.block.querySelector(this.selectors.nextEl), + prevEl: this.block.querySelector(this.selectors.prevEl), + }, + pagination: { + el: this.block.querySelector(this.selectors.pagination), + type: this.paginationType, + }, + breakpoints: { + 768: { + slidesPerView: this.tabletItems, + }, + 1024: { + slidesPerView: this.laptopItems, + }, + 1280: { + slidesPerView: this.items, + }, + }, + loop: false, + threshold: 2, + watchSlidesProgress: true, + mousewheel: { + enabled: true, + forceToAxis: true, + }, + }; + + this.classList.add(this.classes.swiper); + this.sliderWrapper.classList.remove(this.classes.grid); + this.sliderWrapper.classList.add(this.classes.swiperWrapper); + + this.sliderInstance = new window.FoxTheme.Carousel(this, this.sliderOptions, [FoxTheme.Swiper.Mousewheel]); + this.sliderInstance.init(); + + // const focusableElements = FoxTheme.a11y.getFocusableElements(this); + + // focusableElements.forEach((element) => { + // element.addEventListener('focusin', () => { + // const slide = element.closest('.swiper-slide'); + // this.sliderInstance && this.sliderInstance.slider.slideTo(this.sliderInstance.slider.slides.indexOf(slide)); + // }); + // }); + + this.calcNavButtonsPosition(); + this.fixQuickviewDuplicate(); + } + + destroySlider() { + this.classList.remove(this.classes.swiper); + this.sliderWrapper.classList.remove(this.classes.swiperWrapper); + this.sliderWrapper.classList.add(this.classes.grid); + if (typeof this.sliderInstance !== 'object') return; + this.sliderInstance.slider.destroy(); + this.sliderInstance = false; + } + + fixQuickviewDuplicate() { + let modalIds = []; + Array.from(this.querySelectorAll('quick-view-modal')).forEach((modal) => { + const modalID = modal.getAttribute('id'); + if (modalIds.includes(modalID)) { + modal.remove(); + } else { + modalIds.push(modalID); + } + }); + } + + calcNavButtonsPosition() { + if (this.dataset.navigationPosition !== 'center_image') return; + + const firstMedia = this.querySelector('.product-card__image-wrapper'); + const controls = this.block.querySelector('.swiper-controls'); + if (controls && firstMedia && firstMedia.clientHeight > 0) { + controls.style.setProperty('--swiper-navigation-top-offset', parseInt(firstMedia.clientHeight) / 2 + 'px'); + } + } + } + ); +} diff --git a/assets/footer.js b/assets/footer.js new file mode 100644 index 00000000000..7fa771428ee --- /dev/null +++ b/assets/footer.js @@ -0,0 +1,28 @@ +if (!customElements.get("footer-details")) { + class FooterDetails extends AccordionDetails { + constructor() { + super(); + } + + connectedCallback() { + this.openDefault = this.dataset.openDefault === 'true'; + + if (FoxTheme.config.mqlTablet) { + if (!this.openDefault) this.open = false; + } + + document.addEventListener('matchTablet', () => { + if (!this.openDefault) { + this.open = false; + } else { + this.open = true; + } + }); + + document.addEventListener('unmatchTablet', () => { + this.open = true; + }); + } + } + customElements.define('footer-details', FooterDetails, { extends: 'details' }); +} \ No newline at end of file diff --git a/assets/gift-wrapping.js b/assets/gift-wrapping.js new file mode 100644 index 00000000000..2cf6d93f7e5 --- /dev/null +++ b/assets/gift-wrapping.js @@ -0,0 +1,121 @@ +class GiftWrapping extends HTMLElement { + constructor() { + super(); + + this.giftWrapProductId = this.dataset.giftWrapId; + this.isGiftWrappingEnabled = this.dataset.giftWrapping; + this.cartItemCount = parseInt(this.getAttribute('cart-items-size')); + this.giftWrapItemCount = parseInt(this.getAttribute('gift-wraps-in-cart')); + this.totalItemCount = parseInt(this.getAttribute('items-in-cart')); + this.giftWrapMode = this.dataset.giftWrappingLimit; + } + + connectedCallback() { + this.initializeGiftWrapCheckbox(); + this.handleInitialGiftWrapState(); + } + + initializeGiftWrapCheckbox() { + this.querySelector('[name="attributes[gift-wrapping]"]').addEventListener('change', (event) => { + event.target.checked ? this.addGiftWrap() : this.removeGiftWrap(); + }); + } + + handleInitialGiftWrapState() { + if (this.cartItemCount == 1 && this.giftWrapItemCount > 0) { + return this.removeGiftWrap(); + } + if (this.giftWrapItemCount > 0 && this.isGiftWrappingEnabled.length == 0) { + return this.addGiftWrap(); + } + if (this.giftWrapItemCount == 0 && this.isGiftWrappingEnabled.length > 0) { + return this.addGiftWrap(); + } + } + + addGiftWrap() { + this.showLoader(); + const sectionsToUpdate = this.getSectionsToUpdate(); + const requestBody = this.createRequestBody( + { + [this.giftWrapProductId]: 1, + }, + { 'gift-wrapping': true }, + sectionsToUpdate + ); + this.updateCart(requestBody); + } + + removeGiftWrap() { + this.showLoader(); + const sectionsToUpdate = this.getSectionsToUpdate(); + const requestBody = this.createRequestBody( + { + [this.giftWrapProductId]: 0, + }, + { 'gift-wrapping': '', 'gift-note': '' }, + sectionsToUpdate + ); + this.updateCart(requestBody); + } + + getSectionsToUpdate() { + let sections = []; + document.documentElement.dispatchEvent( + new CustomEvent('cart:grouped-sections', { bubbles: true, detail: { sections } }) + ); + return sections; + } + + createRequestBody(updates, attributes, sections) { + return JSON.stringify({ updates, attributes, sections }); + } + + updateCart(body) { + fetch(`${FoxTheme.routes.cart_update_url}`, { ...FoxTheme.utils.fetchConfig(), ...{ body } }) + .then((response) => response.json()) + .then((parsedState) => { + FoxTheme.pubsub.publish(FoxTheme.pubsub.PUB_SUB_EVENTS.cartUpdate, { cart: parsedState }); + }) + .catch((error) => { + console.error('Error updating cart:', error); + }); + } + + showLoader() { + const loaderElement = this.querySelector('.loader'); + if (loaderElement) loaderElement.classList.add('btn--loading'); + } +} +customElements.define('gift-wrapping', GiftWrapping); + +class GiftNote extends HTMLElement { + constructor() { + super(); + + this.addEventListener('change', FoxTheme.utils.debounce(this.updateGiftNote.bind(this), 300)); + } + + updateGiftNote(event) { + const requestBody = JSON.stringify({ attributes: { 'gift-note': event.target.value } }); + fetch(`${FoxTheme.routes.cart_update_url}`, { ...FoxTheme.utils.fetchConfig(), ...{ body: requestBody } }); + } +} +customElements.define('gift-note', GiftNote); + +class RemoveGiftWrapButton extends HTMLAnchorElement { + constructor() { + super(); + + this.addEventListener('click', (event) => { + event.preventDefault(); + + const cartItemsElement = this.closest('cart-items'); + cartItemsElement.showLoader(this.dataset.index); + + const giftWrappingElement = document.querySelector('gift-wrapping'); + giftWrappingElement.removeGiftWrap(); + }); + } +} +customElements.define('gift-wrap-remove-item', RemoveGiftWrapButton, { extends: 'a' }); diff --git a/assets/giftcard.css b/assets/giftcard.css new file mode 100644 index 00000000000..c4396f07be4 --- /dev/null +++ b/assets/giftcard.css @@ -0,0 +1,89 @@ +.gift-card { + padding: 6rem 1.5rem; + text-align: center; +} +.gift-card__image-wrapper { + margin: 2.4rem auto; + max-width: 26rem; +} +.gift-card__image { + max-width: 100%; + height: auto; + object-fit: scale-down; + max-height: 18rem; +} +@media (max-width: 767.98px) { + .gift-card__image .gift-card__image { + padding: 0; + } +} +.gift-card__price { + display: flex; + flex-wrap: wrap; + gap: 0rem 1rem; + align-items: center; + justify-content: center; +} +.gift-card__price h1 { + margin: 0; +} +.gift-card__text-wrapper { + max-width: 30rem; + margin: 0.8rem auto 0; +} +.gift-card__text { + margin: 0; +} +.gift-card__qr-code-wrap { + margin: 3.2rem 0; + border: 1px solid rgba(var(--color-border), var(--color-border-alpha, 1)); + padding: 1.2rem; + background-color: rgb(var(--color-secondary-background)); +} +.gift-card__qr-code { + padding: 1.5rem; +} +.gift-card__qr-code img { + margin: 0 auto; +} +.gift-card__apple-wallet { + line-height: 0; + display: block; + margin-bottom: 2.4rem; + text-align: center; +} +.gift-card__buttons { + width: 30rem; + max-width: 100%; + margin-inline: auto; +} +@media (max-width: 767.98px) { + .gift-card { + padding: 4.8rem 1.5rem; + } +} + +.badge { + border: 1px solid transparent; + border-radius: 4rem; + display: inline-block; + font-size: 1.2rem; + letter-spacing: 0.1rem; + line-height: 1; + padding: 0.6rem 1.3rem; + text-align: center; + background-color: rgb(var(--color-background)); + border-color: rgba(var(--color-foreground), 0.04); + color: rgb(var(--color-foreground)); +} +.badge--expired { + background-color: rgb(var(--color-soldout-badge)); + color: rgb(var(--color-soldout-badge-label)); + border-color: rgba(var(--color-soldout-badge-label), 0.04); +} + +@media print { + .no-print { + display: none; + } +} diff --git a/assets/global.js b/assets/global.js deleted file mode 100644 index 4adf04def10..00000000000 --- a/assets/global.js +++ /dev/null @@ -1,1332 +0,0 @@ -function getFocusableElements(container) { - return Array.from( - container.querySelectorAll( - "summary, a[href], button:enabled, [tabindex]:not([tabindex^='-']), [draggable], area, input:not([type=hidden]):enabled, select:enabled, textarea:enabled, object, iframe" - ) - ); -} - -class SectionId { - static #separator = '__'; - - // for a qualified section id (e.g. 'template--22224696705326__main'), return just the section id (e.g. 'template--22224696705326') - static parseId(qualifiedSectionId) { - return qualifiedSectionId.split(SectionId.#separator)[0]; - } - - // for a qualified section id (e.g. 'template--22224696705326__main'), return just the section name (e.g. 'main') - static parseSectionName(qualifiedSectionId) { - return qualifiedSectionId.split(SectionId.#separator)[1]; - } - - // for a section id (e.g. 'template--22224696705326') and a section name (e.g. 'recommended-products'), return a qualified section id (e.g. 'template--22224696705326__recommended-products') - static getIdForSection(sectionId, sectionName) { - return `${sectionId}${SectionId.#separator}${sectionName}`; - } -} - -class HTMLUpdateUtility { - /** - * Used to swap an HTML node with a new node. - * The new node is inserted as a previous sibling to the old node, the old node is hidden, and then the old node is removed. - * - * The function currently uses a double buffer approach, but this should be replaced by a view transition once it is more widely supported https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API - */ - static viewTransition(oldNode, newContent, preProcessCallbacks = [], postProcessCallbacks = []) { - preProcessCallbacks?.forEach((callback) => callback(newContent)); - - const newNodeWrapper = document.createElement('div'); - HTMLUpdateUtility.setInnerHTML(newNodeWrapper, newContent.outerHTML); - const newNode = newNodeWrapper.firstChild; - - // dedupe IDs - const uniqueKey = Date.now(); - oldNode.querySelectorAll('[id], [form]').forEach((element) => { - element.id && (element.id = `${element.id}-${uniqueKey}`); - element.form && element.setAttribute('form', `${element.form.getAttribute('id')}-${uniqueKey}`); - }); - - oldNode.parentNode.insertBefore(newNode, oldNode); - oldNode.style.display = 'none'; - - postProcessCallbacks?.forEach((callback) => callback(newNode)); - - setTimeout(() => oldNode.remove(), 500); - } - - // Sets inner HTML and reinjects the script tags to allow execution. By default, scripts are disabled when using element.innerHTML. - static setInnerHTML(element, html) { - element.innerHTML = html; - element.querySelectorAll('script').forEach((oldScriptTag) => { - const newScriptTag = document.createElement('script'); - Array.from(oldScriptTag.attributes).forEach((attribute) => { - newScriptTag.setAttribute(attribute.name, attribute.value); - }); - newScriptTag.appendChild(document.createTextNode(oldScriptTag.innerHTML)); - oldScriptTag.parentNode.replaceChild(newScriptTag, oldScriptTag); - }); - } -} - -document.querySelectorAll('[id^="Details-"] summary').forEach((summary) => { - summary.setAttribute('role', 'button'); - summary.setAttribute('aria-expanded', summary.parentNode.hasAttribute('open')); - - if (summary.nextElementSibling.getAttribute('id')) { - summary.setAttribute('aria-controls', summary.nextElementSibling.id); - } - - summary.addEventListener('click', (event) => { - event.currentTarget.setAttribute('aria-expanded', !event.currentTarget.closest('details').hasAttribute('open')); - }); - - if (summary.closest('header-drawer, menu-drawer')) return; - summary.parentElement.addEventListener('keyup', onKeyUpEscape); -}); - -const trapFocusHandlers = {}; - -function trapFocus(container, elementToFocus = container) { - var elements = getFocusableElements(container); - var first = elements[0]; - var last = elements[elements.length - 1]; - - removeTrapFocus(); - - trapFocusHandlers.focusin = (event) => { - if (event.target !== container && event.target !== last && event.target !== first) return; - - document.addEventListener('keydown', trapFocusHandlers.keydown); - }; - - trapFocusHandlers.focusout = function () { - document.removeEventListener('keydown', trapFocusHandlers.keydown); - }; - - trapFocusHandlers.keydown = function (event) { - if (event.code.toUpperCase() !== 'TAB') return; // If not TAB key - // On the last focusable element and tab forward, focus the first element. - if (event.target === last && !event.shiftKey) { - event.preventDefault(); - first.focus(); - } - - // On the first focusable element and tab backward, focus the last element. - if ((event.target === container || event.target === first) && event.shiftKey) { - event.preventDefault(); - last.focus(); - } - }; - - document.addEventListener('focusout', trapFocusHandlers.focusout); - document.addEventListener('focusin', trapFocusHandlers.focusin); - - elementToFocus.focus(); - - if ( - elementToFocus.tagName === 'INPUT' && - ['search', 'text', 'email', 'url'].includes(elementToFocus.type) && - elementToFocus.value - ) { - elementToFocus.setSelectionRange(0, elementToFocus.value.length); - } -} - -// Here run the querySelector to figure out if the browser supports :focus-visible or not and run code based on it. -try { - document.querySelector(':focus-visible'); -} catch (e) { - focusVisiblePolyfill(); -} - -function focusVisiblePolyfill() { - const navKeys = [ - 'ARROWUP', - 'ARROWDOWN', - 'ARROWLEFT', - 'ARROWRIGHT', - 'TAB', - 'ENTER', - 'SPACE', - 'ESCAPE', - 'HOME', - 'END', - 'PAGEUP', - 'PAGEDOWN', - ]; - let currentFocusedElement = null; - let mouseClick = null; - - window.addEventListener('keydown', (event) => { - if (navKeys.includes(event.code.toUpperCase())) { - mouseClick = false; - } - }); - - window.addEventListener('mousedown', (event) => { - mouseClick = true; - }); - - window.addEventListener( - 'focus', - () => { - if (currentFocusedElement) currentFocusedElement.classList.remove('focused'); - - if (mouseClick) return; - - currentFocusedElement = document.activeElement; - currentFocusedElement.classList.add('focused'); - }, - true - ); -} - -function pauseAllMedia() { - document.querySelectorAll('.js-youtube').forEach((video) => { - video.contentWindow.postMessage('{"event":"command","func":"' + 'pauseVideo' + '","args":""}', '*'); - }); - document.querySelectorAll('.js-vimeo').forEach((video) => { - video.contentWindow.postMessage('{"method":"pause"}', '*'); - }); - document.querySelectorAll('video').forEach((video) => video.pause()); - document.querySelectorAll('product-model').forEach((model) => { - if (model.modelViewerUI) model.modelViewerUI.pause(); - }); -} - -function removeTrapFocus(elementToFocus = null) { - document.removeEventListener('focusin', trapFocusHandlers.focusin); - document.removeEventListener('focusout', trapFocusHandlers.focusout); - document.removeEventListener('keydown', trapFocusHandlers.keydown); - - if (elementToFocus) elementToFocus.focus(); -} - -function onKeyUpEscape(event) { - if (event.code.toUpperCase() !== 'ESCAPE') return; - - const openDetailsElement = event.target.closest('details[open]'); - if (!openDetailsElement) return; - - const summaryElement = openDetailsElement.querySelector('summary'); - openDetailsElement.removeAttribute('open'); - summaryElement.setAttribute('aria-expanded', false); - summaryElement.focus(); -} - -class QuantityInput extends HTMLElement { - constructor() { - super(); - this.input = this.querySelector('input'); - this.changeEvent = new Event('change', { bubbles: true }); - this.input.addEventListener('change', this.onInputChange.bind(this)); - this.querySelectorAll('button').forEach((button) => - button.addEventListener('click', this.onButtonClick.bind(this)) - ); - } - - quantityUpdateUnsubscriber = undefined; - - connectedCallback() { - this.validateQtyRules(); - this.quantityUpdateUnsubscriber = subscribe(PUB_SUB_EVENTS.quantityUpdate, this.validateQtyRules.bind(this)); - } - - disconnectedCallback() { - if (this.quantityUpdateUnsubscriber) { - this.quantityUpdateUnsubscriber(); - } - } - - onInputChange(event) { - this.validateQtyRules(); - } - - onButtonClick(event) { - event.preventDefault(); - const previousValue = this.input.value; - - if (event.target.name === 'plus') { - 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(); - } - } else { - this.input.stepDown(); - } - - if (previousValue !== this.input.value) this.input.dispatchEvent(this.changeEvent); - - if (this.input.dataset.min === previousValue && event.target.name === 'minus') { - this.input.value = parseInt(this.input.min); - } - } - - validateQtyRules() { - const value = parseInt(this.input.value); - if (this.input.min) { - const buttonMinus = this.querySelector(".quantity__button[name='minus']"); - buttonMinus.classList.toggle('disabled', parseInt(value) <= parseInt(this.input.min)); - } - if (this.input.max) { - const max = parseInt(this.input.max); - const buttonPlus = this.querySelector(".quantity__button[name='plus']"); - buttonPlus.classList.toggle('disabled', value >= max); - } - } -} - -customElements.define('quantity-input', QuantityInput); - -function debounce(fn, wait) { - let t; - return (...args) => { - clearTimeout(t); - t = setTimeout(() => fn.apply(this, args), wait); - }; -} - - -function throttle(fn, delay) { - let lastCall = 0; - return function (...args) { - const now = new Date().getTime(); - if (now - lastCall < delay) { - return; - } - lastCall = now; - return fn(...args); - }; -} - -function fetchConfig(type = 'json') { - return { - method: 'POST', - headers: { 'Content-Type': 'application/json', Accept: `application/${type}` }, - }; -} - -/* - * Shopify Common JS - * - */ -if (typeof window.Shopify == 'undefined') { - window.Shopify = {}; -} - -Shopify.bind = function (fn, scope) { - return function () { - return fn.apply(scope, arguments); - }; -}; - -Shopify.setSelectorByValue = function (selector, value) { - for (var i = 0, count = selector.options.length; i < count; i++) { - var option = selector.options[i]; - if (value == option.value || value == option.innerHTML) { - selector.selectedIndex = i; - return i; - } - } -}; - -Shopify.addListener = function (target, eventName, callback) { - target.addEventListener - ? target.addEventListener(eventName, callback, false) - : target.attachEvent('on' + eventName, callback); -}; - -Shopify.postLink = function (path, options) { - options = options || {}; - var method = options['method'] || 'post'; - var params = options['parameters'] || {}; - - var form = document.createElement('form'); - form.setAttribute('method', method); - form.setAttribute('action', path); - - for (var key in params) { - var hiddenField = document.createElement('input'); - hiddenField.setAttribute('type', 'hidden'); - hiddenField.setAttribute('name', key); - hiddenField.setAttribute('value', params[key]); - form.appendChild(hiddenField); - } - document.body.appendChild(form); - form.submit(); - document.body.removeChild(form); -}; - -Shopify.CountryProvinceSelector = function (country_domid, province_domid, options) { - this.countryEl = document.getElementById(country_domid); - this.provinceEl = document.getElementById(province_domid); - this.provinceContainer = document.getElementById(options['hideElement'] || province_domid); - - Shopify.addListener(this.countryEl, 'change', Shopify.bind(this.countryHandler, this)); - - this.initCountry(); - this.initProvince(); -}; - -Shopify.CountryProvinceSelector.prototype = { - initCountry: function () { - var value = this.countryEl.getAttribute('data-default'); - Shopify.setSelectorByValue(this.countryEl, value); - this.countryHandler(); - }, - - initProvince: function () { - var value = this.provinceEl.getAttribute('data-default'); - if (value && this.provinceEl.options.length > 0) { - Shopify.setSelectorByValue(this.provinceEl, value); - } - }, - - countryHandler: function (e) { - var opt = this.countryEl.options[this.countryEl.selectedIndex]; - var raw = opt.getAttribute('data-provinces'); - var provinces = JSON.parse(raw); - - this.clearOptions(this.provinceEl); - if (provinces && provinces.length == 0) { - this.provinceContainer.style.display = 'none'; - } else { - for (var i = 0; i < provinces.length; i++) { - var opt = document.createElement('option'); - opt.value = provinces[i][0]; - opt.innerHTML = provinces[i][1]; - this.provinceEl.appendChild(opt); - } - - this.provinceContainer.style.display = ''; - } - }, - - clearOptions: function (selector) { - while (selector.firstChild) { - selector.removeChild(selector.firstChild); - } - }, - - setOptions: function (selector, values) { - for (var i = 0, count = values.length; i < values.length; i++) { - var opt = document.createElement('option'); - opt.value = values[i]; - opt.innerHTML = values[i]; - selector.appendChild(opt); - } - }, -}; - -class MenuDrawer extends HTMLElement { - constructor() { - super(); - - this.mainDetailsToggle = this.querySelector('details'); - - this.addEventListener('keyup', this.onKeyUp.bind(this)); - this.addEventListener('focusout', this.onFocusOut.bind(this)); - this.bindEvents(); - } - - bindEvents() { - this.querySelectorAll('summary').forEach((summary) => - summary.addEventListener('click', this.onSummaryClick.bind(this)) - ); - 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))); - } - - onKeyUp(event) { - if (event.code.toUpperCase() !== 'ESCAPE') return; - - const openDetailsElement = event.target.closest('details[open]'); - if (!openDetailsElement) return; - - openDetailsElement === this.mainDetailsToggle - ? this.closeMenuDrawer(event, this.mainDetailsToggle.querySelector('summary')) - : this.closeSubmenu(openDetailsElement); - } - - onSummaryClick(event) { - const summaryElement = event.currentTarget; - const detailsElement = summaryElement.parentNode; - const parentMenuElement = detailsElement.closest('.has-submenu'); - const isOpen = detailsElement.hasAttribute('open'); - const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)'); - - function addTrapFocus() { - trapFocus(summaryElement.nextElementSibling, detailsElement.querySelector('button')); - summaryElement.nextElementSibling.removeEventListener('transitionend', addTrapFocus); - } - - if (detailsElement === this.mainDetailsToggle) { - if (isOpen) event.preventDefault(); - isOpen ? this.closeMenuDrawer(event, summaryElement) : this.openMenuDrawer(summaryElement); - - if (window.matchMedia('(max-width: 990px)')) { - document.documentElement.style.setProperty('--viewport-height', `${window.innerHeight}px`); - } - } else { - setTimeout(() => { - detailsElement.classList.add('menu-opening'); - summaryElement.setAttribute('aria-expanded', true); - parentMenuElement && parentMenuElement.classList.add('submenu-open'); - !reducedMotion || reducedMotion.matches - ? addTrapFocus() - : summaryElement.nextElementSibling.addEventListener('transitionend', addTrapFocus); - }, 100); - } - } - - openMenuDrawer(summaryElement) { - setTimeout(() => { - this.mainDetailsToggle.classList.add('menu-opening'); - }); - summaryElement.setAttribute('aria-expanded', true); - trapFocus(this.mainDetailsToggle, summaryElement); - document.body.classList.add(`overflow-hidden-${this.dataset.breakpoint}`); - } - - closeMenuDrawer(event, elementToFocus = false) { - if (event === undefined) return; - - this.mainDetailsToggle.classList.remove('menu-opening'); - this.mainDetailsToggle.querySelectorAll('details').forEach((details) => { - details.removeAttribute('open'); - details.classList.remove('menu-opening'); - }); - this.mainDetailsToggle.querySelectorAll('.submenu-open').forEach((submenu) => { - submenu.classList.remove('submenu-open'); - }); - document.body.classList.remove(`overflow-hidden-${this.dataset.breakpoint}`); - removeTrapFocus(elementToFocus); - this.closeAnimation(this.mainDetailsToggle); - - if (event instanceof KeyboardEvent) elementToFocus?.setAttribute('aria-expanded', false); - } - - onFocusOut() { - setTimeout(() => { - if (this.mainDetailsToggle.hasAttribute('open') && !this.mainDetailsToggle.contains(document.activeElement)) - this.closeMenuDrawer(); - }); - } - - onCloseButtonClick(event) { - const detailsElement = event.currentTarget.closest('details'); - this.closeSubmenu(detailsElement); - } - - closeSubmenu(detailsElement) { - const parentMenuElement = detailsElement.closest('.submenu-open'); - parentMenuElement && parentMenuElement.classList.remove('submenu-open'); - detailsElement.classList.remove('menu-opening'); - detailsElement.querySelector('summary').setAttribute('aria-expanded', false); - removeTrapFocus(detailsElement.querySelector('summary')); - this.closeAnimation(detailsElement); - } - - closeAnimation(detailsElement) { - let animationStart; - - const handleAnimation = (time) => { - if (animationStart === undefined) { - animationStart = time; - } - - const elapsedTime = time - animationStart; - - if (elapsedTime < 400) { - window.requestAnimationFrame(handleAnimation); - } else { - detailsElement.removeAttribute('open'); - if (detailsElement.closest('details[open]')) { - trapFocus(detailsElement.closest('details[open]'), detailsElement.querySelector('summary')); - } - } - }; - - window.requestAnimationFrame(handleAnimation); - } -} - -customElements.define('menu-drawer', MenuDrawer); - -class HeaderDrawer extends MenuDrawer { - constructor() { - super(); - } - - openMenuDrawer(summaryElement) { - this.header = this.header || document.querySelector('.section-header'); - this.borderOffset = - this.borderOffset || this.closest('.header-wrapper').classList.contains('header-wrapper--border-bottom') ? 1 : 0; - document.documentElement.style.setProperty( - '--header-bottom-position', - `${parseInt(this.header.getBoundingClientRect().bottom - this.borderOffset)}px` - ); - this.header.classList.add('menu-open'); - - setTimeout(() => { - this.mainDetailsToggle.classList.add('menu-opening'); - }); - - summaryElement.setAttribute('aria-expanded', true); - window.addEventListener('resize', this.onResize); - trapFocus(this.mainDetailsToggle, summaryElement); - document.body.classList.add(`overflow-hidden-${this.dataset.breakpoint}`); - } - - closeMenuDrawer(event, elementToFocus) { - if (!elementToFocus) return; - super.closeMenuDrawer(event, elementToFocus); - this.header.classList.remove('menu-open'); - window.removeEventListener('resize', this.onResize); - } - - onResize = () => { - this.header && - document.documentElement.style.setProperty( - '--header-bottom-position', - `${parseInt(this.header.getBoundingClientRect().bottom - this.borderOffset)}px` - ); - document.documentElement.style.setProperty('--viewport-height', `${window.innerHeight}px`); - }; -} - -customElements.define('header-drawer', HeaderDrawer); - -class ModalDialog extends HTMLElement { - constructor() { - super(); - this.querySelector('[id^="ModalClose-"]').addEventListener('click', this.hide.bind(this, false)); - this.addEventListener('keyup', (event) => { - if (event.code.toUpperCase() === 'ESCAPE') this.hide(); - }); - if (this.classList.contains('media-modal')) { - this.addEventListener('pointerup', (event) => { - if (event.pointerType === 'mouse' && !event.target.closest('deferred-media, product-model')) this.hide(); - }); - } else { - this.addEventListener('click', (event) => { - if (event.target === this) this.hide(); - }); - } - } - - connectedCallback() { - if (this.moved) return; - this.moved = true; - this.dataset.section = this.closest('.shopify-section').id.replace('shopify-section-', ''); - document.body.appendChild(this); - } - - show(opener) { - this.openedBy = opener; - const popup = this.querySelector('.template-popup'); - document.body.classList.add('overflow-hidden'); - this.setAttribute('open', ''); - if (popup) popup.loadContent(); - trapFocus(this, this.querySelector('[role="dialog"]')); - window.pauseAllMedia(); - } - - hide() { - document.body.classList.remove('overflow-hidden'); - document.body.dispatchEvent(new CustomEvent('modalClosed')); - this.removeAttribute('open'); - removeTrapFocus(this.openedBy); - window.pauseAllMedia(); - } -} -customElements.define('modal-dialog', ModalDialog); - -class BulkModal extends HTMLElement { - constructor() { - super(); - } - - connectedCallback() { - const handleIntersection = (entries, observer) => { - if (!entries[0].isIntersecting) return; - observer.unobserve(this); - if (this.innerHTML.trim() === '') { - const productUrl = this.dataset.url.split('?')[0]; - fetch(`${productUrl}?section_id=bulk-quick-order-list`) - .then((response) => response.text()) - .then((responseText) => { - const html = new DOMParser().parseFromString(responseText, 'text/html'); - const sourceQty = html.querySelector('.quick-order-list-container').parentNode; - this.innerHTML = sourceQty.innerHTML; - }) - .catch((e) => { - console.error(e); - }); - } - }; - - new IntersectionObserver(handleIntersection.bind(this)).observe( - document.querySelector(`#QuickBulk-${this.dataset.productId}-${this.dataset.sectionId}`) - ); - } -} - -customElements.define('bulk-modal', BulkModal); - -class ModalOpener extends HTMLElement { - constructor() { - super(); - - const button = this.querySelector('button'); - - if (!button) return; - button.addEventListener('click', () => { - const modal = document.querySelector(this.getAttribute('data-modal')); - if (modal) modal.show(button); - }); - } -} -customElements.define('modal-opener', ModalOpener); - -class DeferredMedia extends HTMLElement { - constructor() { - super(); - const poster = this.querySelector('[id^="Deferred-Poster-"]'); - if (!poster) return; - poster.addEventListener('click', this.loadContent.bind(this)); - } - - loadContent(focus = true) { - window.pauseAllMedia(); - if (!this.getAttribute('loaded')) { - const content = document.createElement('div'); - content.appendChild(this.querySelector('template').content.firstElementChild.cloneNode(true)); - - this.setAttribute('loaded', true); - const deferredElement = this.appendChild(content.querySelector('video, model-viewer, iframe')); - if (focus) deferredElement.focus(); - if (deferredElement.nodeName == 'VIDEO' && deferredElement.getAttribute('autoplay')) { - // force autoplay for safari - deferredElement.play(); - } - - // Workaround for safari iframe bug - const formerStyle = deferredElement.getAttribute('style'); - deferredElement.setAttribute('style', 'display: block;'); - window.setTimeout(() => { - deferredElement.setAttribute('style', formerStyle); - }, 0); - } - } -} - -customElements.define('deferred-media', DeferredMedia); - -class SliderComponent extends HTMLElement { - constructor() { - super(); - this.slider = this.querySelector('[id^="Slider-"]'); - this.sliderItems = this.querySelectorAll('[id^="Slide-"]'); - this.enableSliderLooping = false; - this.currentPageElement = this.querySelector('.slider-counter--current'); - this.pageTotalElement = this.querySelector('.slider-counter--total'); - this.prevButton = this.querySelector('button[name="previous"]'); - this.nextButton = this.querySelector('button[name="next"]'); - - if (!this.slider || !this.nextButton) return; - - this.initPages(); - const resizeObserver = new ResizeObserver((entries) => this.initPages()); - resizeObserver.observe(this.slider); - - this.slider.addEventListener('scroll', this.update.bind(this)); - this.prevButton.addEventListener('click', this.onButtonClick.bind(this)); - this.nextButton.addEventListener('click', this.onButtonClick.bind(this)); - } - - initPages() { - this.sliderItemsToShow = Array.from(this.sliderItems).filter((element) => element.clientWidth > 0); - if (this.sliderItemsToShow.length < 2) return; - this.sliderItemOffset = this.sliderItemsToShow[1].offsetLeft - this.sliderItemsToShow[0].offsetLeft; - this.slidesPerPage = Math.floor( - (this.slider.clientWidth - this.sliderItemsToShow[0].offsetLeft) / this.sliderItemOffset - ); - this.totalPages = this.sliderItemsToShow.length - this.slidesPerPage + 1; - this.update(); - } - - resetPages() { - this.sliderItems = this.querySelectorAll('[id^="Slide-"]'); - this.initPages(); - } - - update() { - // Temporarily prevents unneeded updates resulting from variant changes - // This should be refactored as part of https://github.com/Shopify/dawn/issues/2057 - if (!this.slider || !this.nextButton) return; - - const previousPage = this.currentPage; - this.currentPage = Math.round(this.slider.scrollLeft / this.sliderItemOffset) + 1; - - if (this.currentPageElement && this.pageTotalElement) { - this.currentPageElement.textContent = this.currentPage; - this.pageTotalElement.textContent = this.totalPages; - } - - if (this.currentPage != previousPage) { - this.dispatchEvent( - new CustomEvent('slideChanged', { - detail: { - currentPage: this.currentPage, - currentElement: this.sliderItemsToShow[this.currentPage - 1], - }, - }) - ); - } - - if (this.enableSliderLooping) return; - - if (this.isSlideVisible(this.sliderItemsToShow[0]) && this.slider.scrollLeft === 0) { - this.prevButton.setAttribute('disabled', 'disabled'); - } else { - this.prevButton.removeAttribute('disabled'); - } - - if (this.isSlideVisible(this.sliderItemsToShow[this.sliderItemsToShow.length - 1])) { - this.nextButton.setAttribute('disabled', 'disabled'); - } else { - this.nextButton.removeAttribute('disabled'); - } - } - - isSlideVisible(element, offset = 0) { - const lastVisibleSlide = this.slider.clientWidth + this.slider.scrollLeft - offset; - return element.offsetLeft + element.clientWidth <= lastVisibleSlide && element.offsetLeft >= this.slider.scrollLeft; - } - - onButtonClick(event) { - event.preventDefault(); - const step = event.currentTarget.dataset.step || 1; - this.slideScrollPosition = - event.currentTarget.name === 'next' - ? this.slider.scrollLeft + step * this.sliderItemOffset - : this.slider.scrollLeft - step * this.sliderItemOffset; - this.setSlidePosition(this.slideScrollPosition); - } - - setSlidePosition(position) { - this.slider.scrollTo({ - left: position, - }); - } -} - -customElements.define('slider-component', SliderComponent); - -class SlideshowComponent extends SliderComponent { - constructor() { - super(); - this.sliderControlWrapper = this.querySelector('.slider-buttons'); - this.enableSliderLooping = true; - - if (!this.sliderControlWrapper) return; - - this.sliderFirstItemNode = this.slider.querySelector('.slideshow__slide'); - if (this.sliderItemsToShow.length > 0) this.currentPage = 1; - - this.announcementBarSlider = this.querySelector('.announcement-bar-slider'); - // Value below should match --duration-announcement-bar CSS value - this.announcerBarAnimationDelay = this.announcementBarSlider ? 250 : 0; - - this.sliderControlLinksArray = Array.from(this.sliderControlWrapper.querySelectorAll('.slider-counter__link')); - this.sliderControlLinksArray.forEach((link) => link.addEventListener('click', this.linkToSlide.bind(this))); - this.slider.addEventListener('scroll', this.setSlideVisibility.bind(this)); - this.setSlideVisibility(); - - if (this.announcementBarSlider) { - this.announcementBarArrowButtonWasClicked = false; - - this.reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)'); - this.reducedMotion.addEventListener('change', () => { - if (this.slider.getAttribute('data-autoplay') === 'true') this.setAutoPlay(); - }); - - [this.prevButton, this.nextButton].forEach((button) => { - button.addEventListener( - 'click', - () => { - this.announcementBarArrowButtonWasClicked = true; - }, - { once: true } - ); - }); - } - - if (this.slider.getAttribute('data-autoplay') === 'true') this.setAutoPlay(); - } - - setAutoPlay() { - this.autoplaySpeed = this.slider.dataset.speed * 1000; - this.addEventListener('mouseover', this.focusInHandling.bind(this)); - this.addEventListener('mouseleave', this.focusOutHandling.bind(this)); - this.addEventListener('focusin', this.focusInHandling.bind(this)); - this.addEventListener('focusout', this.focusOutHandling.bind(this)); - - if (this.querySelector('.slideshow__autoplay')) { - this.sliderAutoplayButton = this.querySelector('.slideshow__autoplay'); - this.sliderAutoplayButton.addEventListener('click', this.autoPlayToggle.bind(this)); - this.autoplayButtonIsSetToPlay = true; - this.play(); - } else { - this.reducedMotion.matches || this.announcementBarArrowButtonWasClicked ? this.pause() : this.play(); - } - } - - onButtonClick(event) { - super.onButtonClick(event); - this.wasClicked = true; - - const isFirstSlide = this.currentPage === 1; - const isLastSlide = this.currentPage === this.sliderItemsToShow.length; - - if (!isFirstSlide && !isLastSlide) { - this.applyAnimationToAnnouncementBar(event.currentTarget.name); - return; - } - - if (isFirstSlide && event.currentTarget.name === 'previous') { - this.slideScrollPosition = - this.slider.scrollLeft + this.sliderFirstItemNode.clientWidth * this.sliderItemsToShow.length; - } else if (isLastSlide && event.currentTarget.name === 'next') { - this.slideScrollPosition = 0; - } - - this.setSlidePosition(this.slideScrollPosition); - - this.applyAnimationToAnnouncementBar(event.currentTarget.name); - } - - setSlidePosition(position) { - if (this.setPositionTimeout) clearTimeout(this.setPositionTimeout); - this.setPositionTimeout = setTimeout(() => { - this.slider.scrollTo({ - left: position, - }); - }, this.announcerBarAnimationDelay); - } - - update() { - super.update(); - this.sliderControlButtons = this.querySelectorAll('.slider-counter__link'); - this.prevButton.removeAttribute('disabled'); - - if (!this.sliderControlButtons.length) return; - - this.sliderControlButtons.forEach((link) => { - link.classList.remove('slider-counter__link--active'); - link.removeAttribute('aria-current'); - }); - this.sliderControlButtons[this.currentPage - 1].classList.add('slider-counter__link--active'); - this.sliderControlButtons[this.currentPage - 1].setAttribute('aria-current', true); - } - - autoPlayToggle() { - this.togglePlayButtonState(this.autoplayButtonIsSetToPlay); - this.autoplayButtonIsSetToPlay ? this.pause() : this.play(); - this.autoplayButtonIsSetToPlay = !this.autoplayButtonIsSetToPlay; - } - - focusOutHandling(event) { - if (this.sliderAutoplayButton) { - const focusedOnAutoplayButton = - event.target === this.sliderAutoplayButton || this.sliderAutoplayButton.contains(event.target); - if (!this.autoplayButtonIsSetToPlay || focusedOnAutoplayButton) return; - this.play(); - } else if (!this.reducedMotion.matches && !this.announcementBarArrowButtonWasClicked) { - this.play(); - } - } - - focusInHandling(event) { - if (this.sliderAutoplayButton) { - const focusedOnAutoplayButton = - event.target === this.sliderAutoplayButton || this.sliderAutoplayButton.contains(event.target); - if (focusedOnAutoplayButton && this.autoplayButtonIsSetToPlay) { - this.play(); - } else if (this.autoplayButtonIsSetToPlay) { - this.pause(); - } - } else if (this.announcementBarSlider.contains(event.target)) { - this.pause(); - } - } - - play() { - this.slider.setAttribute('aria-live', 'off'); - clearInterval(this.autoplay); - this.autoplay = setInterval(this.autoRotateSlides.bind(this), this.autoplaySpeed); - } - - pause() { - this.slider.setAttribute('aria-live', 'polite'); - clearInterval(this.autoplay); - } - - togglePlayButtonState(pauseAutoplay) { - if (pauseAutoplay) { - this.sliderAutoplayButton.classList.add('slideshow__autoplay--paused'); - this.sliderAutoplayButton.setAttribute('aria-label', window.accessibilityStrings.playSlideshow); - } else { - this.sliderAutoplayButton.classList.remove('slideshow__autoplay--paused'); - this.sliderAutoplayButton.setAttribute('aria-label', window.accessibilityStrings.pauseSlideshow); - } - } - - autoRotateSlides() { - const slideScrollPosition = - this.currentPage === this.sliderItems.length ? 0 : this.slider.scrollLeft + this.sliderItemOffset; - - this.setSlidePosition(slideScrollPosition); - this.applyAnimationToAnnouncementBar(); - } - - setSlideVisibility(event) { - this.sliderItemsToShow.forEach((item, index) => { - const linkElements = item.querySelectorAll('a'); - if (index === this.currentPage - 1) { - if (linkElements.length) - linkElements.forEach((button) => { - button.removeAttribute('tabindex'); - }); - item.setAttribute('aria-hidden', 'false'); - item.removeAttribute('tabindex'); - } else { - if (linkElements.length) - linkElements.forEach((button) => { - button.setAttribute('tabindex', '-1'); - }); - item.setAttribute('aria-hidden', 'true'); - item.setAttribute('tabindex', '-1'); - } - }); - this.wasClicked = false; - } - - applyAnimationToAnnouncementBar(button = 'next') { - if (!this.announcementBarSlider) return; - - const itemsCount = this.sliderItems.length; - const increment = button === 'next' ? 1 : -1; - - const currentIndex = this.currentPage - 1; - let nextIndex = (currentIndex + increment) % itemsCount; - nextIndex = nextIndex === -1 ? itemsCount - 1 : nextIndex; - - const nextSlide = this.sliderItems[nextIndex]; - const currentSlide = this.sliderItems[currentIndex]; - - const animationClassIn = 'announcement-bar-slider--fade-in'; - const animationClassOut = 'announcement-bar-slider--fade-out'; - - const isFirstSlide = currentIndex === 0; - const isLastSlide = currentIndex === itemsCount - 1; - - const shouldMoveNext = (button === 'next' && !isLastSlide) || (button === 'previous' && isFirstSlide); - const direction = shouldMoveNext ? 'next' : 'previous'; - - currentSlide.classList.add(`${animationClassOut}-${direction}`); - nextSlide.classList.add(`${animationClassIn}-${direction}`); - - setTimeout(() => { - currentSlide.classList.remove(`${animationClassOut}-${direction}`); - nextSlide.classList.remove(`${animationClassIn}-${direction}`); - }, this.announcerBarAnimationDelay * 2); - } - - linkToSlide(event) { - event.preventDefault(); - const slideScrollPosition = - this.slider.scrollLeft + - this.sliderFirstItemNode.clientWidth * - (this.sliderControlLinksArray.indexOf(event.currentTarget) + 1 - this.currentPage); - this.slider.scrollTo({ - left: slideScrollPosition, - }); - } -} - -customElements.define('slideshow-component', SlideshowComponent); - -class VariantSelects extends HTMLElement { - constructor() { - super(); - } - - connectedCallback() { - this.addEventListener('change', (event) => { - const target = this.getInputForEventTarget(event.target); - this.updateSelectionMetadata(event); - - publish(PUB_SUB_EVENTS.optionValueSelectionChange, { - data: { - event, - target, - selectedOptionValues: this.selectedOptionValues, - }, - }); - }); - } - - updateSelectionMetadata({ target }) { - const { value, tagName } = target; - - if (tagName === 'SELECT' && target.selectedOptions.length) { - Array.from(target.options) - .find((option) => option.getAttribute('selected')) - .removeAttribute('selected'); - target.selectedOptions[0].setAttribute('selected', 'selected'); - - const swatchValue = target.selectedOptions[0].dataset.optionSwatchValue; - const selectedDropdownSwatchValue = target - .closest('.product-form__input') - .querySelector('[data-selected-value] > .swatch'); - if (!selectedDropdownSwatchValue) return; - if (swatchValue) { - selectedDropdownSwatchValue.style.setProperty('--swatch--background', swatchValue); - selectedDropdownSwatchValue.classList.remove('swatch--unavailable'); - } else { - selectedDropdownSwatchValue.style.setProperty('--swatch--background', 'unset'); - selectedDropdownSwatchValue.classList.add('swatch--unavailable'); - } - - selectedDropdownSwatchValue.style.setProperty( - '--swatch-focal-point', - target.selectedOptions[0].dataset.optionSwatchFocalPoint || 'unset' - ); - } else if (tagName === 'INPUT' && target.type === 'radio') { - const selectedSwatchValue = target.closest(`.product-form__input`).querySelector('[data-selected-value]'); - if (selectedSwatchValue) selectedSwatchValue.innerHTML = value; - } - } - - getInputForEventTarget(target) { - return target.tagName === 'SELECT' ? target.selectedOptions[0] : target; - } - - get selectedOptionValues() { - return Array.from(this.querySelectorAll('select option[selected], fieldset input:checked')).map( - ({ dataset }) => dataset.optionValueId - ); - } -} - -customElements.define('variant-selects', VariantSelects); - -class ProductRecommendations extends HTMLElement { - observer = undefined; - - constructor() { - super(); - } - - connectedCallback() { - this.initializeRecommendations(this.dataset.productId); - } - - initializeRecommendations(productId) { - this.observer?.unobserve(this); - this.observer = new IntersectionObserver( - (entries, observer) => { - if (!entries[0].isIntersecting) return; - observer.unobserve(this); - this.loadRecommendations(productId); - }, - { rootMargin: '0px 0px 400px 0px' } - ); - this.observer.observe(this); - } - - loadRecommendations(productId) { - fetch(`${this.dataset.url}&product_id=${productId}§ion_id=${this.dataset.sectionId}`) - .then((response) => response.text()) - .then((text) => { - const html = document.createElement('div'); - html.innerHTML = text; - const recommendations = html.querySelector('product-recommendations'); - - if (recommendations?.innerHTML.trim().length) { - this.innerHTML = recommendations.innerHTML; - } - - if (!this.querySelector('slideshow-component') && this.classList.contains('complementary-products')) { - this.remove(); - } - - if (html.querySelector('.grid__item')) { - this.classList.add('product-recommendations--loaded'); - } - }) - .catch((e) => { - console.error(e); - }); - } -} - -customElements.define('product-recommendations', ProductRecommendations); - -class AccountIcon extends HTMLElement { - constructor() { - super(); - - this.icon = this.querySelector('.icon'); - } - - connectedCallback() { - document.addEventListener('storefront:signincompleted', this.handleStorefrontSignInCompleted.bind(this)); - } - - handleStorefrontSignInCompleted(event) { - if (event?.detail?.avatar) { - this.icon?.replaceWith(event.detail.avatar.cloneNode()); - } - } -} - -customElements.define('account-icon', AccountIcon); - -class BulkAdd extends HTMLElement { - static ASYNC_REQUEST_DELAY = 250; - - constructor() { - super(); - this.queue = []; - this.setRequestStarted(false); - this.ids = []; - } - - startQueue(id, quantity) { - this.queue.push({ id, quantity }); - - const interval = setInterval(() => { - if (this.queue.length > 0) { - if (!this.requestStarted) { - this.sendRequest(this.queue); - } - } else { - clearInterval(interval); - } - }, BulkAdd.ASYNC_REQUEST_DELAY); - } - - sendRequest(queue) { - this.setRequestStarted(true); - const items = {}; - - queue.forEach((queueItem) => { - items[parseInt(queueItem.id)] = queueItem.quantity; - }); - this.queue = this.queue.filter((queueElement) => !queue.includes(queueElement)); - - this.updateMultipleQty(items); - } - - setRequestStarted(requestStarted) { - this._requestStarted = requestStarted; - } - - get requestStarted() { - return this._requestStarted; - } - - resetQuantityInput(id) { - const input = this.querySelector(`#Quantity-${id}`); - input.value = input.getAttribute('value'); - this.isEnterPressed = false; - } - - setValidity(event, index, message) { - event.target.setCustomValidity(message); - event.target.reportValidity(); - this.resetQuantityInput(index); - event.target.select(); - } - - validateQuantity(event) { - const inputValue = parseInt(event.target.value); - const index = event.target.dataset.index; - - if (inputValue < 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)); - } else if (inputValue % parseInt(event.target.step) != 0) { - this.setValidity(event, index, window.quickOrderListStrings.step_error.replace('[step]', event.target.step)); - } else { - event.target.setCustomValidity(''); - event.target.reportValidity(); - event.target.setAttribute('value', inputValue); - this.startQueue(index, inputValue); - } - } - - getSectionInnerHTML(html, selector) { - return new DOMParser().parseFromString(html, 'text/html').querySelector(selector).innerHTML; - } -} - -if (!customElements.get('bulk-add')) { - customElements.define('bulk-add', BulkAdd); -} - -class CartPerformance { - static #metric_prefix = "cart-performance" - - static createStartingMarker(benchmarkName) { - const metricName = `${CartPerformance.#metric_prefix}:${benchmarkName}` - return performance.mark(`${metricName}:start`); - } - - static measureFromEvent(benchmarkName, event) { - const metricName = `${CartPerformance.#metric_prefix}:${benchmarkName}` - const startMarker = performance.mark(`${metricName}:start`, { - startTime: event.timeStamp - }); - - const endMarker = performance.mark(`${metricName}:end`); - - performance.measure( - metricName, - `${metricName}:start`, - `${metricName}:end` - ); - } - - static measureFromMarker(benchmarkName, startMarker) { - const metricName = `${CartPerformance.#metric_prefix}:${benchmarkName}` - const endMarker = performance.mark(`${metricName}:end`); - - performance.measure( - metricName, - startMarker.name, - `${metricName}:end` - ); - } - - static measure(benchmarkName, callback) { - const metricName = `${CartPerformance.#metric_prefix}:${benchmarkName}` - const startMarker = performance.mark(`${metricName}:start`); - - callback(); - - const endMarker = performance.mark(`${metricName}:end`); - - performance.measure( - metricName, - `${metricName}:start`, - `${metricName}:end` - ); - } -} diff --git a/assets/header.js b/assets/header.js new file mode 100644 index 00000000000..7fd261b2f96 --- /dev/null +++ b/assets/header.js @@ -0,0 +1,849 @@ +class BasicHeader extends HTMLElement { + constructor() { + super(); + } + + get headerSection() { + return document.querySelector('.header-section'); + } + + get headerNavigation() { + return this.querySelector('.header__bottom'); + } + + get navigationToggleButton() { + return this.querySelector('.toggle-navigation-button'); + } + + get enableTransparent() { + return this.dataset.enableTransparent === 'true'; + } + + connectedCallback() { + this.init(); + if (window.ResizeObserver) { + new ResizeObserver(this.setHeight.bind(this)).observe(this); + } + + // window.addEventListener('resize', this.setMenuHeight.bind(this)); + + if (Shopify.designMode) { + const section = this.closest('.shopify-section'); + section.addEventListener('shopify:section:load', this.init.bind(this)); + section.addEventListener('shopify:section:unload', this.init.bind(this)); + section.addEventListener('shopify:section:reorder', this.init.bind(this)); + } + } + + init() { + new FoxTheme.delayUntilInteraction(this.setHeight.bind(this)); + + if (this.enableTransparent) { + this.headerSection.classList.add('header-transparent'); + } + } + + calculateHeaderGroupHeight() { + const headerGroups = document.querySelectorAll('.shopify-section-group-header-group'); + let totalHeight = 0; + + headerGroups.forEach((section) => { + totalHeight += section.offsetHeight; + }); + + document.documentElement.style.setProperty('--header-group-height', `${totalHeight}px`); + + return totalHeight; + } + + setHeight() { + requestAnimationFrame(() => { + const offsetHeight = Math.round(this.offsetHeight); + const offsetTop = Math.round(this.parentElement.offsetTop); + const offsetNavigationHeight = Math.round(this.headerNavigation.offsetHeight); + + document.documentElement.style.setProperty('--header-height', `${offsetHeight}px`); + document.documentElement.style.setProperty('--header-offset-top', `${offsetTop}px`); + document.documentElement.style.setProperty('--header-navigation-height', `${offsetNavigationHeight - 1}px`); + + this.calculateHeaderGroupHeight(); + }); + } +} + +customElements.define('basic-header', BasicHeader, { extends: 'header' }); + +class StickyHeader extends BasicHeader { + constructor() { + super(); + + // Group CSS classes in one object for easier management + this.classes = { + pinned: 'header-pinned', + headerScrolled: 'header-scrolled', + show: 'is-show', + hide: 'is-hide', + headerSticky: 'header-sticky', + isHideNav: 'is-hide-nav', + }; + + // Track navigation toggle state + this.navigationManuallyToggled = false; + + // Initialize scroll tracking variables + this.currentScrollTop = 0; + this.lastScrollPos = 0; + + // Add scroll threshold to prevent quick unpinning + this.scrollThreshold = 200; // Minimum scroll amount before unpinning + this.scrollDirection = 'none'; + this.scrollDistance = 0; + } + + // Getters for easier property access + get isAlwaysSticky() { + return this.dataset.stickyType === 'always'; + } + + get collapseOnScroll() { + return this.dataset.collapseOnScroll === 'true'; + } + + connectedCallback() { + super.connectedCallback(); + + // Store initial scroll position + this.firstScrollTop = window.scrollY; + + // Cache header dimensions for performance optimization + this.headerBounds = this.headerSection.getBoundingClientRect(); + + // Initialize sticky header + this.initStickyHeader(); + + // Register toggle button event if needed + if (this.collapseOnScroll && this.navigationToggleButton) { + this.navigationToggleButton.addEventListener('click', this.handleNavigationToggle.bind(this)); + } + } + + // Initialize sticky header behavior + initStickyHeader() { + this.headerSection.classList.add(this.classes.headerSticky); + this.headerSection.dataset.stickyType = this.dataset.stickyType; + window.addEventListener('scroll', this.handleScroll.bind(this), { passive: true }); + } + + // Handle navigation toggle button click + handleNavigationToggle(event) { + event.preventDefault(); + + this.navigationManuallyToggled = true; + const isHidden = this.headerNavigation.classList.contains(this.classes.hide); + + // Toggle visibility state + setTimeout( + () => { + document.body.classList.toggle(this.classes.isHideNav, !isHidden); + }, + isHidden ? 0 : 250 + ); + this.headerNavigation.classList.toggle(this.classes.hide, !isHidden); + this.headerNavigation.classList.toggle(this.classes.show, isHidden); + this.navigationToggleButton.setAttribute('aria-expanded', isHidden); + + // Reset toggle state after delay + setTimeout(() => { + this.navigationManuallyToggled = false; + }, 1000); + } + + // Handle scroll events + handleScroll() { + const scrollTop = window.scrollY; + const headerSection = this.headerSection; + + // Avoid recalculating dimensions on each scroll + const headerBoundsTop = this.headerBounds.top + this.firstScrollTop; + const headerBoundsBottom = this.headerBounds.bottom + this.firstScrollTop; + + // Update scroll direction and distance + this.updateScrollMetrics(scrollTop); + + // Use requestAnimationFrame for performance optimization + requestAnimationFrame(() => { + const isScrolledPastHeader = scrollTop > headerBoundsTop; + + // Handle different scroll positions + if (isScrolledPastHeader) { + this.handleScrolledPastHeader(scrollTop, headerBoundsBottom); + } else { + this.handleScrolledBeforeHeader(); + } + + this.currentScrollTop = scrollTop; + }); + } + + // Update scroll direction and accumulated distance + updateScrollMetrics(scrollTop) { + // Determine scroll direction + const newDirection = scrollTop > this.currentScrollTop ? 'down' : 'up'; + + // Reset accumulated distance when direction changes + if (newDirection !== this.scrollDirection) { + this.scrollDistance = 0; + this.scrollDirection = newDirection; + } else { + // Accumulate scroll distance in the same direction + this.scrollDistance += Math.abs(scrollTop - this.currentScrollTop); + } + } + + // Handle scroll position after passing the header + handleScrolledPastHeader(scrollTop, headerBoundsBottom) { + this.headerSection.classList.add(this.classes.headerScrolled); + + // Handle collapse on scroll behavior + if (this.collapseOnScroll) { + this.navigationToggleButton.classList.add(this.classes.show); + if (!this.navigationManuallyToggled && !this.headerNavigation.classList.contains(this.classes.show)) { + this.headerNavigation.classList.add(this.classes.hide); + document.body.classList.add(this.classes.isHideNav); + } + } + + // Handle sticky behavior based on configuration + if (this.isAlwaysSticky) { + document.body.classList.add(this.classes.pinned); + } else { + // Improved sticky on scroll up logic + const isScrollingUp = this.scrollDirection === 'up'; + const isNearHeader = scrollTop < headerBoundsBottom + 100; + const hasScrolledEnough = this.scrollDistance >= this.scrollThreshold; + + if (isScrollingUp || isNearHeader) { + document.body.classList.add(this.classes.pinned); + } else if (!this.navigationManuallyToggled && hasScrolledEnough) { + // Only unpin when scrolled down enough and not manually toggled + document.body.classList.remove(this.classes.pinned); + } + } + } + + // Handle scroll position before the header + handleScrolledBeforeHeader() { + this.headerSection.classList.remove(this.classes.headerScrolled); + + if (this.collapseOnScroll) { + if (!this.navigationManuallyToggled) { + document.body.classList.remove(this.classes.isHideNav); + this.headerNavigation.classList.remove(this.classes.hide); + this.headerNavigation.classList.remove(this.classes.show); + this.navigationToggleButton.setAttribute('aria-expanded', false); + } + this.navigationToggleButton.classList.remove(this.classes.show); + } + + if (this.isAlwaysSticky) { + document.body.classList.remove(this.classes.pinned); + } + } +} + +customElements.define('sticky-header', StickyHeader, { extends: 'header' }); + +const clearDropdownCount = new WeakMap(); +class DetailsDropdown extends HTMLDetailsElement { + constructor() { + super(); + // Initialize properties + this.classes = { bodyClass: 'has-dropdown-menu' }; + this.events = { + handleAfterHide: 'menu:handleAfterHide', + handleAfterShow: 'menu:handleAfterShow', + }; + + // Reference to first and last child elements + this.summaryElement = this.firstElementChild; + this.contentElement = this.lastElementChild; + + // Initial state based on attributes + this._open = this.hasAttribute('open'); + + // Event listeners for summary element + this.summaryElement.addEventListener('click', this.handleSummaryClick.bind(this)); + + if (FoxTheme.config.isTouch) { + this.summaryElement.addEventListener( + 'touchstart', + (event) => { + // Prevent double-firing on touch devices + this.touchStartTime = Date.now(); + }, + { passive: true } + ); + } + + if (this.trigger === 'hover') { + this.summaryElement.addEventListener('focusin', (event) => { + if (event.target === this.summaryElement) { + this.open = true; + } + }); + this.summaryElement.addEventListener('focusout', (event) => { + if (!this.contentElement.contains(event.relatedTarget)) { + this.open = false; + } + }); + } + + // Binding methods to ensure 'this' context is correct when they are called + this.handleOutsideClick = this.handleOutsideClick.bind(this); + this.handleEscKeyPress = this.handleEscKeyPress.bind(this); + this.handleFocusOut = this.handleFocusOut.bind(this); + + // Setup hover detection with debouncing + this.hoverEnterTimer = null; + this.hoverLeaveTimer = null; + // this.detectHoverListener = this.detectHover.bind(this); + // this.addEventListener('mouseenter', this.detectHoverListener.bind(this)); + // this.addEventListener('mouseleave', this.detectHoverListener.bind(this)); + + if (!FoxTheme.config.isTouch && this.trigger === 'hover') { + this.addEventListener('mouseenter', (event) => { + if (this.hoverLeaveTimer) { + clearTimeout(this.hoverLeaveTimer); + this.hoverLeaveTimer = null; + } + this.hoverEnterTimer = setTimeout(() => { + this.detectHover({ type: 'mouseenter' }); + }, 100); + }); + + this.addEventListener('mouseleave', (event) => { + if (this.hoverEnterTimer) { + clearTimeout(this.hoverEnterTimer); + this.hoverEnterTimer = null; + } + + this.hoverLeaveTimer = setTimeout(() => { + this.detectHover({ type: 'mouseleave' }); + }, 150); + }); + } + } + + set open(value) { + // Check if the new value is different from the current value + if (value !== this._open) { + // Update the internal state + this._open = value; + + // Perform actions based on whether the element is connected to the DOM + if (this.isConnected) { + // If connected, perform a transition + this.transition(value); + } else { + // If not connected, directly manipulate the 'open' attribute + if (value) { + this.setAttribute('open', ''); + } else { + this.removeAttribute('open'); + } + } + } + } + + get open() { + return this._open; + } + + get trigger() { + // For touch devices, always use click events + if (FoxTheme.config.isTouch) { + return 'click'; + } + + // For non-touch devices, check for custom trigger attribute + return this.getAttribute('trigger') || 'click'; + } + + get level() { + if (this.hasAttribute('level')) { + return this.getAttribute('level'); + } else { + return 'top'; + } + } + + handleSummaryClick(event) { + // Prevent the default action of the event + event.preventDefault(); + + // Check if the device is not touch-enabled and the trigger type is 'hover' + if (!FoxTheme.config.isTouch && this.trigger === 'hover' && this.summaryElement.hasAttribute('data-link')) { + // If conditions are met, navigate to the URL specified in 'data-link' + window.location.href = this.summaryElement.getAttribute('data-link'); + } else { + // Otherwise, toggle the 'open' state + this.open = !this.open; + } + } + + async transition(value) { + if (value) { + // Increment the lock count for dropdowns + clearDropdownCount.set(DetailsDropdown, clearDropdownCount.get(DetailsDropdown) + 1); + + // Add class to body and set attributes + document.body.classList.add(this.classes.bodyClass); + this.setAttribute('open', ''); + this.summaryElement.setAttribute('open', ''); + setTimeout(() => { + this.contentElement.setAttribute('open', ''); + }, 100); + + // Add event listeners + document.addEventListener('click', this.handleOutsideClick); + document.addEventListener('keydown', this.handleEscKeyPress); + document.addEventListener('focusout', this.handleFocusOut); + + // Perform the transition in animation + await this.showWithTransition(); + + const MenuProductList = this.querySelector('menu-product-list'); + if (MenuProductList && typeof MenuProductList === 'object') { + MenuProductList.calcNavButtonsPosition(); + } + + // Check for reverse condition (not implemented here for brevity) + this.needsReverse(); + + // Wait for the after show event + return FoxTheme.utils.waitForEvent(this, this.events.handleAfterShow); + } else { + // Decrement the lock count for dropdowns + clearDropdownCount.set(DetailsDropdown, clearDropdownCount.get(DetailsDropdown) - 1); + + // Toggle class on body based on lock count + document.body.classList.toggle(this.classes.bodyClass, clearDropdownCount.get(DetailsDropdown) > 0); + + // Remove attributes and event listeners + this.summaryElement.removeAttribute('open'); + this.contentElement.removeAttribute('open'); + document.removeEventListener('click', this.handleOutsideClick); + document.removeEventListener('keydown', this.handleEscKeyPress); + document.removeEventListener('focusout', this.handleFocusOut); + + // Perform the transition out animation + await this.hideWithTransition(); + + // Conditionally remove the 'open' attribute + if (!this.open) { + this.removeAttribute('open'); + } + + // Wait for the after hide event + return FoxTheme.utils.waitForEvent(this, this.events.handleAfterHide); + } + } + + async showWithTransition() { + FoxTheme.Motion.animate( + this.contentElement, + { opacity: [0, 1], visibility: 'visible' }, + { + duration: FoxTheme.config.motionReduced ? 0 : 0.6, + easing: [0.7, 0, 0.2, 1], + delay: FoxTheme.config.motionReduced ? 0 : 0.1, + } + ); + const translateY = this.level === 'top' ? '-105%' : '2rem'; + return FoxTheme.Motion.animate( + this.contentElement.firstElementChild, + { transform: [`translateY(${translateY})`, 'translateY(0)'] }, + { + duration: FoxTheme.config.motionReduced ? 0 : 0.6, + easing: [0.7, 0, 0.2, 1], + } + ).finished; + } + + async hideWithTransition() { + FoxTheme.Motion.animate( + this.contentElement, + { opacity: 0, visibility: 'hidden' }, + { + duration: FoxTheme.config.motionReduced ? 0 : 0.3, + easing: [0.7, 0, 0.2, 1], + } + ); + const translateY = this.level === 'top' ? '-105%' : '2rem'; + return FoxTheme.Motion.animate( + this.contentElement.firstElementChild, + { transform: `translateY(${translateY})` }, + { + duration: FoxTheme.config.motionReduced ? 0 : 0.6, + easing: [0.7, 0, 0.2, 1], + } + ).finished; + } + + handleOutsideClick(event) { + const isClickInside = this.contains(event.target); + const isClickOnDetailsDropdown = event.target.closest('details') instanceof DetailsDropdown; + + if (!isClickInside && !isClickOnDetailsDropdown) { + this.open = false; + } + } + + handleEscKeyPress(event) { + if (event.code === 'Escape') { + const targetMenu = event.target.closest('details[open]'); + if (targetMenu) { + targetMenu.open = false; + } + } + } + + handleFocusOut(event) { + if (event.relatedTarget && !this.contains(event.relatedTarget)) { + this.open = false; + } + } + + detectHover(event) { + if (this.trigger === 'hover') { + this.open = event.type === 'mouseenter'; + } + } + + needsReverse() { + const totalWidth = this.contentElement.offsetLeft + this.contentElement.clientWidth * 2; + if (totalWidth > window.innerWidth) { + this.contentElement.classList.add('needs-reverse'); + } + } +} + +customElements.define('details-dropdown', DetailsDropdown, { extends: 'details' }); +clearDropdownCount.set(DetailsDropdown, 0); + +class DetailsMega extends DetailsDropdown { + constructor() { + super(); + if (Shopify.designMode) { + this.addEventListener('shopify:block:select', () => { + this.open = true; + }); + + this.addEventListener('shopify:block:deselect', () => { + this.open = false; + }); + } + } + + async showWithTransition() { + // Perform the animation on the first child of the content element + return FoxTheme.Motion.animate( + this.contentElement.firstElementChild, + { + visibility: 'visible', + transform: ['translateY(-100%)', 'translateY(0)'], + }, + { + duration: FoxTheme.config.motionReduced ? 0 : 0.5, + easing: [0.39, 0.575, 0.565, 1.0], + } + ).finished; + } + + async hideWithTransition() { + return FoxTheme.Motion.animate( + this.contentElement.firstElementChild, + { + visibility: 'hidden', + transform: 'translateY(-100%)', + }, + { + duration: FoxTheme.config.motionReduced ? 0 : 0.5, + easing: [0.39, 0.575, 0.565, 1.0], + } + ).finished; + } +} + +customElements.define('details-mega', DetailsMega, { extends: 'details' }); + +class MenuDrawerDetails extends HTMLDetailsElement { + constructor() { + super(); + + this.summary.addEventListener('click', this.onSummaryClick.bind(this)); + this.closeButton.addEventListener('click', this.onCloseButtonClick.bind(this)); + } + + get parent() { + return this.closest('[data-parent]'); + } + + get summary() { + return this.querySelector('summary'); + } + + get closeButton() { + return this.querySelector('button'); + } + + onSummaryClick() { + setTimeout(() => { + this.parent.classList.add('active'); + this.classList.add('active'); + this.summary.setAttribute('aria-expanded', true); + }, 100); + } + + onCloseButtonClick() { + this.parent.classList.remove('active'); + this.classList.remove('active'); + this.summary.setAttribute('aria-expanded', false); + + this.closeAnimation(); + } + + closeAnimation() { + let animationStart; + + const handleAnimation = (time) => { + if (animationStart === undefined) { + animationStart = time; + } + + const elapsedTime = time - animationStart; + + if (elapsedTime < 400) { + window.requestAnimationFrame(handleAnimation); + } else { + this.removeAttribute('open'); + } + }; + + window.requestAnimationFrame(handleAnimation); + } +} +customElements.define('menu-drawer-details', MenuDrawerDetails, { extends: 'details' }); + +class MenuDrawer extends DrawerComponent { + constructor() { + super(); + } + + get header() { + return this.closest('header'); + } + + // get menuItems() { + // if (!this._menuItems) { + // this._menuItems = this.querySelectorAll( + // '.menu-drawer__menus:not(.active) > ul > li, .menu-drawer__menus:not(.active) > .menu-drawer__footer' + // ); + // } + // return this._menuItems; + // } + + get requiresBodyAppended() { + return false; + } + + prepareToShow() { + super.prepareToShow(); + setTimeout(() => { + // this.animateMenuItems(); + }, 300); + + document.documentElement.style.setProperty('--viewport-height', `${window.innerHeight}px`); + document.documentElement.style.setProperty( + '--header-bottom-position', + `${parseInt(this.header.getBoundingClientRect().bottom)}px` + ); + + document.dispatchEvent(new CustomEvent('menu-drawer:open', { bubbles: true })); + } + + // animateMenuItems() { + // FoxTheme.Motion.animate( + // this.menuItems, + // { + // transform: ['translateX(-20px)', 'translateX(0)'], + // opacity: [0, 1], + // }, + // { + // duration: 0.6, + // easing: [0.075, 0.82, 0.165, 1], + // delay: FoxTheme.Motion.stagger(0.1), + // } + // ).finished.then(() => { + // this.menuItems.forEach((item) => item.removeAttribute('style')); + // }); + // } + + handleAfterHide() { + super.handleAfterHide(); + setTimeout(() => { + this.querySelectorAll('details[is=menu-drawer-details]').forEach((menu) => { + menu.onCloseButtonClick(); + }); + }); + } +} +customElements.define('menu-drawer', MenuDrawer); + +class MenuProductList extends HTMLElement { + constructor() { + super(); + this.initSlide(); + this.elementToFocus = this.querySelector('button'); + } + + get container() { + return this.querySelector('.swiper'); + } + + get sliderPagination() { + return this.querySelector('.swiper-pagination'); + } + + get sliderNext() { + return this.querySelector('.swiper-button-next'); + } + + get sliderPrev() { + return this.querySelector('.swiper-button-prev'); + } + + get numberOfColumns() { + return parseInt(this.dataset.columns); + } + + initSlide() { + const slider = new FoxTheme.Carousel(this.container, { + spaceBetween: 10, + slidesPerView: this.numberOfColumns, + loop: false, + navigation: { + nextEl: this.sliderNext, + prevEl: this.sliderPrev, + }, + focusableElements: 'input, select, option, textarea, button, video, label, a', + }); + slider.init(); + + const focusableElements = FoxTheme.a11y.getFocusableElements(this); + + focusableElements.forEach((element) => { + element.addEventListener('focusin', function () { + const slide = element.closest('.swiper-slide'); + + slide && slider.slider.slideTo(slider.slider.slides.indexOf(slide)); + }); + }); + } + + calcNavButtonsPosition() { + if (!this.dataset.calcButtonPosition === 'true') return; + + const firstMedia = this.querySelector('.product-card__image-wrapper'); + if (firstMedia && firstMedia.clientHeight > 0) { + this.style.setProperty('--swiper-navigation-top-offset', parseInt(firstMedia.clientHeight) / 2 + 'px'); + } + } +} +customElements.define('menu-product-list', MenuProductList); + +class MenuSidebar extends HTMLElement { + constructor() { + super(); + this.handleSidenavMenuToggle = this.handleSidenavMenuToggle.bind(this); + this.updateHeight = this.updateHeight.bind(this); + } + + get summarys() { + return this.querySelectorAll('summary'); + } + + connectedCallback() { + this.setInitialMinHeight(); + + const firstSummary = this.summarys[0]; + if (firstSummary) { + this.setActiveItem(firstSummary, false); + } + + this.summarys.forEach((summary) => { + summary.addEventListener('mouseenter', this.handleSidenavMenuToggle); + summary.addEventListener('click', (e) => e.preventDefault()); + }); + + this.setupIntersectionObserver(); + } + + setInitialMinHeight() { + const container = this.closest('.mega-menu__wrapper'); + if (container) { + const parentHeight = container.parentElement.offsetHeight; + container.style.setProperty('--menu-sidebar-height', `${parentHeight}px`); + } + } + + setupIntersectionObserver() { + const observer = new IntersectionObserver((entries) => { + entries.forEach((entry) => { + if (entry.isIntersecting) { + this.updateHeight(); + } + }); + }); + + observer.observe(this); + } + + updateHeight() { + const activeSummary = this.querySelector('.is-visible'); + if (activeSummary) { + const container = this.closest('.mega-menu__wrapper'); + const content = activeSummary.nextElementSibling; + if (container && content) { + container.style.setProperty('--sidebar-height', `${content.scrollHeight}px`); + } + } + } + + setActiveItem(summaryElem, updateHeight = true) { + const lastSidenavElem = this.querySelector('.is-visible'); + if (lastSidenavElem) { + lastSidenavElem.classList.remove('is-visible'); + } + + summaryElem.classList.add('is-visible'); + + if (updateHeight) { + this.updateHeight(); + } + } + + handleSidenavMenuToggle(evt) { + const summaryElem = evt.target; + this.setActiveItem(summaryElem); + } + + disconnectedCallback() { + this.summarys.forEach((summary) => { + summary.removeEventListener('mouseenter', this.handleSidenavMenuToggle); + summary.removeEventListener('click', this.handleClick); + }); + } +} + +customElements.define('menu-sidebar', MenuSidebar); diff --git a/assets/highlight-text-image.js b/assets/highlight-text-image.js new file mode 100644 index 00000000000..694418c9668 --- /dev/null +++ b/assets/highlight-text-image.js @@ -0,0 +1,35 @@ +if (!customElements.get('highlight-text-image')) { + class HighLightTextImage extends HTMLElement { + constructor() { + super(); + + this.sectionId = this.dataset.sectionId; + this.section = this.closest(`.section-${this.sectionId}`); + this.templates = this.section.querySelector("template").content.cloneNode(true); + this.images = {}; + this.init(); + } + + init() { + let contentHTML = this.innerHTML + const images = this.templates.querySelectorAll("[data-id]"); + + images.forEach(image => { + const key = image.dataset.id; + this.images[key] = image; + }); + + contentHTML = contentHTML.replace(/\[img(\d+)\]/g, (match, p1) => { + const imgIndex = `img${p1}`; + const imageWrapper = this.images[imgIndex]; + if (imageWrapper) { + return imageWrapper.innerHTML; + } + return match; + }); + + this.innerHTML = contentHTML + } + } + customElements.define('highlight-text-image', HighLightTextImage); +} \ No newline at end of file diff --git a/assets/icon-3d-model.svg b/assets/icon-3d-model.svg deleted file mode 100644 index 0ed91d3c668..00000000000 --- a/assets/icon-3d-model.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-account.svg b/assets/icon-account.svg index 31c7b28ae82..4db09ad4e35 100644 --- a/assets/icon-account.svg +++ b/assets/icon-account.svg @@ -1 +1,9 @@ - + diff --git a/assets/icon-apple.svg b/assets/icon-apple.svg deleted file mode 100644 index f42568143b1..00000000000 --- a/assets/icon-apple.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-approximate-equal.svg b/assets/icon-approximate-equal.svg new file mode 100644 index 00000000000..58d2ca83d4f --- /dev/null +++ b/assets/icon-approximate-equal.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icon-arrow-left.svg b/assets/icon-arrow-left.svg new file mode 100644 index 00000000000..4cc530b1caa --- /dev/null +++ b/assets/icon-arrow-left.svg @@ -0,0 +1,13 @@ + diff --git a/assets/icon-arrow-right.svg b/assets/icon-arrow-right.svg new file mode 100644 index 00000000000..e0053f51d07 --- /dev/null +++ b/assets/icon-arrow-right.svg @@ -0,0 +1,9 @@ + + + + diff --git a/assets/icon-arrow.svg b/assets/icon-arrow.svg deleted file mode 100644 index 562b93d1297..00000000000 --- a/assets/icon-arrow.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-banana.svg b/assets/icon-banana.svg deleted file mode 100644 index e891f6deea9..00000000000 --- a/assets/icon-banana.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-bottle.svg b/assets/icon-bottle.svg deleted file mode 100644 index 2b5c77c2b73..00000000000 --- a/assets/icon-bottle.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-box.svg b/assets/icon-box.svg deleted file mode 100644 index bf7ef8898ff..00000000000 --- a/assets/icon-box.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-caret-left.svg b/assets/icon-caret-left.svg new file mode 100644 index 00000000000..07dac23d333 --- /dev/null +++ b/assets/icon-caret-left.svg @@ -0,0 +1,8 @@ + + + diff --git a/assets/icon-caret-right.svg b/assets/icon-caret-right.svg new file mode 100644 index 00000000000..d36a80caa49 --- /dev/null +++ b/assets/icon-caret-right.svg @@ -0,0 +1,8 @@ + + + diff --git a/assets/icon-caret.svg b/assets/icon-caret.svg deleted file mode 100644 index 47d0848f00a..00000000000 --- a/assets/icon-caret.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-carrot.svg b/assets/icon-carrot.svg deleted file mode 100644 index 0d79780759c..00000000000 --- a/assets/icon-carrot.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-cart-empty.svg b/assets/icon-cart-empty.svg deleted file mode 100644 index fb80f283371..00000000000 --- a/assets/icon-cart-empty.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-cart.svg b/assets/icon-cart.svg index c662b14f62d..60ed04cf915 100644 --- a/assets/icon-cart.svg +++ b/assets/icon-cart.svg @@ -1 +1,10 @@ - + + + + + diff --git a/assets/icon-chat-bubble.svg b/assets/icon-chat-bubble.svg deleted file mode 100644 index 03511cb430d..00000000000 --- a/assets/icon-chat-bubble.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-chat.svg b/assets/icon-chat.svg new file mode 100644 index 00000000000..02fd5b4222c --- /dev/null +++ b/assets/icon-chat.svg @@ -0,0 +1 @@ + diff --git a/assets/icon-check-mark.svg b/assets/icon-check-mark.svg deleted file mode 100644 index f46543450ad..00000000000 --- a/assets/icon-check-mark.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-checkmark.svg b/assets/icon-checkmark.svg deleted file mode 100644 index 676f3262a5b..00000000000 --- a/assets/icon-checkmark.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-clipboard.svg b/assets/icon-clipboard.svg deleted file mode 100644 index f8c194473d6..00000000000 --- a/assets/icon-clipboard.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/icon-close-small.svg b/assets/icon-close-small.svg deleted file mode 100644 index 817bd56ea47..00000000000 --- a/assets/icon-close-small.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-close.svg b/assets/icon-close.svg index 0d9e48634c9..df0b2e6acca 100644 --- a/assets/icon-close.svg +++ b/assets/icon-close.svg @@ -1 +1,11 @@ - + diff --git a/assets/icon-copy.svg b/assets/icon-copy.svg deleted file mode 100644 index c001fc9d700..00000000000 --- a/assets/icon-copy.svg +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/assets/icon-dairy-free.svg b/assets/icon-dairy-free.svg deleted file mode 100644 index 30fe522d4fd..00000000000 --- a/assets/icon-dairy-free.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-dairy.svg b/assets/icon-dairy.svg deleted file mode 100644 index d53874b002e..00000000000 --- a/assets/icon-dairy.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-discount.svg b/assets/icon-discount.svg deleted file mode 100644 index 78c2be8b5be..00000000000 --- a/assets/icon-discount.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-download.svg b/assets/icon-download.svg new file mode 100644 index 00000000000..0c2d6cf13a7 --- /dev/null +++ b/assets/icon-download.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icon-dryer.svg b/assets/icon-dryer.svg deleted file mode 100644 index 04796df686c..00000000000 --- a/assets/icon-dryer.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-error.svg b/assets/icon-error.svg deleted file mode 100644 index 451c189615e..00000000000 --- a/assets/icon-error.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-eye.svg b/assets/icon-eye.svg deleted file mode 100644 index 4bbfbc680f2..00000000000 --- a/assets/icon-eye.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-facebook.svg b/assets/icon-facebook.svg deleted file mode 100644 index e0e3ef2a992..00000000000 --- a/assets/icon-facebook.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-filter.svg b/assets/icon-filter.svg deleted file mode 100644 index 69a73781d62..00000000000 --- a/assets/icon-filter.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-fire.svg b/assets/icon-fire.svg deleted file mode 100644 index f0240003d03..00000000000 --- a/assets/icon-fire.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-gluten-free.svg b/assets/icon-gluten-free.svg deleted file mode 100644 index 02136230ea9..00000000000 --- a/assets/icon-gluten-free.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-hamburger.svg b/assets/icon-hamburger.svg index 613bbb710f3..6e9993d79a2 100644 --- a/assets/icon-hamburger.svg +++ b/assets/icon-hamburger.svg @@ -1 +1,10 @@ - + + + + + diff --git a/assets/icon-headphone.svg b/assets/icon-headphone.svg new file mode 100644 index 00000000000..d2d5e99dbdf --- /dev/null +++ b/assets/icon-headphone.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icon-heart.svg b/assets/icon-heart.svg index 7cb69e45897..2689c0aba2e 100644 --- a/assets/icon-heart.svg +++ b/assets/icon-heart.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/assets/icon-home.svg b/assets/icon-home.svg new file mode 100644 index 00000000000..9fe5dff9105 --- /dev/null +++ b/assets/icon-home.svg @@ -0,0 +1,8 @@ + + + diff --git a/assets/icon-info.svg b/assets/icon-info.svg deleted file mode 100644 index 031c0f02221..00000000000 --- a/assets/icon-info.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-instagram.svg b/assets/icon-instagram.svg deleted file mode 100644 index af0c85eb91c..00000000000 --- a/assets/icon-instagram.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-inventory-status.svg b/assets/icon-inventory-status.svg deleted file mode 100644 index 022826312e4..00000000000 --- a/assets/icon-inventory-status.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-iron.svg b/assets/icon-iron.svg deleted file mode 100644 index b3fcf0cd17b..00000000000 --- a/assets/icon-iron.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-leaf.svg b/assets/icon-leaf.svg deleted file mode 100644 index d41a5bf9f6c..00000000000 --- a/assets/icon-leaf.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-leather.svg b/assets/icon-leather.svg deleted file mode 100644 index fe0e5bb04a3..00000000000 --- a/assets/icon-leather.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-lightning-bolt.svg b/assets/icon-lightning-bolt.svg deleted file mode 100644 index 41f02b9d46c..00000000000 --- a/assets/icon-lightning-bolt.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-lipstick.svg b/assets/icon-lipstick.svg deleted file mode 100644 index 8c74b34268f..00000000000 --- a/assets/icon-lipstick.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-lock.svg b/assets/icon-lock.svg deleted file mode 100644 index fbf76ff0744..00000000000 --- a/assets/icon-lock.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-map-pin.svg b/assets/icon-map-pin.svg deleted file mode 100644 index da0d5206d79..00000000000 --- a/assets/icon-map-pin.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-minus.svg b/assets/icon-minus.svg deleted file mode 100644 index a1ec0d0814e..00000000000 --- a/assets/icon-minus.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-nut-free.svg b/assets/icon-nut-free.svg deleted file mode 100644 index b8fef8f3f4e..00000000000 --- a/assets/icon-nut-free.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-padlock.svg b/assets/icon-padlock.svg deleted file mode 100644 index 50a0af1862d..00000000000 --- a/assets/icon-padlock.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-pants.svg b/assets/icon-pants.svg deleted file mode 100644 index eef2414f56e..00000000000 --- a/assets/icon-pants.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-pause.svg b/assets/icon-pause.svg index cb47bfb71c2..74b0e91917a 100644 --- a/assets/icon-pause.svg +++ b/assets/icon-pause.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/assets/icon-paw-print.svg b/assets/icon-paw-print.svg deleted file mode 100644 index e350a938400..00000000000 --- a/assets/icon-paw-print.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-pencil.svg b/assets/icon-pencil.svg new file mode 100644 index 00000000000..e2930b5b3b5 --- /dev/null +++ b/assets/icon-pencil.svg @@ -0,0 +1,10 @@ + + + + diff --git a/assets/icon-pepper.svg b/assets/icon-pepper.svg deleted file mode 100644 index f9bcea33f33..00000000000 --- a/assets/icon-pepper.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-perfume.svg b/assets/icon-perfume.svg deleted file mode 100644 index 6110d200e23..00000000000 --- a/assets/icon-perfume.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-pinterest.svg b/assets/icon-pinterest.svg deleted file mode 100644 index ee6935808e8..00000000000 --- a/assets/icon-pinterest.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-plane.svg b/assets/icon-plane.svg deleted file mode 100644 index c1036946a64..00000000000 --- a/assets/icon-plane.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-plant.svg b/assets/icon-plant.svg deleted file mode 100644 index 67307e31092..00000000000 --- a/assets/icon-plant.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-play-outline.svg b/assets/icon-play-outline.svg new file mode 100644 index 00000000000..a35595386eb --- /dev/null +++ b/assets/icon-play-outline.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icon-play.svg b/assets/icon-play.svg deleted file mode 100644 index d7db603bc44..00000000000 --- a/assets/icon-play.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-plus.svg b/assets/icon-plus.svg index e7f138b8578..e331ded5b52 100644 --- a/assets/icon-plus.svg +++ b/assets/icon-plus.svg @@ -1 +1,11 @@ - + \ No newline at end of file diff --git a/assets/icon-price-tag.svg b/assets/icon-price-tag.svg deleted file mode 100644 index f0436688d7b..00000000000 --- a/assets/icon-price-tag.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-question-mark.svg b/assets/icon-question-mark.svg deleted file mode 100644 index 152f08d53a4..00000000000 --- a/assets/icon-question-mark.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-recycle.svg b/assets/icon-recycle.svg deleted file mode 100644 index fbf8a7098ee..00000000000 --- a/assets/icon-recycle.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-remove.svg b/assets/icon-remove.svg deleted file mode 100644 index 091fd038bf3..00000000000 --- a/assets/icon-remove.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-reset.svg b/assets/icon-reset.svg deleted file mode 100644 index 0c1aa0a9e1a..00000000000 --- a/assets/icon-reset.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-return.svg b/assets/icon-return.svg deleted file mode 100644 index 6a5c8f1cef0..00000000000 --- a/assets/icon-return.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-ruler.svg b/assets/icon-ruler.svg deleted file mode 100644 index d42789757ac..00000000000 --- a/assets/icon-ruler.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-search.svg b/assets/icon-search.svg index b747f54208d..43a98162ba1 100644 --- a/assets/icon-search.svg +++ b/assets/icon-search.svg @@ -1 +1,9 @@ - + + + + diff --git a/assets/icon-serving-dish.svg b/assets/icon-serving-dish.svg deleted file mode 100644 index 800626db3ec..00000000000 --- a/assets/icon-serving-dish.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-setting.svg b/assets/icon-setting.svg new file mode 100644 index 00000000000..bb626b940ec --- /dev/null +++ b/assets/icon-setting.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icon-share.svg b/assets/icon-share.svg deleted file mode 100644 index 84611d30bc6..00000000000 --- a/assets/icon-share.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-shirt.svg b/assets/icon-shirt.svg deleted file mode 100644 index 3281794aab3..00000000000 --- a/assets/icon-shirt.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-shoe.svg b/assets/icon-shoe.svg deleted file mode 100644 index b0975084b8a..00000000000 --- a/assets/icon-shoe.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-shopify.svg b/assets/icon-shopify.svg deleted file mode 100644 index b6a58bf8d84..00000000000 --- a/assets/icon-shopify.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-sign-in.svg b/assets/icon-sign-in.svg new file mode 100644 index 00000000000..d677f18a845 --- /dev/null +++ b/assets/icon-sign-in.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icon-silhouette.svg b/assets/icon-silhouette.svg deleted file mode 100644 index b2b32b4a625..00000000000 --- a/assets/icon-silhouette.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-snapchat.svg b/assets/icon-snapchat.svg deleted file mode 100644 index 150993237b2..00000000000 --- a/assets/icon-snapchat.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-snowflake.svg b/assets/icon-snowflake.svg deleted file mode 100644 index afa00097a67..00000000000 --- a/assets/icon-snowflake.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-speaker-hifi.svg b/assets/icon-speaker-hifi.svg new file mode 100644 index 00000000000..8386f09d60b --- /dev/null +++ b/assets/icon-speaker-hifi.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/assets/icon-speaker.svg b/assets/icon-speaker.svg new file mode 100644 index 00000000000..10eaeea2445 --- /dev/null +++ b/assets/icon-speaker.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icon-star.svg b/assets/icon-star.svg deleted file mode 100644 index 0982e97996f..00000000000 --- a/assets/icon-star.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-stop.svg b/assets/icon-stop.svg new file mode 100644 index 00000000000..ad9af4d2ddd --- /dev/null +++ b/assets/icon-stop.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icon-stopwatch.svg b/assets/icon-stopwatch.svg deleted file mode 100644 index 403adcfe2c4..00000000000 --- a/assets/icon-stopwatch.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-success.svg b/assets/icon-success.svg deleted file mode 100644 index b4e2b95fc97..00000000000 --- a/assets/icon-success.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-tick.svg b/assets/icon-tick.svg deleted file mode 100644 index 5e24b1bcab3..00000000000 --- a/assets/icon-tick.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-tiktok.svg b/assets/icon-tiktok.svg deleted file mode 100644 index e4c29422f2d..00000000000 --- a/assets/icon-tiktok.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-truck.svg b/assets/icon-truck.svg deleted file mode 100644 index 731cce89052..00000000000 --- a/assets/icon-truck.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-tumblr.svg b/assets/icon-tumblr.svg deleted file mode 100644 index df8c452167e..00000000000 --- a/assets/icon-tumblr.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-twitter.svg b/assets/icon-twitter.svg deleted file mode 100644 index 2d9d4eabebc..00000000000 --- a/assets/icon-twitter.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-unavailable.svg b/assets/icon-unavailable.svg deleted file mode 100644 index 1c29a803734..00000000000 --- a/assets/icon-unavailable.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-upload.svg b/assets/icon-upload.svg new file mode 100644 index 00000000000..98f894bddf7 --- /dev/null +++ b/assets/icon-upload.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icon-vimeo.svg b/assets/icon-vimeo.svg deleted file mode 100644 index a8c8c1424b4..00000000000 --- a/assets/icon-vimeo.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-washing.svg b/assets/icon-washing.svg deleted file mode 100644 index 365a961cfac..00000000000 --- a/assets/icon-washing.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-youtube.svg b/assets/icon-youtube.svg deleted file mode 100644 index c2e2ee694d1..00000000000 --- a/assets/icon-youtube.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/icon-zoom.svg b/assets/icon-zoom.svg deleted file mode 100644 index f4ac1c736e5..00000000000 --- a/assets/icon-zoom.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/image-cards.js b/assets/image-cards.js new file mode 100644 index 00000000000..3f1d733b10c --- /dev/null +++ b/assets/image-cards.js @@ -0,0 +1,113 @@ +if (!customElements.get('image-cards')) { + customElements.define( + 'image-cards', + class ImageCards extends HTMLElement { + constructor() { + super(); + } + + connectedCallback() { + this.selectors = { + sliderWrapper: '.image-cards__inner', + nextEl: '.swiper-button-next', + prevEl: '.swiper-button-prev', + pagination: '.swiper-pagination', + }; + this.classes = { + grid: 'f-grid', + swiper: 'swiper', + swiperWrapper: 'swiper-wrapper', + }; + + this.sectionId = this.dataset.sectionId; + this.sectionEl = this.closest(`.section-${this.sectionId}`); + this.sliderWrapper = this.querySelector(this.selectors.sliderWrapper); + + this.enableSlider = this.dataset.enableSlider === 'true'; + this.items = parseInt(this.dataset.items); + this.tabletItems = parseInt(this.dataset.tabletItems); + this.laptopItems = parseInt(this.dataset.laptopItems); + this.paginationType = this.dataset.paginationType || 'bullets'; + + this.sliderInstance = false; + + if (!this.enableSlider) return; + + const mql = window.matchMedia(FoxTheme.config.mediaQueryMobile); + mql.onchange = this.init.bind(this); + this.init(); + } + + init() { + if (FoxTheme.config.mqlMobile) { + this.destroySlider(); + } else { + this.initSlider(); + } + } + + initSlider() { + if (typeof this.sliderInstance === 'object') return; + const columnGap = window.getComputedStyle(this.sliderWrapper).getPropertyValue('--f-column-gap'); + const spaceBetween = parseFloat(columnGap.replace('rem', '')) * 10; + + this.sliderOptions = { + slidesPerView: 2, + spaceBetween: spaceBetween, + navigation: { + nextEl: this.sectionEl.querySelector(this.selectors.nextEl), + prevEl: this.sectionEl.querySelector(this.selectors.prevEl), + }, + pagination: { + el: this.sectionEl.querySelector(this.selectors.pagination), + type: this.paginationType, + }, + breakpoints: { + 768: { + slidesPerView: this.tabletItems, + }, + 1024: { + slidesPerView: this.laptopItems, + }, + 1280: { + slidesPerView: this.items, + }, + }, + loop: false, + threshold: 2, + watchSlidesProgress: true, + mousewheel: { + enabled: true, + forceToAxis: true, + }, + }; + + this.classList.add(this.classes.swiper); + this.sliderWrapper.classList.remove(this.classes.grid); + this.sliderWrapper.classList.add(this.classes.swiperWrapper); + + this.sliderInstance = new window.FoxTheme.Carousel(this, this.sliderOptions, [FoxTheme.Swiper.Mousewheel]); + this.sliderInstance.init(); + + if (Shopify.designMode && typeof this.sliderInstance === 'object') { + document.addEventListener('shopify:block:select', (e) => { + if (e.detail.sectionId != this.sectionId) return; + let { target } = e; + const index = Number(target.dataset.index); + + this.sliderInstance.slider.slideTo(index); + }); + } + } + + destroySlider() { + this.classList.remove(this.classes.swiper); + this.sliderWrapper.classList.remove(this.classes.swiperWrapper); + this.sliderWrapper.classList.add(this.classes.grid); + if (typeof this.sliderInstance !== 'object') return; + this.sliderInstance.slider.destroy(); + this.sliderInstance = false; + } + } + ); +} diff --git a/assets/image-comparison.js b/assets/image-comparison.js new file mode 100644 index 00000000000..9d18c87947e --- /dev/null +++ b/assets/image-comparison.js @@ -0,0 +1,86 @@ +if (!customElements.get('image-comparison')) { + customElements.define( + 'image-comparison', + class ImageComparison extends HTMLElement { + constructor() { + super(); + + this.button = this.querySelector('button'); + this.isHorizontal = this.dataset.direction === 'horizontal'; + + this.startDrag = this.onStartDrag.bind(this); + this.drag = this.onDrag.bind(this); + this.stopDrag = this.onStopDrag.bind(this); + + this.init(); + + if (!FoxTheme.config.motionReduced) { + FoxTheme.Motion.inView(this.querySelector('.image-comparison__animation-trigger'), this.animation.bind(this)); + } + } + + init() { + this.buttonIcon = this.button.querySelector('span'); + this.offset = this.buttonIcon ? this.buttonIcon.offsetWidth / 2 : 20; + + this.button.addEventListener('touchstart', this.startDrag); + this.button.addEventListener('mousedown', this.startDrag); + } + + animation() { + this.setAttribute('is-visible', ''); + this.classList.add('is-animating'); + setTimeout(() => { + this.classList.remove('is-animating'); + }, 1e3); + } + + onStartDrag(e) { + e.preventDefault(); + document.body.classList.add('body-no-scrollbar'); + this.classList.add('is-dragging'); + + if (e.type === 'mousedown') { + document.addEventListener('mousemove', this.drag); + document.addEventListener('mouseup', this.stopDrag); + } else if (e.type === 'touchstart') { + document.addEventListener('touchmove', this.drag); + document.addEventListener('touchend', this.stopDrag); + } + } + + onStopDrag() { + document.body.classList.remove('body-no-scrollbar'); + this.classList.remove('is-dragging'); + + document.removeEventListener('mousemove', this.drag); + document.removeEventListener('mouseup', this.stopDrag); + + document.removeEventListener('touchmove', this.drag); + document.removeEventListener('touchend', this.stopDrag); + } + + onDrag(e) { + const event = (e.touches && e.touches[0]) || e; + let x, distance; + if (this.isHorizontal) { + x = event.pageX - this.offsetLeft; + distance = this.clientWidth; + + if (FoxTheme.config.isRTL) { + x = distance - x; // Reverse the x position for RTL + } + } else { + x = event.pageY - this.offsetTop; + distance = this.clientHeight; + } + + const max = distance - this.offset; + const min = this.offset; + const mouseX = Math.max(min, Math.min(x, max)); + const mousePercent = (mouseX * 100) / distance; + this.style.setProperty('--percent', mousePercent + '%'); + } + } + ); +} diff --git a/assets/image-with-text-slider.js b/assets/image-with-text-slider.js new file mode 100644 index 00000000000..6c89e7154de --- /dev/null +++ b/assets/image-with-text-slider.js @@ -0,0 +1,201 @@ +if (!customElements.get('image-with-text-slider')) { + customElements.define( + 'image-with-text-slider', + class ImageWithTextSlider extends HTMLElement { + constructor() { + super(); + } + + connectedCallback() { + this.enableSlider = this.dataset.enableSlider === 'true'; + + this.swipers = this.querySelectorAll('.swiper'); + this.sliderControls = this.querySelector('.swiper-controls'); + this.sectionId = this.dataset.sectionId; + this.selectedIndex = this.selectedIndex; + this.swiperInstances = []; + + if (!this.enableSlider) return; + this.initSlider(); + } + + static get observedAttributes() { + return ['selected-index']; + } + + get selectedIndex() { + return parseInt(this.getAttribute('selected-index')) || 0; + } + + set selectedIndex(index) { + this.setAttribute('selected-index', `${index}`); + } + + initSlider() { + const additionModules = [FoxTheme.Swiper.Autoplay, FoxTheme.Swiper.EffectFade]; + + this.swipers.forEach((swiper) => { + const autoplayDelay = parseInt(swiper.dataset.autoplay); + const sliderOptions = { + slidesPerView: 1, + loop: true, + effect: 'fade', + fadeEffect: { crossFade: true }, + ...(this.sliderControls && { + navigation: { + nextEl: this.sliderControls.querySelector('.swiper-button-next'), + prevEl: this.sliderControls.querySelector('.swiper-button-prev'), + }, + }), + pagination: { + el: this.querySelector('.swiper-pagination'), + clickable: true, + }, + on: { + init: this.handleAfterInit.bind(this), + }, + ...(autoplayDelay > 0 && { + autoplay: { + delay: autoplayDelay, + disableOnInteraction: false, + }, + }), + }; + + const sliderInstance = new window.FoxTheme.Carousel(swiper, sliderOptions, additionModules); + sliderInstance.init(); + this.swiperInstances.push(sliderInstance); + + //Trigger update UI on init + this.updateActiveSlide(sliderInstance.slider) + + //handle real slide change + sliderInstance.slider.on('realIndexChange', (swiperInstance) => { + this.handleSlideChange(swiperInstance, swiper); + }); + sliderInstance.slider.on('slideChange', () => { + const currentIndex = sliderInstance.slider.realIndex; + this.swiperInstances.forEach((instance) => { + if (instance.slider !== sliderInstance.slider) { + instance.slider.slideToLoop(currentIndex); + } + }); + }); + }); + + //Shopify desgin mode + if (Shopify.designMode) { + document.addEventListener('shopify:block:select', (e) => { + if (e.detail.sectionId !== this.sectionId) return; + const index = Number(e.target.dataset.index); + this.swiperInstances.forEach((instance) => { + if (instance && instance.slider) { + instance.slider.slideToLoop(index); + } + this.updateActiveSlide(instance.slider); + }); + }); + } + } + + updateActiveSlide(slider) { + const { slides, activeIndex } = slider; + this.updateControlsScheme(slides[activeIndex]); + this.updateContentScheme(slides[activeIndex]); + this.updateControlsPadding(slides[activeIndex]); + } + + onReady(selectedElement) { + if (!FoxTheme.config.motionReduced) { + const motionEls = selectedElement.querySelectorAll('motion-element'); + motionEls.forEach((motionEl) => { + motionEl && motionEl.refreshAnimation(); + }); + } + } + + handleAfterInit() { + if (this.sliderControls) { + const activeBullet = this.sliderControls.querySelector('.swiper-pagination-bullet-active'); + + if (activeBullet) { + activeBullet.classList.remove('swiper-pagination-bullet-active'); + activeBullet.offsetHeight; + activeBullet.classList.add('swiper-pagination-bullet-active'); + } + } + } + + handleSlideChange(swiper) { + const { slides, realIndex, activeIndex } = swiper; + this.selectedIndex = realIndex; + + this.updateControlsScheme(slides[activeIndex]); + this.updateContentScheme(slides[activeIndex]); + this.updateControlsPadding(slides[activeIndex]); + } + + attributeChangedCallback(name, oldValue, newValue) { + if (name === 'selected-index' && oldValue !== null && oldValue !== newValue) { + const fromElements = this.querySelectorAll(`[data-swiper-slide-index="${oldValue}"]`); + const toElements = this.querySelectorAll(`[data-swiper-slide-index="${newValue}"]`); + + fromElements.forEach((fromElement) => { + const motionEls = fromElement.querySelectorAll('motion-element'); + motionEls && + motionEls.forEach((motionEl) => { + if (motionEl.hasAttribute('data-text')) { + motionEl.resetAnimation(); + } + }); + }); + + toElements.forEach((toElement) => { + setTimeout(() => { + if (toElement.classList.contains('swiper-slide-active')) { + const motionEls = toElement.querySelectorAll('motion-element'); + motionEls.forEach((motionEl) => { + motionEl && motionEl.refreshAnimation(); + }); + } + }); + }); + } + } + + updateControlsScheme(activeSlide) { + if (this.sliderControls) { + const classesToRemove = Array.from(this.sliderControls.classList).filter((className) => + className.startsWith('color-') + ); + classesToRemove.forEach((className) => this.sliderControls.classList.remove(className)); + const colorScheme = activeSlide.dataset.colorScheme; + this.sliderControls.classList.add(colorScheme); + } + } + + updateContentScheme(activeSlide) { + const classesToRemove = Array.from(this.querySelector('.image-slider__content').classList).filter((className) => + className.startsWith('color-') + ); + classesToRemove.forEach((className) => + this.querySelector('.image-slider__content').classList.remove(className) + ); + const colorScheme = activeSlide.dataset.colorScheme; + this.querySelector('.image-slider__content').classList.add(colorScheme); + } + + updateControlsPadding(activeSlide) { + if (this.sliderControls) { + const controlsElement = Array.from(this.sliderControls.classList).filter((className) => + className.startsWith('color-inherit') + ); + + controlsElement.forEach((className) => this.sliderControls.classList.remove(className)); + const paddingCustom = activeSlide.dataset.padding === 'custom'; + this.sliderControls.classList.toggle('color-inherit', paddingCustom); + } + } + } + ); +} diff --git a/assets/loading-spinner.svg b/assets/loading-spinner.svg deleted file mode 100644 index 913484cabe8..00000000000 --- a/assets/loading-spinner.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/localization-form.js b/assets/localization-form.js index 3eff4e41d4b..e69de29bb2d 100644 --- a/assets/localization-form.js +++ b/assets/localization-form.js @@ -1,206 +0,0 @@ -if (!customElements.get('localization-form')) { - customElements.define( - 'localization-form', - class LocalizationForm extends HTMLElement { - constructor() { - super(); - this.mql = window.matchMedia('(min-width: 750px)'); - this.header = document.querySelector('.header-wrapper'); - this.elements = { - input: this.querySelector('input[name="locale_code"], input[name="country_code"]'), - button: this.querySelector('button.localization-form__select'), - panel: this.querySelector('.disclosure__list-wrapper'), - search: this.querySelector('input[name="country_filter"]'), - closeButton: this.querySelector('.country-selector__close-button'), - resetButton: this.querySelector('.country-filter__reset-button'), - searchIcon: this.querySelector('.country-filter__search-icon'), - liveRegion: this.querySelector('#sr-country-search-results'), - }; - this.addEventListener('keyup', this.onContainerKeyUp.bind(this)); - this.addEventListener('keydown', this.onContainerKeyDown.bind(this)); - this.addEventListener('focusout', this.closeSelector.bind(this)); - this.elements.button.addEventListener('click', this.openSelector.bind(this)); - - if (this.elements.search) { - this.elements.search.addEventListener('keyup', this.filterCountries.bind(this)); - this.elements.search.addEventListener('focus', this.onSearchFocus.bind(this)); - this.elements.search.addEventListener('blur', this.onSearchBlur.bind(this)); - this.elements.search.addEventListener('keydown', this.onSearchKeyDown.bind(this)); - } - if (this.elements.closeButton) { - this.elements.closeButton.addEventListener('click', this.hidePanel.bind(this)); - } - if (this.elements.resetButton) { - this.elements.resetButton.addEventListener('click', this.resetFilter.bind(this)); - this.elements.resetButton.addEventListener('mousedown', (event) => event.preventDefault()); - } - - this.querySelectorAll('a').forEach((item) => item.addEventListener('click', this.onItemClick.bind(this))); - } - - hidePanel() { - this.elements.button.setAttribute('aria-expanded', 'false'); - this.elements.panel.setAttribute('hidden', true); - if (this.elements.search) { - this.elements.search.value = ''; - this.filterCountries(); - this.elements.search.setAttribute('aria-activedescendant', ''); - } - document.body.classList.remove('overflow-hidden-mobile'); - document.querySelector('.menu-drawer').classList.remove('country-selector-open'); - this.header.preventHide = false; - } - - onContainerKeyDown(event) { - const focusableItems = Array.from(this.querySelectorAll('a')).filter( - (item) => !item.parentElement.classList.contains('hidden') - ); - let focusedItemIndex = focusableItems.findIndex((item) => item === document.activeElement); - let itemToFocus; - - switch (event.code.toUpperCase()) { - case 'ARROWUP': - event.preventDefault(); - itemToFocus = - focusedItemIndex > 0 ? focusableItems[focusedItemIndex - 1] : focusableItems[focusableItems.length - 1]; - itemToFocus.focus(); - break; - case 'ARROWDOWN': - event.preventDefault(); - itemToFocus = - focusedItemIndex < focusableItems.length - 1 ? focusableItems[focusedItemIndex + 1] : focusableItems[0]; - itemToFocus.focus(); - break; - } - - if (!this.elements.search) return; - - setTimeout(() => { - focusedItemIndex = focusableItems.findIndex((item) => item === document.activeElement); - if (focusedItemIndex > -1) { - this.elements.search.setAttribute('aria-activedescendant', focusableItems[focusedItemIndex].id); - } else { - this.elements.search.setAttribute('aria-activedescendant', ''); - } - }); - } - - onContainerKeyUp(event) { - event.preventDefault(); - - switch (event.code.toUpperCase()) { - case 'ESCAPE': - if (this.elements.button.getAttribute('aria-expanded') == 'false') return; - this.hidePanel(); - event.stopPropagation(); - this.elements.button.focus(); - break; - case 'SPACE': - if (this.elements.button.getAttribute('aria-expanded') == 'true') return; - this.openSelector(); - break; - } - } - - onItemClick(event) { - event.preventDefault(); - const form = this.querySelector('form'); - this.elements.input.value = event.currentTarget.dataset.value; - if (form) form.submit(); - } - - openSelector() { - this.elements.button.focus(); - this.elements.panel.toggleAttribute('hidden'); - this.elements.button.setAttribute( - 'aria-expanded', - (this.elements.button.getAttribute('aria-expanded') === 'false').toString() - ); - if (!document.body.classList.contains('overflow-hidden-tablet')) { - document.body.classList.add('overflow-hidden-mobile'); - } - if (this.elements.search && this.mql.matches) { - this.elements.search.focus(); - } - if (this.hasAttribute('data-prevent-hide')) { - this.header.preventHide = true; - } - document.querySelector('.menu-drawer').classList.add('country-selector-open'); - } - - closeSelector(event) { - if ( - event.target.classList.contains('country-selector__overlay') || - !this.contains(event.target) || - !this.contains(event.relatedTarget) - ) { - this.hidePanel(); - } - } - - normalizeString(str) { - return str - .normalize('NFD') - .replace(/\p{Diacritic}/gu, '') - .toLowerCase(); - } - - filterCountries() { - const searchValue = this.normalizeString(this.elements.search.value); - const popularCountries = this.querySelector('.popular-countries'); - const allCountries = this.querySelectorAll('a'); - let visibleCountries = allCountries.length; - - this.elements.resetButton.classList.toggle('hidden', !searchValue); - - if (popularCountries) { - popularCountries.classList.toggle('hidden', searchValue); - } - - allCountries.forEach((item) => { - const countryName = this.normalizeString(item.querySelector('.country').textContent); - if (countryName.indexOf(searchValue) > -1) { - item.parentElement.classList.remove('hidden'); - visibleCountries++; - } else { - item.parentElement.classList.add('hidden'); - visibleCountries--; - } - }); - - if (this.elements.liveRegion) { - this.elements.liveRegion.innerHTML = window.accessibilityStrings.countrySelectorSearchCount.replace( - '[count]', - visibleCountries - ); - } - - this.querySelector('.country-selector').scrollTop = 0; - this.querySelector('.country-selector__list').scrollTop = 0; - } - - resetFilter(event) { - event.stopPropagation(); - this.elements.search.value = ''; - this.filterCountries(); - this.elements.search.focus(); - } - - onSearchFocus() { - this.elements.searchIcon.classList.add('country-filter__search-icon--hidden'); - } - - onSearchBlur() { - if (!this.elements.search.value) { - this.elements.searchIcon.classList.remove('country-filter__search-icon--hidden'); - } - } - - onSearchKeyDown(event) { - if (event.code.toUpperCase() === 'ENTER') { - event.preventDefault(); - } - } - } - ); -} diff --git a/assets/lookbook-card.js b/assets/lookbook-card.js new file mode 100644 index 00000000000..3b63851b396 --- /dev/null +++ b/assets/lookbook-card.js @@ -0,0 +1,75 @@ +if (!customElements.get('lookbook-card')) { + customElements.define( + 'lookbook-card', + class LookbookCard extends ModalComponent { + constructor() { + super(); + + this.card = this.closest('.lbcard'); + + const mql = window.matchMedia(FoxTheme.config.mediaQueryMobile); + mql.onchange = () => { + this.removeAttribute('open'); + document.body.classList.remove(this.classes.show); + }; + } + + get isLockingNeeded() { + return FoxTheme.config.mqlMobile; + } + + get requiresBodyAppended() { + return FoxTheme.config.mqlMobile; + } + + prepareToShow() { + super.prepareToShow(); + + this.card.classList.add('is-open'); + } + + handleAfterHide() { + super.handleAfterHide(); + + this.card.classList.remove('is-open'); + } + } + ); +} + +if (!customElements.get('lookbook-card-wrapper')) { + customElements.define( + 'lookbook-card-wrapper', + class LookbookCardWrapper extends HTMLElement { + constructor() { + super(); + } + + get video() { + return this.querySelector('video-element'); + } + + connectedCallback() { + if (!this.video) return; + + this.addEventListener('mouseleave', this.handleMouseInteraction.bind(this, 'leave')); + this.addEventListener('mouseenter', this.handleMouseInteraction.bind(this, 'enter')); + } + + disconnectedCallback() { + this.removeEventListener('mouseleave'); + this.removeEventListener('mouseenter'); + } + + handleMouseInteraction(type, event) { + if (type === 'enter') { + this.classList.add('is-hovering'); + this.video.play(); + } else { + this.classList.remove('is-hovering'); + this.video.pause(); + } + } + } + ); +} \ No newline at end of file diff --git a/assets/lookbook-icon.js b/assets/lookbook-icon.js new file mode 100644 index 00000000000..114912fb149 --- /dev/null +++ b/assets/lookbook-icon.js @@ -0,0 +1,69 @@ +if (!customElements.get('lookbook-icon')) { + customElements.define( + 'lookbook-icon', + class LookbookIcon extends HTMLElement { + constructor() { + super(); + + this.selectors = { + cardContainer: '.lookbook-card', + cardProduct: '.lookbook-icon__card', + }; + + this.cardContainer = this.closest(this.selectors.cardContainer); + this.cardProduct = this.querySelector(this.selectors.cardProduct); + + this.init(); + document.addEventListener('matchMobile', () => { + this.init(); + }); + document.addEventListener('unmatchMobile', () => { + this.init(); + }); + this.addEventListener('mouseover', this.init.bind(this)); + } + + disconnectedCallback() { + this.removeEventListener('mouseover', this.init.bind(this)); + } + + init() { + this.classes = ''; + if (this.cardProduct) { + this.cardContainerOffsetX = this.cardContainer.getBoundingClientRect().left; + this.cardContainerOffsetY = this.cardContainer.getBoundingClientRect().top; + + this.offsetX = this.getBoundingClientRect().left - this.cardContainerOffsetX; + this.offsetY = this.getBoundingClientRect().top - this.cardContainerOffsetY; + + this.width = this.clientWidth + this.cardWidth = this.cardProduct.clientWidth; + this.cardHeight = this.cardProduct.clientHeight; + this.wrapperWidth = this.cardContainer.clientWidth + this.wrapperHeight = this.cardContainer.clientHeight + + this.cardPosition = this.offsetY > this.cardHeight ? 'top' : 'bottom' + + if ((this.offsetX + this.width) > this.cardWidth) { + this.cardPosition += '-left' + } else if ((this.wrapperWidth - this.offsetX) > this.cardWidth) { + this.cardPosition += '-right' + } + + this.dataset.position = this.cardPosition; + } + + if (Shopify.designMode) { + this.addEventListener('shopify:block:select', () => { + this.cardProduct.style.transition = 'none'; + this.classList.add('is-active'); + }); + + this.addEventListener('shopify:block:deselect', () => { + this.classList.remove('is-active'); + }); + } + } + } + ); +} diff --git a/assets/lookbook-slider.js b/assets/lookbook-slider.js new file mode 100644 index 00000000000..2942d64777a --- /dev/null +++ b/assets/lookbook-slider.js @@ -0,0 +1,127 @@ +if (!customElements.get('lookbook-slider')) { + customElements.define( + 'lookbook-slider', + class LookbookSlider extends HTMLElement { + constructor() { + super(); + } + connectedCallback() { + this.selectors = { + sliderWrapper: '.lookbook-slider__items', + nextEl: '.swiper-button-next', + prevEl: '.swiper-button-prev', + pagination: '.swiper-pagination', + }; + + this.classes = { + swiper: 'swiper', + swiperWrapper: 'swiper-wrapper', + }; + + this.sectionId = this.dataset.sectionId; + this.section = this.closest(`.section-${this.sectionId}`); + this.sliderWrapper = this.querySelector(this.selectors.sliderWrapper); + this.paginationType = this.dataset.paginationType || 'bullets'; + this.enableSlider = this.dataset.enableSlider === 'true'; + + this.sliderInstance = false; + + if (!this.enableSlider) return; + const mql = window.matchMedia(FoxTheme.config.mediaQueryMobile); + mql.onchange = this.init.bind(this); + this.init(); + } + + init() { + if (FoxTheme.config.mqlMobile) { + this.destroySlider(); + } else { + this.initSlider(); + } + + this.calculateItemsWidth(); + } + + initSlider() { + this.sliderOptions = { + slidesPerView: 'auto', + navigation: { + nextEl: this.section.querySelector(this.selectors.nextEl), + prevEl: this.section.querySelector(this.selectors.prevEl), + }, + pagination: { + el: this.section.querySelector(this.selectors.pagination), + type: this.paginationType, + }, + loop: false, + threshold: 2, + mousewheel: { + enabled: true, + forceToAxis: true, + }, + watchSlidesProgress: true, + }; + + if (typeof this.sliderInstance !== 'object') { + this.classList.add(this.classes.swiper); + this.sliderWrapper.classList.add(this.classes.swiperWrapper); + this.sliderInstance = new window.FoxTheme.Carousel(this, this.sliderOptions, [FoxTheme.Swiper.Mousewheel]); + this.sliderInstance.init(); + + // const focusableElements = FoxTheme.a11y.getFocusableElements(this); + + // focusableElements.forEach((element) => { + // element.addEventListener('focusin', () => { + // const slide = element.closest('.swiper-slide'); + // this.sliderInstance.slider.slideTo(this.sliderInstance.slider.slides.indexOf(slide)); + // }); + // }); + } + if (Shopify.designMode && typeof this.sliderInstance === 'object') { + document.addEventListener('shopify:block:select', (e) => { + if (e.detail.sectionId != this.sectionId) return; + let { target } = e; + const index = Number(target.dataset.index); + + this.sliderInstance.slider.slideTo(index); + }); + } + } + + destroySlider() { + this.classList.remove(this.classes.swiper); + this.sliderWrapper.classList.remove(this.classes.swiperWrapper); + if (typeof this.sliderInstance !== 'object') return; + this.sliderInstance.slider.destroy(); + this.sliderInstance = false; + } + + calculateItemsWidth() { + Array.from(this.sliderWrapper.children).forEach((item) => { + const width = item.dataset.width; + const widthMobile = item.dataset.widthMobile; + item.style.setProperty('--item-width', width); + item.style.setProperty('--item-width-mobile', widthMobile); + }); + } + } + ); +} + +if (!customElements.get('lookbook-scroll-progress-bar')) { + customElements.define( + 'lookbook-scroll-progress-bar', + class LookbookScrollProgressBar extends ScrollProgressBar { + get totalWidth() { + this.allChildren = this.target.children; + + let totalWidth = 0; + [...this.allChildren].forEach((child) => { + totalWidth += child.offsetWidth; + }); + + return totalWidth; + } + } + ); +} diff --git a/assets/magnify.js b/assets/magnify.js deleted file mode 100644 index 11359d2e1a9..00000000000 --- a/assets/magnify.js +++ /dev/null @@ -1,63 +0,0 @@ -// create a container and set the full-size image as its background -function createOverlay(image) { - const overlayImage = document.createElement('img'); - overlayImage.setAttribute('src', `${image.src}`); - overlay = document.createElement('div'); - prepareOverlay(overlay, overlayImage); - - image.style.opacity = '50%'; - toggleLoadingSpinner(image); - - overlayImage.onload = () => { - toggleLoadingSpinner(image); - image.parentElement.insertBefore(overlay, image); - image.style.opacity = '100%'; - }; - - return overlay; -} - -function prepareOverlay(container, image) { - container.setAttribute('class', 'image-magnify-full-size'); - container.setAttribute('aria-hidden', 'true'); - container.style.backgroundImage = `url('${image.src}')`; - container.style.backgroundColor = 'var(--gradient-background)'; -} - -function toggleLoadingSpinner(image) { - const loadingSpinner = image.parentElement.parentElement.querySelector(`.loading__spinner`); - loadingSpinner.classList.toggle('hidden'); -} - -function moveWithHover(image, event, zoomRatio) { - // calculate mouse position - const ratio = image.height / image.width; - const container = event.target.getBoundingClientRect(); - const xPosition = event.clientX - container.left; - const yPosition = event.clientY - container.top; - const xPercent = `${xPosition / (image.clientWidth / 100)}%`; - const yPercent = `${yPosition / ((image.clientWidth * ratio) / 100)}%`; - - // determine what to show in the frame - overlay.style.backgroundPosition = `${xPercent} ${yPercent}`; - overlay.style.backgroundSize = `${image.width * zoomRatio}px`; -} - -function magnify(image, zoomRatio) { - const overlay = createOverlay(image); - overlay.onclick = () => overlay.remove(); - overlay.onmousemove = (event) => moveWithHover(image, event, zoomRatio); - overlay.onmouseleave = () => overlay.remove(); -} - -function enableZoomOnHover(zoomRatio) { - const images = document.querySelectorAll('.image-magnify-hover'); - images.forEach((image) => { - image.onclick = (event) => { - magnify(image, zoomRatio); - moveWithHover(image, event, zoomRatio); - }; - }); -} - -enableZoomOnHover(2); diff --git a/assets/main-search.js b/assets/main-search.js deleted file mode 100644 index 4e0e432ff07..00000000000 --- a/assets/main-search.js +++ /dev/null @@ -1,45 +0,0 @@ -class MainSearch extends SearchForm { - constructor() { - super(); - this.allSearchInputs = document.querySelectorAll('input[type="search"]'); - this.setupEventListeners(); - } - - setupEventListeners() { - let allSearchForms = []; - this.allSearchInputs.forEach((input) => allSearchForms.push(input.form)); - this.input.addEventListener('focus', this.onInputFocus.bind(this)); - if (allSearchForms.length < 2) return; - allSearchForms.forEach((form) => form.addEventListener('reset', this.onFormReset.bind(this))); - this.allSearchInputs.forEach((input) => input.addEventListener('input', this.onInput.bind(this))); - } - - onFormReset(event) { - super.onFormReset(event); - if (super.shouldResetForm()) { - this.keepInSync('', this.input); - } - } - - onInput(event) { - const target = event.target; - this.keepInSync(target.value, target); - } - - onInputFocus() { - const isSmallScreen = window.innerWidth < 750; - if (isSmallScreen) { - this.scrollIntoView({ behavior: 'smooth' }); - } - } - - keepInSync(value, target) { - this.allSearchInputs.forEach((input) => { - if (input !== target) { - input.value = value; - } - }); - } -} - -customElements.define('main-search', MainSearch); diff --git a/assets/mask-arch.svg b/assets/mask-arch.svg deleted file mode 100644 index 92e4e5bb327..00000000000 --- a/assets/mask-arch.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/assets/mask-blobs.css b/assets/mask-blobs.css deleted file mode 100644 index a1f576523c5..00000000000 --- a/assets/mask-blobs.css +++ /dev/null @@ -1,8 +0,0 @@ -:root { - --shape--blob-1: 97.686% 33.617%, 98.392% 36.152%, 98.960% 38.721%, 99.398% 41.315%, 99.712% 43.928%, 99.909% 46.552%, 99.995% 49.182%, 99.974% 51.813%, 99.852% 54.441%, 99.630% 57.063%, 99.311% 59.675%, 98.897% 62.274%, 98.389% 64.856%, 97.787% 67.417%, 97.091% 69.955%, 96.299% 72.464%, 95.411% 74.941%, 94.422% 77.379%, 93.329% 79.773%, 92.127% 82.114%, 90.812% 84.393%, 89.377% 86.598%, 87.813% 88.714%, 86.114% 90.723%, 84.272% 92.600%, 82.279% 94.317%, 80.125% 95.828%, 77.832% 97.117%, 75.423% 98.172%, 72.920% 98.983%, 70.352% 99.552%, 67.743% 99.887%, 65.115% 100.000%, 62.485% 99.907%, 59.869% 99.627%, 57.277% 99.176%, 54.717% 98.571%, 52.193% 97.825%, 49.711% 96.954%, 47.271% 95.967%, 44.877% 94.876%, 42.529% 93.689%, 40.227% 92.414%, 37.972% 91.058%, 35.764% 89.626%, 33.604% 88.123%, 31.491% 86.555%, 29.426% 84.924%, 27.410% 83.234%, 25.441% 81.487%, 23.522% 79.687%, 21.651% 77.836%, 19.832% 75.935%, 18.064% 73.986%, 16.350% 71.990%, 14.691% 69.947%, 13.090% 67.859%, 11.549% 65.726%, 10.073% 63.547%, 8.665% 61.324%, 7.331% 59.056%, 6.076% 56.744%, 4.907% 54.386%, 3.832% 51.984%, 2.861% 49.539%, 2.006% 47.050%, 1.280% 44.521%, 0.699% 41.955%, 0.280% 39.358%, 0.044% 36.738%, 0.014% 34.107%, 0.212% 31.484%, 0.660% 28.892%, 1.371% 26.359%, 2.338% 23.913%, 3.540% 21.574%, 4.951% 19.354%, 6.546% 17.261%, 8.300% 15.300%, 10.191% 13.471%, 12.199% 11.771%, 14.307% 10.197%, 16.502% 8.746%, 18.771% 7.414%, 21.104% 6.198%, 23.493% 5.094%, 25.930% 4.101%, 28.408% 3.217%, 30.922% 2.439%, 33.466% 1.768%, 36.036% 1.203%, 38.627% 0.744%, 41.235% 0.394%, 43.855% 0.152%, 46.483% 0.023%, 49.114% 0.008%, 51.744% 0.103%, 54.366% 0.315%, 56.977% 0.648%, 59.569% 1.100%, 62.137% 1.672%, 64.676% 2.363%, 67.179% 3.173%, 69.642% 4.101%, 72.056% 5.147%, 74.416% 6.310%, 76.715% 7.590%, 78.946% 8.985%, 81.102% 10.494%, 83.174% 12.115%, 85.156% 13.846%, 87.039% 15.684%, 88.815% 17.625%, 90.477% 19.664%, 92.017% 21.797%, 93.429% 24.017%, 94.707% 26.318%, 95.844% 28.690%, 96.838% 31.126%, 97.686% 33.617%; - --shape--blob-2: 85.349% 11.712%, 87.382% 13.587%, 89.228% 15.647%, 90.886% 17.862%, 92.359% 20.204%, 93.657% 22.647%, 94.795% 25.169%, 95.786% 27.752%, 96.645% 30.382%, 97.387% 33.048%, 98.025% 35.740%, 98.564% 38.454%, 99.007% 41.186%, 99.358% 43.931%, 99.622% 46.685%, 99.808% 49.446%, 99.926% 52.210%, 99.986% 54.977%, 99.999% 57.744%, 99.975% 60.511%, 99.923% 63.278%, 99.821% 66.043%, 99.671% 68.806%, 99.453% 71.565%, 99.145% 74.314%, 98.724% 77.049%, 98.164% 79.759%, 97.433% 82.427%, 96.495% 85.030%, 95.311% 87.529%, 93.841% 89.872%, 92.062% 91.988%, 89.972% 93.796%, 87.635% 95.273%, 85.135% 96.456%, 82.532% 97.393%, 79.864% 98.127%, 77.156% 98.695%, 74.424% 99.129%, 71.676% 99.452%, 68.918% 99.685%, 66.156% 99.844%, 63.390% 99.942%, 60.624% 99.990%, 57.856% 99.999%, 55.089% 99.978%, 52.323% 99.929%, 49.557% 99.847%, 46.792% 99.723%, 44.031% 99.549%, 41.273% 99.317%, 38.522% 99.017%, 35.781% 98.639%, 33.054% 98.170%, 30.347% 97.599%, 27.667% 96.911%, 25.024% 96.091%, 22.432% 95.123%, 19.907% 93.994%, 17.466% 92.690%, 15.126% 91.216%, 12.902% 89.569%, 10.808% 87.761%, 8.854% 85.803%, 7.053% 83.703%, 5.418% 81.471%, 3.962% 79.119%, 2.702% 76.656%, 1.656% 74.095%, 0.846% 71.450%, 0.294% 68.740%, 0.024% 65.987%, 0.050% 63.221%, 0.343% 60.471%, 0.858% 57.752%, 1.548% 55.073%, 2.370% 52.431%, 3.283% 49.819%, 4.253% 47.227%, 5.249% 44.646%, 6.244% 42.063%, 7.211% 39.471%, 8.124% 36.858%, 8.958% 34.220%, 9.711% 31.558%, 10.409% 28.880%, 11.083% 26.196%, 11.760% 23.513%, 12.474% 20.839%, 13.259% 18.186%, 14.156% 15.569%, 15.214% 13.012%, 16.485% 10.556%, 18.028% 8.261%, 19.883% 6.211%, 22.041% 4.484%, 24.440% 3.110%, 26.998% 2.057%, 29.651% 1.275%, 32.360% 0.714%, 35.101% 0.337%, 37.859% 0.110%, 40.624% 0.009%, 43.391% 0.016%, 46.156% 0.113%, 48.918% 0.289%, 51.674% 0.533%, 54.425% 0.837%, 57.166% 1.215%, 59.898% 1.654%, 62.618% 2.163%, 65.322% 2.750%, 68.006% 3.424%, 70.662% 4.197%, 73.284% 5.081%, 75.860% 6.091%, 78.376% 7.242%, 80.813% 8.551%, 83.148% 10.036%, 85.349% 11.712%; - --shape--blob-3: 78.621% 12.736%, 80.746% 14.354%, 82.710% 16.163%, 84.520% 18.127%, 86.187% 20.215%, 87.721% 22.401%, 89.134% 24.668%, 90.437% 27.000%, 91.639% 29.386%, 92.748% 31.816%, 93.770% 34.284%, 94.714% 36.783%, 95.583% 39.309%, 96.382% 41.858%, 97.112% 44.428%, 97.770% 47.017%, 98.353% 49.624%, 98.858% 52.248%, 99.279% 54.886%, 99.611% 57.536%, 99.847% 60.197%, 99.977% 62.865%, 99.991% 65.537%, 99.879% 68.205%, 99.626% 70.865%, 99.217% 73.504%, 98.635% 76.111%, 97.863% 78.668%, 96.879% 81.151%, 95.683% 83.538%, 94.291% 85.818%, 92.717% 87.976%, 90.974% 89.999%, 89.075% 91.878%, 87.033% 93.599%, 84.860% 95.151%, 82.567% 96.520%, 80.167% 97.692%, 77.673% 98.647%, 75.100% 99.364%, 72.469% 99.819%, 69.805% 99.997%, 67.136% 99.893%, 64.491% 99.529%, 61.884% 98.946%, 59.324% 98.186%, 56.807% 97.290%, 54.329% 96.293%, 51.880% 95.225%, 49.451% 94.114%, 47.030% 92.984%, 44.607% 91.858%, 42.173% 90.757%, 39.719% 89.701%, 37.245% 88.695%, 34.756% 87.723%, 32.263% 86.763%, 29.775% 85.790%, 27.301% 84.782%, 24.852% 83.715%, 22.441% 82.564%, 20.085% 81.306%, 17.802% 79.919%, 15.615% 78.386%, 13.549% 76.694%, 11.627% 74.839%, 9.875% 72.824%, 8.296% 70.669%, 6.878% 68.406%, 5.612% 66.054%, 4.489% 63.630%, 3.502% 61.148%, 2.645% 58.618%, 1.914% 56.049%, 1.304% 53.448%, 0.812% 50.823%, 0.437% 48.178%, 0.177% 45.519%, 0.033% 42.852%, 0.004% 40.181%, 0.091% 37.511%, 0.299% 34.847%, 0.634% 32.197%, 1.088% 29.565%, 1.657% 26.955%, 2.344% 24.374%, 3.150% 21.827%, 4.078% 19.322%, 5.133% 16.868%, 6.321% 14.475%, 7.651% 12.159%, 9.134% 9.937%, 10.780% 7.835%, 12.604% 5.883%, 14.615% 4.127%, 16.820% 2.622%, 19.214% 1.442%, 21.758% 0.633%, 24.387% 0.168%, 27.052% 0.002%, 29.721% 0.082%, 32.378% 0.357%, 35.016% 0.781%, 37.632% 1.318%, 40.231% 1.936%, 42.817% 2.607%, 45.396% 3.304%, 47.975% 4.002%, 50.561% 4.673%, 53.163% 5.278%, 55.778% 5.822%, 58.401% 6.329%, 61.027% 6.821%, 63.650% 7.326%, 66.264% 7.878%, 68.858% 8.515%, 71.418% 9.281%, 73.919% 10.217%, 76.332% 11.362%, 78.621% 12.736%; - --shape--blob-4: 80.628% 3.397%, 82.907% 4.713%, 85.051% 6.239%, 87.055% 7.945%, 88.916% 9.806%, 90.636% 11.799%, 92.213% 13.907%, 93.650% 16.112%, 94.946% 18.403%, 96.102% 20.768%, 97.115% 23.198%, 97.983% 25.683%, 98.702% 28.215%, 99.256% 30.788%, 99.652% 33.390%, 99.898% 36.011%, 99.998% 38.642%, 99.953% 41.274%, 99.765% 43.899%, 99.436% 46.511%, 98.966% 49.101%, 98.355% 51.662%, 97.602% 54.184%, 96.703% 56.658%, 95.658% 59.074%, 94.459% 61.417%, 93.104% 63.674%, 91.610% 65.841%, 89.994% 67.919%, 88.274% 69.912%, 86.469% 71.828%, 84.595% 73.677%, 82.668% 75.471%, 80.701% 77.221%, 78.709% 78.941%, 76.701% 80.644%, 74.690% 82.343%, 72.683% 84.048%, 70.680% 85.756%, 68.669% 87.455%, 66.637% 89.129%, 64.575% 90.765%, 62.468% 92.344%, 60.307% 93.847%, 58.080% 95.251%, 55.778% 96.528%, 53.396% 97.648%, 50.934% 98.576%, 48.398% 99.281%, 45.809% 99.751%, 43.186% 99.976%, 40.555% 99.967%, 37.933% 99.738%, 35.337% 99.303%, 32.781% 98.675%, 30.276% 97.865%, 27.834% 96.884%, 25.462% 95.741%, 23.171% 94.446%, 20.969% 93.004%, 18.866% 91.420%, 16.874% 89.700%, 14.991% 87.861%, 13.220% 85.913%, 11.560% 83.870%, 10.011% 81.742%, 8.574% 79.537%, 7.246% 77.263%, 6.029% 74.929%, 4.921% 72.541%, 3.923% 70.106%, 3.034% 67.628%, 2.256% 65.113%, 1.587% 62.566%, 1.033% 59.993%, 0.595% 57.397%, 0.275% 54.784%, 0.076% 52.159%, 0.001% 49.528%, 0.052% 46.896%, 0.236% 44.270%, 0.556% 41.657%, 1.019% 39.066%, 1.631% 36.506%, 2.398% 33.988%, 3.328% 31.525%, 4.412% 29.127%, 5.654% 26.806%, 7.044% 24.570%, 8.571% 22.426%, 10.224% 20.378%, 11.993% 18.429%, 13.868% 16.581%, 15.840% 14.837%, 17.900% 13.198%, 20.041% 11.666%, 22.255% 10.243%, 24.540% 8.937%, 26.891% 7.752%, 29.296% 6.680%, 31.746% 5.718%, 34.235% 4.860%, 36.755% 4.099%, 39.300% 3.427%, 41.865% 2.833%, 44.444% 2.306%, 47.035% 1.836%, 49.633% 1.412%, 52.237% 1.025%, 54.847% 0.677%, 57.463% 0.383%, 60.086% 0.162%, 62.715% 0.029%, 65.348% 0.006%, 67.978% 0.112%, 70.597% 0.372%, 73.193% 0.808%, 75.747% 1.446%, 78.234% 2.304%, 80.628% 3.397%; - --shape--blob-5: 80.452% 2.197%, 82.761% 3.507%, 84.885% 5.101%, 86.818% 6.922%, 88.568% 8.920%, 90.147% 11.056%, 91.569% 13.300%, 92.848% 15.628%, 93.997% 18.023%, 95.026% 20.472%, 95.944% 22.966%, 96.759% 25.494%, 97.476% 28.053%, 98.100% 30.635%, 98.634% 33.238%, 99.082% 35.856%, 99.444% 38.489%, 99.714% 41.132%, 99.893% 43.782%, 99.986% 46.438%, 99.992% 49.094%, 99.909% 51.750%, 99.736% 54.401%, 99.472% 57.045%, 99.113% 59.677%, 98.656% 62.294%, 98.098% 64.892%, 97.435% 67.465%, 96.663% 70.007%, 95.776% 72.511%, 94.769% 74.969%, 93.636% 77.373%, 92.372% 79.709%, 90.970% 81.966%, 89.423% 84.125%, 87.728% 86.170%, 85.898% 88.095%, 83.943% 89.894%, 81.873% 91.560%, 79.701% 93.088%, 77.435% 94.475%, 75.087% 95.718%, 72.666% 96.811%, 70.182% 97.753%, 67.645% 98.540%, 65.063% 99.165%, 62.446% 99.622%, 59.804% 99.904%, 57.150% 100.000%, 54.495% 99.900%, 51.855% 99.607%, 49.242% 99.128%, 46.668% 98.471%, 44.142% 97.651%, 41.669% 96.680%, 39.254% 95.572%, 36.900% 94.342%, 34.605% 93.002%, 32.370% 91.566%, 30.193% 90.044%, 28.067% 88.450%, 25.999% 86.782%, 23.993% 85.040%, 22.054% 83.224%, 20.182% 81.338%, 18.380% 79.387%, 16.644% 77.375%, 14.972% 75.310%, 13.360% 73.198%, 11.802% 71.046%, 10.288% 68.863%, 8.816% 66.651%, 7.404% 64.400%, 6.063% 62.107%, 4.809% 59.765%, 3.656% 57.371%, 2.624% 54.923%, 1.730% 52.421%, 0.998% 49.868%, 0.451% 47.268%, 0.112% 44.634%, 0.000% 41.980%, 0.117% 39.327%, 0.446% 36.691%, 0.976% 34.088%, 1.696% 31.531%, 2.600% 29.033%, 3.682% 26.607%, 4.941% 24.268%, 6.375% 22.032%, 7.986% 19.921%, 9.775% 17.957%, 11.743% 16.173%, 13.876% 14.591%, 16.156% 13.229%, 18.548% 12.073%, 21.017% 11.094%, 23.538% 10.255%, 26.091% 9.521%, 28.664% 8.858%, 31.248% 8.240%, 33.837% 7.642%, 36.426% 7.045%, 39.011% 6.431%, 41.589% 5.787%, 44.157% 5.109%, 46.720% 4.407%, 49.281% 3.701%, 51.846% 3.006%, 54.418% 2.339%, 57.001% 1.717%, 59.598% 1.157%, 62.212% 0.680%, 64.842% 0.309%, 67.488% 0.072%, 70.144% 0.002%, 72.797% 0.137%, 75.424% 0.521%, 77.992% 1.197%, 80.452% 2.197%; - --shape--blob-6: 71.914% 1.829%, 74.287% 2.884%, 76.559% 4.144%, 78.723% 5.581%, 80.777% 7.171%, 82.721% 8.894%, 84.557% 10.733%, 86.284% 12.673%, 87.906% 14.703%, 89.423% 16.812%, 90.838% 18.991%, 92.151% 21.233%, 93.364% 23.531%, 94.477% 25.878%, 95.492% 28.270%, 96.406% 30.702%, 97.222% 33.169%, 97.938% 35.666%, 98.555% 38.190%, 99.069% 40.737%, 99.476% 43.303%, 99.771% 45.884%, 99.948% 48.476%, 99.999% 51.073%, 99.914% 53.670%, 99.680% 56.257%, 99.287% 58.825%, 98.717% 61.360%, 97.957% 63.844%, 96.984% 66.252%, 95.807% 68.567%, 94.448% 70.781%, 92.930% 72.889%, 91.273% 74.890%, 89.499% 76.788%, 87.625% 78.587%, 85.668% 80.296%, 83.642% 81.923%, 81.560% 83.477%, 79.431% 84.967%, 77.266% 86.402%, 75.071% 87.793%, 72.854% 89.148%, 70.624% 90.481%, 68.375% 91.783%, 66.103% 93.044%, 63.803% 94.253%, 61.470% 95.396%, 59.100% 96.459%, 56.688% 97.425%, 54.232% 98.272%, 51.732% 98.978%, 49.190% 99.518%, 46.616% 99.866%, 44.022% 99.999%, 41.427% 99.904%, 38.848% 99.589%, 36.304% 99.067%, 33.806% 98.353%, 31.365% 97.465%, 28.988% 96.417%, 26.680% 95.223%, 24.446% 93.897%, 22.289% 92.450%, 20.209% 90.892%, 18.210% 89.233%, 16.286% 87.487%, 14.442% 85.656%, 12.685% 83.743%, 11.018% 81.750%, 9.446% 79.682%, 7.974% 77.541%, 6.608% 75.331%, 5.354% 73.056%, 4.218% 70.719%, 3.208% 68.325%, 2.331% 65.880%, 1.594% 63.389%, 0.996% 60.861%, 0.535% 58.304%, 0.216% 55.726%, 0.039% 53.134%, 0.005% 50.536%, 0.119% 47.941%, 0.385% 45.356%, 0.814% 42.794%, 1.416% 40.267%, 2.207% 37.793%, 3.204% 35.394%, 4.427% 33.103%, 5.887% 30.956%, 7.572% 28.979%, 9.454% 27.190%, 11.490% 25.576%, 13.637% 24.114%, 15.862% 22.773%, 18.137% 21.517%, 20.438% 20.310%, 22.744% 19.113%, 25.034% 17.885%, 27.285% 16.589%, 29.485% 15.207%, 31.628% 13.738%, 33.730% 12.210%, 35.812% 10.656%, 37.898% 9.106%, 40.011% 7.595%, 42.174% 6.156%, 44.403% 4.820%, 46.707% 3.621%, 49.090% 2.587%, 51.535% 1.709%, 54.034% 0.998%, 56.576% 0.466%, 59.152% 0.129%, 61.746% 0.001%, 64.342% 0.097%, 66.918% 0.430%, 69.450% 1.007%, 71.914% 1.829%; -} diff --git a/assets/media-gallery.js b/assets/media-gallery.js index c59cd4910ce..4e816aa780c 100644 --- a/assets/media-gallery.js +++ b/assets/media-gallery.js @@ -4,113 +4,443 @@ if (!customElements.get('media-gallery')) { class MediaGallery extends HTMLElement { constructor() { super(); - this.elements = { - liveRegion: this.querySelector('[id^="GalleryStatus"]'), - viewer: this.querySelector('[id^="GalleryViewer"]'), - thumbnails: this.querySelector('[id^="GalleryThumbnails"]'), + + this.selectors = { + viewer: '[id^="GalleryViewer"]', + thumbnails: '[id^="GalleryThumbnails"]', + mediaList: '[id^="Slider-Gallery"]', + mediaItems: ['.product__media-item'], }; - this.mql = window.matchMedia('(min-width: 750px)'); - if (!this.elements.thumbnails) return; - - this.elements.viewer.addEventListener('slideChanged', debounce(this.onSlideChanged.bind(this), 500)); - this.elements.thumbnails.querySelectorAll('[data-target]').forEach((mediaToSwitch) => { - mediaToSwitch - .querySelector('button') - .addEventListener('click', this.setActiveMedia.bind(this, mediaToSwitch.dataset.target, false)); - }); - if (this.dataset.desktopLayout.includes('thumbnail') && this.mql.matches) this.removeListSemantic(); + + this.initialized = false; + this.sliderInstance = false; + this.thumbsInstance = false; } - onSlideChanged(event) { - const thumbnail = this.elements.thumbnails.querySelector( - `[data-target="${event.detail.currentElement.dataset.mediaId}"]` - ); - this.setActiveThumbnail(thumbnail); + connectedCallback() { + FoxTheme.Motion.inView(this, this.init.bind(this)); } - setActiveMedia(mediaId, prepend) { - const activeMedia = - this.elements.viewer.querySelector(`[data-media-id="${mediaId}"]`) || - this.elements.viewer.querySelector('[data-media-id]'); - if (!activeMedia) { - return; + init() { + if (this.initialized === true) return; + + this.elements = window.FoxTheme.utils.queryDomNodes(this.selectors, this); + this.mediaLayout = this.dataset.mediaLayout; + this.onlyImage = this.dataset.onlyImage === 'true'; + this.enableDesktopSlider = this.dataset.enableDesktopSlider === 'true'; + this.enableMobileThumbnails = this.dataset.enableMobileThumbnails === 'true'; + this.enableImageZoom = this.dataset.enableImageZoom === 'true'; + this.context = this.dataset.context; + this.setSliderOptions(); + + const mql = window.matchMedia(FoxTheme.config.mediaQueryMobile); + mql.onchange = this.updateMediaLayout.bind(this); + this.updateMediaLayout(); + + if (this.enableImageZoom) { + this.initImageZoom(); } - this.elements.viewer.querySelectorAll('[data-media-id]').forEach((element) => { - element.classList.remove('is-active'); - }); - activeMedia?.classList?.add('is-active'); - if (prepend) { - activeMedia.parentElement.firstChild !== activeMedia && activeMedia.parentElement.prepend(activeMedia); + this.initialized = true; + } + + setSliderOptions() { + const mediaItemGap = parseInt(this.dataset.mediaItemGap); + const mediaItemGapMobile = parseInt(this.dataset.mediaItemGapMobile); + + this.sliderOptions = { + init: false, + slidesPerView: this.enableMobileThumbnails ? 1 : 'auto', + spaceBetween: mediaItemGapMobile, + loop: false, + grabCursor: true, + allowTouchMove: true, + autoHeight: true, + breakpoints: { + 768: { + spaceBetween: mediaItemGap, + }, + }, + navigation: { + nextEl: this.querySelector('.swiper-button-next'), + prevEl: this.querySelector('.swiper-button-prev'), + }, + pagination: { + el: this.querySelector('.swiper-pagination'), + clickable: true, + type: 'fraction', + }, + threshold: 2, + }; + + this.thumbsOptions = { + slidesPerView: 4, + breakpoints: { + 461: { + slidesPerView: 5, + direction: 'horizontal', + }, + }, + spaceBetween: mediaItemGapMobile, + loop: false, + freeMode: true, + watchSlidesProgress: true, + threshold: 2, + breakpoints: { + 768: { + spaceBetween: mediaItemGap, + }, + }, + }; + + switch (this.mediaLayout) { + case 'vertical-carousel': + this.thumbsOptions.breakpoints = { + ...this.thumbsOptions.breakpoints, + 768: { + direction: 'vertical', + slidesPerView: 'auto', + spaceBetween: mediaItemGap, + }, + }; + break; + case 'carousel': + this.thumbsOptions.breakpoints = { + ...this.thumbsOptions.breakpoints, + 1024: { + slidesPerView: 5, + }, + 1536: { + slidesPerView: 7, + }, + }; + break; + } + } + + updateMediaLayout() { + if (FoxTheme.config.mqlMobile) { + this.initSlider(); + } else { + if (this.enableDesktopSlider) { + this.initSlider(); + } else { + this.destroySlider(); + } + } + } + + initSlider() { + if (typeof this.sliderInstance !== 'object') { + if ((this.enableDesktopSlider || this.enableMobileThumbnails) && this.elements.thumbnails) { + this.thumbsInstance = new window.FoxTheme.Carousel(this.elements.thumbnails, this.thumbsOptions); + this.thumbsInstance.init(); - if (this.elements.thumbnails) { - const activeThumbnail = this.elements.thumbnails.querySelector(`[data-target="${mediaId}"]`); - activeThumbnail.parentElement.firstChild !== activeThumbnail && activeThumbnail.parentElement.prepend(activeThumbnail); + this.sliderOptions.thumbs = { + swiper: this.thumbsInstance.slider, + autoScrollOffset: 2, + }; } - if (this.elements.viewer.slider) this.elements.viewer.resetPages(); + this.sliderInstance = new window.FoxTheme.Carousel(this.elements.viewer, this.sliderOptions, [ + FoxTheme.Swiper.Thumbs, + ]); + this.sliderInstance.init(); + + this.handleSliderAfterInit(); + this.handleSlideChange(); + + this.sliderInstance.slider.init(); } + } + + destroySlider() { + if (typeof this.sliderInstance === 'object') { + this.sliderInstance.slider.destroy(); + this.sliderInstance = false; + } + } + + initThumbsSlider() { + if (typeof this.thumbsInstance !== 'object') { + this.thumbsInstance = new window.FoxTheme.Carousel(this.selectors.thumbnails, this.thumbsOptions); + this.thumbsInstance.init(); + } + } + + initImageZoom() { + let dataSource = []; + const allMedia = [...this.querySelectorAll('.product__media-item:not(.swiper-slide-duplicate)')]; + if (allMedia) { + allMedia.forEach((media) => { + const { mediaType, mediaIndex, src, pswpWidth, pswpHeight } = media.dataset; + + let source = { + id: mediaIndex, + mediaType: mediaType, + }; + + switch (mediaType) { + case 'model': + case 'video': + case 'external_video': + const htmlTag = mediaType === 'model' ? 'product-model' : 'video-element'; + + source = { + ...source, + html: `
    ${media.querySelector(htmlTag).outerHTML}
    `, + }; + break; + default: // Image. + source = { + ...source, + src: src, + width: pswpWidth, + height: pswpHeight, + }; + break; + } + + dataSource.push(source); + }); + } + + this.lightbox = new window.FoxTheme.PhotoSwipeLightbox({ + dataSource: dataSource, + pswpModule: window.FoxTheme.PhotoSwipe, + bgOpacity: 1, + arrowPrev: false, + arrowNext: false, + zoom: false, + close: false, + counter: false, + preloader: false, + }); + + this.lightbox.addFilter('thumbEl', (thumbEl, { id }, index) => { + const slider = this.sliderInstance?.slider; + + if (slider) { + const { slides, activeIndex } = slider; + if (slides[activeIndex]) { + const el = slides[activeIndex].querySelector('img'); + if (el) { + return el; + } + } + } + + return thumbEl; + }); + + this.lightbox.addFilter('placeholderSrc', (placeholderSrc, { data: { id } }) => { + const slider = this.sliderInstance?.slider; + + if (slider) { + const { slides, activeIndex } = slider; + if (slides[activeIndex]) { + const el = slides[activeIndex].querySelector('img'); + if (el) { + return el.src; + } + } + } + + return placeholderSrc; + }); + + this.lightbox.on('change', () => { + window.pauseAllMedia(this); + }); + + // Store the current index before closing + let lastLightboxIndex = null; + this.lightbox.on('close', () => { + if (this.lightbox?.pswp?.currIndex) { + lastLightboxIndex = this.lightbox.pswp.currIndex; + } + }); + + // Update slider after lightbox is destroyed + this.lightbox.on('destroy', () => { + const slider = this.sliderInstance?.slider; + + if (slider && lastLightboxIndex !== null) { + const targetIndex = lastLightboxIndex; + // currIndex from lightbox is the index in dataSource array + // which should match the slider index since both are created from the same media items in the same order + if (targetIndex >= 0 && targetIndex < slider.slides.length && slider.activeIndex !== targetIndex) { + // Use requestAnimationFrame to ensure DOM is ready + requestAnimationFrame(() => { + slider.slideTo(targetIndex, 0); + }); + } + lastLightboxIndex = null; + } + }); + + this.lightbox.on('pointerDown', (e) => { + if (this.lightbox?.pswp?.currSlide?.data?.mediaType != 'image') { + e.preventDefault(); + } + }); + + this.lightbox.on('uiRegister', () => { + const lightboxUI = this.lightbox?.pswp?.ui; + + if (!lightboxUI) return; - this.preventStickyHeader(); - window.setTimeout(() => { - if (!this.mql.matches || this.elements.thumbnails) { - activeMedia.parentElement.scrollTo({ left: activeMedia.offsetLeft }); + if (!this.onlyImage) { + lightboxUI.registerElement({ + name: 'next', + ariaLabel: 'Next slide', + order: 3, + isButton: true, + html: '', + onClick: (event, el) => { + this.lightbox?.pswp?.next(); + }, + }); + lightboxUI.registerElement({ + name: 'prev', + ariaLabel: 'Previous slide', + order: 1, + isButton: true, + html: '', + onClick: (event, el) => { + this.lightbox?.pswp?.prev(); + }, + }); } - const activeMediaRect = activeMedia.getBoundingClientRect(); - // Don't scroll if the image is already in view - if (activeMediaRect.top > -0.5) return; - const top = activeMediaRect.top + window.scrollY; - window.scrollTo({ top: top, behavior: 'smooth' }); + lightboxUI.registerElement({ + name: 'close-zoom', + ariaLabel: 'Close zoom image', + order: 2, + isButton: true, + html: '', + onClick: (event, el) => { + this.lightbox?.pswp?.close(); + }, + }); + }); + + this.lightbox.init(); + + FoxTheme.utils.addEventDelegate({ + selector: '.js-photoswipe--zoom', + context: this, + handler: (e, media) => { + if (media.dataset?.mediaType === 'image') { + const index = Number(media.dataset.mediaIndex) || 0; + this.lightbox.loadAndOpen(index); + } + }, }); - this.playActiveMedia(activeMedia); + } + + handleSliderAfterInit() { + this.sliderInstance.slider.on('afterInit', (swiper) => { + const { slides, activeIndex } = swiper; - if (!this.elements.thumbnails) return; - const activeThumbnail = this.elements.thumbnails.querySelector(`[data-target="${mediaId}"]`); - this.setActiveThumbnail(activeThumbnail); - this.announceLiveRegion(activeMedia, activeThumbnail.dataset.mediaPosition); + if (slides[activeIndex]) { + const isModelMediaType = slides[activeIndex].dataset.mediaType === 'model'; + this.toggleSliderDraggableState(!isModelMediaType); + } + }); } - setActiveThumbnail(thumbnail) { - if (!this.elements.thumbnails || !thumbnail) return; + handleSlideChange() { + this.sliderInstance.slider.on('realIndexChange', (swiper) => { + const { slides, activeIndex, thumbs } = swiper; + + if (thumbs.swiper) { + thumbs.swiper.slideTo(activeIndex); + } - this.elements.thumbnails - .querySelectorAll('button') - .forEach((element) => element.removeAttribute('aria-current')); - thumbnail.querySelector('button').setAttribute('aria-current', true); - if (this.elements.thumbnails.isSlideVisible(thumbnail, 10)) return; + if (slides[activeIndex]) { + this.playActiveMedia(slides[activeIndex]); - this.elements.thumbnails.slider.scrollTo({ left: thumbnail.offsetLeft }); + const isModelMediaType = slides[activeIndex].dataset.mediaType === 'model'; + this.toggleSliderDraggableState(!isModelMediaType); + } + }); } - announceLiveRegion(activeItem, position) { - const image = activeItem.querySelector('.product__modal-opener--image img'); - if (!image) return; - image.onload = () => { - this.elements.liveRegion.setAttribute('aria-hidden', false); - this.elements.liveRegion.innerHTML = window.accessibilityStrings.imageAvailable.replace('[index]', position); - setTimeout(() => { - this.elements.liveRegion.setAttribute('aria-hidden', true); - }, 2000); - }; - image.src = image.src; + toggleSliderDraggableState(isDraggable) { + if (this.sliderInstance.slider.allowTouchMove !== isDraggable) { + this.sliderInstance.slider.allowTouchMove = isDraggable; + } } - playActiveMedia(activeItem) { - window.pauseAllMedia(); - const deferredMedia = activeItem.querySelector('.deferred-media'); + playActiveMedia(selected) { + const deferredMedia = selected.querySelector('product-model'); if (deferredMedia) deferredMedia.loadContent(false); } - preventStickyHeader() { - this.stickyHeader = this.stickyHeader || document.querySelector('sticky-header'); - if (!this.stickyHeader) return; - this.stickyHeader.dispatchEvent(new Event('preventHeaderReveal')); + setActiveMedia(variant) { + if (!variant) return; + + let featuredMedia = variant.featured_media; + + if (!featuredMedia && variant.featured_image) { + featuredMedia = { + id: variant.featured_image.id, + position: variant.featured_image.position || 0, + media_type: 'image', + }; + } + + if (!featuredMedia) return; + + if (this.sliderInstance.slider) { + const slideIndex = featuredMedia.position || 0; + this.sliderInstance.slider.slideTo(slideIndex - 1, 0, false); + } else { + this.sortMediaItems(variant, featuredMedia); + } } - removeListSemantic() { - if (!this.elements.viewer.slider) return; - this.elements.viewer.slider.setAttribute('role', 'presentation'); - this.elements.viewer.sliderItems.forEach((slide) => slide.setAttribute('role', 'presentation')); + sortMediaItems(variant, featuredMedia) { + if (!featuredMedia) { + featuredMedia = + variant.featured_media || + (variant.featured_image + ? { + id: variant.featured_image.id, + position: variant.featured_image.position || 0, + media_type: 'image', + } + : null); + } + + if (!featuredMedia) return; + + let newMedias = this.elements.mediaItems; + + // Reset ordering. + newMedias.sort(function (a, b) { + return a.dataset.mediaIndex - b.dataset.mediaIndex; + }); + + newMedias.some((media, index) => { + if (media.dataset.mediaId == featuredMedia.id) { + const [element] = newMedias.splice(index, 1); + newMedias.unshift(element); + return true; + } + }); + + this.elements.mediaList.innerHTML = ''; + newMedias.forEach((media) => { + this.elements.mediaList.appendChild(media); + }); + + if (!FoxTheme.config.mqlMobile && this.context !== 'quickview') { + const selectedMedia = this.querySelector(`[data-media-id="${featuredMedia.id}"]`); + if (selectedMedia) { + window.scrollTo({ top: selectedMedia.offsetTop, behavior: 'smooth' }); + } + } } } ); diff --git a/assets/mobile-sticky-bar.js b/assets/mobile-sticky-bar.js new file mode 100644 index 00000000000..fde7869a3f5 --- /dev/null +++ b/assets/mobile-sticky-bar.js @@ -0,0 +1,96 @@ +if (!customElements.get('mobile-sticky-bar')) { + customElements.define( + 'mobile-sticky-bar', + class MobileStickyBar extends HTMLElement { + constructor() { + super(); + + this.classes = { + enabled: 'mobile-sticky-bar-enabled', + isShow: 'mobile-sticky-bar-up', + isHide: 'mobile-sticky-bar-down', + }; + + this.compareToggleUnsubscriber = FoxTheme.pubsub.subscribe('compare:toggle', this.onCompareToggle.bind(this)); + } + + compareToggleUnsubscriber = undefined; + + connectedCallback() { + document.body.classList.add(this.classes.enabled); + if (this.isCompareBarShowing()) { + this.hide(); + } else { + this.show(); + } + + this.lastScrollTop = 0; + this.scrollHandler = FoxTheme.utils.debounce(this.onScrollHandler.bind(this), 10); + this.init(); + } + + disconnectedCallback() { + window.removeEventListener('scroll', this.scrollHandler); + + if (this.compareToggleUnsubscriber) { + this.compareToggleUnsubscriber(); + } + } + + init() { + this.calculateHeight(); + window.addEventListener('scroll', this.scrollHandler, false); + } + + calculateHeight() { + requestAnimationFrame(() => { + document.documentElement.style.setProperty('--mobile-sticky-bar-height', `${this.offsetHeight}px`); + }); + } + + isCompareBarShowing() { + return document.body.classList.contains('is-product-comparing'); + } + + onCompareToggle(event) { + if (event.isActive) { + this.hide(); + } else { + this.show(); + } + } + + onScrollHandler() { + if (this.isCompareBarShowing()) { + this.hide(); + return; + } + + const offsetTop = document.getElementById('mobileNavStatic').offsetTop; + const scrollTop = window.scrollY; + const pointTouch = offsetTop - scrollTop - window.innerHeight; + + requestAnimationFrame(() => { + this.scrollDirection = scrollTop > this.lastScrollTop ? 'down' : 'up'; + this.lastScrollTop = scrollTop; + + if (this.scrollDirection == 'up' && pointTouch > 0) { + this.show(); + } else { + this.hide(); + } + }); + } + + show() { + document.body.classList.remove(this.classes.isHide); + document.body.classList.add(this.classes.isShow); + } + + hide() { + document.body.classList.remove(this.classes.isShow); + document.body.classList.add(this.classes.isHide); + } + } + ); +} diff --git a/assets/multiple-product-bundles.js b/assets/multiple-product-bundles.js new file mode 100644 index 00000000000..e451a7ed3f5 --- /dev/null +++ b/assets/multiple-product-bundles.js @@ -0,0 +1,108 @@ +if (!customElements.get('multiple-product-bundles')) { + customElements.define( + 'multiple-product-bundles', + class MultipleProductBundles extends HTMLElement { + constructor() { + super(); + } + + connectedCallback() { + this.selectors = { + sliderWrapper: '.multiple-product-bundles__inner', + nextEl: '.section__header .swiper-button-next', + prevEl: '.section__header .swiper-button-prev', + }; + this.classes = { + grid: 'f-grid', + swiper: 'swiper', + swiperWrapper: 'swiper-wrapper', + }; + + this.sectionId = this.dataset.sectionId; + this.section = document.querySelector(`.section-${this.sectionId}`); + this.sliderWrapper = this.querySelector(this.selectors.sliderWrapper); + + this.enableSlider = this.dataset.enableSlider === 'true'; + this.total = parseInt(this.dataset.total); + this.items = parseInt(this.dataset.items); + this.tabletItems = parseInt(this.dataset.tabletItems); + + this.sliderInstance = false; + + this.init(); + Array.from([FoxTheme.config.mediaQueryMobile, FoxTheme.config.mediaQueryTablet]).forEach((mediaQuery) => { + const mql = window.matchMedia(mediaQuery); + mql.onchange = this.init.bind(this); + }); + } + + init() { + if (FoxTheme.config.mqlMobile) { + this.enableSlider = false; + } else if (FoxTheme.config.mqlTablet) { + this.enableSlider = this.total > this.tabletItems ? true : false; + } else { + this.enableSlider = this.dataset.enableSlider === 'true'; + } + + this.enableSlider ? this.initSlider() : this.destroySlider(); + } + + initSlider() { + if (typeof this.sliderInstance === 'object') return; + const columnGap = window.getComputedStyle(this.sliderWrapper).getPropertyValue('--f-column-gap'); + const spaceBetween = parseFloat(columnGap.replace('rem', '')) * 10; + + this.sliderOptions = { + slidesPerView: 1, + spaceBetween: spaceBetween, + navigation: { + nextEl: this.section.querySelector(this.selectors.nextEl), + prevEl: this.section.querySelector(this.selectors.prevEl), + }, + loop: false, + threshold: 2, + watchSlidesProgress: true, + mousewheel: { + enabled: true, + forceToAxis: true, + }, + breakpoints: { + 768: { + slidesPerView: this.tabletItems + }, + 1024: { + slidesPerView: this.items + } + } + }; + + this.classList.add(this.classes.swiper); + this.sliderWrapper.classList.remove(this.classes.grid); + this.sliderWrapper.classList.add(this.classes.swiperWrapper); + + this.sliderInstance = new window.FoxTheme.Carousel(this, this.sliderOptions, [FoxTheme.Swiper.Mousewheel]); + this.sliderInstance.init(); + + if (Shopify.designMode && typeof this.sliderInstance === 'object') { + document.addEventListener('shopify:block:select', (e) => { + if (e.detail.sectionId != this.sectionId) return; + let { target } = e; + const index = Number(target.dataset.index); + + this.sliderInstance.slider.slideTo(index); + }); + } + } + + destroySlider() { + this.classList.remove(this.classes.swiper); + this.sliderWrapper.classList.remove(this.classes.swiperWrapper); + this.sliderWrapper.classList.add(this.classes.grid); + if (typeof this.sliderInstance !== 'object') return; + this.sliderInstance.slider.destroy(); + this.sliderInstance = false; + } + } + ); +} diff --git a/assets/newsletter-section.css b/assets/newsletter-section.css deleted file mode 100644 index c84eb9fcb05..00000000000 --- a/assets/newsletter-section.css +++ /dev/null @@ -1,50 +0,0 @@ -.newsletter__wrapper { - padding-right: calc(4rem / var(--font-body-scale)); - padding-left: calc(4rem / var(--font-body-scale)); -} - -@media screen and (min-width: 750px) { - .newsletter__wrapper { - padding-right: 9rem; - padding-left: 9rem; - } -} - -.newsletter__wrapper > * { - margin-top: 0; - margin-bottom: 0; -} - -.newsletter__wrapper > * + * { - margin-top: 2rem; -} - -.newsletter__wrapper > * + .newsletter-form { - margin-top: 3rem; -} - -.newsletter__subheading { - max-width: 70rem; - margin-left: auto; - margin-right: auto; -} - -.newsletter__wrapper .newsletter-form__field-wrapper { - max-width: 36rem; -} - -.newsletter-form__field-wrapper .newsletter-form__message { - margin-top: 1.5rem; -} - -.newsletter__button { - margin-top: 3rem; - width: fit-content; -} - -@media screen and (min-width: 750px) { - .newsletter__button { - flex-shrink: 0; - margin: 0 0 0 1rem; - } -} diff --git a/assets/password-modal.js b/assets/password-modal.js deleted file mode 100644 index 9df18f44809..00000000000 --- a/assets/password-modal.js +++ /dev/null @@ -1,9 +0,0 @@ -class PasswordModal extends DetailsModal { - constructor() { - super(); - - if (this.querySelector('input[aria-invalid="true"]')) this.open({ target: this.querySelector('details') }); - } -} - -customElements.define('password-modal', PasswordModal); diff --git a/assets/password.css b/assets/password.css new file mode 100644 index 00000000000..80cbdb81764 --- /dev/null +++ b/assets/password.css @@ -0,0 +1,131 @@ +.password, .password-main, .password-section { + display: flex; + flex-direction: column; +} +.password-main, .password-section { + flex: 1; +} +.password-container { + margin: auto; + max-width: 100%; +} +.password-container__wrapper { + padding: 0 1.5rem; + max-width: 100%; + width: 50rem; +} +.password-header .page-width { + display: flex; + gap: 1.6rem 2.4rem; + padding-top: 3.8rem; + padding-bottom: 3.8rem; + text-align: start; +} +.password-header .page-width > * { + flex: 1; + align-self: center; +} +@media (max-width: 767.98px) { + .password-header .page-width { + padding-top: 2.4rem; + padding-bottom: 2.4rem; + flex-direction: column; + } +} +.password-content { + text-align: center; + flex: 2; +} +.password-footer { + padding-top: 3.2rem; + padding-bottom: 3.2rem; +} +.password-footer a { + display: inline-block; + line-height: 1; + vertical-align: middle; +} +@media (max-width: 767.98px) { + .password-footer { + padding-top: 3.8rem; + padding-bottom: 3.8rem; + } +} + +.password__list-social { + justify-content: center; + margin-top: 3.2rem; +} + +.password-modal { + display: flex; + justify-content: flex-end; +} +.password-modal__content { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgb(var(--color-background)); + z-index: 4; + display: flex; + justify-content: center; + align-items: center; + transform: none !important; + padding: 0 1.5rem; +} +.password-modal__container { + max-width: 100%; + width: 50rem; +} +.password-modal summary { + position: relative; + z-index: 7; +} +.password-modal__toggle-open { + text-decoration: underline; + text-underline-offset: 0.3rem; + text-decoration-thickness: 0.1rem; + transition: text-decoration-thickness ease 0.1s; +} +.password-modal__toggle-open:hover { + text-decoration-thickness: 0.2rem; +} +.password-modal__toggle-close { + width: 4rem; + height: 4rem; + display: none; +} +.password-modal__toggle-close svg { + transition: all 0.3s; +} +.password-modal__toggle-close:hover svg { + transform: rotate(360deg); +} +.password-modal .password__footer-text { + margin: 2rem 0 0; +} +.password-modal form { + margin-top: 3.2rem; +} +@media (max-width: 767.98px) { + .password-modal { + justify-content: center; + } + .password-modal .password__footer-text { + margin-top: 1.6rem; + } + .password-modal form { + margin-top: 2.4rem; + } +} + +summary[aria-expanded=true] .password-modal__toggle-open, +details[open]:not(.parent-group) > summary .password-modal__toggle-open { + display: none; +} +summary[aria-expanded=true] .password-modal__toggle-close, +details[open]:not(.parent-group) > summary .password-modal__toggle-close { + display: flex; +} diff --git a/assets/password.js b/assets/password.js new file mode 100644 index 00000000000..d031aa78d24 --- /dev/null +++ b/assets/password.js @@ -0,0 +1,10 @@ +if (!customElements.get("password-details")) { + class PasswordDetails extends AccordionDetails { + constructor() { + super(); + + this.open = false; + } + } + customElements.define('password-details', PasswordDetails, { extends: 'details' }); +} \ No newline at end of file diff --git a/assets/photoswipe-component.css b/assets/photoswipe-component.css new file mode 100644 index 00000000000..05e1b8eae78 --- /dev/null +++ b/assets/photoswipe-component.css @@ -0,0 +1,491 @@ +/*! PhotoSwipe main CSS by Dmytro Semenov | photoswipe.com */ +.pswp { + --pswp-bg: #fff; + --pswp-placeholder-bg: #222; + --pswp-root-z-index: 100000; + --pswp-preloader-color: rgba(79, 79, 79, 0.4); + --pswp-preloader-color-secondary: rgba(255, 255, 255, 0.9); + /* defined via js: + --pswp-transition-duration: 333ms; */ + --pswp-icon-color: #000; + --pswp-icon-color-secondary: #4f4f4f; + --pswp-icon-stroke-color: #4f4f4f; + --pswp-icon-stroke-width: 2px; + --pswp-error-text-color: var(--pswp-icon-color); +} + +/* + Styles for basic PhotoSwipe (pswp) functionality (sliding area, open/close transitions) +*/ +.pswp { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: var(--pswp-root-z-index); + display: none; + touch-action: none; + outline: 0; + opacity: 0.003; + contain: layout style size; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} + +/* Prevents focus outline on the root element, + (it may be focused initially) */ +.pswp:focus { + outline: 0; +} + +.pswp * { + box-sizing: border-box; +} + +.pswp img { + max-width: none; +} + +.pswp--open { + display: block; +} + +.pswp, +.pswp__bg { + transform: translateZ(0); + will-change: opacity; +} + +.pswp__bg { + display: block !important; + opacity: 0.005; + background: var(--pswp-bg); +} + +.pswp, +.pswp__scroll-wrap { + overflow: hidden; +} + +.pswp__scroll-wrap, +.pswp__bg, +.pswp__container, +.pswp__item, +.pswp__content, +.pswp__img, +.pswp__zoom-wrap { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + -webkit-transform: translateZ(0); + transform: translateZ(0); +} + +.pswp__img, +.pswp__zoom-wrap { + width: auto; + height: auto; +} + +.pswp--click-to-zoom.pswp--zoom-allowed .pswp__img { + cursor: -webkit-zoom-in; + cursor: -moz-zoom-in; + cursor: zoom-in; +} + +.pswp--click-to-zoom.pswp--zoomed-in .pswp__img { + cursor: move; + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; +} + +.pswp--click-to-zoom.pswp--zoomed-in .pswp__img:active { + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; +} + +/* :active to override grabbing cursor */ +.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img, +.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img:active, +.pswp__img { + cursor: -webkit-zoom-out; + cursor: -moz-zoom-out; + cursor: zoom-out; +} + +/* Prevent selection and tap highlights */ +.pswp__container, +.pswp__img, +.pswp__button, +.pswp__counter { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.pswp__item { + /* z-index for fade transition */ + z-index: 1; + overflow: hidden; + will-change: transform; + -webkit-transform: translateZ(0); + transform: translateZ(0); + -webkit-backface-visibility: hidden; + backface-visibility: hidden; +} + +.pswp__hidden { + display: none !important; +} + +/* Allow to click through pswp__content element, but not its children */ +.pswp__content { + pointer-events: none; +} + +.pswp__content > * { + pointer-events: auto; +} + +/* + + PhotoSwipe UI + +*/ +/* + Error message appears when image is not loaded + (JS option errorMsg controls markup) +*/ +.pswp__error-msg-container { + display: grid; +} + +.pswp__error-msg { + margin: auto; + font-size: 1em; + line-height: 1; + color: var(--pswp-error-text-color); +} + +/* +class pswp__hide-on-close is applied to elements that +should hide (for example fade out) when PhotoSwipe is closed +and show (for example fade in) when PhotoSwipe is opened + */ +.pswp .pswp__hide-on-close { + opacity: 0.005; + will-change: opacity; + transition: opacity var(--pswp-transition-duration) cubic-bezier(0.4, 0, 0.22, 1); + z-index: 10; /* always overlap slide content */ + pointer-events: none; /* hidden elements should not be clickable */ +} + +/* class pswp--ui-visible is added when opening or closing transition starts */ +.pswp--ui-visible .pswp__hide-on-close { + opacity: 1; + pointer-events: auto; +} + +/*
    -
    - {%- for block in section.blocks -%} -
    -
    - {%- if block.settings.text != blank -%} - {%- if block.settings.link != blank -%} - - {%- endif -%} -

    - {{ block.settings.text | escape }} - {%- if block.settings.link != blank -%} - {{- 'icon-arrow.svg' | inline_asset_content -}} - {%- endif -%} -

    - {%- if block.settings.link != blank -%} -
    - {%- endif -%} - {%- endif -%} + +
    + {%- for block in section.blocks -%} +
    + {%- case block.type -%} + {%- when 'announcement_bar' -%} + {%- if block.settings.link != blank -%} + + {%- else -%} + + {%- endif -%} + {%- when 'timer' -%} +
    + {%- if block.settings.text != blank -%} +
    {{ block.settings.text }}
    + {%- endif -%} + {%- if block.settings.type == 'evergreen' or block.settings.time != blank -%} + {%- render 'countdown-timer', + id: block.id, + type: block.settings.type, + duration: block.settings.duration, + time: block.settings.time, + number_size: 'h4', + custom_class: 'flex items-center justify-center', + block_class: 'font-body-bolder' + -%} + {%- endif -%} + {%- if block.settings.button_label != blank -%} + {% liquid + assign button_icon = block.settings.button_icon + assign is_button_icon = false + if button_icon != 'none' + assign is_button_icon = true + assign icon_file = button_icon | prepend: 'icon-' | append: '.svg' + endif + %} + + + {% if is_button_icon %} + + {% endif %} + + {% if button_icon != 'none' %} + {{ icon_file | inline_asset_content }} + {% else %} + {{ 'icon-caret-right.svg' | inline_asset_content }} + {% endif %} + + + {%- endif -%}
    - {%- endfor -%} -
    - + {%- endcase -%}
    - - {%- if request.design_mode -%} - - - {%- endif -%} - {%- endif -%} -
    - {%- if section.settings.enable_country_selector and localization.available_countries.size > 1 -%} - - {%- form 'localization', id: 'AnnouncementCountryForm', class: 'localization-form' -%} -
    -

    {{ 'localization.country_label' | t }}

    - {%- render 'country-localization', localPosition: 'AnnouncementCountry' -%} -
    - {%- endform -%} -
    - {% endif %} - - {%- if section.settings.enable_language_selector and localization.available_languages.size > 1 -%} - - {%- form 'localization', id: 'AnnouncementLanguageForm', class: 'localization-form' -%} -
    -

    {{ 'localization.language_label' | t }}

    - {%- render 'language-localization', localPosition: 'AnnouncementLanguage' -%} -
    - {%- endform -%} -
    - {%- endif -%} + {%- endfor -%}
    -
    + {%- if section.blocks.size > 1 -%} +
    +
    + {%- render 'icon-slider-prev', size: 'small' -%} +
    +
    +
    + {%- render 'icon-slider-next', size: 'small' -%} +
    +
    + {%- endif -%} +
    - {% schema %} { "name": "t:sections.announcement-bar.name", - "max_blocks": 12, "class": "announcement-bar-section", - "enabled_on": { - "groups": ["header"] - }, "settings": [ { - "type": "checkbox", - "id": "auto_rotate", - "label": "t:sections.announcement-bar.settings.auto_rotate.label", - "default": false + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-inverse" }, { "type": "range", - "id": "change_slides_speed", - "min": 3, - "max": 10, + "id": "content_width", + "label": "t:general.content_width.label", + "min": 20, + "max": 100, + "unit": "%", "step": 1, - "unit": "s", - "label": "t:sections.announcement-bar.settings.change_slides_speed.label", - "default": 5 - }, - { - "type": "color_scheme", - "id": "color_scheme", - "label": "t:sections.all.colors.label", - "default": "scheme-4" - }, + "default": 30 + }, { "type": "checkbox", - "id": "show_line_separator", - "default": true, - "label": "t:sections.header.settings.show_line_separator.label" + "id": "autoplay", + "label": "t:general.carousel.autoplay.label", + "default": true }, { - "type": "header", - "content": "t:sections.announcement-bar.settings.heading_utilities.content" + "type": "range", + "id": "autoplay_speed", + "label": "t:general.carousel.autoplay_delay.label", + "min": 3, + "max": 10, + "step": 1, + "default": 5, + "unit": "s" }, { - "type": "paragraph", - "content": "t:sections.announcement-bar.settings.paragraph.content" - }, - { - "type": "checkbox", - "id": "show_social", - "default": false, - "label": "t:sections.announcement-bar.settings.show_social.label", - "info": "t:sections.announcement-bar.settings.show_social.info" + "type": "header", + "content": "t:general.padding.section_heading.content" }, { - "type": "checkbox", - "id": "enable_country_selector", - "default": false, - "label": "t:sections.announcement-bar.settings.enable_country_selector.label", - "info": "t:sections.announcement-bar.settings.enable_country_selector.info" + "type": "range", + "id": "padding_top", + "label": "t:general.padding.top.label", + "default": 12, + "min": 0, + "max": 50, + "step": 1, + "unit": "px" }, { - "type": "checkbox", - "id": "enable_language_selector", - "default": false, - "label": "t:sections.announcement-bar.settings.enable_language_selector.label", - "info": "t:sections.announcement-bar.settings.enable_language_selector.info" + "type": "range", + "id": "padding_bottom", + "label": "t:general.padding.bottom.label", + "default": 12, + "min": 0, + "max": 50, + "step": 1, + "unit": "px" } ], "blocks": [ { - "type": "announcement", + "type": "announcement_bar", "name": "t:sections.announcement-bar.blocks.announcement.name", "settings": [ { - "type": "text", + "type": "inline_richtext", "id": "text", - "default": "t:sections.announcement-bar.blocks.announcement.settings.text.default", - "label": "t:sections.announcement-bar.blocks.announcement.settings.text.label" + "label": "t:general.text.label", + "default": "Welcome to our store" }, { "type": "url", "id": "link", - "label": "t:sections.announcement-bar.blocks.announcement.settings.link.label" + "label": "t:general.link.label" + } + ] + }, + { + "type": "timer", + "name": "t:general.timer.name", + "settings": [ + { + "type": "select", + "id": "type", + "label": "t:general.timer.type.label", + "options": [ + { + "value": "evergreen", + "label": "t:general.timer.type.options__1.label" + }, + { + "value": "fixed_time", + "label": "t:general.timer.type.options__2.label" + } + ], + "default": "evergreen" + }, + { + "type": "header", + "content": "t:general.timer.header__evergreen.content" + }, + { + "type": "select", + "id": "duration", + "label": "t:general.timer.evergreen_duration.label", + "options": [ + { + "value": "every_2_hrs", + "label": "t:general.timer.evergreen_duration.options__every_2_hrs.label" + }, + { + "value": "every_6_hrs", + "label": "t:general.timer.evergreen_duration.options__every_6_hrs.label" + }, + { + "value": "every_12_hrs", + "label": "t:general.timer.evergreen_duration.options__every_12_hrs.label" + }, + { + "value": "every_24_hrs", + "label": "t:general.timer.evergreen_duration.options__every_24_hrs.label" + }, + { + "value": "every_week", + "label": "t:general.timer.evergreen_duration.options__every_week.label" + }, + { + "value": "every_month", + "label": "t:general.timer.evergreen_duration.options__every_month.label" + } + ], + "default": "every_month" + }, + { + "type": "header", + "content": "t:general.timer.header__fixed_time.content" + }, + { + "type": "text", + "id": "time", + "default": "2025/08/20 03:45 PM", + "label": "t:general.timer.time.label", + "info": "t:general.timer.time.info" + }, + { + "type": "header", + "content": "t:general.header__content_settings.content" + }, + { + "type": "textarea", + "id": "text", + "label": "t:general.text.label", + "default": "Sales end in" + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label" + }, + { + "type": "url", + "id": "button_link", + "label": "t:general.button.button_link.label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--primary" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" } ] } ], + "enabled_on": { + "groups": ["header"] + }, "presets": [ { - "name": "t:sections.announcement-bar.presets.name", + "name": "t:sections.announcement-bar.name", "blocks": [ { - "type": "announcement" + "type": "announcement_bar" } ] } diff --git a/sections/apps.liquid b/sections/apps.liquid index ce3adf469e8..a67321b7cdd 100644 --- a/sections/apps.liquid +++ b/sections/apps.liquid @@ -1,7 +1,15 @@ -
    - {%- for block in section.blocks -%} - {% render block %} - {%- endfor -%} + +
    +
    + {%- for block in section.blocks -%} + {% render block %} + {%- endfor -%} +
    {% schema %} @@ -15,6 +23,30 @@ "id": "include_margins", "default": true, "label": "t:sections.apps.settings.include_margins.label" + }, + { + "type": "header", + "content": "t:general.padding.section_heading.content" + }, + { + "type": "range", + "id": "padding_top", + "min": 0, + "max": 100, + "step": 2, + "unit": "px", + "label": "t:general.padding.top.label", + "default": 0 + }, + { + "type": "range", + "id": "padding_bottom", + "min": 0, + "max": 100, + "step": 2, + "unit": "px", + "label": "t:general.padding.bottom.label", + "default": 0 } ], "blocks": [ @@ -24,7 +56,7 @@ ], "presets": [ { - "name": "t:sections.apps.presets.name" + "name": "t:sections.apps.name" } ] } diff --git a/sections/banner-with-tabs.liquid b/sections/banner-with-tabs.liquid new file mode 100644 index 00000000000..89d2d7256f7 --- /dev/null +++ b/sections/banner-with-tabs.liquid @@ -0,0 +1,966 @@ +{{ 'section-banner-with-tabs.css' | asset_url | stylesheet_tag }} + + +{% liquid + assign desktop_height = section.settings.desktop_height + assign mobile_height = section.settings.mobile_height + + assign loading = 'lazy' + assign fetchpriority = 'auto' + + if section.index == 1 or section.settings.enable_preload_image + assign loading = 'eager' + assign fetchpriority = 'high' + endif + + assign tab_icon_size = section.settings.tab_icon_size + assign tab_icon_thickness = 'thick' + assign motion_delay = 50 + + assign block_size = section.blocks.size + + assign first_block = section.blocks.first + assign aspect_ratio = first_block.settings.background.aspect_ratio | default: 2.333 + assign aspect_ratio_mobile = first_block.settings.background_mobile.aspect_ratio | default: 1.778 +%} + +{% style %} + #shopify-section-{{ section.id }} { + --section-padding-top: {{ section.settings.padding_top }}px; + --section-padding-bottom: {{ section.settings.padding_bottom }}px; + + {%- if desktop_height == 'adapt' %} + --media-ratio: {{ aspect_ratio }}; + {% endif -%} + } + + {%- if mobile_height == 'adapt' %} + @media screen and (max-width: 767px) { + #shopify-section-{{ section.id }} { + --media-ratio-mobile: {{ aspect_ratio_mobile }}; + } + } + {% endif -%} +{% endstyle %} +{% if block_size > 0 %} + +{% endif %} +{% schema %} +{ + "name": "t:sections.banner-with-tabs.name", + "disabled_on": { + "groups": ["footer", "header", "custom.overlay"] + }, + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "select", + "id": "desktop_height", + "label": "t:general.desktop_height.label", + "options": [ + { + "label": "t:general.height.options__1.label", + "value": "adapt" + }, + { + "label": "t:general.height.options__2.label", + "value": "extra-small" + }, + { + "label": "t:general.height.options__3.label", + "value": "small" + }, + { + "label": "t:general.height.options__4.label", + "value": "medium" + }, + { + "label": "t:general.height.options__5.label", + "value": "extra-medium" + }, + { + "label": "t:general.height.options__6.label", + "value": "large" + }, + { + "label": "t:general.height.options__7.label", + "value": "extra-large" + } + ], + "default": "adapt" + }, + { + "type": "range", + "id": "image_overlay_opacity", + "min": 0, + "max": 100, + "step": 5, + "unit": "%", + "label": "t:general.image_overlay_opacity.label", + "default": 0 + }, + { + "type": "header", + "content": "t:general.section_header.content" + }, + { + "type": "inline_richtext", + "id": "heading", + "label": "t:general.heading.label", + "default": "Banner with tabs", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h5", + "options": [ + { + "value": "h6", + "label": "t:general.text_size.options__h6.label" + }, + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "header", + "content": "t:sections.banner-with-tabs.settings.header__tab_settings.content" + }, + { + "type": "select", + "id": "tab_heading_size", + "label": "t:general.text_size.title.label", + "default": "h1", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "select", + "id": "tab_icon_size", + "options": [ + { + "value": "extra-small", + "label": "t:general.icon_size.options__xs.label" + }, + { + "value": "small", + "label": "t:general.icon_size.options__sm.label" + }, + { + "value": "extra-medium", + "label": "t:general.icon_size.options__xmd.label" + }, + { + "value": "medium", + "label": "t:general.icon_size.options__md.label" + }, + { + "value": "large", + "label": "t:general.icon_size.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.icon_size.options__xl.label" + } + ], + "default": "large", + "label": "t:general.icon_size.label" + }, + { + "type": "header", + "content": "t:general.header__card_settings.content" + }, + { + "type": "color_scheme", + "id": "card_color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "select", + "id": "card_content_alignment", + "options": [ + { + "value": "left", + "label": "t:general.content_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.content_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.content_alignment.options__3.label" + } + ], + "default": "left", + "label": "t:general.content_alignment.label" + }, + { + "type": "select", + "id": "card_image_ratio", + "label": "t:general.image_ratio.label", + "default": "adapt", + "options": [ + { + "value": "adapt", + "label": "t:general.image_ratio.options__1.label" + }, + { + "value": "1/1", + "label": "t:general.image_ratio.options__2.label" + }, + { + "value": "3/4", + "label": "t:general.image_ratio.options__3.label" + }, + { + "value": "4/3", + "label": "t:general.image_ratio.options__4.label" + } + ] + }, + { + "type": "select", + "id": "card_title_size", + "label": "t:general.text_size.title.label", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + } + ], + "default": "h5" + }, + { + "type": "select", + "id": "card_text_size", + "label": "t:general.text_size.text.label", + "default": "text-base", + "options": [ + { + "value": "text-sm", + "label": "t:general.text_size.options__small.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-lg", + "label": "t:general.text_size.options__large.label" + }, + { + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] + }, + { + "type": "select", + "id": "card_button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--primary" + }, + { + "type": "header", + "content": "t:general.header__mobile_settings.content" + }, + { + "type": "select", + "id": "mobile_height", + "label": "t:general.mobile_height.label", + "options": [ + { + "value": "auto", + "label": "t:general.height.options__8.label" + }, + { + "value": "small", + "label": "t:general.height.options__3.label" + }, + { + "value": "medium", + "label": "t:general.height.options__4.label" + }, + { + "value": "large", + "label": "t:general.height.options__6.label" + }, + { + "value": "extra-large", + "label": "t:general.height.options__7.label" + }, + { + "label": "t:general.height.options__1.label", + "value": "adapt" + } + ] + }, + { + "type": "header", + "content": "t:general.padding.section_heading.content" + }, + { + "type": "range", + "id": "padding_top", + "min": 0, + "max": 100, + "step": 2, + "unit": "px", + "label": "t:general.padding.top.label", + "default": 0 + }, + { + "type": "range", + "id": "padding_bottom", + "min": 0, + "max": 100, + "step": 2, + "unit": "px", + "label": "t:general.padding.bottom.label", + "default": 0 + }, + { + "type": "header", + "content": "t:general.header__advanced.content" + }, + { + "type": "checkbox", + "id": "enable_preload_image", + "label": "t:general.enable_preload_image.label", + "info": "t:general.enable_preload_image.info" + } + ], + "max_blocks": 5, + "blocks": [ + { + "type": "tab", + "name": "t:sections.banner-with-tabs.blocks.tab.name", + "settings": [ + { + "type": "text", + "id": "tab_title", + "label": "t:sections.banner-with-tabs.blocks.tab.settings.tab_title.label" + }, + { + "type": "select", + "id": "tab_icon", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" + }, + { + "value": "headphone", + "label": "t:general.icon.options__31.label" + }, + { + "value": "approximate-equal", + "label": "t:general.icon.options__32.label" + }, + { + "value": "speaker-hifi", + "label": "t:general.icon.options__33.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none", + "label": "t:general.icon.label" + }, + { + "type": "header", + "content": "t:general.image.label" + }, + { + "type": "image_picker", + "id": "background", + "label": "t:general.image_desktop.label", + "info": "t:general.image_desktop.info" + }, + { + "type": "image_picker", + "id": "background_mobile", + "label": "t:general.image_mobile.label", + "info": "t:general.image_mobile.info" + }, + { + "type": "header", + "content": "t:general.image_card.label" + }, + { + "type": "url", + "id": "card_link", + "label": "t:general.card_link.label" + }, + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label" + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label" + }, + { + "type": "inline_richtext", + "id": "heading", + "default": "Image card", + "label": "t:general.heading.label", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "richtext", + "id": "description", + "label": "t:general.text.label" + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label", + "default": "Button label" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + } + ] + } + ], + "presets": [ + { + "name": "t:sections.banner-with-tabs.presets.name", + "blocks": [ + { + "type": "tab" + }, + { + "type": "tab" + }, + { + "type": "tab" + } + ] + } + ] +} +{% endschema %} \ No newline at end of file diff --git a/sections/banners-with-categories.liquid b/sections/banners-with-categories.liquid new file mode 100644 index 00000000000..2e72fc46630 --- /dev/null +++ b/sections/banners-with-categories.liquid @@ -0,0 +1,1346 @@ +{{ 'component-grid-banner.css' | asset_url | stylesheet_tag }} +{{ 'section-banners-with-categories.css' | asset_url | stylesheet_tag }} +{%- liquid + assign button_block = section.blocks | where: 'type', 'button' | first + assign heading_block = section.blocks | where: 'type', 'heading' | first + assign category_blocks = section.blocks | where: 'type', 'category' + assign card_blocks = section.blocks | where: 'type', 'banner-card' + + assign swipe_on_mobile = section.settings.swipe_on_mobile + + assign columns_desktop = section.settings.columns + assign motion_delay = 50 +-%} +{% style %} + .section-{{ section.id }} { + --section-padding-top: {{ section.settings.padding_top }}px; + --section-padding-bottom: {{ section.settings.padding_bottom }}px; + } +{% endstyle %} +{% render 'divider', + show_divider: section.settings.show_section_divider, + divider_width: section.settings.divider_width +%} +
    +
    +
    +
    + {%- if card_blocks != blank -%} +
    +
    + {%- for block in card_blocks -%} + {%- liquid + assign image_sizes = '' + -%} + {%- capture image_sizes -%} + (min-width: 768px) calc((min(100vw, {{ settings.page_width }}) - clamp(20%, 28rem, 30%)) / {{ section.settings.columns }} * {{ block.settings.column_span }}), 100vw + {%- endcapture -%} + {%- liquid + # Reset variables for each block + assign other_classes = '' + assign block_ratio_styles = '' + # Save current block index before inner loop + assign current_block_index = forloop.index + + # Only process if block has custom class + if block.settings.block_custom_class != blank + assign custom_classes = block.settings.block_custom_class | split: ' ' + + for class in custom_classes + if class contains 'ratio' + # Parse ratio class: breakpoint:ratio:value + assign class_parts = class | split: ':' + if class_parts.size == 3 + assign breakpoint = class_parts[0] + assign ratio_value = class_parts[2] + + # Convert ratio value (e.g., "2/1" to "2 / 1") + assign ratio_formatted = ratio_value | replace: '/', ' / ' + + # Generate CSS for current block using saved index + case breakpoint + when 'lg' + assign block_ratio_styles = block_ratio_styles | append: '@media (min-width: 1200px) { .section-' | append: section.id | append: ' [data-index="' | append: current_block_index | append: '"] .card-media { aspect-ratio: ' | append: ratio_formatted | append: '; } }' + when 'xl' + assign block_ratio_styles = block_ratio_styles | append: '@media (min-width: 1440px) { .section-' | append: section.id | append: ' [data-index="' | append: current_block_index | append: '"] .card-media { aspect-ratio: ' | append: ratio_formatted | append: '; } }' + when '2xl' + assign block_ratio_styles = block_ratio_styles | append: '@media (min-width: 1536px) { .section-' | append: section.id | append: ' [data-index="' | append: current_block_index | append: '"] .card-media { aspect-ratio: ' | append: ratio_formatted | append: '; } }' + endcase + endif + else + if class != blank + assign other_classes = other_classes | append: class | append: ' ' + endif + endif + endfor + + assign other_classes = other_classes | strip + else + assign other_classes = block.settings.block_custom_class + endif + -%} + + {%- if block_ratio_styles != blank -%} + + {%- endif -%} +
    + {%- render 'card-image', + parent_color_scheme: section.settings.color_scheme, + color_scheme: block.settings.color_scheme, + link: block.settings.card_link, + image: block.settings.image, + image_mobile: block.settings.image_mobile, + image_ratio: 'adapt', + image_overlay_opacity: block.settings.image_overlay_opacity, + image_sizes: image_sizes, + heading: block.settings.heading, + highlight_style: block.settings.highlight_style, + highlight_font_style: block.settings.highlight_font_style, + highlight_style_color: block.settings.highlight_style_color, + highlight_text_color: block.settings.highlight_text_color, + heading_size: block.settings.heading_size, + subheading: block.settings.subheading, + subheading_style: block.settings.subheading_style, + description: block.settings.text, + description_size: block.settings.text_size, + button_label: block.settings.button_label, + button_style: block.settings.button_style, + button_icon: block.settings.button_icon, + button_size: block.settings.button_size, + rich_text_size: block.settings.content_gap, + content_spacing: block.settings.content_spacing, + content_position: block.settings.content_position, + content_position_mobile: block.settings.content_position_mobile, + content_alignment: block.settings.content_alignment, + content_alignment_mobile: block.settings.content_alignment_mobile, + enable_preload_image: block.settings.enable_preload_image, + section_index: section.index, + forloop_index: forloop.index, + heading_size_custom: block.settings.heading_size_custom, + heading_size_mobile: block.settings.heading_size_mobile + -%} +
    + {%- endfor -%} +
    +
    + {%- endif -%} +
    +
    +
    + {%- if heading_block != blank and heading_block.settings.heading != blank -%} +

    + + {% render 'highlight-text', + hl_text: heading_block.settings.heading, + hl_style: heading_block.settings.highlight_style, + hl_font_style: heading_block.settings.highlight_font_style, + hl_style_color: heading_block.settings.highlight_style_color, + hl_text_color: heading_block.settings.highlight_text_color + %} + +

    + {%- assign motion_delay = motion_delay | plus: 50 -%} + {%- endif -%} + {%- if category_blocks != blank -%} +
    + {%- for block in category_blocks -%} + {%- liquid + assign tag = 'div' + if block.settings.link != blank + assign tag = 'a' + endif + -%} + <{{ tag }} + {% if block.settings.link != blank %} + href="{{ block.settings.link }}" + {% endif %} + class="f-column categories__item relative text-center flex items-center flex-col gap-3" + {{ block.shopify_attributes }} + > +
    + {%- if block.settings.image != blank -%} + {{ + block.settings.image + | image_url: width: 1000 + | image_tag: + alt: block.settings.heading, + loading: 'lazy', + widths: '60,120,180', + class: 'motion-reduce w-full', + sizes: '60px', + height: 60, + width: 60 + }} + {%- else -%} + {{ 'image' | placeholder_svg_tag: 'placeholder-svg' }} + {%- endif -%} +
    + {%- if block.settings.heading != blank -%} +
    + {{ block.settings.heading }} +
    + {%- endif -%} + + {%- endfor -%} +
    + {%- endif -%} + {%- if button_block.settings.button_label != blank -%} + + {% assign extra_class = '' %} + {% unless button_block.settings.button_style == 'btn--underline' %} + {% assign extra_class = 'w-full' %} + {% endunless %} + {% render 'button', + button_style: button_block.settings.button_style, + button_link: button_block.settings.button_link, + button_label: button_block.settings.button_label, + button_icon: button_block.settings.button_icon, + additional_classes: extra_class + %} + + {%- endif -%} +
    +
    +
    +
    +
    +{% schema %} +{ + "name": "t:sections.banners-with-categories.name", + "disabled_on": { + "groups": ["header", "footer", "custom.overlay"] + }, + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "select", + "id": "container", + "options": [ + { + "value": "full", + "label": "t:general.container.options__full.label" + }, + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + } + ], + "default": "fixed", + "label": "t:general.container.label" + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "header", + "content": "t:general.header__category_bar.content" + }, + { + "type": "color_scheme", + "id": "categories_bar_color_scheme", + "label": "t:general.colors.label", + "default": "scheme-2" + }, + { + "type": "select", + "id": "columns_mobile", + "label": "t:general.mobile.columns_mobile.label", + "options": [ + { + "value": "1", + "label": "t:general.mobile.columns_mobile.options__1.label" + }, + { + "value": "2", + "label": "t:general.mobile.columns_mobile.options__2.label" + }, + { + "value": "3", + "label": "t:general.mobile.columns_mobile.options__3.label" + }, + { + "value": "4", + "label": "t:general.mobile.columns_mobile.options__4.label" + } + ], + "default": "2" + }, + { + "type": "header", + "content": "t:general.header__banner_settings.content" + }, + { + "type": "range", + "id": "columns", + "label": "t:general.grid.columns_desktop.label", + "min": 2, + "max": 4, + "step": 1, + "default": 3 + }, + { + "type": "select", + "id": "gap", + "label": "t:general.grid.column_gap.label", + "default": "2xs", + "options": [ + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ] + }, + { + "type": "select", + "id": "banner_height", + "label": "t:sections.grid-banner.settings.banner_height.label", + "default": "large", + "options": [ + { + "value": "auto", + "label": "t:general.height.options__8.label" + }, + { + "value": "small", + "label": "t:general.height.options__3.label" + }, + { + "value": "medium", + "label": "t:general.height.options__4.label" + }, + { + "value": "large", + "label": "t:general.height.options__6.label" + } + ] + }, + { + "type": "checkbox", + "id": "swipe_on_mobile", + "label": "t:general.mobile.swipe_on_mobile.label", + "default": false + }, + { + "type": "header", + "content": "t:general.padding.section_heading.content" + }, + { + "type": "range", + "id": "padding_top", + "label": "t:general.padding.top.label", + "default": 50, + "min": 0, + "max": 100, + "step": 2, + "unit": "px" + }, + { + "type": "range", + "id": "padding_bottom", + "label": "t:general.padding.bottom.label", + "default": 50, + "min": 0, + "max": 100, + "step": 2, + "unit": "px" + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "default": false, + "label": "t:general.divider.show_divider.label" + }, + { + "type": "select", + "id": "divider_width", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed", + "label": "t:general.divider.width.label" + } + ], + "blocks": [ + { + "type": "banner-card", + "name": "t:sections.grid-banner.blocks.banner_card.name", + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label" + }, + { + "type": "image_picker", + "id": "image_mobile", + "label": "t:general.image_mobile.label" + }, + { + "type": "range", + "id": "image_overlay_opacity", + "label": "t:general.image_overlay_opacity.label", + "min": 0, + "max": 100, + "unit": "%", + "step": 5, + "default": 0 + }, + { + "type": "header", + "content": "t:sections.grid-banner.blocks.banner_card.settings.banner_size.content" + }, + { + "type": "range", + "id": "column_span", + "label": "t:sections.grid-banner.blocks.banner_card.settings.column_span.label", + "min": 1, + "max": 4, + "step": 1, + "default": 1 + }, + { + "type": "range", + "id": "row_span", + "label": "t:sections.grid-banner.blocks.banner_card.settings.row_span.label", + "min": 1, + "max": 3, + "step": 1, + "default": 1 + }, + { + "type": "header", + "content": "t:general.content.label" + }, + { + "type": "select", + "id": "content_spacing", + "label": "t:general.content_spacing.label", + "default": "medium", + "options": [ + { + "value": "extra-small", + "label": "t:general.content_spacing.options__4.label" + }, + { + "value": "small", + "label": "t:general.content_spacing.options__1.label" + }, + { + "value": "medium", + "label": "t:general.content_spacing.options__2.label" + }, + { + "value": "large", + "label": "t:general.content_spacing.options__3.label" + } + ] + }, + { + "type": "select", + "id": "content_gap", + "label": "t:general.content_gap.label", + "default": "standard", + "options": [ + { + "value": "tight", + "label": "t:general.content_gap.options__xs.label" + }, + { + "value": "fitted", + "label": "t:general.content_gap.options__sm.label" + }, + { + "value": "standard", + "label": "t:general.content_gap.options__md.label" + } + ] + }, + { + "type": "select", + "id": "content_position", + "label": "t:general.content_position.label", + "options": [ + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__top_left.label", + "value": "top-left" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__top_center.label", + "value": "top-center" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__top_right.label", + "value": "top-right" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__middle_left.label", + "value": "middle-left" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__middle_center.label", + "value": "middle-center" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__middle_right.label", + "value": "middle-right" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__bottom_left.label", + "value": "bottom-left" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__bottom_center.label", + "value": "bottom-center" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__bottom_right.label", + "value": "bottom-right" + }, + { + "group": "t:general.content_position.optgroup__split.label", + "label": "t:general.content_position.options__middle_content.label", + "value": "split-middle-content" + }, + { + "group": "t:general.content_position.optgroup__split.label", + "label": "t:general.content_position.options__bottom_button.label", + "value": "split-bottom-button" + }, + { + "group": "t:general.content_position.optgroup__split.label", + "label": "t:general.content_position.options__top_subheading.label", + "value": "split-top-subheading" + } + ], + "default": "bottom-center" + }, + { + "type": "select", + "id": "content_alignment", + "label": "t:general.content_alignment.label", + "default": "center", + "options": [ + { + "value": "left", + "label": "t:general.content_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.content_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.content_alignment.options__3.label" + } + ] + }, + { + "type": "select", + "id": "content_position_mobile", + "label": "t:general.content_position.mobile.label", + "default": "middle-center", + "options": [ + { + "value": "top-center", + "label": "t:general.vertical_alignment.options__1.label" + }, + { + "value": "middle-center", + "label": "t:general.vertical_alignment.options__2.label" + }, + { + "value": "bottom-center", + "label": "t:general.vertical_alignment.options__3.label" + } + ], + "visible_if": "{{ block.settings.content_position != 'split-middle-content' and block.settings.content_position != 'split-bottom-button' and block.settings.content_position != 'split-top-subheading' }}" + }, + { + "type": "select", + "id": "content_alignment_mobile", + "label": "t:general.content_alignment.mobile.label", + "default": "center", + "options": [ + { + "value": "left", + "label": "t:general.content_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.content_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.content_alignment.options__3.label" + } + ] + }, + { + "type": "url", + "id": "card_link", + "label": "t:general.card_link.label" + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label" + }, + { + "type": "select", + "id": "subheading_style", + "label": "t:general.subheading_style.label", + "default": "", + "options": [ + { + "value": "", + "label": "t:general.subheading_style.options__1.label" + }, + { + "value": "border", + "label": "t:general.subheading_style.options__2.label" + }, + { + "value": "thick-border", + "label": "t:general.subheading_style.options__3.label" + } + ] + }, + { + "type": "inline_richtext", + "id": "heading", + "default": "Image card", + "label": "t:general.heading.label", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ], + "default": "h2" + }, + { + "type": "select", + "id": "heading_size_mobile", + "label": "t:general.text_size.heading_mobile.label", + "options": [ + { + "value": "inherit", + "label": "t:general.text_size.options__inherit.label" + }, + { + "value": "custom", + "label": "t:general.text_size.options__custom.label" + } + ], + "default": "inherit" + }, + { + "type": "range", + "id": "heading_size_custom", + "label": "t:general.text_size.heading_size_custom.label", + "min": 12, + "max": 100, + "step": 1, + "unit": "px", + "default": 18, + "visible_if": "{{ block.settings.heading_size_mobile == 'custom' }}" + }, + { + "type": "richtext", + "id": "text", + "label": "t:general.text.label" + }, + { + "type": "select", + "id": "text_size", + "label": "t:general.text_size.text.label", + "default": "text-base", + "options": [ + { + "value": "text-sm", + "label": "t:general.text_size.options__small.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-lg", + "label": "t:general.text_size.options__large.label" + }, + { + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--primary" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + }, + { + "type": "select", + "id": "button_size", + "label": "t:general.button.button_size.label", + "options": [ + { + "value": "btn--small", + "label": "t:general.button.button_size.options__sm.label" + }, + { + "value": "btn--medium", + "label": "t:general.button.button_size.options__md.label" + }, + { + "value": "btn--large", + "label": "t:general.button.button_size.options__lg.label" + } + ], + "default": "btn--medium" + }, + { + "type": "header", + "content": "t:general.custom_attr.header" + }, + { + "type": "text", + "id": "block_custom_class", + "label": "t:general.custom_attr.custom_class" + }, + { + "type": "header", + "content": "t:general.header__advanced.content" + }, + { + "type": "checkbox", + "id": "enable_preload_image", + "label": "t:general.enable_preload_image.label", + "info": "t:general.enable_preload_image.info" + } + ] + }, + { + "type": "heading", + "name": "t:general.heading.name", + "limit": 1, + "settings": [ + { + "type": "inline_richtext", + "id": "heading", + "default": "Top Categories", + "label": "t:general.heading.label", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h5", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + } + ] + }, + { + "type": "category", + "name": "t:sections.banners-with-categories.blocks.category.name", + "limit": 12, + "settings": [ + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label" + }, + { + "type": "inline_richtext", + "id": "heading", + "default": "Category name", + "label": "t:general.heading.label" + }, + { + "type": "url", + "id": "link", + "label": "t:general.link.label" + } + ] + }, + { + "type": "button", + "name": "t:general.button.name", + "limit": 1, + "settings": [ + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label", + "default": "Button label" + }, + { + "type": "url", + "id": "button_link", + "label": "t:general.button.button_link.label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--primary" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + } + ] + } + ], + "presets": [ + { + "name": "t:sections.banners-with-categories.name", + "blocks": [ + { + "type": "category" + }, + { + "type": "category" + }, + { + "type": "category" + }, + { + "type": "category" + }, + { + "type": "category" + }, + { + "type": "category" + }, + { + "type": "category" + }, + { + "type": "category" + }, + { + "type": "category" + }, + { + "type": "category" + }, + { + "type": "heading" + }, + { + "type": "button" + }, + { + "type": "banner-card", + "settings": { + "column_span": 3, + "row_span": 1 + } + }, + { + "type": "banner-card", + "settings": { + "content_gap": "fitted", + "column_span": 1, + "row_span": 1 + } + }, + { + "type": "banner-card", + "settings": { + "content_gap": "fitted", + "column_span": 1, + "row_span": 1 + } + }, + { + "type": "banner-card", + "settings": { + "content_gap": "fitted", + "column_span": 1, + "row_span": 1 + } + } + ] + } + ] +} +{% endschema %} diff --git a/sections/brand-logos.liquid b/sections/brand-logos.liquid new file mode 100644 index 00000000000..7ef6dceb73e --- /dev/null +++ b/sections/brand-logos.liquid @@ -0,0 +1,728 @@ +{{ 'section-brand-logos.css' | asset_url | stylesheet_tag }} +{%- liquid + assign container = section.settings.container + assign columns_desktop = section.settings.columns_desktop + assign tablet_items = columns_desktop | at_most: 3 + assign laptop_items = columns_desktop | at_most: 6 + assign columns_mobile_int = section.settings.columns_mobile | plus: 0 + assign button_style = section.settings.button_style + assign button_label = section.settings.button_label + assign button_link = section.settings.button_link + assign button_icon = section.settings.button_icon + assign enable_swipe_mobile = false + if section.settings.swipe_on_mobile and section.blocks.size > columns_mobile_int + assign enable_swipe_mobile = true + endif + assign first_block = section.blocks.first + assign image_ratio = first_block.settings.image.aspect_ratio | default: 2.333 +-%} +{% style %} + #section-{{ section.id }} { + --section-padding-top: {{ section.settings.padding_top }}px; + --section-padding-bottom: {{ section.settings.padding_bottom }}px; + --f-columns-mobile: {{ columns_mobile_int }}; + --f-columns-md: {{ tablet_items }}; + --f-columns-lg: {{ laptop_items }}; + --f-columns-xl: {{ columns_desktop }}; + } +{% endstyle %} +{% render 'divider', + show_divider: section.settings.show_section_divider, + divider_width: section.settings.divider_width +%} +
    +
    +
    + {% render 'section-heading', + section_settings: section.settings, + description_size: section.settings.text_size, + button_visible: true, + button_label: button_label, + button_link: button_link, + button_style: button_style, + button_icon: button_icon + %} +
    +
    +
    +
    + {%- for block in section.blocks -%} + {%- liquid + assign mod_desktop = forloop.index | modulo: columns_desktop + assign mod_laptop = forloop.index | modulo: laptop_items + assign mod_tablet = forloop.index | modulo: tablet_items + assign mod_mobile = forloop.index | modulo: columns_mobile_int + assign classes = '' + if mod_desktop == 0 and section.settings.grid_bordered + assign classes = classes | append: ' desktop-hide-border' + endif + if mod_laptop == 0 and section.settings.grid_bordered + assign classes = classes | append: ' laptop-hide-border' + endif + if mod_tablet == 0 and section.settings.grid_bordered + assign classes = classes | append: ' tablet-hide-border' + endif + if mod_mobile == 0 and section.settings.grid_bordered and enable_swipe_mobile == false + assign classes = classes | append: ' mobile-hide-border' + endif + -%} + + {%- endfor -%} +
    +
    +
    +
    +
    +
    +
    + +{% schema %} +{ + "name": "t:sections.brand-logos.name", + "disabled_on": { + "groups": ["footer", "header", "custom.overlay"] + }, + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "select", + "id": "container", + "label": "t:general.container.label", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed" + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "header", + "content": "t:general.section_header.content" + }, + { + "type": "select", + "id": "section_header_alignment", + "label": "t:general.text_alignment.label", + "options": [ + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ], + "default": "center" + }, + { + "type": "select", + "id": "section_header_alignment_mobile", + "label": "t:general.text_alignment.mobile.label", + "options": [ + { + "value": "inherit", + "label": "t:general.text_alignment.options__4.label" + }, + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ], + "default": "inherit" + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label" + }, + { + "type": "inline_richtext", + "id": "heading", + "label": "t:general.heading.label", + "default": "Brand logos", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ], + "default": "h2" + }, + { + "type": "richtext", + "id": "description", + "label": "t:general.text.label" + }, + { + "type": "select", + "id": "text_size", + "label": "t:general.text_size.description.label", + "options": [ + { + "value": "text-sm", + "label": "t:general.text_size.options__small.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-lg", + "label": "t:general.text_size.options__large.label" + }, + { + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label" + }, + { + "type": "url", + "id": "button_link", + "label": "t:general.button.button_link.label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--underline" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + }, + { + "type": "header", + "content": "t:general.image.content" + }, + { + "type": "select", + "id": "image_padding", + "label": "t:general.image_padding.label", + "options": [ + { + "value": "none", + "label": "t:general.image_padding.options__none.label" + }, + { + "value": "small", + "label": "t:general.image_padding.options__small.label" + }, + { + "value": "medium", + "label": "t:general.image_padding.options__medium.label" + } + ], + "default": "none" + }, + { + "type": "select", + "id": "image_width", + "label": "t:general.image_width.label", + "options": [ + { + "value": "medium", + "label": "t:general.image_width.options__md.label" + }, + { + "value": "large", + "label": "t:general.image_width.options__lg.label" + }, + { + "value": "full", + "label": "t:general.image_width.options__full.label" + } + ], + "default": "full" + }, + { + "type": "header", + "content": "t:general.grid.name" + }, + { + "type": "range", + "id": "columns_desktop", + "label": "t:general.grid.columns_desktop.label", + "min": 2, + "max": 10, + "step": 1, + "default": 6 + }, + { + "type": "select", + "id": "column_gap", + "label": "t:general.grid.column_gap.label", + "options": [ + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ], + "default": "medium" + }, + { + "type": "select", + "id": "row_gap", + "label": "t:general.grid.row_gap.label", + "options": [ + { + "value": "inherit", + "label": "t:general.grid.gap.options__inherit.label" + }, + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ], + "default": "inherit" + }, + { + "type": "checkbox", + "id": "grid_bordered", + "label": "t:sections.collection-list.settings.show_grid_border.label", + "default": false + }, + { + "type": "header", + "content": "t:general.mobile.name" + }, + { + "type": "select", + "id": "columns_mobile", + "label": "t:general.mobile.columns_mobile.label", + "options": [ + { + "value": "1", + "label": "t:general.mobile.columns_mobile.options__1.label" + }, + { + "value": "2", + "label": "t:general.mobile.columns_mobile.options__2.label" + }, + { + "value": "3", + "label": "t:general.mobile.columns_mobile.options__3.label" + } + ], + "default": "1" + }, + { + "type": "checkbox", + "id": "swipe_on_mobile", + "label": "t:general.mobile.swipe_on_mobile.label", + "default": true + }, + { + "type": "header", + "content": "t:general.padding.section_heading.content" + }, + { + "type": "range", + "id": "padding_top", + "label": "t:general.padding.top.label", + "min": 0, + "max": 100, + "step": 2, + "unit": "px", + "default": 50 + }, + { + "type": "range", + "id": "padding_bottom", + "label": "t:general.padding.bottom.label", + "min": 0, + "max": 100, + "step": 2, + "unit": "px", + "default": 50 + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "label": "t:general.divider.show_divider.label", + "default": false + }, + { + "type": "select", + "id": "divider_width", + "label": "t:general.divider.width.label", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed" + } + ], + "blocks": [ + { + "type": "logo", + "name": "t:settings_schema.logo.name", + "settings": [ + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label" + }, + { + "type": "url", + "id": "image_link", + "label": "t:general.link.label" + } + ] + } + ], + "presets": [ + { + "name": "t:sections.brand-logos.presets", + "blocks": [ + { + "type": "logo" + }, + { + "type": "logo" + }, + { + "type": "logo" + }, + { + "type": "logo" + }, + { + "type": "logo" + }, + { + "type": "logo" + } + ] + } + ] +} +{% endschema %} diff --git a/sections/breadcrumbs.liquid b/sections/breadcrumbs.liquid new file mode 100644 index 00000000000..58c9663ca0c --- /dev/null +++ b/sections/breadcrumbs.liquid @@ -0,0 +1,155 @@ +{%- unless template == 'index' -%} + {%- liquid + assign justify = section.settings.text_alignment | default: 'start' + -%} +
    + +
    +{%- endunless -%} +{% schema %} +{ + "name": "t:sections.breadcrumbs.name", + "disabled_on": { + "groups": ["header", "footer", "custom.overlay"], + "templates": ["index"] + }, + "limit": 1, + "settings": [ + { + "type": "select", + "id": "container", + "options": [ + { + "value": "full", + "label": "t:general.container.options__full.label" + }, + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + } + ], + "default": "fixed", + "label": "t:general.container.label" + }, + { + "type": "select", + "id": "text_alignment", + "label": "t:general.text_alignment.label", + "options": [ + { + "value": "start", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "end", + "label": "t:general.text_alignment.options__3.label" + } + ], + "default": "start" + }, + { + "type": "range", + "id": "padding_top", + "label": "t:general.padding.top.label", + "default": 16, + "min": 0, + "max": 24, + "step": 1, + "unit": "px" + }, + { + "type": "range", + "id": "padding_bottom", + "label": "t:general.padding.bottom.label", + "default": 20, + "min": 0, + "max": 24, + "step": 1, + "unit": "px" + } + ], + "presets": [ + { + "name": "t:sections.breadcrumbs.name" + } + ] +} +{% endschema %} diff --git a/sections/bulk-quick-order-list.liquid b/sections/bulk-quick-order-list.liquid deleted file mode 100644 index 321c20b93b3..00000000000 --- a/sections/bulk-quick-order-list.liquid +++ /dev/null @@ -1,15 +0,0 @@ -{{ 'quick-order-list.css' | asset_url | stylesheet_tag }} - - - -{% render 'quick-order-list', product: product, show_image: true, show_sku: true, is_modal: true %} - -{% schema %} -{ - "name": "t:sections.quick-order-list.name", - "limit": 1, - "enabled_on": { - "templates": ["product"] - } -} -{% endschema %} diff --git a/sections/buttons-with-icon.liquid b/sections/buttons-with-icon.liquid new file mode 100644 index 00000000000..71e490ed952 --- /dev/null +++ b/sections/buttons-with-icon.liquid @@ -0,0 +1,670 @@ +{{ 'section-buttons-with-icon.css' | asset_url | stylesheet_tag }} + + +{%- liquid + assign enable_slider = section.settings.enable_slider +-%} + +{% render 'divider', + show_divider: section.settings.show_section_divider, + divider_width: section.settings.divider_width +%} + +{%- style -%} + .section-{{ section.id }}:has(.swiper-button-lock) .button-list__items { + justify-content: {{ section.settings.item_alignment | replace: 'left', 'flex-start' | replace: 'right', 'flex-end' }}; + } +{%- endstyle -%} + +
    +
    + {% render 'section-heading', section_settings: section.settings %} +
    + +
    + {%- for block in section.blocks -%} +
    + {%- liquid + assign tag = 'div' + if block.settings.button_link != blank + assign tag = 'a' + endif + -%} +
    + <{{ tag }} + class="button-item__inner hover-wrapper btn {{ section.settings.item_button_style }}" + {% if block.settings.button_link != blank %} + href="{{ block.settings.button_link }}" + {% endif %} + > + + {%- if block.settings.icon_img != blank -%} + {%- liquid + assign alt = block.settings.icon_img.alt | default: shop.name | escape + assign image_widths = '38, 48, 76, 96, 132, ' | append: block.settings.icon_img.width + -%} + {%- capture image_sizes -%}(min-width:768px) 48px, 38px{%- endcapture -%} + + {{ + block.settings.icon_img + | image_url: width: block.settings.icon_img.width + | image_tag: + loading: 'lazy', + class: 'motion-reduce absolute inset-0 w-full h-full', + widths: image_widths, + sizes: image_sizes, + is: 'image-lazy', + alt: alt + }} + + {%- elsif block.settings.icon != 'none' -%} + + {% render 'icons', icon: block.settings.icon %} + + {%- endif -%} + + {%- if block.settings.button_label != blank -%} + + {{- block.settings.button_label -}} + + {%- endif -%} + + +
    +
    + {%- endfor -%} +
    +
    + {%- if enable_slider -%} + + {%- endif -%} +
    +
    +
    + +{% schema %} +{ + "name": "t:sections.buttons-with-icon.name", + "tag": "section", + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "select", + "id": "container", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed", + "label": "t:general.divider.width.label" + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "header", + "content": "t:general.section_header.content" + }, + { + "id": "section_header_alignment", + "type": "select", + "label": "t:general.text_alignment.label", + "default": "left", + "options": [ + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ] + }, + { + "id": "section_header_alignment_mobile", + "type": "select", + "label": "t:general.text_alignment.mobile.label", + "default": "inherit", + "options": [ + { + "value": "inherit", + "label": "t:general.text_alignment.options__4.label" + }, + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ] + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label" + }, + { + "type": "inline_richtext", + "id": "heading", + "default": "Button group", + "label": "t:general.heading.label", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h1", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "header", + "content": "t:general.header__block_settings.content" + }, + { + "type": "select", + "id": "item_alignment", + "label": "t:general.content_alignment.label", + "options": [ + { + "value": "left", + "label": "t:general.content_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.content_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.content_alignment.options__3.label" + } + ], + "default": "left" + }, + { + "type": "select", + "id": "item_button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--icon", + "label": "t:general.button.button_style.options__6.label" + } + ], + "default": "btn--icon" + }, + { + "type": "select", + "id": "item_button_font", + "label": "t:general.font_family.button.label", + "options": [ + { + "value": "button", + "label": "t:general.font_family.options__4.label" + }, + { + "value": "body", + "label": "t:general.font_family.options__1.label" + }, + { + "value": "body-bolder", + "label": "t:general.font_family.options__3.label" + }, + { + "value": "heading", + "label": "t:general.font_family.options__2.label" + } + ], + "default": "button" + }, + { + "type": "header", + "content": "t:general.carousel.name" + }, + { + "type": "checkbox", + "id": "enable_slider", + "label": "t:general.carousel.enable_carousel.label", + "default": true + }, + { + "type": "header", + "content": "t:general.mobile.name" + }, + { + "type": "checkbox", + "id": "swipe_on_mobile", + "default": true, + "label": "t:general.mobile.swipe_on_mobile.label" + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "default": false, + "label": "t:general.divider.show_divider.label" + }, + { + "type": "select", + "id": "divider_width", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed", + "label": "t:general.divider.width.label" + }, + { + "type": "header", + "content": "t:general.padding.section_heading.content" + }, + { + "type": "range", + "id": "padding_top", + "min": 0, + "max": 120, + "step": 2, + "unit": "px", + "label": "t:general.padding.top.label", + "default": 50 + }, + { + "type": "range", + "id": "padding_bottom", + "min": 0, + "max": 120, + "step": 2, + "unit": "px", + "label": "t:general.padding.bottom.label", + "default": 50 + } + ], + "blocks": [ + { + "type": "button_item", + "name": "t:general.button.name", + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label", + "default": "Button label" + }, + { + "type": "url", + "id": "button_link", + "label": "t:general.button.button_link.label" + }, + { + "type": "header", + "content": "t:general.icon.label" + }, + { + "type": "select", + "id": "icon", + "label": "t:general.icon.label", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" + }, + { + "value": "car-simple", + "label": "t:general.icon.options__2.label" + }, + { + "value": "truck", + "label": "t:general.icon.options__3.label" + }, + { + "value": "package", + "label": "t:general.icon.options__4.label" + }, + { + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" + }, + { + "value": "gift", + "label": "t:general.icon.options__6.label" + }, + { + "value": "heart", + "label": "t:general.icon.options__7.label" + }, + { + "value": "globe", + "label": "t:general.icon.options__8.label" + }, + { + "value": "check", + "label": "t:general.icon.options__9.label" + }, + { + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" + }, + { + "value": "lightning", + "label": "t:general.icon.options__11.label" + }, + { + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" + }, + { + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" + }, + { + "value": "location", + "label": "t:general.icon.options__14.label" + }, + { + "value": "tag", + "label": "t:general.icon.options__15.label" + }, + { + "value": "map-pin", + "label": "t:general.icon.options__16.label" + }, + { + "value": "smiley", + "label": "t:general.icon.options__17.label" + }, + { + "value": "stool", + "label": "t:general.icon.options__18.label" + }, + { + "value": "clock", + "label": "t:general.icon.options__19.label" + }, + { + "value": "phone", + "label": "t:general.icon.options__20.label" + }, + { + "value": "chat", + "label": "t:general.icon.options__21.label" + }, + { + "value": "paperplane", + "label": "t:general.icon.options__22.label" + }, + { + "value": "sliders", + "label": "t:general.icon.options__23.label" + }, + { + "value": "sound", + "label": "t:general.icon.options__24.label" + }, + { + "value": "music", + "label": "t:general.icon.options__25.label" + }, + { + "value": "airplane", + "label": "t:general.icon.options__26.label" + }, + { + "value": "alarm", + "label": "t:general.icon.options__27.label" + }, + { + "value": "play-list", + "label": "t:general.icon.options__28.label" + }, + { + "value": "drop-slash", + "label": "t:general.icon.options__29.label" + }, + { + "value": "pause-circle", + "label": "t:general.icon.options__30.label" + }, + { + "value": "acorn", + "label": "t:general.icon.options__34.label" + }, + { + "value": "leaf", + "label": "t:general.icon.options__35.label" + } + ], + "default": "check" + }, + { + "type": "image_picker", + "id": "icon_img", + "label": "t:general.custom_icon.label" + } + ] + } + ], + "presets": [ + { + "name": "t:sections.buttons-with-icon.name", + "blocks": [ + { + "type": "button_item", + "settings": { + "icon": "check" + } + }, + { + "type": "button_item", + "settings": { + "icon": "check" + } + }, + { + "type": "button_item", + "settings": { + "icon": "check" + } + }, + { + "type": "button_item", + "settings": { + "icon": "check" + } + }, + { + "type": "button_item", + "settings": { + "icon": "check" + } + }, + { + "type": "button_item", + "settings": { + "icon": "check" + } + }, + { + "type": "button_item", + "settings": { + "icon": "check" + } + }, + { + "type": "button_item", + "settings": { + "icon": "check" + } + }, + { + "type": "button_item", + "settings": { + "icon": "check" + } + }, + { + "type": "button_item", + "settings": { + "icon": "check" + } + } + ] + } + ], + "disabled_on": { + "groups": ["footer", "header", "custom.overlay"] + } +} +{% endschema %} diff --git a/sections/cart-drawer.liquid b/sections/cart-drawer.liquid index ef322be74f7..3839bbd4c92 100644 --- a/sections/cart-drawer.liquid +++ b/sections/cart-drawer.liquid @@ -1 +1,1001 @@ -{%- render 'cart-drawer' -%} +{%- if request.page_type != 'cart' and settings.cart_type == 'drawer' -%} + {%- if request.page_type == 'cart' -%} + {{ 'cart.css' | asset_url | stylesheet_tag }} + {%- else -%} + + {%- endif -%} + + {%- if linklists['gift-wrapping'].links != blank and linklists['gift-wrapping'].links.first.type == 'product_link' -%} + + {%- endif -%} + + +{%- endif -%} + +{% schema %} +{ + "name": "t:sections.cart-drawer.name", + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "checkbox", + "id": "show_cart_note", + "label": "t:sections.cart-drawer.settings.show_cart_note.label", + "default": true + }, + { + "type": "checkbox", + "id": "show_shipping_rates_calculator", + "label": "t:sections.cart-drawer.settings.show_shipping_rates_calculator.label" + }, + { + "type": "checkbox", + "id": "show_cart_coupon", + "label": "t:sections.cart-drawer.settings.show_cart_coupon.label", + "default": true + }, + { + "type": "checkbox", + "id": "show_free_shipping_goal", + "label": "t:sections.cart-drawer.settings.show_free_shipping_goal.label", + "default": true, + "info": "t:settings_schema.cart.settings.free_shipping_minimum_amount.info" + }, + { + "type": "header", + "content": "t:sections.cart-drawer.settings.cart_recommendations.header.content" + }, + { + "type": "paragraph", + "content": "t:sections.cart-drawer.settings.cart_recommendations.paragraph.content" + }, + { + "type": "checkbox", + "id": "enable_cart_recommendations", + "label": "t:sections.cart-drawer.settings.cart_recommendations.enable.label", + "default": true + }, + { + "type": "color_scheme", + "id": "cart_recommendations_color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "text", + "id": "cart_recommendations_heading", + "label": "t:general.heading.label", + "default": "You may also like" + }, + { + "type": "range", + "id": "cart_recommendations_limit", + "label": "t:general.grid.product_limit.label", + "min": 1, + "max": 10, + "step": 1, + "default": 3 + }, + { + "type": "product_list", + "id": "cart_recommendations_products", + "label": "t:sections.cart-drawer.settings.cart_recommendations.product_list.label" + }, + { + "type": "select", + "id": "cart_recommendations_layout", + "label": "t:sections.main-product.blocks.complementary_products.settings.layout.label", + "default": "grid", + "options": [ + { + "value": "grid", + "label": "t:sections.main-product.blocks.complementary_products.settings.layout.options__1.label" + }, + { + "value": "horizontal-list", + "label": "t:sections.main-product.blocks.complementary_products.settings.layout.options__2.label" + } + ] + }, + { + "type": "header", + "content": "t:sections.cart-drawer.settings.cart_message.header.content" + }, + { + "type": "color_scheme", + "id": "cart_mess_color_scheme", + "label": "t:general.colors.label", + "default": "scheme-inverse" + }, + { + "type": "text", + "id": "cart_message", + "label": "t:general.message.label" + }, + { + "type": "select", + "id": "cart_message_alignment", + "label": "t:general.text_alignment.label", + "options": [ + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ], + "default": "center" + } + ] +} +{% endschema %} diff --git a/sections/cart-icon-bubble.liquid b/sections/cart-icon-bubble.liquid deleted file mode 100644 index 66fff0bad8f..00000000000 --- a/sections/cart-icon-bubble.liquid +++ /dev/null @@ -1,15 +0,0 @@ -{% if cart == empty %} - {{ 'icon-cart-empty.svg' | inline_asset_content }} -{% else %} - {{ 'icon-cart.svg' | inline_asset_content }} -{% endif %} - -{{ 'templates.cart.cart' | t }} -{%- if cart != empty -%} -
    - {%- if cart.item_count < 100 -%} - - {%- endif -%} - {{ 'sections.header.cart_count' | t: count: cart.item_count }} -
    -{%- endif -%} diff --git a/sections/cart-live-region-text.liquid b/sections/cart-live-region-text.liquid deleted file mode 100644 index 7cd46dbd1c6..00000000000 --- a/sections/cart-live-region-text.liquid +++ /dev/null @@ -1 +0,0 @@ -{{ 'sections.cart.new_estimated_total' | t }}: {{ cart.total_price | money_with_currency }} diff --git a/sections/cart-notification-button.liquid b/sections/cart-notification-button.liquid deleted file mode 100644 index 0d7769829d7..00000000000 --- a/sections/cart-notification-button.liquid +++ /dev/null @@ -1 +0,0 @@ -{{ 'general.cart.view' | t: count: cart.item_count }} diff --git a/sections/cart-notification-product.liquid b/sections/cart-notification-product.liquid deleted file mode 100644 index 6cd6259f19f..00000000000 --- a/sections/cart-notification-product.liquid +++ /dev/null @@ -1,53 +0,0 @@ -{%- if cart != empty -%} - {%- for item in cart.items -%} -
    - {%- if item.image -%} -
    - {{ item.image.alt | escape }} -
    - {%- endif -%} -
    - {%- if settings.show_vendor -%} -

    {{ item.product.vendor }}

    - {%- endif -%} -

    {{ item.product.title | escape }}

    -
    - {%- unless item.product.has_only_default_variant -%} - {%- for option in item.options_with_values -%} -
    -
    {{ option.name }}:
    -
    {{ option.value }}
    -
    - {%- endfor -%} - {%- endunless -%} - {%- for property in item.properties -%} - {%- assign property_first_char = property.first | slice: 0 -%} - {%- if property.last != blank and property_first_char != '_' -%} -
    -
    {{ property.first }}:
    -
    - {%- if property.last contains '/uploads/' -%} - - {{ property.last | split: '/' | last }} - - {%- else -%} - {{ property.last }} - {%- endif -%} -
    -
    - {%- endif -%} - {%- endfor -%} -
    - {%- if item.selling_plan_allocation != null -%} -

    {{ item.selling_plan_allocation.selling_plan.name }}

    - {%- endif -%} -
    -
    - {%- endfor -%} -{%- endif -%} diff --git a/sections/collage.liquid b/sections/collage.liquid deleted file mode 100644 index 27225d6e27b..00000000000 --- a/sections/collage.liquid +++ /dev/null @@ -1,432 +0,0 @@ -{{ 'collage.css' | asset_url | stylesheet_tag }} -{{ 'component-card.css' | asset_url | stylesheet_tag }} -{{ 'component-price.css' | asset_url | stylesheet_tag }} -{{ 'component-modal-video.css' | asset_url | stylesheet_tag }} -{{ 'component-deferred-media.css' | asset_url | stylesheet_tag }} - -{%- style -%} - .section-{{ section.id }}-padding { - padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px; - padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px; - } - - @media screen and (min-width: 750px) { - .section-{{ section.id }}-padding { - padding-top: {{ section.settings.padding_top }}px; - padding-bottom: {{ section.settings.padding_bottom }}px; - } - } -{%- endstyle -%} - -
    -
    - {%- if section.settings.heading != blank -%} -

    - {{ section.settings.heading }} -

    - {%- endif -%} -
    - {% assign skip_card_product_styles = false %} - {%- for block in section.blocks -%} -
    - {%- assign placeholder_image_index = forloop.index0 | modulo: 4 | plus: 1 -%} - {%- case block.type -%} - {%- when 'image' -%} -
    -
    - {%- if block.settings.image != blank -%} - {%- liquid - if section.settings.desktop_layout == 'left' - assign large_block = forloop.first - else - assign large_block = forloop.last - endif - - assign grid_space_desktop = settings.spacing_grid_horizontal | divided_by: 2 | append: 'px' - assign grid_space_mobile = settings.spacing_grid_horizontal | divided_by: 4 | append: 'px' - -%} - {%- if large_block -%} - {%- capture sizes -%} - {% if section.blocks.size == 1 -%}(min-width: {{ settings.page_width }}px) calc({{ settings.page_width }}px - 100px){% else %}(min-width: {{ settings.page_width }}px) calc(({{ settings.page_width }}px - 100px) * 2 / 3 - {{ grid_space_desktop }}){% endif %}, - {% if section.blocks.size == 1 -%}(min-width: 750px) calc(100vw - 100px){% else %}(min-width: 750px) calc((100vw - 100px) * 2 / 3 - {{ grid_space_desktop }}){% endif %}, - {% if section.blocks.size == 2 and section.settings.mobile_layout == 'collage' -%}calc((100vw - 30px) / 2){% else %}calc(100vw - 30px){% endif %} - {%- endcapture -%} - {{ - block.settings.image - | image_url: width: 3200 - | image_tag: - sizes: sizes, - widths: '50, 75, 100, 150, 200, 300, 400, 500, 750, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000, 3200' - }} - {%- else -%} - {%- capture sizes -%} - (min-width: {{ settings.page_width }}px) calc(({{ settings.page_width }}px - 100px) * 1 / 3 - {{ grid_space_desktop }}), - (min-width: 750px) calc((100vw - 100px) * 1 / 3 - {{ grid_space_desktop }}), - {% if section.settings.mobile_layout == 'collage' %}calc((100vw - 30px) / 2 - {{ grid_space_mobile }}){% else %}calc(100vw - 30px){% endif %} - {%- endcapture -%} - {{ - block.settings.image - | image_url: width: 3200 - | image_tag: - sizes: sizes, - widths: '50, 75, 100, 150, 200, 300, 400, 500, 750, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000, 3200' - }} - {%- endif -%} - {%- else -%} - {{ 'detailed-apparel-1' | placeholder_svg_tag: 'placeholder-svg' }} - {%- endif -%} -
    -
    - {%- when 'product' -%} - {%- assign placeholder_image = 'product-apparel-' | append: placeholder_image_index -%} - {% render 'card-product', - card_product: block.settings.product, - media_aspect_ratio: 'adapt', - show_secondary_image: block.settings.second_image, - extend_height: true, - placeholder_image: placeholder_image, - skip_styles: skip_card_product_styles - %} - {% assign skip_card_product_styles = true %} - {%- when 'collection' -%} - {%- assign placeholder_image = 'collection-apparel-' | append: placeholder_image_index -%} - {% render 'card-collection', - card_collection: block.settings.collection, - media_aspect_ratio: 'adapt', - columns: 2, - extend_height: true, - wrapper_class: section.settings.card_styles, - placeholder_image: placeholder_image - %} - {%- when 'video' -%} -
    - -
    - -
    -
    - - - -
    - {%- endcase -%} -
    - {%- endfor -%} -
    -
    -
    - -{% schema %} -{ - "name": "t:sections.collage.name", - "tag": "section", - "class": "section", - "disabled_on": { - "groups": ["header", "footer"] - }, - "settings": [ - { - "type": "inline_richtext", - "id": "heading", - "default": "t:sections.collage.settings.heading.default", - "label": "t:sections.collage.settings.heading.label" - }, - { - "type": "select", - "id": "heading_size", - "options": [ - { - "value": "h2", - "label": "t:sections.all.heading_size.options__1.label" - }, - { - "value": "h1", - "label": "t:sections.all.heading_size.options__2.label" - }, - { - "value": "h0", - "label": "t:sections.all.heading_size.options__3.label" - }, - { - "value": "hxl", - "label": "t:sections.all.heading_size.options__4.label" - }, - { - "value": "hxxl", - "label": "t:sections.all.heading_size.options__5.label" - } - ], - "default": "h1", - "label": "t:sections.all.heading_size.label" - }, - { - "type": "header", - "content": "t:sections.collage.settings.header_layout.content" - }, - { - "type": "select", - "id": "desktop_layout", - "options": [ - { - "value": "left", - "label": "t:sections.collage.settings.desktop_layout.options__1.label" - }, - { - "value": "right", - "label": "t:sections.collage.settings.desktop_layout.options__2.label" - } - ], - "default": "left", - "label": "t:sections.collage.settings.desktop_layout.label" - }, - { - "type": "select", - "id": "mobile_layout", - "options": [ - { - "value": "collage", - "label": "t:sections.collage.settings.mobile_layout.options__1.label" - }, - { - "value": "column", - "label": "t:sections.collage.settings.mobile_layout.options__2.label" - } - ], - "default": "column", - "label": "t:sections.collage.settings.mobile_layout.label" - }, - { - "type": "select", - "id": "card_styles", - "options": [ - { - "value": "none", - "label": "t:sections.collage.settings.card_styles.options__1.label" - }, - { - "value": "product-card-wrapper", - "label": "t:sections.collage.settings.card_styles.options__2.label" - } - ], - "default": "product-card-wrapper", - "info": "t:sections.collage.settings.card_styles.info", - "label": "t:sections.collage.settings.card_styles.label" - }, - { - "type": "color_scheme", - "id": "color_scheme", - "label": "t:sections.all.colors.label", - "info": "t:sections.all.colors.has_cards_info", - "default": "scheme-1" - }, - { - "type": "header", - "content": "t:sections.all.padding.section_padding_heading" - }, - { - "type": "range", - "id": "padding_top", - "min": 0, - "max": 100, - "step": 4, - "unit": "px", - "label": "t:sections.all.padding.padding_top", - "default": 36 - }, - { - "type": "range", - "id": "padding_bottom", - "min": 0, - "max": 100, - "step": 4, - "unit": "px", - "label": "t:sections.all.padding.padding_bottom", - "default": 36 - } - ], - "blocks": [ - { - "type": "image", - "name": "t:sections.collage.blocks.image.name", - "settings": [ - { - "type": "image_picker", - "id": "image", - "label": "t:sections.collage.blocks.image.settings.image.label" - } - ] - }, - { - "type": "product", - "name": "t:sections.collage.blocks.product.name", - "settings": [ - { - "type": "product", - "id": "product", - "label": "t:sections.collage.blocks.product.settings.product.label" - }, - { - "type": "checkbox", - "id": "second_image", - "default": false, - "label": "t:sections.collage.blocks.product.settings.second_image.label" - } - ] - }, - { - "type": "collection", - "name": "t:sections.collage.blocks.collection.name", - "settings": [ - { - "type": "collection", - "id": "collection", - "label": "t:sections.collage.blocks.collection.settings.collection.label" - } - ] - }, - { - "type": "video", - "name": "t:sections.collage.blocks.video.name", - "settings": [ - { - "type": "image_picker", - "id": "cover_image", - "label": "t:sections.collage.blocks.video.settings.cover_image.label" - }, - { - "type": "video_url", - "id": "video_url", - "accept": ["youtube", "vimeo"], - "default": "https://www.youtube.com/watch?v=_9VUPq3SxOc", - "label": "t:sections.collage.blocks.video.settings.video_url.label", - "placeholder": "t:sections.collage.blocks.video.settings.video_url.placeholder", - "info": "t:sections.collage.blocks.video.settings.video_url.info" - }, - { - "type": "text", - "id": "description", - "default": "t:sections.collage.blocks.video.settings.description.default", - "label": "t:sections.collage.blocks.video.settings.description.label", - "info": "t:sections.collage.blocks.video.settings.description.info" - } - ] - } - ], - "max_blocks": 3, - "presets": [ - { - "name": "t:sections.collage.presets.name", - "blocks": [ - { - "type": "image" - }, - { - "type": "product" - }, - { - "type": "collection" - } - ] - } - ] -} -{% endschema %} diff --git a/sections/collapsible-content.liquid b/sections/collapsible-content.liquid deleted file mode 100644 index 795f087a1c8..00000000000 --- a/sections/collapsible-content.liquid +++ /dev/null @@ -1,517 +0,0 @@ -{{ 'component-accordion.css' | asset_url | stylesheet_tag }} -{{ 'collapsible-content.css' | asset_url | stylesheet_tag }} - -{%- style -%} - .section-{{ section.id }}-padding { - padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px; - padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px; - } - - @media screen and (min-width: 750px) { - .section-{{ section.id }}-padding { - padding-top: {{ section.settings.padding_top }}px; - padding-bottom: {{ section.settings.padding_bottom }}px; - } - } -{%- endstyle -%} - -
    -
    -
    -
    -
    - {%- if section.settings.caption != blank -%} -

    - {{ section.settings.caption | escape }} -

    - {% endif %} - {%- if section.settings.heading != blank -%} -

    - {{ section.settings.heading }} -

    - {%- else -%} -

    {{ 'accessibility.collapsible_content_title' | t }}

    - {% endif %} -
    -
    - {%- if section.settings.image != blank -%} -
    -
    - {%- liquid - assign padding_multiplier = 1 - if section.settings.layout == 'section' - assign padding_multiplier = 2 - endif - assign desktop_tablet_padding = 100 | times: padding_multiplier | append: 'px' - assign mobile_padding = 30 | times: padding_multiplier | append: 'px' - -%} - {%- capture sizes -%} - (min-width: {{ settings.page_width }}px) calc(({{ settings.page_width }}px - {{ desktop_tablet_padding }}) / 2), - (min-width: 750px) calc((100vw - {{ desktop_tablet_padding }}) / 2), - calc(100vw - {{ mobile_padding }}) - {%- endcapture -%} - {{ - section.settings.image - | image_url: width: 3200 - | image_tag: - sizes: sizes, - widths: '50, 75, 100, 150, 200, 300, 400, 500, 750, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000, 3200' - }} -
    -
    - {% endif %} -
    - {%- for block in section.blocks -%} -
    -
    - - {% render 'icon-accordion', icon: block.settings.icon %} -

    - {{ block.settings.heading | default: block.settings.page.title | escape }} -

    - {{- 'icon-caret.svg' | inline_asset_content -}} -
    -
    - {{ block.settings.row_content }} - {{ block.settings.page.content }} -
    -
    -
    - {%- endfor -%} -
    -
    -
    -
    -
    -
    - -{% schema %} -{ - "name": "t:sections.collapsible_content.name", - "tag": "section", - "class": "section", - "disabled_on": { - "groups": ["header", "footer"] - }, - "settings": [ - { - "type": "text", - "id": "caption", - "label": "t:sections.collapsible_content.settings.caption.label" - }, - { - "type": "inline_richtext", - "id": "heading", - "label": "t:sections.collapsible_content.settings.heading.label", - "default": "t:sections.collapsible_content.settings.heading.default" - }, - { - "type": "select", - "id": "heading_size", - "options": [ - { - "value": "h2", - "label": "t:sections.all.heading_size.options__1.label" - }, - { - "value": "h1", - "label": "t:sections.all.heading_size.options__2.label" - }, - { - "value": "h0", - "label": "t:sections.all.heading_size.options__3.label" - }, - { - "value": "hxl", - "label": "t:sections.all.heading_size.options__4.label" - }, - { - "value": "hxxl", - "label": "t:sections.all.heading_size.options__5.label" - } - ], - "default": "h1", - "label": "t:sections.all.heading_size.label" - }, - { - "type": "select", - "id": "heading_alignment", - "label": "t:sections.collapsible_content.settings.heading_alignment.label", - "options": [ - { - "value": "left", - "label": "t:sections.collapsible_content.settings.heading_alignment.options__1.label" - }, - { - "value": "center", - "label": "t:sections.collapsible_content.settings.heading_alignment.options__2.label" - }, - { - "value": "right", - "label": "t:sections.collapsible_content.settings.heading_alignment.options__3.label" - } - ], - "default": "center" - }, - { - "type": "header", - "content": "t:sections.collapsible_content.settings.layout_header.content" - }, - { - "type": "select", - "id": "layout", - "label": "t:sections.collapsible_content.settings.layout.label", - "options": [ - { - "value": "none", - "label": "t:sections.collapsible_content.settings.layout.options__1.label" - }, - { - "value": "row", - "label": "t:sections.collapsible_content.settings.layout.options__2.label" - }, - { - "value": "section", - "label": "t:sections.collapsible_content.settings.layout.options__3.label" - } - ], - "default": "none" - }, - { - "type": "color_scheme", - "id": "container_color_scheme", - "label": "t:sections.collapsible_content.settings.container_color_scheme.label", - "default": "scheme-2" - }, - { - "type": "color_scheme", - "id": "color_scheme", - "label": "t:sections.collapsible_content.settings.section_color_scheme.label", - "default": "scheme-1" - }, - { - "type": "checkbox", - "id": "open_first_collapsible_row", - "default": false, - "label": "t:sections.collapsible_content.settings.open_first_collapsible_row.label" - }, - { - "type": "header", - "content": "t:sections.collapsible_content.settings.header.content" - }, - { - "type": "image_picker", - "id": "image", - "label": "t:sections.collapsible_content.settings.image.label" - }, - { - "type": "select", - "id": "image_ratio", - "options": [ - { - "value": "adapt", - "label": "t:sections.collapsible_content.settings.image_ratio.options__1.label" - }, - { - "value": "small", - "label": "t:sections.collapsible_content.settings.image_ratio.options__2.label" - }, - { - "value": "large", - "label": "t:sections.collapsible_content.settings.image_ratio.options__3.label" - } - ], - "default": "adapt", - "label": "t:sections.collapsible_content.settings.image_ratio.label" - }, - { - "type": "select", - "id": "desktop_layout", - "options": [ - { - "value": "image_first", - "label": "t:sections.collapsible_content.settings.desktop_layout.options__1.label" - }, - { - "value": "image_second", - "label": "t:sections.collapsible_content.settings.desktop_layout.options__2.label" - } - ], - "default": "image_second", - "label": "t:sections.collapsible_content.settings.desktop_layout.label" - }, - { - "type": "header", - "content": "t:sections.all.padding.section_padding_heading" - }, - { - "type": "range", - "id": "padding_top", - "min": 0, - "max": 100, - "step": 4, - "unit": "px", - "label": "t:sections.all.padding.padding_top", - "default": 36 - }, - { - "type": "range", - "id": "padding_bottom", - "min": 0, - "max": 100, - "step": 4, - "unit": "px", - "label": "t:sections.all.padding.padding_bottom", - "default": 36 - } - ], - "blocks": [ - { - "type": "collapsible_row", - "name": "t:sections.collapsible_content.blocks.collapsible_row.name", - "settings": [ - { - "type": "text", - "id": "heading", - "default": "t:sections.collapsible_content.blocks.collapsible_row.settings.heading.default", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.heading.label" - }, - { - "type": "select", - "id": "icon", - "options": [ - { - "value": "none", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__1.label" - }, - { - "value": "apple", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__2.label" - }, - { - "value": "banana", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__3.label" - }, - { - "value": "bottle", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__4.label" - }, - { - "value": "box", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__5.label" - }, - { - "value": "carrot", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__6.label" - }, - { - "value": "chat_bubble", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__7.label" - }, - { - "value": "check_mark", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__8.label" - }, - { - "value": "clipboard", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__9.label" - }, - { - "value": "dairy", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__10.label" - }, - { - "value": "dairy_free", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__11.label" - }, - { - "value": "dryer", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__12.label" - }, - { - "value": "eye", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__13.label" - }, - { - "value": "fire", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__14.label" - }, - { - "value": "gluten_free", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__15.label" - }, - { - "value": "heart", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__16.label" - }, - { - "value": "iron", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__17.label" - }, - { - "value": "leaf", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__18.label" - }, - { - "value": "leather", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__19.label" - }, - { - "value": "lightning_bolt", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__20.label" - }, - { - "value": "lipstick", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__21.label" - }, - { - "value": "lock", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__22.label" - }, - { - "value": "map_pin", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__23.label" - }, - { - "value": "nut_free", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__24.label" - }, - { - "value": "pants", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__25.label" - }, - { - "value": "paw_print", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__26.label" - }, - { - "value": "pepper", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__27.label" - }, - { - "value": "perfume", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__28.label" - }, - { - "value": "plane", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__29.label" - }, - { - "value": "plant", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__30.label" - }, - { - "value": "price_tag", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__31.label" - }, - { - "value": "question_mark", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__32.label" - }, - { - "value": "recycle", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__33.label" - }, - { - "value": "return", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__34.label" - }, - { - "value": "ruler", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__35.label" - }, - { - "value": "serving_dish", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__36.label" - }, - { - "value": "shirt", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__37.label" - }, - { - "value": "shoe", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__38.label" - }, - { - "value": "silhouette", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__39.label" - }, - { - "value": "snowflake", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__40.label" - }, - { - "value": "star", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__41.label" - }, - { - "value": "stopwatch", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__42.label" - }, - { - "value": "truck", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__43.label" - }, - { - "value": "washing", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.options__44.label" - } - ], - "default": "check_mark", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.icon.label" - }, - { - "type": "richtext", - "id": "row_content", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.row_content.label" - }, - { - "type": "page", - "id": "page", - "label": "t:sections.collapsible_content.blocks.collapsible_row.settings.page.label" - } - ] - } - ], - "presets": [ - { - "name": "t:sections.collapsible_content.presets.name", - "blocks": [ - { - "type": "collapsible_row" - }, - { - "type": "collapsible_row" - }, - { - "type": "collapsible_row" - }, - { - "type": "collapsible_row" - } - ] - } - ] -} -{% endschema %} diff --git a/sections/collapsible-tabs.liquid b/sections/collapsible-tabs.liquid new file mode 100644 index 00000000000..145c79b2d46 --- /dev/null +++ b/sections/collapsible-tabs.liquid @@ -0,0 +1,1591 @@ +{%- liquid + assign header_layout = section.settings.header_layout + assign button_style = section.settings.button_style + assign button_label = section.settings.button_label + assign button_link = section.settings.button_link + assign button_icon = section.settings.button_icon + + assign section_css_class = '' + assign col_alignment_class = '' + assign col_content_width = 100 + + assign side_button = true + + if header_layout == 'standing-column' + assign header_layout = 'vertical' + assign side_button = false + endif + + assign image_block = section.blocks | where: 'type', 'image_card' | first + if image_block + assign section_css_class = section_css_class | append: ' collapsible-tabs__has-image' + assign section_css_class = section_css_class | append: ' collapsible-tabs__image-position-' | append: image_block.settings.image_position | default: 'left' + + assign image_vertical_alignment = image_block.settings.alignment | default: 'center' + assign col_alignment_class = col_alignment_class | append: ' justify-' | append: image_vertical_alignment + + assign col_image_width = image_block.settings.image_width + assign col_content_width = col_content_width | minus: col_image_width + endif + + assign item_font_family = section.settings.item_heading_font | default: 'body' + assign item_heading_size = section.settings.item_heading_size | default: 'h6' + assign item_trigger_class = ' font-' | append: item_font_family | append: ' ' | append: item_heading_size + assign item_icon_size = section.settings.item_icon_size | default: 'extra-large' +-%} +{{ 'section-collapsible-tabs.css' | asset_url | stylesheet_tag }} + + +{% render 'divider', + show_divider: section.settings.show_section_divider, + divider_width: section.settings.divider_width +%} + +
    +
    +
    + {% render 'section-heading', + section_settings: section.settings, + header_layout: header_layout, + button_visible: true, + button_link: button_link, + button_style: button_style, + button_label: button_label, + button_icon: button_icon, + description_size: section.settings.text_size, + side_button: side_button + %} +
    +
    + {%- if image_block -%} +
    + {% render 'card-image', + color_scheme: image_block.settings.color_scheme, + link: image_block.settings.card_link, + image: image_block.settings.image, + image_mobile: image_block.settings.image_mobile, + image_ratio: image_block.settings.image_ratio, + image_overlay_opacity: image_block.settings.image_overlay_opacity, + heading: image_block.settings.heading, + highlight_style: image_block.settings.highlight_style, + highlight_font_style: image_block.settings.highlight_font_style, + highlight_style_color: image_block.settings.highlight_style_color, + highlight_text_color: image_block.settings.highlight_text_color, + heading_size: image_block.settings.heading_size, + subheading: image_block.settings.subheading, + subheading_style: image_block.settings.subheading_style, + description: image_block.settings.description, + button_label: image_block.settings.button_label, + button_style: image_block.settings.button_style, + button_icon: image_block.settings.button_icon, + rich_text_size: image_block.settings.content_gap, + content_spacing: image_block.settings.content_spacing, + content_position: image_block.settings.content_position, + content_alignment: image_block.settings.content_alignment, + section_index: section.index, + forloop_index: 1, + heading_size_custom: image_block.settings.heading_size_custom, + heading_size_mobile: image_block.settings.heading_size_mobile + %} +
    + {%- endif -%} +
    + + {%- for block in section.blocks -%} + {%- case block.type -%} + {%- when 'collapsible_item' -%} +
    +
    + +
    + {% if block.settings.icon != 'none' %} + {% render 'icons', icon: block.settings.icon, size: item_icon_size %} + {%- endif -%} +

    {{ block.settings.heading }}

    +
    + {%- render 'icon-plus-toggle' -%} +
    +
    + {{ block.settings.content }} + {{ block.settings.custom_liquid }} + {{ block.settings.page.content }} +
    +
    +
    + {%- when 'heading' -%} + {%- if block.settings.sub_heading != blank or block.settings.heading != blank -%} +
    + {%- if block.settings.sub_heading != blank -%} +
    {{ block.settings.sub_heading }}
    + {%- endif -%} + {%- if block.settings.heading != blank -%} +

    + {% render 'highlight-text', + hl_text: block.settings.heading, + hl_style: block.settings.highlight_style, + hl_font_style: block.settings.highlight_font_style, + hl_style_color: block.settings.highlight_style_color, + hl_text_color: block.settings.highlight_text_color + %} +

    + {%- endif -%} +
    + {%- endif -%} + {%- endcase -%} + {%- endfor -%} +
    +
    +
    +
    +
    +
    +
    +{% schema %} +{ + "name": "t:sections.collapsible-tabs.name", + "disabled_on": { + "groups": ["header", "footer", "custom.overlay"] + }, + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "select", + "id": "container", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "narrow", + "label": "t:general.container.options__narrow.label" + } + ], + "default": "fixed", + "label": "t:general.container.label" + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "header", + "content": "t:general.section_header.content" + }, + { + "type": "select", + "id": "header_layout", + "label": "t:general.layout.label", + "options": [ + { + "value": "vertical", + "label": "t:general.layout.options__1.label" + }, + { + "value": "standing-column", + "label": "t:general.layout.options__3.label" + } + ], + "default": "vertical" + }, + { + "id": "section_header_alignment", + "type": "select", + "label": "t:general.text_alignment.label", + "default": "left", + "options": [ + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ] + }, + { + "id": "section_header_alignment_mobile", + "type": "select", + "label": "t:general.text_alignment.mobile.label", + "default": "inherit", + "options": [ + { + "value": "inherit", + "label": "t:general.text_alignment.options__4.label" + }, + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ] + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label" + }, + { + "type": "inline_richtext", + "id": "heading", + "label": "t:general.heading.label", + "default": "Collapsible tabs", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h1", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "richtext", + "id": "description", + "label": "t:general.text.label" + }, + { + "type": "select", + "id": "text_size", + "label": "t:general.text_size.text.label", + "default": "text-base", + "options": [ + { + "value": "text-sm", + "label": "t:general.text_size.options__small.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-lg", + "label": "t:general.text_size.options__large.label" + }, + { + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label" + }, + { + "type": "url", + "id": "button_link", + "label": "t:general.button.button_link.label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--primary" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + }, + { + "type": "header", + "content": "t:sections.collapsible-tabs.settings.header__image_card.content" + }, + { + "type": "select", + "id": "column_gap", + "options": [ + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ], + "default": "large", + "label": "t:general.grid.column_gap.label" + }, + { + "type": "select", + "id": "row_gap", + "options": [ + { + "value": "inherit", + "label": "t:general.grid.gap.options__inherit.label" + }, + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ], + "default": "inherit", + "label": "t:general.grid.row_gap.label" + }, + { + "type": "header", + "content": "t:sections.collapsible-tabs.settings.header__collapsible_tab.content" + }, + { + "type": "select", + "id": "item_style", + "label": "t:sections.collapsible-tabs.settings.item_style.label", + "default": "standard", + "options": [ + { + "value": "standard", + "label": "t:sections.collapsible-tabs.settings.item_style.options__1.label" + }, + { + "value": "card", + "label": "t:sections.collapsible-tabs.settings.item_style.options__2.label" + } + ] + }, + { + "type": "color_scheme", + "id": "item_color_scheme", + "label": "t:general.colors.label", + "default": "scheme-2" + }, + { + "type": "select", + "id": "item_heading_font", + "label": "t:general.font_family.label", + "default": "heading", + "options": [ + { + "value": "body", + "label": "t:general.font_family.options__1.label" + }, + { + "value": "heading", + "label": "t:general.font_family.options__2.label" + } + ] + }, + { + "type": "select", + "id": "item_heading_size", + "label": "t:general.text_size.heading.label", + "default": "h4", + "options": [ + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + } + ] + }, + { + "type": "select", + "id": "item_icon_size", + "label": "t:general.icon_size.label", + "options": [ + { + "value": "extra-small", + "label": "t:general.icon_size.options__xs.label" + }, + { + "value": "small", + "label": "t:general.icon_size.options__sm.label" + }, + { + "value": "extra-medium", + "label": "t:general.icon_size.options__xmd.label" + }, + { + "value": "medium", + "label": "t:general.icon_size.options__md.label" + }, + { + "value": "large", + "label": "t:general.icon_size.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.icon_size.options__xl.label" + } + ], + "default": "extra-large" + }, + { + "type": "header", + "content": "t:general.padding.section_heading.content" + }, + { + "type": "range", + "id": "padding_top", + "label": "t:general.padding.top.label", + "default": 50, + "min": 0, + "max": 100, + "step": 2, + "unit": "px" + }, + { + "type": "range", + "id": "padding_bottom", + "label": "t:general.padding.bottom.label", + "default": 50, + "min": 0, + "max": 100, + "step": 2, + "unit": "px" + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "default": false, + "label": "t:general.divider.show_divider.label" + }, + { + "type": "select", + "id": "divider_width", + "label": "t:general.divider.width.label", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed" + } + ], + "blocks": [ + { + "type": "collapsible_item", + "name": "t:sections.collapsible-tabs.blocks.collapsible_item.name", + "settings": [ + { + "type": "select", + "id": "icon", + "label": "t:general.icon.label", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" + }, + { + "value": "car-simple", + "label": "t:general.icon.options__2.label" + }, + { + "value": "truck", + "label": "t:general.icon.options__3.label" + }, + { + "value": "package", + "label": "t:general.icon.options__4.label" + }, + { + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" + }, + { + "value": "gift", + "label": "t:general.icon.options__6.label" + }, + { + "value": "heart", + "label": "t:general.icon.options__7.label" + }, + { + "value": "globe", + "label": "t:general.icon.options__8.label" + }, + { + "value": "check", + "label": "t:general.icon.options__9.label" + }, + { + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" + }, + { + "value": "lightning", + "label": "t:general.icon.options__11.label" + }, + { + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" + }, + { + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" + }, + { + "value": "location", + "label": "t:general.icon.options__14.label" + }, + { + "value": "tag", + "label": "t:general.icon.options__15.label" + }, + { + "value": "map-pin", + "label": "t:general.icon.options__16.label" + }, + { + "value": "smiley", + "label": "t:general.icon.options__17.label" + }, + { + "value": "stool", + "label": "t:general.icon.options__18.label" + }, + { + "value": "clock", + "label": "t:general.icon.options__19.label" + }, + { + "value": "phone", + "label": "t:general.icon.options__20.label" + }, + { + "value": "chat", + "label": "t:general.icon.options__21.label" + }, + { + "value": "paperplane", + "label": "t:general.icon.options__22.label" + }, + { + "value": "sliders", + "label": "t:general.icon.options__23.label" + }, + { + "value": "sound", + "label": "t:general.icon.options__24.label" + }, + { + "value": "music", + "label": "t:general.icon.options__25.label" + }, + { + "value": "airplane", + "label": "t:general.icon.options__26.label" + }, + { + "value": "alarm", + "label": "t:general.icon.options__27.label" + }, + { + "value": "play-list", + "label": "t:general.icon.options__28.label" + }, + { + "value": "drop-slash", + "label": "t:general.icon.options__29.label" + }, + { + "value": "pause-circle", + "label": "t:general.icon.options__30.label" + }, + { + "value": "acorn", + "label": "t:general.icon.options__34.label" + }, + { + "value": "leaf", + "label": "t:general.icon.options__35.label" + } + ], + "default": "none" + }, + { + "type": "text", + "id": "heading", + "label": "t:general.heading.label", + "default": "Collapsible tab heading" + }, + { + "type": "richtext", + "id": "content", + "label": "t:general.tab_content.label", + "default": "

    Fill in the text content of the collapsible item here. You can provide details and explanation for the question here.

    " + }, + { + "type": "liquid", + "id": "custom_liquid", + "label": "t:general.custom_liquid.label" + }, + { + "type": "page", + "id": "page", + "label": "t:general.page.content.label" + }, + { + "type": "checkbox", + "id": "open", + "label": "t:sections.collapsible-tabs.blocks.collapsible_item.settings.open.label" + }, + { + "type": "checkbox", + "id": "use_subtext_color", + "label": "t:general.use_subtext_color.label" + } + ] + }, + { + "type": "heading", + "name": "t:sections.collapsible-tabs.blocks.heading.name", + "limit": 1, + "settings": [ + { + "type": "text", + "id": "sub_heading", + "label": "t:general.subheading.label" + }, + { + "type": "inline_richtext", + "id": "heading", + "label": "t:general.heading.label", + "default": "Collapsible tabs", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h1", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + } + ] + }, + { + "type": "image_card", + "name": "t:sections.collapsible-tabs.blocks.image_card.name", + "limit": 1, + "settings": [ + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "header", + "content": "t:general.header__block_settings.content" + }, + { + "type": "select", + "id": "desktop_image_position", + "label": "t:general.image_position.desktop.label", + "default": "left", + "options": [ + { + "value": "left", + "label": "t:general.image_position.options__left.label" + }, + { + "value": "right", + "label": "t:general.image_position.options__right.label" + } + ] + }, + { + "type": "range", + "id": "image_width", + "label": "t:general.image_width.desktop.label", + "default": 50, + "min": 30, + "max": 70, + "step": 1, + "unit": "%" + }, + { + "type": "select", + "id": "alignment", + "label": "t:general.vertical_alignment.label", + "default": "center", + "options": [ + { + "value": "start", + "label": "t:general.vertical_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.vertical_alignment.options__2.label" + }, + { + "value": "end", + "label": "t:general.vertical_alignment.options__3.label" + } + ] + }, + { + "type": "header", + "content": "t:general.header__image_settings.content" + }, + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label" + }, + { + "type": "select", + "id": "image_ratio", + "label": "t:general.image_ratio.label", + "default": "adapt", + "options": [ + { + "value": "adapt", + "label": "t:general.image_ratio.options__1.label" + }, + { + "value": "1/1", + "label": "t:general.image_ratio.options__2.label" + }, + { + "value": "3/4", + "label": "t:general.image_ratio.options__3.label" + }, + { + "value": "4/3", + "label": "t:general.image_ratio.options__4.label" + } + ] + }, + { + "type": "range", + "id": "image_overlay_opacity", + "min": 0, + "max": 100, + "step": 2, + "unit": "%", + "label": "t:general.image_overlay_opacity.label", + "default": 0 + }, + { + "type": "header", + "content": "t:general.header__content_settings.content" + }, + { + "type": "select", + "id": "content_position", + "label": "t:general.content_position.label", + "options": [ + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__top_left.label", + "value": "top-left" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__top_center.label", + "value": "top-center" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__top_right.label", + "value": "top-right" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__middle_left.label", + "value": "middle-left" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__middle_center.label", + "value": "middle-center" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__middle_right.label", + "value": "middle-right" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__bottom_left.label", + "value": "bottom-left" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__bottom_center.label", + "value": "bottom-center" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__bottom_right.label", + "value": "bottom-right" + }, + { + "group": "t:general.content_position.optgroup__split.label", + "label": "t:general.content_position.options__middle_content.label", + "value": "split-middle-content" + }, + { + "group": "t:general.content_position.optgroup__split.label", + "label": "t:general.content_position.options__bottom_button.label", + "value": "split-bottom-button" + }, + { + "group": "t:general.content_position.optgroup__split.label", + "label": "t:general.content_position.options__top_subheading.label", + "value": "split-top-subheading" + } + ], + "default": "top-center" + }, + { + "type": "select", + "id": "content_alignment", + "label": "t:general.content_alignment.label", + "default": "center", + "options": [ + { + "value": "left", + "label": "t:general.content_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.content_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.content_alignment.options__3.label" + } + ] + }, + { + "type": "select", + "id": "content_spacing", + "label": "t:general.content_spacing.label", + "default": "medium", + "options": [ + { + "value": "extra-small", + "label": "t:general.content_spacing.options__4.label" + }, + { + "value": "small", + "label": "t:general.content_spacing.options__1.label" + }, + { + "value": "medium", + "label": "t:general.content_spacing.options__2.label" + }, + { + "value": "large", + "label": "t:general.content_spacing.options__3.label" + } + ] + }, + { + "type": "select", + "id": "content_gap", + "label": "t:general.content_gap.label", + "default": "fitted", + "options": [ + { + "value": "tight", + "label": "t:general.content_gap.options__xs.label" + }, + { + "value": "fitted", + "label": "t:general.content_gap.options__sm.label" + }, + { + "value": "standard", + "label": "t:general.content_gap.options__md.label" + } + ] + }, + { + "type": "url", + "id": "card_link", + "label": "t:general.card_link.label" + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label" + }, + { + "type": "select", + "id": "subheading_style", + "label": "t:general.subheading_style.label", + "default": "", + "options": [ + { + "value": "", + "label": "t:general.subheading_style.options__1.label" + }, + { + "value": "border", + "label": "t:general.subheading_style.options__2.label" + }, + { + "value": "thick-border", + "label": "t:general.subheading_style.options__3.label" + } + ] + }, + { + "type": "inline_richtext", + "id": "heading", + "label": "t:general.heading.label", + "default": "Image card", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h1", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "select", + "id": "heading_size_mobile", + "label": "t:general.text_size.heading_mobile.label", + "options": [ + { + "value": "inherit", + "label": "t:general.text_size.options__inherit.label" + }, + { + "value": "custom", + "label": "t:general.text_size.options__custom.label" + } + ], + "default": "inherit" + }, + { + "type": "range", + "id": "heading_size_custom", + "label": "t:general.text_size.heading_size_custom.label", + "min": 12, + "max": 100, + "step": 1, + "unit": "px", + "default": 18, + "visible_if": "{{ block.settings.heading_size_mobile == 'custom' }}" + }, + { + "type": "richtext", + "id": "description", + "label": "t:general.text.label", + "default": "

    Combine images with text and a stand-out offer

    " + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label", + "default": "Button label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--primary" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + }, + { + "type": "header", + "content": "t:general.mobile.name" + }, + { + "type": "image_picker", + "id": "image_mobile", + "label": "t:general.image.label" + }, + { + "type": "checkbox", + "id": "order_first", + "label": "t:sections.collapsible-tabs.blocks.image_card.settings.order_first.label", + "default": false + } + ] + } + ], + "presets": [ + { + "name": "t:sections.collapsible-tabs.name", + "blocks": [ + { + "type": "collapsible_item" + }, + { + "type": "collapsible_item" + }, + { + "type": "collapsible_item" + } + ] + } + ] +} +{% endschema %} diff --git a/sections/collection-cards.liquid b/sections/collection-cards.liquid new file mode 100644 index 00000000000..25559828e13 --- /dev/null +++ b/sections/collection-cards.liquid @@ -0,0 +1,653 @@ +{{ 'section-collection-cards.css' | asset_url | stylesheet_tag }} + + +{% liquid + assign columns_mobile_int = section.settings.columns_mobile | plus: 0 + assign enable_swipe_mobile = false + if section.settings.swipe_on_mobile and section.blocks.size > columns_mobile_int + assign enable_swipe_mobile = true + endif + + assign columns_desktop = section.settings.columns_desktop + assign columns_latop = columns_desktop + assign columns_tablet = 2 + if columns_desktop > 3 + assign columns_latop = columns_desktop | divided_by: 2.0 | ceil + endif + + if section.blocks.size < 2 + assign columns_desktop = 1 + assign columns_latop = 1 + assign columns_tablet = 1 + endif + + assign enable_slider = section.settings.enable_slider + + if section.blocks.size <= columns_desktop + assign enable_slider = false + endif + assign has_richtext = false + if section.settings.heading != blank or section.settings.description != blank or section.settings.subheading != blank + assign has_richtext = true + endif + + assign header_empty = true + if has_richtext or enable_slider + assign header_empty = false + endif + + assign header_alignment = section.settings.section_header_alignment + assign header_alignment_mobile = section.settings.section_header_alignment_mobile + if header_alignment_mobile == 'inherit' + assign header_alignment_mobile = header_alignment + endif + + assign motion_delay = 50 + + assign is_control_on_header = true +%} + +{% style %} + .section-{{ section.id }} { + --section-padding-top: {{ section.settings.padding_top }}px; + --section-padding-bottom: {{ section.settings.padding_bottom }}px; + --f-columns-mobile: {{ columns_mobile_int }}; + --f-columns-md: {{ columns_tablet }}; + --f-columns-lg: {{ columns_latop }}; + --f-columns-xl: {{ columns_desktop }}; + } +{% endstyle %} + +{% render 'divider', + show_divider: section.settings.show_section_divider, + divider_width: section.settings.divider_width +%} + +
    +
    +
    + {%- unless header_empty -%} +
    + {% if has_richtext %} +
    + {% if section.settings.subheading != blank %} + + {{- section.settings.subheading -}} + + {%- assign motion_delay = motion_delay | plus: 50 -%} + {% endif %} + {% if section.settings.heading != blank %} +

    + + {% render 'highlight-text', + hl_text: section.settings.heading, + hl_style: section.settings.highlight_style, + hl_font_style: section.settings.highlight_font_style, + hl_style_color: section.settings.highlight_style_color, + hl_text_color: section.settings.highlight_text_color + %} + +

    + {%- assign motion_delay = motion_delay | plus: 50 -%} + {% endif %} + {% if section.settings.description != blank %} + + {{- section.settings.description -}} + + {%- assign motion_delay = motion_delay | plus: 50 -%} + {% endif %} +
    + {% endif %} + + {% if enable_slider and is_control_on_header %} + + {% endif %} +
    + {%- endunless -%} +
    + +
    + {%- for block in section.blocks -%} +
    + {% capture current %}{% cycle 1, 2, 3, 4, 5, 6 %}{% endcapture %} + {% render 'collection-cards-item', + current: current, + color_scheme: section.settings.card_color_scheme, + collection: block.settings.collection, + featured_image: block.settings.image, + title: block.settings.title, + image_ratio: section.settings.image_ratio, + show_product_count: section.settings.show_product_count + %} +
    + {%- endfor -%} +
    +
    +
    +
    +
    +
    + +{% schema %} +{ + "name": "t:sections.collection-cards.name", + "tag": "section", + "class": "section", + "disabled_on": { + "groups": ["footer", "header", "custom.overlay"] + }, + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "select", + "id": "container", + "label": "t:general.container.label", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed" + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "select", + "id": "section_header_alignment", + "label": "t:general.text_alignment.label", + "options": [ + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ], + "default": "left" + }, + { + "type": "select", + "id": "section_header_alignment_mobile", + "label": "t:general.text_alignment.mobile.label", + "options": [ + { + "value": "inherit", + "label": "t:general.text_alignment.options__4.label" + }, + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ], + "default": "inherit" + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label" + }, + { + "type": "inline_richtext", + "id": "heading", + "label": "t:general.heading.label", + "default": "Shop By Campaign", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ], + "default": "h2" + }, + { + "type": "richtext", + "id": "description", + "label": "t:general.text.label" + }, + { + "type": "select", + "id": "text_size", + "label": "t:general.text_size.description.label", + "options": [ + { + "value": "text-sm", + "label": "t:general.text_size.options__small.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-lg", + "label": "t:general.text_size.options__large.label" + }, + { + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] + }, + { + "type": "range", + "id": "columns_desktop", + "label": "t:general.grid.columns_desktop.label", + "min": 2, + "max": 6, + "step": 1, + "default": 4 + }, + { + "type": "select", + "id": "column_gap", + "label": "t:general.grid.column_gap.label", + "options": [ + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ], + "default": "medium" + }, + { + "type": "select", + "id": "row_gap", + "label": "t:general.grid.row_gap.label", + "options": [ + { + "value": "inherit", + "label": "t:general.grid.gap.options__inherit.label" + }, + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ], + "default": "inherit" + }, + { + "type": "header", + "content": "t:general.carousel.name" + }, + { + "type": "checkbox", + "id": "enable_slider", + "label": "t:general.carousel.enable_carousel.label", + "default": true + }, + { + "type": "header", + "content": "t:general.mobile.name" + }, + { + "type": "select", + "id": "columns_mobile", + "options": [ + { + "value": "1", + "label": "t:general.mobile.columns_mobile.options__1.label" + }, + { + "value": "2", + "label": "t:general.mobile.columns_mobile.options__2.label" + } + ], + "default": "1", + "label": "t:general.mobile.columns_mobile.label" + }, + { + "type": "checkbox", + "id": "swipe_on_mobile", + "default": true, + "label": "t:general.mobile.swipe_on_mobile.label" + }, + { + "type": "header", + "content": "t:general.header__card_settings.content" + }, + { + "type": "color_scheme", + "id": "card_color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "select", + "id": "image_ratio", + "label": "t:general.image_ratio.label", + "default": "3/4", + "options": [ + { + "value": "adapt", + "label": "t:general.image_ratio.options__1.label" + }, + { + "value": "1/1", + "label": "t:general.image_ratio.options__2.label" + }, + { + "value": "3/4", + "label": "t:general.image_ratio.options__3.label" + }, + { + "value": "4/3", + "label": "t:general.image_ratio.options__4.label" + } + ] + }, + { + "type": "checkbox", + "id": "show_product_count", + "label": "t:sections.collection-cards.settings.show_product_count.label", + "default": true + }, + { + "type": "header", + "content": "t:general.padding.section_heading.content" + }, + { + "type": "range", + "id": "padding_top", + "label": "t:general.padding.top.label", + "min": 0, + "max": 100, + "step": 2, + "unit": "px", + "default": 50 + }, + { + "type": "range", + "id": "padding_bottom", + "label": "t:general.padding.bottom.label", + "min": 0, + "max": 100, + "step": 2, + "unit": "px", + "default": 50 + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "label": "t:general.divider.show_divider.label", + "default": false + }, + { + "type": "select", + "id": "divider_width", + "label": "t:general.divider.width.label", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed" + } + ], + "blocks": [ + { + "type": "collection", + "name": "t:general.collection.label", + "settings": [ + { + "type": "collection", + "id": "collection", + "label": "t:general.collection.label" + }, + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label" + }, + { + "type": "text", + "id": "title", + "label": "t:general.collection.title.label", + "info": "t:general.collection.title.info" + }, + { + "type": "header", + "content": "t:sections.collection-cards.blocks.settings.image.custom.content", + "info": "t:sections.collection-cards.blocks.settings.image.custom.info" + }, + { + "type": "paragraph", + "content": "t:sections.collection-cards.blocks.settings.image.paragraph.content" + } + ] + } + ], + "presets": [ + { + "name": "t:sections.collection-cards.presets", + "blocks": [ + { + "type": "collection" + }, + { + "type": "collection" + }, + { + "type": "collection" + }, + { + "type": "collection" + }, + { + "type": "collection" + }, + { + "type": "collection" + } + ] + } + ] +} +{% endschema %} diff --git a/sections/collection-list-slider.liquid b/sections/collection-list-slider.liquid new file mode 100644 index 00000000000..e57cae3017b --- /dev/null +++ b/sections/collection-list-slider.liquid @@ -0,0 +1,736 @@ + +{%- liquid + assign button_style = section.settings.button_style + assign button_label = section.settings.button_label + assign button_link = section.settings.button_link + assign button_icon = section.settings.button_icon + + assign card_has_bg = false + if section.settings.color_scheme != section.settings.card_color_scheme + assign card_has_bg = true + endif +-%} + +{%- style -%} + .section-{{ section.id }} { + --swiper-navigation-size: 3.8rem; + } + .section-{{ section.id }} .swiper-slide { + width: var(--slide-width, 12rem); + } + @media (max-width: 767px) { + .section-{{ section.id }} .swiper-slide { + --slide-width: 9rem; + } + .section-{{ section.id }} [data-mobile-layout="horizontal"] .swiper-slide { + --slide-width: 16rem; + } + .section-{{ section.id }} .swipe-mobile__inner { + --f-column-gap: .8rem; + } + } + @media (min-width: 1280px) { + .section-{{ section.id }} .swiper-slide { + width: var(--slide-width, 13rem); + } + } +{%- endstyle -%} + +{% render 'divider', + show_divider: section.settings.show_section_divider, + divider_width: section.settings.divider_width +%} +
    +
    +
    + {% render 'section-heading', + section_settings: section.settings, + description_size: section.settings.text_size, + button_visible: true, + button_link: button_link, + button_style: button_style, + button_label: button_label, + button_icon: button_icon + %} +
    + +
    + {%- for block in section.blocks -%} + {%- liquid + assign collection = collections[block.settings.collection] + assign title = block.settings.title + -%} +
    + {% render 'card-collection', + collection: collection, + featured_image: block.settings.image, + title: title, + image_ratio: section.settings.card_image_ratio, + has_bg: card_has_bg, + rounded_image: section.settings.rounded_card_image, + card_style: section.settings.card_style, + color_scheme: section.settings.card_color_scheme, + image_width: section.settings.card_image_width, + image_padding: section.settings.card_image_padding, + mobile_layout: section.settings.mobile_layout, + heading_size: section.settings.card_heading_size + %} +
    + {%- endfor -%} +
    +
    + +
    +
    +
    +
    +{% schema %} +{ + "name": "t:sections.collection-list-slider.name", + "tag": "section", + "class": "section-collection-list-slider", + "max_blocks": 18, + "disabled_on": { + "groups": ["footer", "header", "custom.overlay"] + }, + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "select", + "id": "container", + "options": [ + { + "value": "full", + "label": "t:general.container.options__full.label" + }, + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + } + ], + "default": "fixed", + "label": "t:general.container.label" + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "header", + "content": "t:general.section_header.content" + }, + { + "id": "section_header_alignment", + "type": "select", + "label": "t:general.text_alignment.label", + "default": "center", + "options": [ + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ] + }, + { + "id": "section_header_alignment_mobile", + "type": "select", + "label": "t:general.text_alignment.mobile.label", + "default": "inherit", + "options": [ + { + "value": "inherit", + "label": "t:general.text_alignment.options__4.label" + }, + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ] + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label" + }, + { + "type": "inline_richtext", + "id": "heading", + "default": "Collections", + "label": "t:general.heading.label", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h1", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "richtext", + "id": "description", + "label": "t:general.text.label" + }, + { + "type": "select", + "id": "text_size", + "label": "t:general.text_size.text.label", + "default": "text-base", + "options": [ + { + "value": "text-sm", + "label": "t:general.text_size.options__small.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-lg", + "label": "t:general.text_size.options__large.label" + }, + { + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label" + }, + { + "type": "url", + "id": "button_link", + "label": "t:general.button.button_link.label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--underline" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + }, + { + "type": "header", + "content": "t:general.header__card_settings.content" + }, + { + "type": "color_scheme", + "id": "card_color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "select", + "id": "card_style", + "label": "t:sections.collection-list.settings.card_style.label", + "options": [ + { + "value": "standard", + "label": "t:sections.collection-list.settings.card_style.options__1.label" + }, + { + "value": "card", + "label": "t:sections.collection-list.settings.card_style.options__2.label" + } + ], + "default": "standard" + }, + { + "type": "select", + "id": "card_heading_size", + "label": "t:general.text_size.heading.label", + "default": "text-base", + "options": [ + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "h6", + "label": "t:general.text_size.options__h6.label" + }, + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + } + ] + }, + { + "type": "select", + "id": "card_image_ratio", + "label": "t:general.image_ratio.label", + "default": "1/1", + "options": [ + { + "value": "adapt", + "label": "t:general.image_ratio.options__1.label" + }, + { + "value": "1/1", + "label": "t:general.image_ratio.options__2.label" + }, + { + "value": "3/4", + "label": "t:general.image_ratio.options__3.label" + }, + { + "value": "4/3", + "label": "t:general.image_ratio.options__4.label" + } + ] + }, + { + "type": "select", + "id": "card_image_width", + "label": "t:general.image_width.label", + "options": [ + { + "value": "medium", + "label": "t:general.image_width.options__md.label" + }, + { + "value": "large", + "label": "t:general.image_width.options__lg.label" + }, + { + "value": "full", + "label": "t:general.image_width.options__full.label" + } + ], + "default": "medium" + }, + { + "type": "select", + "id": "card_image_padding", + "label": "t:general.image_padding.label", + "options": [ + { + "value": "none", + "label": "t:general.image_padding.options__none.label" + }, + { + "value": "small", + "label": "t:general.image_padding.options__small.label" + }, + { + "value": "medium", + "label": "t:general.image_padding.options__medium.label" + } + ], + "default": "none", + "visible_if": "{{ section.settings.card_style == 'card' }}" + }, + { + "type": "checkbox", + "id": "rounded_card_image", + "label": "t:sections.collection-list.settings.rounded_card_image.label", + "default": true + }, + { + "type": "select", + "id": "mobile_layout", + "label": "t:sections.collection-list.settings.mobile_layout.label", + "options": [ + { + "value": "horizontal", + "label": "t:sections.collection-list.settings.mobile_layout.options__1.label" + }, + { + "value": "vertical", + "label": "t:sections.collection-list.settings.mobile_layout.options__2.label" + } + ], + "default": "vertical", + "visible_if": "{{ section.settings.card_style == 'card' }}" + }, + { + "type": "header", + "content": "t:general.carousel.name" + }, + { + "type": "select", + "id": "carousel_item_size", + "label": "t:general.carousel.item_size.label", + "options": [ + { + "value": "auto", + "label": "t:general.carousel.item_size.options__auto.label" + }, + { + "value": "fixed", + "label": "t:general.carousel.item_size.options__fixed.label" + } + ], + "default": "auto" + }, + { + "type": "range", + "id": "columns_desktop", + "min": 2, + "max": 10, + "step": 1, + "default": 6, + "label": "t:general.grid.columns_desktop.label", + "visible_if": "{{ section.settings.carousel_item_size == 'fixed' }}" + }, + { + "type": "color_scheme", + "id": "carousel_control_color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "header", + "content": "t:general.padding.section_heading.content" + }, + { + "type": "range", + "id": "padding_top", + "min": 0, + "max": 100, + "step": 2, + "unit": "px", + "label": "t:general.padding.top.label", + "default": 50 + }, + { + "type": "range", + "id": "padding_bottom", + "min": 0, + "max": 100, + "step": 2, + "unit": "px", + "label": "t:general.padding.bottom.label", + "default": 50 + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "default": false, + "label": "t:general.divider.show_divider.label" + }, + { + "type": "select", + "id": "divider_width", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed", + "label": "t:general.divider.width.label" + } + ], + "blocks": [ + { + "type": "featured_collection", + "name": "t:general.collection.label", + "settings": [ + { + "type": "collection", + "id": "collection", + "label": "t:general.collection.label" + }, + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label" + }, + { + "type": "text", + "id": "title", + "label": "t:general.collection.title.label", + "info": "t:general.collection.title.info" + } + ] + } + ], + "presets": [ + { + "name": "t:sections.collection-list-slider.name", + "blocks": [ + { + "type": "featured_collection" + }, + { + "type": "featured_collection" + }, + { + "type": "featured_collection" + }, + { + "type": "featured_collection" + }, + { + "type": "featured_collection" + }, + { + "type": "featured_collection" + }, + { + "type": "featured_collection" + }, + { + "type": "featured_collection" + } + ] + } + ] +} +{% endschema %} diff --git a/sections/collection-list-with-banner.liquid b/sections/collection-list-with-banner.liquid new file mode 100644 index 00000000000..c74fb6882a3 --- /dev/null +++ b/sections/collection-list-with-banner.liquid @@ -0,0 +1,1386 @@ +{{ 'section-collection-list-with-banner.css' | asset_url | stylesheet_tag }} +{%- liquid + assign banner_block = section.blocks | find: 'type', 'image_card' + assign collection_block = section.blocks | where: 'type', 'featured_collection' + assign columns_mobile_int = section.settings.columns_mobile | plus: 0 + assign enable_swipe_mobile = false + if section.settings.swipe_on_mobile and collection_block.size > columns_mobile_int + assign enable_swipe_mobile = true + endif + + assign image = banner_block.settings.image + assign image_mobile = banner_block.settings.image_mobile + assign image_ratio = image.aspect_ratio | default: '2.333' + assign image_mobile_ratio = image_mobile.aspect_ratio | default: '1' + assign columns_desktop = section.settings.columns_desktop + assign tablet_items = columns_desktop | at_most: 2 + assign laptop_items = columns_desktop | at_most: 5 + + assign button_style = section.settings.button_style + assign button_label = section.settings.button_label + assign button_link = section.settings.button_link + assign button_icon = section.settings.button_icon +-%} + +{% style %} + .section-{{ section.id }} { + --section-padding-top: {{ section.settings.padding_top }}px; + --section-padding-bottom: {{ section.settings.padding_bottom }}px; + --f-columns-mobile: {{ columns_mobile_int }}; + --f-columns-md: {{ tablet_items }}; + --f-columns-lg: {{ laptop_items }}; + --f-columns-xl: {{ columns_desktop }}; + } +{% endstyle %} + +{% render 'divider', + show_divider: section.settings.show_section_divider, + divider_width: section.settings.divider_width +%} +
    +
    +
    + {% render 'section-heading', + section_settings: section.settings, + description_size: section.settings.text_size, + button_visible: true, + button_link: button_link, + button_style: button_style, + button_icon: button_icon, + button_label: button_label + %} + +
    +
    +
    + +{% schema %} +{ + "name": "t:sections.collection-list-banner.name", + "tag": "section", + "class": "section-collection-list-banner", + "disabled_on": { + "groups": ["footer", "header", "custom.overlay"] + }, + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "select", + "id": "container", + "options": [ + { + "value": "full", + "label": "t:general.container.options__full.label" + }, + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + } + ], + "default": "fixed", + "label": "t:general.container.label" + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "header", + "content": "t:general.section_header.content" + }, + { + "id": "section_header_alignment", + "type": "select", + "label": "t:general.text_alignment.label", + "default": "center", + "options": [ + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ] + }, + { + "id": "section_header_alignment_mobile", + "type": "select", + "label": "t:general.text_alignment.mobile.label", + "default": "inherit", + "options": [ + { + "value": "inherit", + "label": "t:general.text_alignment.options__4.label" + }, + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ] + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label" + }, + { + "type": "inline_richtext", + "id": "heading", + "default": "Collections", + "label": "t:general.heading.label", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h1", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "richtext", + "id": "description", + "label": "t:general.text.label" + }, + { + "type": "select", + "id": "text_size", + "label": "t:general.text_size.text.label", + "default": "text-base", + "options": [ + { + "value": "text-sm", + "label": "t:general.text_size.options__small.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-lg", + "label": "t:general.text_size.options__large.label" + }, + { + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label" + }, + { + "type": "url", + "id": "button_link", + "label": "t:general.button.button_link.label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--underline" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + }, + { + "type": "header", + "content": "t:general.header__card_settings.content" + }, + { + "type": "color_scheme", + "id": "card_color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "select", + "id": "card_image_ratio", + "label": "t:general.image_ratio.label", + "default": "1/1", + "options": [ + { + "value": "adapt", + "label": "t:general.image_ratio.options__1.label" + }, + { + "value": "1/1", + "label": "t:general.image_ratio.options__2.label" + }, + { + "value": "3/4", + "label": "t:general.image_ratio.options__3.label" + }, + { + "value": "4/3", + "label": "t:general.image_ratio.options__4.label" + } + ] + }, + { + "type": "checkbox", + "id": "rounded_card_image", + "label": "t:sections.collection-list.settings.rounded_card_image.label", + "default": true + }, + { + "type": "header", + "content": "t:general.grid.name" + }, + { + "type": "range", + "id": "columns_desktop", + "min": 2, + "max": 6, + "step": 1, + "default": 3, + "label": "t:general.grid.columns_desktop.label" + }, + { + "type": "checkbox", + "id": "grid_bordered", + "label": "t:sections.collection-list.settings.show_grid_border.label", + "default": true + }, + { + "type": "select", + "id": "column_gap", + "visible_if": "{{ section.settings.grid_bordered == false }}", + "options": [ + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ], + "default": "medium", + "label": "t:general.grid.column_gap.label" + }, + { + "type": "select", + "id": "row_gap", + "visible_if": "{{ section.settings.grid_bordered == false }}", + "options": [ + { + "value": "inherit", + "label": "t:general.grid.gap.options__inherit.label" + }, + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ], + "default": "inherit", + "label": "t:general.grid.row_gap.label" + }, + { + "type": "header", + "content": "t:general.mobile.name" + }, + { + "type": "select", + "id": "columns_mobile", + "options": [ + { + "value": "1", + "label": "t:general.mobile.columns_mobile.options__1.label" + }, + { + "value": "2", + "label": "t:general.mobile.columns_mobile.options__2.label" + } + ], + "default": "2", + "label": "t:general.mobile.columns_mobile.label" + }, + { + "type": "checkbox", + "id": "swipe_on_mobile", + "default": true, + "label": "t:general.mobile.swipe_on_mobile.label" + }, + { + "type": "header", + "content": "t:general.padding.section_heading.content" + }, + { + "type": "range", + "id": "padding_top", + "min": 0, + "max": 100, + "step": 2, + "unit": "px", + "label": "t:general.padding.top.label", + "default": 50 + }, + { + "type": "range", + "id": "padding_bottom", + "min": 0, + "max": 100, + "step": 2, + "unit": "px", + "label": "t:general.padding.bottom.label", + "default": 50 + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "default": false, + "label": "t:general.divider.show_divider.label" + }, + { + "type": "select", + "id": "divider_width", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed", + "label": "t:general.divider.width.label" + } + ], + "blocks": [ + { + "type": "image_card", + "name": "t:sections.custom-content.blocks.image_card.name", + "limit": 1, + "settings": [ + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "header", + "content": "t:general.image.content" + }, + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label" + }, + { + "type": "range", + "id": "image_overlay_opacity", + "min": 0, + "max": 100, + "step": 2, + "unit": "%", + "label": "t:general.image_overlay_opacity.label", + "default": 0 + }, + { + "type": "header", + "content": "t:general.header__content_settings.content" + }, + { + "type": "select", + "id": "content_position", + "label": "t:general.content_position.label", + "options": [ + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__top_left.label", + "value": "top-left" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__top_center.label", + "value": "top-center" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__top_right.label", + "value": "top-right" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__middle_left.label", + "value": "middle-left" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__middle_center.label", + "value": "middle-center" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__middle_right.label", + "value": "middle-right" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__bottom_left.label", + "value": "bottom-left" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__bottom_center.label", + "value": "bottom-center" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__bottom_right.label", + "value": "bottom-right" + }, + { + "group": "t:general.content_position.optgroup__split.label", + "label": "t:general.content_position.options__middle_content.label", + "value": "split-middle-content" + }, + { + "group": "t:general.content_position.optgroup__split.label", + "label": "t:general.content_position.options__bottom_button.label", + "value": "split-bottom-button" + }, + { + "group": "t:general.content_position.optgroup__split.label", + "label": "t:general.content_position.options__top_subheading.label", + "value": "split-top-subheading" + }, + { + "group": "t:general.content_position.optgroup__below_image.label", + "label": "t:general.content_position.options__below_image.label", + "value": "below" + } + ], + "default": "bottom-center" + }, + { + "type": "select", + "id": "content_alignment", + "label": "t:general.content_alignment.label", + "default": "center", + "options": [ + { + "value": "left", + "label": "t:general.content_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.content_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.content_alignment.options__3.label" + } + ] + }, + { + "type": "select", + "id": "content_spacing", + "label": "t:general.content_spacing.label", + "default": "medium", + "options": [ + { + "value": "extra-small", + "label": "t:general.content_spacing.options__4.label" + }, + { + "value": "small", + "label": "t:general.content_spacing.options__1.label" + }, + { + "value": "medium", + "label": "t:general.content_spacing.options__2.label" + }, + { + "value": "large", + "label": "t:general.content_spacing.options__3.label" + } + ] + }, + { + "type": "select", + "id": "content_gap", + "label": "t:general.content_gap.label", + "default": "fitted", + "options": [ + { + "value": "tight", + "label": "t:general.content_gap.options__xs.label" + }, + { + "value": "fitted", + "label": "t:general.content_gap.options__sm.label" + }, + { + "value": "standard", + "label": "t:general.content_gap.options__md.label" + } + ] + }, + { + "type": "url", + "id": "card_link", + "label": "t:general.card_link.label" + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label" + }, + { + "type": "select", + "id": "subheading_style", + "label": "t:general.subheading_style.label", + "default": "", + "options": [ + { + "value": "", + "label": "t:general.subheading_style.options__1.label" + }, + { + "value": "border", + "label": "t:general.subheading_style.options__2.label" + }, + { + "value": "thick-border", + "label": "t:general.subheading_style.options__3.label" + } + ] + }, + { + "type": "inline_richtext", + "id": "heading", + "label": "t:general.heading.label", + "default": "Image card", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h1", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "select", + "id": "heading_size_mobile", + "label": "t:general.text_size.heading_mobile.label", + "options": [ + { + "value": "inherit", + "label": "t:general.text_size.options__inherit.label" + }, + { + "value": "custom", + "label": "t:general.text_size.options__custom.label" + } + ], + "default": "inherit" + }, + { + "type": "range", + "id": "heading_size_custom", + "label": "t:general.text_size.heading_size_custom.label", + "min": 12, + "max": 100, + "step": 1, + "unit": "px", + "default": 18, + "visible_if": "{{ block.settings.heading_size_mobile == 'custom' }}" + }, + { + "type": "richtext", + "id": "description", + "label": "t:general.text.label" + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label", + "default": "Button label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--primary" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + }, + { + "type": "header", + "content": "t:sections.custom-content.blocks.image_card.settings.header__badge_settings.content" + }, + { + "type": "checkbox", + "id": "show_badge", + "label": "t:sections.custom-content.blocks.image_card.settings.show_badge.label", + "default": false + }, + { + "type": "color_scheme", + "id": "badge_color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "select", + "id": "badge_shape", + "label": "t:sections.custom-content.blocks.image_card.settings.badge_shape.label", + "default": "circle", + "options": [ + { + "value": "circle", + "label": "t:sections.custom-content.blocks.image_card.settings.badge_shape.options__1.label" + }, + { + "value": "square", + "label": "t:sections.custom-content.blocks.image_card.settings.badge_shape.options__2.label" + } + ] + }, + { + "type": "select", + "id": "badge_position", + "label": "t:sections.custom-content.blocks.image_card.settings.badge_position.label", + "default": "top-right", + "options": [ + { + "value": "top-right", + "label": "t:general.content_position.options__top_right.label" + }, + { + "value": "top-left", + "label": "t:general.content_position.options__top_left.label" + }, + { + "value": "bottom-right", + "label": "t:general.content_position.options__bottom_right.label" + }, + { + "value": "bottom-left", + "label": "t:general.content_position.options__bottom_left.label" + } + ] + }, + { + "type": "inline_richtext", + "id": "badge_subtext", + "label": "t:general.subtext.label", + "default": "Save" + }, + { + "type": "inline_richtext", + "id": "badge_text", + "label": "t:general.text.label", + "default": "99$" + }, + { + "type": "header", + "content": "t:general.header__mobile_settings.content" + }, + { + "type": "color_scheme", + "id": "color_scheme_mobile", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "image_picker", + "id": "image_mobile", + "label": "t:general.image.label" + }, + { + "type": "select", + "id": "content_alignment_mobile", + "label": "t:general.content_alignment.label", + "default": "center", + "options": [ + { + "value": "left", + "label": "t:general.content_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.content_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.content_alignment.options__3.label" + } + ] + }, + { + "type": "header", + "content": "t:general.header__advanced.content" + }, + { + "type": "checkbox", + "id": "enable_preload_image", + "label": "t:general.enable_preload_image.label", + "info": "t:general.enable_preload_image.info" + } + ] + }, + { + "type": "featured_collection", + "name": "t:general.collection.label", + "settings": [ + { + "type": "collection", + "id": "collection", + "label": "t:general.collection.label" + }, + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label" + }, + { + "type": "text", + "id": "title", + "label": "t:general.collection.title.label", + "info": "t:general.collection.title.info" + } + ] + } + ], + "presets": [ + { + "name": "t:sections.collection-list-banner.name", + "blocks": [ + { + "type": "image_card" + }, + { + "type": "featured_collection" + }, + { + "type": "featured_collection" + }, + { + "type": "featured_collection" + }, + { + "type": "featured_collection" + }, + { + "type": "featured_collection" + }, + { + "type": "featured_collection" + } + ] + } + ] +} +{% endschema %} \ No newline at end of file diff --git a/sections/collection-list.liquid b/sections/collection-list.liquid index 4c159d0387e..a0de8303bd7 100644 --- a/sections/collection-list.liquid +++ b/sections/collection-list.liquid @@ -1,232 +1,723 @@ {{ 'section-collection-list.css' | asset_url | stylesheet_tag }} -{{ 'component-card.css' | asset_url | stylesheet_tag }} -{{ 'component-slider.css' | asset_url | stylesheet_tag }} - -{%- style -%} - .section-{{ section.id }}-padding { - padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px; - padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px; - } - - @media screen and (min-width: 750px) { - .section-{{ section.id }}-padding { - padding-top: {{ section.settings.padding_top }}px; - padding-bottom: {{ section.settings.padding_bottom }}px; - } - } -{%- endstyle -%} - {%- liquid assign columns_mobile_int = section.settings.columns_mobile | plus: 0 - assign show_mobile_slider = false + assign enable_swipe_mobile = false if section.settings.swipe_on_mobile and section.blocks.size > columns_mobile_int - assign show_mobile_slider = true + assign enable_swipe_mobile = true endif --%} -
    -
    - {%- unless section.settings.title == blank -%} -
    -

    - {{ section.settings.title }} -

    + assign columns_desktop = section.settings.columns_desktop + assign tablet_items = columns_desktop | at_most: 3 + assign laptop_items = columns_desktop | at_most: 7 - {%- if section.settings.show_view_all and show_mobile_slider -%} - - {{- 'sections.collection_list.view_all' | t -}} - - {%- endif -%} -
    - {%- endunless -%} + assign button_style = section.settings.button_style + assign button_label = section.settings.button_label + assign button_link = section.settings.button_link + assign button_icon = section.settings.button_icon - -
      - {%- liquid - assign columns = section.blocks.size - if columns > 3 - assign columns = 3 - endif - -%} - {%- for block in section.blocks -%} -
    • - {%- assign placeholder_image_index = forloop.index0 | modulo: 4 | plus: 1 -%} - {%- assign placeholder_image = 'collection-apparel-' | append: placeholder_image_index -%} - {% render 'card-collection', - card_collection: block.settings.collection, - media_aspect_ratio: section.settings.image_ratio, - columns: columns, - placeholder_image: placeholder_image - %} -
    • - {%- endfor -%} -
    - {%- if show_mobile_slider -%} -
    - -
    - 1 - - {{ 'general.slider.of' | t }} - {{ section.blocks.size }} +
    + {%- for block in section.blocks -%} + {%- liquid + assign collection = collections[block.settings.collection] + assign title = block.settings.title + assign mod_desktop = forloop.index | modulo: columns_desktop + assign mod_laptop = forloop.index | modulo: laptop_items + assign mod_tablet = forloop.index | modulo: tablet_items + assign mod_mobile = forloop.index | modulo: columns_mobile_int + assign classes = '' + if mod_desktop == 0 and section.settings.grid_bordered + assign classes = classes | append: ' desktop-hide-border' + endif + if mod_laptop == 0 and section.settings.grid_bordered + assign classes = classes | append: ' laptop-hide-border' + endif + if mod_tablet == 0 and section.settings.grid_bordered + assign classes = classes | append: ' tablet-hide-border' + endif + if mod_mobile == 0 and section.settings.grid_bordered and enable_swipe_mobile == false + assign classes = classes | append: ' mobile-hide-border' + endif + -%} +
    + {% render 'card-collection', + collection: collection, + featured_image: block.settings.image, + title: title, + has_bg: card_has_bg, + card_text_line_limit: section.settings.card_text_line_limit, + card_style: section.settings.card_style, + color_scheme: section.settings.card_color_scheme, + image_ratio: section.settings.card_image_ratio, + image_width: section.settings.card_image_width, + image_padding: section.settings.card_image_padding, + mobile_layout: section.settings.mobile_layout, + rounded_image: section.settings.rounded_card_image, + show_border: card_show_border, + heading_size: section.settings.card_heading_size, + classes: classes + %} +
    + {%- endfor -%} +
    -
    - {%- endif -%} -
    - - {%- if section.settings.show_view_all and section.blocks.size < collections.size -%} - - {%- endif -%} +
    - {% schema %} { "name": "t:sections.collection-list.name", "tag": "section", - "class": "section section-collection-list", - "max_blocks": 15, + "class": "section-collection-list", + "max_blocks": 18, "disabled_on": { - "groups": ["header", "footer"] + "groups": ["footer", "header", "custom.overlay"] }, "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "select", + "id": "container", + "options": [ + { + "value": "full", + "label": "t:general.container.options__full.label" + }, + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + } + ], + "default": "fixed", + "label": "t:general.container.label" + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "header", + "content": "t:general.section_header.content" + }, + { + "id": "section_header_alignment", + "type": "select", + "label": "t:general.text_alignment.label", + "default": "center", + "options": [ + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ] + }, + { + "id": "section_header_alignment_mobile", + "type": "select", + "label": "t:general.text_alignment.mobile.label", + "default": "inherit", + "options": [ + { + "value": "inherit", + "label": "t:general.text_alignment.options__4.label" + }, + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ] + }, { "type": "inline_richtext", - "id": "title", - "default": "t:sections.collection-list.settings.title.default", - "label": "t:sections.collection-list.settings.title.label" + "id": "subheading", + "label": "t:general.subheading.label" + }, + { + "type": "inline_richtext", + "id": "heading", + "default": "Collections", + "label": "t:general.heading.label", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" }, { "type": "select", "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h1", "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, { "value": "h2", - "label": "t:sections.all.heading_size.options__1.label" + "label": "t:general.text_size.options__h2.label" }, { "value": "h1", - "label": "t:sections.all.heading_size.options__2.label" + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "richtext", + "id": "description", + "label": "t:general.text.label" + }, + { + "type": "select", + "id": "text_size", + "label": "t:general.text_size.text.label", + "default": "text-base", + "options": [ + { + "value": "text-sm", + "label": "t:general.text_size.options__small.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-lg", + "label": "t:general.text_size.options__large.label" + }, + { + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label" + }, + { + "type": "url", + "id": "button_link", + "label": "t:general.button.button_link.label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" }, { - "value": "h0", - "label": "t:sections.all.heading_size.options__3.label" + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" }, { - "value": "hxl", - "label": "t:sections.all.heading_size.options__4.label" + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" }, { - "value": "hxxl", - "label": "t:sections.all.heading_size.options__5.label" + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" } ], - "default": "h1", - "label": "t:sections.all.heading_size.label" + "default": "btn--underline" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" }, { "type": "header", - "content": "t:sections.collection-list.settings.header_layout.content" - }, + "content": "t:general.header__card_settings.content" + }, + { + "type": "color_scheme", + "id": "card_color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "select", + "id": "card_style", + "label": "t:sections.collection-list.settings.card_style.label", + "options": [ + { + "value": "standard", + "label": "t:sections.collection-list.settings.card_style.options__1.label" + }, + { + "value": "card", + "label": "t:sections.collection-list.settings.card_style.options__2.label" + } + ], + "default": "standard" + }, + { + "type": "select", + "id": "card_heading_size", + "label": "t:general.text_size.heading.label", + "default": "text-base", + "options": [ + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "h6", + "label": "t:general.text_size.options__h6.label" + }, + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + } + ] + }, + { + "type": "select", + "id": "card_text_line_limit", + "label": "t:general.text_line_limit.label", + "options": [ + { + "value": "none", + "label": "t:general.text_line_limit.options__none.label" + }, + { + "value": "1", + "label": "t:general.text_line_limit.options__1.label" + }, + { + "value": "2", + "label": "t:general.text_line_limit.options__2.label" + }, + { + "value": "3", + "label": "t:general.text_line_limit.options__3.label" + } + ], + "default": "none" + }, { "type": "select", - "id": "image_ratio", + "id": "card_image_ratio", + "label": "t:general.image_ratio.label", + "default": "1/1", "options": [ { "value": "adapt", - "label": "t:sections.collection-list.settings.image_ratio.options__1.label" + "label": "t:general.image_ratio.options__1.label" + }, + { + "value": "1/1", + "label": "t:general.image_ratio.options__2.label" + }, + { + "value": "3/4", + "label": "t:general.image_ratio.options__3.label" + }, + { + "value": "4/3", + "label": "t:general.image_ratio.options__4.label" + } + ] + }, + { + "type": "select", + "id": "card_image_width", + "label": "t:general.image_width.label", + "options": [ + { + "value": "medium", + "label": "t:general.image_width.options__md.label" + }, + { + "value": "large", + "label": "t:general.image_width.options__lg.label" }, { - "value": "portrait", - "label": "t:sections.collection-list.settings.image_ratio.options__2.label" + "value": "full", + "label": "t:general.image_width.options__full.label" + } + ], + "default": "large" + }, + { + "type": "select", + "id": "card_image_padding", + "label": "t:general.image_padding.label", + "options": [ + { + "value": "none", + "label": "t:general.image_padding.options__none.label" + }, + { + "value": "small", + "label": "t:general.image_padding.options__small.label" + }, + { + "value": "medium", + "label": "t:general.image_padding.options__medium.label" + } + ], + "default": "none", + "visible_if": "{{ section.settings.card_style == 'card' }}" + }, + { + "type": "checkbox", + "id": "rounded_card_image", + "label": "t:sections.collection-list.settings.rounded_card_image.label", + "default": true + }, + { + "type": "checkbox", + "id": "card_show_border", + "label": "t:sections.collection-list.settings.show_border.label", + "default": false + }, + { + "type": "select", + "id": "mobile_layout", + "label": "t:sections.collection-list.settings.mobile_layout.label", + "options": [ + { + "value": "horizontal", + "label": "t:sections.collection-list.settings.mobile_layout.options__1.label" }, { - "value": "square", - "label": "t:sections.collection-list.settings.image_ratio.options__3.label" + "value": "vertical", + "label": "t:sections.collection-list.settings.mobile_layout.options__2.label" } ], - "default": "square", - "label": "t:sections.collection-list.settings.image_ratio.label" + "default": "vertical", + "visible_if": "{{ section.settings.card_style == 'card' }}" + }, + { + "type": "header", + "content": "t:general.grid.name" }, { "type": "range", "id": "columns_desktop", - "min": 1, - "max": 6, + "min": 2, + "max": 10, "step": 1, - "default": 3, - "label": "t:sections.collection-list.settings.columns_desktop.label" + "default": 6, + "label": "t:general.grid.columns_desktop.label" }, { - "type": "color_scheme", - "id": "color_scheme", - "label": "t:sections.all.colors.label", - "info": "t:sections.all.colors.has_cards_info", - "default": "scheme-1" + "type": "select", + "id": "column_gap", + "options": [ + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ], + "default": "medium", + "label": "t:general.grid.column_gap.label" + }, + { + "type": "select", + "id": "row_gap", + "options": [ + { + "value": "inherit", + "label": "t:general.grid.gap.options__inherit.label" + }, + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ], + "default": "inherit", + "label": "t:general.grid.row_gap.label" }, { "type": "checkbox", - "id": "show_view_all", - "default": false, - "label": "t:sections.collection-list.settings.show_view_all.label", - "info": "t:sections.collection-list.settings.show_view_all.info" + "id": "grid_bordered", + "label": "t:sections.collection-list.settings.show_grid_border.label", + "default": false }, { "type": "header", - "content": "t:sections.collection-list.settings.header_mobile.content" + "content": "t:general.mobile.name" }, { "type": "select", @@ -234,64 +725,120 @@ "options": [ { "value": "1", - "label": "t:sections.collection-list.settings.columns_mobile.options__1.label" + "label": "t:general.mobile.columns_mobile.options__1.label" }, { "value": "2", - "label": "t:sections.collection-list.settings.columns_mobile.options__2.label" + "label": "t:general.mobile.columns_mobile.options__2.label" + }, + { + "value": "3", + "label": "t:general.mobile.columns_mobile.options__3.label" } ], - "default": "1", - "label": "t:sections.collection-list.settings.columns_mobile.label" + "default": "3", + "label": "t:general.mobile.columns_mobile.label" }, { "type": "checkbox", "id": "swipe_on_mobile", - "default": false, - "label": "t:sections.collection-list.settings.swipe_on_mobile.label" + "default": true, + "label": "t:general.mobile.swipe_on_mobile.label" }, { "type": "header", - "content": "t:sections.all.padding.section_padding_heading" + "content": "t:general.padding.section_heading.content" }, { "type": "range", "id": "padding_top", "min": 0, "max": 100, - "step": 4, + "step": 2, "unit": "px", - "label": "t:sections.all.padding.padding_top", - "default": 36 + "label": "t:general.padding.top.label", + "default": 50 }, { "type": "range", "id": "padding_bottom", "min": 0, "max": 100, - "step": 4, + "step": 2, "unit": "px", - "label": "t:sections.all.padding.padding_bottom", - "default": 36 + "label": "t:general.padding.bottom.label", + "default": 50 + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "default": false, + "label": "t:general.divider.show_divider.label" + }, + { + "type": "select", + "id": "divider_width", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed", + "label": "t:general.divider.width.label" } ], "blocks": [ { "type": "featured_collection", - "name": "t:sections.collection-list.blocks.featured_collection.name", + "name": "t:general.collection.label", "settings": [ { "type": "collection", "id": "collection", - "label": "t:sections.collection-list.blocks.featured_collection.settings.collection.label" + "label": "t:general.collection.label" + }, + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label" + }, + { + "type": "text", + "id": "title", + "label": "t:general.collection.title.label", + "info": "t:general.collection.title.info" } ] } ], "presets": [ { - "name": "t:sections.collection-list.presets.name", + "name": "t:sections.collection-list.name", "blocks": [ + { + "type": "featured_collection" + }, + { + "type": "featured_collection" + }, + { + "type": "featured_collection" + }, + { + "type": "featured_collection" + }, + { + "type": "featured_collection" + }, { "type": "featured_collection" }, diff --git a/sections/collection-tabs.liquid b/sections/collection-tabs.liquid new file mode 100644 index 00000000000..ba10cb3fd8e --- /dev/null +++ b/sections/collection-tabs.liquid @@ -0,0 +1,702 @@ +{{ 'section-collection-tabs.css' | asset_url | stylesheet_tag }} + + +{%- liquid + assign image_aspect_ratio = section.settings.image_ratio + if section.settings.image_ratio == 'adapt' + assign first_block = section.blocks | first + assign first_image = blank + + if first_block.settings.image != blank + assign first_image = first_block.settings.image + else + assign first_collection = collections[first_block.settings.collection] + if first_collection.image != blank + assign first_image = first_collection.image + elsif first_collection.products.first and first_collection.products.first.images != empty + assign first_image = first_collection.products.first.featured_image + endif + endif + + if first_image != blank + assign image_aspect_ratio = first_image.aspect_ratio + else + assign image_aspect_ratio = '1/1' + endif + endif + + assign motion_delay = 0 +-%} +{% render 'divider', + show_divider: section.settings.show_section_divider, + divider_width: section.settings.divider_width +%} + +
    + + +
    +

    + + {% render 'highlight-text', + hl_text: section.settings.heading, + hl_style: section.settings.highlight_style, + hl_font_style: section.settings.highlight_font_style, + hl_style_color: section.settings.highlight_style_color, + hl_text_color: section.settings.highlight_text_color + %} + +

    + {%- assign motion_delay = motion_delay | plus: 50 -%} +
    + + {%- for block in section.blocks -%} + {%- liquid + assign collection = block.settings.collection + assign collection_title = block.settings.title | default: collection.title + assign default_label = 'onboarding.collection_title' | t + -%} + + + {{- collection_title | default: default_label -}} + + + {%- endfor -%} + +
    +
    +
    + {%- for block in section.blocks -%} + {% liquid + assign collection = block.settings.collection + assign button_style = block.settings.button_style + assign button_label = block.settings.button_label + assign collection_desc = block.settings.text + if collection_desc == blank + assign collection_desc = collection.description + endif + %} + + {%- endfor -%} +
    +
    +
    + {%- for block in section.blocks %} + {% liquid + assign collection = collections[block.settings.collection] + + assign tab_image = blank + if block.settings.image != blank + assign tab_image = block.settings.image + elsif collection.image != blank + assign tab_image = collection.image + elsif collection.products.first and collection.products.first.images != empty + assign tab_image = collection.products.first.featured_image + endif + + assign alt_image = tab_image.alt | default: shop.name | escape + + assign loading = 'lazy' + assign fetchpriority = 'low' + if section.index < 2 and forloop.first + assign loading = 'eager' + assign fetchpriority = 'high' + endif + + assign collection_title = block.settings.title | default: collection.title + assign default_label = 'onboarding.collection_title' | t + %} + + + {%- if tab_image != blank -%} + + {{- + tab_image + | image_url: width: 1800 + | image_tag: + loading: loading, + fetchpriority: fetchpriority, + sizes: '(max-width: 767px) 100vw, 50vw', + width: tab_image.width, + height: tab_image.height, + widths: '300,400,500,600,700,800,900,1000,1200,1400,1600,1800', + alt: alt_image, + is: 'image-lazy', + class: 'motion-reduce hover-scale-up' + -}} + + {%- else -%} + {% capture current %}{% cycle 1, 2, 3 %}{% endcapture %} + {{ + 'collection-' + | append: current + | placeholder_svg_tag: 'placeholder-svg motion-reduce hover-scale-up' + }} + {%- endif -%} + + + {%- endfor -%} +
    +
    +
    +
    +{% schema %} +{ + "name": "t:sections.collection-tabs.name", + "disabled_on": { + "groups": ["footer", "header", "custom.overlay"] + }, + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "select", + "id": "container", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed", + "label": "t:general.container.label" + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "header", + "content": "t:general.section_header.content" + }, + { + "type": "inline_richtext", + "id": "heading", + "label": "t:general.heading.label", + "default": "Collection tabs", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h5", + "options": [ + { + "value": "h6", + "label": "t:general.text_size.options__h6.label" + }, + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "header", + "content": "t:sections.collection-tabs.settings.header__tabs_settings.content" + }, + { + "type": "select", + "id": "image_position", + "label": "t:general.image_position.desktop.label", + "default": "right", + "options": [ + { + "value": "left", + "label": "t:general.image_position.options__left.label" + }, + { + "value": "right", + "label": "t:general.image_position.options__right.label" + } + ] + }, + { + "type": "select", + "id": "image_ratio", + "label": "t:general.image_ratio.label", + "default": "adapt", + "options": [ + { + "value": "adapt", + "label": "t:general.image_ratio.options__1.label" + }, + { + "value": "1/1", + "label": "t:general.image_ratio.options__2.label" + }, + { + "value": "3/4", + "label": "t:general.image_ratio.options__3.label" + }, + { + "value": "4/3", + "label": "t:general.image_ratio.options__4.label" + } + ] + }, + { + "type": "select", + "id": "collection_heading_size", + "label": "t:general.text_size.title.label", + "default": "h1", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "header", + "content": "t:general.padding.section_heading.content" + }, + { + "type": "range", + "id": "padding_top", + "min": 0, + "max": 100, + "step": 2, + "unit": "px", + "label": "t:general.padding.top.label", + "default": 0 + }, + { + "type": "range", + "id": "padding_bottom", + "min": 0, + "max": 100, + "step": 2, + "unit": "px", + "label": "t:general.padding.bottom.label", + "default": 0 + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "default": false, + "label": "t:general.divider.show_divider.label" + }, + { + "type": "select", + "id": "divider_width", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed", + "label": "t:general.divider.width.label" + } + ], + "max_blocks": 5, + "blocks": [ + { + "type": "collection", + "name": "t:general.collection.label", + "settings": [ + { + "type": "collection", + "id": "collection", + "label": "t:general.collection.label" + }, + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label", + "info": "t:general.collection.image.info" + }, + { + "type": "text", + "id": "title", + "label": "t:general.collection.title.label", + "info": "t:general.collection.title.info" + }, + { + "type": "richtext", + "id": "text", + "label": "t:general.description.label", + "info": "t:general.collection.description.info" + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label", + "info": "t:general.button.button_label.info", + "default": "Button label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--primary" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + } + ] + } + ], + "presets": [ + { + "name": "t:sections.collection-tabs.name", + "blocks": [ + { + "type": "collection" + }, + { + "type": "collection" + }, + { + "type": "collection" + } + ] + } + ] +} +{% endschema %} diff --git a/sections/comparison-table.liquid b/sections/comparison-table.liquid new file mode 100644 index 00000000000..067f4db80e8 --- /dev/null +++ b/sections/comparison-table.liquid @@ -0,0 +1,2268 @@ +{{ 'section-quick-comparison-table.css' | asset_url | stylesheet_tag }} +{{ 'section-comparison-table.css' | asset_url | stylesheet_tag }} +{%- liquid + assign header_layout = section.settings.header_layout + assign side_button = true + if header_layout == 'standing-column' or header_layout == 'vertical' + assign header_layout = 'vertical' + assign side_button = false + endif + + assign heading_block = section.blocks | find: 'type', 'heading' + assign content_block = section.blocks | where: 'type', 'content' + + assign featured_media = product.featured_media + if featured_media.media_type == 'model' or featured_media.media_type == 'video' + assign featured_media = product.featured_media.preview_image + endif +-%} +{%- render 'divider', + show_divider: section.settings.show_section_divider, + divider_width: section.settings.divider_width +-%} +
    + +
    + {%- render 'section-heading', + section_settings: section.settings, + header_layout: section.settings.header_layout, + button_label: section.settings.button_label, + button_link: section.settings.button_link, + button_style: section.settings.button_style, + button_icon: section.settings.button_icon, + button_visible: true, + side_button: side_button, + custom_css_class: 'sticky-element' + -%} +
    +
    + + {% comment %} Row with Product Images {% endcomment %} + + + {% for block in content_block %} + {% assign product = block.settings.product %} + {% assign featured_media = product.featured_media %} + + {% endfor %} + + + {% comment %} Dynamic Feature Rows {% endcomment %} + {% for i in (1..10) %} + {%- liquid + assign title_key = 'title-' | append: i + assign text_key = 'text-' | append: i + assign has_content = false + if heading_block.settings[title_key] != blank + assign has_content = true + endif + -%} + {% if has_content %} + + {% comment %} Heading Column {% endcomment %} + {% assign title = heading_block.settings[title_key] %} + {% assign icon_key = 'icon-' | append: i %} + {% assign image_key = 'image-' | append: i %} + {% assign icon = heading_block.settings[icon_key] %} + {% assign image = heading_block.settings[image_key] %} + + + + {% comment %} Content Columns {% endcomment %} + {% for block in content_block %} + {% assign text = block.settings[text_key] %} + + {% endfor %} + + {% endif %} + {% endfor %} +
    + + +
    + {% if title != blank %} +
    + +
    +
    + {{ title }} +
    +
    +
    + {% endif %} +
    + {% comment %}
    {{ text }}
    {% endcomment %} + {%- if text != blank -%} + {%- if section.settings.show_view_more_button and section.settings.text_line_limit != 'none' -%} + +
    + {{- text -}} +
    + +
    + {%- else -%} +
    + {{- text -}} +
    + {%- endif -%} + {%- endif -%} +
    +
    +
    +
    +{% schema %} +{ + "name": "t:sections.comparison-table.name", + "disabled_on": { + "groups": ["header", "footer", "custom.overlay"] + }, + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "select", + "id": "container", + "label": "t:general.container.label", + "default": "fixed", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ] + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "header", + "content": "t:general.section_header.content" + }, + { + "type": "select", + "id": "header_layout", + "label": "t:general.layout.label", + "default": "standing-column", + "options": [ + { + "value": "vertical", + "label": "t:general.layout.options__1.label" + }, + { + "value": "horizontal", + "label": "t:general.layout.options__2.label" + }, + { + "value": "standing-column", + "label": "t:general.layout.options__3.label" + } + ] + }, + { + "id": "section_header_alignment", + "type": "select", + "label": "t:general.text_alignment.label", + "default": "left", + "options": [ + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ] + }, + { + "id": "section_header_alignment_mobile", + "type": "select", + "label": "t:general.text_alignment.mobile.label", + "default": "inherit", + "options": [ + { + "value": "inherit", + "label": "t:general.text_alignment.options__4.label" + }, + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ] + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label", + "default": "Subheading" + }, + { + "type": "inline_richtext", + "id": "heading", + "label": "t:general.heading.label", + "default": "Comparison table", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h1", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "richtext", + "id": "description", + "label": "t:general.text.label", + "default": "

    Displays a quick comparison table for the current product and its related products

    " + }, + { + "type": "select", + "id": "text_size", + "label": "t:general.text_size.text.label", + "default": "text-base", + "options": [ + { + "value": "text-sm", + "label": "t:general.text_size.options__small.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-lg", + "label": "t:general.text_size.options__large.label" + }, + { + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label", + "default": "Button label" + }, + { + "type": "url", + "id": "button_link", + "label": "t:general.button.button_link.label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--primary" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + }, + { + "type": "header", + "content": "t:sections.comparison-table.setting.table-content.content" + }, + { + "type": "range", + "id": "icon_size", + "min": 10, + "max": 50, + "step": 2, + "unit": "px", + "label": "t:sections.comparison-table.setting.table-content.icon_size.label", + "default": 28 + }, + { + "type": "select", + "id": "text_line_limit", + "label": "t:general.text_line_limit.label", + "default": "2-lines", + "options": [ + { + "value": "none", + "label": "t:general.text_line_limit.options__none.label" + }, + { + "value": "1-line", + "label": "t:general.text_line_limit.options__1.label" + }, + { + "value": "2-lines", + "label": "t:general.text_line_limit.options__2.label" + }, + { + "value": "3-lines", + "label": "t:general.text_line_limit.options__3.label" + }, + { + "value": "4-lines", + "label": "t:general.text_line_limit.options__4.label" + }, + { + "value": "5-lines", + "label": "t:general.text_line_limit.options__5.label" + } + ] + }, + { + "type": "checkbox", + "id": "show_view_more_button", + "label": "t:general.show_view_more_button.label", + "info": "t:general.show_view_more_button.info", + "default": false + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "default": false, + "label": "t:general.divider.show_divider.label" + }, + { + "type": "select", + "id": "divider_width", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed", + "label": "t:general.divider.width.label" + }, + { + "type": "header", + "content": "t:general.padding.section_heading.content" + }, + { + "type": "range", + "id": "padding_top", + "label": "t:general.padding.top.label", + "default": 50, + "min": 0, + "max": 120, + "step": 2, + "unit": "px" + }, + { + "type": "range", + "id": "padding_bottom", + "label": "t:general.padding.bottom.label", + "default": 50, + "min": 0, + "max": 120, + "step": 2, + "unit": "px" + } + ], + "blocks": [ + { + "type": "heading", + "limit": 1, + "name": "t:general.heading.name", + "settings": [ + { + "type": "header", + "content": "t:general.heading.label" + }, + { + "type": "select", + "id": "icon-1", + "label": "t:general.icon.label", + "default": "chat", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" + }, + { + "value": "car-simple", + "label": "t:general.icon.options__2.label" + }, + { + "value": "truck", + "label": "t:general.icon.options__3.label" + }, + { + "value": "package", + "label": "t:general.icon.options__4.label" + }, + { + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" + }, + { + "value": "gift", + "label": "t:general.icon.options__6.label" + }, + { + "value": "heart", + "label": "t:general.icon.options__7.label" + }, + { + "value": "globe", + "label": "t:general.icon.options__8.label" + }, + { + "value": "check", + "label": "t:general.icon.options__9.label" + }, + { + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" + }, + { + "value": "lightning", + "label": "t:general.icon.options__11.label" + }, + { + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" + }, + { + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" + }, + { + "value": "location", + "label": "t:general.icon.options__14.label" + }, + { + "value": "tag", + "label": "t:general.icon.options__15.label" + }, + { + "value": "map-pin", + "label": "t:general.icon.options__16.label" + }, + { + "value": "smiley", + "label": "t:general.icon.options__17.label" + }, + { + "value": "stool", + "label": "t:general.icon.options__18.label" + }, + { + "value": "clock", + "label": "t:general.icon.options__19.label" + }, + { + "value": "phone", + "label": "t:general.icon.options__20.label" + }, + { + "value": "chat", + "label": "t:general.icon.options__21.label" + }, + { + "value": "paperplane", + "label": "t:general.icon.options__22.label" + }, + { + "value": "sliders", + "label": "t:general.icon.options__23.label" + }, + { + "value": "sound", + "label": "t:general.icon.options__24.label" + }, + { + "value": "music", + "label": "t:general.icon.options__25.label" + }, + { + "value": "airplane", + "label": "t:general.icon.options__26.label" + }, + { + "value": "alarm", + "label": "t:general.icon.options__27.label" + }, + { + "value": "play-list", + "label": "t:general.icon.options__28.label" + }, + { + "value": "drop-slash", + "label": "t:general.icon.options__29.label" + }, + { + "value": "pause-circle", + "label": "t:general.icon.options__30.label" + }, + { + "value": "acorn", + "label": "t:general.icon.options__34.label" + }, + { + "value": "leaf", + "label": "t:general.icon.options__35.label" + } + ] + }, + { + "type": "image_picker", + "id": "image-1", + "label": "t:general.image.label" + }, + { + "type": "text", + "id": "title-1", + "label": "t:general.collection.title.label", + "default": "Description" + }, + { + "type": "header", + "content": "t:sections.comparison-table.blocks.heading.rows.2" + }, + { + "type": "select", + "id": "icon-2", + "label": "t:general.icon.label", + "default": "chat", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" + }, + { + "value": "car-simple", + "label": "t:general.icon.options__2.label" + }, + { + "value": "truck", + "label": "t:general.icon.options__3.label" + }, + { + "value": "package", + "label": "t:general.icon.options__4.label" + }, + { + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" + }, + { + "value": "gift", + "label": "t:general.icon.options__6.label" + }, + { + "value": "heart", + "label": "t:general.icon.options__7.label" + }, + { + "value": "globe", + "label": "t:general.icon.options__8.label" + }, + { + "value": "check", + "label": "t:general.icon.options__9.label" + }, + { + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" + }, + { + "value": "lightning", + "label": "t:general.icon.options__11.label" + }, + { + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" + }, + { + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" + }, + { + "value": "location", + "label": "t:general.icon.options__14.label" + }, + { + "value": "tag", + "label": "t:general.icon.options__15.label" + }, + { + "value": "map-pin", + "label": "t:general.icon.options__16.label" + }, + { + "value": "smiley", + "label": "t:general.icon.options__17.label" + }, + { + "value": "stool", + "label": "t:general.icon.options__18.label" + }, + { + "value": "clock", + "label": "t:general.icon.options__19.label" + }, + { + "value": "phone", + "label": "t:general.icon.options__20.label" + }, + { + "value": "chat", + "label": "t:general.icon.options__21.label" + }, + { + "value": "paperplane", + "label": "t:general.icon.options__22.label" + }, + { + "value": "sliders", + "label": "t:general.icon.options__23.label" + }, + { + "value": "sound", + "label": "t:general.icon.options__24.label" + }, + { + "value": "music", + "label": "t:general.icon.options__25.label" + }, + { + "value": "airplane", + "label": "t:general.icon.options__26.label" + }, + { + "value": "alarm", + "label": "t:general.icon.options__27.label" + }, + { + "value": "play-list", + "label": "t:general.icon.options__28.label" + }, + { + "value": "drop-slash", + "label": "t:general.icon.options__29.label" + }, + { + "value": "pause-circle", + "label": "t:general.icon.options__30.label" + }, + { + "value": "acorn", + "label": "t:general.icon.options__34.label" + }, + { + "value": "leaf", + "label": "t:general.icon.options__35.label" + } + ] + }, + { + "type": "image_picker", + "id": "image-2", + "label": "t:general.image.label" + }, + { + "type": "text", + "id": "title-2", + "label": "t:general.collection.title.label", + "default": "Aluminium Case" + }, + { + "type": "header", + "content": "t:sections.comparison-table.blocks.heading.rows.3" + }, + { + "type": "select", + "id": "icon-3", + "default": "chat", + "label": "t:general.icon.label", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" + }, + { + "value": "car-simple", + "label": "t:general.icon.options__2.label" + }, + { + "value": "truck", + "label": "t:general.icon.options__3.label" + }, + { + "value": "package", + "label": "t:general.icon.options__4.label" + }, + { + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" + }, + { + "value": "gift", + "label": "t:general.icon.options__6.label" + }, + { + "value": "heart", + "label": "t:general.icon.options__7.label" + }, + { + "value": "globe", + "label": "t:general.icon.options__8.label" + }, + { + "value": "check", + "label": "t:general.icon.options__9.label" + }, + { + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" + }, + { + "value": "lightning", + "label": "t:general.icon.options__11.label" + }, + { + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" + }, + { + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" + }, + { + "value": "location", + "label": "t:general.icon.options__14.label" + }, + { + "value": "tag", + "label": "t:general.icon.options__15.label" + }, + { + "value": "map-pin", + "label": "t:general.icon.options__16.label" + }, + { + "value": "smiley", + "label": "t:general.icon.options__17.label" + }, + { + "value": "stool", + "label": "t:general.icon.options__18.label" + }, + { + "value": "clock", + "label": "t:general.icon.options__19.label" + }, + { + "value": "phone", + "label": "t:general.icon.options__20.label" + }, + { + "value": "chat", + "label": "t:general.icon.options__21.label" + }, + { + "value": "paperplane", + "label": "t:general.icon.options__22.label" + }, + { + "value": "sliders", + "label": "t:general.icon.options__23.label" + }, + { + "value": "sound", + "label": "t:general.icon.options__24.label" + }, + { + "value": "music", + "label": "t:general.icon.options__25.label" + }, + { + "value": "airplane", + "label": "t:general.icon.options__26.label" + }, + { + "value": "alarm", + "label": "t:general.icon.options__27.label" + }, + { + "value": "play-list", + "label": "t:general.icon.options__28.label" + }, + { + "value": "drop-slash", + "label": "t:general.icon.options__29.label" + }, + { + "value": "pause-circle", + "label": "t:general.icon.options__30.label" + }, + { + "value": "acorn", + "label": "t:general.icon.options__34.label" + }, + { + "value": "leaf", + "label": "t:general.icon.options__35.label" + } + ] + }, + { + "type": "image_picker", + "id": "image-3", + "label": "t:general.image.label" + }, + { + "type": "text", + "id": "title-3", + "label": "t:general.collection.title.label", + "default": "Battery" + }, + { + "type": "header", + "content": "t:sections.comparison-table.blocks.heading.rows.4" + }, + { + "type": "select", + "id": "icon-4", + "default": "chat", + "label": "t:general.icon.label", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" + }, + { + "value": "car-simple", + "label": "t:general.icon.options__2.label" + }, + { + "value": "truck", + "label": "t:general.icon.options__3.label" + }, + { + "value": "package", + "label": "t:general.icon.options__4.label" + }, + { + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" + }, + { + "value": "gift", + "label": "t:general.icon.options__6.label" + }, + { + "value": "heart", + "label": "t:general.icon.options__7.label" + }, + { + "value": "globe", + "label": "t:general.icon.options__8.label" + }, + { + "value": "check", + "label": "t:general.icon.options__9.label" + }, + { + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" + }, + { + "value": "lightning", + "label": "t:general.icon.options__11.label" + }, + { + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" + }, + { + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" + }, + { + "value": "location", + "label": "t:general.icon.options__14.label" + }, + { + "value": "tag", + "label": "t:general.icon.options__15.label" + }, + { + "value": "map-pin", + "label": "t:general.icon.options__16.label" + }, + { + "value": "smiley", + "label": "t:general.icon.options__17.label" + }, + { + "value": "stool", + "label": "t:general.icon.options__18.label" + }, + { + "value": "clock", + "label": "t:general.icon.options__19.label" + }, + { + "value": "phone", + "label": "t:general.icon.options__20.label" + }, + { + "value": "chat", + "label": "t:general.icon.options__21.label" + }, + { + "value": "paperplane", + "label": "t:general.icon.options__22.label" + }, + { + "value": "sliders", + "label": "t:general.icon.options__23.label" + }, + { + "value": "sound", + "label": "t:general.icon.options__24.label" + }, + { + "value": "music", + "label": "t:general.icon.options__25.label" + }, + { + "value": "airplane", + "label": "t:general.icon.options__26.label" + }, + { + "value": "alarm", + "label": "t:general.icon.options__27.label" + }, + { + "value": "play-list", + "label": "t:general.icon.options__28.label" + }, + { + "value": "drop-slash", + "label": "t:general.icon.options__29.label" + }, + { + "value": "pause-circle", + "label": "t:general.icon.options__30.label" + }, + { + "value": "acorn", + "label": "t:general.icon.options__34.label" + }, + { + "value": "leaf", + "label": "t:general.icon.options__35.label" + } + ] + }, + { + "type": "image_picker", + "id": "image-4", + "label": "t:general.image.label" + }, + { + "type": "text", + "id": "title-4", + "label": "t:general.collection.title.label", + "default": "Screen" + }, + { + "type": "header", + "content": "t:sections.comparison-table.blocks.heading.rows.5" + }, + { + "type": "select", + "id": "icon-5", + "default": "chat", + "label": "t:general.icon.label", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" + }, + { + "value": "car-simple", + "label": "t:general.icon.options__2.label" + }, + { + "value": "truck", + "label": "t:general.icon.options__3.label" + }, + { + "value": "package", + "label": "t:general.icon.options__4.label" + }, + { + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" + }, + { + "value": "gift", + "label": "t:general.icon.options__6.label" + }, + { + "value": "heart", + "label": "t:general.icon.options__7.label" + }, + { + "value": "globe", + "label": "t:general.icon.options__8.label" + }, + { + "value": "check", + "label": "t:general.icon.options__9.label" + }, + { + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" + }, + { + "value": "lightning", + "label": "t:general.icon.options__11.label" + }, + { + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" + }, + { + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" + }, + { + "value": "location", + "label": "t:general.icon.options__14.label" + }, + { + "value": "tag", + "label": "t:general.icon.options__15.label" + }, + { + "value": "map-pin", + "label": "t:general.icon.options__16.label" + }, + { + "value": "smiley", + "label": "t:general.icon.options__17.label" + }, + { + "value": "stool", + "label": "t:general.icon.options__18.label" + }, + { + "value": "clock", + "label": "t:general.icon.options__19.label" + }, + { + "value": "phone", + "label": "t:general.icon.options__20.label" + }, + { + "value": "chat", + "label": "t:general.icon.options__21.label" + }, + { + "value": "paperplane", + "label": "t:general.icon.options__22.label" + }, + { + "value": "sliders", + "label": "t:general.icon.options__23.label" + }, + { + "value": "sound", + "label": "t:general.icon.options__24.label" + }, + { + "value": "music", + "label": "t:general.icon.options__25.label" + }, + { + "value": "airplane", + "label": "t:general.icon.options__26.label" + }, + { + "value": "alarm", + "label": "t:general.icon.options__27.label" + }, + { + "value": "play-list", + "label": "t:general.icon.options__28.label" + }, + { + "value": "drop-slash", + "label": "t:general.icon.options__29.label" + }, + { + "value": "pause-circle", + "label": "t:general.icon.options__30.label" + }, + { + "value": "acorn", + "label": "t:general.icon.options__34.label" + }, + { + "value": "leaf", + "label": "t:general.icon.options__35.label" + } + ] + }, + { + "type": "image_picker", + "id": "image-5", + "label": "t:general.image.label" + }, + { + "type": "text", + "id": "title-5", + "label": "t:general.collection.title.label", + "default": "Display" + }, + { + "type": "header", + "content": "t:sections.comparison-table.blocks.heading.rows.6" + }, + { + "type": "select", + "id": "icon-6", + "default": "chat", + "label": "t:general.icon.label", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" + }, + { + "value": "car-simple", + "label": "t:general.icon.options__2.label" + }, + { + "value": "truck", + "label": "t:general.icon.options__3.label" + }, + { + "value": "package", + "label": "t:general.icon.options__4.label" + }, + { + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" + }, + { + "value": "gift", + "label": "t:general.icon.options__6.label" + }, + { + "value": "heart", + "label": "t:general.icon.options__7.label" + }, + { + "value": "globe", + "label": "t:general.icon.options__8.label" + }, + { + "value": "check", + "label": "t:general.icon.options__9.label" + }, + { + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" + }, + { + "value": "lightning", + "label": "t:general.icon.options__11.label" + }, + { + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" + }, + { + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" + }, + { + "value": "location", + "label": "t:general.icon.options__14.label" + }, + { + "value": "tag", + "label": "t:general.icon.options__15.label" + }, + { + "value": "map-pin", + "label": "t:general.icon.options__16.label" + }, + { + "value": "smiley", + "label": "t:general.icon.options__17.label" + }, + { + "value": "stool", + "label": "t:general.icon.options__18.label" + }, + { + "value": "clock", + "label": "t:general.icon.options__19.label" + }, + { + "value": "phone", + "label": "t:general.icon.options__20.label" + }, + { + "value": "chat", + "label": "t:general.icon.options__21.label" + }, + { + "value": "paperplane", + "label": "t:general.icon.options__22.label" + }, + { + "value": "sliders", + "label": "t:general.icon.options__23.label" + }, + { + "value": "sound", + "label": "t:general.icon.options__24.label" + }, + { + "value": "music", + "label": "t:general.icon.options__25.label" + }, + { + "value": "airplane", + "label": "t:general.icon.options__26.label" + }, + { + "value": "alarm", + "label": "t:general.icon.options__27.label" + }, + { + "value": "play-list", + "label": "t:general.icon.options__28.label" + }, + { + "value": "drop-slash", + "label": "t:general.icon.options__29.label" + }, + { + "value": "pause-circle", + "label": "t:general.icon.options__30.label" + }, + { + "value": "acorn", + "label": "t:general.icon.options__34.label" + }, + { + "value": "leaf", + "label": "t:general.icon.options__35.label" + } + ] + }, + { + "type": "image_picker", + "id": "image-6", + "label": "t:general.image.label" + }, + { + "type": "text", + "id": "title-6", + "label": "t:general.collection.title.label" + }, + { + "type": "header", + "content": "t:sections.comparison-table.blocks.heading.rows.7" + }, + { + "type": "select", + "id": "icon-7", + "default": "chat", + "label": "t:general.icon.label", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" + }, + { + "value": "car-simple", + "label": "t:general.icon.options__2.label" + }, + { + "value": "truck", + "label": "t:general.icon.options__3.label" + }, + { + "value": "package", + "label": "t:general.icon.options__4.label" + }, + { + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" + }, + { + "value": "gift", + "label": "t:general.icon.options__6.label" + }, + { + "value": "heart", + "label": "t:general.icon.options__7.label" + }, + { + "value": "globe", + "label": "t:general.icon.options__8.label" + }, + { + "value": "check", + "label": "t:general.icon.options__9.label" + }, + { + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" + }, + { + "value": "lightning", + "label": "t:general.icon.options__11.label" + }, + { + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" + }, + { + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" + }, + { + "value": "location", + "label": "t:general.icon.options__14.label" + }, + { + "value": "tag", + "label": "t:general.icon.options__15.label" + }, + { + "value": "map-pin", + "label": "t:general.icon.options__16.label" + }, + { + "value": "smiley", + "label": "t:general.icon.options__17.label" + }, + { + "value": "stool", + "label": "t:general.icon.options__18.label" + }, + { + "value": "clock", + "label": "t:general.icon.options__19.label" + }, + { + "value": "phone", + "label": "t:general.icon.options__20.label" + }, + { + "value": "chat", + "label": "t:general.icon.options__21.label" + }, + { + "value": "paperplane", + "label": "t:general.icon.options__22.label" + }, + { + "value": "sliders", + "label": "t:general.icon.options__23.label" + }, + { + "value": "sound", + "label": "t:general.icon.options__24.label" + }, + { + "value": "music", + "label": "t:general.icon.options__25.label" + }, + { + "value": "airplane", + "label": "t:general.icon.options__26.label" + }, + { + "value": "alarm", + "label": "t:general.icon.options__27.label" + }, + { + "value": "play-list", + "label": "t:general.icon.options__28.label" + }, + { + "value": "drop-slash", + "label": "t:general.icon.options__29.label" + }, + { + "value": "pause-circle", + "label": "t:general.icon.options__30.label" + }, + { + "value": "acorn", + "label": "t:general.icon.options__34.label" + }, + { + "value": "leaf", + "label": "t:general.icon.options__35.label" + } + ] + }, + { + "type": "image_picker", + "id": "image-7", + "label": "t:general.image.label" + }, + { + "type": "text", + "id": "title-7", + "label": "t:general.collection.title.label" + }, + { + "type": "header", + "content": "t:sections.comparison-table.blocks.heading.rows.8" + }, + { + "type": "select", + "id": "icon-8", + "default": "chat", + "label": "t:general.icon.label", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" + }, + { + "value": "car-simple", + "label": "t:general.icon.options__2.label" + }, + { + "value": "truck", + "label": "t:general.icon.options__3.label" + }, + { + "value": "package", + "label": "t:general.icon.options__4.label" + }, + { + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" + }, + { + "value": "gift", + "label": "t:general.icon.options__6.label" + }, + { + "value": "heart", + "label": "t:general.icon.options__7.label" + }, + { + "value": "globe", + "label": "t:general.icon.options__8.label" + }, + { + "value": "check", + "label": "t:general.icon.options__9.label" + }, + { + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" + }, + { + "value": "lightning", + "label": "t:general.icon.options__11.label" + }, + { + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" + }, + { + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" + }, + { + "value": "location", + "label": "t:general.icon.options__14.label" + }, + { + "value": "tag", + "label": "t:general.icon.options__15.label" + }, + { + "value": "map-pin", + "label": "t:general.icon.options__16.label" + }, + { + "value": "smiley", + "label": "t:general.icon.options__17.label" + }, + { + "value": "stool", + "label": "t:general.icon.options__18.label" + }, + { + "value": "clock", + "label": "t:general.icon.options__19.label" + }, + { + "value": "phone", + "label": "t:general.icon.options__20.label" + }, + { + "value": "chat", + "label": "t:general.icon.options__21.label" + }, + { + "value": "paperplane", + "label": "t:general.icon.options__22.label" + }, + { + "value": "sliders", + "label": "t:general.icon.options__23.label" + }, + { + "value": "sound", + "label": "t:general.icon.options__24.label" + }, + { + "value": "music", + "label": "t:general.icon.options__25.label" + }, + { + "value": "airplane", + "label": "t:general.icon.options__26.label" + }, + { + "value": "alarm", + "label": "t:general.icon.options__27.label" + }, + { + "value": "play-list", + "label": "t:general.icon.options__28.label" + }, + { + "value": "drop-slash", + "label": "t:general.icon.options__29.label" + }, + { + "value": "pause-circle", + "label": "t:general.icon.options__30.label" + }, + { + "value": "acorn", + "label": "t:general.icon.options__34.label" + }, + { + "value": "leaf", + "label": "t:general.icon.options__35.label" + } + ] + }, + { + "type": "image_picker", + "id": "image-8", + "label": "t:general.image.label" + }, + { + "type": "text", + "id": "title-8", + "label": "t:general.collection.title.label" + }, + { + "type": "header", + "content": "t:sections.comparison-table.blocks.heading.rows.9" + }, + { + "type": "select", + "id": "icon-9", + "default": "chat", + "label": "t:general.icon.label", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" + }, + { + "value": "car-simple", + "label": "t:general.icon.options__2.label" + }, + { + "value": "truck", + "label": "t:general.icon.options__3.label" + }, + { + "value": "package", + "label": "t:general.icon.options__4.label" + }, + { + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" + }, + { + "value": "gift", + "label": "t:general.icon.options__6.label" + }, + { + "value": "heart", + "label": "t:general.icon.options__7.label" + }, + { + "value": "globe", + "label": "t:general.icon.options__8.label" + }, + { + "value": "check", + "label": "t:general.icon.options__9.label" + }, + { + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" + }, + { + "value": "lightning", + "label": "t:general.icon.options__11.label" + }, + { + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" + }, + { + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" + }, + { + "value": "location", + "label": "t:general.icon.options__14.label" + }, + { + "value": "tag", + "label": "t:general.icon.options__15.label" + }, + { + "value": "map-pin", + "label": "t:general.icon.options__16.label" + }, + { + "value": "smiley", + "label": "t:general.icon.options__17.label" + }, + { + "value": "stool", + "label": "t:general.icon.options__18.label" + }, + { + "value": "clock", + "label": "t:general.icon.options__19.label" + }, + { + "value": "phone", + "label": "t:general.icon.options__20.label" + }, + { + "value": "chat", + "label": "t:general.icon.options__21.label" + }, + { + "value": "paperplane", + "label": "t:general.icon.options__22.label" + }, + { + "value": "sliders", + "label": "t:general.icon.options__23.label" + }, + { + "value": "sound", + "label": "t:general.icon.options__24.label" + }, + { + "value": "music", + "label": "t:general.icon.options__25.label" + }, + { + "value": "airplane", + "label": "t:general.icon.options__26.label" + }, + { + "value": "alarm", + "label": "t:general.icon.options__27.label" + }, + { + "value": "play-list", + "label": "t:general.icon.options__28.label" + }, + { + "value": "drop-slash", + "label": "t:general.icon.options__29.label" + }, + { + "value": "pause-circle", + "label": "t:general.icon.options__30.label" + }, + { + "value": "acorn", + "label": "t:general.icon.options__34.label" + }, + { + "value": "leaf", + "label": "t:general.icon.options__35.label" + } + ] + }, + { + "type": "image_picker", + "id": "image-9", + "label": "t:general.image.label" + }, + { + "type": "text", + "id": "title-9", + "label": "t:general.collection.title.label" + }, + { + "type": "header", + "content": "t:sections.comparison-table.blocks.heading.rows.10" + }, + { + "type": "select", + "id": "icon-10", + "default": "chat", + "label": "t:general.icon.label", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" + }, + { + "value": "car-simple", + "label": "t:general.icon.options__2.label" + }, + { + "value": "truck", + "label": "t:general.icon.options__3.label" + }, + { + "value": "package", + "label": "t:general.icon.options__4.label" + }, + { + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" + }, + { + "value": "gift", + "label": "t:general.icon.options__6.label" + }, + { + "value": "heart", + "label": "t:general.icon.options__7.label" + }, + { + "value": "globe", + "label": "t:general.icon.options__8.label" + }, + { + "value": "check", + "label": "t:general.icon.options__9.label" + }, + { + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" + }, + { + "value": "lightning", + "label": "t:general.icon.options__11.label" + }, + { + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" + }, + { + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" + }, + { + "value": "location", + "label": "t:general.icon.options__14.label" + }, + { + "value": "tag", + "label": "t:general.icon.options__15.label" + }, + { + "value": "map-pin", + "label": "t:general.icon.options__16.label" + }, + { + "value": "smiley", + "label": "t:general.icon.options__17.label" + }, + { + "value": "stool", + "label": "t:general.icon.options__18.label" + }, + { + "value": "clock", + "label": "t:general.icon.options__19.label" + }, + { + "value": "phone", + "label": "t:general.icon.options__20.label" + }, + { + "value": "chat", + "label": "t:general.icon.options__21.label" + }, + { + "value": "paperplane", + "label": "t:general.icon.options__22.label" + }, + { + "value": "sliders", + "label": "t:general.icon.options__23.label" + }, + { + "value": "sound", + "label": "t:general.icon.options__24.label" + }, + { + "value": "music", + "label": "t:general.icon.options__25.label" + }, + { + "value": "airplane", + "label": "t:general.icon.options__26.label" + }, + { + "value": "alarm", + "label": "t:general.icon.options__27.label" + }, + { + "value": "play-list", + "label": "t:general.icon.options__28.label" + }, + { + "value": "drop-slash", + "label": "t:general.icon.options__29.label" + }, + { + "value": "pause-circle", + "label": "t:general.icon.options__30.label" + }, + { + "value": "acorn", + "label": "t:general.icon.options__34.label" + }, + { + "value": "leaf", + "label": "t:general.icon.options__35.label" + } + ] + }, + { + "type": "image_picker", + "id": "image-10", + "label": "t:general.image.label" + }, + { + "type": "text", + "id": "title-10", + "label": "t:general.collection.title.label" + } + ] + }, + { + "type": "content", + "name": "t:general.content.label", + "settings": [ + { + "type": "product", + "id": "product", + "label": "t:general.product.label" + }, + { + "type": "richtext", + "id": "text-1", + "label": "t:general.text.label" + }, + { + "type": "richtext", + "id": "text-2", + "label": "t:sections.comparison-table.blocks.content.rows.2" + }, + { + "type": "richtext", + "id": "text-3", + "label": "t:sections.comparison-table.blocks.content.rows.3" + }, + { + "type": "richtext", + "id": "text-4", + "label": "t:sections.comparison-table.blocks.content.rows.4" + }, + { + "type": "richtext", + "id": "text-5", + "label": "t:sections.comparison-table.blocks.content.rows.5" + }, + { + "type": "richtext", + "id": "text-6", + "label": "t:sections.comparison-table.blocks.content.rows.6" + }, + { + "type": "richtext", + "id": "text-7", + "label": "t:sections.comparison-table.blocks.content.rows.7" + }, + { + "type": "richtext", + "id": "text-8", + "label": "t:sections.comparison-table.blocks.content.rows.8" + }, + { + "type": "richtext", + "id": "text-9", + "label": "t:sections.comparison-table.blocks.content.rows.9" + }, + { + "type": "richtext", + "id": "text-10", + "label": "t:sections.comparison-table.blocks.content.rows.10" + } + ] + } + ], + "presets": [ + { + "name": "t:sections.comparison-table.name", + "blocks": [ + { + "type": "heading" + }, + { + "type": "content", + "settings": { + "text-1": "

    Hecht and Colin describe employing a process similar

    ", + "text-2": "

    44mm or 40mm

    ", + "text-3": "

    Up to 18 hours

    ", + "text-4": "

    S8 SiP

    ", + "text-5": "

    Up to 1,000 nits

    " + } + }, + { + "type": "content", + "settings": { + "text-1": "

    Inspired to create a chair where the back and arms are moulded

    ", + "text-2": "

    46mm or 42mm

    ", + "text-3": "

    Up to 18 hours

    ", + "text-4": "

    S10 SiP

    ", + "text-5": "

    Up to 2,000 nits

    " + } + }, + { + "type": "content", + "settings": { + "text-1": "

    Inspired to create a chair where the back and arms are moulded

    ", + "text-2": "

    49mm

    ", + "text-3": "

    Up to 36 hours

    ", + "text-4": "

    S9 SiP

    ", + "text-5": "

    Up to 3,000 nits

    " + } + } + ] + } + ] +} +{% endschema %} diff --git a/sections/contact-form.liquid b/sections/contact-form.liquid index 3a5679cf19f..8d67d1f7de2 100644 --- a/sections/contact-form.liquid +++ b/sections/contact-form.liquid @@ -1,217 +1,1454 @@ -{{ 'section-contact-form.css' | asset_url | stylesheet_tag }} - -{%- style -%} - .section-{{ section.id }}-padding { - padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px; - padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px; - } +{%- liquid + assign color_inherit = false + if section.settings.color_scheme == section.settings.section_color_scheme + assign color_inherit = true + endif - @media screen and (min-width: 750px) { - .section-{{ section.id }}-padding { - padding-top: {{ section.settings.padding_top }}px; - padding-bottom: {{ section.settings.padding_bottom }}px; - } - } -{%- endstyle -%} + assign custom_field_blocks = section.blocks | where: 'type', 'custom_field' + assign sidebar = section.blocks | where: 'type', 'sidebar' | first -
    -
    - {%- if section.settings.heading != blank -%} -

    - {{ section.settings.heading }} -

    - {%- else -%} -

    {{ 'templates.contact.form.title' | t }}

    - {%- endif -%} - {%- liquid - assign contact_form_class = 'isolate' - if settings.animations_reveal_on_scroll - assign contact_form_class = 'isolate scroll-trigger animate--slide-in' - endif - -%} - {%- form 'contact', id: 'ContactForm', class: contact_form_class -%} - {%- if form.posted_successfully? -%} -

    - {{- 'icon-success.svg' | inline_asset_content -}} - {{ 'templates.contact.form.post_success' | t }} + assign form_id = 'ContactForm-' | append: section.id + assign phone_field_index = 1 +-%} +{{ 'section-contact-form.css' | asset_url | stylesheet_tag }} +{%- if sidebar -%} + {{ 'component-help-sidebar.css' | asset_url | stylesheet_tag }} +{%- endif -%} +{% render 'divider', + show_divider: section.settings.show_section_divider, + divider_width: section.settings.divider_width +%} +
    + - {% schema %} { "name": "t:sections.contact-form.name", "tag": "section", "class": "section", "disabled_on": { - "groups": ["header", "footer"] + "groups": ["footer", "header", "custom.overlay"] }, "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "select", + "id": "container", + "options": [ + { + "value": "full", + "label": "t:general.container.options__full.label" + }, + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + } + ], + "default": "fixed", + "label": "t:general.container.label" + }, + { + "type": "color_scheme", + "id": "section_color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "header", + "content": "t:general.section_header.content" + }, { "type": "inline_richtext", "id": "heading", - "default": "t:sections.contact-form.settings.title.default", - "label": "t:sections.contact-form.settings.title.label" + "default": "Contact form", + "label": "t:general.heading.label", + "info": "t:general.heading.info" }, { "type": "select", - "id": "heading_size", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", "options": [ { - "value": "h2", - "label": "t:sections.all.heading_size.options__1.label" + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" }, { - "value": "h1", - "label": "t:sections.all.heading_size.options__2.label" + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" }, { - "value": "h0", - "label": "t:sections.all.heading_size.options__3.label" + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" }, { - "value": "hxl", - "label": "t:sections.all.heading_size.options__4.label" + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" }, { - "value": "hxxl", - "label": "t:sections.all.heading_size.options__5.label" + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" } - ], - "default": "h1", - "label": "t:sections.all.heading_size.label" + ] }, { - "type": "color_scheme", - "id": "color_scheme", - "label": "t:sections.all.colors.label", - "default": "scheme-1" + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h1", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] }, { "type": "header", - "content": "t:sections.all.padding.section_padding_heading" + "content": "t:general.padding.section_heading.content" }, { "type": "range", "id": "padding_top", "min": 0, "max": 100, - "step": 4, + "step": 2, "unit": "px", - "label": "t:sections.all.padding.padding_top", - "default": 36 + "label": "t:general.padding.top.label", + "default": 50 }, { "type": "range", "id": "padding_bottom", "min": 0, "max": 100, - "step": 4, + "step": 2, "unit": "px", - "label": "t:sections.all.padding.padding_bottom", - "default": 36 + "label": "t:general.padding.bottom.label", + "default": 50 + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "default": false, + "label": "t:general.divider.show_divider.label" + }, + { + "type": "select", + "id": "divider_width", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed", + "label": "t:general.divider.width.label" + } + ], + "blocks": [ + { + "type": "custom_field", + "name": "t:sections.contact-form.blocks.custom_field.name", + "settings": [ + { + "type": "paragraph", + "content": "t:sections.contact-form.blocks.custom_field.paragraph" + }, + { + "type": "select", + "id": "field_type", + "label": "t:sections.contact-form.blocks.custom_field.settings.field_type.label", + "default": "text", + "info": "t:sections.contact-form.blocks.custom_field.settings.field_type.info", + "options": [ + { + "value": "text", + "label": "t:general.form.text.name" + }, + { + "value": "textarea", + "label": "t:general.form.textarea.name" + }, + { + "value": "phone", + "label": "t:general.form.phone.name" + }, + { + "value": "select", + "label": "t:general.form.select.name" + }, + { + "value": "checkbox", + "label": "t:general.form.checkbox.name" + }, + { + "value": "radio", + "label": "t:general.form.radio.name" + } + ] + }, + { + "type": "text", + "id": "heading", + "label": "t:general.form.label.label" + }, + { + "type": "text", + "id": "placeholder", + "label": "t:general.form.placeholder.label" + }, + { + "type": "checkbox", + "id": "required", + "label": "t:general.form.required.label", + "default": false + }, + { + "type": "checkbox", + "id": "full_width", + "label": "t:sections.contact-form.blocks.custom_field.settings.full_width.label", + "default": false + }, + { + "type": "header", + "content": "t:sections.contact-form.blocks.custom_field.select_header.content", + "info": "t:sections.contact-form.blocks.custom_field.select_header.info" + }, + { + "type": "text", + "id": "select_options", + "label": "t:sections.contact-form.blocks.custom_field.settings.select_options.label", + "info": "t:sections.contact-form.blocks.custom_field.settings.select_options.info" + }, + { + "type": "header", + "content": "t:sections.contact-form.blocks.custom_field.checkbox_header.content", + "info": "t:sections.contact-form.blocks.custom_field.checkbox_header.info" + }, + { + "type": "text", + "id": "checkbox_checked_value", + "label": "t:sections.contact-form.blocks.custom_field.settings.checkbox_checked_value.label", + "default": "Yes" + }, + { + "type": "text", + "id": "checkbox_uncheck_value", + "label": "t:sections.contact-form.blocks.custom_field.settings.checkbox_uncheck_value.label", + "default": "No" + }, + { + "type": "header", + "content": "t:sections.contact-form.blocks.custom_field.radio_header.content", + "info": "t:sections.contact-form.blocks.custom_field.radio_header.info" + }, + { + "type": "text", + "id": "radio_options", + "label": "t:sections.contact-form.blocks.custom_field.settings.radio_options.label", + "info": "t:sections.contact-form.blocks.custom_field.settings.radio_options.info" + } + ] + }, + { + "type": "sidebar", + "name": "t:general.help_sidebar.name", + "limit": 1, + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "select", + "id": "position", + "label": "t:general.help_sidebar.position.label", + "options": [ + { + "value": "right", + "label": "t:general.content_alignment.options__3.label" + }, + { + "value": "left", + "label": "t:general.content_alignment.options__1.label" + } + ], + "default": "right" + }, + { + "type": "header", + "content": "t:general.content.label" + }, + { + "type": "inline_richtext", + "id": "heading", + "default": "Sidebar", + "label": "t:general.heading.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h2", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "richtext", + "id": "text", + "label": "t:general.text.label" + }, + { + "type": "select", + "id": "text_size", + "label": "t:general.text_size.text.label", + "default": "text-base", + "options": [ + { + "value": "text-sm", + "label": "t:general.text_size.options__small.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-lg", + "label": "t:general.text_size.options__large.label" + }, + { + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] + }, + { + "type": "header", + "content": "t:general.help_sidebar.header__item_1.content" + }, + { + "type": "select", + "id": "icon_1", + "label": "t:general.icon.label", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" + }, + { + "value": "car-simple", + "label": "t:general.icon.options__2.label" + }, + { + "value": "truck", + "label": "t:general.icon.options__3.label" + }, + { + "value": "package", + "label": "t:general.icon.options__4.label" + }, + { + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" + }, + { + "value": "gift", + "label": "t:general.icon.options__6.label" + }, + { + "value": "heart", + "label": "t:general.icon.options__7.label" + }, + { + "value": "globe", + "label": "t:general.icon.options__8.label" + }, + { + "value": "check", + "label": "t:general.icon.options__9.label" + }, + { + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" + }, + { + "value": "lightning", + "label": "t:general.icon.options__11.label" + }, + { + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" + }, + { + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" + }, + { + "value": "location", + "label": "t:general.icon.options__14.label" + }, + { + "value": "tag", + "label": "t:general.icon.options__15.label" + }, + { + "value": "map-pin", + "label": "t:general.icon.options__16.label" + }, + { + "value": "smiley", + "label": "t:general.icon.options__17.label" + }, + { + "value": "stool", + "label": "t:general.icon.options__18.label" + }, + { + "value": "clock", + "label": "t:general.icon.options__19.label" + }, + { + "value": "phone", + "label": "t:general.icon.options__20.label" + }, + { + "value": "chat", + "label": "t:general.icon.options__21.label" + }, + { + "value": "paperplane", + "label": "t:general.icon.options__22.label" + } + ], + "default": "heart" + }, + { + "type": "image_picker", + "id": "icon_custom_1", + "label": "t:general.custom_image.label" + }, + { + "type": "range", + "id": "icon_width_1", + "label": "t:general.help_sidebar.icon_width.label", + "min": 10, + "max": 50, + "step": 2, + "unit": "px", + "default": 24 + }, + { + "type": "color", + "id": "icon_color_1", + "label": "t:general.help_sidebar.icon_color.label", + "default": "#000000" + }, + { + "type": "text", + "id": "icon_heading_1", + "label": "t:general.heading.label", + "default": "Icon with text" + }, + { + "type": "select", + "id": "icon_heading_size_1", + "label": "t:general.text_size.heading.label", + "default": "h5", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "richtext", + "id": "icon_text_1", + "label": "t:general.text.label" + }, + { + "type": "select", + "id": "icon_vertical_alignment_1", + "label": "t:general.vertical_alignment.label", + "default": "start", + "options": [ + { + "value": "start", + "label": "t:general.vertical_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.vertical_alignment.options__2.label" + }, + { + "value": "end", + "label": "t:general.vertical_alignment.options__3.label" + } + ] + }, + { + "type": "header", + "content": "t:general.help_sidebar.header__item_2.content" + }, + { + "type": "select", + "id": "icon_2", + "label": "t:general.icon.label", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" + }, + { + "value": "car-simple", + "label": "t:general.icon.options__2.label" + }, + { + "value": "truck", + "label": "t:general.icon.options__3.label" + }, + { + "value": "package", + "label": "t:general.icon.options__4.label" + }, + { + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" + }, + { + "value": "gift", + "label": "t:general.icon.options__6.label" + }, + { + "value": "heart", + "label": "t:general.icon.options__7.label" + }, + { + "value": "globe", + "label": "t:general.icon.options__8.label" + }, + { + "value": "check", + "label": "t:general.icon.options__9.label" + }, + { + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" + }, + { + "value": "lightning", + "label": "t:general.icon.options__11.label" + }, + { + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" + }, + { + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" + }, + { + "value": "location", + "label": "t:general.icon.options__14.label" + }, + { + "value": "tag", + "label": "t:general.icon.options__15.label" + }, + { + "value": "map-pin", + "label": "t:general.icon.options__16.label" + }, + { + "value": "smiley", + "label": "t:general.icon.options__17.label" + }, + { + "value": "stool", + "label": "t:general.icon.options__18.label" + }, + { + "value": "clock", + "label": "t:general.icon.options__19.label" + }, + { + "value": "phone", + "label": "t:general.icon.options__20.label" + }, + { + "value": "chat", + "label": "t:general.icon.options__21.label" + }, + { + "value": "paperplane", + "label": "t:general.icon.options__22.label" + } + ], + "default": "heart" + }, + { + "type": "image_picker", + "id": "icon_custom_2", + "label": "t:general.custom_image.label" + }, + { + "type": "range", + "id": "icon_width_2", + "label": "t:general.help_sidebar.icon_width.label", + "min": 10, + "max": 50, + "step": 2, + "unit": "px", + "default": 24 + }, + { + "type": "color", + "id": "icon_color_2", + "label": "t:general.help_sidebar.icon_color.label", + "default": "#000000" + }, + { + "type": "text", + "id": "icon_heading_2", + "label": "t:general.heading.label", + "default": "Icon with text" + }, + { + "type": "select", + "id": "icon_heading_size_2", + "label": "t:general.text_size.heading.label", + "default": "h5", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "richtext", + "id": "icon_text_2", + "label": "t:general.text.label" + }, + { + "type": "select", + "id": "icon_vertical_alignment_2", + "label": "t:general.vertical_alignment.label", + "default": "start", + "options": [ + { + "value": "start", + "label": "t:general.vertical_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.vertical_alignment.options__2.label" + }, + { + "value": "end", + "label": "t:general.vertical_alignment.options__3.label" + } + ] + }, + { + "type": "header", + "content": "t:general.help_sidebar.header__item_3.content" + }, + { + "type": "select", + "id": "icon_3", + "label": "t:general.icon.label", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" + }, + { + "value": "car-simple", + "label": "t:general.icon.options__2.label" + }, + { + "value": "truck", + "label": "t:general.icon.options__3.label" + }, + { + "value": "package", + "label": "t:general.icon.options__4.label" + }, + { + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" + }, + { + "value": "gift", + "label": "t:general.icon.options__6.label" + }, + { + "value": "heart", + "label": "t:general.icon.options__7.label" + }, + { + "value": "globe", + "label": "t:general.icon.options__8.label" + }, + { + "value": "check", + "label": "t:general.icon.options__9.label" + }, + { + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" + }, + { + "value": "lightning", + "label": "t:general.icon.options__11.label" + }, + { + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" + }, + { + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" + }, + { + "value": "location", + "label": "t:general.icon.options__14.label" + }, + { + "value": "tag", + "label": "t:general.icon.options__15.label" + }, + { + "value": "map-pin", + "label": "t:general.icon.options__16.label" + }, + { + "value": "smiley", + "label": "t:general.icon.options__17.label" + }, + { + "value": "stool", + "label": "t:general.icon.options__18.label" + }, + { + "value": "clock", + "label": "t:general.icon.options__19.label" + }, + { + "value": "phone", + "label": "t:general.icon.options__20.label" + }, + { + "value": "chat", + "label": "t:general.icon.options__21.label" + }, + { + "value": "paperplane", + "label": "t:general.icon.options__22.label" + } + ], + "default": "heart" + }, + { + "type": "image_picker", + "id": "icon_custom_3", + "label": "t:general.custom_image.label" + }, + { + "type": "range", + "id": "icon_width_3", + "label": "t:general.help_sidebar.icon_width.label", + "min": 10, + "max": 50, + "step": 2, + "unit": "px", + "default": 24 + }, + { + "type": "color", + "id": "icon_color_3", + "label": "t:general.help_sidebar.icon_color.label", + "default": "#000000" + }, + { + "type": "text", + "id": "icon_heading_3", + "label": "t:general.heading.label", + "default": "Icon with text" + }, + { + "type": "select", + "id": "icon_heading_size_3", + "label": "t:general.text_size.heading.label", + "default": "h5", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "richtext", + "id": "icon_text_3", + "label": "t:general.text.label" + }, + { + "type": "select", + "id": "icon_vertical_alignment_3", + "label": "t:general.vertical_alignment.label", + "default": "start", + "options": [ + { + "value": "start", + "label": "t:general.vertical_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.vertical_alignment.options__2.label" + }, + { + "value": "end", + "label": "t:general.vertical_alignment.options__3.label" + } + ] + }, + { + "type": "header", + "content": "t:general.button.header.content" + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label", + "default": "Button label" + }, + { + "type": "url", + "id": "button_link", + "label": "t:general.button.button_link.label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--primary" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + } + ] } ], "presets": [ { - "name": "t:sections.contact-form.presets.name" + "name": "t:sections.contact-form.name", + "blocks": [ + { + "type": "custom_field", + "settings": { + "field_type": "phone", + "full_width": true, + "heading": "Phone" + } + } + ] } ] } diff --git a/sections/countdown-timer.liquid b/sections/countdown-timer.liquid new file mode 100644 index 00000000000..981be4121fd --- /dev/null +++ b/sections/countdown-timer.liquid @@ -0,0 +1,845 @@ +{{ 'section-countdown-timer.css' | asset_url | stylesheet_tag }} +{%- liquid + assign container = section.settings.container + assign content_alignment = section.settings.content_alignment + assign text_alignment = section.settings.text_alignment + assign background_image = section.settings.background_image + assign image_overlay_opacity = section.settings.image_overlay_opacity + + assign loading = 'lazy' + assign fetchpriority = 'low' + if section.index < 2 + assign loading = 'eager' + assign fetchpriority = 'high' + endif + + assign image_blocks = section.blocks | where: 'type', 'image' + + assign motion_delay = 0 +-%} + +
    +
    +
    + {%- if background_image != blank -%} +
    + {%- liquid + assign image_height = background_image.width | divided_by: background_image.aspect_ratio + -%} + {{ + background_image + | image_url: width: background_image.width + | image_tag: + loading: loading, + fetchpriority: fetchpriority, + width: background_image.width, + height: image_height, + sizes: '100vw', + widths: '375, 550, 750, 1100, 1500, 1780, 2000, 3000, 3840', + is: 'image-lazy', + alt: background_image.alt + | escape + }} +
    + {%- endif -%} + {%- if image_overlay_opacity > 0 -%} +
    + {%- endif -%} + {%- if image_blocks.size > 0 -%} +
    + + {%- for block in section.blocks -%} + {%- if block.type == 'image' -%} + {%- liquid + assign block_image = block.settings.image + assign block_image_mobile = block.settings.image_mobile + + if block_image == blank + assign image_ratio = '1/1' + else + assign image_ratio = block_image.aspect_ratio + endif + + if block_image_mobile == blank + assign image_mobile_ratio = image_ratio + else + assign image_mobile_ratio = block_image_mobile.aspect_ratio + endif + + assign image_width = block.settings.image_width | append: 'px' + assign vertical = block.settings.image_desktop_vertical | append: '%' + assign horizontal = block.settings.image_desktop_horizontal | append: '%' + -%} +
    + + + {%- if block_image != blank -%} + {%- if block_image_mobile -%} + + {%- endif -%} + {% assign alt_image = block_image.alt | escape %} + {{ + block_image + | image_url: width: 1100 + | image_tag: + loading: 'lazy', + class: 'motion-reduce', + sizes: image_width, + widths: '165, 360, 535, 750, 940, 1100', + is: 'image-lazy', + class: 'absolute inset-0 w-full h-full', + alt: alt_image + }} + {%- else -%} + {{ 'image' | placeholder_svg_tag: 'placeholder-svg' }} + {%- endif -%} + + +
    + {%- endif -%} + {%- endfor -%} +
    +
    + {%- endif -%} +
    +
    + {%- for block in section.blocks -%} + {%- case block.type -%} + {%- when 'heading' -%} +

    + + {% render 'highlight-text', + hl_text: block.settings.heading, + hl_style: block.settings.highlight_style, + hl_font_style: block.settings.highlight_font_style, + hl_style_color: block.settings.highlight_style_color, + hl_text_color: block.settings.highlight_text_color + %} + + {%- assign motion_delay = motion_delay | plus: 50 -%} +

    + {%- when 'subheading' -%} + + {{ block.settings.subheading }} + + {%- assign motion_delay = motion_delay | plus: 50 -%} + {%- when 'text' -%} + + {{ block.settings.text }} + + {%- assign motion_delay = motion_delay | plus: 50 -%} + {%- when 'button' -%} + {%- if block.settings.button_label != blank -%} + + {% render 'button', + button_style: block.settings.button_style, + button_link: block.settings.button_link, + button_label: block.settings.button_label, + button_icon: block.settings.button_icon + %} + + {%- assign motion_delay = motion_delay | plus: 50 -%} + {%- endif -%} + {%- when 'timer' -%} + {%- if block.settings.type == 'evergreen' or block.settings.time != blank -%} + + {% render 'countdown-timer', + id: block.id, + type: block.settings.type, + duration: block.settings.duration, + time: block.settings.time, + style: block.settings.style, + number_size: block.settings.number_size, + motion_delay: motion_delay, + custom_class: 'block' + %} + + {%- assign motion_delay = motion_delay | plus: 50 -%} + {%- endif -%} + {%- endcase -%} + {%- endfor -%} +
    +
    +
    +
    +
    +{% schema %} +{ + "name": "t:sections.countdown-timer.name", + "disabled_on": { + "groups": ["header", "footer", "custom.overlay"] + }, + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "select", + "id": "container", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "full", + "label": "t:general.container.label" + }, + { + "type": "color_scheme", + "id": "color_schema", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "image_picker", + "id": "background_image", + "label": "t:general.background_image.label" + }, + { + "type": "range", + "id": "image_overlay_opacity", + "min": 0, + "max": 100, + "step": 10, + "unit": "%", + "label": "t:general.image_overlay_opacity.label", + "default": 0 + }, + { + "type": "header", + "content": "t:general.header__content_settings.content" + }, + { + "type": "select", + "id": "content_alignment", + "options": [ + { + "value": "start", + "label": "t:general.content_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.content_alignment.options__2.label" + }, + { + "value": "end", + "label": "t:general.content_alignment.options__3.label" + } + ], + "default": "center", + "label": "t:general.content_alignment.label" + }, + { + "type": "select", + "id": "text_alignment", + "options": [ + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ], + "default": "center", + "label": "t:general.text_alignment.label" + }, + { + "type": "header", + "content": "t:general.padding.section_heading.content" + }, + { + "type": "range", + "id": "padding_top", + "label": "t:general.padding.top.label", + "default": 50, + "min": 0, + "max": 200, + "step": 2, + "unit": "px" + }, + { + "type": "range", + "id": "padding_bottom", + "label": "t:general.padding.bottom.label", + "default": 50, + "min": 0, + "max": 200, + "step": 2, + "unit": "px" + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "default": false, + "label": "t:general.divider.show_divider.label" + }, + { + "type": "select", + "id": "divider_width", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed", + "label": "t:general.divider.width.label" + } + ], + "blocks": [ + { + "type": "heading", + "name": "t:general.heading.label", + "limit": 1, + "settings": [ + { + "type": "inline_richtext", + "id": "heading", + "default": "Sale ends in", + "label": "t:general.heading.label", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "hd2", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + } + ] + }, + { + "type": "subheading", + "name": "t:general.subheading.label", + "limit": 1, + "settings": [ + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label", + "default": "Add a tagline" + } + ] + }, + { + "type": "text", + "name": "t:general.text.label", + "limit": 1, + "settings": [ + { + "type": "richtext", + "id": "text", + "default": "

    Insert the time limit or an encouraging messge of your marketing campaign to create a sense of urgency for your customers.

    ", + "label": "t:general.text.label" + }, + { + "type": "select", + "id": "text_size", + "label": "t:general.text_size.text.label", + "default": "text-base", + "options": [ + { + "value": "text-sm", + "label": "t:general.text_size.options__small.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-lg", + "label": "t:general.text_size.options__large.label" + }, + { + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] + } + ] + }, + { + "type": "button", + "name": "t:general.button.label", + "limit": 1, + "settings": [ + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label", + "default": "Button label" + }, + { + "type": "url", + "id": "button_link", + "label": "t:general.button.button_link.label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--primary" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + } + ] + }, + { + "type": "timer", + "name": "t:general.timer.name", + "limit": 1, + "settings": [ + { + "type": "select", + "id": "type", + "label": "t:general.timer.type.label", + "options": [ + { + "value": "evergreen", + "label": "t:general.timer.type.options__1.label" + }, + { + "value": "fixed_time", + "label": "t:general.timer.type.options__2.label" + } + ], + "default": "evergreen" + }, + { + "type": "select", + "id": "style", + "label": "t:general.timer.style.label", + "options": [ + { + "value": "number", + "label": "t:general.timer.style.options__1.label" + }, + { + "value": "with_text", + "label": "t:general.timer.style.options__2.label" + } + ], + "default": "number" + }, + { + "type": "select", + "id": "number_size", + "label": "t:general.timer.number_size.label", + "default": "h1", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "header", + "content": "t:general.timer.header__evergreen.content" + }, + { + "type": "select", + "id": "duration", + "label": "t:general.timer.evergreen_duration.label", + "options": [ + { + "value": "every_2_hrs", + "label": "t:general.timer.evergreen_duration.options__every_2_hrs.label" + }, + { + "value": "every_6_hrs", + "label": "t:general.timer.evergreen_duration.options__every_6_hrs.label" + }, + { + "value": "every_12_hrs", + "label": "t:general.timer.evergreen_duration.options__every_12_hrs.label" + }, + { + "value": "every_24_hrs", + "label": "t:general.timer.evergreen_duration.options__every_24_hrs.label" + }, + { + "value": "every_week", + "label": "t:general.timer.evergreen_duration.options__every_week.label" + }, + { + "value": "every_month", + "label": "t:general.timer.evergreen_duration.options__every_month.label" + } + ], + "default": "every_month" + }, + { + "type": "header", + "content": "t:general.timer.header__fixed_time.content" + }, + { + "type": "text", + "id": "time", + "default": "2025/08/20 03:45 PM", + "label": "t:general.timer.time.label", + "info": "t:general.timer.time.info" + }, + { + "type": "paragraph", + "content": "t:general.timer.time.paragraph" + } + ] + }, + { + "type": "image", + "name": "t:general.image.label", + "limit": 3, + "settings": [ + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label" + }, + { + "type": "range", + "id": "image_width", + "min": 150, + "max": 350, + "step": 2, + "unit": "px", + "label": "t:sections.countdown-timer.blocks.image.settings.image_desktop_width.label", + "default": 150 + }, + { + "type": "range", + "id": "image_desktop_vertical", + "min": 0, + "max": 100, + "step": 1, + "unit": "%", + "label": "t:sections.countdown-timer.blocks.image.settings.image_desktop_vertical.label", + "default": 50 + }, + { + "type": "range", + "id": "image_desktop_horizontal", + "min": 0, + "max": 100, + "step": 1, + "unit": "%", + "label": "t:sections.countdown-timer.blocks.image.settings.image_desktop_horizontal.label", + "default": 50 + }, + { + "type": "image_picker", + "id": "image_mobile", + "label": "t:general.image_mobile.label" + }, + { + "type": "text", + "id": "custom_classes", + "label": "t:general.custom_classes.label" + } + ] + } + ], + "presets": [ + { + "name": "t:sections.countdown-timer.name", + "blocks": [ + { + "type": "heading" + }, + { + "type": "text" + }, + { + "type": "timer" + }, + { + "type": "button" + } + ] + } + ] +} +{% endschema %} diff --git a/sections/custom-content.liquid b/sections/custom-content.liquid new file mode 100644 index 00000000000..c095f2be788 --- /dev/null +++ b/sections/custom-content.liquid @@ -0,0 +1,3224 @@ +{%- liquid + assign enable_sticky_column = section.settings.enable_sticky_column + assign swipe_on_mobile = section.settings.swipe_on_mobile + assign swipe_on_tablet = false + + if section.blocks.size == 3 + assign swipe_on_tablet = true + endif + + if swipe_on_mobile and section.blocks.size > 2 + assign column_size_modulo = section.blocks.size | modulo: 2 + if column_size_modulo > 0 + assign swipe_on_tablet = true + endif + endif +-%} +{% render 'divider', + show_divider: section.settings.show_section_divider, + divider_width: section.settings.divider_width +%} +
    + {% render 'section-heading', section_settings: section.settings %} +
    +
    + {%- for block in section.blocks -%} + {%- liquid + assign vertical_alignment = block.settings.alignment + case block.settings.width + when '16%' + assign block_width = 'w-full md:w-1/2 lg:w-2/12' + when '20%' + assign block_width = 'w-full md:w-1/2 lg:w-1/5' + when '25%' + assign block_width = 'w-full md:w-1/2 lg:w-1/4' + when '33%' + assign block_width = 'w-full md:w-1/2 lg:w-1/3' + when '41%' + assign block_width = 'w-full md:w-1/2 lg:w-5/12' + when '50%' + assign block_width = 'w-full md:w-1/2 lg:w-1/2' + when '58%' + assign block_width = 'w-full md:w-1/2 lg:w-7/12' + when '66%' + assign block_width = 'w-full md:w-1/2 lg:w-8/12' + when '75%' + assign block_width = 'w-full md:w-1/2 lg:w-9/12' + when '80%' + assign block_width = 'w-full md:w-1/2 lg:w-4/5' + when '83%' + assign block_width = 'w-full md:w-1/2 lg:w-10/12' + else + assign block_width = 'w-full' + endcase + -%} +
    +
    + {%- case block.type -%} + {%- when 'text' -%} + {%- assign motion_delay = 50 -%} +
    + {%- if block.settings.subheading != blank -%} + + {{ block.settings.subheading }} + + {%- assign motion_delay = motion_delay | plus: 50 -%} + {%- endif -%} + {%- if block.settings.heading != blank -%} +

    + + {% render 'highlight-text', + hl_text: block.settings.heading, + hl_style: block.settings.highlight_style, + hl_font_style: block.settings.highlight_font_style, + hl_style_color: block.settings.highlight_style_color, + hl_text_color: block.settings.highlight_text_color + %} + +

    + {%- assign motion_delay = motion_delay | plus: 50 -%} + {%- endif -%} + {%- if block.settings.description != blank -%} + + {{ block.settings.description }} + + {%- assign motion_delay = motion_delay | plus: 50 -%} + {%- endif -%} + {%- if block.settings.button_label != blank -%} + + {% render 'button', + button_style: block.settings.button_style, + button_link: block.settings.button_link, + button_label: block.settings.button_label, + button_icon: block.settings.button_icon + %} + + {% endif %} +
    + {%- when 'image' -%} + {%- liquid + assign image = block.settings.image + if image != blank + assign image_ratio = image.aspect_ratio + else + assign image_ratio = '1' + endif + + assign alt = image.alt | default: shop.name | escape + assign loading = 'lazy' + assign fetchpriority = 'low' + if section.index < 2 + assign loading = 'eager' + assign fetchpriority = 'high' + endif + -%} +
    + + {%- if image != blank -%} + {{ + image + | image_url: width: 1500 + | image_tag: + loading: loading, + fetchpriority: fetchpriority, + class: 'motion-reduce', + widths: '375, 550, 750, 1100, 1500, 1780, 2000, 3000, 3840', + is: 'image-lazy', + alt: alt + }} + {%- else -%} + {{ 'image' | placeholder_svg_tag: 'placeholder-svg' }} + {%- endif -%} + +
    + {%- when 'image_card' -%} + {% render 'card-image', + parent_color_scheme: section.settings.color_scheme, + color_scheme: block.settings.color_scheme, + color_scheme_mobile: block.settings.color_scheme_mobile, + link: block.settings.card_link, + image: block.settings.image, + image_ratio: block.settings.image_ratio, + image_overlay_opacity: block.settings.image_overlay_opacity, + image_mobile: block.settings.image_mobile, + heading: block.settings.heading, + highlight_style: block.settings.highlight_style, + highlight_font_style: block.settings.highlight_font_style, + highlight_style_color: block.settings.highlight_style_color, + highlight_text_color: block.settings.highlight_text_color, + heading_size: block.settings.heading_size, + subheading: block.settings.subheading, + subheading_style: block.settings.subheading_style, + description: block.settings.description, + button_label: block.settings.button_label, + button_style: block.settings.button_style, + button_icon: block.settings.button_icon, + rich_text_size: block.settings.content_gap, + content_spacing: block.settings.content_spacing, + content_position: block.settings.content_position, + content_alignment: block.settings.content_alignment, + content_alignment_mobile: block.settings.content_alignment_mobile, + show_text_below: block.settings.show_text_below, + show_badge: block.settings.show_badge, + badge_size: 'medium', + badge_shape: block.settings.badge_shape, + badge_position: block.settings.badge_position, + badge_main_text: block.settings.badge_text, + badge_main_text_size: 'h3', + badge_subtext: block.settings.badge_subtext, + badge_subtext_size: 'h6', + badge_color_scheme: block.settings.badge_color_scheme, + enable_preload_image: block.settings.enable_preload_image, + section_index: section.index, + forloop_index: forloop.index, + heading_size_custom: block.settings.heading_size_custom, + heading_size_mobile: block.settings.heading_size_mobile + %} + {%- when 'image_card_with_product' -%} + {{ 'component-card-img-with-product.css' | asset_url | stylesheet_tag }} + {% render 'card-image-with-product', + color_scheme: block.settings.color_scheme, + image: block.settings.image, + image_ratio: block.settings.image_ratio, + heading: block.settings.heading, + highlight_style: block.settings.highlight_style, + highlight_font_style: block.settings.highlight_font_style, + highlight_style_color: block.settings.highlight_style_color, + highlight_text_color: block.settings.highlight_text_color, + heading_size: block.settings.heading_size, + subheading: block.settings.subheading, + description: block.settings.description, + button_label: block.settings.button_label, + button_style: block.settings.button_style, + button_icon: block.settings.button_icon, + product: block.settings.product + %} + {%- when 'lookbook_card_hotspot' -%} + {{ 'component-lookbook-card.css' | asset_url | stylesheet_tag }} + + {% render 'lookbook-card-hotspot', + block: block, + image: block.settings.image, + image_ratio: block.settings.image_ratio, + icon_style: block.settings.icon_style, + icon_color: block.settings.icon_color + %} + {%- when 'video' -%} + {%- liquid + assign poster = section.settings.video.preview_image | default: section.settings.cover_image + + if block.settings.video_ratio == 'adapt' + if poster != null + assign video_ratio = poster.aspect_ratio + else + assign video_ratio = '16/9' + endif + else + assign video_ratio = block.settings.video_ratio + endif + -%} +
    + {%- render 'video', + video: block.settings.video, + video_url: block.settings.video_url, + muted: block.settings.enable_video_autoplay, + autoplay: block.settings.enable_video_autoplay, + controls: true, + loop: block.settings.enable_video_looping, + description: block.settings.description, + cover_image: block.settings.cover_image, + show_play_button: true + -%} +
    + {%- when 'lookbook_card' -%} + {{ 'component-lookbook-card-modal.css' | asset_url | stylesheet_tag }} + + {% liquid + assign video = block.settings.video + assign image = block.settings.image + assign image_ratio = block.settings.image_ratio | default: '1/1' + if image_ratio == 'adapt' + if video != blank + assign image_ratio = video.aspect_ratio + elsif image != blank + assign image_ratio = image.aspect_ratio + else + assign image_ratio = '1/1' + endif + endif + %} + {% render 'lookbook-card', + block_id: block.id, + product_list: block.settings.product_list, + image_ratio: image_ratio, + pcard_image_ratio: block.settings.pcard_image_ratio, + image: block.settings.image, + video: block.settings.video, + heading: block.settings.heading, + highlight_style: block.settings.highlight_style, + highlight_font_style: block.settings.highlight_font_style, + highlight_style_color: block.settings.highlight_style_color, + highlight_text_color: block.settings.highlight_text_color, + heading_size: block.settings.heading_size + %} + {%- when 'collections' -%} + {{ 'component-collection-item-slider.css' | asset_url | stylesheet_tag }} + +
    + {%- if block.settings.collection_list != blank -%} + {%- for collection in block.settings.collection_list -%} + {%- render 'collection-item-slider', collection: collection, block: block -%} + {% endfor %} + {%- else -%} + {%- render 'collection-item-slider', block: block -%} + {%- endif -%} +
    + {%- endcase -%} +
    +
    + {%- endfor -%} +
    +
    +
    +{% schema %} +{ + "name": "t:sections.custom-content.name", + "disabled_on": { + "groups": ["header", "footer", "custom.overlay"] + }, + "max_blocks": 6, + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "select", + "id": "container", + "options": [ + { + "value": "full", + "label": "t:general.container.options__full.label" + }, + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + } + ], + "default": "fixed", + "label": "t:general.container.label" + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "checkbox", + "id": "enable_sticky_column", + "default": false, + "label": "t:general.enable_sticky_column.label" + }, + { + "type": "header", + "content": "t:general.section_header.content" + }, + { + "id": "section_header_alignment", + "type": "select", + "label": "t:general.text_alignment.label", + "default": "left", + "options": [ + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ] + }, + { + "id": "section_header_alignment_mobile", + "type": "select", + "label": "t:general.text_alignment.mobile.label", + "default": "inherit", + "options": [ + { + "value": "inherit", + "label": "t:general.text_alignment.options__4.label" + }, + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ] + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label" + }, + { + "type": "inline_richtext", + "id": "heading", + "label": "t:general.heading.label", + "default": "Custom content", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h1", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "richtext", + "id": "description", + "label": "t:general.text.label", + "default": "

    Combine images with text and a stand-out offer

    " + }, + { + "type": "select", + "id": "text_size", + "label": "t:general.text_size.text.label", + "default": "text-base", + "options": [ + { + "value": "text-sm", + "label": "t:general.text_size.options__small.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-lg", + "label": "t:general.text_size.options__large.label" + }, + { + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] + }, + { + "type": "header", + "content": "t:general.grid.name" + }, + { + "type": "select", + "id": "column_gap", + "options": [ + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ], + "default": "medium", + "label": "t:general.grid.column_gap.label" + }, + { + "type": "select", + "id": "row_gap", + "options": [ + { + "value": "inherit", + "label": "t:general.grid.gap.options__inherit.label" + }, + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ], + "default": "large", + "label": "t:general.grid.row_gap.label" + }, + { + "type": "header", + "content": "t:general.mobile.name" + }, + { + "type": "checkbox", + "id": "swipe_on_mobile", + "default": false, + "label": "t:general.mobile.swipe_on_mobile.label" + }, + { + "type": "select", + "id": "columns_mobile", + "options": [ + { + "value": "1", + "label": "t:general.mobile.columns_mobile.options__1.label" + }, + { + "value": "2", + "label": "t:general.mobile.columns_mobile.options__2.label" + } + ], + "default": "1", + "label": "t:general.mobile.columns_mobile.label" + }, + { + "type": "header", + "content": "t:general.padding.section_heading.content" + }, + { + "type": "range", + "id": "padding_top", + "label": "t:general.padding.top.label", + "default": 50, + "min": 0, + "max": 100, + "step": 2, + "unit": "px" + }, + { + "type": "range", + "id": "padding_bottom", + "label": "t:general.padding.bottom.label", + "default": 50, + "min": 0, + "max": 100, + "step": 2, + "unit": "px" + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "default": false, + "label": "t:general.divider.show_divider.label" + }, + { + "type": "select", + "id": "divider_width", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed", + "label": "t:general.divider.width.label" + } + ], + "blocks": [ + { + "type": "image_card", + "name": "t:sections.custom-content.blocks.image_card.name", + "settings": [ + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "header", + "content": "t:general.image.content" + }, + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label" + }, + { + "type": "select", + "id": "image_ratio", + "label": "t:general.image_ratio.label", + "default": "adapt", + "options": [ + { + "value": "adapt", + "label": "t:general.image_ratio.options__1.label" + }, + { + "value": "1/1", + "label": "t:general.image_ratio.options__2.label" + }, + { + "value": "3/4", + "label": "t:general.image_ratio.options__3.label" + }, + { + "value": "4/3", + "label": "t:general.image_ratio.options__4.label" + } + ] + }, + { + "type": "range", + "id": "image_overlay_opacity", + "min": 0, + "max": 100, + "step": 2, + "unit": "%", + "label": "t:general.image_overlay_opacity.label", + "default": 0 + }, + { + "type": "header", + "content": "t:general.header__content_settings.content" + }, + { + "type": "select", + "id": "content_position", + "label": "t:general.content_position.label", + "options": [ + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__top_left.label", + "value": "top-left" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__top_center.label", + "value": "top-center" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__top_right.label", + "value": "top-right" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__middle_left.label", + "value": "middle-left" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__middle_center.label", + "value": "middle-center" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__middle_right.label", + "value": "middle-right" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__bottom_left.label", + "value": "bottom-left" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__bottom_center.label", + "value": "bottom-center" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__bottom_right.label", + "value": "bottom-right" + }, + { + "group": "t:general.content_position.optgroup__split.label", + "label": "t:general.content_position.options__middle_content.label", + "value": "split-middle-content" + }, + { + "group": "t:general.content_position.optgroup__split.label", + "label": "t:general.content_position.options__bottom_button.label", + "value": "split-bottom-button" + }, + { + "group": "t:general.content_position.optgroup__split.label", + "label": "t:general.content_position.options__top_subheading.label", + "value": "split-top-subheading" + }, + { + "group": "t:general.content_position.optgroup__below_image.label", + "label": "t:general.content_position.options__below_image.label", + "value": "below" + } + ], + "default": "bottom-center" + }, + { + "type": "select", + "id": "content_alignment", + "label": "t:general.content_alignment.label", + "default": "center", + "options": [ + { + "value": "left", + "label": "t:general.content_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.content_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.content_alignment.options__3.label" + } + ] + }, + { + "type": "select", + "id": "content_spacing", + "label": "t:general.content_spacing.label", + "default": "medium", + "options": [ + { + "value": "extra-small", + "label": "t:general.content_spacing.options__4.label" + }, + { + "value": "small", + "label": "t:general.content_spacing.options__1.label" + }, + { + "value": "medium", + "label": "t:general.content_spacing.options__2.label" + }, + { + "value": "large", + "label": "t:general.content_spacing.options__3.label" + } + ] + }, + { + "type": "select", + "id": "content_gap", + "label": "t:general.content_gap.label", + "default": "fitted", + "options": [ + { + "value": "tight", + "label": "t:general.content_gap.options__xs.label" + }, + { + "value": "fitted", + "label": "t:general.content_gap.options__sm.label" + }, + { + "value": "standard", + "label": "t:general.content_gap.options__md.label" + } + ] + }, + { + "type": "url", + "id": "card_link", + "label": "t:general.card_link.label" + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label" + }, + { + "type": "select", + "id": "subheading_style", + "label": "t:general.subheading_style.label", + "default": "", + "options": [ + { + "value": "", + "label": "t:general.subheading_style.options__1.label" + }, + { + "value": "border", + "label": "t:general.subheading_style.options__2.label" + }, + { + "value": "thick-border", + "label": "t:general.subheading_style.options__3.label" + } + ] + }, + { + "type": "inline_richtext", + "id": "heading", + "label": "t:general.heading.label", + "default": "Image card", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h1", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "select", + "id": "heading_size_mobile", + "label": "t:general.text_size.heading_mobile.label", + "options": [ + { + "value": "inherit", + "label": "t:general.text_size.options__inherit.label" + }, + { + "value": "custom", + "label": "t:general.text_size.options__custom.label" + } + ], + "default": "inherit" + }, + { + "type": "range", + "id": "heading_size_custom", + "label": "t:general.text_size.heading_size_custom.label", + "min": 12, + "max": 100, + "step": 1, + "unit": "px", + "default": 18, + "visible_if": "{{ block.settings.heading_size_mobile == 'custom' }}" + }, + { + "type": "richtext", + "id": "description", + "label": "t:general.text.label" + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label", + "default": "Button label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--primary" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + }, + { + "type": "header", + "content": "t:sections.custom-content.blocks.image_card.settings.header__badge_settings.content" + }, + { + "type": "checkbox", + "id": "show_badge", + "label": "t:sections.custom-content.blocks.image_card.settings.show_badge.label", + "default": false + }, + { + "type": "color_scheme", + "id": "badge_color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "select", + "id": "badge_shape", + "label": "t:sections.custom-content.blocks.image_card.settings.badge_shape.label", + "default": "circle", + "options": [ + { + "value": "circle", + "label": "t:sections.custom-content.blocks.image_card.settings.badge_shape.options__1.label" + }, + { + "value": "square", + "label": "t:sections.custom-content.blocks.image_card.settings.badge_shape.options__2.label" + } + ] + }, + { + "type": "select", + "id": "badge_position", + "label": "t:sections.custom-content.blocks.image_card.settings.badge_position.label", + "default": "top-right", + "options": [ + { + "value": "top-right", + "label": "t:general.content_position.options__top_right.label" + }, + { + "value": "top-left", + "label": "t:general.content_position.options__top_left.label" + }, + { + "value": "bottom-right", + "label": "t:general.content_position.options__bottom_right.label" + }, + { + "value": "bottom-left", + "label": "t:general.content_position.options__bottom_left.label" + } + ] + }, + { + "type": "inline_richtext", + "id": "badge_subtext", + "label": "t:general.subtext.label", + "default": "Save" + }, + { + "type": "inline_richtext", + "id": "badge_text", + "label": "t:general.text.label", + "default": "99$" + }, + { + "type": "header", + "content": "t:general.header__mobile_settings.content" + }, + { + "type": "color_scheme", + "id": "color_scheme_mobile", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "image_picker", + "id": "image_mobile", + "label": "t:general.image.label" + }, + { + "type": "checkbox", + "id": "show_text_below", + "default": false, + "label": "t:sections.custom-content.blocks.image_card.settings.show_text_below.label" + }, + { + "type": "select", + "id": "content_alignment_mobile", + "label": "t:general.content_alignment.label", + "default": "center", + "options": [ + { + "value": "left", + "label": "t:general.content_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.content_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.content_alignment.options__3.label" + } + ] + }, + { + "type": "header", + "content": "t:general.header__block_settings.content" + }, + { + "type": "select", + "id": "width", + "label": "t:general.block_width.label", + "options": [ + { + "value": "16%", + "label": "t:general.block_width.options__16p.label" + }, + { + "value": "20%", + "label": "t:general.block_width.options__20p.label" + }, + { + "value": "25%", + "label": "t:general.block_width.options__25p.label" + }, + { + "value": "33%", + "label": "t:general.block_width.options__33p.label" + }, + { + "value": "41%", + "label": "t:general.block_width.options__41p.label" + }, + { + "value": "50%", + "label": "t:general.block_width.options__50p.label" + }, + { + "value": "58%", + "label": "t:general.block_width.options__58p.label" + }, + { + "value": "66%", + "label": "t:general.block_width.options__66p.label" + }, + { + "value": "75%", + "label": "t:general.block_width.options__75p.label" + }, + { + "value": "80%", + "label": "t:general.block_width.options__80p.label" + }, + { + "value": "83%", + "label": "t:general.block_width.options__83p.label" + }, + { + "value": "100%", + "label": "t:general.block_width.options__100p.label" + } + ], + "default": "50%" + }, + { + "type": "select", + "id": "alignment", + "label": "t:general.vertical_alignment.label", + "default": "center", + "options": [ + { + "value": "start", + "label": "t:general.vertical_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.vertical_alignment.options__2.label" + }, + { + "value": "end", + "label": "t:general.vertical_alignment.options__3.label" + } + ] + }, + { + "type": "header", + "content": "t:general.custom_attr.header" + }, + { + "type": "text", + "id": "block_custom_class", + "label": "t:general.custom_attr.custom_class" + }, + { + "type": "header", + "content": "t:general.header__advanced.content" + }, + { + "type": "checkbox", + "id": "enable_preload_image", + "label": "t:general.enable_preload_image.label", + "info": "t:general.enable_preload_image.info" + } + ] + }, + { + "type": "video", + "name": "t:general.video.name", + "settings": [ + { + "type": "header", + "content": "t:general.video.header__hosted_video.content" + }, + { + "type": "video", + "label": "t:general.video.label", + "id": "video" + }, + { + "type": "header", + "content": "t:general.video.header__external_video.content", + "info": "t:general.video.header__external_video.info" + }, + { + "type": "video_url", + "id": "video_url", + "accept": ["vimeo", "youtube"], + "default": "https://www.youtube.com/watch?v=_9VUPq3SxOc", + "label": "t:general.video.video_url.label", + "info": "t:general.video.video_url.info" + }, + { + "type": "image_picker", + "id": "cover_image", + "label": "t:general.video.cover_image.label" + }, + { + "type": "select", + "id": "video_ratio", + "label": "t:general.video.video_ratio.label", + "options": [ + { + "value": "adapt", + "label": "t:general.video.video_ratio.options__1.label" + }, + { + "value": "1/1", + "label": "t:general.video.video_ratio.options__2.label" + }, + { + "value": "4/3", + "label": "t:general.video.video_ratio.options__3.label" + }, + { + "value": "4/5", + "label": "t:general.video.video_ratio.options__4.label" + }, + { + "value": "16/9", + "label": "t:general.video.video_ratio.options__5.label" + }, + { + "value": "9/16", + "label": "t:general.video.video_ratio.options__6.label" + } + ], + "default": "adapt" + }, + { + "type": "text", + "id": "description", + "label": "t:general.video.description.label", + "info": "t:general.video.description.info" + }, + { + "type": "checkbox", + "id": "enable_video_autoplay", + "label": "t:general.video.enable_video_autoplay.label", + "info": "t:general.video.enable_video_autoplay.info", + "default": false + }, + { + "type": "checkbox", + "id": "enable_video_looping", + "label": "t:general.video.enable_video_looping.label", + "default": false + }, + { + "type": "header", + "content": "t:general.header__block_settings.content" + }, + { + "type": "select", + "id": "width", + "label": "t:general.block_width.label", + "options": [ + { + "value": "16%", + "label": "t:general.block_width.options__16p.label" + }, + { + "value": "20%", + "label": "t:general.block_width.options__20p.label" + }, + { + "value": "25%", + "label": "t:general.block_width.options__25p.label" + }, + { + "value": "33%", + "label": "t:general.block_width.options__33p.label" + }, + { + "value": "41%", + "label": "t:general.block_width.options__41p.label" + }, + { + "value": "50%", + "label": "t:general.block_width.options__50p.label" + }, + { + "value": "58%", + "label": "t:general.block_width.options__58p.label" + }, + { + "value": "66%", + "label": "t:general.block_width.options__66p.label" + }, + { + "value": "75%", + "label": "t:general.block_width.options__75p.label" + }, + { + "value": "80%", + "label": "t:general.block_width.options__80p.label" + }, + { + "value": "83%", + "label": "t:general.block_width.options__83p.label" + }, + { + "value": "100%", + "label": "t:general.block_width.options__100p.label" + } + ], + "default": "50%" + }, + { + "type": "select", + "id": "alignment", + "label": "t:general.vertical_alignment.label", + "default": "center", + "options": [ + { + "value": "start", + "label": "t:general.vertical_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.vertical_alignment.options__2.label" + }, + { + "value": "end", + "label": "t:general.vertical_alignment.options__3.label" + } + ] + }, + { + "type": "header", + "content": "t:general.custom_attr.header" + }, + { + "type": "text", + "id": "block_custom_class", + "label": "t:general.custom_attr.custom_class" + } + ] + }, + { + "type": "image", + "name": "t:general.image.name", + "settings": [ + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label" + }, + { + "type": "header", + "content": "t:general.header__block_settings.content" + }, + { + "type": "select", + "id": "width", + "label": "t:general.block_width.label", + "options": [ + { + "value": "16%", + "label": "t:general.block_width.options__16p.label" + }, + { + "value": "20%", + "label": "t:general.block_width.options__20p.label" + }, + { + "value": "25%", + "label": "t:general.block_width.options__25p.label" + }, + { + "value": "33%", + "label": "t:general.block_width.options__33p.label" + }, + { + "value": "41%", + "label": "t:general.block_width.options__41p.label" + }, + { + "value": "50%", + "label": "t:general.block_width.options__50p.label" + }, + { + "value": "58%", + "label": "t:general.block_width.options__58p.label" + }, + { + "value": "66%", + "label": "t:general.block_width.options__66p.label" + }, + { + "value": "75%", + "label": "t:general.block_width.options__75p.label" + }, + { + "value": "80%", + "label": "t:general.block_width.options__80p.label" + }, + { + "value": "83%", + "label": "t:general.block_width.options__83p.label" + }, + { + "value": "100%", + "label": "t:general.block_width.options__100p.label" + } + ], + "default": "50%" + }, + { + "type": "select", + "id": "alignment", + "label": "t:general.vertical_alignment.label", + "default": "center", + "options": [ + { + "value": "start", + "label": "t:general.vertical_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.vertical_alignment.options__2.label" + }, + { + "value": "end", + "label": "t:general.vertical_alignment.options__3.label" + } + ] + }, + { + "type": "header", + "content": "t:general.custom_attr.header" + }, + { + "type": "text", + "id": "block_custom_class", + "label": "t:general.custom_attr.custom_class" + } + ] + }, + { + "type": "text", + "name": "t:general.text.label", + "settings": [ + { + "type": "select", + "id": "content_alignment", + "label": "t:general.content_alignment.label", + "default": "left", + "options": [ + { + "value": "left", + "label": "t:general.content_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.content_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.content_alignment.options__3.label" + } + ] + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label" + }, + { + "type": "inline_richtext", + "id": "heading", + "label": "t:general.heading.label", + "default": "Talk about your brand", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h1", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "richtext", + "id": "description", + "label": "t:general.text.label", + "default": "

    Use this text to share information about your brand with your customers. Describe a product, share announcements, or welcome customers to your store.

    " + }, + { + "type": "select", + "id": "text_size", + "label": "t:general.text_size.text.label", + "default": "text-base", + "options": [ + { + "value": "text-sm", + "label": "t:general.text_size.options__small.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-lg", + "label": "t:general.text_size.options__large.label" + }, + { + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label", + "default": "Button label" + }, + { + "type": "url", + "id": "button_link", + "label": "t:general.button.button_link.label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--primary" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + }, + { + "type": "header", + "content": "t:general.header__block_settings.content" + }, + { + "type": "select", + "id": "width", + "label": "t:general.block_width.label", + "options": [ + { + "value": "16%", + "label": "t:general.block_width.options__16p.label" + }, + { + "value": "20%", + "label": "t:general.block_width.options__20p.label" + }, + { + "value": "25%", + "label": "t:general.block_width.options__25p.label" + }, + { + "value": "33%", + "label": "t:general.block_width.options__33p.label" + }, + { + "value": "41%", + "label": "t:general.block_width.options__41p.label" + }, + { + "value": "50%", + "label": "t:general.block_width.options__50p.label" + }, + { + "value": "58%", + "label": "t:general.block_width.options__58p.label" + }, + { + "value": "66%", + "label": "t:general.block_width.options__66p.label" + }, + { + "value": "75%", + "label": "t:general.block_width.options__75p.label" + }, + { + "value": "80%", + "label": "t:general.block_width.options__80p.label" + }, + { + "value": "83%", + "label": "t:general.block_width.options__83p.label" + }, + { + "value": "100%", + "label": "t:general.block_width.options__100p.label" + } + ], + "default": "50%" + }, + { + "type": "select", + "id": "alignment", + "label": "t:general.vertical_alignment.label", + "default": "center", + "options": [ + { + "value": "start", + "label": "t:general.vertical_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.vertical_alignment.options__2.label" + }, + { + "value": "end", + "label": "t:general.vertical_alignment.options__3.label" + } + ] + }, + { + "type": "header", + "content": "t:general.custom_attr.header" + }, + { + "type": "text", + "id": "block_custom_class", + "label": "t:general.custom_attr.custom_class" + } + ] + }, + { + "type": "lookbook_card", + "name": "t:sections.custom-content.blocks.lookbook_card.name", + "settings": [ + { + "type": "header", + "content": "Products" + }, + { + "type": "product_list", + "id": "product_list", + "limit": 5, + "label": "t:general.products.label" + }, + { + "type": "select", + "id": "pcard_image_ratio", + "label": "t:general.image_ratio.label", + "default": "", + "options": [ + { + "value": "", + "label": "t:general.image_ratio.options__inherit.label" + }, + { + "value": "adapt", + "label": "t:general.image_ratio.options__1.label" + }, + { + "value": "1/1", + "label": "t:general.image_ratio.options__2.label" + }, + { + "value": "3/4", + "label": "t:general.image_ratio.options__3.label" + }, + { + "value": "4/3", + "label": "t:general.image_ratio.options__4.label" + } + ] + }, + { + "type": "header", + "content": "Image" + }, + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label" + }, + { + "type": "video", + "label": "t:general.video.label", + "id": "video" + }, + { + "type": "select", + "id": "image_ratio", + "label": "t:general.image_ratio.label", + "default": "adapt", + "options": [ + { + "value": "adapt", + "label": "t:general.image_ratio.options__1.label" + }, + { + "value": "1/1", + "label": "t:general.image_ratio.options__2.label" + }, + { + "value": "3/4", + "label": "t:general.image_ratio.options__3.label" + }, + { + "value": "4/3", + "label": "t:general.image_ratio.options__4.label" + } + ] + }, + { + "type": "header", + "content": "Heading" + }, + { + "type": "inline_richtext", + "id": "heading", + "label": "t:general.heading.label", + "default": "Shop this look", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h5", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "header", + "content": "t:general.header__block_settings.content" + }, + { + "type": "select", + "id": "width", + "label": "t:general.block_width.label", + "options": [ + { + "value": "16%", + "label": "t:general.block_width.options__16p.label" + }, + { + "value": "20%", + "label": "t:general.block_width.options__20p.label" + }, + { + "value": "25%", + "label": "t:general.block_width.options__25p.label" + }, + { + "value": "33%", + "label": "t:general.block_width.options__33p.label" + }, + { + "value": "41%", + "label": "t:general.block_width.options__41p.label" + }, + { + "value": "50%", + "label": "t:general.block_width.options__50p.label" + }, + { + "value": "58%", + "label": "t:general.block_width.options__58p.label" + }, + { + "value": "66%", + "label": "t:general.block_width.options__66p.label" + }, + { + "value": "75%", + "label": "t:general.block_width.options__75p.label" + }, + { + "value": "80%", + "label": "t:general.block_width.options__80p.label" + }, + { + "value": "83%", + "label": "t:general.block_width.options__83p.label" + }, + { + "value": "100%", + "label": "t:general.block_width.options__100p.label" + } + ], + "default": "50%" + }, + { + "type": "select", + "id": "alignment", + "label": "t:general.vertical_alignment.label", + "default": "center", + "options": [ + { + "value": "start", + "label": "t:general.vertical_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.vertical_alignment.options__2.label" + }, + { + "value": "end", + "label": "t:general.vertical_alignment.options__3.label" + } + ] + }, + { + "type": "header", + "content": "t:general.custom_attr.header" + }, + { + "type": "text", + "id": "block_custom_class", + "label": "t:general.custom_attr.custom_class" + } + ] + }, + { + "type": "image_card_with_product", + "name": "t:sections.custom-content.blocks.image_card_with_product.name", + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "header", + "content": "t:general.image.content" + }, + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label" + }, + { + "type": "select", + "id": "image_ratio", + "label": "t:general.image_ratio.label", + "default": "adapt", + "options": [ + { + "value": "adapt", + "label": "t:general.image_ratio.options__1.label" + }, + { + "value": "1/1", + "label": "t:general.image_ratio.options__2.label" + }, + { + "value": "3/4", + "label": "t:general.image_ratio.options__3.label" + }, + { + "value": "4/3", + "label": "t:general.image_ratio.options__4.label" + } + ] + }, + { + "type": "header", + "content": "t:general.content.label" + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label" + }, + { + "type": "inline_richtext", + "id": "heading", + "label": "t:general.heading.label", + "default": "Card Heading", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h1", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "richtext", + "id": "description", + "label": "t:general.text.label" + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label", + "default": "Button label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--secondary" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + }, + { + "type": "header", + "content": "t:general.product.label" + }, + { + "type": "product", + "id": "product", + "label": "t:general.product.label" + }, + { + "type": "header", + "content": "t:general.header__block_settings.content" + }, + { + "type": "select", + "id": "width", + "label": "t:general.block_width.label", + "options": [ + { + "value": "16%", + "label": "t:general.block_width.options__16p.label" + }, + { + "value": "20%", + "label": "t:general.block_width.options__20p.label" + }, + { + "value": "25%", + "label": "t:general.block_width.options__25p.label" + }, + { + "value": "33%", + "label": "t:general.block_width.options__33p.label" + }, + { + "value": "41%", + "label": "t:general.block_width.options__41p.label" + }, + { + "value": "50%", + "label": "t:general.block_width.options__50p.label" + }, + { + "value": "58%", + "label": "t:general.block_width.options__58p.label" + }, + { + "value": "66%", + "label": "t:general.block_width.options__66p.label" + }, + { + "value": "75%", + "label": "t:general.block_width.options__75p.label" + }, + { + "value": "80%", + "label": "t:general.block_width.options__80p.label" + }, + { + "value": "83%", + "label": "t:general.block_width.options__83p.label" + }, + { + "value": "100%", + "label": "t:general.block_width.options__100p.label" + } + ], + "default": "50%" + }, + { + "type": "select", + "id": "alignment", + "label": "t:general.vertical_alignment.label", + "default": "center", + "options": [ + { + "value": "start", + "label": "t:general.vertical_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.vertical_alignment.options__2.label" + }, + { + "value": "end", + "label": "t:general.vertical_alignment.options__3.label" + } + ] + }, + { + "type": "header", + "content": "t:general.custom_attr.header" + }, + { + "type": "text", + "id": "block_custom_class", + "label": "t:general.custom_attr.custom_class" + } + ] + }, + { + "type": "lookbook_card_hotspot", + "name": "t:sections.custom-content.blocks.lookbook_card_hotspot.name", + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "select", + "id": "icon_style", + "label": "t:general.hotspot.icon_style.label", + "options": [ + { + "value": "plus", + "label": "t:general.hotspot.icon_style.options__plus.label" + }, + { + "value": "dot", + "label": "t:general.hotspot.icon_style.options__dot.label" + } + ], + "default": "dot" + }, + { + "type": "select", + "id": "icon_color", + "label": "t:general.hotspot.icon_color.label", + "options": [ + { + "value": "light", + "label": "t:general.hotspot.icon_color.options__1.label" + }, + { + "value": "dark", + "label": "t:general.hotspot.icon_color.options__2.label" + } + ], + "default": "light" + }, + { + "type": "header", + "content": "t:general.image.content" + }, + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label" + }, + { + "type": "select", + "id": "image_ratio", + "label": "t:general.image_ratio.label", + "default": "adapt", + "options": [ + { + "value": "adapt", + "label": "t:general.image_ratio.options__1.label" + }, + { + "value": "1/1", + "label": "t:general.image_ratio.options__2.label" + }, + { + "value": "3/4", + "label": "t:general.image_ratio.options__3.label" + }, + { + "value": "4/3", + "label": "t:general.image_ratio.options__4.label" + } + ] + }, + { + "type": "header", + "content": "t:sections.custom-content.blocks.lookbook_card_hotspot.settings.header__1.content" + }, + { + "type": "product", + "id": "product_1", + "label": "t:general.product.label" + }, + { + "type": "range", + "id": "top_1", + "label": "t:general.hotspot.offset_top.label", + "min": 0, + "max": 100, + "unit": "%", + "step": 1, + "default": 45 + }, + { + "type": "range", + "id": "left_1", + "label": "t:general.hotspot.offset_left.label", + "min": 0, + "max": 100, + "unit": "%", + "step": 1, + "default": 30 + }, + { + "type": "header", + "content": "t:sections.custom-content.blocks.lookbook_card_hotspot.settings.header__2.content" + }, + { + "type": "product", + "id": "product_2", + "label": "t:general.product.label" + }, + { + "type": "range", + "id": "top_2", + "label": "t:general.hotspot.offset_top.label", + "min": 0, + "max": 100, + "unit": "%", + "step": 1, + "default": 50 + }, + { + "type": "range", + "id": "left_2", + "label": "t:general.hotspot.offset_left.label", + "min": 0, + "max": 100, + "unit": "%", + "step": 1, + "default": 70 + }, + { + "type": "header", + "content": "t:sections.custom-content.blocks.lookbook_card_hotspot.settings.header__3.content" + }, + { + "type": "product", + "id": "product_3", + "label": "t:general.product.label" + }, + { + "type": "range", + "id": "top_3", + "label": "t:general.hotspot.offset_top.label", + "min": 0, + "max": 100, + "unit": "%", + "step": 1, + "default": 62 + }, + { + "type": "range", + "id": "left_3", + "label": "t:general.hotspot.offset_left.label", + "min": 0, + "max": 100, + "unit": "%", + "step": 1, + "default": 43 + }, + { + "type": "header", + "content": "t:sections.custom-content.blocks.lookbook_card_hotspot.settings.header__4.content" + }, + { + "type": "product", + "id": "product_4", + "label": "t:general.product.label" + }, + { + "type": "range", + "id": "top_4", + "label": "t:general.hotspot.offset_top.label", + "min": 0, + "max": 100, + "unit": "%", + "step": 1, + "default": 9 + }, + { + "type": "range", + "id": "left_4", + "label": "t:general.hotspot.offset_left.label", + "min": 0, + "max": 100, + "unit": "%", + "step": 1, + "default": 63 + }, + { + "type": "header", + "content": "t:general.header__block_settings.content" + }, + { + "type": "select", + "id": "width", + "label": "t:general.block_width.label", + "options": [ + { + "value": "16%", + "label": "t:general.block_width.options__16p.label" + }, + { + "value": "20%", + "label": "t:general.block_width.options__20p.label" + }, + { + "value": "25%", + "label": "t:general.block_width.options__25p.label" + }, + { + "value": "33%", + "label": "t:general.block_width.options__33p.label" + }, + { + "value": "41%", + "label": "t:general.block_width.options__41p.label" + }, + { + "value": "50%", + "label": "t:general.block_width.options__50p.label" + }, + { + "value": "58%", + "label": "t:general.block_width.options__58p.label" + }, + { + "value": "66%", + "label": "t:general.block_width.options__66p.label" + }, + { + "value": "75%", + "label": "t:general.block_width.options__75p.label" + }, + { + "value": "80%", + "label": "t:general.block_width.options__80p.label" + }, + { + "value": "83%", + "label": "t:general.block_width.options__83p.label" + }, + { + "value": "100%", + "label": "t:general.block_width.options__100p.label" + } + ], + "default": "50%" + }, + { + "type": "select", + "id": "alignment", + "label": "t:general.vertical_alignment.label", + "default": "center", + "options": [ + { + "value": "start", + "label": "t:general.vertical_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.vertical_alignment.options__2.label" + }, + { + "value": "end", + "label": "t:general.vertical_alignment.options__3.label" + } + ] + }, + { + "type": "header", + "content": "t:general.custom_attr.header" + }, + { + "type": "text", + "id": "block_custom_class", + "label": "t:general.custom_attr.custom_class" + } + ] + }, + { + "type": "collections", + "name": "t:general.collection.name", + "settings": [ + { + "type": "collection_list", + "id": "collection_list", + "label": "t:sections.collection-list.name", + "limit": 3 + }, + { + "type": "header", + "content": "t:general.grid.name" + }, + { + "type": "range", + "id": "product_limit", + "label": "t:general.grid.product_limit.label", + "default": 3, + "min": 2, + "max": 12, + "step": 1 + }, + { + "type": "range", + "id": "columns_desktop", + "label": "t:general.grid.columns_desktop.label", + "min": 2, + "max": 4, + "step": 1, + "default": 3 + }, + { + "type": "select", + "id": "column_gap", + "label": "t:general.grid.column_gap.label", + "default": "medium", + "options": [ + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ] + }, + { + "type": "select", + "id": "row_gap", + "label": "t:general.grid.row_gap.label", + "default": "inherit", + "options": [ + { + "value": "inherit", + "label": "t:general.grid.gap.options__inherit.label" + }, + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ] + }, + { + "type": "header", + "content": "t:general.carousel.name" + }, + { + "type": "checkbox", + "id": "enable_slider", + "label": "t:general.carousel.enable_carousel.label", + "default": false + }, + { + "type": "select", + "id": "pcard_image_ratio", + "label": "t:general.image_ratio.label", + "default": "", + "options": [ + { + "value": "", + "label": "t:general.image_ratio.options__inherit.label" + }, + { + "value": "adapt", + "label": "t:general.image_ratio.options__1.label" + }, + { + "value": "1/1", + "label": "t:general.image_ratio.options__2.label" + }, + { + "value": "3/4", + "label": "t:general.image_ratio.options__3.label" + }, + { + "value": "4/3", + "label": "t:general.image_ratio.options__4.label" + } + ] + }, + { + "type": "header", + "content": "t:general.mobile.name" + }, + { + "type": "select", + "id": "columns_mobile", + "label": "t:general.mobile.columns_mobile.label", + "default": "1", + "options": [ + { + "value": "1", + "label": "t:general.mobile.columns_mobile.options__1.label" + }, + { + "value": "2", + "label": "t:general.mobile.columns_mobile.options__2.label" + } + ] + }, + { + "type": "checkbox", + "id": "swipe_on_mobile", + "label": "t:general.mobile.swipe_on_mobile.label", + "default": true + }, + { + "type": "header", + "content": "t:general.header__block_settings.content" + }, + { + "type": "select", + "id": "width", + "label": "t:general.block_width.label", + "options": [ + { + "value": "16%", + "label": "t:general.block_width.options__16p.label" + }, + { + "value": "20%", + "label": "t:general.block_width.options__20p.label" + }, + { + "value": "25%", + "label": "t:general.block_width.options__25p.label" + }, + { + "value": "33%", + "label": "t:general.block_width.options__33p.label" + }, + { + "value": "41%", + "label": "t:general.block_width.options__41p.label" + }, + { + "value": "50%", + "label": "t:general.block_width.options__50p.label" + }, + { + "value": "58%", + "label": "t:general.block_width.options__58p.label" + }, + { + "value": "66%", + "label": "t:general.block_width.options__66p.label" + }, + { + "value": "75%", + "label": "t:general.block_width.options__75p.label" + }, + { + "value": "80%", + "label": "t:general.block_width.options__80p.label" + }, + { + "value": "83%", + "label": "t:general.block_width.options__83p.label" + }, + { + "value": "100%", + "label": "t:general.block_width.options__100p.label" + } + ], + "default": "50%" + }, + { + "type": "select", + "id": "alignment", + "label": "t:general.vertical_alignment.label", + "default": "center", + "options": [ + { + "value": "start", + "label": "t:general.vertical_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.vertical_alignment.options__2.label" + }, + { + "value": "end", + "label": "t:general.vertical_alignment.options__3.label" + } + ] + }, + { + "type": "header", + "content": "t:general.custom_attr.header" + }, + { + "type": "text", + "id": "block_custom_class", + "label": "t:general.custom_attr.custom_class" + } + ] + } + ], + "presets": [ + { + "name": "t:sections.custom-content.name", + "blocks": [ + { + "type": "image" + }, + { + "type": "text" + } + ] + } + ] +} +{% endschema %} diff --git a/sections/custom-liquid.liquid b/sections/custom-liquid.liquid index 869a5b795d4..87b22381c60 100644 --- a/sections/custom-liquid.liquid +++ b/sections/custom-liquid.liquid @@ -1,20 +1,9 @@ -{%- style -%} - .section-{{ section.id }}-padding { - padding-top: calc({{ section.settings.padding_top }}px * 0.75); - padding-bottom: calc({{ section.settings.padding_bottom }}px * 0.75); - } - - @media screen and (min-width: 750px) { - .section-{{ section.id }}-padding { - padding-top: {{ section.settings.padding_top }}px; - padding-bottom: {{ section.settings.padding_bottom }}px; - } - } -{%- endstyle -%} -
    -
    - {{ section.settings.custom_liquid }} -
    +
    + {{ section.settings.custom_liquid }}
    {% schema %} @@ -32,37 +21,37 @@ { "type": "color_scheme", "id": "color_scheme", - "label": "t:sections.all.colors.label", + "label": "t:general.colors.label", "default": "scheme-1" }, { "type": "header", - "content": "t:sections.all.padding.section_padding_heading" + "content": "t:general.padding.section_heading.content" }, { "type": "range", "id": "padding_top", "min": 0, "max": 100, - "step": 4, + "step": 2, "unit": "px", - "label": "t:sections.all.padding.padding_top", - "default": 40 + "label": "t:general.padding.top.label", + "default": 50 }, { "type": "range", "id": "padding_bottom", "min": 0, "max": 100, - "step": 4, + "step": 2, "unit": "px", - "label": "t:sections.all.padding.padding_bottom", - "default": 52 + "label": "t:general.padding.bottom.label", + "default": 50 } ], "presets": [ { - "name": "t:sections.custom-liquid.presets.name" + "name": "t:sections.custom-liquid.name" } ] } diff --git a/sections/email-signup-banner.liquid b/sections/email-signup-banner.liquid deleted file mode 100644 index f48984863d4..00000000000 --- a/sections/email-signup-banner.liquid +++ /dev/null @@ -1,409 +0,0 @@ -{{ 'section-image-banner.css' | asset_url | stylesheet_tag }} -{{ 'component-newsletter.css' | asset_url | stylesheet_tag }} -{{ 'newsletter-section.css' | asset_url | stylesheet_tag }} -{{ 'section-email-signup-banner.css' | asset_url | stylesheet_tag }} - -{%- style -%} - #Banner-{{ section.id }}::after { - opacity: {{ section.settings.image_overlay_opacity | divided_by: 100.0 }}; - } - - {%- if section.settings.image_height == 'adapt-image' and section.settings.image != blank -%} - @media screen and (max-width: 749px) { - #Banner-{{ section.id }}:not(.banner--mobile-bottom) .banner__content::before { - padding-bottom: {{ 1 | divided_by: section.settings.image.aspect_ratio | times: 100 }}%; - content: ''; - display: block; - } - } - - #Banner-{{ section.id }}::before, - #Banner-{{ section.id }} .banner__media::before { - padding-bottom: {{ 1 | divided_by: section.settings.image.aspect_ratio | times: 100 }}%; - content: ''; - display: block; - } - {%- endif -%} -{%- endstyle -%} - - - -{% schema %} -{ - "name": "t:sections.email-signup-banner.name", - "tag": "section", - "class": "section", - "enabled_on": { - "templates": ["password"] - }, - "settings": [ - { - "type": "paragraph", - "content": "t:sections.email-signup-banner.settings.paragraph.content" - }, - { - "type": "checkbox", - "id": "show_background_image", - "label": "t:sections.email-signup-banner.settings.show_background_image.label", - "default": true - }, - { - "type": "image_picker", - "id": "image", - "label": "t:sections.email-signup-banner.settings.image.label" - }, - { - "type": "range", - "id": "image_overlay_opacity", - "min": 0, - "max": 100, - "step": 10, - "unit": "%", - "label": "t:sections.email-signup-banner.settings.image_overlay_opacity.label", - "default": 0 - }, - { - "type": "select", - "id": "image_height", - "options": [ - { - "value": "adapt-image", - "label": "t:sections.email-signup-banner.settings.image_height.options__1.label" - }, - { - "value": "small", - "label": "t:sections.email-signup-banner.settings.image_height.options__2.label" - }, - { - "value": "medium", - "label": "t:sections.email-signup-banner.settings.image_height.options__3.label" - }, - { - "value": "large", - "label": "t:sections.email-signup-banner.settings.image_height.options__4.label" - } - ], - "default": "medium", - "label": "t:sections.email-signup-banner.settings.image_height.label" - }, - { - "type": "header", - "content": "t:sections.email-signup-banner.settings.content_header.content" - }, - { - "type": "select", - "id": "desktop_content_position", - "options": [ - { - "value": "top-left", - "label": "t:sections.email-signup-banner.settings.desktop_content_position.options__1.label" - }, - { - "value": "top-center", - "label": "t:sections.email-signup-banner.settings.desktop_content_position.options__2.label" - }, - { - "value": "top-right", - "label": "t:sections.email-signup-banner.settings.desktop_content_position.options__3.label" - }, - { - "value": "middle-left", - "label": "t:sections.email-signup-banner.settings.desktop_content_position.options__4.label" - }, - { - "value": "middle-center", - "label": "t:sections.email-signup-banner.settings.desktop_content_position.options__5.label" - }, - { - "value": "middle-right", - "label": "t:sections.email-signup-banner.settings.desktop_content_position.options__6.label" - }, - { - "value": "bottom-left", - "label": "t:sections.email-signup-banner.settings.desktop_content_position.options__7.label" - }, - { - "value": "bottom-center", - "label": "t:sections.email-signup-banner.settings.desktop_content_position.options__8.label" - }, - { - "value": "bottom-right", - "label": "t:sections.email-signup-banner.settings.desktop_content_position.options__9.label" - } - ], - "default": "middle-center", - "label": "t:sections.email-signup-banner.settings.desktop_content_position.label" - }, - { - "type": "select", - "id": "desktop_content_alignment", - "options": [ - { - "value": "left", - "label": "t:sections.email-signup-banner.settings.desktop_content_alignment.options__1.label" - }, - { - "value": "center", - "label": "t:sections.email-signup-banner.settings.desktop_content_alignment.options__2.label" - }, - { - "value": "right", - "label": "t:sections.email-signup-banner.settings.desktop_content_alignment.options__3.label" - } - ], - "default": "center", - "label": "t:sections.email-signup-banner.settings.desktop_content_alignment.label" - }, - { - "type": "checkbox", - "id": "show_text_box", - "default": true, - "label": "t:sections.email-signup-banner.settings.show_text_box.label" - }, - { - "type": "color_scheme", - "id": "color_scheme", - "label": "t:sections.all.colors.label", - "info": "t:sections.email-signup-banner.settings.color_scheme.info", - "default": "scheme-1" - }, - { - "type": "header", - "content": "t:sections.email-signup-banner.settings.header.content" - }, - { - "type": "select", - "id": "mobile_content_alignment", - "options": [ - { - "value": "left", - "label": "t:sections.email-signup-banner.settings.mobile_content_alignment.options__1.label" - }, - { - "value": "center", - "label": "t:sections.email-signup-banner.settings.mobile_content_alignment.options__2.label" - }, - { - "value": "right", - "label": "t:sections.email-signup-banner.settings.mobile_content_alignment.options__3.label" - } - ], - "default": "center", - "label": "t:sections.email-signup-banner.settings.mobile_content_alignment.label" - }, - { - "type": "checkbox", - "id": "show_text_below", - "default": true, - "label": "t:sections.email-signup-banner.settings.show_text_below.label" - } - ], - "blocks": [ - { - "type": "heading", - "name": "t:sections.email-signup-banner.blocks.heading.name", - "limit": 1, - "settings": [ - { - "type": "text", - "id": "heading", - "default": "t:sections.email-signup-banner.blocks.heading.settings.heading.default", - "label": "t:sections.email-signup-banner.blocks.heading.settings.heading.label" - }, - { - "type": "select", - "id": "heading_size", - "options": [ - { - "value": "h2", - "label": "t:sections.all.heading_size.options__1.label" - }, - { - "value": "h1", - "label": "t:sections.all.heading_size.options__2.label" - }, - { - "value": "h0", - "label": "t:sections.all.heading_size.options__3.label" - }, - { - "value": "hxl", - "label": "t:sections.all.heading_size.options__4.label" - }, - { - "value": "hxxl", - "label": "t:sections.all.heading_size.options__5.label" - } - ], - "default": "h1", - "label": "t:sections.all.heading_size.label" - } - ] - }, - { - "type": "paragraph", - "name": "t:sections.email-signup-banner.blocks.paragraph.name", - "limit": 1, - "settings": [ - { - "type": "richtext", - "id": "text", - "default": "t:sections.email-signup-banner.blocks.paragraph.settings.paragraph.default", - "label": "t:sections.email-signup-banner.blocks.paragraph.settings.paragraph.label" - }, - { - "type": "select", - "id": "text_style", - "options": [ - { - "value": "body", - "label": "t:sections.email-signup-banner.blocks.paragraph.settings.text_style.options__1.label" - }, - { - "value": "subtitle", - "label": "t:sections.email-signup-banner.blocks.paragraph.settings.text_style.options__2.label" - } - ], - "default": "body", - "label": "t:sections.email-signup-banner.blocks.paragraph.settings.text_style.label" - } - ] - }, - { - "type": "email_form", - "name": "t:sections.email-signup-banner.blocks.email_form.name", - "limit": 1 - } - ], - "presets": [ - { - "name": "t:sections.email-signup-banner.presets.name", - "blocks": [ - { - "type": "heading" - }, - { - "type": "paragraph" - }, - { - "type": "email_form" - } - ] - } - ] -} -{% endschema %} diff --git a/sections/favorite-products.liquid b/sections/favorite-products.liquid new file mode 100644 index 00000000000..790863b190d --- /dev/null +++ b/sections/favorite-products.liquid @@ -0,0 +1,685 @@ +{{ 'section-favorite-products.css' | asset_url | stylesheet_tag }} + + +{%- liquid + assign enable_slider = false + if section.blocks.size > 1 + assign enable_slider = true + endif + + assign first_block = section.blocks.first + assign aspect_ratio = first_block.settings.image.aspect_ratio | default: 1 + assign aspect_ratio_mobile = first_block.settings.image_mobile.aspect_ratio | default: 0.75 + + assign slide_height = section.settings.slide_height + assign layout = section.settings.layout + assign pagination_type = 'fraction' + + assign pcard_style = section.settings.pcard_style +-%} + +{% render 'divider', + show_divider: section.settings.show_section_divider, + divider_width: section.settings.divider_width +%} +
    + +
    +
    + {%- for block in section.blocks -%} + {% liquid + assign product = block.settings.product + assign background_default = block.settings.image + assign background_mobile = block.settings.image_mobile + + assign loading = 'lazy' + assign fetchpriority = 'low' + if forloop.index == 1 and section.index < 2 + assign loading = 'eager' + assign fetchpriority = 'high' + endif + %} +
    +
    +
    + {%- if background_default == blank -%} + + {%- endif -%} + {%- if background_default != blank or background_mobile != blank -%} + + + {%- if background_default != blank and background_mobile != blank -%} + + {%- endif -%} + {%- liquid + if background_default == blank + assign background_default = background_mobile + endif + + assign background_default_height = background_default.width | divided_by: background_default.aspect_ratio + assign background_default_alt = background_default.alt | default: shop.name | escape + -%} + {{- + background_default + | image_url: width: 2000 + | image_tag: + loading: loading, + width: background_default.width, + height: background_default_height, + alt: background_default_alt, + fetchpriority: fetchpriority, + sizes: '100vw', + widths: '375, 420, 750, 840, 1100, 1500, 1780, 2000', + is: 'image-lazy', + class: 'motion-reduce w-full h-full' + -}} + + + {%- endif -%} +
    + +
    + {%- if product != blank -%} + {% if pcard_style == 'boxed' %} + {% render 'card-product-boxed', + product: product, + list_on_mobile: false, + image_ratio: section.settings.pcard_image_ratio, + image_sizes: '450px', + quick_view_suffix: block.id, + section_index: section.index, + index: forloop.index + %} + {%- else -%} + {%- render 'card-product', + product: product, + pcard_style: pcard_style, + image_sizes: '450px', + image_ratio: section.settings.pcard_image_ratio, + color_inherit: false, + section_index: section.index, + index: forloop.index + -%} + {% endif %} + {%- else -%} + {%- capture pcard_placeholder_class -%} + text-{{ settings.pcard_content_alignment }} color-{{ settings.pcard_color_scheme }} + {%- endcapture -%} + + {% if pcard_style == 'boxed' %} + {% render 'card-product-placeholder', + image_ratio: section.settings.pcard_image_ratio, + pcard_style: 'boxed', + custom_class: pcard_placeholder_class + %} + {%- else -%} + {% render 'card-product-placeholder', + image_ratio: section.settings.pcard_image_ratio, + color_inherit: false + %} + {% endif %} + {%- endif -%} +
    +
    +
    + {%- endfor -%} +
    +
    +
    + {% assign motion_delay = 50 %} + {% if section.settings.heading != blank %} +

    + + {% render 'highlight-text', + hl_text: section.settings.heading, + hl_style: section.settings.highlight_style, + hl_font_style: section.settings.highlight_font_style, + hl_style_color: section.settings.highlight_style_color, + hl_text_color: section.settings.highlight_text_color + %} + +

    + {%- assign motion_delay = motion_delay | plus: 50 -%} + {% endif %} + +
    + {%- for block in section.blocks -%} + {% liquid + assign text = block.settings.text + assign author = block.settings.author + assign bio = block.settings.bio + %} +
    +
    + {% if text != blank %} +
    {{ text }}
    + {% endif %} + {% if author != blank or bio != blank %} +
    + {% if author != blank %} +

    {{ author }}

    + {% endif %} + {% if bio != blank %} +
    + {{ bio }} +
    + {% endif %} +
    + {% endif %} +
    +
    + {%- endfor -%} +
    +
    + {%- assign motion_delay = motion_delay | plus: 50 -%} + +
    + +
    + +
    +
    +
    + +
    +
    +{% schema %} +{ + "name": "t:sections.favorite-products.name", + "disabled_on": { + "groups": ["header", "footer", "custom.overlay"] + }, + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "select", + "id": "layout", + "label": "t:sections.favorite-products.settings.layout.label", + "default": "content-right", + "options": [ + { + "value": "content-right", + "label": "t:sections.favorite-products.settings.layout.options__1.label" + }, + { + "value": "content-left", + "label": "t:sections.favorite-products.settings.layout.options__2.label" + } + ] + }, + { + "type": "header", + "content": "t:general.section_header.content" + }, + { + "type": "inline_richtext", + "id": "heading", + "label": "t:general.heading.label", + "default": "Favorite products", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "header", + "content": "t:general.header__slider_settings.content" + }, + { + "type": "select", + "id": "slide_height", + "label": "t:sections.favorite-products.settings.slide_height.label", + "info": "t:sections.favorite-products.settings.slide_height.info", + "default": "medium", + "options": [ + { + "label": "t:sections.favorite-products.settings.slide_height.options__adapt.label", + "value": "adapt" + }, + { + "label": "t:sections.favorite-products.settings.slide_height.options__sm.label", + "value": "small" + }, + { + "label": "t:sections.favorite-products.settings.slide_height.options__md.label", + "value": "medium" + }, + { + "label": "t:sections.favorite-products.settings.slide_height.options__lg.label", + "value": "large" + } + ] + }, + { + "type": "header", + "content": "t:general.header__product_cards.content" + }, + { + "type": "select", + "id": "pcard_style", + "options": [ + { + "value": "boxed", + "label": "t:settings_schema.product_cards.settings.style.options__3.label" + }, + { + "value": "card", + "label": "t:settings_schema.product_cards.settings.style.options__2.label" + } + ], + "default": "boxed", + "label": "t:settings_schema.product_cards.settings.style.label" + }, + { + "type": "select", + "id": "pcard_image_ratio", + "label": "t:general.image_ratio.label", + "default": "", + "options": [ + { + "value": "", + "label": "t:general.image_ratio.options__inherit.label" + }, + { + "value": "adapt", + "label": "t:general.image_ratio.options__1.label" + }, + { + "value": "1/1", + "label": "t:general.image_ratio.options__2.label" + }, + { + "value": "3/4", + "label": "t:general.image_ratio.options__3.label" + }, + { + "value": "4/3", + "label": "t:general.image_ratio.options__4.label" + } + ] + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "default": false, + "label": "t:general.divider.show_divider.label" + }, + { + "type": "select", + "id": "divider_width", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed", + "label": "t:general.divider.width.label" + } + ], + "blocks": [ + { + "type": "product", + "name": "t:general.product.label", + "settings": [ + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "header", + "content": "Product" + }, + { + "type": "product", + "id": "product", + "label": "t:general.product.label" + }, + { + "type": "header", + "content": "Image" + }, + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label" + }, + { + "type": "image_picker", + "id": "image_mobile", + "label": "t:general.image_mobile.label" + }, + { + "type": "header", + "content": "Content" + }, + { + "type": "richtext", + "id": "text", + "default": "

    Add customer reviews and testimonials to showcase your store’s happy customers.

    ", + "label": "t:general.text.label" + }, + { + "type": "select", + "id": "text_size", + "label": "t:general.text_size.text.label", + "default": "h1", + "options": [ + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] + }, + { + "type": "text", + "id": "author", + "default": "Author's name", + "label": "t:sections.favorite-products.blocks.product.settings.author.label" + }, + { + "type": "text", + "id": "bio", + "label": "t:sections.favorite-products.blocks.product.settings.bio.label" + } + ] + } + ], + "presets": [ + { + "name": "t:sections.favorite-products.name", + "blocks": [ + { + "type": "product" + }, + { + "type": "product" + }, + { + "type": "product" + } + ] + } + ] +} +{% endschema %} diff --git a/sections/featured-blog.liquid b/sections/featured-blog.liquid index 8ed96c06c0b..6d2fde25171 100644 --- a/sections/featured-blog.liquid +++ b/sections/featured-blog.liquid @@ -1,192 +1,101 @@ -{{ 'component-slider.css' | asset_url | stylesheet_tag }} -{{ 'component-card.css' | asset_url | stylesheet_tag }} {{ 'component-article-card.css' | asset_url | stylesheet_tag }} {{ 'section-featured-blog.css' | asset_url | stylesheet_tag }} -{%- style -%} - .section-{{ section.id }}-padding { - padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px; - padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px; - } +{% liquid + assign columns_mobile_int = section.settings.columns_mobile | plus: 0 + assign enable_swipe_mobile = false + if section.settings.swipe_on_mobile and section.settings.post_limit > columns_mobile_int + assign enable_swipe_mobile = true + endif - @media screen and (min-width: 750px) { - .section-{{ section.id }}-padding { - padding-top: {{ section.settings.padding_top }}px; - padding-bottom: {{ section.settings.padding_bottom }}px; - } - } -{%- endstyle -%} + assign columns_desktop = section.settings.columns_desktop + assign columns_tablet = columns_desktop + if columns_desktop > 3 + assign columns_tablet = columns_desktop | divided_by: 2.0 | ceil + endif -{%- liquid - assign posts_displayed = section.settings.blog.articles_count - if section.settings.post_limit <= section.settings.blog.articles_count or section.settings.post_limit <= 4 - assign posts_exceed_limit = true - assign posts_displayed = section.settings.post_limit + assign show_tags = section.settings.show_tags + assign show_author = section.settings.show_author + assign show_date = section.settings.show_date + assign show_excerpt = section.settings.show_excerpt + assign show_button = section.settings.show_button + + assign button_style = section.settings.button_style + assign button_label = section.settings.button_label + assign button_link = section.settings.button_link + assign button_icon = section.settings.button_icon + + assign has_richtext = false + if section.settings.heading != blank or section.settings.description != blank or section.settings.subheading != blank + assign has_richtext = true endif --%} -
    -
    - {%- unless section.settings.heading == blank -%} -
    -

    - {{ section.settings.heading }} -

    - {%- if section.settings.blog != blank - and section.settings.show_view_all - and section.settings.post_limit < section.settings.blog.articles_count - -%} - - {{ 'sections.featured_blog.view_all' | t }} - - {%- endif -%} -
    - {%- endunless -%} + assign motion_delay = 50 +%} - -
      +{% render 'divider', + show_divider: section.settings.show_section_divider, + divider_width: section.settings.divider_width +%} + +{% style %} + .section-{{ section.id }} { + --section-padding-top: {{ section.settings.padding_top }}px; + --section-padding-bottom: {{ section.settings.padding_bottom }}px; + --f-columns-mobile: 1; + --f-columns-md: {{ columns_tablet }}; + --f-columns-xl: {{ columns_desktop }}; + } +{% endstyle %} + +
    - {%- if posts_exceed_limit -%} -
    - -
    - 1 - - {{ 'general.slider.of' | t }} - {{ section.settings.post_limit }} -
    - -
    - {%- endif -%} -
    - - {%- if section.settings.show_view_all and section.settings.post_limit < section.settings.blog.articles_count -%} - - {%- endif -%} +
    @@ -194,66 +103,362 @@ { "name": "t:sections.featured-blog.name", "tag": "section", - "disabled_on": { - "groups": ["header", "footer"] - }, "settings": [ { - "type": "blog", - "id": "blog", - "label": "t:sections.featured-blog.settings.blog.label" + "type": "header", + "content": "t:general.general.name" }, { - "type": "range", - "id": "post_limit", - "min": 2, - "max": 4, - "step": 1, - "default": 3, - "label": "t:sections.featured-blog.settings.post_limit.label" + "type": "select", + "id": "container", + "options": [ + { + "value": "full", + "label": "t:general.container.options__full.label" + }, + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + } + ], + "default": "fixed", + "label": "t:general.container.label" + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" }, { "type": "header", - "content": "t:sections.featured-blog.settings.text_header.content" - }, + "content": "t:general.section_header.content" + }, + { + "id": "section_header_alignment", + "type": "select", + "label": "t:general.text_alignment.label", + "default": "left", + "options": [ + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ] + }, + { + "id": "section_header_alignment_mobile", + "type": "select", + "label": "t:general.text_alignment.mobile.label", + "default": "inherit", + "options": [ + { + "value": "inherit", + "label": "t:general.text_alignment.options__4.label" + }, + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ] + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label" + }, { "type": "inline_richtext", "id": "heading", - "default": "t:sections.featured-blog.settings.heading.default", - "label": "t:sections.featured-blog.settings.heading.label" + "default": "Blog posts", + "label": "t:general.heading.label", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" }, { "type": "select", "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h2", "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, { "value": "h2", - "label": "t:sections.all.heading_size.options__1.label" + "label": "t:general.text_size.options__h2.label" }, { "value": "h1", - "label": "t:sections.all.heading_size.options__2.label" + "label": "t:general.text_size.options__h1.label" }, { - "value": "h0", - "label": "t:sections.all.heading_size.options__3.label" + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" }, { - "value": "hxl", - "label": "t:sections.all.heading_size.options__4.label" + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "richtext", + "id": "description", + "label": "t:general.text.label" + }, + { + "type": "select", + "id": "text_size", + "label": "t:general.text_size.text.label", + "default": "text-base", + "options": [ + { + "value": "text-sm", + "label": "t:general.text_size.options__small.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-lg", + "label": "t:general.text_size.options__large.label" }, { - "value": "hxxl", - "label": "t:sections.all.heading_size.options__5.label" + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label" + }, + { + "type": "url", + "id": "button_link", + "label": "t:general.button.button_link.label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" } ], - "default": "h1", - "label": "t:sections.all.heading_size.label" + "default": "btn--underline" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" }, { "type": "header", - "content": "t:sections.featured-blog.settings.layout_header.content" - }, + "content": "t:sections.featured-blog.settings.blog_setting_header" + }, + { + "type": "blog", + "id": "blog", + "label": "t:general.blog.label" + }, + { + "type": "range", + "id": "post_limit", + "min": 2, + "max": 8, + "step": 1, + "default": 3, + "label": "t:sections.featured-blog.settings.post_limit.label" + }, + { + "type": "header", + "content": "t:general.grid.name" + }, { "type": "range", "id": "columns_desktop", @@ -261,69 +466,238 @@ "max": 4, "step": 1, "default": 3, - "label": "t:sections.featured-blog.settings.columns_desktop.label" + "label": "t:general.grid.columns_desktop.label" + }, + { + "type": "select", + "id": "column_gap", + "options": [ + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ], + "default": "medium", + "label": "t:general.grid.column_gap.label" + }, + { + "type": "select", + "id": "row_gap", + "options": [ + { + "value": "inherit", + "label": "t:general.grid.gap.options__inherit.label" + }, + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ], + "default": "large", + "label": "t:general.grid.row_gap.label" + }, + { + "type": "header", + "content": "t:general.mobile.name" + }, + { + "type": "select", + "id": "columns_mobile", + "options": [ + { + "value": "1", + "label": "t:general.mobile.columns_mobile.options__1.label" + }, + { + "value": "2", + "label": "t:general.mobile.columns_mobile.options__2.label" + } + ], + "default": "1", + "label": "t:general.mobile.columns_mobile.label" }, { "type": "checkbox", - "id": "show_view_all", + "id": "swipe_on_mobile", "default": true, - "label": "t:sections.featured-blog.settings.show_view_all.label", - "info": "t:sections.featured-blog.settings.show_view_all.info" - }, + "label": "t:general.mobile.swipe_on_mobile.label" + }, + { + "type": "header", + "content": "t:general.header__card_settings.content" + }, + { + "type": "select", + "id": "card_title_size", + "label": "t:general.text_size.heading.label", + "default": "h4", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, { "type": "checkbox", - "id": "show_image", - "default": true, - "label": "t:sections.featured-blog.settings.show_image.label" + "id": "show_tags", + "label": "t:general.blog.show_tags.label", + "default": true + }, + { + "type": "checkbox", + "id": "show_excerpt", + "default": false, + "label": "t:general.blog.show_excerpt.label" }, { "type": "checkbox", "id": "show_date", "default": true, - "label": "t:sections.featured-blog.settings.show_date.label" + "label": "t:general.blog.show_date.label" }, { "type": "checkbox", "id": "show_author", - "default": false, - "label": "t:sections.featured-blog.settings.show_author.label" + "label": "t:general.blog.show_author.label", + "default": true }, { - "type": "color_scheme", - "id": "color_scheme", - "label": "t:sections.all.colors.label", - "info": "t:sections.all.colors.has_cards_info", - "default": "scheme-1" - }, + "type": "checkbox", + "id": "show_button", + "default": false, + "label": "t:general.blog.show_button.label" + }, { "type": "header", - "content": "t:sections.all.padding.section_padding_heading" + "content": "t:general.padding.section_heading.content" }, { "type": "range", "id": "padding_top", "min": 0, "max": 100, - "step": 4, + "step": 2, "unit": "px", - "label": "t:sections.all.padding.padding_top", - "default": 36 + "label": "t:general.padding.top.label", + "default": 50 }, { "type": "range", "id": "padding_bottom", "min": 0, "max": 100, - "step": 4, + "step": 2, "unit": "px", - "label": "t:sections.all.padding.padding_bottom", - "default": 36 + "label": "t:general.padding.bottom.label", + "default": 50 + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "default": false, + "label": "t:general.divider.show_divider.label" + }, + { + "type": "select", + "id": "divider_width", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed", + "label": "t:general.divider.width.label" } ], "presets": [ { - "name": "t:sections.featured-blog.presets.name" + "name": "t:sections.featured-blog.name" } - ] + ], + "disabled_on": { + "groups": ["footer", "header", "custom.overlay"] + } } {% endschema %} diff --git a/sections/featured-collection.liquid b/sections/featured-collection.liquid index 5468f8e3265..f9ee257e265 100644 --- a/sections/featured-collection.liquid +++ b/sections/featured-collection.liquid @@ -1,527 +1,1387 @@ -{{ 'component-card.css' | asset_url | stylesheet_tag }} -{{ 'component-price.css' | asset_url | stylesheet_tag }} +{{ 'section-featured-collection.css' | asset_url | stylesheet_tag }} -{{ 'component-slider.css' | asset_url | stylesheet_tag }} -{{ 'template-collection.css' | asset_url | stylesheet_tag }} +{%- liquid + assign button_style = section.settings.button_style + assign button_label = section.settings.button_label + assign button_link = section.settings.button_link + assign button_icon = section.settings.button_icon -{% if section.settings.image_shape == 'blob' %} - {{ 'mask-blobs.css' | asset_url | stylesheet_tag }} -{%- endif -%} + assign columns_desktop = section.settings.columns -{%- unless section.settings.quick_add == 'none' -%} - {{ 'quick-add.css' | asset_url | stylesheet_tag }} - -{%- endunless -%} + assign columns_tablet = 3 + if columns_desktop < 3 + assign columns_tablet = columns_desktop + endif -{%- if section.settings.quick_add == 'standard' -%} - -{%- endif -%} + assign has_block = section.blocks | where: 'type', 'collection' | first + assign block_show_banner = has_block.settings.show_banner + if block_show_banner + assign columns_laptop = columns_desktop | at_most: 4 + else + assign columns_laptop = columns_desktop | at_most: 5 + endif -{%- if section.settings.quick_add == 'bulk' -%} - - - - -{%- endif -%} + assign columns_mobile = section.settings.columns_mobile | plus: 0 -{%- style -%} - .section-{{ section.id }}-padding { - padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px; - padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px; - } + assign block_size = section.blocks.size - @media screen and (min-width: 750px) { - .section-{{ section.id }}-padding { - padding-top: {{ section.settings.padding_top }}px; - padding-bottom: {{ section.settings.padding_bottom }}px; - } - } -{%- endstyle -%} - -{%- liquid - assign products_to_display = section.settings.collection.all_products_count - - if section.settings.collection.all_products_count > section.settings.products_to_show - assign products_to_display = section.settings.products_to_show - assign more_in_collection = true + assign header_alignment = section.settings.section_header_alignment + assign header_alignment_mobile = section.settings.section_header_alignment_mobile + if header_alignment_mobile == 'inherit' + assign header_alignment_mobile = header_alignment endif - assign columns_mobile_int = section.settings.columns_mobile | plus: 0 - assign columns_desktop_int = section.settings.columns_desktop | plus: 0 - assign show_mobile_slider = false - if section.settings.swipe_on_mobile and products_to_display > columns_mobile_int - assign show_mobile_slider = true + assign has_richtext = false + if section.settings.heading != blank or section.settings.description != blank or section.settings.subheading != blank + assign has_richtext = true endif - assign max_columns_to_show = columns_mobile_int - if columns_desktop_int > columns_mobile_int - assign max_columns_to_show = columns_desktop_int - endif + assign navigation_position = section.settings.navigation_position - assign show_desktop_slider = false - if section.settings.enable_desktop_slider and products_to_display > section.settings.columns_desktop - assign show_desktop_slider = true - endif + assign motion_delay = 50 -%} -
    -
    -
    - {%- if section.settings.title != blank -%} -

    - {{ section.settings.title }} -

    - {%- endif -%} - {%- if section.settings.description != blank - or section.settings.show_description - and section.settings.collection.description != empty - -%} -
    - {%- if section.settings.show_description -%} - {{ section.settings.collection.description }} - {%- else -%} - {{ section.settings.description -}} - {%- endif %} -
    - {%- endif -%} -
    +{%- capture image_sizes -%} +(max-width: 767px) calc((100vw - 30px) / {{ columns_mobile }}), +(max-width: 1023px) calc((100vw - 30px) / {{ columns_tablet }}), +calc(100vw / {{ columns_desktop }}) +{%- endcapture -%} - -
      - {% assign skip_card_product_styles = false %} +{% style %} + .section-{{ section.id }} { + --section-padding-top: {{ section.settings.padding_top }}px; + --section-padding-bottom: {{ section.settings.padding_bottom }}px; + --f-columns-mobile: {{ columns_mobile }}; + --f-columns-lg: {{ columns_laptop }}; + --f-columns-md: {{ columns_tablet }}; + --f-columns-xl: {{ columns_desktop }}; + } +{% endstyle %} - {%- if section.settings.collection.products.size > 0 -%} - {% assign lazy_load = false %} - {% paginate section.settings.collection.products by section.settings.products_to_show %} - {%- for product in section.settings.collection.products limit: section.settings.products_to_show -%} - {% if lazy_load == false and forloop.index > max_columns_to_show %} - {% assign lazy_load = true %} - {% endif %} -
    • +
      +
      1 %} + is="product-tabs" + {% endif %} + data-section-id="{{ section.id }}" + > +
      + {% if has_richtext %} +
      + {% if section.settings.subheading != blank %} + + {{- section.settings.subheading -}} + + {%- assign motion_delay = motion_delay | plus: 50 -%} + {% endif %} + {% if section.settings.heading != blank %} +

      + + {% render 'highlight-text', + hl_text: section.settings.heading, + hl_style: section.settings.highlight_style, + hl_font_style: section.settings.highlight_font_style, + hl_style_color: section.settings.highlight_style_color, + hl_text_color: section.settings.highlight_text_color + %} + +

      + {%- assign motion_delay = motion_delay | plus: 50 -%} + {% endif %} + {% if section.settings.description != blank %} + + {{- section.settings.description -}} + + {%- assign motion_delay = motion_delay | plus: 50 -%} + {% endif %} + {% if button_label != blank and block_size > 1 %} + - {% render 'card-product', - card_product: product, - media_aspect_ratio: section.settings.image_ratio, - image_shape: section.settings.image_shape, - lazy_load: lazy_load, - show_secondary_image: section.settings.show_secondary_image, - show_vendor: section.settings.show_vendor, - show_rating: section.settings.show_rating, - skip_styles: skip_card_product_styles, - section_id: section.id, - quick_add: section.settings.quick_add + {% render 'button', + button_style: button_style, + button_link: button_link, + button_label: button_label, + button_icon: button_icon %} -
    • - {%- assign skip_card_product_styles = true -%} - {%- endfor -%} - {% endpaginate %} - {%- else -%} - {%- for i in (1..section.settings.columns_desktop) -%} -
    • + {%- assign motion_delay = motion_delay | plus: 50 -%} + {% endif %} +
    + {% endif %} + {% if block_size > 1 %} + +
    +
    + {%- for block in section.blocks -%} + {%- liquid + assign collection = block.settings.collection + if block.settings.title != blank + assign tab_name = block.settings.title + else + if collection != blank + assign tab_name = collection.title + else + assign tab_name = 'Tab ' | append: forloop.index + endif + endif + -%} + + {%- endfor -%} +
    +
    +
    + {%- assign motion_delay = motion_delay | plus: 50 -%} + {% else %} + {% if button_label != blank %} + - {% liquid - assign ridx = forloop.rindex - case ridx - when 5 - assign ridx = 1 - when 6 - assign ridx = 2 - endcase - %} - {%- assign placeholder_image = 'product-apparel-' | append: ridx -%} - {% render 'card-product', - show_vendor: section.settings.show_vendor, - media_aspect_ratio: section.settings.image_ratio, - image_shape: section.settings.image_shape, - lazy_load: false, - placeholder_image: placeholder_image + {% render 'button', + button_style: button_style, + button_link: button_link, + button_label: button_label, + button_icon: button_icon %} - - {%- endfor -%} - {%- endif -%} - - {%- if show_mobile_slider or show_desktop_slider -%} -
    -
    +
    + {% for block in section.blocks %} + {% liquid + assign collection = collections[block.settings.collection] + assign products_to_display = section.settings.limit + if collection != blank and collection.all_products_count < products_to_display + assign products_to_display = collection.all_products_count + endif + + assign total_items = products_to_display + assign show_banner = block.settings.show_banner + if show_banner + assign total_items = total_items | plus: 1 + endif + + assign enable_swipe_mobile = false + if section.settings.swipe_on_mobile and total_items > columns_mobile + assign enable_swipe_mobile = true + endif + + assign enable_slider = false + if section.settings.enable_slider and total_items > columns_desktop + assign enable_slider = true + endif + + assign pagination_type = 'progressbar' + %} + {% unless forloop.first %} + + {%- endunless -%} + {% endfor %}
    - {%- endif -%} - {% if section.settings.image_shape == 'arch' %} - {{ 'mask-arch.svg' | inline_asset_content }} - {%- endif -%} +

    - + + {% schema %} { "name": "t:sections.featured-collection.name", - "tag": "section", - "class": "section", "disabled_on": { - "groups": ["header", "footer"] + "groups": ["header", "footer", "custom.overlay"] }, "settings": [ { - "type": "collection", - "id": "collection", - "label": "t:sections.featured-collection.settings.collection.label" + "type": "header", + "content": "t:general.general.name" }, { - "type": "range", - "id": "products_to_show", - "min": 2, - "max": 25, - "step": 1, - "default": 4, - "label": "t:sections.featured-collection.settings.products_to_show.label" - }, + "type": "select", + "id": "container", + "options": [ + { + "value": "full", + "label": "t:general.container.options__full.label" + }, + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + } + ], + "default": "fixed", + "label": "t:general.container.label" + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, { "type": "header", - "content": "t:sections.featured-collection.settings.header_text.content" - }, + "content": "t:general.section_header.content" + }, + { + "id": "section_header_alignment", + "type": "select", + "label": "t:general.text_alignment.label", + "default": "left", + "options": [ + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ] + }, + { + "id": "section_header_alignment_mobile", + "type": "select", + "label": "t:general.text_alignment.mobile.label", + "default": "inherit", + "options": [ + { + "value": "inherit", + "label": "t:general.text_alignment.options__4.label" + }, + { + "value": "left", + "label": "t:general.text_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.text_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.text_alignment.options__3.label" + } + ] + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label" + }, { "type": "inline_richtext", - "id": "title", - "default": "t:sections.featured-collection.settings.title.default", - "label": "t:sections.featured-collection.settings.title.label" + "id": "heading", + "default": "Featured collection", + "label": "t:general.heading.label", + "info": "t:general.heading.info" }, { "type": "select", - "id": "heading_size", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", "options": [ { - "value": "h2", - "label": "t:sections.all.heading_size.options__1.label" + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" }, { - "value": "h1", - "label": "t:sections.all.heading_size.options__2.label" + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" }, { - "value": "h0", - "label": "t:sections.all.heading_size.options__3.label" + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" }, { - "value": "hxl", - "label": "t:sections.all.heading_size.options__4.label" + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" }, { - "value": "hxxl", - "label": "t:sections.all.heading_size.options__5.label" + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" } - ], - "default": "h1", - "label": "t:sections.all.heading_size.label" + ] }, { - "type": "richtext", - "id": "description", - "label": "t:sections.featured-collection.settings.description.label" + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" }, { - "type": "checkbox", - "id": "show_description", - "label": "t:sections.featured-collection.settings.show_description.label", - "default": false + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" }, { "type": "select", - "id": "description_style", - "label": "t:sections.featured-collection.settings.description_style.label", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h1", "options": [ { - "value": "body", - "label": "t:sections.featured-collection.settings.description_style.options__1.label" + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" }, { - "value": "subtitle", - "label": "t:sections.featured-collection.settings.description_style.options__2.label" + "value": "h3", + "label": "t:general.text_size.options__h3.label" }, { - "value": "uppercase", - "label": "t:sections.featured-collection.settings.description_style.options__3.label" + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" } - ], - "default": "body" + ] }, { - "type": "header", - "content": "t:sections.featured-collection.settings.header_collection.content" - }, - { - "type": "range", - "id": "columns_desktop", - "min": 1, - "max": 6, - "step": 1, - "default": 4, - "label": "t:sections.featured-collection.settings.columns_desktop.label" + "type": "richtext", + "id": "description", + "label": "t:general.text.label" }, + { + "type": "select", + "id": "text_size", + "label": "t:general.text_size.text.label", + "default": "text-base", + "options": [ { - "type": "checkbox", - "id": "enable_desktop_slider", - "label": "t:sections.featured-collection.settings.enable_desktop_slider.label", - "default": false + "value": "text-sm", + "label": "t:general.text_size.options__small.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-lg", + "label": "t:general.text_size.options__large.label" + }, + { + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] }, { - "type": "checkbox", - "id": "full_width", - "label": "t:sections.featured-collection.settings.full_width.label", - "default": false + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label" }, { - "type": "checkbox", - "id": "show_view_all", - "default": true, - "label": "t:sections.featured-collection.settings.show_view_all.label", - "info": "t:sections.featured-collection.settings.show_view_all.info" + "type": "url", + "id": "button_link", + "label": "t:general.button.button_link.label" }, { "type": "select", - "id": "view_all_style", - "label": "t:sections.featured-collection.settings.view_all_style.label", + "id": "button_style", + "label": "t:general.button.button_style.label", "options": [ { - "value": "link", - "label": "t:sections.featured-collection.settings.view_all_style.options__1.label" + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" }, { - "value": "outline", - "label": "t:sections.featured-collection.settings.view_all_style.options__2.label" + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" }, { - "value": "solid", - "label": "t:sections.featured-collection.settings.view_all_style.options__3.label" + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" } ], - "default": "solid" - }, + "default": "btn--underline" + }, { - "type": "color_scheme", - "id": "color_scheme", - "label": "t:sections.all.colors.label", - "info": "t:sections.all.colors.has_cards_info", - "default": "scheme-1" + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" }, { "type": "header", - "content": "t:sections.featured-collection.settings.header.content" + "content": "t:general.grid.name" + }, + { + "type": "range", + "id": "limit", + "label": "t:general.grid.product_limit.label", + "min": 2, + "max": 12, + "step": 1, + "default": 8 + }, + { + "type": "range", + "id": "columns", + "label": "t:general.grid.columns_desktop.label", + "min": 2, + "max": 6, + "step": 1, + "default": 4 }, { "type": "select", - "id": "image_ratio", + "id": "column_gap", "options": [ { - "value": "adapt", - "label": "t:sections.featured-collection.settings.image_ratio.options__1.label" + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" }, { - "value": "portrait", - "label": "t:sections.featured-collection.settings.image_ratio.options__2.label" + "value": "small", + "label": "t:general.grid.gap.options__sm.label" }, { - "value": "square", - "label": "t:sections.featured-collection.settings.image_ratio.options__3.label" + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" } ], - "default": "adapt", - "label": "t:sections.featured-collection.settings.image_ratio.label" + "default": "medium", + "label": "t:general.grid.column_gap.label" }, { "type": "select", - "id": "image_shape", + "id": "row_gap", "options": [ { - "value": "default", - "label": "t:sections.all.image_shape.options__1.label" - }, - { - "value": "arch", - "label": "t:sections.all.image_shape.options__2.label" + "value": "inherit", + "label": "t:general.grid.gap.options__inherit.label" }, { - "value": "blob", - "label": "t:sections.all.image_shape.options__3.label" + "value": "none", + "label": "t:general.grid.gap.options__none.label" }, { - "value": "chevronleft", - "label": "t:sections.all.image_shape.options__4.label" + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" }, { - "value": "chevronright", - "label": "t:sections.all.image_shape.options__5.label" + "value": "small", + "label": "t:general.grid.gap.options__sm.label" }, { - "value": "diamond", - "label": "t:sections.all.image_shape.options__6.label" + "value": "medium", + "label": "t:general.grid.gap.options__md.label" }, { - "value": "parallelogram", - "label": "t:sections.all.image_shape.options__7.label" + "value": "large", + "label": "t:general.grid.gap.options__lg.label" }, { - "value": "round", - "label": "t:sections.all.image_shape.options__8.label" + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" } ], - "default": "default", - "label": "t:sections.all.image_shape.label" + "default": "inherit", + "label": "t:general.grid.row_gap.label" }, { - "type": "checkbox", - "id": "show_secondary_image", - "default": false, - "label": "t:sections.featured-collection.settings.show_secondary_image.label" + "type": "header", + "content": "t:general.carousel.name" }, { "type": "checkbox", - "id": "show_vendor", - "default": false, - "label": "t:sections.featured-collection.settings.show_vendor.label" + "id": "enable_slider", + "label": "t:general.carousel.enable_carousel.label", + "default": true }, { "type": "checkbox", - "id": "show_rating", - "default": false, - "label": "t:sections.featured-collection.settings.show_rating.label", - "info": "t:sections.featured-collection.settings.show_rating.info" + "id": "content_overflow", + "label": "t:general.carousel.content_overflow.label", + "default": true, + "visible_if": "{{ section.settings.enable_slider == true }}" }, { "type": "select", - "id": "quick_add", - "default": "none", - "label": "t:sections.main-collection-product-grid.settings.quick_add.label", + "id": "navigation_position", + "label": "t:general.carousel.navigation_position.label", + "default": "bottom", "options": [ { - "value": "none", - "label": "t:sections.main-collection-product-grid.settings.quick_add.options.option_1" + "value": "middle", + "label": "t:general.carousel.navigation_position.options__2.label" + }, + { + "value": "bottom", + "label": "t:general.carousel.navigation_position.options__3.label" + }, + { + "value": "center_image", + "label": "t:general.carousel.navigation_position.options__4.label" + } + ], + "visible_if": "{{ section.settings.enable_slider == true }}" + }, + { + "type": "header", + "content": "t:general.header__product_cards.content" + }, + { + "type": "select", + "id": "pcard_image_ratio", + "label": "t:general.image_ratio.label", + "default": "", + "options": [ + { + "value": "", + "label": "t:general.image_ratio.options__inherit.label" }, { - "value": "standard", - "label": "t:sections.main-collection-product-grid.settings.quick_add.options.option_2" + "value": "adapt", + "label": "t:general.image_ratio.options__1.label" }, { - "value": "bulk", - "label": "t:sections.main-collection-product-grid.settings.quick_add.options.option_3" + "value": "1/1", + "label": "t:general.image_ratio.options__2.label" + }, + { + "value": "3/4", + "label": "t:general.image_ratio.options__3.label" + }, + { + "value": "4/3", + "label": "t:general.image_ratio.options__4.label" } ] }, { "type": "header", - "content": "t:sections.featured-collection.settings.header_mobile.content" + "content": "t:general.mobile.name" }, { "type": "select", "id": "columns_mobile", - "default": "2", - "label": "t:sections.featured-collection.settings.columns_mobile.label", "options": [ { "value": "1", - "label": "t:sections.featured-collection.settings.columns_mobile.options__1.label" + "label": "t:general.mobile.columns_mobile.options__1.label" }, { "value": "2", - "label": "t:sections.featured-collection.settings.columns_mobile.options__2.label" + "label": "t:general.mobile.columns_mobile.options__2.label" } - ] - }, + ], + "default": "1", + "label": "t:general.mobile.columns_mobile.label" + }, { "type": "checkbox", "id": "swipe_on_mobile", - "default": false, - "label": "t:sections.featured-collection.settings.swipe_on_mobile.label" - }, + "default": true, + "label": "t:general.mobile.swipe_on_mobile.label" + }, + { + "type": "checkbox", + "id": "show_progress_bar", + "label": "t:general.carousel.show_progress_bar.label", + "default": true, + "visible_if": "{{ section.settings.swipe_on_mobile == true }}" + }, { "type": "header", - "content": "t:sections.all.padding.section_padding_heading" + "content": "t:general.padding.section_heading.content" }, { "type": "range", "id": "padding_top", + "label": "t:general.padding.top.label", + "default": 50, "min": 0, "max": 100, - "step": 4, - "unit": "px", - "label": "t:sections.all.padding.padding_top", - "default": 36 + "step": 2, + "unit": "px" }, { "type": "range", "id": "padding_bottom", + "label": "t:general.padding.bottom.label", + "default": 50, "min": 0, "max": 100, - "step": 4, - "unit": "px", - "label": "t:sections.all.padding.padding_bottom", - "default": 36 + "step": 2, + "unit": "px" + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "default": false, + "label": "t:general.divider.show_divider.label" + }, + { + "type": "select", + "id": "divider_width", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed", + "label": "t:general.divider.width.label" + } + ], + "blocks": [ + { + "type": "collection", + "limit": 8, + "name": "t:general.collection.label", + "settings": [ + { + "type": "collection", + "id": "collection", + "label": "t:general.collection.label" + }, + { + "type": "text", + "id": "title", + "label": "t:general.collection.title.label", + "info": "t:general.collection.title.info" + }, + { + "type": "header", + "content": "t:sections.featured-collection.blocks.collection.settings.header__banner.content" + }, + { + "type": "checkbox", + "id": "show_banner", + "label": "t:sections.featured-collection.blocks.collection.settings.show_banner.label", + "default": false + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "url", + "id": "card_link", + "label": "t:general.card_link.label" + }, + { + "type": "image_picker", + "id": "banner_image", + "label": "t:general.image.label" + }, + { + "type": "range", + "id": "image_overlay_opacity", + "min": 0, + "max": 100, + "step": 2, + "unit": "%", + "label": "t:general.image_overlay_opacity.label", + "default": 0 + }, + { + "type": "select", + "id": "content_position", + "label": "t:general.content_position.label", + "options": [ + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__top_left.label", + "value": "top-left" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__top_center.label", + "value": "top-center" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__top_right.label", + "value": "top-right" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__middle_left.label", + "value": "middle-left" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__middle_center.label", + "value": "middle-center" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__middle_right.label", + "value": "middle-right" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__bottom_left.label", + "value": "bottom-left" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__bottom_center.label", + "value": "bottom-center" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__bottom_right.label", + "value": "bottom-right" + }, + { + "group": "t:general.content_position.optgroup__split.label", + "label": "t:general.content_position.options__middle_content.label", + "value": "split-middle-content" + }, + { + "group": "t:general.content_position.optgroup__split.label", + "label": "t:general.content_position.options__bottom_button.label", + "value": "split-bottom-button" + }, + { + "group": "t:general.content_position.optgroup__split.label", + "label": "t:general.content_position.options__top_subheading.label", + "value": "split-top-subheading" + } + ], + "default": "top-left" + }, + { + "type": "select", + "id": "content_alignment", + "options": [ + { + "value": "left", + "label": "t:general.content_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.content_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.content_alignment.options__3.label" + } + ], + "default": "left", + "label": "t:general.content_alignment.label" + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label" + }, + { + "type": "select", + "id": "subheading_style", + "label": "t:general.subheading_style.label", + "default": "", + "options": [ + { + "value": "", + "label": "t:general.subheading_style.options__1.label" + }, + { + "value": "border", + "label": "t:general.subheading_style.options__2.label" + }, + { + "value": "thick-border", + "label": "t:general.subheading_style.options__3.label" + } + ] + }, + { + "type": "inline_richtext", + "id": "heading", + "default": "Collections", + "label": "t:general.heading.label", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h2", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "select", + "id": "heading_size_mobile", + "label": "t:general.text_size.heading_mobile.label", + "options": [ + { + "value": "inherit", + "label": "t:general.text_size.options__inherit.label" + }, + { + "value": "custom", + "label": "t:general.text_size.options__custom.label" + } + ], + "default": "inherit" + }, + { + "type": "range", + "id": "heading_size_custom", + "label": "t:general.text_size.heading_size_custom.label", + "min": 12, + "max": 100, + "step": 1, + "unit": "px", + "default": 18, + "visible_if": "{{ block.settings.heading_size_mobile == 'custom' }}" + }, + { + "type": "richtext", + "id": "description", + "label": "t:general.text.label" + }, + { + "type": "select", + "id": "text_size", + "label": "t:general.text_size.text.label", + "default": "text-base", + "options": [ + { + "value": "text-sm", + "label": "t:general.text_size.options__small.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-lg", + "label": "t:general.text_size.options__large.label" + }, + { + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label", + "default": "Button label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--primary" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + } + ] } ], "presets": [ { - "name": "t:sections.featured-collection.presets.name" + "name": "t:sections.featured-collection.presets__1.name", + "blocks": [ + { + "type": "collection" + } + ] + }, + { + "name": "t:sections.featured-collection.presets__2.name", + "settings": { + "heading": "Product tabs" + }, + "blocks": [ + { + "type": "collection" + }, + { + "type": "collection" + }, + { + "type": "collection" + } + ] } ] } diff --git a/sections/featured-countdown-timer.liquid b/sections/featured-countdown-timer.liquid new file mode 100644 index 00000000000..28e18bdf9fb --- /dev/null +++ b/sections/featured-countdown-timer.liquid @@ -0,0 +1,1181 @@ +{{ 'section-featured-countdown-timer.css' | asset_url | stylesheet_tag }} +{%- liquid + assign image_card_blocks = section.blocks | where: 'type', 'image-card' + assign countdown_block = section.blocks | where: 'type', 'countdown-timer' + assign columns_mobile_int = section.settings.columns_mobile | plus: 0 + assign enable_slider_mobile = false + if section.settings.swipe_on_mobile and image_card_blocks.size > columns_mobile_int + assign enable_slider_mobile = true + endif + assign motion_delay = 0 + assign animation_effect = 'fade-up' +-%} +{% render 'divider', + show_divider: section.settings.show_section_divider, + divider_width: section.settings.divider_width +%} +
    +
    +
    +
    + {%- for block in countdown_block -%} + {%- liquid + assign background_image = block.settings.background_image + assign background_image_mobile = block.settings.background_image_mobile + + assign background_image_alt = background_image.alt | default: shop.name | escape + assign image_overlay_opacity = block.settings.image_overlay_opacity + + assign image_ratio = background_image.aspect_ratio | default: '1/1' + if background_image_mobile == blank + assign image_mobile_ratio = image_ratio + else + assign image_mobile_ratio = background_image_mobile.aspect_ratio + endif + + assign loading = 'lazy' + assign fetchpriority = 'auto' + if forloop.index0 == 1 and section.index < 2 or block.setting.enable_preload_image + assign loading = 'eager' + assign fetchpriority = 'high' + endif + assign content_position = block.settings.content_position + assign layout = 'standard' + if content_position contains 'split' + assign layout = 'split' + assign content_position = content_position | replace: 'split-', '' + endif + assign card_classes = 'card-media card-media--auto-height card-media--content-' | append: content_position | append: ' card-media--' | append: block.settings.content_spacing + assign card_classes = card_classes | append: ' relative overflow-hidden hover-wrapper color-' | append: block.settings.color_scheme + -%} + {%- if block.settings.card_link != blank -%} + + {%- endif -%} +
    +
    + + + {%- if background_image != blank -%} + {%- if background_image_mobile -%} + + {%- endif -%} + {{ + background_image + | image_url: width: background_image.width + | image_tag: + loading: loading, + fetchpriority: fetchpriority, + class: 'motion-reduce absolute inset-0 w-full h-full hover-scale-up', + widths: '165, 360, 535, 750, 940, 1100', + is: 'image-lazy', + alt: background_image_alt + }} + {%- else -%} + {{ 'image' | placeholder_svg_tag: 'placeholder-svg hover-scale-up w-full h-full' }} + {%- endif -%} + + {% if image_overlay_opacity and image_overlay_opacity > 0 %} +
    + {% endif %} +
    +
    +
    + {%- if block.settings.heading != blank + or block.settings.text != blank + or block.settings.button_label != blank + or block.settings.subheading != blank + or block.settings.time == blank + -%} +
    +
    + {%- unless block.settings.subheading == blank -%} + + {{- block.settings.subheading -}} + + {%- assign motion_delay = motion_delay | plus: 50 -%} + {%- endunless -%} + {%- unless block.settings.heading == blank -%} + + {% render 'highlight-text', + hl_text: block.settings.heading, + hl_style: block.settings.highlight_style, + hl_font_style: block.settings.highlight_font_style, + hl_style_color: block.settings.highlight_style_color, + hl_text_color: block.settings.highlight_text_color + %} + + {%- assign motion_delay = motion_delay | plus: 50 -%} + {%- endunless -%} + {%- unless block.settings.text == blank -%} + + {{- block.settings.text -}} + + {%- assign motion_delay = motion_delay | plus: 50 -%} + {%- endunless -%} + {%- unless block.settings.time == blank -%} + + {% render 'countdown-timer', + id: block.id, + type: block.settings.type, + duration: block.settings.duration, + time: block.settings.time, + style: block.settings.style, + number_size: block.settings.number_size, + motion_delay: motion_delay, + custom_class: 'block' + %} + + {%- assign motion_delay = motion_delay | plus: 50 -%} + {%- endunless -%} + {%- unless block.settings.button_label == blank -%} + {% liquid + assign button_attr = '' + unless block.settings.card_link + assign button_attr = 'disabled' + endunless + %} + + {% render 'button', + button_style: block.settings.button_style, + button_tag: 'button', + button_label: block.settings.button_label, + button_icon: block.settings.button_icon, + additional_attributes: button_attr + %} + + {%- assign motion_delay = motion_delay | plus: 50 -%} + {%- endunless -%} +
    +
    + {%- endif -%} +
    + {%- if block.settings.card_link != blank-%} +
    + {%- endif -%} + {%- endfor -%} +
    +
    +
    +
    +
    + {%- for block in image_card_blocks -%} + {% render 'card-image', + parent_color_scheme: section.settings.color_scheme, + color_scheme: block.settings.color_scheme, + link: block.settings.image_link, + image: block.settings.image, + heading: block.settings.heading, + highlight_style: block.settings.highlight_style, + highlight_font_style: block.settings.highlight_font_style, + highlight_style_color: block.settings.highlight_style_color, + highlight_text_color: block.settings.highlight_text_color, + heading_size: block.settings.heading_size, + description: block.settings.text, + content_spacing: 'extra-small', + content_position: 'bottom-center', + content_alignment: block.settings.content_alignment, + section_index: section.index, + forloop_index: forloop.index, + heading_size_custom: block.settings.heading_size_custom, + heading_size_mobile: block.settings.heading_size_mobile + %} + {%- endfor -%} +
    +
    +
    +
    +
    + +{% schema %} +{ + "name": "t:sections.featured-countdown-timer.name", + "disabled_on": { + "groups": ["header", "footer", "custom.overlay"] + }, + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "select", + "id": "container", + "label": "t:general.container.label", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed" + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "header", + "content": "t:general.grid.name" + }, + { + "type": "range", + "id": "columns_desktop", + "min": 2, + "max": 4, + "step": 1, + "default": 4, + "label": "t:general.grid.columns_desktop.label" + }, + { + "type": "select", + "id": "column_gap", + "label": "t:general.grid.column_gap.label", + "options": [ + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ], + "default": "2xs" + }, + { + "type": "select", + "id": "row_gap", + "options": [ + { + "value": "inherit", + "label": "t:general.grid.gap.options__inherit.label" + }, + { + "value": "none", + "label": "t:general.grid.gap.options__none.label" + }, + { + "value": "2xs", + "label": "t:general.grid.gap.options__2xs.label" + }, + { + "value": "extra-small", + "label": "t:general.grid.gap.options__xs.label" + }, + { + "value": "small", + "label": "t:general.grid.gap.options__sm.label" + }, + { + "value": "medium", + "label": "t:general.grid.gap.options__md.label" + }, + { + "value": "large", + "label": "t:general.grid.gap.options__lg.label" + }, + { + "value": "extra-large", + "label": "t:general.grid.gap.options__xl.label" + } + ], + "default": "inherit", + "label": "t:general.grid.row_gap.label" + }, + { + "type": "header", + "content": "t:general.mobile.name" + }, + { + "type": "select", + "id": "columns_mobile", + "options": [ + { + "value": "1", + "label": "t:general.mobile.columns_mobile.options__1.label" + }, + { + "value": "2", + "label": "t:general.mobile.columns_mobile.options__2.label" + }, + { + "value": "3", + "label": "t:general.mobile.columns_mobile.options__3.label" + } + ], + "default": "1", + "label": "t:general.mobile.columns_mobile.label" + }, + { + "type": "checkbox", + "id": "swipe_on_mobile", + "default": true, + "label": "t:general.mobile.swipe_on_mobile.label" + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "default": false, + "label": "t:general.divider.show_divider.label" + }, + { + "type": "select", + "id": "divider_width", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed", + "label": "t:general.divider.width.label" + }, + { + "type": "header", + "content": "t:general.padding.section_heading.content" + }, + { + "type": "range", + "id": "padding_top", + "min": 0, + "max": 120, + "step": 2, + "unit": "px", + "label": "t:general.padding.top.label", + "default": 50 + }, + { + "type": "range", + "id": "padding_bottom", + "min": 0, + "max": 120, + "step": 2, + "unit": "px", + "label": "t:general.padding.bottom.label", + "default": 50 + } + ], + "blocks": [ + { + "type": "countdown-timer", + "name": "t:general.timer.name", + "limit": 1, + "settings": [ + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "image_picker", + "id": "background_image", + "label": "t:general.image.label" + }, + { + "type": "image_picker", + "id": "background_image_mobile", + "label": "t:general.image_mobile.label" + }, + { + "type": "range", + "id": "image_overlay_opacity", + "min": 0, + "max": 100, + "step": 10, + "unit": "%", + "label": "t:general.image_overlay_opacity.label", + "default": 0 + }, + { + "type": "select", + "id": "content_spacing", + "label": "t:general.content_spacing.label", + "default": "medium", + "options": [ + { + "value": "extra-small", + "label": "t:general.content_spacing.options__4.label" + }, + { + "value": "small", + "label": "t:general.content_spacing.options__1.label" + }, + { + "value": "medium", + "label": "t:general.content_spacing.options__2.label" + }, + { + "value": "large", + "label": "t:general.content_spacing.options__3.label" + } + ] + }, + { + "type": "select", + "id": "content_position", + "label": "t:general.content_position.label", + "options": [ + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__top_left.label", + "value": "top-left" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__top_center.label", + "value": "top-center" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__top_right.label", + "value": "top-right" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__middle_left.label", + "value": "middle-left" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__middle_center.label", + "value": "middle-center" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__middle_right.label", + "value": "middle-right" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__bottom_left.label", + "value": "bottom-left" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__bottom_center.label", + "value": "bottom-center" + }, + { + "group": "t:general.content_position.optgroup__standard.label", + "label": "t:general.content_position.options__bottom_right.label", + "value": "bottom-right" + }, + { + "group": "t:general.content_position.optgroup__split.label", + "label": "t:general.content_position.options__middle_content.label", + "value": "split-middle-content" + }, + { + "group": "t:general.content_position.optgroup__split.label", + "label": "t:general.content_position.options__bottom_button.label", + "value": "split-bottom-button" + }, + { + "group": "t:general.content_position.optgroup__split.label", + "label": "t:general.content_position.options__top_subheading.label", + "value": "split-top-subheading" + } + ], + "default": "bottom-center" + }, + { + "type": "select", + "id": "content_alignment", + "label": "t:general.content_alignment.label", + "default": "center", + "options": [ + { + "value": "left", + "label": "t:general.content_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.content_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.content_alignment.options__3.label" + } + ] + }, + { + "type": "header", + "content": "t:general.timer.content" + }, + { + "type": "select", + "id": "type", + "label": "t:general.timer.type.label", + "options": [ + { + "value": "evergreen", + "label": "t:general.timer.type.options__1.label" + }, + { + "value": "fixed_time", + "label": "t:general.timer.type.options__2.label" + } + ], + "default": "evergreen" + }, + { + "type": "select", + "id": "style", + "label": "t:general.timer.style.label", + "options": [ + { + "value": "number", + "label": "t:general.timer.style.options__1.label" + }, + { + "value": "with_text", + "label": "t:general.timer.style.options__2.label" + } + ], + "default": "number" + }, + { + "type": "select", + "id": "number_size", + "label": "t:general.timer.number_size.label", + "default": "h2", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + } + ] + }, + { + "type": "header", + "content": "t:general.timer.header__evergreen.content" + }, + { + "type": "select", + "id": "duration", + "label": "t:general.timer.evergreen_duration.label", + "options": [ + { + "value": "every_2_hrs", + "label": "t:general.timer.evergreen_duration.options__every_2_hrs.label" + }, + { + "value": "every_6_hrs", + "label": "t:general.timer.evergreen_duration.options__every_6_hrs.label" + }, + { + "value": "every_12_hrs", + "label": "t:general.timer.evergreen_duration.options__every_12_hrs.label" + }, + { + "value": "every_24_hrs", + "label": "t:general.timer.evergreen_duration.options__every_24_hrs.label" + }, + { + "value": "every_week", + "label": "t:general.timer.evergreen_duration.options__every_week.label" + }, + { + "value": "every_month", + "label": "t:general.timer.evergreen_duration.options__every_month.label" + } + ], + "default": "every_month" + }, + { + "type": "header", + "content": "t:general.timer.header__fixed_time.content" + }, + { + "type": "text", + "id": "time", + "default": "2025/08/20 03:45 PM", + "label": "t:general.timer.time.label", + "info": "t:general.timer.time.info" + }, + { + "type": "paragraph", + "content": "t:general.timer.time.paragraph" + }, + { + "type": "header", + "content": "t:general.header__content_settings.content" + }, + { + "type": "url", + "id": "card_link", + "label": "t:general.card_link.label" + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label", + "default": "Add a tagline" + }, + { + "type": "inline_richtext", + "id": "heading", + "default": "Talk about your brand", + "label": "t:general.heading.label", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ], + "default": "h2" + }, + { + "type": "richtext", + "id": "text", + "label": "t:general.text.label" + }, + { + "type": "select", + "id": "text_size", + "label": "t:general.text_size.text.label", + "default": "text-base", + "options": [ + { + "value": "text-sm", + "label": "t:general.text_size.options__small.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-lg", + "label": "t:general.text_size.options__large.label" + }, + { + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label", + "default": "Button label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--primary" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + }, + { + "type": "checkbox", + "id": "enable_preload_image", + "label": "t:general.enable_preload_image.label", + "info": "t:general.enable_preload_image.info" + } + ] + }, + { + "type": "image-card", + "name": "t:general.image_card.label", + "limit": 12, + "settings": [ + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "image_picker", + "id": "image", + "label": "t:general.image.label" + }, + { + "type": "url", + "id": "image_link", + "label": "t:general.link.label" + }, + { + "type": "select", + "id": "content_alignment", + "label": "t:general.content_alignment.label", + "default": "center", + "options": [ + { + "value": "left", + "label": "t:general.content_alignment.options__1.label" + }, + { + "value": "center", + "label": "t:general.content_alignment.options__2.label" + }, + { + "value": "right", + "label": "t:general.content_alignment.options__3.label" + } + ] + }, + { + "type": "inline_richtext", + "id": "heading", + "label": "t:general.heading.label", + "default": "Image card", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "options": [ + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "h6", + "label": "t:general.text_size.options__h6.label" + }, + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + } + ], + "default": "h5" + }, + { + "type": "select", + "id": "heading_size_mobile", + "label": "t:general.text_size.heading_mobile.label", + "options": [ + { + "value": "inherit", + "label": "t:general.text_size.options__inherit.label" + }, + { + "value": "custom", + "label": "t:general.text_size.options__custom.label" + } + ], + "default": "inherit" + }, + { + "type": "range", + "id": "heading_size_custom", + "label": "t:general.text_size.heading_size_custom.label", + "min": 12, + "max": 100, + "step": 1, + "unit": "px", + "default": 18, + "visible_if": "{{ block.settings.heading_size_mobile == 'custom' }}" + }, + { + "type": "richtext", + "id": "text", + "label": "t:general.text.label" + } + ] + } + ], + "presets": [ + { + "name": "t:sections.featured-countdown-timer.name", + "blocks": [ + { + "type": "countdown-timer" + }, + { + "type": "image-card" + }, + { + "type": "image-card" + }, + { + "type": "image-card" + }, + { + "type": "image-card" + }, + { + "type": "image-card" + }, + { + "type": "image-card" + }, + { + "type": "image-card" + }, + { + "type": "image-card" + }, + { + "type": "image-card" + }, + { + "type": "image-card" + }, + { + "type": "image-card" + }, + { + "type": "image-card" + } + ] + } + ] +} +{% endschema %} diff --git a/sections/featured-product.liquid b/sections/featured-product.liquid index 1842a27acf4..f8e01943368 100644 --- a/sections/featured-product.liquid +++ b/sections/featured-product.liquid @@ -1,55 +1,46 @@ {%- liquid - assign product = section.settings.product - if product == null - assign placeholder = true + assign featured_product = section.settings.product + + assign media_layout = 'vertical-carousel' + assign mobile_thumbnails = section.settings.mobile_thumbnails | default: 'hide' + assign enable_image_zoom = section.settings.enable_image_zoom | default: false + assign enable_sticky_info = section.settings.enable_sticky_info + + assign product_class = 'product--mobile-thumbs-' | append: mobile_thumbnails + assign product_class = product_class | append: ' product--' | append: section.settings.media_size + assign product_class = product_class | append: ' product--' | append: media_layout + + if featured_product != blank + assign product_class = product_class | append: ' product--media-has-' | append: featured_product.media.size + if featured_product.media.size > 1 + assign product_class = product_class | append: ' product--media-has-many' + endif + else + assign product_class = product_class | append: ' product--media-has-1' + endif + if section.settings.show_image_border + assign product_class = product_class | append: ' product--media-has-border' endif -%} - {{ 'section-main-product.css' | asset_url | stylesheet_tag }} - {{ 'section-featured-product.css' | asset_url | stylesheet_tag }} - {{ 'component-accordion.css' | asset_url | stylesheet_tag }} - {{ 'component-price.css' | asset_url | stylesheet_tag }} {{ 'component-deferred-media.css' | asset_url | stylesheet_tag }} - {{ 'component-rating.css' | asset_url | stylesheet_tag }} - {{ 'component-volume-pricing.css' | asset_url | stylesheet_tag }} - {% unless section.settings.product.has_only_default_variant %} + {% unless featured_product.has_only_default_variant %} {{ 'component-product-variant-picker.css' | asset_url | stylesheet_tag }} - {{ 'component-swatch.css' | asset_url | stylesheet_tag }} - {{ 'component-swatch-input.css' | asset_url | stylesheet_tag }} {% endunless %} - - {%- style -%} - .section-{{ section.id }}-padding { - padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px; - padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px; - } - - @media screen and (min-width: 750px) { - .section-{{ section.id }}-padding { - padding-top: {{ section.settings.padding_top }}px; - padding-bottom: {{ section.settings.padding_bottom }}px; - } - } - {%- endstyle -%} - - - - - - {% comment %} TODO: assign `product.selected_or_first_available_variant` to variable and replace usage to reduce verbosity {% endcomment %} - - {%- assign first_3d_model = product.media | where: 'media_type', 'model' | first -%} - {%- if first_3d_model -%} - {{ 'component-product-model.css' | asset_url | stylesheet_tag }} + {%- assign has_models = featured_product.media | where: 'media_type', 'model' | first -%} + {%- if has_models -%} {%- endif -%} + {%- if enable_image_zoom -%} + + {%- endif -%} - {% assign variant_images = product.images | where: 'attached_to_variant?', true | map: 'src' %} + {%- if featured_product.quantity_price_breaks_configured? -%} + {{ 'component-volume-pricing.css' | asset_url | stylesheet_tag }} + + + {%- endif -%} + + -
    -
    -
    +
    + + {%- if enable_image_zoom -%} + + {%- endif -%} - - {%- if section.settings.image_zoom == 'hover' -%} - - {%- endif %} - {%- if request.design_mode -%} - + {%- if featured_product.media.size > 0 -%} + {%- endif -%} - {%- if first_3d_model -%} - {%- endif -%} - {%- liquid - if product.selected_or_first_available_variant.featured_media - assign seo_media = product.selected_or_first_available_variant.featured_media - else - assign seo_media = product.featured_media - endif - -%} - - - {% if product.media.size > 0 %} - - - {% endif %} - +
    {% schema %} { "name": "t:sections.featured-product.name", - "tag": "section", - "class": "section section-featured-product", "disabled_on": { - "groups": ["header", "footer"] + "groups": ["header", "footer", "custom.overlay"] }, "blocks": [ { @@ -515,13 +179,13 @@ }, { "type": "text", - "name": "t:sections.featured-product.blocks.text.name", + "name": "t:sections.main-product.blocks.text.name", "settings": [ { "type": "inline_richtext", "id": "text", - "default": "t:sections.featured-product.blocks.text.settings.text.default", - "label": "t:sections.featured-product.blocks.text.settings.text.label" + "default": "Text block", + "label": "t:sections.main-product.blocks.text.settings.text.label" }, { "type": "select", @@ -529,65 +193,122 @@ "options": [ { "value": "body", - "label": "t:sections.featured-product.blocks.text.settings.text_style.options__1.label" + "label": "t:sections.main-product.blocks.text.settings.text_style.options__1.label" }, { "value": "subtitle", - "label": "t:sections.featured-product.blocks.text.settings.text_style.options__2.label" + "label": "t:sections.main-product.blocks.text.settings.text_style.options__2.label" }, { "value": "uppercase", - "label": "t:sections.featured-product.blocks.text.settings.text_style.options__3.label" + "label": "t:sections.main-product.blocks.text.settings.text_style.options__3.label" } ], "default": "body", - "label": "t:sections.featured-product.blocks.text.settings.text_style.label" + "label": "t:sections.main-product.blocks.text.settings.text_style.label" + } + ] + }, + { + "type": "rich-text", + "name": "t:sections.rich-text.name", + "settings": [ + { + "type": "richtext", + "id": "text", + "default": "

    Use this text to share information about a product, highlight its features, or provide useful details to help customers make informed decisions.

    ", + "label": "t:sections.main-product.blocks.text.settings.text.label" } ] }, { "type": "title", - "name": "t:sections.featured-product.blocks.title.name", + "name": "t:sections.main-product.blocks.title.name", "limit": 1, "settings": [ { "type": "select", "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h1", "options": [ { - "value": "h2", - "label": "t:sections.all.heading_size.options__1.label" + "value": "h5", + "label": "t:general.text_size.options__h5.label" }, { - "value": "h1", - "label": "t:sections.all.heading_size.options__2.label" + "value": "h4", + "label": "t:general.text_size.options__h4.label" }, { - "value": "h0", - "label": "t:sections.all.heading_size.options__3.label" + "value": "h3", + "label": "t:general.text_size.options__h3.label" }, { - "value": "hxl", - "label": "t:sections.all.heading_size.options__4.label" + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" }, { - "value": "hxxl", - "label": "t:sections.all.heading_size.options__5.label" + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" } - ], - "default": "h1", - "label": "t:sections.all.heading_size.label" + ] } ] }, { "type": "price", - "name": "t:sections.featured-product.blocks.price.name", + "name": "t:sections.main-product.blocks.price.name", "limit": 1 }, { - "type": "sku", - "name": "t:sections.featured-product.blocks.sku.name", + "type": "meta", + "name": "t:sections.main-product.blocks.meta.name", + "limit": 1, + "settings": [ + { + "type": "color", + "id": "link_color", + "label": "t:general.link_color.label", + "default": "#1D349A" + }, + { + "type": "checkbox", + "id": "show_vendor", + "label": "t:general.product.show_vendor.label", + "default": true + }, + { + "type": "checkbox", + "id": "show_product_type", + "label": "t:general.product.show_type.label", + "default": false + }, + { + "type": "checkbox", + "id": "show_sku", + "label": "t:general.product.show_sku.label", + "default": true + }, + { + "type": "checkbox", + "id": "show_barcode", + "label": "t:general.product.show_barcode.label", + "default": false + } + ] + }, + { + "type": "inventory", + "name": "t:sections.main-product.blocks.inventory.name", "limit": 1, "settings": [ { @@ -596,30 +317,41 @@ "options": [ { "value": "body", - "label": "t:sections.featured-product.blocks.sku.settings.text_style.options__1.label" + "label": "t:sections.main-product.blocks.inventory.settings.text_style.options__1.label" }, { "value": "subtitle", - "label": "t:sections.featured-product.blocks.sku.settings.text_style.options__2.label" + "label": "t:sections.main-product.blocks.inventory.settings.text_style.options__2.label" }, { "value": "uppercase", - "label": "t:sections.featured-product.blocks.sku.settings.text_style.options__3.label" + "label": "t:sections.main-product.blocks.inventory.settings.text_style.options__3.label" } ], "default": "body", - "label": "t:sections.featured-product.blocks.sku.settings.text_style.label" + "label": "t:sections.main-product.blocks.inventory.settings.text_style.label" + }, + { + "type": "range", + "id": "inventory_threshold", + "label": "t:sections.main-product.blocks.inventory.settings.inventory_threshold.label", + "min": 0, + "max": 100, + "step": 1, + "info": "t:sections.main-product.blocks.inventory.settings.inventory_threshold.info", + "default": 10 + }, + { + "type": "checkbox", + "id": "show_inventory_quantity", + "label": "t:sections.main-product.blocks.inventory.settings.show_inventory_quantity.label", + "default": true } ] }, - { - "type": "quantity_selector", - "name": "t:sections.featured-product.blocks.quantity_selector.name", - "limit": 1 - }, { "type": "variant_picker", - "name": "t:sections.featured-product.blocks.variant_picker.name", + "name": "t:sections.main-product.blocks.variant_picker.name", "limit": 1, "settings": [ { @@ -628,50 +360,139 @@ "options": [ { "value": "dropdown", - "label": "t:sections.featured-product.blocks.variant_picker.settings.picker_type.options__1.label" + "label": "t:sections.main-product.blocks.variant_picker.settings.picker_type.options__1.label" }, { "value": "button", - "label": "t:sections.featured-product.blocks.variant_picker.settings.picker_type.options__2.label" + "label": "t:sections.main-product.blocks.variant_picker.settings.picker_type.options__2.label" } ], "default": "button", - "label": "t:sections.featured-product.blocks.variant_picker.settings.picker_type.label" + "label": "t:sections.main-product.blocks.variant_picker.settings.picker_type.label" + }, + { + "type": "header", + "content": "t:sections.main-product.blocks.variant_picker.settings.header__color_swatches.content" + }, + { + "type": "paragraph", + "content": "t:sections.main-product.blocks.variant_picker.settings.header__color_swatches.paragraph.content" + }, + { + "type": "select", + "id": "swatch_type", + "options": [ + { + "value": "color_swatch", + "label": "t:sections.main-product.blocks.variant_picker.settings.swatch_type.options__1.label" + }, + { + "value": "variant_image", + "label": "t:sections.main-product.blocks.variant_picker.settings.swatch_type.options__2.label" + } + ], + "default": "color_swatch", + "label": "t:sections.main-product.blocks.variant_picker.settings.swatch_type.label" }, { - "id": "swatch_shape", - "label": "t:sections.featured-product.blocks.variant_picker.settings.swatch_shape.label", "type": "select", - "info": "t:sections.featured-product.blocks.variant_picker.settings.swatch_shape.info", + "id": "swatch_style", "options": [ + { + "value": "standard", + "label": "t:sections.main-product.blocks.variant_picker.settings.swatch_style.options__1.label" + }, { "value": "circle", - "label": "t:sections.featured-product.blocks.variant_picker.settings.swatch_shape.options__1.label" + "label": "t:sections.main-product.blocks.variant_picker.settings.swatch_style.options__2.label" }, { "value": "square", - "label": "t:sections.featured-product.blocks.variant_picker.settings.swatch_shape.options__2.label" + "label": "t:sections.main-product.blocks.variant_picker.settings.swatch_style.options__3.label" + } + ], + "default": "standard", + "label": "t:sections.main-product.blocks.variant_picker.settings.swatch_style.label" + }, + { + "type": "range", + "id": "swatch_size", + "label": "t:sections.main-product.blocks.variant_picker.settings.swatch_size.label", + "min": 20, + "max": 128, + "step": 2, + "default": 40, + "unit": "px" + }, + { + "type": "header", + "content": "t:general.button.header.content" + }, + { + "type": "select", + "id": "button_style", + "options": [ + { + "value": "normal", + "label": "t:sections.main-product.blocks.variant_picker.settings.button_style.options__1.label" }, { - "value": "none", - "label": "t:sections.main-product.blocks.variant_picker.settings.swatch_shape.options__3.label" + "value": "circle", + "label": "t:sections.main-product.blocks.variant_picker.settings.button_style.options__2.label" + }, + { + "value": "square", + "label": "t:sections.main-product.blocks.variant_picker.settings.button_style.options__3.label" } ], - "default": "circle" + "default": "normal", + "label": "t:sections.main-product.blocks.variant_picker.settings.button_style.label" + }, + { + "type": "header", + "content": "t:sections.main-product.blocks.variant_picker.settings.size_chart.content" + }, + { + "type": "text", + "id": "size_title", + "default": "Size", + "label": "t:sections.main-product.blocks.variant_picker.settings.size_chart.form_option_title.label", + "info": "t:sections.main-product.blocks.variant_picker.settings.size_chart.form_option_title.info" + }, + { + "type": "page", + "id": "size_chart_from_page", + "label": "t:sections.main-product.blocks.variant_picker.settings.size_chart.from_page.label", + "info": "t:sections.main-product.blocks.variant_picker.settings.size_chart.from_page.info" + }, + { + "type": "header", + "content": "t:sections.main-product.blocks.variant_picker.settings.size_chart.custom.content", + "info": "t:sections.main-product.blocks.variant_picker.settings.size_chart.custom.info" + }, + { + "type": "paragraph", + "content": "t:sections.main-product.blocks.variant_picker.settings.size_chart.paragraph_2.content" } ] }, { "type": "buy_buttons", - "name": "t:sections.featured-product.blocks.buy_buttons.name", + "name": "t:sections.main-product.blocks.buy_buttons.name", "limit": 1, "settings": [ + { + "type": "checkbox", + "id": "show_quantity_selector", + "default": true, + "label": "t:sections.main-product.blocks.buy_buttons.settings.show_quantity_selector.label" + }, { "type": "checkbox", "id": "show_dynamic_checkout", "default": true, - "label": "t:sections.featured-product.blocks.buy_buttons.settings.show_dynamic_checkout.label", - "info": "t:sections.featured-product.blocks.buy_buttons.settings.show_dynamic_checkout.info" + "label": "t:sections.main-product.blocks.buy_buttons.settings.show_dynamic_checkout.label", + "info": "t:sections.main-product.blocks.buy_buttons.settings.show_dynamic_checkout.info" }, { "type": "checkbox", @@ -683,17 +504,14 @@ ] }, { - "type": "share", - "name": "t:sections.featured-product.blocks.share.name", - "limit": 1, - "settings": [ - { - "type": "text", - "id": "share_label", - "label": "t:sections.featured-product.blocks.share.settings.text.label", - "default": "t:sections.featured-product.blocks.share.settings.text.default" - } - ] + "type": "pickup_availability", + "name": "t:sections.main-product.blocks.pickup_availability.name", + "limit": 1 + }, + { + "type": "description", + "name": "t:sections.main-product.blocks.description.name", + "limit": 1 }, { "type": "custom_liquid", @@ -708,797 +526,1578 @@ ] }, { - "type": "rating", - "name": "t:sections.featured-product.blocks.rating.name", - "limit": 1, - "settings": [ - { - "type": "paragraph", - "content": "t:sections.featured-product.blocks.rating.settings.paragraph.content" - } - ] - }, - { - "type": "icon-with-text", - "name": "t:sections.main-product.blocks.icon_with_text.name", + "type": "collapsible_tab", + "name": "t:sections.main-product.blocks.collapsible_tab.name", "settings": [ { - "type": "select", - "id": "layout", - "options": [ - { - "value": "horizontal", - "label": "t:sections.main-product.blocks.icon_with_text.settings.layout.options__1.label" - }, - { - "value": "vertical", - "label": "t:sections.main-product.blocks.icon_with_text.settings.layout.options__2.label" - } - ], - "default": "horizontal", - "label": "t:sections.main-product.blocks.icon_with_text.settings.layout.label" - }, - { - "type": "header", - "content": "t:sections.main-product.blocks.icon_with_text.settings.content.label", - "info": "t:sections.main-product.blocks.icon_with_text.settings.content.info" + "type": "text", + "id": "heading", + "default": "Collapsible row", + "info": "t:sections.main-product.blocks.collapsible_tab.settings.heading.info", + "label": "t:sections.main-product.blocks.collapsible_tab.settings.heading.label" }, { "type": "select", - "id": "icon_1", + "id": "icon", "options": [ { "value": "none", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__1.label" - }, - { - "value": "apple", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__2.label" - }, - { - "value": "banana", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__3.label" - }, - { - "value": "bottle", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__4.label" - }, - { - "value": "box", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__5.label" - }, - { - "value": "carrot", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__6.label" - }, - { - "value": "chat_bubble", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__7.label" - }, - { - "value": "check_mark", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__8.label" - }, - { - "value": "clipboard", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__9.label" - }, - { - "value": "dairy", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__10.label" + "label": "t:general.icon.options__1.label" }, { - "value": "dairy_free", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__11.label" + "value": "car-simple", + "label": "t:general.icon.options__2.label" }, { - "value": "dryer", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__12.label" + "value": "truck", + "label": "t:general.icon.options__3.label" }, { - "value": "eye", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__13.label" + "value": "package", + "label": "t:general.icon.options__4.label" }, { - "value": "fire", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__14.label" + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" }, { - "value": "gluten_free", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__15.label" + "value": "gift", + "label": "t:general.icon.options__6.label" }, { "value": "heart", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__16.label" + "label": "t:general.icon.options__7.label" }, { - "value": "iron", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__17.label" + "value": "globe", + "label": "t:general.icon.options__8.label" }, { - "value": "leaf", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__18.label" + "value": "check", + "label": "t:general.icon.options__9.label" }, { - "value": "leather", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__19.label" + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" }, { - "value": "lightning_bolt", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__20.label" + "value": "lightning", + "label": "t:general.icon.options__11.label" }, { - "value": "lipstick", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__21.label" + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" }, { - "value": "lock", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__22.label" + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" }, { - "value": "map_pin", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__23.label" + "value": "location", + "label": "t:general.icon.options__14.label" }, { - "value": "nut_free", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__24.label" + "value": "tag", + "label": "t:general.icon.options__15.label" }, { - "value": "pants", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__25.label" + "value": "map-pin", + "label": "t:general.icon.options__16.label" }, { - "value": "paw_print", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__26.label" + "value": "smiley", + "label": "t:general.icon.options__17.label" }, { - "value": "pepper", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__27.label" + "value": "stool", + "label": "t:general.icon.options__18.label" }, { - "value": "perfume", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__28.label" + "value": "clock", + "label": "t:general.icon.options__19.label" }, { - "value": "plane", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__29.label" + "value": "phone", + "label": "t:general.icon.options__20.label" }, { - "value": "plant", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__30.label" + "value": "chat", + "label": "t:general.icon.options__21.label" }, { - "value": "price_tag", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__31.label" + "value": "paperplane", + "label": "t:general.icon.options__22.label" }, { - "value": "question_mark", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__32.label" + "value": "sliders", + "label": "t:general.icon.options__23.label" }, { - "value": "recycle", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__33.label" + "value": "sound", + "label": "t:general.icon.options__24.label" }, { - "value": "return", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__34.label" + "value": "music", + "label": "t:general.icon.options__25.label" }, { - "value": "ruler", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__35.label" + "value": "airplane", + "label": "t:general.icon.options__26.label" }, { - "value": "serving_dish", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__36.label" + "value": "alarm", + "label": "t:general.icon.options__27.label" }, { - "value": "shirt", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__37.label" + "value": "play-list", + "label": "t:general.icon.options__28.label" }, { - "value": "shoe", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__38.label" + "value": "drop-slash", + "label": "t:general.icon.options__29.label" }, { - "value": "silhouette", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__39.label" + "value": "pause-circle", + "label": "t:general.icon.options__30.label" }, { - "value": "snowflake", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__40.label" + "value": "acorn", + "label": "t:general.icon.options__34.label" }, { - "value": "star", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__41.label" - }, + "value": "leaf", + "label": "t:general.icon.options__35.label" + } + ], + "default": "check", + "label": "t:general.icon.label" + }, + { + "type": "richtext", + "id": "content", + "label": "t:sections.main-product.blocks.collapsible_tab.settings.content.label" + }, + { + "type": "page", + "id": "page", + "label": "t:sections.main-product.blocks.collapsible_tab.settings.page.label" + }, + { + "type": "checkbox", + "label": "t:sections.main-product.blocks.collapsible_tab.settings.default_open.label", + "id": "default_open", + "default": false + } + ] + }, + { + "type": "popup", + "name": "t:sections.main-product.blocks.popup.name", + "settings": [ + { + "type": "text", + "id": "button_label", + "label": "t:sections.main-product.blocks.popup.settings.link_label.label", + "default": "Pop-up button text" + }, + { + "type": "select", + "id": "button_style", + "label": "t:sections.main-product.blocks.popup.settings.link_style.label", + "options": [ { - "value": "stopwatch", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__42.label" + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" }, { - "value": "truck", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__43.label" + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" }, { - "value": "washing", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__44.label" + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" } ], - "default": "heart", - "label": "t:sections.main-product.blocks.icon_with_text.settings.icon_1.label" + "default": "btn--underline" }, { - "type": "image_picker", - "id": "image_1", - "label": "t:sections.main-product.blocks.icon_with_text.settings.image_1.label" + "type": "header", + "content": "t:sections.main-product.blocks.popup.settings.page.header" }, { - "type": "inline_richtext", - "id": "heading_1", - "default": "t:sections.main-product.blocks.icon_with_text.settings.heading_1.default", - "label": "t:sections.main-product.blocks.icon_with_text.settings.heading_1.label", - "info": "t:sections.main-product.blocks.icon_with_text.settings.heading.info" + "id": "page", + "type": "page", + "label": "t:sections.main-product.blocks.popup.settings.page.label" + } + ] + }, + { + "type": "complementary", + "name": "t:sections.main-product.blocks.complementary_products.name", + "limit": 1, + "settings": [ + { + "type": "paragraph", + "content": "t:sections.main-product.blocks.complementary_products.settings.paragraph.content" + }, + { + "type": "text", + "id": "block_heading", + "default": "Pairs well with", + "label": "t:general.heading.label" }, { "type": "select", - "id": "icon_2", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h4", "options": [ { - "value": "none", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__1.label" - }, - { - "value": "apple", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__2.label" - }, - { - "value": "banana", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__3.label" + "value": "h5", + "label": "t:general.text_size.options__h5.label" }, { - "value": "bottle", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__4.label" + "value": "h4", + "label": "t:general.text_size.options__h4.label" }, { - "value": "box", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__5.label" - }, + "value": "h3", + "label": "t:general.text_size.options__h3.label" + } + ] + }, + { + "type": "checkbox", + "id": "make_collapsible_row", + "default": false, + "label": "t:sections.main-product.blocks.complementary_products.settings.make_collapsible_row.label" + }, + { + "type": "select", + "id": "icon", + "options": [ { - "value": "carrot", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__6.label" + "value": "none", + "label": "t:general.icon.options__1.label" }, { - "value": "chat_bubble", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__7.label" + "value": "car-simple", + "label": "t:general.icon.options__2.label" }, { - "value": "check_mark", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__8.label" + "value": "truck", + "label": "t:general.icon.options__3.label" }, { - "value": "clipboard", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__9.label" + "value": "package", + "label": "t:general.icon.options__4.label" }, { - "value": "dairy", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__10.label" + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" }, { - "value": "dairy_free", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__11.label" + "value": "gift", + "label": "t:general.icon.options__6.label" }, { - "value": "dryer", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__12.label" + "value": "heart", + "label": "t:general.icon.options__7.label" }, { - "value": "eye", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__13.label" + "value": "globe", + "label": "t:general.icon.options__8.label" }, { - "value": "fire", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__14.label" + "value": "check", + "label": "t:general.icon.options__9.label" }, { - "value": "gluten_free", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__15.label" + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" }, { - "value": "heart", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__16.label" + "value": "lightning", + "label": "t:general.icon.options__11.label" }, { - "value": "iron", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__17.label" + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" }, { - "value": "leaf", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__18.label" + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" }, { - "value": "leather", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__19.label" + "value": "location", + "label": "t:general.icon.options__14.label" }, { - "value": "lightning_bolt", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__20.label" + "value": "tag", + "label": "t:general.icon.options__15.label" }, { - "value": "lipstick", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__21.label" + "value": "map-pin", + "label": "t:general.icon.options__16.label" }, { - "value": "lock", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__22.label" + "value": "smiley", + "label": "t:general.icon.options__17.label" }, { - "value": "map_pin", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__23.label" + "value": "stool", + "label": "t:general.icon.options__18.label" }, { - "value": "nut_free", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__24.label" + "value": "clock", + "label": "t:general.icon.options__19.label" }, { - "value": "pants", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__25.label" + "value": "phone", + "label": "t:general.icon.options__20.label" }, { - "value": "paw_print", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__26.label" + "value": "chat", + "label": "t:general.icon.options__21.label" }, { - "value": "pepper", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__27.label" + "value": "paperplane", + "label": "t:general.icon.options__22.label" }, { - "value": "perfume", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__28.label" + "value": "sliders", + "label": "t:general.icon.options__23.label" }, { - "value": "plane", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__29.label" + "value": "sound", + "label": "t:general.icon.options__24.label" }, { - "value": "plant", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__30.label" + "value": "music", + "label": "t:general.icon.options__25.label" }, { - "value": "price_tag", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__31.label" + "value": "airplane", + "label": "t:general.icon.options__26.label" }, { - "value": "question_mark", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__32.label" + "value": "alarm", + "label": "t:general.icon.options__27.label" }, { - "value": "recycle", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__33.label" + "value": "play-list", + "label": "t:general.icon.options__28.label" }, { - "value": "return", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__34.label" + "value": "drop-slash", + "label": "t:general.icon.options__29.label" }, { - "value": "ruler", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__35.label" + "value": "pause-circle", + "label": "t:general.icon.options__30.label" }, { - "value": "serving_dish", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__36.label" + "value": "acorn", + "label": "t:general.icon.options__34.label" }, { - "value": "shirt", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__37.label" - }, + "value": "leaf", + "label": "t:general.icon.options__35.label" + } + ], + "default": "check", + "info": "t:sections.main-product.blocks.complementary_products.settings.icon.info", + "label": "t:general.icon.label" + }, + { + "type": "range", + "id": "product_list_limit", + "min": 1, + "max": 10, + "step": 1, + "default": 10, + "label": "t:general.grid.product_limit.label" + }, + { + "type": "select", + "id": "layout", + "label": "t:sections.main-product.blocks.complementary_products.settings.layout.label", + "default": "grid", + "options": [ + { + "value": "grid", + "label": "t:sections.main-product.blocks.complementary_products.settings.layout.options__1.label" + }, + { + "value": "horizontal-list", + "label": "t:sections.main-product.blocks.complementary_products.settings.layout.options__2.label" + } + ] + }, + { + "type": "range", + "id": "columns", + "label": "t:general.grid.columns_desktop.label", + "min": 2, + "max": 4, + "step": 1, + "default": 3, + "visible_if": "{{ block.settings.layout == 'grid' }}" + }, + { + "type": "header", + "content": "t:general.header__product_cards.content" + }, + { + "type": "select", + "id": "image_ratio", + "options": [ + { + "value": "adapt", + "label": "t:general.image_ratio.options__1.label" + }, + { + "value": "1/1", + "label": "t:general.image_ratio.options__2.label" + }, + { + "value": "3/4", + "label": "t:general.image_ratio.options__3.label" + }, + { + "value": "4/3", + "label": "t:general.image_ratio.options__4.label" + } + ], + "label": "t:general.image_ratio.label", + "default": "adapt" + }, + { + "type": "checkbox", + "id": "enable_quick_add", + "label": "t:sections.main-product.blocks.complementary_products.settings.enable_quick_add.label", + "default": false + } + ] + }, + { + "type": "icon-with-text", + "name": "t:sections.main-product.blocks.icon_with_text.name", + "settings": [ + { + "type": "select", + "id": "layout", + "options": [ + { + "value": "horizontal", + "label": "t:sections.main-product.blocks.icon_with_text.settings.layout.options__1.label" + }, + { + "value": "vertical", + "label": "t:sections.main-product.blocks.icon_with_text.settings.layout.options__2.label" + } + ], + "default": "horizontal", + "label": "t:sections.main-product.blocks.icon_with_text.settings.layout.label" + }, + { + "type": "select", + "id": "title_font", + "label": "t:general.font_family.title.label", + "options": [ + { + "value": "body", + "label": "t:general.font_family.options__1.label" + }, + { + "value": "body-bolder", + "label": "t:general.font_family.options__3.label" + }, + { + "value": "heading", + "label": "t:general.font_family.options__2.label" + } + ], + "default": "heading" + }, + { + "type": "select", + "id": "title_size", + "label": "t:general.text_size.title.label", + "options": [ { - "value": "shoe", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__38.label" + "value": "text-base", + "label": "t:general.text_size.options__base.label" }, { - "value": "silhouette", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__39.label" + "value": "h5", + "label": "t:general.text_size.options__h5.label" }, { - "value": "snowflake", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__40.label" + "value": "h4", + "label": "t:general.text_size.options__h4.label" }, { - "value": "star", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__41.label" + "value": "h3", + "label": "t:general.text_size.options__h3.label" + } + ], + "default": "h5" + }, + { + "type": "header", + "content": "t:sections.main-product.blocks.icon_with_text.settings.first_item.label" + }, + { + "type": "select", + "id": "icon_1", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" }, { - "value": "stopwatch", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__42.label" + "value": "car-simple", + "label": "t:general.icon.options__2.label" }, { "value": "truck", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__43.label" + "label": "t:general.icon.options__3.label" + }, + { + "value": "package", + "label": "t:general.icon.options__4.label" + }, + { + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" + }, + { + "value": "gift", + "label": "t:general.icon.options__6.label" + }, + { + "value": "heart", + "label": "t:general.icon.options__7.label" + }, + { + "value": "globe", + "label": "t:general.icon.options__8.label" + }, + { + "value": "check", + "label": "t:general.icon.options__9.label" + }, + { + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" + }, + { + "value": "lightning", + "label": "t:general.icon.options__11.label" + }, + { + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" + }, + { + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" + }, + { + "value": "location", + "label": "t:general.icon.options__14.label" + }, + { + "value": "tag", + "label": "t:general.icon.options__15.label" + }, + { + "value": "map-pin", + "label": "t:general.icon.options__16.label" + }, + { + "value": "smiley", + "label": "t:general.icon.options__17.label" + }, + { + "value": "stool", + "label": "t:general.icon.options__18.label" + }, + { + "value": "clock", + "label": "t:general.icon.options__19.label" + }, + { + "value": "phone", + "label": "t:general.icon.options__20.label" + }, + { + "value": "chat", + "label": "t:general.icon.options__21.label" + }, + { + "value": "paperplane", + "label": "t:general.icon.options__22.label" + }, + { + "value": "sliders", + "label": "t:general.icon.options__23.label" }, { - "value": "washing", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__44.label" + "value": "sound", + "label": "t:general.icon.options__24.label" + }, + { + "value": "music", + "label": "t:general.icon.options__25.label" + }, + { + "value": "airplane", + "label": "t:general.icon.options__26.label" + }, + { + "value": "alarm", + "label": "t:general.icon.options__27.label" + }, + { + "value": "play-list", + "label": "t:general.icon.options__28.label" + }, + { + "value": "drop-slash", + "label": "t:general.icon.options__29.label" + }, + { + "value": "pause-circle", + "label": "t:general.icon.options__30.label" + }, + { + "value": "acorn", + "label": "t:general.icon.options__34.label" + }, + { + "value": "leaf", + "label": "t:general.icon.options__35.label" } ], - "default": "return", - "label": "t:sections.main-product.blocks.icon_with_text.settings.icon_2.label" + "default": "check", + "label": "t:general.icon.label" }, { "type": "image_picker", - "id": "image_2", - "label": "t:sections.main-product.blocks.icon_with_text.settings.image_2.label" + "id": "image_1", + "label": "t:general.image.label" }, { "type": "inline_richtext", - "id": "heading_2", - "default": "t:sections.main-product.blocks.icon_with_text.settings.heading_2.default", - "label": "t:sections.main-product.blocks.icon_with_text.settings.heading_2.label", + "id": "heading_1", + "default": "Heading", + "label": "t:general.heading.label", "info": "t:sections.main-product.blocks.icon_with_text.settings.heading.info" }, + { + "type": "header", + "content": "t:sections.main-product.blocks.icon_with_text.settings.second_item.label" + }, { "type": "select", - "id": "icon_3", + "id": "icon_2", "options": [ { "value": "none", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__1.label" + "label": "t:general.icon.options__1.label" + }, + { + "value": "car-simple", + "label": "t:general.icon.options__2.label" }, { - "value": "apple", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__2.label" + "value": "truck", + "label": "t:general.icon.options__3.label" }, { - "value": "banana", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__3.label" + "value": "package", + "label": "t:general.icon.options__4.label" }, { - "value": "bottle", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__4.label" + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" }, { - "value": "box", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__5.label" + "value": "gift", + "label": "t:general.icon.options__6.label" }, { - "value": "carrot", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__6.label" + "value": "heart", + "label": "t:general.icon.options__7.label" }, { - "value": "chat_bubble", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__7.label" + "value": "globe", + "label": "t:general.icon.options__8.label" }, { - "value": "check_mark", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__8.label" + "value": "check", + "label": "t:general.icon.options__9.label" }, { - "value": "clipboard", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__9.label" + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" }, { - "value": "dairy", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__10.label" + "value": "lightning", + "label": "t:general.icon.options__11.label" }, { - "value": "dairy_free", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__11.label" + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" }, { - "value": "dryer", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__12.label" + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" }, { - "value": "eye", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__13.label" + "value": "location", + "label": "t:general.icon.options__14.label" }, { - "value": "fire", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__14.label" + "value": "tag", + "label": "t:general.icon.options__15.label" }, { - "value": "gluten_free", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__15.label" + "value": "map-pin", + "label": "t:general.icon.options__16.label" }, { - "value": "heart", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__16.label" + "value": "smiley", + "label": "t:general.icon.options__17.label" }, { - "value": "iron", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__17.label" + "value": "stool", + "label": "t:general.icon.options__18.label" + }, + { + "value": "clock", + "label": "t:general.icon.options__19.label" + }, + { + "value": "phone", + "label": "t:general.icon.options__20.label" + }, + { + "value": "chat", + "label": "t:general.icon.options__21.label" + }, + { + "value": "paperplane", + "label": "t:general.icon.options__22.label" + }, + { + "value": "sliders", + "label": "t:general.icon.options__23.label" + }, + { + "value": "sound", + "label": "t:general.icon.options__24.label" + }, + { + "value": "music", + "label": "t:general.icon.options__25.label" + }, + { + "value": "airplane", + "label": "t:general.icon.options__26.label" + }, + { + "value": "alarm", + "label": "t:general.icon.options__27.label" + }, + { + "value": "play-list", + "label": "t:general.icon.options__28.label" + }, + { + "value": "drop-slash", + "label": "t:general.icon.options__29.label" + }, + { + "value": "pause-circle", + "label": "t:general.icon.options__30.label" + }, + { + "value": "acorn", + "label": "t:general.icon.options__34.label" }, { "value": "leaf", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__18.label" + "label": "t:general.icon.options__35.label" + } + ], + "default": "check", + "label": "t:general.icon.label" + }, + { + "type": "image_picker", + "id": "image_2", + "label": "t:general.image.label" + }, + { + "type": "inline_richtext", + "id": "heading_2", + "default": "Heading", + "label": "t:general.heading.label", + "info": "t:sections.main-product.blocks.icon_with_text.settings.heading.info" + }, + { + "type": "header", + "content": "t:sections.main-product.blocks.icon_with_text.settings.third_item.label" + }, + { + "type": "select", + "id": "icon_3", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" + }, + { + "value": "car-simple", + "label": "t:general.icon.options__2.label" }, { - "value": "leather", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__19.label" + "value": "truck", + "label": "t:general.icon.options__3.label" }, { - "value": "lightning_bolt", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__20.label" + "value": "package", + "label": "t:general.icon.options__4.label" }, { - "value": "lipstick", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__21.label" + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" }, { - "value": "lock", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__22.label" + "value": "gift", + "label": "t:general.icon.options__6.label" }, { - "value": "map_pin", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__23.label" + "value": "heart", + "label": "t:general.icon.options__7.label" }, { - "value": "nut_free", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__24.label" + "value": "globe", + "label": "t:general.icon.options__8.label" }, { - "value": "pants", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__25.label" + "value": "check", + "label": "t:general.icon.options__9.label" }, { - "value": "paw_print", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__26.label" + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" }, { - "value": "pepper", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__27.label" + "value": "lightning", + "label": "t:general.icon.options__11.label" }, { - "value": "perfume", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__28.label" + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" }, { - "value": "plane", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__29.label" + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" }, { - "value": "plant", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__30.label" + "value": "location", + "label": "t:general.icon.options__14.label" }, { - "value": "price_tag", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__31.label" + "value": "tag", + "label": "t:general.icon.options__15.label" }, { - "value": "question_mark", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__32.label" + "value": "map-pin", + "label": "t:general.icon.options__16.label" }, { - "value": "recycle", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__33.label" + "value": "smiley", + "label": "t:general.icon.options__17.label" }, { - "value": "return", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__34.label" + "value": "stool", + "label": "t:general.icon.options__18.label" }, { - "value": "ruler", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__35.label" + "value": "clock", + "label": "t:general.icon.options__19.label" }, { - "value": "serving_dish", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__36.label" + "value": "phone", + "label": "t:general.icon.options__20.label" }, { - "value": "shirt", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__37.label" + "value": "chat", + "label": "t:general.icon.options__21.label" }, { - "value": "shoe", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__38.label" + "value": "paperplane", + "label": "t:general.icon.options__22.label" }, { - "value": "silhouette", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__39.label" + "value": "sliders", + "label": "t:general.icon.options__23.label" }, { - "value": "snowflake", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__40.label" + "value": "sound", + "label": "t:general.icon.options__24.label" }, { - "value": "star", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__41.label" + "value": "music", + "label": "t:general.icon.options__25.label" }, { - "value": "stopwatch", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__42.label" + "value": "airplane", + "label": "t:general.icon.options__26.label" }, { - "value": "truck", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__43.label" + "value": "alarm", + "label": "t:general.icon.options__27.label" + }, + { + "value": "play-list", + "label": "t:general.icon.options__28.label" + }, + { + "value": "drop-slash", + "label": "t:general.icon.options__29.label" }, { - "value": "washing", - "label": "t:sections.main-product.blocks.collapsible_tab.settings.icon.options__44.label" + "value": "pause-circle", + "label": "t:general.icon.options__30.label" + }, + { + "value": "acorn", + "label": "t:general.icon.options__34.label" + }, + { + "value": "leaf", + "label": "t:general.icon.options__35.label" } ], - "default": "truck", - "label": "t:sections.main-product.blocks.icon_with_text.settings.icon_3.label" + "default": "check", + "label": "t:general.icon.label" }, { "type": "image_picker", "id": "image_3", - "label": "t:sections.main-product.blocks.icon_with_text.settings.image_3.label" + "label": "t:general.image.label" }, { "type": "inline_richtext", "id": "heading_3", - "default": "t:sections.main-product.blocks.icon_with_text.settings.heading_3.default", - "label": "t:sections.main-product.blocks.icon_with_text.settings.heading_3.label", + "default": "Heading", + "label": "t:general.heading.label", "info": "t:sections.main-product.blocks.icon_with_text.settings.heading.info" } ] - } - ], - "settings": [ + }, { - "type": "product", - "id": "product", - "label": "t:sections.featured-product.settings.product.label" + "type": "addons", + "name": "t:sections.main-product.blocks.addons.name", + "limit": 1, + "settings": [ + { + "type": "header", + "content": "t:general.social_sharing.name" + }, + { + "type": "checkbox", + "id": "show_share", + "label": "t:general.social_sharing.show.label", + "default": true + }, + { + "type": "paragraph", + "content": "t:general.social_sharing.info_1" + }, + { + "type": "paragraph", + "content": "t:general.social_sharing.info_2" + }, + { + "type": "header", + "content": "t:sections.main-product.blocks.addons.settings.header__question.content" + }, + { + "type": "checkbox", + "id": "show_ask_question", + "label": "t:sections.main-product.blocks.addons.settings.ask_question.label", + "default": true + }, + { + "type": "paragraph", + "content": "t:sections.main-product.blocks.addons.settings.ask_question.content" + } + ] }, { - "type": "color_scheme", - "id": "color_scheme", - "label": "t:sections.all.colors.label", - "default": "scheme-1" + "type": "social_sharing", + "name": "t:general.social_sharing.name", + "limit": 1, + "settings": [ + { + "type": "paragraph", + "content": "t:general.social_sharing.info_1" + }, + { + "type": "paragraph", + "content": "t:general.social_sharing.info_2" + } + ] }, { - "type": "checkbox", - "id": "secondary_background", - "default": false, - "label": "t:sections.featured-product.settings.secondary_background.label" + "type": "badges", + "name": "t:sections.main-product.blocks.badges.name", + "limit": 1, + "settings": [ + { + "type": "header", + "content": "t:sections.main-product.blocks.badges.settings.header__tags.content", + "info": "t:sections.main-product.blocks.badges.settings.header__tags.info" + }, + { + "type": "header", + "content": "t:sections.main-product.blocks.badges.settings.header__badges.content" + }, + { + "type": "checkbox", + "id": "show_soldout_badge", + "label": "t:sections.main-product.blocks.badges.settings.show_soldout_badge.label", + "default": true + }, + { + "type": "checkbox", + "id": "show_sale_badge", + "label": "t:sections.main-product.blocks.badges.settings.show_sale_badge.label", + "default": true + }, + { + "type": "select", + "id": "sale_badge_type", + "label": "t:sections.main-product.blocks.badges.settings.sale_badge_type.label", + "default": "text", + "options": [ + { + "value": "text", + "label": "t:sections.main-product.blocks.badges.settings.sale_badge_type.options__1.label" + }, + { + "value": "percentage", + "label": "t:sections.main-product.blocks.badges.settings.sale_badge_type.options__2.label" + }, + { + "value": "fixed_amount", + "label": "t:sections.main-product.blocks.badges.settings.sale_badge_type.options__3.label" + } + ] + } + ] }, { - "type": "header", - "content": "t:sections.featured-product.settings.header.content" + "type": "shipping", + "name": "t:sections.main-product.blocks.shipping.name", + "limit": 1, + "settings": [ + { + "type": "text", + "id": "deliver_text", + "label": "t:sections.main-product.blocks.shipping.settings.deliver_text", + "default": "Estimated delivery:" + }, + { + "type": "text", + "id": "deliver_days", + "label": "t:sections.main-product.blocks.shipping.settings.deliver_days.label", + "info": "t:sections.main-product.blocks.shipping.settings.deliver_days.info", + "default": "7" + }, + { + "type": "text", + "id": "date_format", + "label": "t:sections.main-product.blocks.shipping.settings.date_format.label", + "default": "%b %d", + "info": "t:sections.main-product.blocks.shipping.settings.date_format.info" + } + ] }, { - "type": "select", - "id": "media_size", - "options": [ + "type": "timer", + "name": "t:general.timer.name", + "settings": [ { - "value": "small", - "label": "t:sections.main-product.settings.media_size.options__1.label" + "type": "color", + "id": "text_color", + "label": "t:general.text_color.label", + "default": "#C4301C" }, { - "value": "medium", - "label": "t:sections.main-product.settings.media_size.options__2.label" + "type": "select", + "id": "type", + "label": "t:general.timer.type.label", + "options": [ + { + "value": "evergreen", + "label": "t:general.timer.type.options__1.label" + }, + { + "value": "fixed_time", + "label": "t:general.timer.type.options__2.label" + } + ], + "default": "evergreen" }, { - "value": "large", - "label": "t:sections.main-product.settings.media_size.options__3.label" + "type": "header", + "content": "t:general.timer.header__evergreen.content" + }, + { + "type": "select", + "id": "duration", + "label": "t:general.timer.evergreen_duration.label", + "options": [ + { + "value": "every_2_hrs", + "label": "t:general.timer.evergreen_duration.options__every_2_hrs.label" + }, + { + "value": "every_6_hrs", + "label": "t:general.timer.evergreen_duration.options__every_6_hrs.label" + }, + { + "value": "every_12_hrs", + "label": "t:general.timer.evergreen_duration.options__every_12_hrs.label" + }, + { + "value": "every_24_hrs", + "label": "t:general.timer.evergreen_duration.options__every_24_hrs.label" + }, + { + "value": "every_week", + "label": "t:general.timer.evergreen_duration.options__every_week.label" + }, + { + "value": "every_month", + "label": "t:general.timer.evergreen_duration.options__every_month.label" + } + ], + "default": "every_month" + }, + { + "type": "header", + "content": "t:general.timer.header__fixed_time.content" + }, + { + "type": "text", + "id": "time", + "default": "2025/08/20 03:45 PM", + "label": "t:general.timer.time.label", + "info": "t:general.timer.time.info" + }, + { + "type": "header", + "content": "t:general.header__content_settings.content" + }, + { + "type": "textarea", + "id": "text", + "label": "t:general.text.label", + "default": "Sales end in" } - ], - "default": "medium", - "label": "t:sections.main-product.settings.media_size.label" + ] }, { - "type": "checkbox", - "id": "constrain_to_viewport", - "default": true, - "label": "t:sections.main-product.settings.constrain_to_viewport.label" + "type": "promotion_alert", + "name": "t:sections.main-product.blocks.promotion_alert.name", + "settings": [ + { + "type": "color", + "id": "text_color", + "label": "t:general.text_color.label", + "default": "#049B6E" + }, + { + "type": "select", + "id": "icon", + "options": [ + { + "value": "none", + "label": "t:general.icon.options__1.label" + }, + { + "value": "car-simple", + "label": "t:general.icon.options__2.label" + }, + { + "value": "truck", + "label": "t:general.icon.options__3.label" + }, + { + "value": "package", + "label": "t:general.icon.options__4.label" + }, + { + "value": "currency-circle-dollar", + "label": "t:general.icon.options__5.label" + }, + { + "value": "gift", + "label": "t:general.icon.options__6.label" + }, + { + "value": "heart", + "label": "t:general.icon.options__7.label" + }, + { + "value": "globe", + "label": "t:general.icon.options__8.label" + }, + { + "value": "check", + "label": "t:general.icon.options__9.label" + }, + { + "value": "arrow-up-left", + "label": "t:general.icon.options__10.label" + }, + { + "value": "lightning", + "label": "t:general.icon.options__11.label" + }, + { + "value": "calendar-blank", + "label": "t:general.icon.options__12.label" + }, + { + "value": "bell-ringing", + "label": "t:general.icon.options__13.label" + }, + { + "value": "location", + "label": "t:general.icon.options__14.label" + }, + { + "value": "tag", + "label": "t:general.icon.options__15.label" + }, + { + "value": "map-pin", + "label": "t:general.icon.options__16.label" + }, + { + "value": "smiley", + "label": "t:general.icon.options__17.label" + }, + { + "value": "stool", + "label": "t:general.icon.options__18.label" + }, + { + "value": "clock", + "label": "t:general.icon.options__19.label" + }, + { + "value": "phone", + "label": "t:general.icon.options__20.label" + }, + { + "value": "chat", + "label": "t:general.icon.options__21.label" + }, + { + "value": "paperplane", + "label": "t:general.icon.options__22.label" + }, + { + "value": "sliders", + "label": "t:general.icon.options__23.label" + }, + { + "value": "sound", + "label": "t:general.icon.options__24.label" + }, + { + "value": "music", + "label": "t:general.icon.options__25.label" + }, + { + "value": "airplane", + "label": "t:general.icon.options__26.label" + }, + { + "value": "alarm", + "label": "t:general.icon.options__27.label" + }, + { + "value": "play-list", + "label": "t:general.icon.options__28.label" + }, + { + "value": "drop-slash", + "label": "t:general.icon.options__29.label" + }, + { + "value": "pause-circle", + "label": "t:general.icon.options__30.label" + }, + { + "value": "acorn", + "label": "t:general.icon.options__34.label" + }, + { + "value": "leaf", + "label": "t:general.icon.options__35.label" + } + ], + "default": "lightning", + "label": "t:general.icon.label" + }, + { + "type": "inline_richtext", + "id": "heading", + "label": "t:general.heading.label", + "default": "Limited time offer" + }, + { + "type": "richtext", + "id": "description", + "label": "t:general.text.label", + "default": "

    Don’t miss out on this limited-time advantage crafted for you

    " + } + ] + }, + { + "type": "divider", + "name": "t:sections.main-product.blocks.divider.name" + } + ], + "settings": [ + { + "type": "header", + "content": "t:general.general.name" }, { "type": "select", - "id": "media_fit", + "id": "container", "options": [ { - "value": "contain", - "label": "t:sections.main-product.settings.media_fit.options__1.label" + "value": "full", + "label": "t:general.container.options__full.label" }, { - "value": "cover", - "label": "t:sections.main-product.settings.media_fit.options__2.label" + "value": "fixed", + "label": "t:general.container.options__fixed.label" } ], - "default": "contain", - "label": "t:sections.main-product.settings.media_fit.label" + "default": "fixed", + "label": "t:general.container.label" + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "product", + "id": "product", + "label": "t:general.product.label" + }, + { + "type": "checkbox", + "id": "enable_sticky_info", + "default": true, + "label": "t:sections.main-product.settings.enable_sticky_info.label" + }, + { + "type": "header", + "content": "t:sections.main-product.settings.header.content", + "info": "t:sections.main-product.settings.header.info" }, { "type": "select", - "id": "media_position", + "id": "media_size", "options": [ { - "value": "left", - "label": "t:sections.featured-product.settings.media_position.options__1.label" + "value": "small", + "label": "t:sections.main-product.settings.media_size.options__1.label" + }, + { + "value": "medium", + "label": "t:sections.main-product.settings.media_size.options__2.label" }, { - "value": "right", - "label": "t:sections.featured-product.settings.media_position.options__2.label" + "value": "large", + "label": "t:sections.main-product.settings.media_size.options__3.label" } ], - "default": "left", - "label": "t:sections.featured-product.settings.media_position.label" + "default": "large", + "label": "t:sections.main-product.settings.media_size.label", + "info": "t:sections.main-product.settings.media_size.info" }, { "type": "select", - "id": "image_zoom", + "id": "mobile_thumbnails", "options": [ { - "value": "lightbox", - "label": "t:sections.main-product.settings.image_zoom.options__1.label" + "value": "show", + "label": "t:sections.main-product.settings.mobile_thumbnails.options__1.label" }, { - "value": "hover", - "label": "t:sections.main-product.settings.image_zoom.options__2.label" - }, - { - "value": "none", - "label": "t:sections.main-product.settings.image_zoom.options__3.label" + "value": "hide", + "label": "t:sections.main-product.settings.mobile_thumbnails.options__2.label" } ], - "default": "lightbox", - "label": "t:sections.main-product.settings.image_zoom.label" + "default": "hide", + "label": "t:sections.main-product.settings.mobile_thumbnails.label" }, { "type": "checkbox", - "id": "hide_variants", + "id": "show_image_border", "default": false, - "label": "t:sections.main-product.settings.hide_variants.label" + "label": "t:general.show_image_border.label" + }, + { + "type": "checkbox", + "id": "enable_image_zoom", + "default": true, + "label": "t:sections.main-product.settings.enable_image_zoom.label" }, { "type": "checkbox", "id": "enable_video_looping", "default": false, - "label": "t:sections.featured-product.settings.enable_video_looping.label" + "label": "t:sections.main-product.settings.enable_video_looping.label" }, { "type": "header", - "content": "t:sections.all.padding.section_padding_heading" + "content": "t:general.padding.section_heading.content" }, { "type": "range", "id": "padding_top", "min": 0, "max": 100, - "step": 4, + "step": 2, "unit": "px", - "label": "t:sections.all.padding.padding_top", - "default": 36 + "label": "t:general.padding.top.label", + "default": 50 }, { "type": "range", "id": "padding_bottom", "min": 0, "max": 100, - "step": 4, + "step": 2, "unit": "px", - "label": "t:sections.all.padding.padding_bottom", - "default": 36 + "label": "t:general.padding.bottom.label", + "default": 50 + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "default": false, + "label": "t:general.divider.show_divider.label" + }, + { + "type": "select", + "id": "divider_width", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ], + "default": "fixed", + "label": "t:general.divider.width.label" } ], "presets": [ { - "name": "t:sections.featured-product.presets.name", + "name": "t:sections.featured-product.name", "blocks": [ { - "type": "text", + "type": "badges", "settings": { - "text": "{{ section.settings.product.vendor }}", - "text_style": "uppercase" + "show_soldout_badge": true, + "show_sale_badge": true, + "sale_badge_type": "percentage" } }, { - "type": "title" + "type": "title", + "settings": { + "heading_size": "h1" + } + }, + { + "type": "meta" }, { "type": "price" }, { - "type": "variant_picker" + "type": "icon-with-text", + "settings": { + "title_font": "body", + "title_size": "text-base", + "icon_1": "check", + "heading_1": "Modern", + "icon_2": "check", + "heading_2": "Eco-certified", + "icon_3": "check", + "heading_3": "Warranty" + } + }, + { + "type": "divider" }, { - "type": "quantity_selector" + "type": "inventory" + }, + { + "type": "description" + }, + { + "type": "variant_picker", + "settings": { + "swatch_style": "square" + } }, { "type": "buy_buttons" }, { - "type": "share" + "type": "icon-with-text", + "settings": { + "layout": "vertical", + "title_font": "body", + "title_size": "text-base", + "icon_1": "car-simple", + "heading_1": "Free International Shipping over $200", + "icon_2": "arrow-up-left", + "heading_2": "Free Returns Within 30 days", + "icon_3": "star-four", + "heading_3": "" + } } ] } diff --git a/sections/featured-products-tab.liquid b/sections/featured-products-tab.liquid new file mode 100644 index 00000000000..b5d57b3e0e1 --- /dev/null +++ b/sections/featured-products-tab.liquid @@ -0,0 +1,565 @@ +{{ 'component-card-img-with-product.css' | asset_url | stylesheet_tag }} +{{ 'section-featured-products-tab.css' | asset_url | stylesheet_tag }} + +{%- style -%} + .section-{{ section.id }} { + --section-padding-top: {{ section.settings.padding_top }}px; + --section-padding-bottom: {{ section.settings.padding_bottom }}px; + --f-columns-mobile: 1; + --f-columns-md: 2; + } +{%- endstyle -%} +{%- render 'divider', + show_divider: section.settings.show_section_divider, + divider_width: section.settings.divider_width +-%} + +{% schema %} +{ + "name": "t:sections.featured-products-tab.name", + "disabled_on": { + "groups": ["header", "footer", "custom.overlay"] + }, + "settings": [ + { + "type": "header", + "content": "t:general.general.name" + }, + { + "type": "select", + "id": "container", + "label": "t:general.container.label", + "default": "fixed", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ] + }, + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "header", + "content": "t:general.section_header.content" + }, + { + "type": "inline_richtext", + "id": "subheading", + "label": "t:general.subheading.label" + }, + { + "type": "inline_richtext", + "id": "heading", + "default": "Featured products tab", + "label": "t:general.heading.label", + "info": "t:general.heading.info" + }, + { + "type": "select", + "id": "highlight_style", + "label": "t:general.highlight_text.highlight_style.label", + "options": [ + { + "value": "none", + "label": "t:general.highlight_text.highlight_style.options.option__1.label" + }, + { + "value": "hand_drawn_circle", + "label": "t:general.highlight_text.highlight_style.options.option__2.label" + }, + { + "value": "thick_underline", + "label": "t:general.highlight_text.highlight_style.options.option__3.label" + }, + { + "value": "wave_underline", + "label": "t:general.highlight_text.highlight_style.options.option__4.label" + } + ] + }, + { + "type": "select", + "id": "highlight_font_style", + "label": "t:general.highlight_text.highlight_font_style.label", + "options": [ + { + "value": "italic", + "label": "t:general.highlight_text.highlight_font_style.options.option__1.label" + }, + { + "value": "normal", + "label": "t:general.highlight_text.highlight_font_style.options.option__2.label" + } + ] + }, + { + "type": "color", + "id": "highlight_style_color", + "label": "t:general.highlight_text.highlight_style_color.label" + }, + { + "type": "color", + "id": "highlight_text_color", + "label": "t:general.highlight_text.highlight_text_color.label" + }, + { + "type": "select", + "id": "heading_size", + "label": "t:general.text_size.heading.label", + "default": "h1", + "options": [ + { + "value": "h5", + "label": "t:general.text_size.options__h5.label" + }, + { + "value": "h4", + "label": "t:general.text_size.options__h4.label" + }, + { + "value": "h3", + "label": "t:general.text_size.options__h3.label" + }, + { + "value": "h2", + "label": "t:general.text_size.options__h2.label" + }, + { + "value": "h1", + "label": "t:general.text_size.options__h1.label" + }, + { + "value": "hd2", + "label": "t:general.text_size.options__hd2.label" + }, + { + "value": "hd1", + "label": "t:general.text_size.options__hd1.label" + } + ] + }, + { + "type": "richtext", + "id": "description", + "label": "t:general.text.label" + }, + { + "type": "select", + "id": "text_size", + "label": "t:general.text_size.text.label", + "default": "text-base", + "options": [ + { + "value": "text-sm", + "label": "t:general.text_size.options__small.label" + }, + { + "value": "text-base", + "label": "t:general.text_size.options__base.label" + }, + { + "value": "text-lg", + "label": "t:general.text_size.options__large.label" + }, + { + "value": "text-inherit", + "label": "t:general.text_size.options__inherit.label" + } + ] + }, + { + "type": "text", + "id": "button_label", + "label": "t:general.button.button_label.label", + "default": "Button label" + }, + { + "type": "url", + "id": "button_link", + "label": "t:general.button.button_link.label" + }, + { + "type": "select", + "id": "button_style", + "label": "t:general.button.button_style.label", + "options": [ + { + "value": "btn--primary", + "label": "t:general.button.button_style.options__1.label" + }, + { + "value": "btn--secondary", + "label": "t:general.button.button_style.options__2.label" + }, + { + "value": "btn--underline", + "label": "t:general.button.button_style.options__4.label" + }, + { + "value": "btn--plain", + "label": "t:general.button.button_style.options__7.label" + } + ], + "default": "btn--primary" + }, + { + "type": "select", + "id": "button_icon", + "label": "t:general.button.button_icon.label", + "options": [ + { + "value": "none", + "label": "t:general.button.button_icon.options__1.label" + }, + { + "value": "caret-right", + "label": "t:general.button.button_icon.options__2.label" + }, + { + "value": "caret-left", + "label": "t:general.button.button_icon.options__22.label" + }, + { + "value": "arrow-right", + "label": "t:general.button.button_icon.options__3.label" + }, + { + "value": "arrow-left", + "label": "t:general.button.button_icon.options__23.label" + }, + { + "value": "close", + "label": "t:general.button.button_icon.options__4.label" + }, + { + "value": "home", + "label": "t:general.button.button_icon.options__5.label" + }, + { + "value": "search", + "label": "t:general.button.button_icon.options__6.label" + }, + { + "value": "hamburger", + "label": "t:general.button.button_icon.options__7.label" + }, + { + "value": "pencil", + "label": "t:general.button.button_icon.options__8.label" + }, + { + "value": "plus", + "label": "t:general.button.button_icon.options__9.label" + }, + { + "value": "cart", + "label": "t:general.button.button_icon.options__10.label" + }, + { + "value": "account", + "label": "t:general.button.button_icon.options__11.label" + }, + { + "value": "sign-in", + "label": "t:general.button.button_icon.options__12.label" + }, + { + "value": "chat", + "label": "t:general.button.button_icon.options__13.label" + }, + { + "value": "download", + "label": "t:general.button.button_icon.options__14.label" + }, + { + "value": "upload", + "label": "t:general.button.button_icon.options__15.label" + }, + { + "value": "heart", + "label": "t:general.button.button_icon.options__16.label" + }, + { + "value": "play-outline", + "label": "t:general.button.button_icon.options__17.label" + }, + { + "value": "pause", + "label": "t:general.button.button_icon.options__18.label" + }, + { + "value": "stop", + "label": "t:general.button.button_icon.options__19.label" + }, + { + "value": "speaker", + "label": "t:general.button.button_icon.options__20.label" + }, + { + "value": "setting", + "label": "t:general.button.button_icon.options__21.label" + } + ], + "default": "none" + }, + { + "type": "header", + "content": "t:general.header__product_cards.content" + }, + { + "type": "select", + "id": "pcard_image_ratio", + "label": "t:general.image_ratio.label", + "options": [ + { + "value": "adapt", + "label": "t:general.image_ratio.options__1.label" + }, + { + "value": "1/1", + "label": "t:general.image_ratio.options__2.label" + }, + { + "value": "3/4", + "label": "t:general.image_ratio.options__3.label" + }, + { + "value": "4/3", + "label": "t:general.image_ratio.options__4.label" + } + ] + }, + { + "type": "header", + "content": "t:general.mobile.name" + }, + { + "type": "checkbox", + "id": "swipe_on_mobile", + "default": true, + "label": "t:general.mobile.swipe_on_mobile.label" + }, + { + "type": "header", + "content": "t:general.divider.section_heading.content" + }, + { + "type": "checkbox", + "id": "show_section_divider", + "label": "t:general.divider.show_divider.label", + "default": false + }, + { + "type": "select", + "id": "divider_width", + "label": "t:general.divider.width.label", + "default": "fixed", + "options": [ + { + "value": "fixed", + "label": "t:general.container.options__fixed.label" + }, + { + "value": "full", + "label": "t:general.container.options__full.label" + } + ] + }, + { + "type": "header", + "content": "t:general.padding.section_heading.content" + }, + { + "type": "range", + "id": "padding_top", + "label": "t:general.padding.top.label", + "default": 50, + "min": 0, + "max": 120, + "step": 2, + "unit": "px" + }, + { + "type": "range", + "id": "padding_bottom", + "label": "t:general.padding.bottom.label", + "default": 50, + "min": 0, + "max": 120, + "step": 2, + "unit": "px" + } + ], + "blocks": [ + { + "type": "tab", + "name": "t:sections.featured-products-tab.blocks.tab.name", + "settings": [ + { + "type": "color_scheme", + "id": "color_scheme", + "label": "t:general.colors.label", + "default": "scheme-1" + }, + { + "type": "text", + "id": "title", + "label": "t:sections.featured-products-tab.blocks.tab.settings.title" + }, + { + "type": "product_list", + "id": "products", + "label": "t:general.products.label", + "limit": 6 + } + ] + } + ], + "presets": [ + { + "name": "t:sections.featured-products-tab.name", + "blocks": [ + { + "type": "tab", + "settings": { + "title": "Product list 1" + } + }, + { + "type": "tab", + "settings": { + "title": "Product list 2" + } + }, + { + "type": "tab", + "settings": { + "title": "Product list 3" + } + } + ] + } + ] +} +{% endschema %} diff --git a/sections/footer-group.json b/sections/footer-group.json index a9263d9b541..f4793fa7938 100644 --- a/sections/footer-group.json +++ b/sections/footer-group.json @@ -1,53 +1,272 @@ +/* + * ------------------------------------------------------------ + * IMPORTANT: The contents of this file are auto-generated. + * + * This file may be updated by the Shopify admin theme editor + * or related systems. Please exercise caution as any changes + * made to this file may be overwritten. + * ------------------------------------------------------------ + */ { "name": "t:sections.footer.name", "type": "footer", "sections": { + "multicolumn_icon_rTKNUF": { + "type": "multicolumn-icon", + "blocks": { + "column_PnJ3NJ": { + "type": "column", + "settings": { + "icon": "chat", + "max_width": 28, + "max_width_mb": 28, + "title": "Customer Service", + "highlight_style": "none", + "highlight_font_style": "italic", + "highlight_style_color": "", + "highlight_text_color": "", + "heading_size": "text-base", + "heading_font": "body-bolder", + "text": "

    Mon-Sat, 9am-6pm EST.

    ", + "text_size": "text-base", + "button_label": "", + "button_link": "", + "button_style": "btn--underline", + "button_icon": "none" + } + }, + "column_xNjRtG": { + "type": "column", + "settings": { + "icon": "phone", + "max_width": 28, + "max_width_mb": 28, + "title": "Call Us", + "highlight_style": "none", + "highlight_font_style": "italic", + "highlight_style_color": "", + "highlight_text_color": "", + "heading_size": "text-base", + "heading_font": "body-bolder", + "text": "

    +1 888-234-1234 (tool-free)

    ", + "text_size": "text-base", + "button_label": "", + "button_link": "", + "button_style": "btn--underline", + "button_icon": "none" + } + }, + "column_69fN8n": { + "type": "column", + "settings": { + "icon": "paperplane", + "max_width": 28, + "max_width_mb": 28, + "title": "Get in Touch", + "highlight_style": "none", + "highlight_font_style": "italic", + "highlight_style_color": "", + "highlight_text_color": "", + "heading_size": "text-base", + "heading_font": "body-bolder", + "text": "

    touch@garacestore.com

    ", + "text_size": "text-base", + "button_label": "", + "button_link": "", + "button_style": "btn--underline", + "button_icon": "none" + } + }, + "column_ngN6XL": { + "type": "column", + "settings": { + "icon": "map-pin", + "max_width": 32, + "max_width_mb": 32, + "title": "Address", + "highlight_style": "none", + "highlight_font_style": "italic", + "highlight_style_color": "", + "highlight_text_color": "", + "heading_size": "text-base", + "heading_font": "body-bolder", + "text": "

    382 NE 191st St # 87394 Miami

    ", + "text_size": "text-base", + "button_label": "", + "button_link": "", + "button_style": "btn--underline", + "button_icon": "none" + } + } + }, + "block_order": [ + "column_PnJ3NJ", + "column_xNjRtG", + "column_69fN8n", + "column_ngN6XL" + ], + "custom_css": [ + ".rich-text__text {--text-margin-top: 0.4rem;}" + ], + "settings": { + "container": "fixed", + "color_scheme": "scheme-info", + "header_layout": "vertical", + "section_header_alignment": "left", + "section_header_alignment_mobile": "inherit", + "subheading": "", + "heading": "", + "highlight_style": "none", + "highlight_font_style": "italic", + "highlight_style_color": "", + "highlight_text_color": "", + "heading_size": "h1", + "description": "", + "text_size": "text-base", + "button_label": "", + "button_link": "", + "button_style": "btn--underline", + "button_icon": "none", + "enable_sticky": false, + "card_color_scheme": "scheme-info", + "content_alignment": "left", + "image_position": "left", + "icon_color": "#64b7a6", + "columns_desktop": 4, + "column_gap": "large", + "row_gap": "inherit", + "show_divider_col": false, + "columns_mobile": "1", + "swipe_on_mobile": false, + "show_section_divider": false, + "divider_width": "fixed", + "padding_top": 32, + "padding_bottom": 32 + } + }, "footer": { "type": "footer", "blocks": { - "footer-0": { - "type": "link_list", + "newsletter_3qCrWc": { + "type": "newsletter", + "settings": { + "block_width": 55, + "heading": "Join the Sendriya Life Community", + "heading_size": "h3", + "newsletter_description": "

    Receive wellness insights, product updates, and inspiration from nature.

    ", + "newsletter_term": "

    By subscribing you agree to the Terms of Use & Privacy Policy.

    ", + "newsletter_text_alignment": "left", + "form_width": 465, + "button_style": "btn--secondary", + "button_icon": "none", + "order_first": true + } + }, + "menu_DEKGYP": { + "type": "menu", "settings": { - "heading": "Quick links", - "menu": "footer" + "block_width": 15, + "heading": "Company", + "heading_size": "h6", + "menu": "footer", + "open_default": false, + "show_divider": false } }, - "footer-1": { - "type": "link_list", + "menu_4eCrBB": { + "type": "menu", "settings": { - "heading": "Info", - "menu": "footer" + "block_width": 15, + "heading": "Collection", + "heading_size": "h6", + "menu": "footer", + "open_default": false, + "show_divider": false } }, - "footer-2": { - "type": "text", + "menu_6cjHfA": { + "type": "menu", "settings": { - "heading": "Our mission", - "subtext": "

    Share contact information, store details, and brand content with your customers.<\/p>" + "block_width": 15, + "heading": "Shop", + "heading_size": "h6", + "menu": "footer", + "open_default": false, + "show_divider": false } } }, "block_order": [ - "footer-0", - "footer-1", - "footer-2" + "newsletter_3qCrWc", + "menu_DEKGYP", + "menu_4eCrBB", + "menu_6cjHfA" ], + "custom_css": [], "settings": { - "color_scheme": "scheme-1", - "newsletter_enable": true, - "newsletter_heading": "Subscribe to our emails", + "container": "fixed", + "color_scheme": "scheme-info", + "enable_follow_on_shop": true, "show_social": true, - "enable_country_selector": false, + "social_button_style": "btn--icon", + "enable_country_selector": true, "enable_language_selector": false, "payment_enable": true, - "show_policy": false, - "margin_top": 48, - "padding_top": 36, - "padding_bottom": 36 + "footer_layout": "standard", + "footer_bottom_menu": "", + "show_sperator_line": false, + "show_section_divider": true, + "divider_width": "fixed", + "padding_top": 40, + "padding_bottom": 40 + } + }, + "mobile_sticky_bar_aYhgJK": { + "type": "mobile-sticky-bar", + "blocks": { + "home_AP8mmy": { + "type": "home", + "settings": { + "text": "Home" + } + }, + "cart_gnnwxQ": { + "type": "cart", + "settings": { + "text": "Cart" + } + }, + "products_eYYkE8": { + "type": "products", + "settings": { + "text": "Products", + "collection": "" + } + }, + "link_mJ6QMc": { + "type": "link", + "settings": { + "text": "About", + "url": "", + "icon": "map-pin" + } + } + }, + "block_order": [ + "home_AP8mmy", + "cart_gnnwxQ", + "products_eYYkE8", + "link_mJ6QMc" + ], + "settings": { + "enable_sticky_bar": true, + "show_text": true } } }, "order": [ - "footer" + "multicolumn_icon_rTKNUF", + "footer", + "mobile_sticky_bar_aYhgJK" ] } diff --git a/sections/footer.liquid b/sections/footer.liquid index dbf68b376a9..afdff475715 100644 --- a/sections/footer.liquid +++ b/sections/footer.liquid @@ -1,451 +1,986 @@ {% comment %}theme-check-disable UndefinedObject{% endcomment %} -{{ 'section-footer.css' | asset_url | stylesheet_tag }} -{{ 'component-newsletter.css' | asset_url | stylesheet_tag }} -{{ 'component-list-menu.css' | asset_url | stylesheet_tag }} -{{ 'component-list-payment.css' | asset_url | stylesheet_tag }} -{{ 'component-list-social.css' | asset_url | stylesheet_tag }} - -{%- style -%} - .footer { - margin-top: {{ section.settings.margin_top | times: 0.75 | round: 0 }}px; - } - - .section-{{ section.id }}-padding { - padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px; - padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px; - } - - @media screen and (min-width: 750px) { - .footer { - margin-top: {{ section.settings.margin_top }}px; - } - - .section-{{ section.id }}-padding { - padding-top: {{ section.settings.padding_top }}px; - padding-bottom: {{ section.settings.padding_bottom }}px; - } - } -{%- endstyle -%} - -