quitar media print css
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,861 @@
|
||||
{%- liquid
|
||||
assign free_shipping = section.settings.free_shipping | default: 699
|
||||
assign threshold = free_shipping | times: 100
|
||||
assign progress = 0
|
||||
assign remaining = 0
|
||||
assign unlocked = false
|
||||
|
||||
if threshold > 0
|
||||
if cart.total_price >= threshold
|
||||
assign progress = 100
|
||||
assign unlocked = true
|
||||
else
|
||||
assign remaining = threshold | minus: cart.total_price
|
||||
assign progress = cart.total_price | times: 100 | divided_by: threshold
|
||||
endif
|
||||
endif
|
||||
|
||||
assign rec_collection = section.settings.recommendations
|
||||
if rec_collection == blank
|
||||
assign rec_collection = collections.all
|
||||
endif
|
||||
|
||||
assign shown = 0
|
||||
capture rec_items
|
||||
if rec_collection != blank
|
||||
for product in rec_collection.products limit: 24
|
||||
if shown >= 4
|
||||
break
|
||||
endif
|
||||
|
||||
assign already_in_cart = false
|
||||
for item in cart.items
|
||||
if item.product_id == product.id
|
||||
assign already_in_cart = true
|
||||
endif
|
||||
endfor
|
||||
if already_in_cart
|
||||
continue
|
||||
endif
|
||||
|
||||
assign rec_variant = product.selected_or_first_available_variant
|
||||
if rec_variant == blank
|
||||
continue
|
||||
endif
|
||||
unless rec_variant.available
|
||||
continue
|
||||
endunless
|
||||
|
||||
assign shown = shown | plus: 1
|
||||
assign add_label = 'cart_drawer.add' | t
|
||||
|
||||
echo '<article class="cart-drawer__rec"><a class="cart-drawer__thumb cart-drawer__thumb--rec" href="'
|
||||
echo product.url | escape
|
||||
echo '">'
|
||||
if product.featured_image
|
||||
echo product.featured_image | image_url: width: 160 | image_tag: loading: 'lazy', alt: product.title, class: 'cart-drawer__img'
|
||||
endif
|
||||
echo '</a><div class="cart-drawer__rec-body"><a class="cart-drawer__rec-title" href="'
|
||||
echo product.url | escape
|
||||
echo '">'
|
||||
echo product.title | escape
|
||||
echo '</a><p class="cart-drawer__price">'
|
||||
echo rec_variant.price | money_without_trailing_zeros
|
||||
echo '</p><button class="cart-drawer__add" type="button" data-cart-drawer-add data-variant-id="'
|
||||
echo rec_variant.id
|
||||
echo '">'
|
||||
echo add_label | escape
|
||||
echo '<svg width="14" height="14" viewBox="0 0 14 14" aria-hidden="true" focusable="false"><path d="M2 7h10M8 3l4 4-4 4" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/></svg></button></div></article>'
|
||||
endfor
|
||||
endif
|
||||
endcapture
|
||||
-%}
|
||||
|
||||
<div
|
||||
id="cart-drawer"
|
||||
class="cart-drawer"
|
||||
data-cart-drawer
|
||||
data-section-id="{{ section.id }}"
|
||||
data-add-url="{{ routes.cart_add_url }}.js"
|
||||
data-change-url="{{ routes.cart_change_url }}.js"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<button class="cart-drawer__backdrop" type="button" data-cart-drawer-close aria-label="{{ 'cart_drawer.close' | t }}"></button>
|
||||
|
||||
<div
|
||||
class="cart-drawer__panel"
|
||||
data-cart-drawer-panel
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-labelledby="cart-drawer-title"
|
||||
>
|
||||
<div class="cart-drawer__layout" data-cart-drawer-content data-item-count="{{ cart.item_count }}">
|
||||
{% if shown > 0 %}
|
||||
<aside class="cart-drawer__recs" aria-label="{{ 'cart_drawer.recommendations' | t }}">
|
||||
<h2 class="cart-drawer__heading">{{ 'cart_drawer.recommendations' | t }}</h2>
|
||||
<div class="cart-drawer__rec-list">
|
||||
{{ rec_items }}
|
||||
</div>
|
||||
</aside>
|
||||
{% endif %}
|
||||
|
||||
<div class="cart-drawer__main">
|
||||
<div class="cart-drawer__head">
|
||||
<h2 id="cart-drawer-title" class="cart-drawer__heading">{{ 'cart_drawer.title' | t }}</h2>
|
||||
<button class="cart-drawer__close" type="button" data-cart-drawer-close aria-label="{{ 'cart_drawer.close' | t }}">
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" aria-hidden="true" focusable="false">
|
||||
<path d="M2 2l10 10M12 2L2 12" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{% if threshold > 0 %}
|
||||
<div class="cart-drawer__shipping">
|
||||
<p>
|
||||
{% if unlocked %}
|
||||
{{ 'cart_drawer.unlocked' | t }}
|
||||
{% else %}
|
||||
{{ 'cart_drawer.remaining_before' | t }}
|
||||
{{ remaining | money_without_trailing_zeros }}
|
||||
{{ 'cart_drawer.remaining_after' | t }}
|
||||
<span>{{ 'cart_drawer.free' | t }}</span>
|
||||
{% endif %}
|
||||
</p>
|
||||
<div
|
||||
class="cart-drawer__bar"
|
||||
style="--progress: {{ progress }}%;"
|
||||
role="progressbar"
|
||||
aria-valuemin="0"
|
||||
aria-valuemax="100"
|
||||
aria-valuenow="{{ progress }}"
|
||||
aria-label="{{ 'cart_drawer.shipping_progress' | t }}"
|
||||
>
|
||||
<span class="cart-drawer__bar-fill"></span>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="cart-drawer__items">
|
||||
{% if cart.item_count == 0 %}
|
||||
<p class="cart-drawer__empty">{{ 'cart_drawer.empty' | t }}</p>
|
||||
{% else %}
|
||||
{% for item in cart.items %}
|
||||
<article class="cart-drawer__line">
|
||||
<a class="cart-drawer__thumb" href="{{ item.url }}">
|
||||
{% if item.image %}
|
||||
{{ item.image | image_url: width: 180 | image_tag: loading: 'lazy', alt: item.product.title, class: 'cart-drawer__img' }}
|
||||
{% endif %}
|
||||
</a>
|
||||
<div class="cart-drawer__line-body">
|
||||
<a class="cart-drawer__line-title" href="{{ item.url }}">{{ item.product.title }}</a>
|
||||
{% unless item.variant.title == 'Default Title' %}
|
||||
<p class="cart-drawer__variant">{{ item.variant.title }}</p>
|
||||
{% endunless %}
|
||||
<p class="cart-drawer__price">{{ item.final_line_price | money_without_trailing_zeros }}</p>
|
||||
<div class="cart-drawer__qty">
|
||||
<button
|
||||
type="button"
|
||||
data-cart-drawer-qty
|
||||
data-line-key="{{ item.key | escape }}"
|
||||
data-quantity="{{ item.quantity | minus: 1 }}"
|
||||
{% if item.quantity <= 1 %}
|
||||
disabled
|
||||
{% endif %}
|
||||
aria-label="{{ 'cart_drawer.decrease' | t }}"
|
||||
>
|
||||
−
|
||||
</button>
|
||||
<span>{{ item.quantity }}</span>
|
||||
<button
|
||||
type="button"
|
||||
data-cart-drawer-qty
|
||||
data-line-key="{{ item.key | escape }}"
|
||||
data-quantity="{{ item.quantity | plus: 1 }}"
|
||||
aria-label="{{ 'cart_drawer.increase' | t }}"
|
||||
>
|
||||
+
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
class="cart-drawer__remove"
|
||||
type="button"
|
||||
data-cart-drawer-qty
|
||||
data-line-key="{{ item.key | escape }}"
|
||||
data-quantity="0"
|
||||
aria-label="{{ 'cart_drawer.remove' | t }}"
|
||||
>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true" focusable="false">
|
||||
<path d="M2.5 4h11M6.5 4V2.5h3V4M4 4l.6 9.2a1 1 0 0 0 1 .8h4.8a1 1 0 0 0 1-.8L12 4" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</article>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="cart-drawer__footer">
|
||||
<p class="cart-drawer__subtotal">
|
||||
<span>{{ 'cart_drawer.subtotal' | t }}</span>
|
||||
<strong>{{ cart.total_price | money_without_trailing_zeros }} {{ cart.currency.iso_code }}</strong>
|
||||
</p>
|
||||
<p class="cart-drawer__note">{{ 'cart_drawer.taxes' | t }}</p>
|
||||
<div class="cart-drawer__actions">
|
||||
{% if cart.item_count > 0 %}
|
||||
<form action="{{ routes.cart_url }}" method="post">
|
||||
<button class="cart-drawer__checkout" type="submit" name="checkout">{{ 'cart_drawer.checkout' | t }}</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<button class="cart-drawer__checkout" type="button" disabled>{{ 'cart_drawer.checkout' | t }}</button>
|
||||
{% endif %}
|
||||
<a class="cart-drawer__view" href="{{ routes.cart_url }}">{{ 'cart_drawer.view' | t }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% stylesheet %}
|
||||
.shopify-section.cart-drawer-section {
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
overflow: visible;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.cart-drawer {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 80;
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.cart-drawer.is-open,
|
||||
.cart-drawer.is-closing {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.cart-drawer.is-open {
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.cart-drawer__backdrop {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
background: rgba(32, 36, 36, 0.46);
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
transition: opacity 0.32s ease;
|
||||
}
|
||||
|
||||
.cart-drawer.is-open .cart-drawer__backdrop {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.cart-drawer__panel {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
width: min(980px, 100%);
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
color: #000;
|
||||
box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
|
||||
transform: translate3d(100%, 0, 0);
|
||||
transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
|
||||
}
|
||||
|
||||
.cart-drawer.is-open .cart-drawer__panel {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
.cart-drawer__layout {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
|
||||
width: 100%;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.cart-drawer__layout:not(:has(.cart-drawer__recs)) {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.cart-drawer__recs,
|
||||
.cart-drawer__items {
|
||||
overscroll-behavior: contain;
|
||||
}
|
||||
|
||||
.cart-drawer__recs {
|
||||
overflow: auto;
|
||||
padding: 28px 24px 32px;
|
||||
border-right: 1px solid #ededed;
|
||||
}
|
||||
|
||||
.cart-drawer__main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
padding: 28px 28px 0;
|
||||
}
|
||||
|
||||
.cart-drawer__heading {
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
line-height: 1.3;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.cart-drawer__head {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.cart-drawer__close,
|
||||
.cart-drawer__remove,
|
||||
.cart-drawer__add,
|
||||
.cart-drawer__qty button {
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cart-drawer__close {
|
||||
display: inline-flex;
|
||||
flex: 0 0 auto;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin: -6px -6px 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.cart-drawer__shipping {
|
||||
margin-top: 18px;
|
||||
}
|
||||
|
||||
.cart-drawer__shipping p {
|
||||
margin: 0 0 10px;
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.cart-drawer__shipping span {
|
||||
color: #1aa37a;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.cart-drawer__bar {
|
||||
height: 4px;
|
||||
overflow: hidden;
|
||||
border-radius: 999px;
|
||||
background: #ececec;
|
||||
}
|
||||
|
||||
.cart-drawer__bar-fill {
|
||||
display: block;
|
||||
width: var(--progress);
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
background: #9dd6c7;
|
||||
}
|
||||
|
||||
.cart-drawer__items {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.cart-drawer__empty {
|
||||
margin: 48px 0;
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cart-drawer__line,
|
||||
.cart-drawer__rec {
|
||||
display: grid;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.cart-drawer__line {
|
||||
grid-template-columns: 72px minmax(0, 1fr) auto;
|
||||
padding: 18px 0;
|
||||
}
|
||||
|
||||
.cart-drawer__rec {
|
||||
grid-template-columns: 56px minmax(0, 1fr);
|
||||
align-items: start;
|
||||
padding: 18px 0;
|
||||
border-bottom: 1px solid #f1f1f1;
|
||||
}
|
||||
|
||||
.cart-drawer__thumb {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
background: #f7f7f7;
|
||||
}
|
||||
|
||||
.cart-drawer__thumb--rec {
|
||||
width: 56px;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
.cart-drawer__img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.cart-drawer__line-title,
|
||||
.cart-drawer__rec-title {
|
||||
display: block;
|
||||
color: inherit;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
line-height: 1.35;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.cart-drawer__rec-title {
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.cart-drawer__variant {
|
||||
margin: 2px 0 0;
|
||||
color: #777;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.cart-drawer__price {
|
||||
margin: 6px 0 0;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.cart-drawer__add {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-top: 8px;
|
||||
padding: 0;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.04em;
|
||||
line-height: 1;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.cart-drawer__qty {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 32px;
|
||||
margin-top: 10px;
|
||||
border: 1px solid #e1e1e1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.cart-drawer__qty button {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
padding: 0;
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.cart-drawer__qty button:disabled {
|
||||
color: #bbb;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.cart-drawer__qty span {
|
||||
min-width: 16px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cart-drawer__remove {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.cart-drawer__footer {
|
||||
flex: 0 0 auto;
|
||||
padding: 16px 0 24px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.cart-drawer__subtotal {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.cart-drawer__subtotal strong {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.cart-drawer__note {
|
||||
margin: 8px 0 0;
|
||||
color: #6d6d6d;
|
||||
font-size: 12px;
|
||||
font-weight: 300;
|
||||
line-height: 1.4;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cart-drawer__actions {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 12px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.cart-drawer__actions form {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.cart-drawer__checkout,
|
||||
.cart-drawer__view {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 48px;
|
||||
border-radius: 999px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.04em;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.cart-drawer__checkout {
|
||||
border: 0;
|
||||
background: #9dd6c7;
|
||||
color: #000;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cart-drawer__checkout:disabled {
|
||||
opacity: 0.45;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.cart-drawer__view {
|
||||
border: 1px solid #111;
|
||||
background: #fff;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.cart-drawer.is-busy .cart-drawer__layout {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
html.cart-drawer-open,
|
||||
html.cart-drawer-open body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.cart-drawer__panel {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.cart-drawer__layout,
|
||||
.cart-drawer__layout:not(:has(.cart-drawer__recs)) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.cart-drawer__recs {
|
||||
order: 2;
|
||||
border-right: 0;
|
||||
border-top: 1px solid #ededed;
|
||||
}
|
||||
|
||||
.cart-drawer__main {
|
||||
order: 1;
|
||||
min-height: 100%;
|
||||
padding: 20px 16px 0;
|
||||
}
|
||||
|
||||
.cart-drawer__items {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.cart-drawer__footer {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.cart-drawer__actions {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.cart-drawer__backdrop,
|
||||
.cart-drawer__panel {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
{% endstylesheet %}
|
||||
|
||||
{% javascript %}
|
||||
(() => {
|
||||
if (window.__seasonCartDrawer) return;
|
||||
window.__seasonCartDrawer = true;
|
||||
|
||||
const getDrawer = () => document.querySelector('[data-cart-drawer]');
|
||||
let lastFocus = null;
|
||||
let requestId = 0;
|
||||
|
||||
const setCount = (count) => {
|
||||
document.querySelectorAll('[data-cart-open]').forEach((button) => {
|
||||
const template = button.dataset.cartCountLabel || '';
|
||||
if (template) button.setAttribute('aria-label', template.replace('__COUNT__', String(count)));
|
||||
|
||||
let badge = button.querySelector('[data-cart-count]');
|
||||
if (count < 1) {
|
||||
badge?.remove();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!badge) {
|
||||
badge = document.createElement('span');
|
||||
badge.className = 'absolute right-0 top-0 flex h-4 min-w-4 items-center justify-center rounded-full bg-brand-mint px-[3px] text-[10px] font-medium leading-none text-black';
|
||||
badge.setAttribute('data-cart-count', '');
|
||||
button.appendChild(badge);
|
||||
}
|
||||
|
||||
badge.textContent = String(count);
|
||||
});
|
||||
};
|
||||
|
||||
const openDrawer = () => {
|
||||
const drawer = getDrawer();
|
||||
if (!drawer) return;
|
||||
if (!drawer.classList.contains('is-open')) lastFocus = document.activeElement;
|
||||
drawer.classList.remove('is-closing');
|
||||
drawer.classList.add('is-open');
|
||||
drawer.setAttribute('aria-hidden', 'false');
|
||||
document.documentElement.classList.add('cart-drawer-open');
|
||||
document.querySelectorAll('[data-cart-open]').forEach((button) => {
|
||||
button.setAttribute('aria-expanded', 'true');
|
||||
});
|
||||
drawer.querySelector('.cart-drawer__close')?.focus();
|
||||
};
|
||||
|
||||
const closeDrawer = () => {
|
||||
const drawer = getDrawer();
|
||||
if (!drawer || !drawer.classList.contains('is-open')) return;
|
||||
drawer.classList.remove('is-open');
|
||||
drawer.classList.add('is-closing');
|
||||
drawer.setAttribute('aria-hidden', 'true');
|
||||
document.documentElement.classList.remove('cart-drawer-open');
|
||||
document.querySelectorAll('[data-cart-open]').forEach((button) => {
|
||||
button.setAttribute('aria-expanded', 'false');
|
||||
});
|
||||
|
||||
const panel = drawer.querySelector('[data-cart-drawer-panel]');
|
||||
const finish = (event) => {
|
||||
if (event && event.target !== panel) return;
|
||||
if (drawer.classList.contains('is-open')) return;
|
||||
drawer.classList.remove('is-closing');
|
||||
panel?.removeEventListener('transitionend', finish);
|
||||
};
|
||||
panel?.addEventListener('transitionend', finish);
|
||||
window.setTimeout(finish, 450);
|
||||
|
||||
if (lastFocus && typeof lastFocus.focus === 'function') lastFocus.focus();
|
||||
};
|
||||
|
||||
const refresh = async (shouldOpen) => {
|
||||
const drawer = getDrawer();
|
||||
if (!drawer) return;
|
||||
const currentId = ++requestId;
|
||||
|
||||
try {
|
||||
const url = new URL(window.location.href);
|
||||
url.searchParams.set('section_id', drawer.dataset.sectionId);
|
||||
url.hash = '';
|
||||
const response = await fetch(url.toString(), { headers: { Accept: 'text/html' } });
|
||||
if (!response.ok || currentId !== requestId) return;
|
||||
const fresh = new DOMParser().parseFromString(await response.text(), 'text/html').querySelector('[data-cart-drawer-content]');
|
||||
const current = getDrawer()?.querySelector('[data-cart-drawer-content]');
|
||||
if (!fresh || !current || currentId !== requestId) return;
|
||||
current.replaceWith(fresh);
|
||||
setCount(Number(fresh.dataset.itemCount || '0'));
|
||||
} catch (error) {
|
||||
// Keep the cart that is already on the page.
|
||||
}
|
||||
|
||||
if (shouldOpen) openDrawer();
|
||||
};
|
||||
|
||||
const postJson = async (url, payload) => {
|
||||
const response = await fetch(url, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Accept: 'application/json',
|
||||
},
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
return response.ok;
|
||||
};
|
||||
|
||||
document.addEventListener('season:cart:open', () => {
|
||||
const drawer = getDrawer();
|
||||
drawer?.classList.add('is-busy');
|
||||
openDrawer();
|
||||
refresh(false).finally(() => {
|
||||
getDrawer()?.classList.remove('is-busy');
|
||||
});
|
||||
});
|
||||
|
||||
document.addEventListener('keydown', (event) => {
|
||||
if (event.key !== 'Escape') return;
|
||||
if (!getDrawer()?.classList.contains('is-open')) return;
|
||||
event.preventDefault();
|
||||
closeDrawer();
|
||||
});
|
||||
|
||||
document.addEventListener('click', async (event) => {
|
||||
const opener = event.target.closest('[data-cart-open]');
|
||||
if (opener) {
|
||||
event.preventDefault();
|
||||
openDrawer();
|
||||
return;
|
||||
}
|
||||
|
||||
const drawer = getDrawer();
|
||||
if (!drawer || !drawer.classList.contains('is-open')) return;
|
||||
|
||||
if (event.target.closest('[data-cart-drawer-close]')) {
|
||||
closeDrawer();
|
||||
return;
|
||||
}
|
||||
|
||||
if (drawer.classList.contains('is-busy')) return;
|
||||
|
||||
const addButton = event.target.closest('[data-cart-drawer-add]');
|
||||
if (addButton && drawer.contains(addButton)) {
|
||||
const variantId = addButton.dataset.variantId;
|
||||
if (!variantId) return;
|
||||
drawer.classList.add('is-busy');
|
||||
try {
|
||||
const ok = await postJson(drawer.dataset.addUrl, { id: Number(variantId), quantity: 1 });
|
||||
if (ok) await refresh(false);
|
||||
} finally {
|
||||
getDrawer()?.classList.remove('is-busy');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const qtyButton = event.target.closest('[data-cart-drawer-qty]');
|
||||
if (qtyButton && drawer.contains(qtyButton)) {
|
||||
const key = qtyButton.dataset.lineKey;
|
||||
const quantity = Number(qtyButton.dataset.quantity);
|
||||
if (!key || Number.isNaN(quantity)) return;
|
||||
drawer.classList.add('is-busy');
|
||||
try {
|
||||
const ok = await postJson(drawer.dataset.changeUrl, { id: key, quantity });
|
||||
if (ok) await refresh(false);
|
||||
} finally {
|
||||
getDrawer()?.classList.remove('is-busy');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('submit', async (event) => {
|
||||
if (event.defaultPrevented) return;
|
||||
const form = event.target;
|
||||
if (!(form instanceof HTMLFormElement)) return;
|
||||
const action = form.getAttribute('action') || '';
|
||||
if (!action.includes('/cart/add')) return;
|
||||
if (event.submitter && event.submitter.closest('.shopify-payment-button')) return;
|
||||
if (event.submitter && event.submitter.hasAttribute('data-buy')) return;
|
||||
|
||||
event.preventDefault();
|
||||
const drawer = getDrawer();
|
||||
drawer?.classList.add('is-busy');
|
||||
|
||||
try {
|
||||
const endpoint = action.includes('.js') ? action : action.replace(/\/?$/, '.js').replace('.js.js', '.js');
|
||||
const response = await fetch(endpoint, {
|
||||
method: 'POST',
|
||||
headers: { Accept: 'application/json' },
|
||||
body: new FormData(form),
|
||||
});
|
||||
if (!response.ok) {
|
||||
form.submit();
|
||||
return;
|
||||
}
|
||||
openDrawer();
|
||||
await refresh(false);
|
||||
} catch (error) {
|
||||
form.submit();
|
||||
} finally {
|
||||
getDrawer()?.classList.remove('is-busy');
|
||||
}
|
||||
});
|
||||
})();
|
||||
{% endjavascript %}
|
||||
|
||||
{% schema %}
|
||||
{
|
||||
"name": "t:cart_drawer.name",
|
||||
"tag": "section",
|
||||
"class": "cart-drawer-section",
|
||||
"settings": [
|
||||
{
|
||||
"type": "number",
|
||||
"id": "free_shipping",
|
||||
"label": "t:cart_drawer.free_shipping",
|
||||
"info": "t:cart_drawer.free_shipping_info",
|
||||
"default": 699
|
||||
},
|
||||
{
|
||||
"type": "collection",
|
||||
"id": "recommendations",
|
||||
"label": "t:cart_drawer.recommendations",
|
||||
"info": "t:cart_drawer.recommendations_info"
|
||||
}
|
||||
]
|
||||
}
|
||||
{% endschema %}
|
||||
+733
-31
@@ -1,47 +1,749 @@
|
||||
{% comment %}
|
||||
This section is used in the collection template to render collection page
|
||||
listing all products within a collection.
|
||||
{% liquid
|
||||
assign banner_type = collection.metafields.custom.banner_tipo.value | default: collection.metafields.custom.banner_type.value | downcase
|
||||
if banner_type == blank
|
||||
assign banner_type = 'titulo'
|
||||
endif
|
||||
|
||||
https://shopify.dev/docs/storefronts/themes/architecture/templates/collection
|
||||
{% endcomment %}
|
||||
assign banner_image = collection.metafields.custom.banner_imagen.value | default: collection.metafields.custom.banner_image.value
|
||||
if banner_image == blank
|
||||
assign banner_image = collection.image
|
||||
endif
|
||||
|
||||
<h1>{{ collection.title }}</h1>
|
||||
assign banner_title = collection.metafields.custom.banner_titulo.value | default: collection.metafields.custom.banner_title.value
|
||||
if banner_title == blank
|
||||
assign banner_title = collection.title
|
||||
endif
|
||||
|
||||
<div class="collection-products">
|
||||
{% paginate collection.products by 20 %}
|
||||
{% for product in collection.products %}
|
||||
<div class="collection-product">
|
||||
{% if product.featured_image %}
|
||||
{% render 'image',
|
||||
class: 'collection-product__image',
|
||||
image: product.featured_image,
|
||||
url: product.url,
|
||||
width: 400,
|
||||
height: 400,
|
||||
crop: 'center'
|
||||
%}
|
||||
{% endif %}
|
||||
<div class="collection-product__content">
|
||||
<p>{{ product.title | escape | link_to: product.url }}</p>
|
||||
<p>{{ product.price | money }}</p>
|
||||
assign banner_text = collection.metafields.custom.banner_texto.value | default: collection.metafields.custom.banner_text.value
|
||||
assign banner_text_is_html = false
|
||||
if banner_text == blank
|
||||
assign banner_text = collection.description
|
||||
assign banner_text_is_html = true
|
||||
endif
|
||||
|
||||
assign grid_image = collection.metafields.custom.banner_listado.value | default: collection.metafields.custom.banner_grid.value
|
||||
assign grid_link = collection.metafields.custom.banner_enlace.value | default: collection.metafields.custom.banner_link.value
|
||||
|
||||
assign show_hero = false
|
||||
assign show_grid_banner = false
|
||||
if banner_type == 'listado' or banner_type == 'grid' or banner_type == 'productos'
|
||||
assign show_grid_banner = true
|
||||
elsif banner_type == 'ambos' or banner_type == 'both'
|
||||
assign show_hero = true
|
||||
assign show_grid_banner = true
|
||||
else
|
||||
assign show_hero = true
|
||||
endif
|
||||
|
||||
if show_grid_banner and grid_image == blank
|
||||
assign grid_image = collection.metafields.custom.banner_imagen.value | default: collection.metafields.custom.banner_image.value
|
||||
endif
|
||||
if show_grid_banner and grid_image == blank
|
||||
assign show_grid_banner = false
|
||||
endif
|
||||
|
||||
assign per_page = section.settings.products_per_page | default: 9
|
||||
if show_grid_banner
|
||||
assign per_page = per_page | minus: 1
|
||||
endif
|
||||
if per_page < 1
|
||||
assign per_page = 1
|
||||
endif
|
||||
|
||||
assign current_sort = collection.sort_by | default: collection.default_sort_by
|
||||
assign sort_label = blank
|
||||
for option in collection.sort_options
|
||||
if option.value == current_sort
|
||||
assign sort_label = option.name
|
||||
endif
|
||||
endfor
|
||||
%}
|
||||
|
||||
<section
|
||||
class="collection full-width"
|
||||
data-collection
|
||||
data-cart-add-url="{{ routes.cart_add_url }}.js"
|
||||
>
|
||||
{% if show_hero %}
|
||||
<div class="collection__banner{% if banner_image == blank %} collection__banner--text{% endif %}">
|
||||
{% if banner_image != blank %}
|
||||
<div class="collection__banner-media">
|
||||
{{
|
||||
banner_image
|
||||
| image_url: width: 1600
|
||||
| image_tag:
|
||||
alt: banner_title,
|
||||
widths: '600, 960, 1400',
|
||||
sizes: '(max-width: 767px) 70vw, 50vw',
|
||||
class: 'collection__banner-image',
|
||||
loading: 'eager'
|
||||
}}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="collection__banner-copy">
|
||||
<h1 class="collection__banner-title">{{ banner_title | escape }}</h1>
|
||||
{% if banner_text != blank %}
|
||||
<div class="collection__banner-text">
|
||||
{% if banner_text_is_html %}
|
||||
{{ banner_text }}
|
||||
{% else %}
|
||||
{{ banner_text | escape | newline_to_br }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<img
|
||||
class="collection__banner-blob"
|
||||
src="{{ 'Capa_1.avif' | asset_url }}"
|
||||
alt=""
|
||||
width="185"
|
||||
height="210"
|
||||
>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<h1 class="collection__fallback-title">{{ collection.title | escape }}</h1>
|
||||
{% endif %}
|
||||
|
||||
{{ paginate | default_pagination }}
|
||||
{% endpaginate %}
|
||||
</div>
|
||||
<div class="collection__body">
|
||||
<div class="collection__bar">
|
||||
<div class="collection__tools">
|
||||
<button class="collection__tool" type="button" data-filter-toggle aria-expanded="false" aria-controls="collection-filters">
|
||||
<svg width="25" height="25" viewBox="0 0 25 25" aria-hidden="true" focusable="false">
|
||||
<path d="M4 7.5h17M4 12.5h17M4 17.5h17" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/>
|
||||
<circle cx="9" cy="7.5" r="2.1" fill="#f9f9fa" stroke="currentColor" stroke-width="1.4"/>
|
||||
<circle cx="16" cy="12.5" r="2.1" fill="#f9f9fa" stroke="currentColor" stroke-width="1.4"/>
|
||||
<circle cx="11" cy="17.5" r="2.1" fill="#f9f9fa" stroke="currentColor" stroke-width="1.4"/>
|
||||
</svg>
|
||||
{{ 'collection_page.filters' | t }}
|
||||
</button>
|
||||
<button class="collection__tool" type="button" data-sort-toggle aria-expanded="false" aria-controls="collection-sort">
|
||||
{{ 'collection_page.sort' | t: sort: sort_label }}
|
||||
</button>
|
||||
</div>
|
||||
<p class="collection__count">{{ 'collection_page.products' | t: count: collection.products_count }}</p>
|
||||
</div>
|
||||
|
||||
<div class="collection__panel" id="collection-filters" data-filter-panel>
|
||||
<div class="collection__panel-inner">
|
||||
{% if collection.filters.size > 0 %}
|
||||
<form class="collection__filter-form" action="{{ collection.url }}" method="get">
|
||||
{% if current_sort != blank %}
|
||||
<input type="hidden" name="sort_by" value="{{ current_sort }}">
|
||||
{% endif %}
|
||||
<div class="collection__filter-groups">
|
||||
{% for filter in collection.filters %}
|
||||
<fieldset class="collection__filter">
|
||||
<legend>{{ filter.label | escape }}</legend>
|
||||
{% case filter.type %}
|
||||
{% when 'price_range' %}
|
||||
<div class="collection__price">
|
||||
<input
|
||||
type="number"
|
||||
name="{{ filter.min_value.param_name }}"
|
||||
{% if filter.min_value.value %}value="{{ filter.min_value.value | divided_by: 100.0 }}"{% endif %}
|
||||
min="0"
|
||||
placeholder="0"
|
||||
>
|
||||
<input
|
||||
type="number"
|
||||
name="{{ filter.max_value.param_name }}"
|
||||
{% if filter.max_value.value %}value="{{ filter.max_value.value | divided_by: 100.0 }}"{% endif %}
|
||||
min="0"
|
||||
placeholder="{{ filter.range_max | divided_by: 100.0 }}"
|
||||
>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="collection__options">
|
||||
{% for value in filter.values %}
|
||||
<label class="collection__option">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="{{ value.param_name }}"
|
||||
value="{{ value.value }}"
|
||||
{% if value.active %}checked{% endif %}
|
||||
{% if value.count == 0 and value.active == false %}disabled{% endif %}
|
||||
>
|
||||
<span>{{ value.label | escape }} ({{ value.count }})</span>
|
||||
</label>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endcase %}
|
||||
</fieldset>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="collection__filter-actions">
|
||||
<button class="collection__apply" type="submit">{{ 'collection_page.apply' | t }}</button>
|
||||
<a class="collection__clear" href="{{ collection.url }}">{{ 'collection_page.clear' | t }}</a>
|
||||
</div>
|
||||
</form>
|
||||
{% else %}
|
||||
<p class="collection__none">{{ 'collection_page.no_filters' | t }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="collection__panel" id="collection-sort" data-sort-panel>
|
||||
<div class="collection__panel-inner">
|
||||
<form class="collection__sort-form" action="{{ collection.url }}" method="get">
|
||||
{% for filter in collection.filters %}
|
||||
{% if filter.type == 'price_range' %}
|
||||
{% if filter.min_value.value %}
|
||||
<input type="hidden" name="{{ filter.min_value.param_name }}" value="{{ filter.min_value.value }}">
|
||||
{% endif %}
|
||||
{% if filter.max_value.value %}
|
||||
<input type="hidden" name="{{ filter.max_value.param_name }}" value="{{ filter.max_value.value }}">
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% for value in filter.active_values %}
|
||||
<input type="hidden" name="{{ value.param_name }}" value="{{ value.value }}">
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<div class="collection__sort-list">
|
||||
{% for option in collection.sort_options %}
|
||||
<button
|
||||
class="collection__sort-option{% if option.value == current_sort %} is-current{% endif %}"
|
||||
type="submit"
|
||||
name="sort_by"
|
||||
value="{{ option.value }}"
|
||||
>
|
||||
{{ option.name | escape }}
|
||||
</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% paginate collection.products by per_page %}
|
||||
{% if collection.products_count == 0 %}
|
||||
<p class="collection__empty">{{ 'collection_page.empty' | t }}</p>
|
||||
{% else %}
|
||||
<div class="collection__grid">
|
||||
{% if show_grid_banner %}
|
||||
{% if grid_link != blank %}
|
||||
<a class="collection__promo" href="{{ grid_link }}">
|
||||
{% else %}
|
||||
<div class="collection__promo">
|
||||
{% endif %}
|
||||
{{
|
||||
grid_image
|
||||
| image_url: width: 1200
|
||||
| image_tag:
|
||||
alt: banner_title,
|
||||
widths: '400, 700, 1000',
|
||||
sizes: '(max-width: 767px) 46vw, 33vw',
|
||||
loading: 'lazy'
|
||||
}}
|
||||
{% if grid_link != blank %}
|
||||
</a>
|
||||
{% else %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% for product in collection.products %}
|
||||
{% assign card_suffix = section.id | append: '-' | append: forloop.index %}
|
||||
{% render 'collection-card', product: product, form_suffix: card_suffix %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if paginate.pages > 1 %}
|
||||
<nav class="collection__pages" aria-label="{{ 'collection_page.page' | t: page: paginate.current_page }}">
|
||||
{% for part in paginate.parts %}
|
||||
{% if part.is_link %}
|
||||
<a class="collection__page" href="{{ part.url }}">{{ part.title }}</a>
|
||||
{% elsif part.title == paginate.current_page %}
|
||||
<span class="collection__page is-current" aria-current="page">{{ part.title }}</span>
|
||||
{% else %}
|
||||
<span class="collection__page collection__page--gap">{{ part.title }}</span>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if paginate.next %}
|
||||
<a class="collection__next" href="{{ paginate.next.url }}" aria-label="{{ 'collection_page.next_page' | t }}">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false">
|
||||
<path d="M7 4.5 12.5 10 7 15.5" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
{% endif %}
|
||||
{% endpaginate %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% stylesheet %}
|
||||
.collection-products {
|
||||
.collection {
|
||||
background: #f9f9fa;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.collection__banner {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
|
||||
grid-template-columns: 1fr 1fr;
|
||||
min-height: 380px;
|
||||
background: #f7c585;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.collection__banner--text {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.collection__banner-media {
|
||||
height: 100%;
|
||||
min-height: 380px;
|
||||
}
|
||||
|
||||
.collection__banner-image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 380px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.collection__banner-copy {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
gap: 22px;
|
||||
padding: 48px 180px 48px 70px;
|
||||
}
|
||||
|
||||
.collection__banner-title,
|
||||
.collection__fallback-title {
|
||||
margin: 0;
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.collection__fallback-title {
|
||||
padding: 40px 100px 0;
|
||||
}
|
||||
|
||||
.collection__banner-text {
|
||||
max-width: 570px;
|
||||
font-size: 18px;
|
||||
font-weight: 300;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.collection__banner-text p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.collection__banner-blob {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 48px;
|
||||
width: 185px;
|
||||
height: auto;
|
||||
opacity: 0.8;
|
||||
pointer-events: none;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.collection__body {
|
||||
padding: 28px 100px 80px;
|
||||
}
|
||||
|
||||
.collection__bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 20px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.collection__tools {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.collection__tool {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
height: 50px;
|
||||
padding: 0 18px;
|
||||
border: 1px solid #808181;
|
||||
border-radius: 60px;
|
||||
background: transparent;
|
||||
color: #000;
|
||||
font: inherit;
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.collection__tool svg {
|
||||
display: block;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.collection__count,
|
||||
.collection__empty,
|
||||
.collection__none {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.collection__panel {
|
||||
display: grid;
|
||||
grid-template-rows: 0fr;
|
||||
transition: grid-template-rows 0.28s ease;
|
||||
}
|
||||
|
||||
.collection__panel.is-open {
|
||||
grid-template-rows: 1fr;
|
||||
}
|
||||
|
||||
.collection__panel-inner {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.collection__filter-form,
|
||||
.collection__sort-form {
|
||||
padding: 22px 0 8px;
|
||||
}
|
||||
|
||||
.collection__filter-groups {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 28px 48px;
|
||||
}
|
||||
|
||||
.collection__filter {
|
||||
min-width: 180px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.collection__filter legend {
|
||||
margin-bottom: 10px;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.collection__options {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.collection__option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 15px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.collection__price {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.collection__price input {
|
||||
width: 110px;
|
||||
height: 40px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid #d0d0d0;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
.collection__filter-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
margin-top: 22px;
|
||||
}
|
||||
|
||||
.collection__apply {
|
||||
height: 44px;
|
||||
padding: 0 22px;
|
||||
border: 0;
|
||||
border-radius: 60px;
|
||||
background: #9dd6c7;
|
||||
color: #000;
|
||||
font: inherit;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.collection__clear {
|
||||
color: #000;
|
||||
font-size: 15px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.collection__sort-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.collection__sort-option {
|
||||
padding: 6px 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: #000;
|
||||
font: inherit;
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.collection__sort-option.is-current {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.collection__grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 28px 20px;
|
||||
margin-top: 28px;
|
||||
}
|
||||
|
||||
.collection__promo {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
border-radius: 10px;
|
||||
aspect-ratio: 1;
|
||||
}
|
||||
|
||||
.collection__promo img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.collection__empty {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.collection__pages {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 15px;
|
||||
margin-top: 48px;
|
||||
}
|
||||
|
||||
.collection__page,
|
||||
.collection__next {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 25px;
|
||||
color: #000;
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
line-height: 1;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.collection__page.is-current {
|
||||
background: #000;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.collection__next {
|
||||
background: #c9c9c9;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.collection__next svg {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media (max-width: 1119px) {
|
||||
.collection__banner-copy {
|
||||
padding: 36px 40px;
|
||||
}
|
||||
|
||||
.collection__banner-blob {
|
||||
width: 120px;
|
||||
right: 16px;
|
||||
}
|
||||
|
||||
.collection__body,
|
||||
.collection__fallback-title {
|
||||
padding-right: 24px;
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
.collection__grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.collection__banner {
|
||||
grid-template-columns: 1fr;
|
||||
min-height: 250px;
|
||||
}
|
||||
|
||||
.collection__banner-media {
|
||||
position: absolute;
|
||||
inset: 0 auto 0 0;
|
||||
width: 58%;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.collection__banner {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.collection__banner-image {
|
||||
min-height: 250px;
|
||||
}
|
||||
|
||||
.collection__banner-copy {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
min-height: 250px;
|
||||
justify-content: flex-end;
|
||||
gap: 15px;
|
||||
padding: 20px;
|
||||
background: linear-gradient(90deg, rgba(247, 197, 133, 0) 0%, #f7c585 46%);
|
||||
}
|
||||
|
||||
.collection__banner-title {
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.collection__banner-text {
|
||||
font-size: 14px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.collection__banner-blob {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.collection__body {
|
||||
padding: 18px 10px 48px;
|
||||
}
|
||||
|
||||
.collection__fallback-title {
|
||||
padding: 24px 16px 0;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
.collection__bar {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.collection__tools {
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.collection__tool {
|
||||
height: 40px;
|
||||
padding: 0 12px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.collection__count {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.collection__grid {
|
||||
gap: 20px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.collection__panel {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
{% endstylesheet %}
|
||||
|
||||
{% javascript %}
|
||||
(() => {
|
||||
if (window.__seasonCollection) return;
|
||||
window.__seasonCollection = true;
|
||||
|
||||
const closePanels = (root) => {
|
||||
root.querySelectorAll('[data-filter-panel], [data-sort-panel]').forEach((panel) => {
|
||||
panel.classList.remove('is-open');
|
||||
});
|
||||
root.querySelectorAll('[data-filter-toggle], [data-sort-toggle]').forEach((button) => {
|
||||
button.setAttribute('aria-expanded', 'false');
|
||||
});
|
||||
};
|
||||
|
||||
const togglePanel = (root, name) => {
|
||||
const panel = root.querySelector(`[data-${name}-panel]`);
|
||||
const button = root.querySelector(`[data-${name}-toggle]`);
|
||||
if (!panel || !button) return;
|
||||
const willOpen = !panel.classList.contains('is-open');
|
||||
closePanels(root);
|
||||
if (willOpen) {
|
||||
panel.classList.add('is-open');
|
||||
button.setAttribute('aria-expanded', 'true');
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener('click', (event) => {
|
||||
const root = event.target.closest('[data-collection]') || document.querySelector('[data-collection]');
|
||||
if (!root) return;
|
||||
|
||||
if (event.target.closest('[data-filter-toggle]')) {
|
||||
togglePanel(root, 'filter');
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.target.closest('[data-sort-toggle]')) {
|
||||
togglePanel(root, 'sort');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!event.target.closest('[data-filter-panel], [data-sort-panel]')) {
|
||||
closePanels(root);
|
||||
}
|
||||
});
|
||||
})();
|
||||
{% endjavascript %}
|
||||
|
||||
{% schema %}
|
||||
{
|
||||
"name": "t:general.collection",
|
||||
"settings": []
|
||||
"name": "t:collection_page.name",
|
||||
"tag": "section",
|
||||
"class": "collection-section",
|
||||
"settings": [
|
||||
{
|
||||
"type": "paragraph",
|
||||
"content": "t:collection_page.metafields"
|
||||
},
|
||||
{
|
||||
"type": "range",
|
||||
"id": "products_per_page",
|
||||
"label": "t:collection_page.products_per_page",
|
||||
"min": 6,
|
||||
"max": 24,
|
||||
"step": 3,
|
||||
"default": 9
|
||||
}
|
||||
]
|
||||
}
|
||||
{% endschema %}
|
||||
|
||||
@@ -0,0 +1,390 @@
|
||||
{% liquid
|
||||
if section.settings.line_1 != blank
|
||||
assign line_1 = section.settings.line_1
|
||||
else
|
||||
assign line_1 = 'distributors.line_1' | t
|
||||
endif
|
||||
|
||||
if section.settings.brand != blank
|
||||
assign brand = section.settings.brand
|
||||
else
|
||||
assign brand = 'distributors.brand' | t
|
||||
endif
|
||||
|
||||
if section.settings.line_2 != blank
|
||||
assign line_2 = section.settings.line_2
|
||||
else
|
||||
assign line_2 = 'distributors.line_2' | t
|
||||
endif
|
||||
|
||||
if section.settings.text != blank
|
||||
assign text = section.settings.text
|
||||
else
|
||||
assign text = 'distributors.text' | t
|
||||
endif
|
||||
|
||||
if section.settings.button_label != blank
|
||||
assign button_label = section.settings.button_label
|
||||
else
|
||||
assign button_label = 'distributors.button' | t
|
||||
endif
|
||||
|
||||
assign photo_alt = 'distributors.photo_alt' | t
|
||||
%}
|
||||
|
||||
<section class="distributors full-width" id="Distributors-{{ section.id }}">
|
||||
<div class="distributors__layout">
|
||||
<div class="distributors__photo">
|
||||
{% if section.settings.image != blank %}
|
||||
{{
|
||||
section.settings.image
|
||||
| image_url: width: 1720
|
||||
| image_tag:
|
||||
class: 'distributors__photo-image',
|
||||
alt: photo_alt,
|
||||
widths: '480, 800, 1200, 1720',
|
||||
sizes: '(max-width: 1024px) 92vw, 45vw',
|
||||
loading: 'lazy'
|
||||
}}
|
||||
{% else %}
|
||||
<img
|
||||
class="distributors__photo-image distributors__photo-image--flip"
|
||||
src="{{ 'distributors-photo.avif' | asset_url }}"
|
||||
alt="{{ photo_alt | escape }}"
|
||||
width="1157"
|
||||
height="1300"
|
||||
loading="lazy"
|
||||
>
|
||||
{% endif %}
|
||||
|
||||
<img
|
||||
class="distributors__wordmark"
|
||||
src="{{ 'distributors-wordmark.svg' | asset_url }}"
|
||||
alt="{{ 'distributors.wordmark' | t }}"
|
||||
width="324"
|
||||
height="210"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="distributors__panel">
|
||||
<img
|
||||
class="distributors__blob distributors__blob--top"
|
||||
src="{{ 'distributors-blob.avif' | asset_url }}"
|
||||
alt=""
|
||||
width="355"
|
||||
height="403"
|
||||
>
|
||||
<img
|
||||
class="distributors__blob distributors__blob--bottom"
|
||||
src="{{ 'distributors-blob.avif' | asset_url }}"
|
||||
alt=""
|
||||
width="210"
|
||||
height="114"
|
||||
>
|
||||
|
||||
<div class="distributors__copy">
|
||||
<h2 class="distributors__heading">
|
||||
<span class="distributors__line">
|
||||
<span class="distributors__medium">{{ line_1 | escape }}</span>
|
||||
<span class="distributors__bold"> {{ brand | escape }}</span>
|
||||
</span>
|
||||
<span class="distributors__line distributors__line--rest">{{ line_2 | escape }}</span>
|
||||
</h2>
|
||||
|
||||
{% if text != blank %}
|
||||
<p class="distributors__text">{{ text | escape }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if button_label != blank %}
|
||||
{% if section.settings.button_link != blank %}
|
||||
<a class="distributors__button" href="{{ section.settings.button_link }}">
|
||||
{{ button_label | escape }}
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="distributors__button">{{ button_label | escape }}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% stylesheet %}
|
||||
.distributors {
|
||||
margin-top: 100px;
|
||||
color: #000;
|
||||
font-family: Archivo, sans-serif;
|
||||
}
|
||||
|
||||
.distributors__layout {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 859fr) minmax(0, 860fr);
|
||||
width: min(1719px, calc(100% - 200px));
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
||||
.distributors__photo {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border-radius: 10px 0 0 10px;
|
||||
aspect-ratio: 859 / 964;
|
||||
background: #f3f1ee;
|
||||
}
|
||||
|
||||
.distributors__photo-image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.distributors__photo-image--flip {
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
|
||||
.distributors__wordmark {
|
||||
position: absolute;
|
||||
left: 31.2%;
|
||||
top: 39.1%;
|
||||
display: block;
|
||||
width: 37.7%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.distributors__panel {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
border-radius: 0 10px 10px 0;
|
||||
background: linear-gradient(131deg, #ffffff 0%, #ffffff 35.6%, #e5f4ff 67.9%);
|
||||
}
|
||||
|
||||
.distributors__blob {
|
||||
position: absolute;
|
||||
height: auto;
|
||||
opacity: 0.7;
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.distributors__blob--top {
|
||||
top: 5%;
|
||||
right: 4%;
|
||||
width: 41.3%;
|
||||
}
|
||||
|
||||
.distributors__blob--bottom {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.distributors__copy {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 40px;
|
||||
width: min(804px, 100%);
|
||||
padding: 48px 28px;
|
||||
}
|
||||
|
||||
.distributors__heading {
|
||||
margin: 0;
|
||||
font-family: "Roc Grotesk", Archivo, sans-serif;
|
||||
font-size: 60px;
|
||||
font-weight: 500;
|
||||
line-height: 75px;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.distributors__line {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.distributors__bold {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.distributors__text {
|
||||
max-width: 672px;
|
||||
margin: 0;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.distributors__button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 341px;
|
||||
max-width: 100%;
|
||||
height: 50px;
|
||||
padding: 15px;
|
||||
border-radius: 60px;
|
||||
background: #9dd6c7;
|
||||
color: #000;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.distributors__button {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a.distributors__button:hover {
|
||||
filter: brightness(0.96);
|
||||
}
|
||||
|
||||
a.distributors__button:focus-visible {
|
||||
outline: 2px solid #000;
|
||||
outline-offset: 3px;
|
||||
}
|
||||
|
||||
@media (max-width: 1439px) {
|
||||
.distributors__layout {
|
||||
width: min(1719px, calc(100% - 80px));
|
||||
}
|
||||
|
||||
.distributors__heading {
|
||||
font-size: 44px;
|
||||
line-height: 54px;
|
||||
}
|
||||
|
||||
.distributors__text {
|
||||
font-size: 18px;
|
||||
line-height: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.distributors {
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.distributors__layout {
|
||||
grid-template-columns: 1fr;
|
||||
width: min(372px, calc(100% - 30px));
|
||||
}
|
||||
|
||||
.distributors__photo {
|
||||
border-radius: 10px 10px 0 0;
|
||||
aspect-ratio: 372 / 420;
|
||||
}
|
||||
|
||||
.distributors__panel {
|
||||
min-height: 420px;
|
||||
border-radius: 0 0 10px 10px;
|
||||
}
|
||||
|
||||
.distributors__blob--top {
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 46%;
|
||||
}
|
||||
|
||||
.distributors__blob--bottom {
|
||||
display: block;
|
||||
bottom: -18%;
|
||||
left: 28%;
|
||||
width: 56%;
|
||||
}
|
||||
|
||||
.distributors__copy {
|
||||
gap: 18px;
|
||||
padding: 48px 10px;
|
||||
}
|
||||
|
||||
.distributors__heading {
|
||||
font-size: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.distributors__bold {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.distributors__line--rest {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.distributors__text {
|
||||
max-width: none;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.distributors__button {
|
||||
width: 300px;
|
||||
height: 45px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
{% endstylesheet %}
|
||||
|
||||
{% schema %}
|
||||
{
|
||||
"name": "t:distributors.name",
|
||||
"tag": "section",
|
||||
"class": "distributors-section",
|
||||
"disabled_on": {
|
||||
"groups": ["header", "footer"]
|
||||
},
|
||||
"settings": [
|
||||
{
|
||||
"type": "text",
|
||||
"id": "line_1",
|
||||
"label": "t:distributors.line_1",
|
||||
"default": "Lleva"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "brand",
|
||||
"label": "t:distributors.brand",
|
||||
"default": "Seasons"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "line_2",
|
||||
"label": "t:distributors.line_2",
|
||||
"default": "a más personas"
|
||||
},
|
||||
{
|
||||
"type": "textarea",
|
||||
"id": "text",
|
||||
"label": "t:distributors.text",
|
||||
"default": "Súmate como distribuidor y forma parte de una marca mexicana de skincare que acompaña a cada persona a encontrar productos pensados para su rutina, sus necesidades y su forma de cuidarse."
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "button_label",
|
||||
"label": "t:distributors.button_label",
|
||||
"default": "Regístrate"
|
||||
},
|
||||
{
|
||||
"type": "url",
|
||||
"id": "button_link",
|
||||
"label": "t:distributors.button_link"
|
||||
},
|
||||
{
|
||||
"type": "image_picker",
|
||||
"id": "image",
|
||||
"label": "t:distributors.image",
|
||||
"info": "t:distributors.image_info"
|
||||
}
|
||||
],
|
||||
"presets": [
|
||||
{
|
||||
"name": "t:distributors.name"
|
||||
}
|
||||
]
|
||||
}
|
||||
{% endschema %}
|
||||
@@ -14,8 +14,7 @@
|
||||
"footer": {
|
||||
"type": "footer",
|
||||
"settings": {
|
||||
"menu": "",
|
||||
"show_payment_icons": true
|
||||
"menu": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
+712
-32
@@ -1,56 +1,736 @@
|
||||
<footer>
|
||||
<div class="footer__copyright">
|
||||
©
|
||||
{{ 'now' | date: '%Y' }}
|
||||
{{ shop.name | link_to: routes.root_url }}, {{ powered_by_link }}
|
||||
{% liquid
|
||||
assign copyright_year = 'now' | date: '%Y'
|
||||
assign privacy_url = '/pages/aviso-de-privacidad'
|
||||
assign shipping_url = '/pages/envios'
|
||||
assign returns_url = '/pages/devoluciones'
|
||||
assign payments_url = '/pages/politica-de-pagos'
|
||||
|
||||
if shop.privacy_policy != blank
|
||||
assign privacy_url = shop.privacy_policy.url
|
||||
endif
|
||||
|
||||
if shop.shipping_policy != blank
|
||||
assign shipping_url = shop.shipping_policy.url
|
||||
endif
|
||||
|
||||
if shop.refund_policy != blank
|
||||
assign returns_url = shop.refund_policy.url
|
||||
endif
|
||||
|
||||
if shop.terms_of_service != blank
|
||||
assign payments_url = shop.terms_of_service.url
|
||||
endif
|
||||
|
||||
assign form_id = 'FooterSignup-' | append: section.id
|
||||
assign email_id = 'FooterEmail-' | append: section.id
|
||||
assign message_id = 'FooterSignupMessage-' | append: section.id
|
||||
%}
|
||||
|
||||
<footer class="footer full-width">
|
||||
<div class="footer__brand">
|
||||
<a class="footer__logo" href="{{ routes.root_url }}">
|
||||
{% if section.settings.logo != blank %}
|
||||
{{
|
||||
section.settings.logo
|
||||
| image_url: width: 2200
|
||||
| image_tag: alt: shop.name, class: 'footer__logo-image', widths: '400, 800, 1200, 1600, 2200'
|
||||
}}
|
||||
{% else %}
|
||||
<span class="footer__logo-mark" aria-hidden="true">
|
||||
{{ 'logo-seasons.svg' | inline_asset_content }}
|
||||
</span>
|
||||
<span class="sr-only">{{ shop.name }}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="footer__links">
|
||||
{% for link in section.settings.menu.links %}
|
||||
{{ link.title | link_to: link.url }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="footer__panel">
|
||||
<div class="footer__columns">
|
||||
{% if section.settings.menu != blank and section.settings.menu.links.size > 0 %}
|
||||
{% for link in section.settings.menu.links %}
|
||||
<div class="footer__column">
|
||||
{% if link.links.size > 0 %}
|
||||
<button
|
||||
class="footer__toggle"
|
||||
type="button"
|
||||
aria-expanded="true"
|
||||
aria-controls="FooterLinks-{{ section.id }}-{{ forloop.index }}"
|
||||
>
|
||||
<span class="footer__heading">{{ link.title }}</span>
|
||||
<span class="footer__chevron" aria-hidden="true">
|
||||
{{ 'signup-arrow.svg' | inline_asset_content }}
|
||||
</span>
|
||||
</button>
|
||||
<ul class="footer__links" id="FooterLinks-{{ section.id }}-{{ forloop.index }}">
|
||||
{% for child in link.links %}
|
||||
<li>
|
||||
<a href="{{ child.url }}">{{ child.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<a class="footer__heading" href="{{ link.url }}">{{ link.title }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="footer__column footer__column--seasons">
|
||||
<button class="footer__toggle" type="button" aria-expanded="true" aria-controls="FooterLinks-{{ section.id }}-seasons">
|
||||
<span class="footer__heading">{{ 'footer.columns.seasons' | t }}</span>
|
||||
<span class="footer__chevron" aria-hidden="true">
|
||||
{{ 'signup-arrow.svg' | inline_asset_content }}
|
||||
</span>
|
||||
</button>
|
||||
<ul class="footer__links" id="FooterLinks-{{ section.id }}-seasons">
|
||||
<li><a href="/pages/quienes-somos">{{ 'footer.seasons.about' | t }}</a></li>
|
||||
<li><a href="/blogs/seasons">{{ 'footer.seasons.blog' | t }}</a></li>
|
||||
<li><a href="/pages/resenas">{{ 'footer.seasons.reviews' | t }}</a></li>
|
||||
<li><a href="/pages/puntos-de-venta">{{ 'footer.seasons.stores' | t }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer__column footer__column--shop">
|
||||
<button class="footer__toggle" type="button" aria-expanded="true" aria-controls="FooterLinks-{{ section.id }}-shop">
|
||||
<span class="footer__heading">{{ 'footer.columns.shop' | t }}</span>
|
||||
<span class="footer__chevron" aria-hidden="true">
|
||||
{{ 'signup-arrow.svg' | inline_asset_content }}
|
||||
</span>
|
||||
</button>
|
||||
<ul class="footer__links" id="FooterLinks-{{ section.id }}-shop">
|
||||
<li><a href="{{ routes.all_products_collection_url }}">{{ 'footer.shop.all' | t }}</a></li>
|
||||
<li><a href="/collections/mas-vendidos">{{ 'footer.shop.bestsellers' | t }}</a></li>
|
||||
<li><a href="/collections/nuevos-lanzamientos">{{ 'footer.shop.new' | t }}</a></li>
|
||||
<li><a href="/collections/kits-y-rutinas">{{ 'footer.shop.kits' | t }}</a></li>
|
||||
<li><a href="/collections/linea-anterior">{{ 'footer.shop.previous' | t }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer__column footer__column--routine">
|
||||
<button class="footer__toggle" type="button" aria-expanded="true" aria-controls="FooterLinks-{{ section.id }}-routine">
|
||||
<span class="footer__heading">{{ 'footer.columns.routine' | t }}</span>
|
||||
<span class="footer__chevron" aria-hidden="true">
|
||||
{{ 'signup-arrow.svg' | inline_asset_content }}
|
||||
</span>
|
||||
</button>
|
||||
<ul class="footer__links" id="FooterLinks-{{ section.id }}-routine">
|
||||
<li><a href="/pages/tu-rutina-ideal">{{ 'footer.routine.ideal' | t }}</a></li>
|
||||
<li><a href="/collections/piel-grasa">{{ 'footer.routine.oily' | t }}</a></li>
|
||||
<li><a href="/collections/piel-mixta">{{ 'footer.routine.combination' | t }}</a></li>
|
||||
<li><a href="/collections/piel-seca">{{ 'footer.routine.dry' | t }}</a></li>
|
||||
<li><a href="/collections/todo-tipo">{{ 'footer.routine.all' | t }}</a></li>
|
||||
<li><a href="/collections/kits-y-rutinas">{{ 'footer.routine.kits' | t }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer__column footer__column--help">
|
||||
<button class="footer__toggle" type="button" aria-expanded="true" aria-controls="FooterLinks-{{ section.id }}-help">
|
||||
<span class="footer__heading">{{ 'footer.columns.help' | t }}</span>
|
||||
<span class="footer__chevron" aria-hidden="true">
|
||||
{{ 'signup-arrow.svg' | inline_asset_content }}
|
||||
</span>
|
||||
</button>
|
||||
<ul class="footer__links" id="FooterLinks-{{ section.id }}-help">
|
||||
<li><a href="/pages/preguntas-frecuentes">{{ 'footer.help.faq' | t }}</a></li>
|
||||
<li><a href="{{ shipping_url }}">{{ 'footer.help.shipping' | t }}</a></li>
|
||||
<li><a href="{{ returns_url }}">{{ 'footer.help.returns' | t }}</a></li>
|
||||
<li><a href="/pages/facturacion">{{ 'footer.help.billing' | t }}</a></li>
|
||||
<li><a href="{{ payments_url }}">{{ 'footer.help.payments' | t }}</a></li>
|
||||
<li><a href="{{ privacy_url }}">{{ 'footer.help.privacy' | t }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer__column footer__column--community">
|
||||
<button class="footer__toggle" type="button" aria-expanded="true" aria-controls="FooterLinks-{{ section.id }}-community">
|
||||
<span class="footer__heading">{{ 'footer.columns.community' | t }}</span>
|
||||
<span class="footer__chevron" aria-hidden="true">
|
||||
{{ 'signup-arrow.svg' | inline_asset_content }}
|
||||
</span>
|
||||
</button>
|
||||
<ul class="footer__links" id="FooterLinks-{{ section.id }}-community">
|
||||
<li><a href="/pages/seasons-experts">{{ 'footer.community.experts' | t }}</a></li>
|
||||
<li><a href="/pages/ser-distribuidor">{{ 'footer.community.distributor' | t }}</a></li>
|
||||
<li><a href="/pages/glow-army">{{ 'footer.community.glow_army' | t }}</a></li>
|
||||
<li><a href="/pages/videos-y-tips">{{ 'footer.community.videos' | t }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="footer__payment">
|
||||
{% if section.settings.show_payment_icons %}
|
||||
{% for type in shop.enabled_payment_types %}
|
||||
{{ type | payment_type_svg_tag }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<div class="footer__newsletter">
|
||||
<p class="footer__heading">{{ 'footer.newsletter.heading' | t | newline_to_br }}</p>
|
||||
|
||||
{% form 'customer', id: form_id, class: 'footer__form' %}
|
||||
<input type="hidden" name="contact[tags]" value="newsletter">
|
||||
|
||||
<div class="footer__field">
|
||||
<label class="footer__label" for="{{ email_id }}">{{ 'footer.newsletter.email_label' | t }}</label>
|
||||
<input
|
||||
id="{{ email_id }}"
|
||||
class="footer__input"
|
||||
type="email"
|
||||
name="contact[email]"
|
||||
value="{{ form.email }}"
|
||||
placeholder="{{ 'footer.newsletter.placeholder' | t }}"
|
||||
autocomplete="email"
|
||||
autocapitalize="off"
|
||||
autocorrect="off"
|
||||
spellcheck="false"
|
||||
required
|
||||
aria-required="true"
|
||||
{% if form.errors %}
|
||||
aria-invalid="true"
|
||||
aria-describedby="{{ message_id }}"
|
||||
{% elsif form.posted_successfully? %}
|
||||
aria-describedby="{{ message_id }}"
|
||||
{% endif %}
|
||||
>
|
||||
<button class="footer__arrow" type="submit" aria-label="{{ 'footer.newsletter.submit' | t }}">
|
||||
<span class="footer__arrow-icon">
|
||||
{{ 'signup-arrow.svg' | inline_asset_content }}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button class="footer__discount" type="submit">
|
||||
{{ 'footer.newsletter.submit' | t }}
|
||||
</button>
|
||||
|
||||
{% if form.posted_successfully? %}
|
||||
<p id="{{ message_id }}" class="footer__message" role="status" tabindex="-1" autofocus>
|
||||
{{ 'footer.newsletter.success' | t }}
|
||||
</p>
|
||||
{% elsif form.errors %}
|
||||
<p id="{{ message_id }}" class="footer__message footer__message--error" role="alert">
|
||||
{% if form.errors.messages.email != blank %}
|
||||
{{ form.errors.messages.email | escape }}
|
||||
{% else %}
|
||||
{{ 'footer.newsletter.error' | t }}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endform %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer__bar">
|
||||
<p>
|
||||
{{ 'footer.copyright' | t: year: copyright_year, shop_name: shop.name }}
|
||||
</p>
|
||||
<ul class="footer__social">
|
||||
<li>
|
||||
{% if section.settings.instagram_url != blank %}
|
||||
<a href="{{ section.settings.instagram_url }}" target="_blank" rel="noopener" aria-label="{{ 'hero.instagram' | t }}">
|
||||
{{ 'footer-instagram.svg' | inline_asset_content }}
|
||||
</a>
|
||||
{% else %}
|
||||
<span aria-hidden="true">
|
||||
{{ 'footer-instagram.svg' | inline_asset_content }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
{% if section.settings.facebook_url != blank %}
|
||||
<a href="{{ section.settings.facebook_url }}" target="_blank" rel="noopener" aria-label="{{ 'hero.facebook' | t }}">
|
||||
{{ 'footer-facebook.svg' | inline_asset_content }}
|
||||
</a>
|
||||
{% else %}
|
||||
<span aria-hidden="true">
|
||||
{{ 'footer-facebook.svg' | inline_asset_content }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
{% if section.settings.linkedin_url != blank %}
|
||||
<a href="{{ section.settings.linkedin_url }}" target="_blank" rel="noopener" aria-label="{{ 'hero.linkedin' | t }}">
|
||||
{{ 'footer-linkedin.svg' | inline_asset_content }}
|
||||
</a>
|
||||
{% else %}
|
||||
<span aria-hidden="true">
|
||||
{{ 'footer-linkedin.svg' | inline_asset_content }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{% stylesheet %}
|
||||
footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 2rem;
|
||||
.footer {
|
||||
color: #000;
|
||||
background: #fff;
|
||||
}
|
||||
footer a {
|
||||
|
||||
.footer__brand {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 158px 100px;
|
||||
}
|
||||
|
||||
.footer__logo {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
line-height: 0;
|
||||
text-decoration: none;
|
||||
color: var(--color-foreground);
|
||||
}
|
||||
footer .footer__links,
|
||||
footer .footer__payment {
|
||||
|
||||
.footer__logo-mark svg,
|
||||
.footer__logo-image {
|
||||
display: block;
|
||||
width: 1083px;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.footer__panel {
|
||||
background: #eaeaea;
|
||||
padding: 50px 100px 30px;
|
||||
}
|
||||
|
||||
.footer__columns {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
flex-wrap: nowrap;
|
||||
align-items: flex-start;
|
||||
gap: clamp(16px, 4vw, 100px);
|
||||
}
|
||||
|
||||
.footer__column {
|
||||
flex: 1 1 0;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.footer__toggle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
margin: 0 0 10px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
text-align: left;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.footer__heading {
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
line-height: 30px;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.footer__chevron {
|
||||
display: none;
|
||||
flex-shrink: 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.footer__chevron svg {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.footer__links,
|
||||
.footer__column ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.footer__column li {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.footer__column a {
|
||||
color: #000;
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
line-height: 30px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.footer a:focus-visible {
|
||||
outline: 2px solid #000;
|
||||
outline-offset: 4px;
|
||||
}
|
||||
|
||||
.footer__newsletter {
|
||||
display: flex;
|
||||
flex: 0 1 395px;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
width: 395px;
|
||||
max-width: 395px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.footer__newsletter .footer__heading {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.footer__form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.footer__field {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
padding: 0 30px;
|
||||
border-radius: 100px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.footer__field:focus-within {
|
||||
outline: 2px solid #000;
|
||||
outline-offset: 3px;
|
||||
}
|
||||
|
||||
.footer__label {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.footer__input {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
color: #000;
|
||||
font-family: Archivo, sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
line-height: normal;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.footer__input::placeholder {
|
||||
color: #808181;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.footer__arrow {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-left: 12px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.footer__arrow-icon {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.footer__arrow-icon svg {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.footer__discount {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
padding: 15px;
|
||||
border: 0;
|
||||
border-radius: 60px;
|
||||
background: #9dd6c7;
|
||||
color: #000;
|
||||
font-family: Archivo, sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
line-height: normal;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.footer__message {
|
||||
margin: -8px 0 0;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.footer__message--error {
|
||||
color: #9b1c1c;
|
||||
}
|
||||
|
||||
.footer__bar {
|
||||
margin-top: 50px;
|
||||
border-top: 1px solid #d8d8d8;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.footer__bar p {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.footer__social {
|
||||
display: none;
|
||||
margin: 10px 0 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.footer__social a,
|
||||
.footer__social span {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.footer__social svg {
|
||||
display: block;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
@media (max-width: 1439px) {
|
||||
.footer__brand,
|
||||
.footer__panel {
|
||||
padding-right: 40px;
|
||||
padding-left: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.footer__brand {
|
||||
padding: 36px 30px;
|
||||
}
|
||||
|
||||
.footer__logo-mark svg,
|
||||
.footer__logo-image {
|
||||
width: min(100%, 274px);
|
||||
}
|
||||
|
||||
.footer__panel {
|
||||
padding: 40px 30px 28px;
|
||||
}
|
||||
|
||||
.footer__columns {
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.footer__column,
|
||||
.footer__newsletter {
|
||||
flex: none;
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.footer__column--shop {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.footer__column--seasons {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.footer__column--routine {
|
||||
order: 3;
|
||||
}
|
||||
|
||||
.footer__column--community {
|
||||
order: 4;
|
||||
}
|
||||
|
||||
.footer__column--help {
|
||||
order: 5;
|
||||
}
|
||||
|
||||
.footer__newsletter {
|
||||
order: 6;
|
||||
gap: 15px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.footer.is-collapsible .footer__toggle {
|
||||
margin: 0;
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 1px solid #d5d5d5;
|
||||
pointer-events: auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.footer.is-collapsible .footer__chevron {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.footer.is-collapsible .footer__column.is-open .footer__chevron {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
.footer.is-collapsible .footer__links {
|
||||
display: none;
|
||||
padding: 8px 0 4px;
|
||||
}
|
||||
|
||||
.footer.is-collapsible .footer__column.is-open .footer__links {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.footer__heading {
|
||||
font-size: 14px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.footer__newsletter .footer__heading {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.footer__column a {
|
||||
font-size: 14px;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.footer__field,
|
||||
.footer__discount {
|
||||
height: 45px;
|
||||
}
|
||||
|
||||
.footer__input,
|
||||
.footer__discount {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.footer__discount {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.footer__form {
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.footer__bar {
|
||||
margin-top: 24px;
|
||||
margin-right: -30px;
|
||||
margin-left: -30px;
|
||||
padding: 20px 30px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer__social {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 20px;
|
||||
}
|
||||
}
|
||||
{% endstylesheet %}
|
||||
|
||||
{% javascript %}
|
||||
(function () {
|
||||
var footer = document.querySelector('.footer');
|
||||
if (!footer || footer.dataset.bound === 'true') return;
|
||||
footer.dataset.bound = 'true';
|
||||
|
||||
var media = window.matchMedia('(max-width: 1024px)');
|
||||
var columns = footer.querySelectorAll('.footer__column');
|
||||
|
||||
function sync() {
|
||||
var mobile = media.matches;
|
||||
footer.classList.toggle('is-collapsible', mobile);
|
||||
|
||||
columns.forEach(function (column) {
|
||||
var button = column.querySelector('.footer__toggle');
|
||||
if (!button) return;
|
||||
|
||||
if (!mobile) {
|
||||
column.classList.remove('is-open');
|
||||
button.setAttribute('aria-expanded', 'true');
|
||||
return;
|
||||
}
|
||||
|
||||
button.setAttribute('aria-expanded', column.classList.contains('is-open') ? 'true' : 'false');
|
||||
});
|
||||
}
|
||||
|
||||
columns.forEach(function (column) {
|
||||
var button = column.querySelector('.footer__toggle');
|
||||
if (!button) return;
|
||||
|
||||
button.addEventListener('click', function () {
|
||||
if (!media.matches) return;
|
||||
column.classList.toggle('is-open');
|
||||
button.setAttribute('aria-expanded', column.classList.contains('is-open') ? 'true' : 'false');
|
||||
});
|
||||
});
|
||||
|
||||
sync();
|
||||
|
||||
if (media.addEventListener) {
|
||||
media.addEventListener('change', sync);
|
||||
} else if (media.addListener) {
|
||||
media.addListener(sync);
|
||||
}
|
||||
})();
|
||||
{% endjavascript %}
|
||||
|
||||
{% schema %}
|
||||
{
|
||||
"name": "t:general.footer",
|
||||
"settings": [
|
||||
{
|
||||
"type": "link_list",
|
||||
"id": "menu",
|
||||
"label": "t:labels.menu"
|
||||
"type": "image_picker",
|
||||
"id": "logo",
|
||||
"label": "t:footer.logo"
|
||||
},
|
||||
{
|
||||
"type": "checkbox",
|
||||
"id": "show_payment_icons",
|
||||
"label": "t:labels.show_payment_icons",
|
||||
"default": true
|
||||
"type": "link_list",
|
||||
"id": "menu",
|
||||
"label": "t:footer.menu",
|
||||
"info": "t:footer.menu_info"
|
||||
},
|
||||
{
|
||||
"type": "url",
|
||||
"id": "instagram_url",
|
||||
"label": "t:footer.instagram"
|
||||
},
|
||||
{
|
||||
"type": "url",
|
||||
"id": "facebook_url",
|
||||
"label": "t:footer.facebook"
|
||||
},
|
||||
{
|
||||
"type": "url",
|
||||
"id": "linkedin_url",
|
||||
"label": "t:footer.linkedin"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+788
-45
@@ -1,76 +1,819 @@
|
||||
<header>
|
||||
<h2 class="header__title">
|
||||
{{ shop.name | link_to: routes.root_url }}
|
||||
</h2>
|
||||
{% liquid
|
||||
if customer
|
||||
assign account_url = routes.account_url
|
||||
else
|
||||
assign account_url = routes.account_login_url
|
||||
endif
|
||||
|
||||
<div class="header__menu">
|
||||
{% for link in section.settings.menu.links %}
|
||||
{{ link.title | link_to: link.url }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
if section.settings.promo_text != blank
|
||||
assign promo_text = section.settings.promo_text
|
||||
else
|
||||
assign promo_text = 'header.promo' | t
|
||||
endif
|
||||
%}
|
||||
|
||||
<div class="header__icons">
|
||||
{% if shop.customer_accounts_enabled %}
|
||||
<shopify-account menu="{{ section.settings.customer_account_menu }}">
|
||||
{{ 'icon-account.svg' | inline_asset_content }}
|
||||
</shopify-account>
|
||||
{% endif %}
|
||||
<header
|
||||
class="header full-width relative z-40 bg-white font-sans text-black"
|
||||
data-header
|
||||
data-menu-close="{{ 'header.menu_close' | t | escape }}"
|
||||
>
|
||||
<div class="header__shell relative grid grid-cols-[auto_minmax(0,699px)_1fr_auto_auto] items-center px-[100px] pt-[15px] xxl:px-10">
|
||||
<button
|
||||
type="button"
|
||||
class="header__toggle col-start-1 row-start-1 hidden size-[30px] cursor-pointer appearance-none items-center justify-center border-0 bg-transparent p-0"
|
||||
data-menu-toggle
|
||||
aria-expanded="false"
|
||||
aria-controls="header-menu"
|
||||
aria-label="{{ 'header.menu_open' | t }}"
|
||||
>
|
||||
<span class="header__icon header__icon--menu" aria-hidden="true">
|
||||
{{ 'icon-menu.svg' | inline_asset_content }}
|
||||
</span>
|
||||
<span class="header__icon header__icon--close" aria-hidden="true"></span>
|
||||
</button>
|
||||
|
||||
<a href="{{ routes.cart_url }}">
|
||||
{% if cart.item_count > 0 %}
|
||||
<sup>{{ cart.item_count }}</sup>
|
||||
<a
|
||||
class="header__logo col-start-1 row-start-1 mr-[50px] block w-[223px] shrink-0 no-underline xxl:mr-8"
|
||||
href="{{ routes.root_url }}"
|
||||
>
|
||||
{% if section.settings.logo != blank %}
|
||||
{{
|
||||
section.settings.logo
|
||||
| image_url: width: 480
|
||||
| image_tag: alt: shop.name, class: 'header__logo-image h-auto w-[223px]', widths: '150, 223, 446'
|
||||
}}
|
||||
{% else %}
|
||||
<span class="header__logo-mark" aria-hidden="true">
|
||||
{{ 'logo-seasons.svg' | inline_asset_content }}
|
||||
</span>
|
||||
<span class="sr-only">{{ shop.name }}</span>
|
||||
{% endif %}
|
||||
|
||||
{{ 'icon-cart.svg' | inline_asset_content }}
|
||||
</a>
|
||||
|
||||
<form
|
||||
class="header__search col-start-2 row-start-1 mr-[50px] flex h-[55px] w-full min-w-0 max-w-[699px] items-center rounded-full bg-brand-cloud p-[5px] xxl:mr-8"
|
||||
action="{{ routes.search_url }}"
|
||||
method="get"
|
||||
role="search"
|
||||
data-search
|
||||
>
|
||||
<button
|
||||
type="submit"
|
||||
class="header__search-button grid size-10 shrink-0 cursor-pointer appearance-none place-items-center rounded-full border-0 bg-brand-mint p-0"
|
||||
aria-label="{{ 'header.search_label' | t }}"
|
||||
>
|
||||
<span class="header__icon header__icon--search" aria-hidden="true">
|
||||
{{ 'icon-search.svg' | inline_asset_content }}
|
||||
</span>
|
||||
</button>
|
||||
<label class="sr-only" for="header-search">{{ 'header.search_label' | t }}</label>
|
||||
<input
|
||||
id="header-search"
|
||||
class="header__search-input min-w-0 flex-1 border-0 bg-transparent px-5 text-[16px] font-light leading-none text-black outline-none placeholder:font-light placeholder:text-brand-placeholder"
|
||||
type="search"
|
||||
name="q"
|
||||
placeholder="{{ 'header.search_placeholder' | t }}"
|
||||
{% if template.name == 'search' %}
|
||||
value="{{ search.terms | escape }}"
|
||||
{% endif %}
|
||||
data-search-input
|
||||
>
|
||||
</form>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="header__cart relative col-start-5 row-start-1 flex size-[45px] cursor-pointer appearance-none items-center justify-center border-0 bg-transparent p-0"
|
||||
data-cart-open
|
||||
data-cart-count-label="{{ 'header.cart_count' | t: count: '__COUNT__' | escape }}"
|
||||
aria-controls="cart-drawer"
|
||||
aria-expanded="false"
|
||||
aria-haspopup="dialog"
|
||||
aria-label="{{ 'header.cart_count' | t: count: cart.item_count }}"
|
||||
>
|
||||
<span class="header__icon header__icon--bag" aria-hidden="true">
|
||||
{{ 'icon-bag.svg' | inline_asset_content }}
|
||||
</span>
|
||||
{% if cart.item_count > 0 %}
|
||||
<span class="absolute right-0 top-0 flex h-4 min-w-4 items-center justify-center rounded-full bg-brand-mint px-[3px] text-[10px] font-medium leading-none text-black" data-cart-count>
|
||||
{{ cart.item_count }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</button>
|
||||
|
||||
<nav
|
||||
id="header-menu"
|
||||
class="header__nav pointer-events-none col-span-5 col-start-1 row-span-2 row-start-1 grid grid-cols-subgrid grid-rows-subgrid self-stretch"
|
||||
data-menu
|
||||
>
|
||||
<div class="header__utility pointer-events-auto col-start-4 row-start-1 mr-5 flex items-center gap-[50px] xxl:gap-8">
|
||||
<ul class="m-0 flex list-none items-center gap-5 p-0">
|
||||
{% if section.settings.utility_menu != blank and section.settings.utility_menu.links.size > 0 %}
|
||||
{% for link in section.settings.utility_menu.links %}
|
||||
<li>
|
||||
<a
|
||||
class="inline-flex items-center px-5 py-1 text-[14px] font-normal leading-none text-black no-underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-black"
|
||||
href="{{ link.url }}"
|
||||
>
|
||||
{{ link.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<li>
|
||||
<a
|
||||
class="inline-flex items-center px-5 py-1 text-[14px] font-normal leading-none text-black no-underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-black"
|
||||
href="{{ routes.root_url }}"
|
||||
>
|
||||
{{ 'header.links.glow_army' | t }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
class="inline-flex items-center px-5 py-1 text-[14px] font-normal leading-none text-black no-underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-black"
|
||||
href="{{ routes.root_url }}"
|
||||
>
|
||||
{{ 'header.links.experts' | t }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
<a
|
||||
class="header__account flex size-[45px] items-center justify-center no-underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-black"
|
||||
href="{{ account_url }}"
|
||||
>
|
||||
<span class="header__icon header__icon--user" aria-hidden="true">
|
||||
{{ 'icon-user.svg' | inline_asset_content }}
|
||||
</span>
|
||||
<span class="header__account-label text-[14px] font-normal leading-none text-black">
|
||||
{{ 'header.account' | t }}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="header__menu pointer-events-auto col-span-5 row-start-2 mt-[15px] flex items-center justify-center gap-[50px] py-2 xxl:gap-8">
|
||||
<ul class="header__links m-0 flex list-none items-center gap-10 p-0 xxl:gap-6">
|
||||
{% if section.settings.menu != blank and section.settings.menu.links.size > 0 %}
|
||||
{% for link in section.settings.menu.links %}
|
||||
{% render 'header-menu-item', title: link.title, url: link.url, child_links: link.links %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% liquid
|
||||
assign nav_categories = 'header.links.categories' | t
|
||||
assign nav_routine = 'header.links.routine' | t
|
||||
assign nav_skin_type = 'header.links.skin_type' | t
|
||||
assign nav_concern = 'header.links.concern' | t
|
||||
assign label_all = 'header.dropdowns.all_products' | t
|
||||
assign label_blockers = 'header.dropdowns.blockers' | t
|
||||
assign label_moisturizers = 'header.dropdowns.moisturizers' | t
|
||||
assign label_cleansers = 'header.dropdowns.cleansers' | t
|
||||
assign label_masks = 'header.dropdowns.masks' | t
|
||||
assign label_serums = 'header.dropdowns.serums' | t
|
||||
assign label_clean = 'header.dropdowns.clean' | t
|
||||
assign label_treat = 'header.dropdowns.treat' | t
|
||||
assign label_hydrate = 'header.dropdowns.hydrate' | t
|
||||
assign label_protect = 'header.dropdowns.protect' | t
|
||||
assign label_kits = 'header.dropdowns.kits' | t
|
||||
assign label_combination = 'header.dropdowns.combination' | t
|
||||
assign label_oily = 'header.dropdowns.oily' | t
|
||||
assign label_dry = 'header.dropdowns.dry' | t
|
||||
assign label_sun = 'header.dropdowns.sun_protection' | t
|
||||
assign label_oil = 'header.dropdowns.oil_control' | t
|
||||
assign label_acne = 'header.dropdowns.acne' | t
|
||||
assign label_hydration = 'header.dropdowns.hydration' | t
|
||||
assign label_aging = 'header.dropdowns.anti_aging' | t
|
||||
assign label_spots = 'header.dropdowns.spots' | t
|
||||
assign categories_menu = label_all | append: '::' | append: routes.all_products_collection_url | append: '|' | append: label_blockers | append: '::/collections/bloqueadores|' | append: label_moisturizers | append: '::/collections/hidratantes|' | append: label_cleansers | append: '::/collections/limpiadores|' | append: label_masks | append: '::/collections/mascarillas|' | append: label_serums | append: '::/collections/serums'
|
||||
assign routine_menu = label_clean | append: '::/collections/limpia|' | append: label_treat | append: '::/collections/trata|' | append: label_hydrate | append: '::/collections/hidrata|' | append: label_protect | append: '::/collections/protege|' | append: label_kits | append: '::/collections/kits-y-rutinas-completas'
|
||||
assign skin_menu = label_combination | append: '::/collections/mixta-grasa|' | append: label_oily | append: '::/collections/grasa|' | append: label_dry | append: '::/collections/seca'
|
||||
assign concern_menu = label_sun | append: '::/collections/proteccion-solar|' | append: label_oil | append: '::/collections/control-grasa|' | append: label_acne | append: '::/collections/acne|' | append: label_hydration | append: '::/collections/hidratacion|' | append: label_aging | append: '::/collections/antiedad|' | append: label_spots | append: '::/collections/manchas'
|
||||
%}
|
||||
{% render 'header-menu-item', title: nav_categories, url: routes.all_products_collection_url, child_menu: categories_menu %}
|
||||
{% render 'header-menu-item', title: nav_routine, url: routes.collections_url, child_menu: routine_menu %}
|
||||
{% render 'header-menu-item', title: nav_skin_type, url: routes.collections_url, child_menu: skin_menu %}
|
||||
{% render 'header-menu-item', title: nav_concern, url: routes.collections_url, child_menu: concern_menu %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
<ul class="header__pills m-0 flex list-none items-center gap-[15px] p-0">
|
||||
{% if section.settings.pills_menu != blank and section.settings.pills_menu.links.size > 0 %}
|
||||
{% for link in section.settings.pills_menu.links %}
|
||||
<li>
|
||||
<a
|
||||
class="inline-flex items-center justify-center rounded-full border border-solid border-black px-5 py-1 text-[14px] font-normal leading-none text-black no-underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-black"
|
||||
href="{{ link.url }}"
|
||||
>
|
||||
{{ link.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<li>
|
||||
<a class="inline-flex items-center justify-center rounded-full border border-solid border-black px-5 py-1 text-[14px] font-normal leading-none text-black no-underline" href="{{ routes.collections_url }}">
|
||||
{{ 'header.links.sunscreen' | t }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="inline-flex items-center justify-center rounded-full border border-solid border-black px-5 py-1 text-[14px] font-normal leading-none text-black no-underline" href="{{ routes.collections_url }}">
|
||||
{{ 'header.links.favorites' | t }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="inline-flex items-center justify-center rounded-full border border-solid border-black px-5 py-1 text-[14px] font-normal leading-none text-black no-underline" href="{{ routes.collections_url }}">
|
||||
{{ 'header.links.kits' | t }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="inline-flex items-center justify-center rounded-full border border-solid border-black px-5 py-1 text-[14px] font-normal leading-none text-black no-underline" href="{{ routes.collections_url }}">
|
||||
{{ 'header.links.moisturizers' | t }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
{% if promo_text != blank %}
|
||||
<div class="header__promo flex h-[50px] items-center justify-center bg-brand-mint px-4 text-center">
|
||||
{% if section.settings.promo_link != blank %}
|
||||
<a class="text-[20px] font-bold uppercase leading-none text-black no-underline xl:text-[14px]" href="{{ section.settings.promo_link }}">
|
||||
{{ promo_text }}
|
||||
</a>
|
||||
{% else %}
|
||||
<p class="m-0 text-[20px] font-bold uppercase leading-none xl:text-[14px]">
|
||||
{{ promo_text }}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="header__backdrop fixed inset-0 z-30 hidden cursor-pointer border-0 bg-black/40 p-0"
|
||||
data-menu-backdrop
|
||||
aria-label="{{ 'header.menu_close' | t }}"
|
||||
tabindex="-1"
|
||||
></button>
|
||||
</header>
|
||||
|
||||
{% stylesheet %}
|
||||
header {
|
||||
height: 5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.header__logo-mark svg,
|
||||
.header__logo-image {
|
||||
display: block;
|
||||
width: 223px;
|
||||
height: auto;
|
||||
}
|
||||
header a {
|
||||
position: relative;
|
||||
text-decoration: none;
|
||||
color: var(--color-foreground);
|
||||
|
||||
.header__icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
header a sup {
|
||||
position: absolute;
|
||||
left: 100%;
|
||||
overflow: hidden;
|
||||
max-width: var(--page-margin);
|
||||
|
||||
.header__icon svg {
|
||||
display: block;
|
||||
}
|
||||
header svg {
|
||||
width: 2rem;
|
||||
|
||||
.header__icon--menu svg {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
header .header__menu,
|
||||
header .header__icons {
|
||||
|
||||
.header__icon--search svg {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.header__icon--user svg {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.header__icon--bag svg {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.header__shell {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.header__promo {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.header__caret-button {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.header__submenu {
|
||||
min-width: 280px;
|
||||
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.header__icon--caret {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
transform: rotate(180deg);
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.header__icon--caret svg {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.header__item.is-open .header__icon--caret {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
.header__icon--close {
|
||||
display: none;
|
||||
position: relative;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.header__icon--close::before,
|
||||
.header__icon--close::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 8px;
|
||||
width: 18px;
|
||||
height: 1.4px;
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.header__icon--close::before {
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.header__icon--close::after {
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
.header__account-label {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.header button,
|
||||
.header input {
|
||||
font: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.header input[type='search']::-webkit-search-decoration,
|
||||
.header input[type='search']::-webkit-search-cancel-button {
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
@media (min-width: 1120px) {
|
||||
.header__submenu::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -16px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.header__submenu {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.header__item:hover > .header__submenu,
|
||||
.header__item:focus-within > .header__submenu,
|
||||
.header__item.is-open > .header__submenu {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1119px) {
|
||||
.header__shell {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 55px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.header__toggle {
|
||||
display: grid;
|
||||
position: relative;
|
||||
z-index: 50;
|
||||
order: 1;
|
||||
flex: 0 0 30px;
|
||||
}
|
||||
|
||||
.header.is-menu-open .header__icon--menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.header.is-menu-open .header__icon--close {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.header__logo {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 150px;
|
||||
height: 55px;
|
||||
margin: 0;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.header__logo-mark svg,
|
||||
.header__logo-image {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.header__search {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
right: 50px;
|
||||
z-index: 2;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
max-width: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.header__search-button {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background-color: #9dd6c7;
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.header__icon--search svg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.header__search-input {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.header__search.is-open {
|
||||
top: 6px;
|
||||
right: 50px;
|
||||
left: 10px;
|
||||
z-index: 3;
|
||||
width: auto;
|
||||
height: 44px;
|
||||
overflow: visible;
|
||||
padding: 5px;
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
.header__search.is-open .header__search-input {
|
||||
position: static;
|
||||
width: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
padding: 0 12px;
|
||||
overflow: visible;
|
||||
clip: auto;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.header__cart {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
right: 10px;
|
||||
z-index: 2;
|
||||
flex: 0 0 30px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.header__icon--bag svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.header__nav {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: 40;
|
||||
display: none;
|
||||
pointer-events: auto;
|
||||
max-height: calc(100dvh - 90px);
|
||||
overflow: auto;
|
||||
background: #fff;
|
||||
padding: 8px 16px 28px;
|
||||
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.header__nav.is-open {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.header__menu {
|
||||
order: 1;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 20px;
|
||||
margin-top: 0;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
.header__links {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.header__links .header__item {
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
padding: 14px 0;
|
||||
border-bottom: 1px solid #ececec;
|
||||
}
|
||||
|
||||
.header__caret-button {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.header__nav .header__submenu {
|
||||
position: static;
|
||||
top: auto;
|
||||
left: auto;
|
||||
z-index: auto;
|
||||
flex: 0 0 100%;
|
||||
min-width: 0;
|
||||
width: 100%;
|
||||
margin: 8px 0 0;
|
||||
padding: 4px 0 8px;
|
||||
background: transparent;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.header__nav .header__item.is-open > .header__submenu {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.header__pills {
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.header__utility {
|
||||
order: 2;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 8px;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.header__utility > ul {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.header__account {
|
||||
width: auto;
|
||||
height: auto;
|
||||
justify-content: flex-start;
|
||||
gap: 10px;
|
||||
padding: 10px 20px 10px 0;
|
||||
}
|
||||
|
||||
.header__account-label {
|
||||
position: static;
|
||||
width: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
clip: auto;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.header__promo {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.header__promo a,
|
||||
.header__promo p {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.header.is-menu-open .header__shell {
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.header.is-menu-open .header__backdrop {
|
||||
z-index: 1;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 380px) {
|
||||
.header__logo,
|
||||
.header__logo-mark svg,
|
||||
.header__logo-image {
|
||||
width: 128px;
|
||||
}
|
||||
}
|
||||
{% endstylesheet %}
|
||||
|
||||
{% javascript %}
|
||||
(() => {
|
||||
if (window.__seasonHeader) return;
|
||||
window.__seasonHeader = true;
|
||||
|
||||
const mobileQuery = window.matchMedia('(max-width: 1119px)');
|
||||
|
||||
const closeMenu = (header) => {
|
||||
const menu = header.querySelector('[data-menu]');
|
||||
const toggle = header.querySelector('[data-menu-toggle]');
|
||||
menu?.classList.remove('is-open');
|
||||
header.classList.remove('is-menu-open');
|
||||
toggle?.setAttribute('aria-expanded', 'false');
|
||||
if (toggle) toggle.setAttribute('aria-label', toggle.dataset.labelOpen || '');
|
||||
document.documentElement.classList.remove('overflow-hidden');
|
||||
};
|
||||
|
||||
const closeSearch = (header) => {
|
||||
header.querySelector('[data-search]')?.classList.remove('is-open');
|
||||
};
|
||||
|
||||
const bind = (header) => {
|
||||
if (header.dataset.ready === 'true') return;
|
||||
header.dataset.ready = 'true';
|
||||
|
||||
const toggle = header.querySelector('[data-menu-toggle]');
|
||||
const menu = header.querySelector('[data-menu]');
|
||||
const searchForm = header.querySelector('[data-search]');
|
||||
const searchInput = header.querySelector('[data-search-input]');
|
||||
const backdrop = header.querySelector('[data-menu-backdrop]');
|
||||
|
||||
if (toggle) {
|
||||
toggle.dataset.labelOpen = toggle.getAttribute('aria-label') || '';
|
||||
toggle.dataset.labelClose = header.dataset.menuClose || toggle.dataset.labelOpen;
|
||||
}
|
||||
|
||||
toggle?.addEventListener('click', () => {
|
||||
const willOpen = !menu.classList.contains('is-open');
|
||||
closeSearch(header);
|
||||
menu.classList.toggle('is-open', willOpen);
|
||||
header.classList.toggle('is-menu-open', willOpen);
|
||||
toggle.setAttribute('aria-expanded', willOpen ? 'true' : 'false');
|
||||
toggle.setAttribute('aria-label', willOpen ? toggle.dataset.labelClose : toggle.dataset.labelOpen);
|
||||
document.documentElement.classList.toggle('overflow-hidden', willOpen);
|
||||
});
|
||||
|
||||
backdrop?.addEventListener('click', () => closeMenu(header));
|
||||
|
||||
searchForm?.addEventListener('submit', (event) => {
|
||||
if (!mobileQuery.matches || searchForm.classList.contains('is-open')) return;
|
||||
event.preventDefault();
|
||||
closeMenu(header);
|
||||
searchForm.classList.add('is-open');
|
||||
searchInput?.focus();
|
||||
});
|
||||
|
||||
menu?.addEventListener('click', (event) => {
|
||||
const submenuToggle = event.target.closest('[data-submenu-toggle]');
|
||||
const toggleSubmenu = (submenuToggle) => {
|
||||
const item = submenuToggle.closest('[data-menu-item]');
|
||||
const expanded = submenuToggle.getAttribute('aria-expanded') === 'true';
|
||||
item.parentElement.querySelectorAll('[data-menu-item].is-open').forEach((sibling) => {
|
||||
if (sibling === item) return;
|
||||
sibling.classList.remove('is-open');
|
||||
sibling.querySelector('[data-submenu-toggle]')?.setAttribute('aria-expanded', 'false');
|
||||
});
|
||||
item.classList.toggle('is-open', !expanded);
|
||||
submenuToggle.setAttribute('aria-expanded', expanded ? 'false' : 'true');
|
||||
};
|
||||
|
||||
if (submenuToggle) {
|
||||
event.preventDefault();
|
||||
toggleSubmenu(submenuToggle);
|
||||
return;
|
||||
}
|
||||
|
||||
const parentLink = event.target.closest('[data-menu-item] > a');
|
||||
if (mobileQuery.matches && parentLink) {
|
||||
const submenuToggleForLink = parentLink.parentElement.querySelector('[data-submenu-toggle]');
|
||||
if (submenuToggleForLink) {
|
||||
event.preventDefault();
|
||||
toggleSubmenu(submenuToggleForLink);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (mobileQuery.matches && event.target.closest('a')) closeMenu(header);
|
||||
});
|
||||
};
|
||||
|
||||
document.querySelectorAll('[data-header]').forEach((header) => {
|
||||
header.dataset.menuClose = header.getAttribute('data-menu-close') || '';
|
||||
bind(header);
|
||||
});
|
||||
|
||||
document.addEventListener('click', (event) => {
|
||||
document.querySelectorAll('[data-header]').forEach((header) => {
|
||||
if (header.contains(event.target)) return;
|
||||
closeMenu(header);
|
||||
closeSearch(header);
|
||||
});
|
||||
});
|
||||
|
||||
document.addEventListener('keydown', (event) => {
|
||||
if (event.key !== 'Escape') return;
|
||||
document.querySelectorAll('[data-header]').forEach((header) => {
|
||||
closeMenu(header);
|
||||
closeSearch(header);
|
||||
});
|
||||
});
|
||||
|
||||
mobileQuery.addEventListener('change', (event) => {
|
||||
if (event.matches) return;
|
||||
document.querySelectorAll('[data-header]').forEach((header) => {
|
||||
closeMenu(header);
|
||||
closeSearch(header);
|
||||
});
|
||||
});
|
||||
|
||||
document.addEventListener('shopify:section:load', (event) => {
|
||||
const header = event.target.querySelector('[data-header]');
|
||||
if (header) bind(header);
|
||||
});
|
||||
})();
|
||||
{% endjavascript %}
|
||||
|
||||
{% schema %}
|
||||
{
|
||||
"name": "t:general.header",
|
||||
"settings": [
|
||||
{
|
||||
"type": "link_list",
|
||||
"id": "menu",
|
||||
"label": "t:labels.menu"
|
||||
"type": "image_picker",
|
||||
"id": "logo",
|
||||
"label": "t:header.logo"
|
||||
},
|
||||
{
|
||||
"type": "link_list",
|
||||
"id": "customer_account_menu",
|
||||
"label": "t:labels.customer_account_menu",
|
||||
"default": "customer-account-main-menu"
|
||||
"id": "menu",
|
||||
"label": "t:header.main_menu",
|
||||
"info": "t:header.main_menu_info"
|
||||
},
|
||||
{
|
||||
"type": "link_list",
|
||||
"id": "pills_menu",
|
||||
"label": "t:header.pills_menu"
|
||||
},
|
||||
{
|
||||
"type": "link_list",
|
||||
"id": "utility_menu",
|
||||
"label": "t:header.utility_menu"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "promo_text",
|
||||
"label": "t:header.promo_text",
|
||||
"default": "Cambia tu piel ¡hoy!"
|
||||
},
|
||||
{
|
||||
"type": "url",
|
||||
"id": "promo_link",
|
||||
"label": "t:header.promo_link"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,816 @@
|
||||
{% liquid
|
||||
assign media_type = section.settings.media_type | default: 'video'
|
||||
|
||||
if section.settings.cover_desktop != blank
|
||||
assign cover_desktop = section.settings.cover_desktop | image_url: width: 2400
|
||||
else
|
||||
assign cover_desktop = 'mascara-video.avif' | asset_url
|
||||
endif
|
||||
|
||||
if section.settings.cover_mobile != blank
|
||||
assign cover_mobile = section.settings.cover_mobile | image_url: width: 1200
|
||||
else
|
||||
assign cover_mobile = 'mascara-vido-mobile.avif' | asset_url
|
||||
endif
|
||||
|
||||
assign video_src = blank
|
||||
if media_type == 'video'
|
||||
if section.settings.video != blank
|
||||
for source in section.settings.video.sources
|
||||
if source.mime_type == 'video/mp4' or source.format == 'mp4'
|
||||
assign video_src = source.url
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
|
||||
if video_src == blank
|
||||
assign video_src = 'home-video-op.mp4' | asset_url
|
||||
endif
|
||||
endif
|
||||
|
||||
if section.settings.social_label != blank
|
||||
assign social_label = section.settings.social_label
|
||||
else
|
||||
assign social_label = 'hero.follow' | t
|
||||
endif
|
||||
|
||||
if section.settings.featured_label != blank
|
||||
assign featured_label = section.settings.featured_label
|
||||
else
|
||||
assign featured_label = 'hero.featured_label' | t
|
||||
endif
|
||||
|
||||
assign fallback_product = blank
|
||||
for catalog_product in collections.all.products
|
||||
if catalog_product.available
|
||||
assign fallback_product = catalog_product
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
assign show_products = false
|
||||
if section.blocks.size > 0
|
||||
if fallback_product != blank or request.design_mode
|
||||
assign show_products = true
|
||||
endif
|
||||
endif
|
||||
for block in section.blocks
|
||||
if block.settings.product != blank
|
||||
assign show_products = true
|
||||
endif
|
||||
endfor
|
||||
|
||||
assign line_1_weight = section.settings.heading_line_1_weight | default: 'light'
|
||||
assign line_2_weight = section.settings.heading_line_2_weight | default: 'medium'
|
||||
assign line_3_weight = section.settings.heading_line_3_weight | default: 'light'
|
||||
%}
|
||||
|
||||
<section
|
||||
class="hero full-width"
|
||||
data-hero
|
||||
data-cart-add-url="{{ routes.cart_add_url }}.js"
|
||||
data-cart-url="{{ routes.cart_url }}.js"
|
||||
>
|
||||
<link rel="preload" as="image" href="{{ cover_desktop }}" media="(min-width: 1024px)" fetchpriority="high">
|
||||
<link rel="preload" as="image" href="{{ cover_mobile }}" media="(max-width: 1023px)" fetchpriority="high">
|
||||
|
||||
<div class="hero__media" aria-hidden="true">
|
||||
{% if media_type == 'image' %}
|
||||
<picture class="hero__still">
|
||||
<source media="(max-width: 1023px)" srcset="{{ cover_mobile }}">
|
||||
<img
|
||||
class="hero__poster-image"
|
||||
src="{{ cover_desktop }}"
|
||||
alt=""
|
||||
width="1920"
|
||||
height="650"
|
||||
fetchpriority="high"
|
||||
>
|
||||
</picture>
|
||||
{% else %}
|
||||
<video
|
||||
class="hero__video"
|
||||
data-hero-video
|
||||
muted
|
||||
loop
|
||||
playsinline
|
||||
preload="none"
|
||||
>
|
||||
<source src="{{ video_src }}" type="video/mp4">
|
||||
</video>
|
||||
<picture class="hero__poster">
|
||||
<source media="(max-width: 1023px)" srcset="{{ cover_mobile }}">
|
||||
<img
|
||||
class="hero__poster-image"
|
||||
src="{{ cover_desktop }}"
|
||||
alt=""
|
||||
width="1920"
|
||||
height="650"
|
||||
fetchpriority="high"
|
||||
>
|
||||
</picture>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="hero__content">
|
||||
<div class="hero__copy">
|
||||
{% if section.settings.heading_line_1 != blank or section.settings.heading_line_2 != blank or section.settings.heading_line_3 != blank %}
|
||||
<h1 class="hero__title">
|
||||
{% if section.settings.heading_line_1 != blank %}
|
||||
<span class="hero__title-line hero__title-line--{{ line_1_weight }}">{{ section.settings.heading_line_1 | escape }}</span>
|
||||
{% endif %}
|
||||
{% if section.settings.heading_line_2 != blank %}
|
||||
<span class="hero__title-line hero__title-line--{{ line_2_weight }}">{{ section.settings.heading_line_2 | escape }}</span>
|
||||
{% endif %}
|
||||
{% if section.settings.heading_line_3 != blank %}
|
||||
<span class="hero__title-line hero__title-line--{{ line_3_weight }}">{{ section.settings.heading_line_3 | escape }}</span>
|
||||
{% endif %}
|
||||
</h1>
|
||||
<span class="hero__rule" aria-hidden="true"></span>
|
||||
{% endif %}
|
||||
|
||||
{% if show_products %}
|
||||
<p class="hero__label">{{ featured_label | escape }}</p>
|
||||
<div class="hero__products">
|
||||
{% for block in section.blocks %}
|
||||
{% liquid
|
||||
assign featured_product = block.settings.product
|
||||
if featured_product == blank and forloop.first
|
||||
assign featured_product = fallback_product
|
||||
endif
|
||||
%}
|
||||
{% if featured_product != blank %}
|
||||
<div class="hero__product" {{ block.shopify_attributes }}>
|
||||
{% render 'hero-product', product: featured_product %}
|
||||
</div>
|
||||
{% elsif request.design_mode %}
|
||||
<div class="hero__product" {{ block.shopify_attributes }}>
|
||||
<div class="hero__card hero__card--empty">
|
||||
<p>{{ 'hero.select_product' | t }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<aside class="hero__social">
|
||||
<p class="hero__social-label">{{ social_label | escape }}</p>
|
||||
<span class="hero__social-line" aria-hidden="true"></span>
|
||||
<ul class="hero__social-list">
|
||||
<li>
|
||||
{% if section.settings.instagram_url != blank %}
|
||||
<a class="hero__social-item" href="{{ section.settings.instagram_url }}" target="_blank" rel="noopener" aria-label="{{ 'hero.instagram' | t }}">
|
||||
{{ 'icon-instagram.svg' | inline_asset_content }}
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="hero__social-item" aria-hidden="true">
|
||||
{{ 'icon-instagram.svg' | inline_asset_content }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
{% if section.settings.facebook_url != blank %}
|
||||
<a class="hero__social-item" href="{{ section.settings.facebook_url }}" target="_blank" rel="noopener" aria-label="{{ 'hero.facebook' | t }}">
|
||||
{{ 'icon-facebook.svg' | inline_asset_content }}
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="hero__social-item" aria-hidden="true">
|
||||
{{ 'icon-facebook.svg' | inline_asset_content }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
{% if section.settings.linkedin_url != blank %}
|
||||
<a class="hero__social-item" href="{{ section.settings.linkedin_url }}" target="_blank" rel="noopener" aria-label="{{ 'hero.linkedin' | t }}">
|
||||
{{ 'icon-linkedin.svg' | inline_asset_content }}
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="hero__social-item" aria-hidden="true">
|
||||
{{ 'icon-linkedin.svg' | inline_asset_content }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
{% stylesheet %}
|
||||
.hero {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
min-height: 650px;
|
||||
overflow: hidden;
|
||||
color: #fff;
|
||||
background: #c8c2bc;
|
||||
}
|
||||
|
||||
.hero__media {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
}
|
||||
|
||||
.hero__video,
|
||||
.hero__poster,
|
||||
.hero__still,
|
||||
.hero__poster-image {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-width: none;
|
||||
object-fit: cover;
|
||||
object-position: center center;
|
||||
}
|
||||
|
||||
.hero__poster,
|
||||
.hero__still {
|
||||
z-index: 1;
|
||||
transition: opacity 0.45s ease;
|
||||
}
|
||||
|
||||
.hero.is-playing .hero__poster {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.hero__content {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
min-height: 650px;
|
||||
padding: 104px 160px 80px 100px;
|
||||
}
|
||||
|
||||
.hero__copy {
|
||||
width: min(100%, 800px);
|
||||
}
|
||||
|
||||
.hero__title {
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
font-family: "Roc Grotesk", Archivo, sans-serif;
|
||||
font-size: 70px;
|
||||
font-weight: 500;
|
||||
line-height: 69px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.hero__title-line {
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.hero__title-line--light {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.hero__title-line--medium {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.hero__rule {
|
||||
display: block;
|
||||
width: 578px;
|
||||
max-width: 100%;
|
||||
height: 1px;
|
||||
margin-top: 40px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.hero__label {
|
||||
margin: 40px 0 20px;
|
||||
color: #fff;
|
||||
font-family: Archivo, sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: 300;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.hero__products {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.hero__card {
|
||||
display: grid;
|
||||
grid-template-columns: 100px minmax(0, 1fr) 50px;
|
||||
column-gap: 10px;
|
||||
align-items: center;
|
||||
width: 384px;
|
||||
height: 120px;
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
background: rgba(249, 249, 250, 0.5);
|
||||
backdrop-filter: blur(3px);
|
||||
}
|
||||
|
||||
.hero__card--empty {
|
||||
display: flex;
|
||||
color: #000;
|
||||
font-family: Archivo, sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.hero__card-media {
|
||||
display: block;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.hero__card-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-width: none;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.hero__card-copy {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.hero__card-title {
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
color: #000;
|
||||
font-family: Archivo, sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
text-decoration: none;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
.hero__card-price {
|
||||
margin: 0;
|
||||
color: #000;
|
||||
font-family: Archivo, sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.hero__form {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.hero__cart {
|
||||
display: grid;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
place-items: center;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 60px;
|
||||
background: #9dd6c7;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.hero__cart:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
.hero__cart.is-added {
|
||||
outline: 2px solid #000;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.hero__cart-icon {
|
||||
display: block;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.hero__cart-icon svg {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.hero__social {
|
||||
position: absolute;
|
||||
top: 151px;
|
||||
right: 100px;
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.hero__social-label {
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
font-family: "Roc Grotesk", Archivo, sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: normal;
|
||||
text-transform: uppercase;
|
||||
writing-mode: vertical-rl;
|
||||
}
|
||||
|
||||
.hero__social-line {
|
||||
display: block;
|
||||
width: 1px;
|
||||
height: 80px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.hero__social-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.hero__social-item {
|
||||
display: flex;
|
||||
width: 37px;
|
||||
height: 37px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.hero__social-item svg {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
@media (max-width: 1439px) {
|
||||
.hero__content {
|
||||
padding-right: 120px;
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
.hero__social {
|
||||
right: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1023px) {
|
||||
.hero,
|
||||
.hero__content {
|
||||
min-height: 550px;
|
||||
}
|
||||
|
||||
.hero__video,
|
||||
.hero__poster-image {
|
||||
object-position: center 22%;
|
||||
}
|
||||
|
||||
.hero__content {
|
||||
align-items: flex-end;
|
||||
padding: 24px 20px 15px;
|
||||
}
|
||||
|
||||
.hero__title {
|
||||
font-size: 35px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.hero__rule {
|
||||
width: 253px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.hero__label {
|
||||
margin: 10px 0;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.hero__products {
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.hero__card {
|
||||
grid-template-columns: 70px minmax(0, 1fr) 40px;
|
||||
width: 100%;
|
||||
max-width: 297px;
|
||||
height: 80px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.hero__card-media {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
}
|
||||
|
||||
.hero__card-title {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.hero__card-price {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.hero__cart {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.hero__cart-icon,
|
||||
.hero__cart-icon svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.hero__social {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 380px) {
|
||||
.hero__title-line {
|
||||
white-space: normal;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.hero__video {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hero__poster {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
{% endstylesheet %}
|
||||
|
||||
<script nolazy>
|
||||
(() => {
|
||||
if (window.__seasonHeroVideo) return;
|
||||
window.__seasonHeroVideo = true;
|
||||
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
|
||||
|
||||
const events = ['keydown', 'mousedown', 'mousemove', 'touchstart', 'wheel'];
|
||||
const start = () => {
|
||||
events.forEach((eventName) => window.removeEventListener(eventName, start));
|
||||
document.querySelectorAll('[data-hero-video]').forEach((video) => {
|
||||
const hero = video.closest('[data-hero]');
|
||||
const play = () => {
|
||||
const attempt = video.play();
|
||||
if (attempt && typeof attempt.catch === 'function') attempt.catch(() => {});
|
||||
};
|
||||
video.addEventListener('playing', () => hero?.classList.add('is-playing'));
|
||||
video.preload = 'auto';
|
||||
if (video.readyState >= 2) play();
|
||||
else video.addEventListener('canplay', play, { once: true });
|
||||
video.load();
|
||||
});
|
||||
};
|
||||
|
||||
events.forEach((eventName) => window.addEventListener(eventName, start, { passive: true }));
|
||||
})();
|
||||
</script>
|
||||
|
||||
{% javascript %}
|
||||
(() => {
|
||||
if (window.__seasonHero) return;
|
||||
window.__seasonHero = true;
|
||||
|
||||
const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||
|
||||
const setCartCount = (count) => {
|
||||
const link = document.querySelector('.header__cart');
|
||||
if (!link || count < 1) return;
|
||||
|
||||
let badge = link.querySelector('[data-cart-count]');
|
||||
if (!badge) {
|
||||
badge = document.createElement('span');
|
||||
badge.className = 'absolute right-0 top-0 flex h-4 min-w-4 items-center justify-center rounded-full bg-brand-mint px-[3px] text-[10px] font-medium leading-none text-black';
|
||||
badge.setAttribute('data-cart-count', '');
|
||||
link.appendChild(badge);
|
||||
}
|
||||
|
||||
badge.textContent = String(count);
|
||||
};
|
||||
|
||||
document.querySelectorAll('[data-hero]').forEach((hero) => {
|
||||
const video = hero.querySelector('[data-hero-video]');
|
||||
if (!video || reduceMotion) return;
|
||||
|
||||
const markPlaying = () => hero.classList.add('is-playing');
|
||||
video.addEventListener('playing', markPlaying);
|
||||
|
||||
const tryPlay = () => {
|
||||
const playAttempt = video.play();
|
||||
if (playAttempt && typeof playAttempt.catch === 'function') {
|
||||
playAttempt.catch(() => {});
|
||||
}
|
||||
};
|
||||
|
||||
if (video.readyState >= 2) {
|
||||
tryPlay();
|
||||
} else {
|
||||
video.addEventListener('canplay', tryPlay, { once: true });
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('submit', async (event) => {
|
||||
const form = event.target;
|
||||
if (!(form instanceof HTMLFormElement) || !form.classList.contains('hero__form')) return;
|
||||
|
||||
const hero = form.closest('[data-hero]');
|
||||
if (!hero) return;
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
const button = form.querySelector('[type="submit"]');
|
||||
const variantId = form.querySelector('[name="id"]')?.value;
|
||||
if (!button || button.disabled || !variantId) return;
|
||||
|
||||
button.disabled = true;
|
||||
|
||||
try {
|
||||
const addResponse = await fetch(hero.dataset.cartAddUrl, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Accept: 'application/json',
|
||||
},
|
||||
body: JSON.stringify({ id: variantId, quantity: 1 }),
|
||||
});
|
||||
|
||||
if (!addResponse.ok) return;
|
||||
|
||||
const cartResponse = await fetch(hero.dataset.cartUrl, {
|
||||
headers: { Accept: 'application/json' },
|
||||
});
|
||||
const cart = await cartResponse.json();
|
||||
if (typeof cart.item_count === 'number') setCartCount(cart.item_count);
|
||||
document.dispatchEvent(new CustomEvent('season:cart:open'));
|
||||
button.classList.add('is-added');
|
||||
window.setTimeout(() => button.classList.remove('is-added'), 1200);
|
||||
} catch (error) {
|
||||
form.submit();
|
||||
} finally {
|
||||
button.disabled = false;
|
||||
}
|
||||
});
|
||||
})();
|
||||
{% endjavascript %}
|
||||
|
||||
{% schema %}
|
||||
{
|
||||
"name": "t:hero.name",
|
||||
"tag": "section",
|
||||
"class": "hero-section",
|
||||
"max_blocks": 2,
|
||||
"disabled_on": {
|
||||
"groups": ["header", "footer"]
|
||||
},
|
||||
"settings": [
|
||||
{
|
||||
"type": "header",
|
||||
"content": "t:hero.heading"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "heading_line_1",
|
||||
"label": "t:hero.line_1",
|
||||
"default": "descubre"
|
||||
},
|
||||
{
|
||||
"type": "select",
|
||||
"id": "heading_line_1_weight",
|
||||
"label": "t:hero.line_1_weight",
|
||||
"default": "light",
|
||||
"options": [
|
||||
{ "value": "light", "label": "t:hero.weight_light" },
|
||||
{ "value": "medium", "label": "t:hero.weight_medium" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "heading_line_2",
|
||||
"label": "t:hero.line_2",
|
||||
"default": "lo que tu piel"
|
||||
},
|
||||
{
|
||||
"type": "select",
|
||||
"id": "heading_line_2_weight",
|
||||
"label": "t:hero.line_2_weight",
|
||||
"default": "medium",
|
||||
"options": [
|
||||
{ "value": "light", "label": "t:hero.weight_light" },
|
||||
{ "value": "medium", "label": "t:hero.weight_medium" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "heading_line_3",
|
||||
"label": "t:hero.line_3",
|
||||
"default": "disfrutará"
|
||||
},
|
||||
{
|
||||
"type": "select",
|
||||
"id": "heading_line_3_weight",
|
||||
"label": "t:hero.line_3_weight",
|
||||
"default": "light",
|
||||
"options": [
|
||||
{ "value": "light", "label": "t:hero.weight_light" },
|
||||
{ "value": "medium", "label": "t:hero.weight_medium" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "featured_label",
|
||||
"label": "t:hero.featured_label",
|
||||
"default": "Producto destacado"
|
||||
},
|
||||
{
|
||||
"type": "header",
|
||||
"content": "t:hero.media"
|
||||
},
|
||||
{
|
||||
"type": "select",
|
||||
"id": "media_type",
|
||||
"label": "t:hero.media_type",
|
||||
"default": "video",
|
||||
"options": [
|
||||
{ "value": "video", "label": "t:hero.media_video" },
|
||||
{ "value": "image", "label": "t:hero.media_image" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "video",
|
||||
"id": "video",
|
||||
"label": "t:hero.video",
|
||||
"info": "t:hero.video_info",
|
||||
"visible_if": "{{ section.settings.media_type == 'video' }}"
|
||||
},
|
||||
{
|
||||
"type": "image_picker",
|
||||
"id": "cover_desktop",
|
||||
"label": "t:hero.cover_desktop",
|
||||
"info": "t:hero.cover_info"
|
||||
},
|
||||
{
|
||||
"type": "image_picker",
|
||||
"id": "cover_mobile",
|
||||
"label": "t:hero.cover_mobile"
|
||||
},
|
||||
{
|
||||
"type": "header",
|
||||
"content": "t:hero.social"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "social_label",
|
||||
"label": "t:hero.social_label",
|
||||
"default": "Síguenos"
|
||||
},
|
||||
{
|
||||
"type": "url",
|
||||
"id": "instagram_url",
|
||||
"label": "t:hero.instagram"
|
||||
},
|
||||
{
|
||||
"type": "url",
|
||||
"id": "facebook_url",
|
||||
"label": "t:hero.facebook"
|
||||
},
|
||||
{
|
||||
"type": "url",
|
||||
"id": "linkedin_url",
|
||||
"label": "t:hero.linkedin"
|
||||
}
|
||||
],
|
||||
"blocks": [
|
||||
{
|
||||
"type": "featured_product",
|
||||
"name": "t:hero.featured_product",
|
||||
"limit": 2,
|
||||
"settings": [
|
||||
{
|
||||
"type": "product",
|
||||
"id": "product",
|
||||
"label": "t:hero.product"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"presets": [
|
||||
{
|
||||
"name": "t:hero.name",
|
||||
"blocks": [
|
||||
{ "type": "featured_product" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
{% endschema %}
|
||||
@@ -0,0 +1,907 @@
|
||||
{% liquid
|
||||
if section.settings.heading != blank
|
||||
assign heading = section.settings.heading
|
||||
else
|
||||
assign heading = 'learn.heading' | t
|
||||
endif
|
||||
|
||||
if section.settings.subheading != blank
|
||||
assign subheading = section.settings.subheading
|
||||
else
|
||||
assign subheading = 'learn.subheading' | t
|
||||
endif
|
||||
|
||||
assign slide_count = section.blocks.size
|
||||
assign active_index = slide_count | minus: 1 | divided_by: 2 | floor
|
||||
if active_index < 0
|
||||
assign active_index = 0
|
||||
endif
|
||||
%}
|
||||
|
||||
<section
|
||||
class="learn full-width"
|
||||
data-learn
|
||||
data-cart-add-url="{{ routes.cart_add_url }}.js"
|
||||
data-cart-url="{{ routes.cart_url }}.js"
|
||||
data-active="{{ active_index }}"
|
||||
>
|
||||
<img class="learn__blob learn__blob--right" src="{{ 'learn-shape-right.avif' | asset_url }}" alt="" width="539" height="516">
|
||||
<img class="learn__blob learn__blob--left" src="{{ 'learn-shape-left.avif' | asset_url }}" alt="" width="407" height="314">
|
||||
|
||||
<div class="learn__header">
|
||||
<h2 class="learn__heading">{{ heading | escape }}</h2>
|
||||
<p class="learn__subheading">{{ subheading | escape }}</p>
|
||||
</div>
|
||||
|
||||
<div class="learn__stage">
|
||||
<div class="learn__viewport" data-viewport tabindex="0">
|
||||
<div class="learn__track" data-track>
|
||||
{% for block in section.blocks %}
|
||||
{% liquid
|
||||
assign video_src = blank
|
||||
if block.settings.video != blank
|
||||
for source in block.settings.video.sources
|
||||
if source.mime_type == 'video/mp4' or source.format == 'mp4'
|
||||
assign video_src = source.url
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
|
||||
assign fallback_image = blank
|
||||
case forloop.index
|
||||
when 1
|
||||
assign fallback_image = 'learn-cover-1.avif'
|
||||
when 2
|
||||
assign fallback_image = 'learn-cover-2.avif'
|
||||
when 4
|
||||
assign fallback_image = 'learn-cover-4.avif'
|
||||
when 5
|
||||
assign fallback_image = 'learn-cover-5.avif'
|
||||
endcase
|
||||
|
||||
assign poster_alt = heading
|
||||
%}
|
||||
<article
|
||||
class="learn__slide{% if forloop.index0 == active_index %} is-active{% endif %}"
|
||||
data-slide
|
||||
{{ block.shopify_attributes }}
|
||||
>
|
||||
<div class="learn__media">
|
||||
{% if block.settings.poster != blank %}
|
||||
{{
|
||||
block.settings.poster
|
||||
| image_url: width: 900
|
||||
| image_tag:
|
||||
alt: poster_alt,
|
||||
widths: '384, 768',
|
||||
sizes: '384px',
|
||||
class: 'learn__poster',
|
||||
loading: 'lazy'
|
||||
}}
|
||||
{% elsif fallback_image != blank %}
|
||||
<img
|
||||
class="learn__poster"
|
||||
src="{{ fallback_image | asset_url }}"
|
||||
alt="{{ poster_alt | escape }}"
|
||||
width="384"
|
||||
height="680"
|
||||
loading="lazy"
|
||||
>
|
||||
{% endif %}
|
||||
{% if video_src != blank %}
|
||||
<video
|
||||
class="learn__video"
|
||||
data-learn-video
|
||||
data-src="{{ video_src }}"
|
||||
{% if block.settings.poster != blank %}
|
||||
poster="{{ block.settings.poster | image_url: width: 800 }}"
|
||||
{% elsif fallback_image != blank %}
|
||||
poster="{{ fallback_image | asset_url }}"
|
||||
{% endif %}
|
||||
muted
|
||||
playsinline
|
||||
loop
|
||||
preload="none"
|
||||
></video>
|
||||
{% endif %}
|
||||
</div>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="learn__arrow learn__arrow--prev" type="button" data-learn-prev aria-label="{{ 'learn.previous' | t }}">
|
||||
<span class="learn__arrow-icon" aria-hidden="true">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.375 9.53125L10 3.90625L15.625 9.53125M10 4.6875V16.0938" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
<button class="learn__arrow learn__arrow--next" type="button" data-learn-next aria-label="{{ 'learn.next' | t }}">
|
||||
<span class="learn__arrow-icon" aria-hidden="true">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.375 9.53125L10 3.90625L15.625 9.53125M10 4.6875V16.0938" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="learn__products">
|
||||
{% for block in section.blocks %}
|
||||
<div class="learn__row" data-product-row {% unless forloop.index0 == active_index %}hidden{% endunless %}>
|
||||
{% for product_key in (1..2) %}
|
||||
{% liquid
|
||||
if product_key == 1
|
||||
assign slide_product = block.settings.product_1
|
||||
else
|
||||
assign slide_product = block.settings.product_2
|
||||
endif
|
||||
%}
|
||||
{% if slide_product != blank %}
|
||||
{% liquid
|
||||
assign variant = slide_product.selected_or_first_available_variant
|
||||
assign card_image = slide_product.featured_image
|
||||
assign hover_image = blank
|
||||
for image in slide_product.images offset: 1 limit: 1
|
||||
assign hover_image = image
|
||||
endfor
|
||||
%}
|
||||
<article class="learn__card">
|
||||
<a class="learn__card-media" href="{{ slide_product.url }}">
|
||||
{% if card_image %}
|
||||
{{
|
||||
card_image
|
||||
| image_url: width: 200
|
||||
| image_tag:
|
||||
alt: slide_product.title,
|
||||
widths: '100, 200',
|
||||
sizes: '100px',
|
||||
class: 'learn__card-image',
|
||||
loading: 'lazy'
|
||||
}}
|
||||
{% if hover_image != blank %}
|
||||
{{
|
||||
hover_image
|
||||
| image_url: width: 200
|
||||
| image_tag:
|
||||
alt: '',
|
||||
widths: '100, 200',
|
||||
sizes: '100px',
|
||||
class: 'learn__card-image learn__card-image--hover',
|
||||
loading: 'lazy'
|
||||
}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</a>
|
||||
<div class="learn__card-copy">
|
||||
<a class="learn__card-title" href="{{ slide_product.url }}">{{ slide_product.title | escape }}</a>
|
||||
<p class="learn__card-price">{{ variant.price | money_without_trailing_zeros }}</p>
|
||||
</div>
|
||||
<form class="learn__form" action="{{ routes.cart_add_url }}" method="post">
|
||||
<input type="hidden" name="id" value="{{ variant.id }}">
|
||||
<button
|
||||
class="learn__cart"
|
||||
type="submit"
|
||||
{% unless variant.available %}disabled{% endunless %}
|
||||
aria-label="{{ 'learn.add_to_cart' | t: product: slide_product.title }}"
|
||||
>
|
||||
<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
||||
<path d="M24.9561 10.8984C25.0977 10.5176 24.9023 10.0977 24.5215 9.95605C24.4971 9.94629 24.4727 9.94141 24.4482 9.93164C22.334 9.39453 20.1904 9.00879 18.0273 8.76953V7.08496C18.0273 4.03809 15.5469 1.55762 12.5 1.55762C9.45312 1.55762 6.97266 4.03809 6.97266 7.08496V8.83789C5.0293 9.07715 3.10059 9.43359 1.20117 9.91211L0.551758 10.0732C0.161133 10.1709 -0.078125 10.5713 0.0195313 10.9619C0.0244141 10.9863 0.0341797 11.0107 0.0439453 11.0352L4.10645 22.1973C4.375 22.9346 5.07812 23.4277 5.86426 23.4277H19.0576C19.8389 23.4277 20.5469 22.9346 20.8154 22.2021L22.666 17.1533C22.6758 17.1289 22.6855 17.1045 22.6953 17.0801L24.9609 10.8936L24.9561 10.8984ZM8.4375 7.08984C8.4375 4.84863 10.2588 3.02734 12.5 3.02734C14.7412 3.02734 16.5625 4.84863 16.5625 7.08984V8.6377C13.8574 8.42285 11.1426 8.4375 8.4375 8.68652V7.08984ZM6.97266 10.3223V11.8896C6.97266 12.2949 7.2998 12.6221 7.70508 12.6221C8.11035 12.6221 8.4375 12.2949 8.4375 11.8896V10.1611C11.1377 9.90723 13.8574 9.8877 16.5625 10.1123V11.8896C16.5625 12.2949 16.8896 12.6221 17.2949 12.6221C17.7002 12.6221 18.0273 12.2949 18.0273 11.8896V10.2539C19.7998 10.4541 21.5576 10.7617 23.2959 11.167L21.5137 16.0352L21.001 17.4316L19.4336 21.709C19.375 21.8701 19.2236 21.9727 19.0527 21.9727H5.86426C5.69336 21.9727 5.54199 21.8652 5.4834 21.709L3.92578 17.4316L3.41797 16.0352L1.69922 11.3086C3.4375 10.8789 5.19531 10.5518 6.97266 10.3271" fill="black"/>
|
||||
</svg>
|
||||
</button>
|
||||
</form>
|
||||
</article>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="learn__progress"
|
||||
data-progress
|
||||
role="slider"
|
||||
tabindex="0"
|
||||
aria-valuemin="1"
|
||||
aria-valuemax="{{ slide_count }}"
|
||||
aria-valuenow="{{ active_index | plus: 1 }}"
|
||||
aria-label="{{ heading | escape }}"
|
||||
>
|
||||
<span class="learn__progress-bar" data-progress-bar></span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% stylesheet %}
|
||||
.learn {
|
||||
--slide: 384px;
|
||||
--slide-gap: 30px;
|
||||
position: relative;
|
||||
margin-top: 50px;
|
||||
padding: 97px 0 50px;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(127deg, #f8e1ee 8%, #ffffff 60%);
|
||||
color: #000;
|
||||
font-family: Archivo, sans-serif;
|
||||
}
|
||||
|
||||
.learn__blob {
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.learn__blob--right {
|
||||
top: 0;
|
||||
right: 219px;
|
||||
width: 539px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.learn__blob--left {
|
||||
top: 722px;
|
||||
left: 29px;
|
||||
width: 407px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.learn__header,
|
||||
.learn__products,
|
||||
.learn__progress,
|
||||
.learn__stage {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.learn__header {
|
||||
margin-bottom: 30px;
|
||||
padding-inline: 100px;
|
||||
}
|
||||
|
||||
.learn__heading {
|
||||
margin: 0;
|
||||
font-family: "Roc Grotesk", Archivo, sans-serif;
|
||||
font-size: 30px;
|
||||
font-weight: 500;
|
||||
line-height: normal;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.learn__subheading {
|
||||
margin: 13px 0 0;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.learn__stage {
|
||||
height: 680px;
|
||||
}
|
||||
|
||||
.learn__viewport {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
cursor: grab;
|
||||
touch-action: pan-y;
|
||||
}
|
||||
|
||||
.learn__viewport.is-dragging {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.learn__track {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--slide-gap);
|
||||
width: max-content;
|
||||
height: 100%;
|
||||
padding-inline: calc(50% - var(--slide) / 2);
|
||||
}
|
||||
|
||||
.learn__slide {
|
||||
flex: 0 0 var(--slide);
|
||||
width: var(--slide);
|
||||
}
|
||||
|
||||
.learn__media {
|
||||
position: relative;
|
||||
height: 518px;
|
||||
overflow: hidden;
|
||||
border-radius: 10px;
|
||||
background: #f3e6ee;
|
||||
}
|
||||
|
||||
.learn__slide.is-active .learn__media {
|
||||
height: 680px;
|
||||
}
|
||||
|
||||
.learn__poster,
|
||||
.learn__video {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.learn__video {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.learn__slide.is-playing .learn__video {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.learn__slide.is-playing .learn__poster {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.learn__arrow {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
z-index: 2;
|
||||
display: grid;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
place-items: center;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 60px;
|
||||
background: #fff;
|
||||
transform: translateY(-50%);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.learn__arrow--prev {
|
||||
left: 50px;
|
||||
}
|
||||
|
||||
.learn__arrow--next {
|
||||
right: 50px;
|
||||
}
|
||||
|
||||
.learn__arrow:disabled {
|
||||
cursor: default;
|
||||
opacity: 0.45;
|
||||
}
|
||||
|
||||
.learn__arrow-icon {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.learn__arrow--prev .learn__arrow-icon {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.learn__arrow--next .learn__arrow-icon {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.learn__products {
|
||||
min-height: 120px;
|
||||
margin-top: 36px;
|
||||
}
|
||||
|
||||
.learn__row {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.learn__row[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.learn__card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
width: 384px;
|
||||
height: 120px;
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
background: rgba(249, 249, 250, 0.7);
|
||||
}
|
||||
|
||||
.learn__card-media {
|
||||
position: relative;
|
||||
flex: 0 0 100px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.learn__card-image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.learn__card-image--hover {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
opacity: 0;
|
||||
transition: opacity 0.35s ease;
|
||||
}
|
||||
|
||||
.learn__card:hover .learn__card-image--hover,
|
||||
.learn__card:focus-within .learn__card-image--hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.learn__card-image--hover {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
||||
.learn__card-copy {
|
||||
min-width: 0;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.learn__card-title {
|
||||
display: block;
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.learn__card-price {
|
||||
margin: 5px 0 0;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.learn__form {
|
||||
flex: 0 0 auto;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.learn__cart {
|
||||
display: grid;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
place-items: center;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 60px;
|
||||
background: #9dd6c7;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.learn__cart:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.45;
|
||||
}
|
||||
|
||||
.learn__cart svg {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.learn__progress {
|
||||
position: relative;
|
||||
width: min(1200px, calc(100% - 200px));
|
||||
height: 1px;
|
||||
margin: 54px auto 0;
|
||||
background: #e6e6e6;
|
||||
cursor: pointer;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.learn__progress::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -12px;
|
||||
right: 0;
|
||||
left: 0;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.learn__progress-bar {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 2px;
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.learn__arrow:focus-visible,
|
||||
.learn__cart:focus-visible,
|
||||
.learn__card-title:focus-visible,
|
||||
.learn__card-media:focus-visible {
|
||||
outline: 2px solid #000;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@media (max-width: 1439px) {
|
||||
.learn__header {
|
||||
padding-inline: 40px;
|
||||
}
|
||||
|
||||
.learn__blob--right {
|
||||
right: -80px;
|
||||
width: 360px;
|
||||
}
|
||||
|
||||
.learn__blob--left {
|
||||
top: auto;
|
||||
bottom: 40px;
|
||||
width: 240px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.learn {
|
||||
--slide: 220px;
|
||||
--slide-gap: 16px;
|
||||
margin-top: 24px;
|
||||
padding: 40px 0 32px;
|
||||
}
|
||||
|
||||
.learn__blob {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.learn__header {
|
||||
margin-bottom: 20px;
|
||||
padding-inline: 15px;
|
||||
}
|
||||
|
||||
.learn__heading {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.learn__subheading {
|
||||
margin-top: 8px;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.learn__stage {
|
||||
height: 390px;
|
||||
}
|
||||
|
||||
.learn__media {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.learn__slide.is-active .learn__media {
|
||||
height: 390px;
|
||||
}
|
||||
|
||||
.learn__arrow {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.learn__arrow--prev {
|
||||
left: 12px;
|
||||
}
|
||||
|
||||
.learn__arrow--next {
|
||||
right: 12px;
|
||||
}
|
||||
|
||||
.learn__products {
|
||||
min-height: 0;
|
||||
margin-top: 20px;
|
||||
padding-inline: 15px;
|
||||
}
|
||||
|
||||
.learn__row {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.learn__card {
|
||||
width: min(384px, 100%);
|
||||
}
|
||||
|
||||
.learn__progress {
|
||||
width: calc(100% - 30px);
|
||||
margin-top: 24px;
|
||||
}
|
||||
}
|
||||
{% endstylesheet %}
|
||||
|
||||
{% javascript %}
|
||||
(() => {
|
||||
const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||
|
||||
const setCartCount = (count) => {
|
||||
const link = document.querySelector('.header__cart');
|
||||
if (!link || count < 1) return;
|
||||
let badge = link.querySelector('[data-cart-count]');
|
||||
if (!badge) {
|
||||
badge = document.createElement('span');
|
||||
badge.className = 'absolute right-0 top-0 flex h-4 min-w-4 items-center justify-center rounded-full bg-brand-mint px-[3px] text-[10px] font-medium leading-none text-black';
|
||||
badge.setAttribute('data-cart-count', '');
|
||||
link.appendChild(badge);
|
||||
}
|
||||
badge.textContent = String(count);
|
||||
};
|
||||
|
||||
const playSlide = (slide) => {
|
||||
const video = slide.querySelector('[data-learn-video]');
|
||||
if (!video || reduceMotion) return;
|
||||
if (video.dataset.loaded !== 'true' && video.dataset.src) {
|
||||
video.dataset.loaded = 'true';
|
||||
video.src = video.dataset.src;
|
||||
video.load();
|
||||
}
|
||||
const mark = () => slide.classList.add('is-playing');
|
||||
if (!video.paused && video.currentTime > 0) mark();
|
||||
video.addEventListener('playing', mark, { once: true });
|
||||
const attempt = video.play();
|
||||
if (attempt && typeof attempt.catch === 'function') attempt.catch(() => {});
|
||||
};
|
||||
|
||||
const stopSlide = (slide) => {
|
||||
const video = slide.querySelector('[data-learn-video]');
|
||||
slide.classList.remove('is-playing');
|
||||
if (video && video.dataset.loaded === 'true') video.pause();
|
||||
};
|
||||
|
||||
const boot = (root) => {
|
||||
if (!root || root.dataset.ready === 'true') return;
|
||||
const viewport = root.querySelector('[data-viewport]');
|
||||
const slides = [...root.querySelectorAll('[data-slide]')];
|
||||
const rows = [...root.querySelectorAll('[data-product-row]')];
|
||||
const progress = root.querySelector('[data-progress]');
|
||||
const bar = root.querySelector('[data-progress-bar]');
|
||||
const prev = root.querySelector('[data-learn-prev]');
|
||||
const next = root.querySelector('[data-learn-next]');
|
||||
if (!viewport || !slides.length) return;
|
||||
root.dataset.ready = 'true';
|
||||
|
||||
let index = Number(root.dataset.active) || 0;
|
||||
if (index < 0) index = 0;
|
||||
if (index > slides.length - 1) index = slides.length - 1;
|
||||
|
||||
const paint = (animate) => {
|
||||
slides.forEach((slide, i) => {
|
||||
const active = i === index;
|
||||
slide.classList.toggle('is-active', active);
|
||||
if (active) playSlide(slide);
|
||||
else stopSlide(slide);
|
||||
});
|
||||
rows.forEach((row, i) => {
|
||||
row.hidden = i !== index;
|
||||
});
|
||||
if (bar) {
|
||||
const width = 100 / slides.length;
|
||||
const travel = 100 - width;
|
||||
bar.style.width = `${width}%`;
|
||||
bar.style.left = `${slides.length < 2 ? 0 : (index / (slides.length - 1)) * travel}%`;
|
||||
}
|
||||
if (prev) prev.disabled = index === 0;
|
||||
if (next) next.disabled = index === slides.length - 1;
|
||||
if (progress) {
|
||||
progress.setAttribute('aria-valuemax', String(slides.length));
|
||||
progress.setAttribute('aria-valuenow', String(index + 1));
|
||||
}
|
||||
|
||||
const slide = slides[index];
|
||||
const left = slide.offsetLeft - (viewport.clientWidth - slide.offsetWidth) / 2;
|
||||
viewport.scrollTo({ left: Math.max(left, 0), behavior: animate && !reduceMotion ? 'smooth' : 'auto' });
|
||||
};
|
||||
|
||||
const go = (nextIndex) => {
|
||||
const target = Math.min(Math.max(nextIndex, 0), slides.length - 1);
|
||||
if (target === index) return;
|
||||
index = target;
|
||||
paint(true);
|
||||
};
|
||||
|
||||
prev?.addEventListener('click', () => go(index - 1));
|
||||
next?.addEventListener('click', () => go(index + 1));
|
||||
|
||||
let pointerId = null;
|
||||
let startX = 0;
|
||||
let startScroll = 0;
|
||||
let moved = false;
|
||||
|
||||
viewport.addEventListener('pointerdown', (event) => {
|
||||
if (event.button !== 0) return;
|
||||
if (event.target.closest('a, button')) return;
|
||||
pointerId = event.pointerId;
|
||||
startX = event.clientX;
|
||||
startScroll = viewport.scrollLeft;
|
||||
moved = false;
|
||||
viewport.classList.add('is-dragging');
|
||||
viewport.setPointerCapture(pointerId);
|
||||
});
|
||||
|
||||
viewport.addEventListener('pointermove', (event) => {
|
||||
if (event.pointerId !== pointerId) return;
|
||||
const delta = event.clientX - startX;
|
||||
if (Math.abs(delta) > 4) moved = true;
|
||||
viewport.scrollLeft = startScroll - delta;
|
||||
});
|
||||
|
||||
const endDrag = (event) => {
|
||||
if (event.pointerId !== pointerId) return;
|
||||
pointerId = null;
|
||||
viewport.classList.remove('is-dragging');
|
||||
if (!moved) return;
|
||||
|
||||
const center = viewport.scrollLeft + viewport.clientWidth / 2;
|
||||
let nearest = index;
|
||||
let best = Infinity;
|
||||
slides.forEach((slide, i) => {
|
||||
const mid = slide.offsetLeft + slide.offsetWidth / 2;
|
||||
const distance = Math.abs(mid - center);
|
||||
if (distance < best) {
|
||||
best = distance;
|
||||
nearest = i;
|
||||
}
|
||||
});
|
||||
index = nearest;
|
||||
paint(true);
|
||||
viewport.addEventListener('click', (clickEvent) => {
|
||||
clickEvent.preventDefault();
|
||||
clickEvent.stopPropagation();
|
||||
}, { capture: true, once: true });
|
||||
};
|
||||
|
||||
viewport.addEventListener('pointerup', endDrag);
|
||||
viewport.addEventListener('pointercancel', endDrag);
|
||||
|
||||
const indexFromClientX = (clientX) => {
|
||||
if (!progress || slides.length < 2) return 0;
|
||||
const rect = progress.getBoundingClientRect();
|
||||
const ratio = Math.min(Math.max((clientX - rect.left) / rect.width, 0), 1);
|
||||
return Math.round(ratio * (slides.length - 1));
|
||||
};
|
||||
|
||||
if (progress) {
|
||||
let progressPointer = null;
|
||||
progress.addEventListener('pointerdown', (event) => {
|
||||
if (event.button !== 0) return;
|
||||
progressPointer = event.pointerId;
|
||||
progress.setPointerCapture(progressPointer);
|
||||
go(indexFromClientX(event.clientX));
|
||||
});
|
||||
progress.addEventListener('pointermove', (event) => {
|
||||
if (event.pointerId !== progressPointer) return;
|
||||
go(indexFromClientX(event.clientX));
|
||||
});
|
||||
const endProgress = (event) => {
|
||||
if (event.pointerId !== progressPointer) return;
|
||||
progressPointer = null;
|
||||
};
|
||||
progress.addEventListener('pointerup', endProgress);
|
||||
progress.addEventListener('pointercancel', endProgress);
|
||||
progress.addEventListener('keydown', (event) => {
|
||||
if (event.key === 'ArrowRight') go(index + 1);
|
||||
if (event.key === 'ArrowLeft') go(index - 1);
|
||||
});
|
||||
}
|
||||
|
||||
window.addEventListener('resize', () => paint(false));
|
||||
paint(false);
|
||||
};
|
||||
|
||||
document.querySelectorAll('[data-learn]').forEach(boot);
|
||||
document.addEventListener('shopify:section:load', (event) => {
|
||||
const root = event.target.querySelector('[data-learn]');
|
||||
if (root) {
|
||||
delete root.dataset.ready;
|
||||
boot(root);
|
||||
}
|
||||
});
|
||||
|
||||
if (!window.__seasonLearn) {
|
||||
window.__seasonLearn = true;
|
||||
document.addEventListener('submit', async (event) => {
|
||||
const form = event.target;
|
||||
if (!(form instanceof HTMLFormElement) || !form.classList.contains('learn__form')) return;
|
||||
const root = form.closest('[data-learn]');
|
||||
if (!root) return;
|
||||
event.preventDefault();
|
||||
|
||||
const button = form.querySelector('[type="submit"]');
|
||||
const variantId = form.querySelector('[name="id"]')?.value;
|
||||
if (!button || button.disabled || !variantId) return;
|
||||
button.disabled = true;
|
||||
|
||||
try {
|
||||
const addResponse = await fetch(root.dataset.cartAddUrl, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Accept: 'application/json',
|
||||
},
|
||||
body: JSON.stringify({ id: variantId, quantity: 1 }),
|
||||
});
|
||||
if (!addResponse.ok) {
|
||||
form.submit();
|
||||
return;
|
||||
}
|
||||
const cartResponse = await fetch(root.dataset.cartUrl, { headers: { Accept: 'application/json' } });
|
||||
const cart = await cartResponse.json();
|
||||
if (typeof cart.item_count === 'number') setCartCount(cart.item_count);
|
||||
document.dispatchEvent(new CustomEvent('season:cart:open'));
|
||||
} catch (error) {
|
||||
form.submit();
|
||||
} finally {
|
||||
button.disabled = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
})();
|
||||
{% endjavascript %}
|
||||
|
||||
{% schema %}
|
||||
{
|
||||
"name": "t:learn.name",
|
||||
"tag": "section",
|
||||
"class": "learn-section",
|
||||
"disabled_on": {
|
||||
"groups": ["header", "footer"]
|
||||
},
|
||||
"settings": [
|
||||
{
|
||||
"type": "text",
|
||||
"id": "heading",
|
||||
"label": "t:learn.heading",
|
||||
"default": "Aprende, aplica y brilla con Seasons"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "subheading",
|
||||
"label": "t:learn.subheading",
|
||||
"default": "Descubre tips, rutinas y formas reales de usar tus productos favoritos."
|
||||
}
|
||||
],
|
||||
"blocks": [
|
||||
{
|
||||
"type": "clip",
|
||||
"name": "t:learn.clip",
|
||||
"settings": [
|
||||
{
|
||||
"type": "image_picker",
|
||||
"id": "poster",
|
||||
"label": "t:learn.poster",
|
||||
"info": "t:learn.poster_info"
|
||||
},
|
||||
{
|
||||
"type": "video",
|
||||
"id": "video",
|
||||
"label": "t:learn.video",
|
||||
"info": "t:learn.video_info"
|
||||
},
|
||||
{
|
||||
"type": "product",
|
||||
"id": "product_1",
|
||||
"label": "t:learn.product_1"
|
||||
},
|
||||
{
|
||||
"type": "product",
|
||||
"id": "product_2",
|
||||
"label": "t:learn.product_2"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"presets": [
|
||||
{
|
||||
"name": "t:learn.name",
|
||||
"blocks": [
|
||||
{ "type": "clip" },
|
||||
{ "type": "clip" },
|
||||
{ "type": "clip" },
|
||||
{ "type": "clip" },
|
||||
{ "type": "clip" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
{% endschema %}
|
||||
@@ -0,0 +1,294 @@
|
||||
{% capture marquee_items %}
|
||||
{% if section.blocks.size > 0 %}
|
||||
{% for block in section.blocks %}
|
||||
<div class="marquee__item" {{ block.shopify_attributes }}>
|
||||
<span class="marquee__badge">
|
||||
<span class="marquee__glyph marquee__glyph--{{ block.settings.icon }}">
|
||||
{% case block.settings.icon %}
|
||||
{% when 'payment' %}
|
||||
{{ 'icon-marquee-card.svg' | inline_asset_content }}
|
||||
{% when 'installments' %}
|
||||
<span class="marquee__layer marquee__layer--body">{{ 'icon-marquee-wallet.svg' | inline_asset_content }}</span>
|
||||
<span class="marquee__layer marquee__layer--flap">{{ 'icon-marquee-wallet-flap.svg' | inline_asset_content }}</span>
|
||||
<span class="marquee__layer marquee__layer--mark">{{ 'icon-marquee-wallet-mark.svg' | inline_asset_content }}</span>
|
||||
{% when 'guarantee' %}
|
||||
{{ 'icon-marquee-guarantee.svg' | inline_asset_content }}
|
||||
{% else %}
|
||||
{{ 'icon-marquee-shipping.svg' | inline_asset_content }}
|
||||
{% endcase %}
|
||||
</span>
|
||||
</span>
|
||||
<p class="marquee__copy">
|
||||
<strong>{{ block.settings.title }}</strong>
|
||||
<span>{{ block.settings.text }}</span>
|
||||
</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="marquee__item">
|
||||
<span class="marquee__badge"><span class="marquee__glyph marquee__glyph--shipping">{{ 'icon-marquee-shipping.svg' | inline_asset_content }}</span></span>
|
||||
<p class="marquee__copy"><strong>{{ 'marquee.shipping_title' | t }}</strong><span>{{ 'marquee.shipping_text' | t }}</span></p>
|
||||
</div>
|
||||
<div class="marquee__item">
|
||||
<span class="marquee__badge"><span class="marquee__glyph marquee__glyph--payment">{{ 'icon-marquee-card.svg' | inline_asset_content }}</span></span>
|
||||
<p class="marquee__copy"><strong>{{ 'marquee.payment_title' | t }}</strong><span>{{ 'marquee.payment_text' | t }}</span></p>
|
||||
</div>
|
||||
<div class="marquee__item">
|
||||
<span class="marquee__badge">
|
||||
<span class="marquee__glyph marquee__glyph--installments">
|
||||
<span class="marquee__layer marquee__layer--body">{{ 'icon-marquee-wallet.svg' | inline_asset_content }}</span>
|
||||
<span class="marquee__layer marquee__layer--flap">{{ 'icon-marquee-wallet-flap.svg' | inline_asset_content }}</span>
|
||||
<span class="marquee__layer marquee__layer--mark">{{ 'icon-marquee-wallet-mark.svg' | inline_asset_content }}</span>
|
||||
</span>
|
||||
</span>
|
||||
<p class="marquee__copy"><strong>{{ 'marquee.installments_title' | t }}</strong><span>{{ 'marquee.installments_text' | t }}</span></p>
|
||||
</div>
|
||||
<div class="marquee__item">
|
||||
<span class="marquee__badge"><span class="marquee__glyph marquee__glyph--guarantee">{{ 'icon-marquee-guarantee.svg' | inline_asset_content }}</span></span>
|
||||
<p class="marquee__copy"><strong>{{ 'marquee.guarantee_title' | t }}</strong><span>{{ 'marquee.guarantee_text' | t }}</span></p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endcapture %}
|
||||
|
||||
<div class="marquee full-width">
|
||||
<div class="marquee__track">
|
||||
<div class="marquee__set">{{ marquee_items }}</div>
|
||||
<div class="marquee__set" aria-hidden="true">{{ marquee_items }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% stylesheet %}
|
||||
.marquee-section {
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.marquee {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
height: 100px;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(90deg, #7dcaaf 0%, #a9ddfa 70.064%, #d2ebf9 133.7%);
|
||||
}
|
||||
|
||||
.marquee__track {
|
||||
display: flex;
|
||||
width: max-content;
|
||||
animation: marquee-scroll 36s linear infinite;
|
||||
}
|
||||
|
||||
.marquee__set {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 192px;
|
||||
padding-right: 192px;
|
||||
}
|
||||
|
||||
.marquee__item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.marquee__badge {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
flex: 0 0 45px;
|
||||
border: 1px solid #000;
|
||||
border-radius: 50%;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.marquee__glyph {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.marquee__glyph > svg,
|
||||
.marquee__layer {
|
||||
position: absolute;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.marquee__layer svg {
|
||||
position: static;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.marquee__glyph--shipping svg {
|
||||
top: 2px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.marquee__glyph--payment svg {
|
||||
top: 2px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.marquee__glyph--guarantee svg {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.marquee__layer--body {
|
||||
top: 6px;
|
||||
left: 1px;
|
||||
}
|
||||
|
||||
.marquee__layer--flap {
|
||||
top: 1px;
|
||||
left: 4px;
|
||||
}
|
||||
|
||||
.marquee__layer--mark {
|
||||
top: 2px;
|
||||
left: 7px;
|
||||
}
|
||||
|
||||
.marquee__copy {
|
||||
margin: 0;
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
font-weight: 300;
|
||||
line-height: 20px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.marquee__copy strong {
|
||||
display: block;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
@keyframes marquee-scroll {
|
||||
from {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translate3d(-50%, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1119px) {
|
||||
.marquee {
|
||||
height: 70px;
|
||||
}
|
||||
|
||||
.marquee__set {
|
||||
gap: 50px;
|
||||
padding-right: 50px;
|
||||
}
|
||||
|
||||
.marquee__item {
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.marquee__badge {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
flex-basis: 35px;
|
||||
}
|
||||
|
||||
.marquee__copy {
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.marquee__track {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
{% endstylesheet %}
|
||||
|
||||
{% schema %}
|
||||
{
|
||||
"name": "t:marquee.name",
|
||||
"class": "marquee-section",
|
||||
"disabled_on": {
|
||||
"groups": ["header", "footer"]
|
||||
},
|
||||
"settings": [],
|
||||
"blocks": [
|
||||
{
|
||||
"type": "item",
|
||||
"name": "t:marquee.item",
|
||||
"settings": [
|
||||
{
|
||||
"type": "select",
|
||||
"id": "icon",
|
||||
"label": "t:marquee.icon",
|
||||
"default": "shipping",
|
||||
"options": [
|
||||
{ "value": "shipping", "label": "t:marquee.icon_shipping" },
|
||||
{ "value": "payment", "label": "t:marquee.icon_payment" },
|
||||
{ "value": "installments", "label": "t:marquee.icon_installments" },
|
||||
{ "value": "guarantee", "label": "t:marquee.icon_guarantee" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "title",
|
||||
"label": "t:marquee.title",
|
||||
"default": "Envío gratis"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "text",
|
||||
"label": "t:marquee.text",
|
||||
"default": "Desde $699 a todo México."
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"presets": [
|
||||
{
|
||||
"name": "t:marquee.name",
|
||||
"blocks": [
|
||||
{
|
||||
"type": "item",
|
||||
"settings": {
|
||||
"icon": "shipping",
|
||||
"title": "Envío gratis",
|
||||
"text": "Desde $699 a todo México."
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "item",
|
||||
"settings": {
|
||||
"icon": "payment",
|
||||
"title": "Pago seguro",
|
||||
"text": "Métodos confiables y cifrados."
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "item",
|
||||
"settings": {
|
||||
"icon": "installments",
|
||||
"title": "Pago a plazos",
|
||||
"text": "Con Mercado Pago, Kueski Pay o Aplazo."
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "item",
|
||||
"settings": {
|
||||
"icon": "guarantee",
|
||||
"title": "Garantía de entrega",
|
||||
"text": "Reenvío sin costo si algo falla."
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
{% endschema %}
|
||||
@@ -0,0 +1,299 @@
|
||||
{% liquid
|
||||
assign product_collection = section.settings.collection
|
||||
if product_collection == blank
|
||||
assign product_collection = collections.all
|
||||
endif
|
||||
|
||||
if section.settings.heading != blank
|
||||
assign heading = section.settings.heading
|
||||
else
|
||||
assign heading = 'new_products.heading' | t
|
||||
endif
|
||||
|
||||
assign more_url = routes.all_products_collection_url
|
||||
assign feed_url = blank
|
||||
assign already_sorted = false
|
||||
if product_collection != blank
|
||||
assign more_url = product_collection.url | sort_by: 'created-descending'
|
||||
assign feed_url = more_url | append: '&view=new-products-data'
|
||||
if product_collection.default_sort_by == 'created-descending'
|
||||
assign already_sorted = true
|
||||
endif
|
||||
endif
|
||||
|
||||
assign video_src = blank
|
||||
if section.settings.video != blank
|
||||
for source in section.settings.video.sources
|
||||
if source.mime_type == 'video/mp4' or source.format == 'mp4'
|
||||
assign video_src = source.url
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
|
||||
assign poster = section.settings.poster
|
||||
assign poster_url = blank
|
||||
if poster != blank
|
||||
assign poster_url = poster | image_url: width: 1000
|
||||
endif
|
||||
|
||||
if video_src == blank and section.settings.promo_link != blank
|
||||
assign promo_tag = 'a'
|
||||
else
|
||||
assign promo_tag = 'div'
|
||||
endif
|
||||
|
||||
assign products_to_show = section.settings.products_to_show | default: 8
|
||||
assign show_promo = false
|
||||
if poster != blank or video_src != blank
|
||||
assign show_promo = true
|
||||
endif
|
||||
%}
|
||||
|
||||
<section
|
||||
class="bestsellers new-products full-width"
|
||||
data-bestsellers
|
||||
data-new-products
|
||||
data-cart-add-url="{{ routes.cart_add_url }}.js"
|
||||
data-cart-url="{{ routes.cart_url }}.js"
|
||||
data-checkout-url="{{ routes.root_url }}checkout"
|
||||
data-limit="{{ products_to_show }}"
|
||||
{% if feed_url != blank %}
|
||||
data-feed="{{ feed_url }}"
|
||||
{% endif %}
|
||||
{% if already_sorted or request.design_mode %}
|
||||
data-sorted="true"
|
||||
{% endif %}
|
||||
>
|
||||
<div class="bestsellers__header">
|
||||
<h2 class="bestsellers__heading">{{ heading | escape }}</h2>
|
||||
<div class="bestsellers__tools">
|
||||
<a class="bestsellers__more" href="{{ more_url }}">{{ 'bestsellers.view_more' | t }}</a>
|
||||
<div class="bestsellers__arrows">
|
||||
<button class="bestsellers__arrow bestsellers__arrow--prev" type="button" data-slider-prev disabled aria-label="{{ 'bestsellers.previous' | t }}">
|
||||
<span class="bestsellers__arrow-icon" aria-hidden="true">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.375 9.53125L10 3.90625L15.625 9.53125M10 4.6875V16.0938" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
<button class="bestsellers__arrow bestsellers__arrow--next" type="button" data-slider-next aria-label="{{ 'bestsellers.next' | t }}">
|
||||
<span class="bestsellers__arrow-icon" aria-hidden="true">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.375 9.53125L10 3.90625L15.625 9.53125M10 4.6875V16.0938" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bestsellers__body">
|
||||
{% if show_promo %}
|
||||
<{{ promo_tag }}
|
||||
class="bestsellers__promo"
|
||||
{% if promo_tag == 'a' %}
|
||||
href="{{ section.settings.promo_link }}"
|
||||
{% endif %}
|
||||
>
|
||||
{% if poster != blank %}
|
||||
{{
|
||||
poster
|
||||
| image_url: width: 1400
|
||||
| image_tag:
|
||||
alt: heading,
|
||||
widths: '372, 486, 744, 972',
|
||||
sizes: '(max-width: 1024px) calc(100vw - 30px), 486px',
|
||||
class: 'bestsellers__promo-image new-products__poster',
|
||||
loading: 'lazy'
|
||||
}}
|
||||
{% endif %}
|
||||
|
||||
{% if video_src != blank %}
|
||||
<video
|
||||
class="new-products__video"
|
||||
data-new-products-video
|
||||
data-src="{{ video_src }}"
|
||||
{% if poster_url != blank %}
|
||||
poster="{{ poster_url }}"
|
||||
{% endif %}
|
||||
muted
|
||||
playsinline
|
||||
loop
|
||||
preload="none"
|
||||
aria-hidden="true"
|
||||
></video>
|
||||
{% endif %}
|
||||
</{{ promo_tag }}>
|
||||
{% endif %}
|
||||
|
||||
<div class="bestsellers__slider">
|
||||
<div class="bestsellers__viewport" data-viewport tabindex="0">
|
||||
<div class="bestsellers__track" data-track>
|
||||
{% if product_collection != blank and product_collection.products_count > 0 %}
|
||||
{% for product in product_collection.products limit: products_to_show %}
|
||||
{% render 'bestsellers-card', product: product, form_suffix: section.id %}
|
||||
{% endfor %}
|
||||
{% elsif request.design_mode %}
|
||||
<p class="bestsellers__empty">{{ 'bestsellers.empty' | t }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="bestsellers__progress" data-progress aria-hidden="true">
|
||||
<span class="bestsellers__progress-bar" data-progress-bar></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% stylesheet %}
|
||||
.bestsellers.new-products {
|
||||
padding-top: 100px;
|
||||
}
|
||||
|
||||
.new-products__video {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.new-products.is-playing .new-products__video {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.new-products.is-playing .new-products__poster {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.bestsellers.new-products {
|
||||
padding-top: 40px;
|
||||
}
|
||||
}
|
||||
{% endstylesheet %}
|
||||
|
||||
{% javascript %}
|
||||
(() => {
|
||||
const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||
|
||||
const markPlaying = (video) => {
|
||||
const root = video.closest('[data-new-products]');
|
||||
if (!root) return;
|
||||
root.classList.toggle('is-playing', !video.paused && !video.ended);
|
||||
};
|
||||
|
||||
const ensureSource = (video) => {
|
||||
if (video.dataset.loaded === 'true' || !video.dataset.src || reduceMotion) return;
|
||||
video.dataset.loaded = 'true';
|
||||
video.src = video.dataset.src;
|
||||
video.load();
|
||||
};
|
||||
|
||||
const playVideo = (video) => {
|
||||
ensureSource(video);
|
||||
if (video.dataset.loaded !== 'true') return;
|
||||
const attempt = video.play();
|
||||
if (attempt && typeof attempt.catch === 'function') attempt.catch(() => {});
|
||||
};
|
||||
|
||||
const watch = (video) => {
|
||||
video.addEventListener('playing', () => markPlaying(video));
|
||||
video.addEventListener('pause', () => markPlaying(video));
|
||||
video.addEventListener('ended', () => markPlaying(video));
|
||||
|
||||
if (!('IntersectionObserver' in window)) {
|
||||
playVideo(video);
|
||||
return;
|
||||
}
|
||||
|
||||
const observer = new IntersectionObserver((entries) => {
|
||||
entries.forEach((entry) => {
|
||||
if (entry.isIntersecting) {
|
||||
playVideo(entry.target);
|
||||
return;
|
||||
}
|
||||
if (entry.target.dataset.loaded === 'true') entry.target.pause();
|
||||
});
|
||||
}, { rootMargin: '200px 0px' });
|
||||
|
||||
observer.observe(video);
|
||||
};
|
||||
|
||||
const boot = (root) => {
|
||||
if (!root || root.dataset.videoReady === 'true') return;
|
||||
root.dataset.videoReady = 'true';
|
||||
const video = root.querySelector('[data-new-products-video]');
|
||||
if (video) watch(video);
|
||||
};
|
||||
|
||||
document.querySelectorAll('[data-new-products]').forEach(boot);
|
||||
|
||||
document.addEventListener('shopify:section:load', (event) => {
|
||||
const root = event.target.querySelector('[data-new-products]');
|
||||
if (root) boot(root);
|
||||
});
|
||||
})();
|
||||
{% endjavascript %}
|
||||
|
||||
{% schema %}
|
||||
{
|
||||
"name": "t:new_products.name",
|
||||
"tag": "section",
|
||||
"class": "new-products-section",
|
||||
"disabled_on": {
|
||||
"groups": ["header", "footer"]
|
||||
},
|
||||
"settings": [
|
||||
{
|
||||
"type": "text",
|
||||
"id": "heading",
|
||||
"label": "t:new_products.heading",
|
||||
"default": "Nuevos productos"
|
||||
},
|
||||
{
|
||||
"type": "collection",
|
||||
"id": "collection",
|
||||
"label": "t:new_products.collection",
|
||||
"info": "t:new_products.collection_info"
|
||||
},
|
||||
{
|
||||
"type": "range",
|
||||
"id": "products_to_show",
|
||||
"label": "t:new_products.products_to_show",
|
||||
"min": 4,
|
||||
"max": 12,
|
||||
"step": 1,
|
||||
"default": 8
|
||||
},
|
||||
{
|
||||
"type": "header",
|
||||
"content": "t:new_products.media"
|
||||
},
|
||||
{
|
||||
"type": "image_picker",
|
||||
"id": "poster",
|
||||
"label": "t:new_products.poster",
|
||||
"info": "t:new_products.poster_info"
|
||||
},
|
||||
{
|
||||
"type": "video",
|
||||
"id": "video",
|
||||
"label": "t:new_products.video",
|
||||
"info": "t:new_products.video_info"
|
||||
},
|
||||
{
|
||||
"type": "url",
|
||||
"id": "promo_link",
|
||||
"label": "t:new_products.promo_link",
|
||||
"info": "t:new_products.promo_link_info"
|
||||
}
|
||||
],
|
||||
"presets": [
|
||||
{
|
||||
"name": "t:new_products.name"
|
||||
}
|
||||
]
|
||||
}
|
||||
{% endschema %}
|
||||
+1374
-36
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,117 @@
|
||||
<section class="recent full-width" data-recent data-root="{{ routes.root_url }}">
|
||||
<div class="recent__inner">
|
||||
<h2 class="recent__title">{{ 'collection_page.recent' | t }}</h2>
|
||||
<div class="recent__grid" data-recent-list>
|
||||
{% if collection != blank %}
|
||||
{% for product in collection.products limit: 4 %}
|
||||
{% assign card_suffix = section.id | append: '-recent-' | append: forloop.index %}
|
||||
{% render 'collection-card', product: product, form_suffix: card_suffix %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% stylesheet %}
|
||||
.recent {
|
||||
background: #f9f9fa;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.recent__inner {
|
||||
padding: 10px 100px 80px;
|
||||
}
|
||||
|
||||
.recent__title {
|
||||
margin: 0 0 24px;
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.04em;
|
||||
line-height: normal;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.recent__grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 28px 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 1119px) {
|
||||
.recent__inner {
|
||||
padding-right: 24px;
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
.recent__grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.recent__inner {
|
||||
padding: 8px 10px 48px;
|
||||
}
|
||||
|
||||
.recent__title {
|
||||
margin-bottom: 16px;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
{% endstylesheet %}
|
||||
|
||||
{% javascript %}
|
||||
(() => {
|
||||
if (window.__seasonRecent) return;
|
||||
window.__seasonRecent = true;
|
||||
|
||||
const storageKey = 'seasons-recent';
|
||||
|
||||
const boot = async (root) => {
|
||||
if (!root || root.dataset.ready === 'true') return;
|
||||
root.dataset.ready = 'true';
|
||||
|
||||
let handles = [];
|
||||
try {
|
||||
const stored = JSON.parse(window.localStorage.getItem(storageKey));
|
||||
if (Array.isArray(stored)) handles = stored.map(String).filter(Boolean);
|
||||
} catch (error) {
|
||||
handles = [];
|
||||
}
|
||||
|
||||
handles = handles.slice(0, 4);
|
||||
const list = root.querySelector('[data-recent-list]');
|
||||
if (!list) return;
|
||||
|
||||
if (handles.length) {
|
||||
const prefix = `${root.dataset.root || '/'}`.replace(/\/?$/, '/');
|
||||
const cards = await Promise.all(handles.map(async (handle) => {
|
||||
try {
|
||||
const response = await fetch(`${prefix}products/${encodeURIComponent(handle)}?view=card`, { headers: { Accept: 'text/html' } });
|
||||
if (!response.ok) return null;
|
||||
const holder = document.createElement('div');
|
||||
holder.innerHTML = (await response.text()).trim();
|
||||
return holder.querySelector('.collection-card');
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
const ready = cards.filter(Boolean);
|
||||
if (ready.length) list.replaceChildren(...ready);
|
||||
}
|
||||
|
||||
root.hidden = list.children.length === 0;
|
||||
};
|
||||
|
||||
document.querySelectorAll('[data-recent]').forEach(boot);
|
||||
})();
|
||||
{% endjavascript %}
|
||||
|
||||
{% schema %}
|
||||
{
|
||||
"name": "t:collection_page.recent_name",
|
||||
"tag": "section",
|
||||
"class": "recent-section",
|
||||
"settings": []
|
||||
}
|
||||
{% endschema %}
|
||||
@@ -0,0 +1,411 @@
|
||||
{% liquid
|
||||
if section.settings.heading != blank
|
||||
assign heading = section.settings.heading
|
||||
else
|
||||
assign heading = 'routine.heading' | t
|
||||
endif
|
||||
|
||||
if section.settings.cover_link != blank
|
||||
assign cover_tag = 'a'
|
||||
else
|
||||
assign cover_tag = 'div'
|
||||
endif
|
||||
%}
|
||||
|
||||
<section class="routine full-width">
|
||||
<div class="routine__layout">
|
||||
<{{ cover_tag }}
|
||||
class="routine__cover"
|
||||
{% if cover_tag == 'a' %}
|
||||
href="{{ section.settings.cover_link }}"
|
||||
{% endif %}
|
||||
>
|
||||
{% if section.settings.cover_image != blank %}
|
||||
{{
|
||||
section.settings.cover_image
|
||||
| image_url: width: 1700
|
||||
| image_tag:
|
||||
alt: heading,
|
||||
widths: '400, 800, 1200, 1700',
|
||||
sizes: '(max-width: 1024px) calc(100vw - 30px), 50vw',
|
||||
class: 'routine__cover-image',
|
||||
loading: 'eager'
|
||||
}}
|
||||
{% else %}
|
||||
<img
|
||||
class="routine__cover-image"
|
||||
src="{{ 'routine-photo.avif' | asset_url }}"
|
||||
alt="{{ heading | escape }}"
|
||||
width="849"
|
||||
height="892"
|
||||
>
|
||||
{% endif %}
|
||||
<h2 class="routine__heading">{{ heading | escape | newline_to_br }}</h2>
|
||||
</{{ cover_tag }}>
|
||||
|
||||
<div class="routine__steps">
|
||||
{% for block in section.blocks %}
|
||||
{% liquid
|
||||
if block.settings.title != blank
|
||||
assign step_title = block.settings.title
|
||||
else
|
||||
assign step_key = 'routine.steps.step_' | append: forloop.index
|
||||
assign step_title = step_key | t
|
||||
endif
|
||||
|
||||
if block.settings.link != blank
|
||||
assign step_tag = 'a'
|
||||
else
|
||||
assign step_tag = 'div'
|
||||
endif
|
||||
|
||||
assign fallback_image = blank
|
||||
case forloop.index
|
||||
when 1
|
||||
assign fallback_image = 'routine-limpia.avif'
|
||||
when 2
|
||||
assign fallback_image = 'routine-trata.avif'
|
||||
when 3
|
||||
assign fallback_image = 'routine-hidrata.avif'
|
||||
when 4
|
||||
assign fallback_image = 'routine-protege.avif'
|
||||
endcase
|
||||
%}
|
||||
|
||||
<{{ step_tag }}
|
||||
class="routine__card"
|
||||
{{ block.shopify_attributes }}
|
||||
{% if step_tag == 'a' %}
|
||||
href="{{ block.settings.link }}"
|
||||
{% endif %}
|
||||
>
|
||||
<span class="routine__media">
|
||||
{% if block.settings.image != blank %}
|
||||
{{
|
||||
block.settings.image
|
||||
| image_url: width: 900
|
||||
| image_tag:
|
||||
alt: step_title,
|
||||
widths: '245, 415, 830',
|
||||
sizes: '(max-width: 1024px) 245px, 25vw',
|
||||
class: 'routine__image',
|
||||
loading: 'lazy'
|
||||
}}
|
||||
{% elsif fallback_image != blank %}
|
||||
<img
|
||||
class="routine__image"
|
||||
src="{{ fallback_image | asset_url }}"
|
||||
alt="{{ step_title | escape }}"
|
||||
width="415"
|
||||
height="436"
|
||||
>
|
||||
{% endif %}
|
||||
<span class="routine__shade" aria-hidden="true"></span>
|
||||
</span>
|
||||
<span class="routine__caption">
|
||||
<span class="routine__label">{{ step_title | escape }}</span>
|
||||
<span class="routine__arrow" aria-hidden="true">
|
||||
<span class="routine__arrow-icon">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.375 9.53125L10 3.90625L15.625 9.53125M10 4.6875V16.0938" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</{{ step_tag }}>
|
||||
{% else %}
|
||||
{% if request.design_mode %}
|
||||
<p class="routine__empty">{{ 'routine.empty' | t }}</p>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% stylesheet %}
|
||||
.routine {
|
||||
padding: 50px 0;
|
||||
color: #000;
|
||||
background: #fff;
|
||||
font-family: Archivo, sans-serif;
|
||||
}
|
||||
|
||||
.routine__layout {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 849fr) minmax(0, 850fr);
|
||||
gap: 21px;
|
||||
align-items: stretch;
|
||||
padding-inline: 100px;
|
||||
}
|
||||
|
||||
.routine__cover {
|
||||
position: relative;
|
||||
display: block;
|
||||
min-height: 0;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
border-radius: 10px;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.routine__cover-image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.routine__heading {
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
left: 40px;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
font-family: "Roc Grotesk", Archivo, sans-serif;
|
||||
font-size: 50px;
|
||||
font-weight: 400;
|
||||
line-height: 0.98;
|
||||
}
|
||||
|
||||
.routine__steps {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 20px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.routine__card {
|
||||
position: relative;
|
||||
display: block;
|
||||
min-width: 0;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
container-type: inline-size;
|
||||
}
|
||||
|
||||
.routine__media {
|
||||
position: relative;
|
||||
display: block;
|
||||
aspect-ratio: 415 / 436;
|
||||
overflow: hidden;
|
||||
border-radius: 10px;
|
||||
background: #f4f4f4;
|
||||
}
|
||||
|
||||
.routine__image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.routine__shade {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.routine__caption {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
bottom: 10px;
|
||||
left: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
color: #fff;
|
||||
font-family: "Roc Grotesk", Archivo, sans-serif;
|
||||
font-size: clamp(16px, 7.2cqi, 30px);
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.routine__label {
|
||||
min-width: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.routine__arrow {
|
||||
display: grid;
|
||||
flex: 0 0 30px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
place-items: center;
|
||||
border-radius: 60px;
|
||||
background: #9dd6c7;
|
||||
}
|
||||
|
||||
.routine__arrow-icon {
|
||||
display: block;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.routine__empty {
|
||||
grid-column: 1 / -1;
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.routine__cover:focus-visible,
|
||||
.routine__card:focus-visible {
|
||||
outline: 2px solid #000;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@media (max-width: 1439px) {
|
||||
.routine__layout {
|
||||
padding-inline: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.routine {
|
||||
padding-top: 40px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.routine__layout {
|
||||
display: block;
|
||||
padding-inline: 0;
|
||||
}
|
||||
|
||||
.routine__cover {
|
||||
height: 391px;
|
||||
margin-inline: 15px;
|
||||
}
|
||||
|
||||
.routine__heading {
|
||||
top: 10px;
|
||||
left: 20px;
|
||||
width: 155px;
|
||||
font-size: 25px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.routine__steps {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
margin-top: 0;
|
||||
padding: 20px 15px;
|
||||
overflow-x: auto;
|
||||
scroll-snap-type: x mandatory;
|
||||
scroll-padding-inline: 15px;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.routine__steps::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.routine__card {
|
||||
flex: 0 0 245px;
|
||||
width: 245px;
|
||||
scroll-snap-align: start;
|
||||
}
|
||||
|
||||
.routine__media {
|
||||
height: 258px;
|
||||
aspect-ratio: auto;
|
||||
}
|
||||
|
||||
.routine__caption {
|
||||
position: static;
|
||||
margin-top: 10px;
|
||||
color: #000;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.routine__arrow {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
{% endstylesheet %}
|
||||
|
||||
{% schema %}
|
||||
{
|
||||
"name": "t:routine.name",
|
||||
"tag": "section",
|
||||
"class": "routine-section",
|
||||
"disabled_on": {
|
||||
"groups": ["header", "footer"]
|
||||
},
|
||||
"settings": [
|
||||
{
|
||||
"type": "textarea",
|
||||
"id": "heading",
|
||||
"label": "t:routine.heading",
|
||||
"default": "Tu rutina\nen 4 pasos"
|
||||
},
|
||||
{
|
||||
"type": "image_picker",
|
||||
"id": "cover_image",
|
||||
"label": "t:routine.cover_image",
|
||||
"info": "t:routine.cover_image_info"
|
||||
},
|
||||
{
|
||||
"type": "url",
|
||||
"id": "cover_link",
|
||||
"label": "t:routine.cover_link"
|
||||
}
|
||||
],
|
||||
"blocks": [
|
||||
{
|
||||
"type": "step",
|
||||
"name": "t:routine.step",
|
||||
"limit": 4,
|
||||
"settings": [
|
||||
{
|
||||
"type": "image_picker",
|
||||
"id": "image",
|
||||
"label": "t:routine.step_image",
|
||||
"info": "t:routine.step_image_info"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "title",
|
||||
"label": "t:routine.step_title"
|
||||
},
|
||||
{
|
||||
"type": "url",
|
||||
"id": "link",
|
||||
"label": "t:routine.step_link"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"presets": [
|
||||
{
|
||||
"name": "t:routine.name",
|
||||
"blocks": [
|
||||
{
|
||||
"type": "step",
|
||||
"settings": {
|
||||
"title": "Paso 1: Limpia"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "step",
|
||||
"settings": {
|
||||
"title": "Paso 2: Trata"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "step",
|
||||
"settings": {
|
||||
"title": "Paso 3: Hidrata"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "step",
|
||||
"settings": {
|
||||
"title": "Paso 4: Protege"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
{% endschema %}
|
||||
@@ -0,0 +1,420 @@
|
||||
{% liquid
|
||||
if section.settings.line_1 != blank
|
||||
assign line_1 = section.settings.line_1
|
||||
else
|
||||
assign line_1 = 'signup.line_1' | t
|
||||
endif
|
||||
|
||||
if section.settings.line_2 != blank
|
||||
assign line_2 = section.settings.line_2
|
||||
else
|
||||
assign line_2 = 'signup.line_2' | t
|
||||
endif
|
||||
|
||||
if section.settings.line_3 != blank
|
||||
assign line_3 = section.settings.line_3
|
||||
else
|
||||
assign line_3 = 'signup.line_3' | t
|
||||
endif
|
||||
|
||||
if section.settings.line_4 != blank
|
||||
assign line_4 = section.settings.line_4
|
||||
else
|
||||
assign line_4 = 'signup.line_4' | t
|
||||
endif
|
||||
|
||||
if section.settings.text != blank
|
||||
assign text = section.settings.text
|
||||
else
|
||||
assign text = 'signup.text' | t
|
||||
endif
|
||||
|
||||
if section.settings.placeholder != blank
|
||||
assign placeholder = section.settings.placeholder
|
||||
else
|
||||
assign placeholder = 'signup.placeholder' | t
|
||||
endif
|
||||
|
||||
assign form_id = 'SignupForm-' | append: section.id
|
||||
assign email_id = 'SignupEmail-' | append: section.id
|
||||
assign message_id = 'SignupMessage-' | append: section.id
|
||||
%}
|
||||
|
||||
<section class="signup full-width" id="Signup-{{ section.id }}">
|
||||
<div class="signup__panel">
|
||||
<div class="signup__art" aria-hidden="true">
|
||||
<img
|
||||
src="{{ 'Capa_1.avif' | asset_url }}"
|
||||
alt=""
|
||||
width="317"
|
||||
height="360"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="signup__copy">
|
||||
<h2 class="signup__title">
|
||||
<span class="signup__line signup__line--medium">{{ line_1 | escape }}</span>
|
||||
<span class="signup__line signup__line--light">{{ line_2 | escape }}</span>
|
||||
<span class="signup__line">
|
||||
<span class="signup__line--medium">{{ line_3 | escape }}</span>
|
||||
<span class="signup__line--light"> {{ line_4 | escape }}</span>
|
||||
</span>
|
||||
</h2>
|
||||
|
||||
{% if text != blank %}
|
||||
<p class="signup__text">{{ text | escape | newline_to_br }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% form 'customer', id: form_id, class: 'signup__form' %}
|
||||
<input type="hidden" name="contact[tags]" value="newsletter">
|
||||
|
||||
<div class="signup__field">
|
||||
<label class="signup__label" for="{{ email_id }}">{{ 'signup.email_label' | t }}</label>
|
||||
<input
|
||||
id="{{ email_id }}"
|
||||
class="signup__input"
|
||||
type="email"
|
||||
name="contact[email]"
|
||||
value="{{ form.email }}"
|
||||
placeholder="{{ placeholder | escape }}"
|
||||
autocomplete="email"
|
||||
autocapitalize="off"
|
||||
autocorrect="off"
|
||||
spellcheck="false"
|
||||
required
|
||||
aria-required="true"
|
||||
{% if form.errors %}
|
||||
aria-invalid="true"
|
||||
aria-describedby="{{ message_id }}"
|
||||
{% elsif form.posted_successfully? %}
|
||||
aria-describedby="{{ message_id }}"
|
||||
{% endif %}
|
||||
>
|
||||
<button class="signup__submit" type="submit" aria-label="{{ 'signup.submit' | t }}">
|
||||
<span class="signup__arrow">
|
||||
<img src="{{ 'signup-arrow.svg' | asset_url }}" alt="" width="20" height="20">
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{% if form.posted_successfully? %}
|
||||
<p id="{{ message_id }}" class="signup__message" role="status" tabindex="-1" autofocus>
|
||||
{{ 'signup.success' | t }}
|
||||
</p>
|
||||
{% elsif form.errors %}
|
||||
<p id="{{ message_id }}" class="signup__message signup__message--error" role="alert">
|
||||
{% if form.errors.messages.email != blank %}
|
||||
{{ form.errors.messages.email | escape }}
|
||||
{% else %}
|
||||
{{ 'signup.error' | t }}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endform %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% stylesheet %}
|
||||
.signup {
|
||||
padding: 50px 100px 63px;
|
||||
background: #fff;
|
||||
color: #000;
|
||||
font-family: Archivo, sans-serif;
|
||||
}
|
||||
|
||||
.signup__panel {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 450px;
|
||||
overflow: hidden;
|
||||
border-radius: 10px;
|
||||
background: linear-gradient(128.45deg, #7dcaaf 0%, #a9ddfa 114.42%, #d2ebf9 133.7%);
|
||||
}
|
||||
|
||||
.signup__art {
|
||||
position: absolute;
|
||||
top: 40.9px;
|
||||
left: 82px;
|
||||
width: 317px;
|
||||
height: 360.19px;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.signup__art img {
|
||||
display: block;
|
||||
width: 317px;
|
||||
height: 360.19px;
|
||||
max-width: none;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.signup__copy {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
width: min(100%, 804px);
|
||||
padding: 82px 24px;
|
||||
}
|
||||
|
||||
.signup__title {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
font-family: "Roc Grotesk", Archivo, sans-serif;
|
||||
font-size: 40px;
|
||||
font-weight: 500;
|
||||
line-height: 45px;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.signup__line {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.signup__line--medium {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.signup__line--light {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.signup__text {
|
||||
width: 100%;
|
||||
max-width: 804px;
|
||||
margin: 0;
|
||||
color: #000;
|
||||
font-family: Archivo, sans-serif;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.signup__form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.signup__field {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 400px;
|
||||
max-width: 100%;
|
||||
height: 50px;
|
||||
padding: 0 30px;
|
||||
border-radius: 100px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.signup__field:focus-within {
|
||||
outline: 2px solid #000;
|
||||
outline-offset: 3px;
|
||||
}
|
||||
|
||||
.signup__label {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.signup__input {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
color: #000;
|
||||
font-family: Archivo, sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
line-height: normal;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.signup__input::placeholder {
|
||||
color: #808181;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.signup__submit {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-left: 12px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: #000;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.signup__arrow {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.signup__arrow img {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.signup__message {
|
||||
margin: 12px 0 0;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 1.35;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.signup__message--error {
|
||||
color: #9b1c1c;
|
||||
}
|
||||
|
||||
@media (max-width: 1439px) {
|
||||
.signup {
|
||||
padding-inline: 40px;
|
||||
}
|
||||
|
||||
.signup__panel {
|
||||
min-height: 380px;
|
||||
}
|
||||
|
||||
.signup__art {
|
||||
left: 24px;
|
||||
transform: scale(0.72);
|
||||
transform-origin: left center;
|
||||
}
|
||||
|
||||
.signup__copy {
|
||||
width: min(100%, 640px);
|
||||
padding-block: 48px;
|
||||
}
|
||||
|
||||
.signup__title {
|
||||
font-size: 32px;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.signup__text {
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.signup {
|
||||
padding: 24px 15px 32px;
|
||||
}
|
||||
|
||||
.signup__panel {
|
||||
min-height: 0;
|
||||
padding-top: 28px;
|
||||
}
|
||||
|
||||
.signup__art {
|
||||
top: 12px;
|
||||
left: 8px;
|
||||
transform: scale(0.42);
|
||||
transform-origin: left top;
|
||||
}
|
||||
|
||||
.signup__copy {
|
||||
width: min(100%, 520px);
|
||||
padding: 88px 16px 32px;
|
||||
}
|
||||
|
||||
.signup__title {
|
||||
font-size: 24px;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.signup__field {
|
||||
width: min(100%, 400px);
|
||||
}
|
||||
}
|
||||
{% endstylesheet %}
|
||||
|
||||
{% schema %}
|
||||
{
|
||||
"name": "t:signup.name",
|
||||
"tag": "section",
|
||||
"class": "signup-section",
|
||||
"disabled_on": {
|
||||
"groups": ["header", "footer"]
|
||||
},
|
||||
"settings": [
|
||||
{
|
||||
"type": "paragraph",
|
||||
"content": "t:signup.form_info"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "line_1",
|
||||
"label": "t:signup.line_1",
|
||||
"default": "Regístrate"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "line_2",
|
||||
"label": "t:signup.line_2",
|
||||
"default": "hoy mismo y disfruta de un"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "line_3",
|
||||
"label": "t:signup.line_3",
|
||||
"default": "10 % de descuento"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "line_4",
|
||||
"label": "t:signup.line_4",
|
||||
"default": "en tu primer pedido"
|
||||
},
|
||||
{
|
||||
"type": "textarea",
|
||||
"id": "text",
|
||||
"label": "t:signup.text",
|
||||
"default": "Accede a beneficios exclusivos para miembros, acceso anticipado a los nuevos lanzamientos y recompensas exclusivas, solo para ti."
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "placeholder",
|
||||
"label": "t:signup.placeholder",
|
||||
"default": "Tu email"
|
||||
}
|
||||
],
|
||||
"presets": [
|
||||
{
|
||||
"name": "t:signup.name"
|
||||
}
|
||||
]
|
||||
}
|
||||
{% endschema %}
|
||||
@@ -0,0 +1,601 @@
|
||||
{% liquid
|
||||
if section.settings.heading != blank
|
||||
assign heading = section.settings.heading
|
||||
else
|
||||
assign heading = 'skin_match.heading' | t
|
||||
endif
|
||||
|
||||
if section.settings.subheading != blank
|
||||
assign subheading = section.settings.subheading
|
||||
else
|
||||
assign subheading = 'skin_match.subheading' | t
|
||||
endif
|
||||
|
||||
if section.settings.lead != blank
|
||||
assign lead = section.settings.lead
|
||||
else
|
||||
assign lead = 'skin_match.lead' | t
|
||||
endif
|
||||
|
||||
if section.settings.rest != blank
|
||||
assign rest = section.settings.rest
|
||||
else
|
||||
assign rest = 'skin_match.rest' | t
|
||||
endif
|
||||
|
||||
if section.settings.button_label != blank
|
||||
assign button_label = section.settings.button_label
|
||||
else
|
||||
assign button_label = 'skin_match.button' | t
|
||||
endif
|
||||
|
||||
assign serum_alt = 'skin_match.photos.serum' | t
|
||||
assign jar_alt = 'skin_match.photos.jar' | t
|
||||
assign dropper_alt = 'skin_match.photos.dropper' | t
|
||||
assign cheek_alt = 'skin_match.photos.cheek' | t
|
||||
%}
|
||||
|
||||
<section class="skin-match full-width">
|
||||
<div class="skin-match__canvas">
|
||||
<div class="skin-match__blob skin-match__blob--blue" aria-hidden="true">
|
||||
<img
|
||||
src="{{ 'skin-match-blob-blue.avif' | asset_url }}"
|
||||
alt=""
|
||||
width="308"
|
||||
height="301"
|
||||
loading="lazy"
|
||||
>
|
||||
</div>
|
||||
<div class="skin-match__blob skin-match__blob--peach" aria-hidden="true">
|
||||
<img
|
||||
src="{{ 'skin-match-peach.avif' | asset_url }}"
|
||||
alt=""
|
||||
width="327"
|
||||
height="302"
|
||||
loading="lazy"
|
||||
>
|
||||
</div>
|
||||
<div class="skin-match__blob skin-match__blob--green" aria-hidden="true">
|
||||
<img
|
||||
src="{{ 'skin-match-mint.avif' | asset_url }}"
|
||||
alt=""
|
||||
width="277"
|
||||
height="311"
|
||||
loading="lazy"
|
||||
>
|
||||
</div>
|
||||
<div class="skin-match__blob skin-match__blob--pink" aria-hidden="true">
|
||||
<img
|
||||
src="{{ 'skin-match-lilac.avif' | asset_url }}"
|
||||
alt=""
|
||||
width="338"
|
||||
height="324"
|
||||
loading="lazy"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="skin-match__content">
|
||||
<header class="skin-match__header">
|
||||
<h2 class="skin-match__heading">{{ heading | escape }}</h2>
|
||||
{% if subheading != blank %}
|
||||
<p class="skin-match__subheading">{{ subheading | escape }}</p>
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
<div class="skin-match__gallery">
|
||||
<div class="skin-match__photo skin-match__photo--serum">
|
||||
{% if section.settings.image_serum != blank %}
|
||||
{{
|
||||
section.settings.image_serum
|
||||
| image_url: width: 1400
|
||||
| image_tag:
|
||||
alt: serum_alt,
|
||||
widths: '400, 800, 1400',
|
||||
sizes: '(max-width: 1024px) 70vw, 480px',
|
||||
class: 'skin-match__image skin-match__image--serum',
|
||||
loading: 'lazy'
|
||||
}}
|
||||
{% else %}
|
||||
<img
|
||||
class="skin-match__image skin-match__image--serum"
|
||||
src="{{ 'skin-match-photo-serum.avif' | asset_url }}"
|
||||
alt="{{ serum_alt | escape }}"
|
||||
width="1333"
|
||||
height="2000"
|
||||
loading="lazy"
|
||||
>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="skin-match__photo skin-match__photo--dropper">
|
||||
{% if section.settings.image_dropper != blank %}
|
||||
{{
|
||||
section.settings.image_dropper
|
||||
| image_url: width: 1000
|
||||
| image_tag:
|
||||
alt: dropper_alt,
|
||||
widths: '320, 640, 1000',
|
||||
sizes: '(max-width: 1024px) 46vw, 320px',
|
||||
class: 'skin-match__image skin-match__image--dropper',
|
||||
loading: 'lazy'
|
||||
}}
|
||||
{% else %}
|
||||
<img
|
||||
class="skin-match__image skin-match__image--dropper"
|
||||
src="{{ 'skin-match-photo-dropper.avif' | asset_url }}"
|
||||
alt="{{ dropper_alt | escape }}"
|
||||
width="2498"
|
||||
height="3123"
|
||||
loading="lazy"
|
||||
>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="skin-match__photo skin-match__photo--cheek">
|
||||
{% if section.settings.image_cheek != blank %}
|
||||
{{
|
||||
section.settings.image_cheek
|
||||
| image_url: width: 1000
|
||||
| image_tag:
|
||||
alt: cheek_alt,
|
||||
widths: '320, 640, 1000',
|
||||
sizes: '(max-width: 1024px) 46vw, 320px',
|
||||
class: 'skin-match__image skin-match__image--cheek',
|
||||
loading: 'lazy'
|
||||
}}
|
||||
{% else %}
|
||||
<img
|
||||
class="skin-match__image skin-match__image--cheek"
|
||||
src="{{ 'skin-match-photo-cheek.avif' | asset_url }}"
|
||||
alt="{{ cheek_alt | escape }}"
|
||||
width="3043"
|
||||
height="3043"
|
||||
loading="lazy"
|
||||
>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="skin-match__photo skin-match__photo--jar">
|
||||
{% if section.settings.image_jar != blank %}
|
||||
{{
|
||||
section.settings.image_jar
|
||||
| image_url: width: 1600
|
||||
| image_tag:
|
||||
alt: jar_alt,
|
||||
widths: '480, 960, 1600',
|
||||
sizes: '(max-width: 1024px) 70vw, 480px',
|
||||
class: 'skin-match__image skin-match__image--jar',
|
||||
loading: 'lazy'
|
||||
}}
|
||||
{% else %}
|
||||
<img
|
||||
class="skin-match__image skin-match__image--jar"
|
||||
src="{{ 'skin-match-photo-jar.avif' | asset_url }}"
|
||||
alt="{{ jar_alt | escape }}"
|
||||
width="4096"
|
||||
height="2731"
|
||||
loading="lazy"
|
||||
>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="skin-match__body">
|
||||
<span class="skin-match__lead">{{ lead | escape }}</span><span class="skin-match__rest">. {{ 'skin_match.bridge' | t }} <strong>{{ 'skin_match.brand' | t }}</strong> {{ rest | escape }}</span>
|
||||
</p>
|
||||
|
||||
{% if section.settings.button_link != blank %}
|
||||
<a class="skin-match__button" href="{{ section.settings.button_link }}">
|
||||
{{ button_label | escape }}
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="skin-match__button">{{ button_label | escape }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% stylesheet %}
|
||||
.skin-match {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
padding-bottom: 75px;
|
||||
color: #000;
|
||||
background: #fff;
|
||||
font-family: Archivo, sans-serif;
|
||||
}
|
||||
|
||||
.skin-match__canvas {
|
||||
position: relative;
|
||||
width: min(1705px, calc(100% - 200px));
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
||||
.skin-match__blob {
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.skin-match__blob img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
height: 100%;
|
||||
object-fit: fill;
|
||||
}
|
||||
|
||||
.skin-match__blob--blue {
|
||||
top: 0;
|
||||
left: 64.81%;
|
||||
width: 18.01%;
|
||||
aspect-ratio: 307 / 300;
|
||||
}
|
||||
|
||||
.skin-match__blob--peach {
|
||||
top: 11.82%;
|
||||
left: 12.32%;
|
||||
width: 14.31%;
|
||||
aspect-ratio: 244 / 264;
|
||||
}
|
||||
|
||||
.skin-match__blob--peach img {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 108.2%;
|
||||
height: 92.42%;
|
||||
transform: translate(-50%, -50%) rotate(90deg);
|
||||
}
|
||||
|
||||
.skin-match__blob--green {
|
||||
top: 60.02%;
|
||||
left: 81.23%;
|
||||
width: 13.2%;
|
||||
aspect-ratio: 225 / 253;
|
||||
}
|
||||
|
||||
.skin-match__blob--pink {
|
||||
top: 70.05%;
|
||||
left: 2.11%;
|
||||
width: 16.3%;
|
||||
aspect-ratio: 278 / 266;
|
||||
}
|
||||
|
||||
.skin-match__content {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
padding: 37px 0 25px;
|
||||
}
|
||||
|
||||
.skin-match__heading {
|
||||
margin: 0;
|
||||
color: #000;
|
||||
font-family: "Roc Grotesk", Archivo, sans-serif;
|
||||
font-size: 30px;
|
||||
font-weight: 500;
|
||||
line-height: 1.15;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.skin-match__subheading {
|
||||
margin: 10px 0 0;
|
||||
color: #000;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.skin-match__gallery {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 3fr 3fr 2fr;
|
||||
gap: 30px;
|
||||
align-items: center;
|
||||
margin-top: 53px;
|
||||
padding-left: 0.88%;
|
||||
}
|
||||
|
||||
.skin-match__photo {
|
||||
position: relative;
|
||||
aspect-ratio: 1;
|
||||
overflow: hidden;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.skin-match__photo--cheek {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.skin-match__photo--serum {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.skin-match__photo--jar {
|
||||
order: 3;
|
||||
}
|
||||
|
||||
.skin-match__photo--dropper {
|
||||
order: 4;
|
||||
}
|
||||
|
||||
.skin-match__image {
|
||||
position: absolute;
|
||||
max-width: none;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.skin-match__image--serum {
|
||||
top: -25.21%;
|
||||
left: 0;
|
||||
width: 100.42%;
|
||||
}
|
||||
|
||||
.skin-match__image--jar {
|
||||
top: -8.33%;
|
||||
left: -49.38%;
|
||||
width: 208.75%;
|
||||
}
|
||||
|
||||
.skin-match__image--dropper {
|
||||
top: -7.71%;
|
||||
left: 0;
|
||||
width: 101.25%;
|
||||
}
|
||||
|
||||
.skin-match__image--cheek {
|
||||
top: 0;
|
||||
left: -2.71%;
|
||||
width: 103.75%;
|
||||
}
|
||||
|
||||
.skin-match__body {
|
||||
max-width: 990px;
|
||||
margin: 50px auto 0;
|
||||
color: #808181;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.skin-match__lead {
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.skin-match__rest strong {
|
||||
color: #000;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.skin-match__button {
|
||||
display: flex;
|
||||
width: 326px;
|
||||
height: 50px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 50px auto 0;
|
||||
padding: 15px;
|
||||
border-radius: 60px;
|
||||
background: #9dd6c7;
|
||||
color: #000;
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
line-height: normal;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.skin-match__button {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a.skin-match__button:hover {
|
||||
filter: brightness(0.96);
|
||||
}
|
||||
|
||||
a.skin-match__button:focus-visible {
|
||||
outline: 2px solid #000;
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@media (max-width: 1439px) {
|
||||
.skin-match__canvas {
|
||||
width: min(1705px, calc(100% - 80px));
|
||||
}
|
||||
|
||||
.skin-match__heading {
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.skin-match__subheading,
|
||||
.skin-match__body {
|
||||
font-size: 18px;
|
||||
line-height: 26px;
|
||||
}
|
||||
|
||||
.skin-match__gallery {
|
||||
gap: 20px;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.skin-match__body,
|
||||
.skin-match__button {
|
||||
margin-top: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.skin-match {
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
|
||||
.skin-match__canvas {
|
||||
width: min(382px, calc(100% - 30px));
|
||||
}
|
||||
|
||||
.skin-match__blob--blue {
|
||||
top: 3%;
|
||||
left: 58%;
|
||||
width: 42%;
|
||||
aspect-ratio: 199 / 194;
|
||||
}
|
||||
|
||||
.skin-match__blob--peach {
|
||||
top: 16%;
|
||||
left: -8%;
|
||||
width: 36%;
|
||||
aspect-ratio: 179 / 194;
|
||||
}
|
||||
|
||||
.skin-match__blob--green {
|
||||
top: 44%;
|
||||
left: 62%;
|
||||
width: 46%;
|
||||
aspect-ratio: 224 / 253;
|
||||
}
|
||||
|
||||
.skin-match__blob--pink {
|
||||
top: 62%;
|
||||
left: -18%;
|
||||
width: 52%;
|
||||
aspect-ratio: 246 / 236;
|
||||
}
|
||||
|
||||
.skin-match__content {
|
||||
padding: 0 0 8px;
|
||||
}
|
||||
|
||||
.skin-match__heading {
|
||||
font-size: 20px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.skin-match__subheading {
|
||||
max-width: 198px;
|
||||
margin-top: 10px;
|
||||
font-size: 14px;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.skin-match__gallery {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 10px;
|
||||
margin-top: 30px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.skin-match__photo--serum {
|
||||
order: 1;
|
||||
grid-column: 1 / -1;
|
||||
width: 65.45%;
|
||||
justify-self: center;
|
||||
}
|
||||
|
||||
.skin-match__photo--dropper {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.skin-match__photo--cheek {
|
||||
order: 3;
|
||||
}
|
||||
|
||||
.skin-match__photo--jar {
|
||||
order: 4;
|
||||
grid-column: 1 / -1;
|
||||
width: 65.45%;
|
||||
justify-self: center;
|
||||
}
|
||||
|
||||
.skin-match__body {
|
||||
max-width: none;
|
||||
margin-top: 30px;
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.skin-match__button {
|
||||
width: min(300px, 100%);
|
||||
height: 45px;
|
||||
margin-top: 30px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
{% endstylesheet %}
|
||||
|
||||
{% schema %}
|
||||
{
|
||||
"name": "t:skin_match.name",
|
||||
"tag": "section",
|
||||
"class": "skin-match-section",
|
||||
"disabled_on": {
|
||||
"groups": ["header", "footer"]
|
||||
},
|
||||
"settings": [
|
||||
{
|
||||
"type": "text",
|
||||
"id": "heading",
|
||||
"label": "t:skin_match.heading",
|
||||
"default": "¿Qué necesita tu piel hoy?"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "subheading",
|
||||
"label": "t:skin_match.subheading",
|
||||
"default": "Encuentra tu match de cuidado facial con Seasons."
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "lead",
|
||||
"label": "t:skin_match.lead",
|
||||
"default": "No necesitas ser experta en skincare para cuidar de ti"
|
||||
},
|
||||
{
|
||||
"type": "textarea",
|
||||
"id": "rest",
|
||||
"label": "t:skin_match.rest",
|
||||
"default": "te acompañamos a encontrar los productos ideales para tu rutina, según lo que tu rostro necesita y cómo quieres sentirte cada día."
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "button_label",
|
||||
"label": "t:skin_match.button_label",
|
||||
"default": "Buscar producto ideal"
|
||||
},
|
||||
{
|
||||
"type": "url",
|
||||
"id": "button_link",
|
||||
"label": "t:skin_match.button_link"
|
||||
},
|
||||
{
|
||||
"type": "image_picker",
|
||||
"id": "image_serum",
|
||||
"label": "t:skin_match.image_serum",
|
||||
"info": "t:skin_match.image_info"
|
||||
},
|
||||
{
|
||||
"type": "image_picker",
|
||||
"id": "image_jar",
|
||||
"label": "t:skin_match.image_jar",
|
||||
"info": "t:skin_match.image_info"
|
||||
},
|
||||
{
|
||||
"type": "image_picker",
|
||||
"id": "image_dropper",
|
||||
"label": "t:skin_match.image_dropper",
|
||||
"info": "t:skin_match.image_info"
|
||||
},
|
||||
{
|
||||
"type": "image_picker",
|
||||
"id": "image_cheek",
|
||||
"label": "t:skin_match.image_cheek",
|
||||
"info": "t:skin_match.image_info"
|
||||
}
|
||||
],
|
||||
"presets": [
|
||||
{
|
||||
"name": "t:skin_match.name"
|
||||
}
|
||||
]
|
||||
}
|
||||
{% endschema %}
|
||||
@@ -0,0 +1,784 @@
|
||||
{% liquid
|
||||
if section.settings.heading != blank
|
||||
assign heading = section.settings.heading
|
||||
else
|
||||
assign heading = 'testimonials.heading' | t
|
||||
endif
|
||||
|
||||
if section.settings.subheading != blank
|
||||
assign subheading = section.settings.subheading
|
||||
else
|
||||
assign subheading = 'testimonials.subheading' | t
|
||||
endif
|
||||
%}
|
||||
|
||||
<section
|
||||
class="testimonials full-width"
|
||||
id="Testimonials-{{ section.id }}"
|
||||
data-testimonials
|
||||
data-cart-add-url="{{ routes.cart_add_url }}.js"
|
||||
data-checkout-url="{{ routes.root_url }}checkout"
|
||||
>
|
||||
<img
|
||||
class="testimonials__blob"
|
||||
src="{{ 'testimonials-blob.avif' | asset_url }}"
|
||||
alt=""
|
||||
width="434"
|
||||
height="486"
|
||||
>
|
||||
|
||||
<div class="testimonials__header">
|
||||
<h2 class="testimonials__heading">{{ heading | escape }}</h2>
|
||||
{% if subheading != blank %}
|
||||
<p class="testimonials__subheading">{{ subheading | escape }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if section.blocks.size > 0 %}
|
||||
<div class="testimonials__stage">
|
||||
<div class="testimonials__copy">
|
||||
{% for block in section.blocks %}
|
||||
<div
|
||||
class="testimonials__slide"
|
||||
data-slide
|
||||
{{ block.shopify_attributes }}
|
||||
{% unless forloop.first %}hidden{% endunless %}
|
||||
>
|
||||
<div class="testimonials__meta">
|
||||
<div class="testimonials__stars" aria-label="{{ 'testimonials.rating' | t: rating: block.settings.rating }}">
|
||||
{% for index in (1..5) %}
|
||||
<span class="testimonials__star{% if index > block.settings.rating %} is-off{% endif %}" aria-hidden="true">
|
||||
<svg width="15" height="15" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.69531 9.39111C7.62954 9.39136 7.56536 9.37086 7.51191 9.33251L5 7.51142L2.48809 9.33251C2.43442 9.37144 2.36977 9.39228 2.30347 9.39204C2.23718 9.3918 2.17268 9.37048 2.1193 9.33117C2.06592 9.29186 2.02642 9.23659 2.00652 9.17335C1.98662 9.11011 1.98735 9.04218 2.00859 8.97939L2.98828 6.07763L0.449219 4.33642C0.394221 4.29874 0.352712 4.24447 0.330756 4.18153C0.3088 4.11858 0.307549 4.05027 0.327184 3.98656C0.34682 3.92285 0.386313 3.86709 0.439895 3.82743C0.493476 3.78777 0.558336 3.76628 0.625 3.7661H3.75742L4.70273 0.856925C4.7231 0.794117 4.76283 0.739373 4.81624 0.700546C4.86964 0.66172 4.93397 0.640807 5 0.640807C5.06603 0.640807 5.13036 0.66172 5.18376 0.700546C5.23717 0.739373 5.2769 0.794117 5.29727 0.856925L6.24258 3.76708H9.375C9.44175 3.76705 9.50675 3.78839 9.56049 3.82797C9.61423 3.86756 9.65389 3.92331 9.67365 3.98707C9.69341 4.05082 9.69223 4.11923 9.6703 4.18227C9.64837 4.24531 9.60682 4.29967 9.55176 4.33739L7.01172 6.07763L7.99082 8.97861C8.00668 9.02557 8.01115 9.07564 8.00384 9.12467C7.99653 9.17371 7.97766 9.2203 7.94879 9.2606C7.91992 9.3009 7.88188 9.33375 7.8378 9.35644C7.79373 9.37913 7.74489 9.39102 7.69531 9.39111Z" fill="currentColor"/>
|
||||
</svg>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if block.settings.author != blank %}
|
||||
<p class="testimonials__author">{{ block.settings.author | escape }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if block.settings.quote != blank %}
|
||||
<p class="testimonials__quote">{{ block.settings.quote | escape }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<div class="testimonials__nav">
|
||||
<button class="testimonials__arrow" type="button" data-prev aria-label="{{ 'testimonials.previous' | t }}">
|
||||
<span class="testimonials__arrow-icon" aria-hidden="true">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.375 9.53125L10 3.90625L15.625 9.53125M10 4.6875V16.0938" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
<button class="testimonials__arrow" type="button" data-next aria-label="{{ 'testimonials.next' | t }}">
|
||||
<span class="testimonials__arrow-icon testimonials__arrow-icon--next" aria-hidden="true">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.375 9.53125L10 3.90625L15.625 9.53125M10 4.6875V16.0938" stroke="black" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="testimonials__products">
|
||||
{% for block in section.blocks %}
|
||||
{% liquid
|
||||
assign slide_product = block.settings.product
|
||||
assign variant = blank
|
||||
assign card_image = blank
|
||||
assign hover_image = blank
|
||||
assign subtitle = blank
|
||||
assign show_compare = false
|
||||
if slide_product != blank
|
||||
assign variant = slide_product.selected_or_first_available_variant
|
||||
assign card_image = slide_product.featured_image
|
||||
for image in slide_product.images offset: 1 limit: 1
|
||||
assign hover_image = image
|
||||
endfor
|
||||
assign subtitle = slide_product.metafields.custom.subtitulo.value | default: slide_product.metafields.custom.subtitulo
|
||||
if subtitle == blank
|
||||
assign subtitle = slide_product.metafields.custom.subtitle.value | default: slide_product.metafields.custom.subtitle
|
||||
endif
|
||||
if subtitle == blank
|
||||
assign subtitle = slide_product.metafields.custom.presentacion.value | default: slide_product.metafields.custom.presentacion
|
||||
endif
|
||||
if subtitle == blank and variant.title != 'Default Title'
|
||||
assign subtitle = variant.title
|
||||
endif
|
||||
if variant.compare_at_price > variant.price
|
||||
assign show_compare = true
|
||||
endif
|
||||
endif
|
||||
%}
|
||||
<div class="testimonials__product" data-product {% unless forloop.first %}hidden{% endunless %}>
|
||||
{% if slide_product != blank %}
|
||||
<div class="testimonials__media">
|
||||
<a class="testimonials__media-link" href="{{ slide_product.url }}">
|
||||
{% if card_image %}
|
||||
{{
|
||||
card_image
|
||||
| image_url: width: 900
|
||||
| image_tag:
|
||||
alt: slide_product.title,
|
||||
widths: '300, 450, 700, 900',
|
||||
sizes: '(max-width: 1024px) 70px, 450px',
|
||||
class: 'testimonials__image',
|
||||
loading: 'lazy'
|
||||
}}
|
||||
{% endif %}
|
||||
{% if hover_image != blank %}
|
||||
{{
|
||||
hover_image
|
||||
| image_url: width: 900
|
||||
| image_tag:
|
||||
alt: '',
|
||||
widths: '300, 450, 700, 900',
|
||||
sizes: '(max-width: 1024px) 70px, 450px',
|
||||
class: 'testimonials__image testimonials__image--hover',
|
||||
loading: 'lazy'
|
||||
}}
|
||||
{% endif %}
|
||||
</a>
|
||||
|
||||
{% if variant != blank %}
|
||||
<form class="testimonials__actions testimonials__form" action="{{ routes.cart_add_url }}" method="post">
|
||||
<input type="hidden" name="id" value="{{ variant.id }}">
|
||||
<input type="hidden" name="quantity" value="1">
|
||||
<button
|
||||
class="testimonials__bag"
|
||||
type="submit"
|
||||
{% unless variant.available %}disabled{% endunless %}
|
||||
aria-label="{{ 'testimonials.add_to_cart' | t: product: slide_product.title }}"
|
||||
>
|
||||
<img src="{{ 'testimonials-bag.svg' | asset_url }}" alt="" width="25" height="25">
|
||||
</button>
|
||||
<button
|
||||
class="testimonials__buy"
|
||||
type="submit"
|
||||
data-buy
|
||||
{% unless variant.available %}disabled{% endunless %}
|
||||
>
|
||||
{% if variant.available %}
|
||||
{{ 'testimonials.buy' | t }}
|
||||
{% else %}
|
||||
{{ 'testimonials.sold_out' | t }}
|
||||
{% endif %}
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="testimonials__info">
|
||||
<a class="testimonials__title" href="{{ slide_product.url }}">{{ slide_product.title | escape }}</a>
|
||||
{% if subtitle != blank %}
|
||||
<p class="testimonials__subtitle">{{ subtitle | escape }}</p>
|
||||
{% endif %}
|
||||
<p class="testimonials__prices">
|
||||
<span class="testimonials__price">{{ variant.price | money_without_trailing_zeros }}</span>
|
||||
{% if show_compare %}
|
||||
<s class="testimonials__compare">{{ variant.compare_at_price | money_without_trailing_zeros }}</s>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
{% stylesheet %}
|
||||
.testimonials {
|
||||
position: relative;
|
||||
margin-top: 100px;
|
||||
padding-bottom: 100px;
|
||||
overflow: hidden;
|
||||
color: #000;
|
||||
font-family: Archivo, sans-serif;
|
||||
}
|
||||
|
||||
.testimonials__blob {
|
||||
position: absolute;
|
||||
top: 209px;
|
||||
left: 38px;
|
||||
width: 434px;
|
||||
height: auto;
|
||||
opacity: 0.3;
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.testimonials__header {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
padding-inline: 100px;
|
||||
}
|
||||
|
||||
.testimonials__heading {
|
||||
margin: 0;
|
||||
font-family: "Roc Grotesk", Archivo, sans-serif;
|
||||
font-size: 30px;
|
||||
font-weight: 500;
|
||||
line-height: normal;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.testimonials__subheading {
|
||||
margin: 10px 0 0;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.testimonials__stage {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 549fr) minmax(220px, 450px);
|
||||
column-gap: clamp(32px, 10vw, 199px);
|
||||
align-items: start;
|
||||
width: min(1198px, calc(100% - 200px));
|
||||
margin: 100px auto 0;
|
||||
}
|
||||
|
||||
.testimonials__slide[hidden],
|
||||
.testimonials__product[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.testimonials__meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.testimonials__stars {
|
||||
display: flex;
|
||||
gap: 1px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.testimonials__star {
|
||||
display: block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
.testimonials__star svg {
|
||||
display: block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
.testimonials__star.is-off {
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
.testimonials__author {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.testimonials__quote {
|
||||
max-width: 549px;
|
||||
margin: 60px 0 0;
|
||||
font-size: 35px;
|
||||
font-weight: 300;
|
||||
line-height: 45px;
|
||||
}
|
||||
|
||||
.testimonials__nav {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
margin-top: 155px;
|
||||
}
|
||||
|
||||
.testimonials__arrow {
|
||||
display: grid;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
place-items: center;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 60px;
|
||||
background: #9dd6c7;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.testimonials__arrow:disabled {
|
||||
cursor: default;
|
||||
opacity: 0.35;
|
||||
}
|
||||
|
||||
.testimonials__arrow-icon {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.testimonials__arrow-icon--next {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.testimonials__product {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.testimonials__media {
|
||||
position: relative;
|
||||
aspect-ratio: 1;
|
||||
overflow: hidden;
|
||||
border: 1px solid #eaeaea;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.testimonials__media-link {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.testimonials__image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.testimonials__image--hover {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
object-fit: cover;
|
||||
opacity: 0;
|
||||
transition: opacity 0.35s ease;
|
||||
}
|
||||
|
||||
.testimonials__media:hover .testimonials__image--hover,
|
||||
.testimonials__media:focus-within .testimonials__image--hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.testimonials__actions {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
bottom: 10px;
|
||||
left: 20px;
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
margin: 0;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 0.25s ease;
|
||||
}
|
||||
|
||||
.testimonials__media:hover .testimonials__actions,
|
||||
.testimonials__media:focus-within .testimonials__actions {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.testimonials__bag,
|
||||
.testimonials__buy {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 50px;
|
||||
padding: 15px;
|
||||
border: 0;
|
||||
border-radius: 60px;
|
||||
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.testimonials__bag {
|
||||
flex: 0 0 50px;
|
||||
width: 50px;
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.testimonials__bag img {
|
||||
display: block;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.testimonials__buy {
|
||||
flex: 1 1 auto;
|
||||
background: #9dd6c7;
|
||||
color: #000;
|
||||
font-family: Archivo, sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.testimonials__bag:disabled,
|
||||
.testimonials__buy:disabled {
|
||||
cursor: default;
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
.testimonials__title {
|
||||
display: block;
|
||||
color: #000;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
line-height: normal;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.testimonials__subtitle {
|
||||
margin: 5px 0 0;
|
||||
color: #808181;
|
||||
font-size: 14px;
|
||||
font-weight: 300;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.testimonials__prices {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 15px 0 0;
|
||||
}
|
||||
|
||||
.testimonials__price,
|
||||
.testimonials__compare {
|
||||
width: 70px;
|
||||
font-size: 16px;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.testimonials__price {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.testimonials__compare {
|
||||
color: #808181;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.testimonials__arrow:focus-visible,
|
||||
.testimonials__bag:focus-visible,
|
||||
.testimonials__buy:focus-visible,
|
||||
.testimonials__title:focus-visible,
|
||||
.testimonials__media-link:focus-visible {
|
||||
outline: 2px solid #000;
|
||||
outline-offset: 3px;
|
||||
}
|
||||
|
||||
@media (max-width: 1439px) {
|
||||
.testimonials__header {
|
||||
padding-inline: 40px;
|
||||
}
|
||||
|
||||
.testimonials__stage {
|
||||
width: min(1198px, calc(100% - 80px));
|
||||
}
|
||||
|
||||
.testimonials__blob {
|
||||
left: -40px;
|
||||
width: 280px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
.testimonials {
|
||||
margin-top: 50px;
|
||||
padding-bottom: 80px;
|
||||
}
|
||||
|
||||
.testimonials__blob {
|
||||
top: 80px;
|
||||
left: -30px;
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
.testimonials__header {
|
||||
padding-inline: 15px;
|
||||
}
|
||||
|
||||
.testimonials__heading {
|
||||
max-width: 320px;
|
||||
font-size: 22px;
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.testimonials__subheading {
|
||||
margin-top: 10px;
|
||||
font-size: 14px;
|
||||
line-height: 15px;
|
||||
}
|
||||
|
||||
.testimonials__stage {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: min(372px, calc(100% - 30px));
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.testimonials__copy {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.testimonials__slide {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.testimonials__products {
|
||||
order: 2;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.testimonials__nav {
|
||||
order: 3;
|
||||
justify-content: center;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.testimonials__star,
|
||||
.testimonials__star svg {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.testimonials__author {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.testimonials__quote {
|
||||
margin-top: 30px;
|
||||
font-size: 18px;
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.testimonials__product {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
width: min(297px, 100%);
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
||||
.testimonials__media {
|
||||
flex: 0 0 70px;
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
aspect-ratio: auto;
|
||||
}
|
||||
|
||||
.testimonials__actions {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.testimonials__title {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.testimonials__subtitle {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.testimonials__prices {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.testimonials__price,
|
||||
.testimonials__compare {
|
||||
width: auto;
|
||||
margin-right: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.testimonials__image--hover,
|
||||
.testimonials__actions {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
{% endstylesheet %}
|
||||
|
||||
{% javascript %}
|
||||
(() => {
|
||||
const setCartCount = (count) => {
|
||||
const link = document.querySelector('.header__cart');
|
||||
if (!link || count < 1) return;
|
||||
|
||||
let badge = link.querySelector('[data-cart-count]');
|
||||
if (!badge) {
|
||||
badge = document.createElement('span');
|
||||
badge.className = 'absolute right-0 top-0 flex h-4 min-w-4 items-center justify-center rounded-full bg-brand-mint px-[3px] text-[10px] font-medium leading-none text-black';
|
||||
badge.setAttribute('data-cart-count', '');
|
||||
link.appendChild(badge);
|
||||
}
|
||||
|
||||
badge.textContent = String(count);
|
||||
};
|
||||
|
||||
const boot = (root) => {
|
||||
if (root.dataset.ready === 'true') return;
|
||||
root.dataset.ready = 'true';
|
||||
|
||||
const slides = [...root.querySelectorAll('[data-slide]')];
|
||||
const products = [...root.querySelectorAll('[data-product]')];
|
||||
const prev = root.querySelector('[data-prev]');
|
||||
const next = root.querySelector('[data-next]');
|
||||
let index = 0;
|
||||
|
||||
const paint = () => {
|
||||
slides.forEach((slide, slideIndex) => {
|
||||
slide.hidden = slideIndex !== index;
|
||||
});
|
||||
products.forEach((product, productIndex) => {
|
||||
product.hidden = productIndex !== index;
|
||||
});
|
||||
if (prev) prev.disabled = index <= 0;
|
||||
if (next) next.disabled = index >= slides.length - 1;
|
||||
};
|
||||
|
||||
if (prev) {
|
||||
prev.addEventListener('click', () => {
|
||||
if (index <= 0) return;
|
||||
index -= 1;
|
||||
paint();
|
||||
});
|
||||
}
|
||||
|
||||
if (next) {
|
||||
next.addEventListener('click', () => {
|
||||
if (index >= slides.length - 1) return;
|
||||
index += 1;
|
||||
paint();
|
||||
});
|
||||
}
|
||||
|
||||
paint();
|
||||
};
|
||||
|
||||
const bootAll = (scope) => {
|
||||
scope.querySelectorAll('[data-testimonials]').forEach(boot);
|
||||
};
|
||||
|
||||
bootAll(document);
|
||||
document.addEventListener('shopify:section:load', (event) => {
|
||||
bootAll(event.target);
|
||||
});
|
||||
|
||||
if (!window.__seasonTestimonials) {
|
||||
window.__seasonTestimonials = true;
|
||||
document.addEventListener('submit', async (event) => {
|
||||
const form = event.target;
|
||||
if (!(form instanceof HTMLFormElement) || !form.classList.contains('testimonials__form')) return;
|
||||
const root = form.closest('[data-testimonials]');
|
||||
if (!root) return;
|
||||
event.preventDefault();
|
||||
|
||||
const button = event.submitter;
|
||||
if (button) button.disabled = true;
|
||||
|
||||
try {
|
||||
const response = await fetch(root.dataset.cartAddUrl, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
|
||||
body: JSON.stringify({
|
||||
id: form.querySelector('[name="id"]').value,
|
||||
quantity: 1,
|
||||
}),
|
||||
});
|
||||
const data = await response.json();
|
||||
if (response.ok) {
|
||||
if (button && button.hasAttribute('data-buy') && root.dataset.checkoutUrl) {
|
||||
window.location.href = root.dataset.checkoutUrl;
|
||||
return;
|
||||
}
|
||||
const cart = await fetch('/cart.js').then((result) => result.json());
|
||||
setCartCount(cart.item_count);
|
||||
} else if (data.description) {
|
||||
window.alert(data.description);
|
||||
}
|
||||
} catch (error) {
|
||||
window.alert(error.message);
|
||||
} finally {
|
||||
if (button) button.disabled = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
})();
|
||||
{% endjavascript %}
|
||||
|
||||
{% schema %}
|
||||
{
|
||||
"name": "t:testimonials.name",
|
||||
"tag": "section",
|
||||
"class": "testimonials-section",
|
||||
"disabled_on": {
|
||||
"groups": ["header", "footer"]
|
||||
},
|
||||
"settings": [
|
||||
{
|
||||
"type": "text",
|
||||
"id": "heading",
|
||||
"label": "t:testimonials.heading",
|
||||
"default": "Confianza que se construye con cada rutina"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "subheading",
|
||||
"label": "t:testimonials.subheading",
|
||||
"default": "+1,500 pieles ya encontraron su rutina Seasons"
|
||||
}
|
||||
],
|
||||
"blocks": [
|
||||
{
|
||||
"type": "review",
|
||||
"name": "t:testimonials.review",
|
||||
"settings": [
|
||||
{
|
||||
"type": "textarea",
|
||||
"id": "quote",
|
||||
"label": "t:testimonials.quote",
|
||||
"default": "Tengo piel sensible y atópica y es el único bloqueador que me cae bien, la sensación es increíble y he notado que se disminuyen súper rápido las marcas post acné, lo amo, la verdad 😌💕"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "author",
|
||||
"label": "t:testimonials.author",
|
||||
"default": "María José"
|
||||
},
|
||||
{
|
||||
"type": "range",
|
||||
"id": "rating",
|
||||
"label": "t:testimonials.rating_label",
|
||||
"min": 1,
|
||||
"max": 5,
|
||||
"step": 1,
|
||||
"default": 5
|
||||
},
|
||||
{
|
||||
"type": "product",
|
||||
"id": "product",
|
||||
"label": "t:testimonials.product"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"presets": [
|
||||
{
|
||||
"name": "t:testimonials.name",
|
||||
"blocks": [
|
||||
{ "type": "review" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
{% endschema %}
|
||||
Reference in New Issue
Block a user