diff --git a/.gitignore b/.gitignore index a638c16..51808d7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,8 @@ ehthumbs.db Thumbs.db node_modules/ +src/.generated-tailwind.css +src/.tailwind.min.css # Shopify CLI files .shopify/ diff --git a/assets/1-reel-ig.mp4 b/assets/1-reel-ig.mp4 new file mode 100644 index 0000000..af169a6 Binary files /dev/null and b/assets/1-reel-ig.mp4 differ diff --git a/assets/2-reel-ig.mp4 b/assets/2-reel-ig.mp4 new file mode 100644 index 0000000..e53de9d Binary files /dev/null and b/assets/2-reel-ig.mp4 differ diff --git a/assets/3-reel-ig.mp4 b/assets/3-reel-ig.mp4 new file mode 100644 index 0000000..4df2840 Binary files /dev/null and b/assets/3-reel-ig.mp4 differ diff --git a/assets/4-reel-ig.mp4 b/assets/4-reel-ig.mp4 new file mode 100644 index 0000000..e9ec2a5 Binary files /dev/null and b/assets/4-reel-ig.mp4 differ diff --git a/assets/5-reel-ig.mp4 b/assets/5-reel-ig.mp4 new file mode 100644 index 0000000..fa07b68 Binary files /dev/null and b/assets/5-reel-ig.mp4 differ diff --git a/assets/archivo-bold.woff2 b/assets/archivo-bold.woff2 new file mode 100644 index 0000000..1986e3c Binary files /dev/null and b/assets/archivo-bold.woff2 differ diff --git a/assets/archivo-light.woff2 b/assets/archivo-light.woff2 new file mode 100644 index 0000000..a4254b4 Binary files /dev/null and b/assets/archivo-light.woff2 differ diff --git a/assets/archivo-medium.woff2 b/assets/archivo-medium.woff2 new file mode 100644 index 0000000..77a014c Binary files /dev/null and b/assets/archivo-medium.woff2 differ diff --git a/assets/archivo-regular.woff2 b/assets/archivo-regular.woff2 new file mode 100644 index 0000000..4014518 Binary files /dev/null and b/assets/archivo-regular.woff2 differ diff --git a/assets/banner-antiedad.avif b/assets/banner-antiedad.avif new file mode 100644 index 0000000..3f087d7 Binary files /dev/null and b/assets/banner-antiedad.avif differ diff --git a/assets/banner-control-grasa.avif b/assets/banner-control-grasa.avif new file mode 100644 index 0000000..9be8595 Binary files /dev/null and b/assets/banner-control-grasa.avif differ diff --git a/assets/banner-hidratantes.avif b/assets/banner-hidratantes.avif new file mode 100644 index 0000000..b3ffb7f Binary files /dev/null and b/assets/banner-hidratantes.avif differ diff --git a/assets/banner-kits.avif b/assets/banner-kits.avif new file mode 100644 index 0000000..dc5fb72 Binary files /dev/null and b/assets/banner-kits.avif differ diff --git a/assets/banner-limpiadores.avif b/assets/banner-limpiadores.avif new file mode 100644 index 0000000..79d5920 Binary files /dev/null and b/assets/banner-limpiadores.avif differ diff --git a/assets/banner-manchas.avif b/assets/banner-manchas.avif new file mode 100644 index 0000000..9ffb52a Binary files /dev/null and b/assets/banner-manchas.avif differ diff --git a/assets/banner-mascarillas.avif b/assets/banner-mascarillas.avif new file mode 100644 index 0000000..5bbd0b4 Binary files /dev/null and b/assets/banner-mascarillas.avif differ diff --git a/assets/banner-piel-grasa.avif b/assets/banner-piel-grasa.avif new file mode 100644 index 0000000..918cabc Binary files /dev/null and b/assets/banner-piel-grasa.avif differ diff --git a/assets/banner-piel-mixta-grasa.avif b/assets/banner-piel-mixta-grasa.avif new file mode 100644 index 0000000..f8baf71 Binary files /dev/null and b/assets/banner-piel-mixta-grasa.avif differ diff --git a/assets/banner-piel-seca.avif b/assets/banner-piel-seca.avif new file mode 100644 index 0000000..1d363c3 Binary files /dev/null and b/assets/banner-piel-seca.avif differ diff --git a/assets/banner-preocupacion-acne.avif b/assets/banner-preocupacion-acne.avif new file mode 100644 index 0000000..fd55468 Binary files /dev/null and b/assets/banner-preocupacion-acne.avif differ diff --git a/assets/banner-preocupacion-hidratacion.avif b/assets/banner-preocupacion-hidratacion.avif new file mode 100644 index 0000000..f49d4a0 Binary files /dev/null and b/assets/banner-preocupacion-hidratacion.avif differ diff --git a/assets/banner-proteccion-solar.avif b/assets/banner-proteccion-solar.avif new file mode 100644 index 0000000..da3c5d6 Binary files /dev/null and b/assets/banner-proteccion-solar.avif differ diff --git a/assets/banner-protectores.avif b/assets/banner-protectores.avif new file mode 100644 index 0000000..894fbd9 Binary files /dev/null and b/assets/banner-protectores.avif differ diff --git a/assets/banner-serums.avif b/assets/banner-serums.avif new file mode 100644 index 0000000..44eac15 Binary files /dev/null and b/assets/banner-serums.avif differ diff --git a/assets/banner-todos-productos.avif b/assets/banner-todos-productos.avif new file mode 100644 index 0000000..f5b76b3 Binary files /dev/null and b/assets/banner-todos-productos.avif differ diff --git a/assets/bestsellers-promo-sm.avif b/assets/bestsellers-promo-sm.avif new file mode 100644 index 0000000..c517319 Binary files /dev/null and b/assets/bestsellers-promo-sm.avif differ diff --git a/assets/bestsellers-promo.avif b/assets/bestsellers-promo.avif index 4507c4a..0dcd1e6 100644 Binary files a/assets/bestsellers-promo.avif and b/assets/bestsellers-promo.avif differ diff --git a/assets/critical.css b/assets/critical.css index 4d7bb40..fdb258a 100644 --- a/assets/critical.css +++ b/assets/critical.css @@ -121,3 +121,81 @@ body { opacity: 0; } } + +/* Hero paints before the bundled stylesheet arrives. */ +.hero { + position: relative; + width: 100%; + min-height: 650px; + overflow: hidden; + color: #fff; + background: #c8c2bc; +} + +.hero__media { + position: absolute; + inset: 0; +} + +.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__content { + position: relative; + z-index: 2; + display: flex; + min-height: 650px; + padding: 104px 160px 80px 100px; +} + +.hero__title { + margin: 0; + color: #fff; + font-family: Archivo, sans-serif; + font-size: 70px; + font-weight: 500; + line-height: 69px; + text-transform: uppercase; +} + +.hero__title-line { + display: block; +} + +.hero__title-line--light { + font-weight: 300; +} + +.hero__title-line--medium { + font-weight: 500; +} + +@media (max-width: 1023px) { + .hero, + .hero__content { + min-height: 550px; + } + + .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; + } +} diff --git a/assets/distributors-photo-sm.avif b/assets/distributors-photo-sm.avif new file mode 100644 index 0000000..92fbc0f Binary files /dev/null and b/assets/distributors-photo-sm.avif differ diff --git a/assets/favicon-seasons.png b/assets/favicon-seasons.png new file mode 100644 index 0000000..94697d7 Binary files /dev/null and b/assets/favicon-seasons.png differ diff --git a/assets/learn-cover-1-sm.avif b/assets/learn-cover-1-sm.avif new file mode 100644 index 0000000..708fe95 Binary files /dev/null and b/assets/learn-cover-1-sm.avif differ diff --git a/assets/learn-cover-1.avif b/assets/learn-cover-1.avif index 3d93c1d..7abf799 100644 Binary files a/assets/learn-cover-1.avif and b/assets/learn-cover-1.avif differ diff --git a/assets/learn-cover-2-sm.avif b/assets/learn-cover-2-sm.avif new file mode 100644 index 0000000..4983778 Binary files /dev/null and b/assets/learn-cover-2-sm.avif differ diff --git a/assets/learn-cover-2.avif b/assets/learn-cover-2.avif index cfe2e92..a8ae952 100644 Binary files a/assets/learn-cover-2.avif and b/assets/learn-cover-2.avif differ diff --git a/assets/learn-cover-4-sm.avif b/assets/learn-cover-4-sm.avif new file mode 100644 index 0000000..7465a7e Binary files /dev/null and b/assets/learn-cover-4-sm.avif differ diff --git a/assets/learn-cover-4.avif b/assets/learn-cover-4.avif index ede78c0..a3cc252 100644 Binary files a/assets/learn-cover-4.avif and b/assets/learn-cover-4.avif differ diff --git a/assets/learn-cover-5-sm.avif b/assets/learn-cover-5-sm.avif new file mode 100644 index 0000000..90c2814 Binary files /dev/null and b/assets/learn-cover-5-sm.avif differ diff --git a/assets/learn-cover-5.avif b/assets/learn-cover-5.avif index 11f6094..3a374f4 100644 Binary files a/assets/learn-cover-5.avif and b/assets/learn-cover-5.avif differ diff --git a/assets/menu-categoria-bloqueadores.webp b/assets/menu-categoria-bloqueadores.webp new file mode 100644 index 0000000..f6d3a39 Binary files /dev/null and b/assets/menu-categoria-bloqueadores.webp differ diff --git a/assets/menu-categoria-hidratantes.webp b/assets/menu-categoria-hidratantes.webp new file mode 100644 index 0000000..4ba3432 Binary files /dev/null and b/assets/menu-categoria-hidratantes.webp differ diff --git a/assets/menu-categoria-limpiadores.webp b/assets/menu-categoria-limpiadores.webp new file mode 100644 index 0000000..6b46d56 Binary files /dev/null and b/assets/menu-categoria-limpiadores.webp differ diff --git a/assets/menu-categoria-mascarillas.webp b/assets/menu-categoria-mascarillas.webp new file mode 100644 index 0000000..abc3c96 Binary files /dev/null and b/assets/menu-categoria-mascarillas.webp differ diff --git a/assets/menu-categoria-serums.webp b/assets/menu-categoria-serums.webp new file mode 100644 index 0000000..8dd3baa Binary files /dev/null and b/assets/menu-categoria-serums.webp differ diff --git a/assets/menu-categoria-todos.webp b/assets/menu-categoria-todos.webp new file mode 100644 index 0000000..1e2353b Binary files /dev/null and b/assets/menu-categoria-todos.webp differ diff --git a/assets/menu-piel-grasa.webp b/assets/menu-piel-grasa.webp new file mode 100644 index 0000000..0349be5 Binary files /dev/null and b/assets/menu-piel-grasa.webp differ diff --git a/assets/menu-piel-mixta.webp b/assets/menu-piel-mixta.webp new file mode 100644 index 0000000..b00e83f Binary files /dev/null and b/assets/menu-piel-mixta.webp differ diff --git a/assets/menu-piel-seca.webp b/assets/menu-piel-seca.webp new file mode 100644 index 0000000..44507ec Binary files /dev/null and b/assets/menu-piel-seca.webp differ diff --git a/assets/menu-preocupacion-acne.webp b/assets/menu-preocupacion-acne.webp new file mode 100644 index 0000000..e57b98a Binary files /dev/null and b/assets/menu-preocupacion-acne.webp differ diff --git a/assets/menu-preocupacion-antiedad.webp b/assets/menu-preocupacion-antiedad.webp new file mode 100644 index 0000000..fed664f Binary files /dev/null and b/assets/menu-preocupacion-antiedad.webp differ diff --git a/assets/menu-preocupacion-grasa.webp b/assets/menu-preocupacion-grasa.webp new file mode 100644 index 0000000..de8b17b Binary files /dev/null and b/assets/menu-preocupacion-grasa.webp differ diff --git a/assets/menu-preocupacion-hidratacion.webp b/assets/menu-preocupacion-hidratacion.webp new file mode 100644 index 0000000..a1aa6a4 Binary files /dev/null and b/assets/menu-preocupacion-hidratacion.webp differ diff --git a/assets/menu-preocupacion-manchas.webp b/assets/menu-preocupacion-manchas.webp new file mode 100644 index 0000000..dd50d19 Binary files /dev/null and b/assets/menu-preocupacion-manchas.webp differ diff --git a/assets/menu-preocupacion-solar.webp b/assets/menu-preocupacion-solar.webp new file mode 100644 index 0000000..3d3b0bf Binary files /dev/null and b/assets/menu-preocupacion-solar.webp differ diff --git a/assets/menu-rutina-hidrata.webp b/assets/menu-rutina-hidrata.webp new file mode 100644 index 0000000..61b8782 Binary files /dev/null and b/assets/menu-rutina-hidrata.webp differ diff --git a/assets/menu-rutina-kits.webp b/assets/menu-rutina-kits.webp new file mode 100644 index 0000000..60b186f Binary files /dev/null and b/assets/menu-rutina-kits.webp differ diff --git a/assets/menu-rutina-limpia.webp b/assets/menu-rutina-limpia.webp new file mode 100644 index 0000000..f1832af Binary files /dev/null and b/assets/menu-rutina-limpia.webp differ diff --git a/assets/menu-rutina-protege.webp b/assets/menu-rutina-protege.webp new file mode 100644 index 0000000..220252e Binary files /dev/null and b/assets/menu-rutina-protege.webp differ diff --git a/assets/menu-rutina-trata.webp b/assets/menu-rutina-trata.webp new file mode 100644 index 0000000..501ccf4 Binary files /dev/null and b/assets/menu-rutina-trata.webp differ diff --git a/assets/nuevos-productos.mp4 b/assets/nuevos-productos.mp4 new file mode 100644 index 0000000..34f905b Binary files /dev/null and b/assets/nuevos-productos.mp4 differ diff --git a/assets/reel1.jpg b/assets/reel1.jpg new file mode 100644 index 0000000..6043c83 Binary files /dev/null and b/assets/reel1.jpg differ diff --git a/assets/routine-hidrata-sm.avif b/assets/routine-hidrata-sm.avif new file mode 100644 index 0000000..ed89f98 Binary files /dev/null and b/assets/routine-hidrata-sm.avif differ diff --git a/assets/routine-limpia-sm.avif b/assets/routine-limpia-sm.avif new file mode 100644 index 0000000..7f27223 Binary files /dev/null and b/assets/routine-limpia-sm.avif differ diff --git a/assets/routine-photo-sm.avif b/assets/routine-photo-sm.avif new file mode 100644 index 0000000..282173d Binary files /dev/null and b/assets/routine-photo-sm.avif differ diff --git a/assets/routine-photo.avif b/assets/routine-photo.avif index e8ce662..fd3cdea 100644 Binary files a/assets/routine-photo.avif and b/assets/routine-photo.avif differ diff --git a/assets/routine-protege-sm.avif b/assets/routine-protege-sm.avif new file mode 100644 index 0000000..0569914 Binary files /dev/null and b/assets/routine-protege-sm.avif differ diff --git a/assets/routine-trata-sm.avif b/assets/routine-trata-sm.avif new file mode 100644 index 0000000..1f1e762 Binary files /dev/null and b/assets/routine-trata-sm.avif differ diff --git a/assets/routine-trata.avif b/assets/routine-trata.avif index 43e88c5..6f8deaf 100644 Binary files a/assets/routine-trata.avif and b/assets/routine-trata.avif differ diff --git a/assets/skin-match-photo-cheek-sm.avif b/assets/skin-match-photo-cheek-sm.avif new file mode 100644 index 0000000..b493cd3 Binary files /dev/null and b/assets/skin-match-photo-cheek-sm.avif differ diff --git a/assets/skin-match-photo-cheek.avif b/assets/skin-match-photo-cheek.avif index cb988e9..ca294fd 100644 Binary files a/assets/skin-match-photo-cheek.avif and b/assets/skin-match-photo-cheek.avif differ diff --git a/assets/skin-match-photo-dropper-sm.avif b/assets/skin-match-photo-dropper-sm.avif new file mode 100644 index 0000000..233d476 Binary files /dev/null and b/assets/skin-match-photo-dropper-sm.avif differ diff --git a/assets/skin-match-photo-dropper.avif b/assets/skin-match-photo-dropper.avif index 6944cf8..9c01c2b 100644 Binary files a/assets/skin-match-photo-dropper.avif and b/assets/skin-match-photo-dropper.avif differ diff --git a/assets/skin-match-photo-jar-sm.avif b/assets/skin-match-photo-jar-sm.avif new file mode 100644 index 0000000..68482de Binary files /dev/null and b/assets/skin-match-photo-jar-sm.avif differ diff --git a/assets/skin-match-photo-jar.avif b/assets/skin-match-photo-jar.avif index dcd8d9d..c64a723 100644 Binary files a/assets/skin-match-photo-jar.avif and b/assets/skin-match-photo-jar.avif differ diff --git a/assets/skin-match-photo-serum-sm.avif b/assets/skin-match-photo-serum-sm.avif new file mode 100644 index 0000000..f8261f3 Binary files /dev/null and b/assets/skin-match-photo-serum-sm.avif differ diff --git a/assets/skin-match-photo-serum.avif b/assets/skin-match-photo-serum.avif index b937b78..09be68e 100644 Binary files a/assets/skin-match-photo-serum.avif and b/assets/skin-match-photo-serum.avif differ diff --git a/assets/tailwind.css b/assets/tailwind.css deleted file mode 100644 index 877f6d1..0000000 --- a/assets/tailwind.css +++ /dev/null @@ -1 +0,0 @@ -*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-full{top:100%}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.col-span-5{grid-column:span 5/span 5}.col-start-1{grid-column-start:1}.col-start-2{grid-column-start:2}.col-start-4{grid-column-start:4}.col-start-5{grid-column-start:5}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.row-start-2{grid-row-start:2}.m-0{margin:0}.mr-5{margin-right:1.25rem}.mr-\[50px\]{margin-right:50px}.mt-\[15px\]{margin-top:15px}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.size-10{width:2.5rem;height:2.5rem}.size-\[10px\]{width:10px;height:10px}.size-\[30px\]{width:30px;height:30px}.size-\[45px\]{width:45px;height:45px}.h-4{height:1rem}.h-\[50px\]{height:50px}.h-\[55px\]{height:55px}.h-auto{height:auto}.w-\[223px\]{width:223px}.w-full{width:100%}.min-w-0{min-width:0}.min-w-4{min-width:1rem}.min-w-\[220px\]{min-width:220px}.max-w-\[699px\]{max-width:699px}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-\[auto_minmax\(0\2c 699px\)_1fr_auto_auto\]{grid-template-columns:auto minmax(0,699px) 1fr auto auto}.grid-cols-subgrid{grid-template-columns:subgrid}.grid-rows-subgrid{grid-template-rows:subgrid}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-center{align-items:center}.justify-center{justify-content:center}.gap-10{gap:2.5rem}.gap-2\.5{gap:.625rem}.gap-5{gap:1.25rem}.gap-\[15px\]{gap:15px}.gap-\[50px\]{gap:50px}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-0{border-width:0}.border-solid{border-style:solid}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity,1))}.bg-black\/40{background-color:rgba(0,0,0,.4)}.bg-brand-cloud{--tw-bg-opacity:1;background-color:rgb(248 248 248/var(--tw-bg-opacity,1))}.bg-brand-mint{--tw-bg-opacity:1;background-color:rgb(157 214 199/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.p-0{padding:0}.p-2{padding:.5rem}.p-\[5px\]{padding:5px}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-\[100px\]{padding-left:100px;padding-right:100px}.px-\[3px\]{padding-left:3px;padding-right:3px}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pt-\[15px\]{padding-top:15px}.text-center{text-align:center}.font-sans{font-family:Archivo,sans-serif}.text-\[10px\]{font-size:10px}.text-\[14px\]{font-size:14px}.text-\[16px\]{font-size:16px}.text-\[20px\]{font-size:20px}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-none{line-height:1}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.no-underline{text-decoration-line:none}.shadow-\[0_12px_40px_rgba\(0\2c 0\2c 0\2c 0\.08\)\]{--tw-shadow:0 12px 40px rgba(0,0,0,.08);--tw-shadow-colored:0 12px 40px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.placeholder\:font-light::-moz-placeholder{font-weight:300}.placeholder\:font-light::placeholder{font-weight:300}.placeholder\:text-brand-placeholder::-moz-placeholder{--tw-text-opacity:1;color:rgb(191 189 190/var(--tw-text-opacity,1))}.placeholder\:text-brand-placeholder::placeholder{--tw-text-opacity:1;color:rgb(191 189 190/var(--tw-text-opacity,1))}.hover\:bg-brand-cloud:hover{--tw-bg-opacity:1;background-color:rgb(248 248 248/var(--tw-bg-opacity,1))}.focus-visible\:outline:focus-visible{outline-style:solid}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-offset-4:focus-visible{outline-offset:4px}.focus-visible\:outline-black:focus-visible{outline-color:#000}@media (max-width:1439px){.xxl\:mr-8{margin-right:2rem}.xxl\:gap-6{gap:1.5rem}.xxl\:gap-8{gap:2rem}.xxl\:px-10{padding-left:2.5rem;padding-right:2.5rem}}@media (max-width:1119px){.xl\:text-\[14px\]{font-size:14px}} \ No newline at end of file diff --git a/blocks/group.liquid b/blocks/group.liquid index baea31c..ffc5354 100644 --- a/blocks/group.liquid +++ b/blocks/group.liquid @@ -22,27 +22,7 @@ {% content_for 'blocks' %} -{% stylesheet %} - .group { - display: flex; - flex-wrap: nowrap; - overflow: hidden; - width: 100%; - } - .group--horizontal { - flex-direction: row; - justify-content: space-between; - align-items: center; - padding: 0 var(--padding); - } - - .group--vertical { - flex-direction: column; - align-items: var(--alignment); - padding: var(--padding) 0; - } -{% endstylesheet %} {% schema %} { diff --git a/blocks/text.liquid b/blocks/text.liquid index b985c38..e411be8 100644 --- a/blocks/text.liquid +++ b/blocks/text.liquid @@ -13,18 +13,7 @@ {{ block.settings.text }} -{% stylesheet %} - .text { - text-align: var(--text-align); - } - .text--title { - font-size: 2rem; - font-weight: 700; - } - .text--subtitle { - font-size: 1.5rem; - } -{% endstylesheet %} + {% schema %} { diff --git a/config/settings_data.json b/config/settings_data.json index 512f358..5f2e1c9 100644 --- a/config/settings_data.json +++ b/config/settings_data.json @@ -1,12 +1 @@ -/* - * ------------------------------------------------------------ - * IMPORTANT: The contents of this file are auto-generated. - * - * This file may be updated by the Shopify admin theme editor - * or related systems. Please exercise caution as any changes - * made to this file may be overwritten. - * ------------------------------------------------------------ - */ -{ - "current": {} -} +{"current":{}} \ No newline at end of file diff --git a/config/settings_schema.json b/config/settings_schema.json index 7bebd3c..2d8fdaf 100644 --- a/config/settings_schema.json +++ b/config/settings_schema.json @@ -64,5 +64,23 @@ "default": 4 } ] + }, + { + "name": "SEO", + "settings": [ + { + "type": "image_picker", + "id": "favicon", + "label": "Favicon", + "info": "PNG cuadrado, mínimo 192 × 192 px. Vacío = ícono Seasons por defecto." + }, + { + "type": "textarea", + "id": "default_meta_description", + "label": "Meta descripción por defecto", + "default": "Skincare mexicano con ingredientes naturales: protectores solares, sérums, hidratantes y limpiadores para cada tipo de piel. Encuentra tu rutina Seasons.", + "info": "Se usa en páginas sin descripción propia (inicio, colecciones sin descripción). Máx. ~155 caracteres." + } + ] } -] +] \ No newline at end of file diff --git a/layout/password.liquid b/layout/password.liquid index 23105ce..abf5711 100644 --- a/layout/password.liquid +++ b/layout/password.liquid @@ -4,8 +4,7 @@ {% # Inlined CSS Variables %} {% render 'css-variables' %} - {% # Load and preload the critical CSS %} - {{ 'critical.css' | asset_url | stylesheet_tag: preload: true }} + {% render 'tailwind-css' %} {% # Social, title, etc. %} {% render 'meta-tags' %} diff --git a/layout/theme.liquid b/layout/theme.liquid index 8f507ce..683240d 100644 --- a/layout/theme.liquid +++ b/layout/theme.liquid @@ -1,19 +1,23 @@ - + {% # Inlined CSS Variables %} {% render 'css-variables' %} - {% # Load and preload the critical CSS %} - {{ 'critical.css' | asset_url | stylesheet_tag: preload: true }} + {% # Tailwind v3 bundle: reset, utilities, and component CSS, minified %} + {% render 'tailwind-css' %} {% render 'font-faces' %} - {{ 'tailwind.css' | asset_url | stylesheet_tag }} {% # Social, title, etc. %} {% render 'meta-tags' %} {% capture shopify_header %}{{ content_for_header }}{% endcapture %} {% render 'delay-header-scripts', html: shopify_header %} + {% # WhatsApp coupon widget host: warm up the connection early %} + {%- unless request.design_mode %} + + + {%- endunless %} @@ -33,5 +37,6 @@ {% endif %} + {% render 'whatsapp-coupon-widget' %} diff --git a/locales/en.default.json b/locales/en.default.json index e367464..1d25dce 100644 --- a/locales/en.default.json +++ b/locales/en.default.json @@ -14,19 +14,97 @@ "back_to_shopping": "Back to shopping" }, "blog": { - "article_comments": "Comments", - "article_metadata_html": "{{ date }} by {{ author }}", - "comment_form_body": "Comment", - "comment_form_email": "Email", - "comment_form_name": "Name", - "comment_form_submit": "Post", - "comment_form_title": "Add a comment" + "all": "Todas", + "article_comments": "Comentarios", + "article_metadata_html": "{{ date }} por {{ author }}", + "back": "Volver a {{ blog }}", + "breadcrumb": "Migas de pan", + "comment_form_body": "Comentario", + "comment_form_email": "Correo electrónico", + "comment_form_name": "Nombre", + "comment_form_submit": "Publicar", + "comment_form_title": "Escribe un comentario", + "comment_success": "Tu comentario se publicó.", + "copied": "Enlace copiado", + "copy_link": "Copiar enlace", + "empty": "No hay artículos por ahora.", + "home": "Inicio", + "next": "Siguiente", + "page": "Página {{ page }}", + "pagination": "Paginación", + "previous": "Anterior", + "read_more": "— Leer más", + "related": "También te puede interesar", + "share": "Compartir", + "view_all": "Ver todo" + }, + "about": { + "hero_title": "Nuestro propósito", + "hero_line_1": "Acompañar a las personas a", + "hero_emphasis_1": "reconocerse, sentirse", + "hero_and": "y", + "hero_emphasis_2": "celebrarse", + "hero_line_3": "en cada una de sus temporadas.", + "play": "Reproducir video", + "pillars_title": "Creamos skincare hecho en México con estándares globales.", + "pillar_1_title": "Inspirados y desarrollados para piel latina", + "pillar_1_text": "Creamos productos pensados para las necesidades reales de la piel latina, considerando su diversidad de tonos, climas y estilos de vida.", + "pillar_2_title": "Unimos ciencia con ingredientes naturales", + "pillar_2_text": "Formulamos con activos respaldados por la ciencia, potenciados con ingredientes naturales que maximizan resultados sin comprometer la salud de la piel. Es el equilibrio perfecto entre innovación y naturaleza.", + "pillar_3_title": "Skinmalismo con productos multipropósito", + "pillar_3_text": "Creemos en menos pasos, mejores resultados: desarrollamos productos multifuncionales que simplifican la rutina sin sacrificar eficacia.", + "pillar_4_title": "Rutina de 4 pasos", + "pillar_4_text": "Estructuramos el cuidado de la piel en una rutina clara de 4 pasos, fácil de seguir y adaptable a cualquier estilo de vida. Esto permite constancia, mejores resultados y una experiencia sin complicaciones.", + "values_title": "Lo que somos", + "value_1": "Textura ligera", + "value_2": "Cruelty-free", + "value_3": "Love your skin", + "facts_title": "Sobre", + "facts_brand": "Seasons", + "facts_intro": "Seasons (Seasons Love Your Skin) es una marca mexicana de dermocosmética fundada en 2012 en Guadalajara, Jalisco. Con desarrollo de fórmulas y manufactura propias en Zapopan, Jalisco, creamos skincare hecho en México, vegano y cruelty-free, que une ciencia dermatológica con ingredientes naturales para la piel latina.", + "fact_1_title": "Fundación", + "fact_1_text": "Marca mexicana fundada en 2012 en Guadalajara, Jalisco, México.", + "fact_2_title": "Hecho en México", + "fact_2_text": "Desarrollo de fórmulas y manufactura propias en Zapopan, Jalisco. Productos hechos en México.", + "fact_3_title": "Veganas y cruelty-free", + "fact_3_text": "Fórmulas 100% veganas (sin ingredientes de origen animal) y libres de crueldad animal (no testeadas en animales).", + "fact_4_title": "Ciencia + naturaleza", + "fact_4_text": "Unimos la ciencia dermatológica con ingredientes naturales y activos de alta eficacia para las necesidades reales de la piel latina.", + "fact_5_title": "Activos clave", + "fact_5_text": "Niacinamida, ácido hialurónico, vitamina C, vitamina E, retinol, ácido salicílico, coenzima Q10 y péptidos, con extractos botánicos (manzana verde, nopal, té verde, aloe, avena y más).", + "fact_6_title": "Portafolio", + "fact_6_text": "Más de 30 productos organizados por necesidad de piel, bajo un sistema de 4 pasos: 01. Limpia · 02. Trata · 03. Hidrata · 04. Protege.", + "fact_7_title": "Certificación sanitaria", + "fact_7_text": "Aviso de Funcionamiento COFEPRIS 2314105019X00941 · Aviso de Publicidad COFEPRIS 2314102002D00053. Sellos de vegano, cruelty-free y envase reciclable.", + "fact_8_title": "Dónde encontrarnos", + "fact_8_text": "Tienda oficial seasonsmexico.com (con Glow Army), Liverpool, Amazon, Mercado Libre y TikTok Shop, además de una red nacional de distribuidoras, cosmetólogas y spas.", + "press": "Reconocida en medios como Grazia México y Latinoamérica como marca de belleza mexicana cruelty-free.", + "stores_title": "Encuentra productos Seasons cerca de ti.", + "stores_text": "Estás a un clic de tu rutina, en tu marketplace favorito o en tiendas físicas.", + "stores_button": "Consultar ubicaciones", + "faq_title": "Preguntas frecuentes sobre Seasons", + "faq_1_q": "¿Dónde se fabrica Seasons?", + "faq_1_a": "En instalaciones de manufactura propias en Zapopan, Jalisco, México. Por eso nuestros productos son hechos en México, con control de la fórmula y la calidad de principio a fin.", + "faq_2_q": "¿Los productos son veganos y cruelty-free?", + "faq_2_a": "Sí. Nuestras fórmulas son 100% veganas (sin ingredientes de origen animal) y libres de crueldad animal: no se testean en animales.", + "faq_3_q": "¿Seasons cuenta con registro ante COFEPRIS?", + "faq_3_a": "Sí. Contamos con Aviso de Funcionamiento COFEPRIS 2314105019X00941 y Aviso de Publicidad COFEPRIS 2314102002D00053, requeridos para la comercialización de nuestros productos.", + "faq_4_q": "¿Para quién están pensadas las fórmulas?", + "faq_4_a": "Para la piel latina. Unimos ciencia dermatológica con ingredientes naturales, considerando la diversidad de tonos, climas y estilos de vida de nuestra piel.", + "faq_5_q": "¿Cómo es la rutina Seasons?", + "faq_5_a": "Un sistema sencillo de 4 pasos: 01. Limpia, 02. Trata, 03. Hidrata y 04. Protege, con más de 30 productos organizados por necesidad de piel.", + "faq_6_q": "¿Dónde puedo comprar Seasons?", + "faq_6_a": "En nuestra tienda oficial seasonsmexico.com (con el programa de lealtad Glow Army), en Liverpool, y en Amazon, Mercado Libre y TikTok Shop. También a través de nuestra red de distribuidoras, cosmetólogas y spas.", + "join_title": "Crezcamos juntos", + "join_text": "Buscamos socios que compartan nuestra visión de bienestar y cuidado consciente. Únete a Seasons y construyamos juntos una experiencia de valor para más personas.", + "join_button": "Distribuidores" }, "cart": { - "checkout": "Checkout", - "title": "Cart", - "update": "Update", - "remove": "Remove" + "checkout": "Finalizar pedido", + "title": "Su carrito", + "update": "Actualizar", + "remove": "Eliminar", + "continue": "Seguir comprando" }, "cart_drawer": { "recommendations": "También te recomiendo", @@ -38,6 +116,7 @@ "unlocked": "Ya tienes envío gratis", "shipping_progress": "Progreso hacia el envío gratis", "add": "Agregar al carrito", + "add_short": "Agregar", "subtotal": "Subtotal", "taxes": "Impuestos incluidos. Descuentos y envío calculados en pantalla de pago.", "checkout": "Finalizar pedido", @@ -59,7 +138,7 @@ "title": "Collections" }, "product_page": { - "add": "Añadir a la bolsa de compra", + "add": "Añadir a carrito", "buy": "Comprar ahora", "favorite": "Favoritos", "options": "Opciones: {{ option }}", @@ -83,13 +162,26 @@ "before": "Antes", "after": "Después", "reviewer": "Cliente", + "gallery": "Imágenes del producto", + "write_review": "Escribir Reseña", + "view_more": "Ver más", + "review_name": "Nombre", + "review_email": "Correo electrónico", + "review_rating": "Calificación", + "review_body": "Tu reseña", + "review_submit": "Publicar reseña", + "review_sent": "Gracias, recibimos tu reseña.", + "review_error": "No pudimos enviar tu reseña. Inténtalo de nuevo.", "reviews_label": "Reseñas", "decrease": "Reducir cantidad", "increase": "Aumentar cantidad" }, "collection_page": { "filters": "Filtros", + "close_filters": "Cerrar filtros", "sort": "Ordenar por: {{ sort }}", + "sort_title": "Ordenar por", + "close_sort": "Cerrar orden", "apply": "Aplicar", "clear": "Limpiar", "no_filters": "Esta colección no tiene filtros.", @@ -117,26 +209,37 @@ "enter": "Enter" }, "search": { - "title": "Search", - "placeholder": "Search articles, pages, or products", - "submit": "Search", - "no_results_html": "No results found for {{ terms }}", - "results_for_html": "{{ count }} results found for {{ terms }}" + "title": "Buscar", + "placeholder": "Busca tu producto seasons favorito", + "submit": "Buscar", + "no_results_html": "No hay resultados para {{ terms }}", + "results_for_html": "{{ count }} resultados para {{ terms }}" }, "header": { "menu_open": "Abrir menú", "menu_close": "Cerrar menú", "search_label": "Buscar", "search_placeholder": "Busca tu producto seasons favorito", + "search_empty": "No hay productos para “{{ terms }}”", + "search_view_all": "Ver todos los resultados", + "search_status": { + "one": "{{ count }} producto", + "other": "{{ count }} productos" + }, "account": "Cuenta", + "wishlist": "Favoritos", + "wishlist_count": "Favoritos, {{ count }} productos", + "wishlist_empty": "Aún no tienes favoritos.", + "wishlist_remove": "Quitar", + "wishlist_close": "Cerrar favoritos", "cart_count": "Carrito, {{ count }} productos", "promo": "Cambia tu piel ¡hoy!", "submenu": "Abrir {{ menu_title }}", "links": { "categories": "Categorías", - "routine": "Por rutina", - "skin_type": "Por tipo de piel", - "concern": "Por preocupación", + "routine": "Rutina", + "skin_type": "Tipo de piel", + "concern": "Preocupación", "sunscreen": "Protección Solar", "favorites": "Los favoritos", "kits": "Kits y Rutinas", @@ -155,7 +258,7 @@ "treat": "2. Trata", "hydrate": "3. Hidrata", "protect": "4. Protege", - "kits": "Kits y rutinas completas", + "kits": "Kits y rutinas", "combination": "Mixta-grasa", "oily": "Grasa", "dry": "Seca", @@ -198,19 +301,14 @@ }, "seasons": { "about": "Quiénes somos", - "blog": "Blog Seasons", - "reviews": "Reseñas", + "blog": "Blog", "stores": "Puntos de venta" }, "shop": { "all": "Todos los productos", - "bestsellers": "Más vendidos", - "new": "Nuevos lanzamientos", - "kits": "Kits y rutinas", - "previous": "Línea anterior" + "kits": "Kits y rutinas" }, "routine": { - "ideal": "Tu rutina ideal", "oily": "Piel grasa", "combination": "Piel mixta", "dry": "Piel seca", @@ -218,7 +316,6 @@ "kits": "Kits y rutinas" }, "help": { - "faq": "Preguntas frecuentes", "shipping": "Envíos", "returns": "Devoluciones", "billing": "Facturación", @@ -228,8 +325,7 @@ "community": { "experts": "Seasons Experts", "distributor": "Ser distribuidor", - "glow_army": "Glow Army", - "videos": "Videos y tips" + "glow_army": "Glow Army" }, "newsletter": { "heading": "Obtén un descuento sorpresa\nen tu primera compra", @@ -309,6 +405,54 @@ "success": "Gracias por registrarte.", "error": "No pudimos registrarte. Intenta de nuevo." }, + "glow_army": { + "heading": "Glow Army", + "text": "Nuestro espacio exclusivo dónde recompensamos que cuides tu carita. Cada compra que hagas te acerca a recompensas increíbles.", + "join": "Unirse", + "points": "Ver mis puntos", + "how": "Cómo funciona", + "earn": "Formas de ganar puntos", + "redeem": "Formas de canjear puntos", + "referral_heading": "Da 10% de descuento, recibe 10% de descuento", + "referral_text": "Únete al programa de referidos y reclama tus recompensas", + "referral_button": "Únete ahora", + "steps": { + "one_title": "Crear una cuenta", + "one_text": "Conviértete en miembro para recibir recompensas", + "two_title": "Ganar puntos", + "two_text": "Completa estas actividades para acumular puntos", + "three_title": "Canjear puntos", + "three_text": "Intercambia puntos por descuentos emocionantes" + }, + "earn_items": { + "order_title": "Completar un pedido", + "order_text": "Gana 1 punto por cada $1", + "birthday_title": "Feliz cumpleaños", + "birthday_text": "200 puntos", + "review_title": "Dejar una reseña", + "review_text": "100 puntos", + "profile_title": "Completa tu perfil", + "profile_text": "50 puntos" + }, + "rewards": { + "rate_title": "Canjea tus puntos (20 por cada $1)", + "rate_text": "20 puntos = $1", + "off_50_title": "$50 off", + "off_50_text": "1,000 puntos", + "balm_title": "Bálsamo labial gratis", + "balm_text": "1,200 puntos", + "off_100_title": "$100 off", + "off_100_text": "2,000 puntos", + "toner_title": "Tónico té verde gratis", + "toner_text": "3,000 puntos", + "off_200_title": "$200 off", + "off_200_text": "4,000 puntos", + "off_300_title": "$300 off", + "off_300_text": "6,000 puntos", + "sunscreen_title": "Bloqueador solar manzana gratis", + "sunscreen_text": "10,500 puntos" + } + }, "skin_match": { "heading": "¿Qué necesita tu piel hoy?", "subheading": "Encuentra tu match de cuidado facial con Seasons.", diff --git a/locales/en.default.schema.json b/locales/en.default.schema.json index 3d2681a..ed56116 100644 --- a/locales/en.default.schema.json +++ b/locales/en.default.schema.json @@ -88,7 +88,8 @@ "pills_menu": "Highlighted links", "utility_menu": "Utility links", "promo_text": "Promo text", - "promo_link": "Promo link" + "promo_link": "Promo link", + "predictive": "Predictive search" }, "hero": { "name": "Hero", @@ -156,7 +157,7 @@ "poster": "Cover image", "poster_info": "Shown beside the slider, and used as the video poster. On mobile it sits above the slider.", "video": "Video", - "video_info": "Optional. The cover stays on screen until the block is near the viewport, then the video file loads.", + "video_info": "Leave empty to use the theme video. The cover stays on screen until the block is near the viewport, then the video file loads.", "promo_link": "Image link", "promo_link_info": "Used when no video is set." }, @@ -204,7 +205,7 @@ "poster": "Cover image", "poster_info": "Shown until this clip is in the center. Leave empty to use the theme image.", "video": "Video", - "video_info": "Plays only while this clip is centered. The file loads at that moment.", + "video_info": "Leave empty to use the theme video for this position. Plays only while this clip is centered. The file loads at that moment.", "product_1": "Product 1", "product_2": "Product 2" }, @@ -229,9 +230,41 @@ "rating_label": "Rating", "product": "Product" }, + "glow_army": { + "name": "Glow Army", + "heading": "Heading", + "text": "Text", + "join": "Join button", + "points": "Points button", + "join_link": "Join link", + "points_link": "Points link", + "how": "How it works heading", + "earn": "Earn heading", + "redeem": "Redeem heading", + "referral_heading": "Referral heading", + "referral_text": "Referral text", + "referral_button": "Referral button", + "referral_link": "Referral link", + "step": "Step", + "number": "Number", + "earn_item": "Way to earn", + "icon": "Icon", + "icons": { + "order": "Order", + "birthday": "Birthday", + "review": "Review", + "profile": "Profile" + }, + "reward": "Reward", + "image": "Image" + }, "product_page": { "name": "Product", - "metafields": "Optional product custom fields: custom.subtitulo, custom.tipo_de_piel, custom.descripcion_corta, custom.como_aplicarlo, custom.ingredientes, custom.antes, custom.despues, custom.rutina, custom.llevate, custom.resenas." + "metafields": "Product content uses custom metafields (subtitulo, tipo de piel, descripcion corta, ingredientes, como aplicarlo) and Judge.me reviews.", + "reviews_shop": "Judge.me shop domain", + "reviews_shop_info": "Shop that stores the reviews, for example seasons-world.myshopify.com. When it matches this store, the product id is used directly.", + "reviews_storefront": "Storefront used to match products", + "reviews_storefront_info": "Used only when the Judge.me shop is different from this store. The product is matched by handle." }, "collection_page": { "name": "Collection", @@ -239,6 +272,21 @@ "metafields": "Banner custom fields on the collection: custom.banner_tipo (titulo, listado or ambos), custom.banner_imagen, custom.banner_titulo, custom.banner_texto, custom.banner_listado, custom.banner_enlace.", "recent_name": "Recently viewed" }, + "about_section": { + "name": "About", + "hero_video": "Hero video", + "pillar_1": "Pillar image 1", + "pillar_2": "Pillar image 2", + "pillar_3": "Pillar image 3", + "pillar_4": "Pillar image 4", + "join_image": "Distributors image" + }, + "blog_section": { + "show_tags": "Show tags", + "show_author": "Show author", + "show_share": "Show share links", + "show_related": "Show related articles" + }, "cart_drawer": { "name": "Cart drawer", "free_shipping": "Free shipping from", diff --git a/package.json b/package.json index e98599b..558a497 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "name": "season", "private": true, "scripts": { - "dev:css": "tailwindcss -i ./src/tailwind.css -o ./assets/tailwind.css --watch", - "build:css": "tailwindcss -i ./src/tailwind.css -o ./assets/tailwind.css --minify" + "dev:css": "node scripts/build-css.js --watch", + "build:css": "node scripts/build-css.js" }, "devDependencies": { "tailwindcss": "^3.4.17" diff --git a/scripts/build-css.js b/scripts/build-css.js new file mode 100644 index 0000000..ee699b3 --- /dev/null +++ b/scripts/build-css.js @@ -0,0 +1,106 @@ +const fs = require('fs'); +const path = require('path'); +const { spawnSync } = require('child_process'); + +const root = path.join(__dirname, '..'); +const entry = path.join(root, 'src', '.generated-tailwind.css'); +const componentsFile = path.join(root, 'src', 'components.css'); +const tailwindSource = path.join(root, 'src', 'tailwind.css'); +const criticalFile = path.join(root, 'assets', 'critical.css'); +const output = path.join(root, 'src', '.tailwind.min.css'); +const snippetFile = path.join(root, 'snippets', 'tailwind-css.liquid'); +const publicCss = path.join(root, 'assets', 'tailwind.css'); +const cli = path.join(root, 'node_modules', 'tailwindcss', 'lib', 'cli.js'); + +const stylesheetPattern = /\{%-?\s*stylesheet\s*-?%\}[\t ]*\r?\n?([\s\S]*?)\{%-?\s*endstylesheet\s*-?%\}[\t ]*\r?\n?/g; + +function walk(dir, files) { + for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { + if (entry.name === 'node_modules' || entry.name === '.git') continue; + const full = path.join(dir, entry.name); + if (entry.isDirectory()) walk(full, files); + else if (entry.name.endsWith('.liquid')) files.push(full); + } + return files; +} + +function extractStylesheets() { + const files = walk(root, []); + const chunks = []; + + for (const file of files) { + const text = fs.readFileSync(file, 'utf8'); + if (!text.includes('stylesheet')) continue; + + const parts = []; + const next = text.replace(stylesheetPattern, (_, css) => { + parts.push(css.trim()); + return '\n'; + }); + + if (!parts.length) continue; + + const relative = path.relative(root, file).replace(/\\/g, '/'); + chunks.push(`/* ${relative} */\n${parts.join('\n\n')}`); + fs.writeFileSync(file, next.replace(/\n{3,}/g, '\n\n')); + } + + if (!chunks.length) return false; + + const banner = '/* Component CSS compiled with Tailwind CSS v3. Moved out of stylesheet tags. */\n\n'; + fs.writeFileSync(componentsFile, banner + chunks.join('\n\n') + '\n'); + return true; +} + +function assemble() { + const critical = fs.readFileSync(criticalFile, 'utf8').trim(); + const tailwind = fs.readFileSync(tailwindSource, 'utf8').trim(); + const components = fs.existsSync(componentsFile) ? fs.readFileSync(componentsFile, 'utf8').trim() : ''; + + fs.writeFileSync( + entry, + `${critical}\n\n${tailwind}\n\n${components}\n` + ); +} + +function writeSnippet() { + const css = fs.readFileSync(output, 'utf8').trim(); + if (css.includes('{{') || css.includes('{%') || css.includes('')) { + console.error('Minified CSS contains Liquid or a closing style tag, so it cannot be printed inline.'); + process.exit(1); + } + + const snippet = `{% doc %} + Prints the minified Tailwind CSS v3 bundle in the document head. + Generated by scripts/build-css.js. Do not edit by hand. +{% enddoc %} + +`; + fs.writeFileSync(snippetFile, snippet); + if (fs.existsSync(publicCss)) fs.unlinkSync(publicCss); +} + +function compile() { + if (!fs.existsSync(cli)) { + console.error('Missing tailwindcss. Run npm install in the theme folder.'); + process.exit(1); + } + + const watch = process.argv.includes('--watch'); + const args = [cli, '-i', entry, '-o', output, '--minify']; + if (watch) args.push('--watch'); + + if (watch) { + fs.watchFile(output, { interval: 400 }, () => { + if (fs.existsSync(output)) writeSnippet(); + }); + } + + const result = spawnSync(process.execPath, args, { cwd: root, stdio: 'inherit' }); + if (!watch && result.status === 0) writeSnippet(); + if (result.status !== 0) process.exit(result.status || 1); +} + +extractStylesheets(); +assemble(); +compile(); diff --git a/sections/about.liquid b/sections/about.liquid new file mode 100644 index 0000000..ddd261f --- /dev/null +++ b/sections/about.liquid @@ -0,0 +1,343 @@ +{% liquid + assign hero_poster = 'https://www.seasonsmexico.com/cdn/shop/files/preview_images/80b44ceeba2f4677b438eab3668f2f7a.thumbnail.0000000000_1100x.jpg?v=1769452702' + assign hero_src = 'https://www.seasonsmexico.com/cdn/shop/videos/c/vp/80b44ceeba2f4677b438eab3668f2f7a/80b44ceeba2f4677b438eab3668f2f7a.HD-1080p-4.8Mbps-67816357.mp4?v=0' + + if section.settings.hero_video != blank + assign hero_poster = section.settings.hero_video.preview_image | image_url: width: 1600 + for source in section.settings.hero_video.sources + if source.format == 'mp4' or source.mime_type == 'video/mp4' + assign hero_src = source.url + endif + endfor + endif + + assign pillar_1 = 'https://www.seasonsmexico.com/cdn/shop/files/SNS_ManzanaVerde_2000x2000-03.png?v=1785786287&width=1400' + assign pillar_2 = 'https://www.seasonsmexico.com/cdn/shop/files/SNS_PDRN_2000x2000-04.png?v=1785787229&width=1400' + assign pillar_3 = 'https://www.seasonsmexico.com/cdn/shop/files/SNS_Nopal_Niacinamida_2000x2000-13.png?v=1786075950&width=1400' + assign pillar_4 = 'https://www.seasonsmexico.com/cdn/shop/files/SNS_ManzanaVerde_2000x2000-04.png?v=1786076882&width=1400' + assign join_image = 'https://www.seasonsmexico.com/cdn/shop/files/Duo_de_protectores_solares.png?v=1786142521&width=1400' + + if section.settings.pillar_1 != blank + assign pillar_1 = section.settings.pillar_1 | image_url: width: 1400 + endif + if section.settings.pillar_2 != blank + assign pillar_2 = section.settings.pillar_2 | image_url: width: 1400 + endif + if section.settings.pillar_3 != blank + assign pillar_3 = section.settings.pillar_3 | image_url: width: 1400 + endif + if section.settings.pillar_4 != blank + assign pillar_4 = section.settings.pillar_4 | image_url: width: 1400 + endif + if section.settings.join_image != blank + assign join_image = section.settings.join_image | image_url: width: 1400 + endif +%} + +
+
+
+ + +
+ +
+
+

+ {{ 'about.hero_title' | t }} +

+

{{ 'about.hero_line_1' | t }}

+

+ {{ 'about.hero_emphasis_1' | t }} + {{ 'about.hero_and' | t }} + {{ 'about.hero_emphasis_2' | t }} +

+

{{ 'about.hero_line_3' | t }}

+
+
+
+ +
+

+ {{ 'about.pillars_title' | t }} +

+ +
+
+
+ +

{{ 'about.pillar_1_title' | t }}

+

{{ 'about.pillar_1_text' | t }}

+
+
+ +

{{ 'about.pillar_2_title' | t }}

+

{{ 'about.pillar_2_text' | t }}

+
+
+ +

{{ 'about.pillar_3_title' | t }}

+

{{ 'about.pillar_3_text' | t }}

+
+
+ +

{{ 'about.pillar_4_title' | t }}

+

{{ 'about.pillar_4_text' | t }}

+
+
+ +
+
+ + + + +
+
+
+
+ +
+

+ {{ 'about.values_title' | t }} +

+ +
+ +
+
+

+ {{ 'about.facts_title' | t }} + {{ 'about.facts_brand' | t }} +

+

+ {{ 'about.facts_intro' | t }} +

+
+
+

{{ 'about.fact_1_title' | t }}

+

{{ 'about.fact_1_text' | t }}

+
+
+

{{ 'about.fact_2_title' | t }}

+

{{ 'about.fact_2_text' | t }}

+
+
+

{{ 'about.fact_3_title' | t }}

+

{{ 'about.fact_3_text' | t }}

+
+
+

{{ 'about.fact_4_title' | t }}

+

{{ 'about.fact_4_text' | t }}

+
+
+

{{ 'about.fact_5_title' | t }}

+

{{ 'about.fact_5_text' | t }}

+
+
+

{{ 'about.fact_6_title' | t }}

+

{{ 'about.fact_6_text' | t }}

+
+
+

{{ 'about.fact_7_title' | t }}

+

{{ 'about.fact_7_text' | t }}

+
+
+

{{ 'about.fact_8_title' | t }}

+

{{ 'about.fact_8_text' | t }}

+
+
+

+ {{ 'about.press' | t }} +

+
+
+ +
+

+ {{ 'about.stores_title' | t }} +

+

{{ 'about.stores_text' | t }}

+ + {{ 'about.stores_button' | t }} + +
+ +
+

+ {{ 'about.faq_title' | t }} +

+ {% for i in (1..6) %} + {% liquid + case i + when 1 + assign question = 'about.faq_1_q' | t + assign answer = 'about.faq_1_a' | t + when 2 + assign question = 'about.faq_2_q' | t + assign answer = 'about.faq_2_a' | t + when 3 + assign question = 'about.faq_3_q' | t + assign answer = 'about.faq_3_a' | t + when 4 + assign question = 'about.faq_4_q' | t + assign answer = 'about.faq_4_a' | t + when 5 + assign question = 'about.faq_5_q' | t + assign answer = 'about.faq_5_a' | t + else + assign question = 'about.faq_6_q' | t + assign answer = 'about.faq_6_a' | t + endcase + %} +
+ + {{ question }} + + +

{{ answer }}

+
+ {% endfor %} +
+ +
+
+ {{ 'about.join_title' | t | escape }} +
+
+
+

+ {{ 'about.join_title' | t }} +

+

{{ 'about.join_text' | t }}

+ + {{ 'about.join_button' | t }} + +
+
+
+
+ +{% javascript %} +document.querySelectorAll('[data-about-play]').forEach((button) => { + if (button.getAttribute('data-bound') === 'true') return; + button.setAttribute('data-bound', 'true'); + button.addEventListener('click', () => { + const video = button.parentElement.querySelector('[data-about-video]'); + if (!video) return; + video.setAttribute('controls', 'controls'); + video.play(); + button.hidden = true; + }); +}); + +document.querySelectorAll('[data-about-pillars]').forEach((root) => { + if (root.getAttribute('data-bound') === 'true') return; + root.setAttribute('data-bound', 'true'); + const images = [...root.querySelectorAll('[data-panel-image]')]; + const panels = [...root.querySelectorAll('[data-panel]')]; + if (!images.length || !('IntersectionObserver' in window)) return; + + const observer = new IntersectionObserver((entries) => { + entries.forEach((entry) => { + if (!entry.isIntersecting) return; + const index = entry.target.getAttribute('data-panel'); + images.forEach((image) => { + const active = image.getAttribute('data-panel-image') === index; + image.classList.toggle('opacity-100', active); + image.classList.toggle('opacity-0', !active); + }); + }); + }, { rootMargin: '-35% 0px -35% 0px', threshold: 0.1 }); + + panels.forEach((panel) => observer.observe(panel)); +}); +{% endjavascript %} + +{% schema %} +{ + "name": "t:about_section.name", + "settings": [ + { + "type": "video", + "id": "hero_video", + "label": "t:about_section.hero_video" + }, + { + "type": "image_picker", + "id": "pillar_1", + "label": "t:about_section.pillar_1" + }, + { + "type": "image_picker", + "id": "pillar_2", + "label": "t:about_section.pillar_2" + }, + { + "type": "image_picker", + "id": "pillar_3", + "label": "t:about_section.pillar_3" + }, + { + "type": "image_picker", + "id": "pillar_4", + "label": "t:about_section.pillar_4" + }, + { + "type": "image_picker", + "id": "join_image", + "label": "t:about_section.join_image" + } + ] +} +{% endschema %} diff --git a/sections/article.liquid b/sections/article.liquid index 146acd1..7cd190c 100644 --- a/sections/article.liquid +++ b/sections/article.liquid @@ -1,68 +1,300 @@ -{% comment %} - This section is used in the article template to render the article page, which - displays the full content of the blog post and can optionally include a - comments section for customers (not shown in this example). +{% liquid + assign share_url = shop.url | append: article.url + assign share_url_encoded = share_url | url_encode + assign share_title = article.title | url_encode + assign published = article.published_at | date: '%B %d, %Y' - https://shopify.dev/docs/storefronts/themes/architecture/templates/article -{% endcomment %} + assign share_image = '' + if article.image != blank + assign share_image = article.image | image_url: width: 1200 + unless share_image contains 'https:' + assign share_image = share_image | prepend: 'https:' + endunless + assign share_image = share_image | url_encode + endif +%} -{% if article.image %} - {{ article.image | image_url: width: 1000 | image_tag }} -{% endif %} +
+
+ {% if article.image != blank %} +
+ {{ + article.image + | image_url: width: 2000 + | image_tag: + loading: 'eager', + widths: '600, 900, 1200, 1600, 2000', + sizes: '(max-width: 1200px) 100vw, 1170px', + alt: article.image.alt | default: article.title, + class: 'h-auto w-full bg-[#f3f3f3]' + }} +
+ {% endif %} -

{{ article.title }}

+
+ -{% assign date = article.published_at | time_tag: format: 'date' %} -

{{ 'blog.article_metadata_html' | t: date: date, author: article.author }}

+
+

+ {{ article.title | escape }} +

+ +
-{{ article.content }} +
+ {{ article.content }} +
-{% if blog.comments_enabled? %} -

{{ 'blog.article_comments' | t }}

+ {% if blog.comments_enabled? %} +
+

+ {{ 'blog.article_comments' | t }} +

-
- {% paginate article.comments by 10 %} - {% for comment in article.comments %} -
-

{{ comment.author }}

-

- {{- comment.created_at | time_tag: format: 'date' -}} -

-

{{ comment.content }}

+ {% paginate article.comments by 10 %} +
+ {% for comment in article.comments %} +
+

{{ comment.author | escape }}

+

+ {{ comment.created_at | date: '%B %d, %Y' }} +

+
{{ comment.content }}
+
+ {% endfor %} +
+ {% if paginate.pages > 1 %} +
+ {{ paginate | default_pagination: anchor: 'comments' }} +
+ {% endif %} + {% endpaginate %} + + {% form 'new_comment', article %} +

+ {{ 'blog.comment_form_title' | t }} +

+ + {% if form.posted_successfully? %} +

{{ 'blog.comment_success' | t }}

+ {% endif %} + + {{ form.errors | default_errors }} + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ {% endform %}
- {% endfor %} + {% endif %} - {{ paginate | default_pagination: anchor: 'comments' }} - {% endpaginate %} -
+ {% if section.settings.show_share %} +
+ {{ 'blog.share' | t }} + + Facebook + + + X + + {% if share_image != blank %} + + Pinterest + + {% endif %} + + WhatsApp + + +
+ {% endif %} - {% form 'new_comment', article %} -

{{ 'blog.comment_form_title' | t }}

- - {{ form.errors | default_errors }} - -
- - +
-
- - -
+ {% if blog.previous_article or blog.next_article %} + + {% endif %} +
-
- - -
+ {% if section.settings.show_related and blog.articles.size > 1 %} +
+
+ + + {{ 'blog.view_all' | t }} + +
- - {% endform %} -{% endif %} +
+ {% for related in blog.articles limit: 3 %} + {% render 'blog-card', article: related, heading_tag: 'h3' %} + {% endfor %} +
+
+ {% endif %} +
+ +{% javascript %} +document.querySelectorAll('[data-copy-link]').forEach((button) => { + if (button.getAttribute('data-copy-bound') === 'true') return; + button.setAttribute('data-copy-bound', 'true'); + + button.addEventListener('click', () => { + const url = button.getAttribute('data-url'); + const label = button.querySelector('[data-copy-label]'); + if (!url || !navigator.clipboard || !label) return; + + navigator.clipboard.writeText(url).then(() => { + const original = label.textContent; + label.textContent = button.getAttribute('data-copied') || original; + window.setTimeout(() => { + label.textContent = original; + }, 2000); + }); + }); +}); +{% endjavascript %} {% schema %} { "name": "t:general.article", - "settings": [] + "settings": [ + { + "type": "checkbox", + "id": "show_share", + "label": "t:blog_section.show_share", + "default": true + }, + { + "type": "checkbox", + "id": "show_related", + "label": "t:blog_section.show_related", + "default": true + } + ] } {% endschema %} diff --git a/sections/bestsellers.liquid b/sections/bestsellers.liquid index b6e22e4..14d0323 100644 --- a/sections/bestsellers.liquid +++ b/sections/bestsellers.liquid @@ -83,7 +83,7 @@ widths: '372, 486, 744, 972', sizes: '(max-width: 1024px) calc(100vw - 30px), 486px', class: 'bestsellers__promo-image', - loading: 'eager' + loading: 'lazy' }} {% else %} {{ heading | escape }} {% endif %} @@ -115,610 +119,6 @@ -{% stylesheet %} - .bestsellers { - padding: 50px 0; - color: #000; - background: #fff; - font-family: Archivo, sans-serif; - } - - .bestsellers__header { - display: flex; - align-items: center; - justify-content: space-between; - gap: 16px; - margin-bottom: 20px; - padding: 0 100px; - } - - .bestsellers__heading { - margin: 0; - color: #000; - font-family: "Roc Grotesk", Archivo, sans-serif; - font-size: 30px; - font-weight: 500; - line-height: normal; - text-transform: uppercase; - } - - .bestsellers__tools { - display: flex; - flex-shrink: 0; - align-items: center; - gap: 10px; - } - - .bestsellers__more { - padding: 0 10px; - color: #000; - font-size: 16px; - font-weight: 500; - line-height: normal; - text-decoration: none; - } - - .bestsellers__arrows { - display: flex; - align-items: center; - gap: 20px; - } - - .bestsellers__arrow { - display: grid; - width: 30px; - height: 30px; - place-items: center; - padding: 0; - border: 0; - border-radius: 60px; - background: #9dd6c7; - cursor: pointer; - } - - .bestsellers__arrow:disabled { - cursor: default; - opacity: 0.35; - } - - .bestsellers__arrow-icon { - display: block; - width: 20px; - height: 20px; - } - - .bestsellers__arrow--prev .bestsellers__arrow-icon { - transform: rotate(-90deg); - } - - .bestsellers__arrow--next .bestsellers__arrow-icon { - transform: rotate(90deg); - } - - .bestsellers__body { - display: flex; - align-items: flex-start; - gap: 28px; - } - - .bestsellers__promo { - position: relative; - display: block; - flex: 0 0 486px; - width: 486px; - height: 550px; - overflow: hidden; - border-radius: 0 10px 10px 0; - color: inherit; - text-decoration: none; - } - - .bestsellers__promo-image { - display: block; - width: 100%; - height: 100%; - object-fit: cover; - } - - .bestsellers__slider { - display: flex; - min-width: 0; - flex: 1 1 auto; - flex-direction: column; - align-self: stretch; - } - - .bestsellers__progress { - position: relative; - height: 1px; - margin-top: auto; - background: #e6e6e6; - } - - .bestsellers__progress-bar { - position: absolute; - top: 0; - left: 0; - height: 2px; - background: #000; - } - - .bestsellers__viewport { - min-width: 0; - min-height: 493px; - flex: 1 1 auto; - overflow-x: auto; - scroll-snap-type: x mandatory; - scrollbar-width: none; - cursor: grab; - } - - .bestsellers[data-feed]:not([data-sorted="true"]) .bestsellers__card { - visibility: hidden; - } - - .bestsellers__viewport::-webkit-scrollbar { - display: none; - } - - .bestsellers__viewport.is-dragging { - cursor: grabbing; - scroll-snap-type: none; - } - - .bestsellers__track { - display: flex; - gap: 30px; - width: max-content; - padding-right: 100px; - } - - .bestsellers__card { - display: flex; - flex: 0 0 386px; - flex-direction: column; - gap: 20px; - width: 386px; - scroll-snap-align: start; - } - - .bestsellers__media { - position: relative; - width: 386px; - height: 386px; - overflow: hidden; - border-radius: 10px; - background: #fff; - } - - .bestsellers__media-link { - position: absolute; - inset: 0; - display: block; - } - - .bestsellers__image { - display: block; - width: 100%; - height: 100%; - object-fit: cover; - } - - .bestsellers__image--hover { - position: absolute; - inset: 0; - opacity: 0; - transition: opacity 0.35s ease; - } - - .bestsellers__media:hover .bestsellers__image--hover, - .bestsellers__media:focus-within .bestsellers__image--hover { - opacity: 1; - } - - @media (prefers-reduced-motion: reduce) { - .bestsellers__image--hover { - transition: none; - } - } - - .bestsellers__image--empty { - background: #f3f3f3; - } - - .bestsellers__badges { - position: absolute; - top: 10px; - left: 10px; - z-index: 1; - display: flex; - flex-direction: column; - align-items: flex-start; - gap: 4px; - } - - .bestsellers__badge { - display: inline-flex; - align-items: center; - justify-content: center; - padding: 3px 5px; - border-radius: 2px; - color: #000; - font-size: 10px; - font-weight: 300; - line-height: normal; - text-transform: uppercase; - } - - .bestsellers__badge--best { - background: #bfffb2; - } - - .bestsellers__badge--skin { - background: #f7c585; - } - - .bestsellers__wish { - position: absolute; - top: 20px; - right: 20px; - z-index: 1; - display: grid; - width: 25px; - height: 25px; - place-items: center; - padding: 0; - border: 0; - background: transparent; - cursor: pointer; - } - - .bestsellers__wish-icon { - display: block; - width: 25px; - height: 25px; - } - - .bestsellers__wish-icon svg { - display: block; - } - - .bestsellers__wish.is-active svg path { - fill: #000; - } - - .bestsellers__info { - display: flex; - flex-direction: column; - gap: 15px; - } - - .bestsellers__copy { - display: flex; - flex-direction: column; - gap: 5px; - } - - .bestsellers__title { - display: block; - overflow: hidden; - color: #000; - font-size: 18px; - font-weight: 700; - line-height: normal; - text-decoration: none; - text-overflow: ellipsis; - white-space: nowrap; - } - - .bestsellers__subtitle, - .bestsellers__reviews, - .bestsellers__empty { - margin: 0; - } - - .bestsellers__subtitle { - overflow: hidden; - color: #808181; - font-size: 14px; - font-weight: 300; - line-height: normal; - text-overflow: ellipsis; - white-space: nowrap; - } - - .bestsellers__rating { - display: flex; - align-items: center; - gap: 10px; - } - - .bestsellers__stars { - display: flex; - align-items: center; - gap: 1px; - } - - .bestsellers__star { - display: block; - width: 10px; - height: 10px; - } - - .bestsellers__star svg { - display: block; - } - - .bestsellers__star.is-off { - opacity: 0.25; - } - - .bestsellers__reviews { - color: #000; - font-size: 9px; - font-weight: 300; - line-height: normal; - white-space: nowrap; - } - - .bestsellers__prices { - display: flex; - align-items: center; - gap: 32px; - } - - .bestsellers__price, - .bestsellers__compare { - font-size: 16px; - line-height: normal; - } - - .bestsellers__price { - font-weight: 700; - } - - .bestsellers__compare { - color: #808181; - font-weight: 400; - text-decoration: line-through; - } - - .bestsellers__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; - } - - .bestsellers__media:hover .bestsellers__actions, - .bestsellers__media:focus-within .bestsellers__actions { - opacity: 1; - pointer-events: auto; - } - - .bestsellers__bag, - .bestsellers__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; - } - - .bestsellers__bag { - flex: 0 0 50px; - width: 50px; - background: #000; - } - - .bestsellers__bag img { - display: block; - width: 25px; - height: 25px; - } - - .bestsellers__buy { - flex: 1 1 auto; - background: #9dd6c7; - color: #000; - font-family: Archivo, sans-serif; - font-size: 16px; - font-weight: 300; - line-height: normal; - } - - .bestsellers__bag:disabled, - .bestsellers__buy:disabled { - cursor: default; - opacity: 0.55; - } - - .bestsellers__empty { - color: #000; - font-size: 14px; - font-weight: 400; - } - - .bestsellers__more:focus-visible, - .bestsellers__bag:focus-visible, - .bestsellers__buy:focus-visible, - .bestsellers__arrow:focus-visible, - .bestsellers__wish:focus-visible, - .bestsellers__title:focus-visible, - .bestsellers__media-link:focus-visible, - .bestsellers__promo:focus-visible { - outline: 2px solid #000; - outline-offset: 2px; - } - - @media (max-width: 1439px) { - .bestsellers__header { - padding-inline: 40px; - } - - .bestsellers__track { - padding-right: 40px; - } - } - - @media (max-width: 1024px) { - .bestsellers { - padding-top: 40px; - } - - .bestsellers__header { - margin-bottom: 10px; - padding-inline: 15px; - } - - .bestsellers__heading { - font-size: 20px; - } - - .bestsellers__more { - padding: 0; - font-size: 14px; - } - - .bestsellers__arrows { - display: none; - } - - .bestsellers__body { - flex-direction: column; - gap: 20px; - } - - .bestsellers__promo { - flex-basis: auto; - width: calc(100% - 30px); - height: 460px; - margin-inline: 15px; - border-radius: 10px; - } - - .bestsellers__progress { - margin-top: 24px; - } - - .bestsellers__viewport { - width: 100%; - min-height: 370px; - cursor: auto; - } - - .bestsellers__track { - gap: 20px; - padding-right: 15px; - padding-left: 15px; - } - - .bestsellers__card { - flex-basis: 245px; - gap: 10px; - width: 245px; - } - - .bestsellers__media { - width: 245px; - height: 244px; - } - - .bestsellers__badges { - top: 5px; - left: 5px; - } - - .bestsellers__badge { - font-size: 7px; - } - - .bestsellers__wish { - top: 10px; - right: 11px; - } - - .bestsellers__info { - gap: 10px; - } - - .bestsellers__title { - font-size: 14px; - } - - .bestsellers__subtitle { - font-size: 10px; - } - - .bestsellers__reviews { - position: absolute; - width: 1px; - height: 1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - } - - .bestsellers__rating { - position: relative; - } - - .bestsellers__price, - .bestsellers__compare { - font-size: 14px; - } - - .bestsellers__prices { - gap: 16px; - } - - .bestsellers__actions { - right: 8px; - bottom: 8px; - left: 8px; - gap: 6px; - opacity: 1; - pointer-events: auto; - } - - .bestsellers__bag, - .bestsellers__buy { - height: 36px; - padding: 0 8px; - } - - .bestsellers__bag { - flex-basis: 36px; - width: 36px; - } - - .bestsellers__bag img { - width: 18px; - height: 18px; - } - - .bestsellers__buy { - font-size: 12px; - } - } - - @media (prefers-reduced-motion: reduce) { - .bestsellers__viewport { - scroll-behavior: auto; - } - } -{% endstylesheet %} - {% javascript %} (() => { const wishlistKey = 'seasons-wishlist'; @@ -726,18 +126,23 @@ const readWishlist = () => { try { const stored = JSON.parse(window.localStorage.getItem(wishlistKey)); - return Array.isArray(stored) ? stored.map(String) : []; + if (!Array.isArray(stored)) return []; + return stored.map((item) => { + if (item && typeof item === 'object') return { id: String(item.id || ''), handle: String(item.handle || '') }; + return { id: String(item), handle: '' }; + }).filter((item) => item.id); } catch (error) { return []; } }; - const writeWishlist = (ids) => { - window.localStorage.setItem(wishlistKey, JSON.stringify(ids)); + const writeWishlist = (items) => { + window.localStorage.setItem(wishlistKey, JSON.stringify(items)); + document.dispatchEvent(new CustomEvent('seasons:wishlist')); }; const applyWishlist = (root) => { - const saved = readWishlist(); + const saved = readWishlist().map((item) => item.id); root.querySelectorAll('[data-wishlist]').forEach((button) => { const active = saved.includes(String(button.dataset.productId)); button.classList.toggle('is-active', active); @@ -950,12 +355,19 @@ if (!root) return; const id = String(wish.dataset.productId); + const handle = String(wish.dataset.productHandle || ''); const saved = readWishlist(); - const next = saved.includes(id) ? saved.filter((item) => item !== id) : saved.concat(id); + const next = saved.some((item) => item.id === id) + ? saved.filter((item) => item.id !== id) + : saved.concat({ id, handle }); writeWishlist(next); applyWishlist(root); }); + document.addEventListener('seasons:wishlist', () => { + document.querySelectorAll('[data-bestsellers]').forEach((root) => applyWishlist(root)); + }); + document.addEventListener('submit', async (event) => { const form = event.target; if (!(form instanceof HTMLFormElement) || !form.classList.contains('bestsellers__form')) return; diff --git a/sections/blog.liquid b/sections/blog.liquid index 0ea2113..0a3393a 100644 --- a/sections/blog.liquid +++ b/sections/blog.liquid @@ -1,35 +1,128 @@ -{% comment %} - This section is used in the blog template to render the blog page listing all - articles within a blog. +
+
+
+

+ {{ blog.title | escape }} +

- https://shopify.dev/docs/storefronts/themes/architecture/templates/blog -{% endcomment %} - -

{{ blog.title }}

- -{% paginate blog.articles by 5 %} - {% for article in blog.articles %} -
- {% if article.image %} - {{ article.image | image_url: width: 1000 | image_tag }} + {% if section.settings.show_tags and blog.all_tags.size > 0 %} + {% endif %} -

- {{ article.title | link_to: article.url }} -

- {% assign date = article.published_at | time_tag: format: 'date' %} -

{{ 'blog.article_metadata_html' | t: date: date, author: article.author }}

-

{{ article.excerpt }}

-
- {% endfor %} +
- {%- if paginate.pages > 1 -%} - {{- paginate | default_pagination -}} - {%- endif -%} -{% endpaginate %} + {% paginate blog.articles by 12 %} +
+ {% for article in blog.articles %} + {% render 'blog-card', + article: article, + show_excerpt: true, + show_author: section.settings.show_author, + eager: forloop.first + %} + {% else %} +

{{ 'blog.empty' | t }}

+ {% endfor %} +
+ + {% if paginate.pages > 1 %} + + {% endif %} + {% endpaginate %} +
+
{% schema %} { "name": "t:general.blog", - "settings": [] + "settings": [ + { + "type": "checkbox", + "id": "show_tags", + "label": "t:blog_section.show_tags", + "default": true + }, + { + "type": "checkbox", + "id": "show_author", + "label": "t:blog_section.show_author", + "default": true + } + ] } {% endschema %} diff --git a/sections/cart-drawer.liquid b/sections/cart-drawer.liquid index b48e246..d881efa 100644 --- a/sections/cart-drawer.liquid +++ b/sections/cart-drawer.liquid @@ -47,7 +47,7 @@ endunless assign shown = shown | plus: 1 - assign add_label = 'cart_drawer.add' | t + assign add_label = 'cart_drawer.add_short' | t echo '
- {% if shown > 0 %} - - {% endif %} - @@ -216,425 +214,6 @@
-{% 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; @@ -666,6 +245,47 @@ }); }; + const mobileQuery = window.matchMedia('(max-width: 767px)'); + let floaterObserver = null; + + const parkFloaters = (root) => { + if (!mobileQuery.matches) return; + const nodes = root === document.body ? document.body.querySelectorAll('*') : [root, ...root.querySelectorAll('*')]; + nodes.forEach((node) => { + if (!(node instanceof HTMLElement) || node.closest('[data-cart-drawer]')) return; + if (node.hasAttribute('data-cart-parked')) return; + const style = window.getComputedStyle(node); + if (style.position !== 'fixed') return; + const rect = node.getBoundingClientRect(); + if (rect.width < 24 || rect.height < 24) return; + const namedWidget = node.id === 'aitana-fab' || node.id === 'aitana-overlay' || node.id === 'wa-coupon-fab' || node.id === 'wa-coupon-overlay'; + const low = rect.top > window.innerHeight * 0.4; + const side = rect.left < 160 || rect.right > window.innerWidth - 160; + if (!namedWidget && (!low || !side)) return; + node.setAttribute('data-cart-parked', ''); + }); + }; + + const watchFloaters = () => { + parkFloaters(document.body); + if (floaterObserver) return; + floaterObserver = new MutationObserver((records) => { + if (!document.documentElement.classList.contains('cart-drawer-open')) return; + records.forEach((record) => { + record.addedNodes.forEach((node) => { + if (node instanceof HTMLElement) parkFloaters(node); + }); + }); + }); + floaterObserver.observe(document.body, { childList: true, subtree: true }); + }; + + const releaseFloaters = () => { + document.querySelectorAll('[data-cart-parked]').forEach((node) => { + node.removeAttribute('data-cart-parked'); + }); + }; + const openDrawer = () => { const drawer = getDrawer(); if (!drawer) return; @@ -674,6 +294,7 @@ drawer.classList.add('is-open'); drawer.setAttribute('aria-hidden', 'false'); document.documentElement.classList.add('cart-drawer-open'); + watchFloaters(); document.querySelectorAll('[data-cart-open]').forEach((button) => { button.setAttribute('aria-expanded', 'true'); }); @@ -687,6 +308,7 @@ drawer.classList.add('is-closing'); drawer.setAttribute('aria-hidden', 'true'); document.documentElement.classList.remove('cart-drawer-open'); + releaseFloaters(); document.querySelectorAll('[data-cart-open]').forEach((button) => { button.setAttribute('aria-expanded', 'false'); }); diff --git a/sections/cart.liquid b/sections/cart.liquid index 6d7e498..6e51cbf 100644 --- a/sections/cart.liquid +++ b/sections/cart.liquid @@ -1,37 +1,143 @@ -{% comment %} - This section is used in the cart template to render /cart page with an - overview of the items in customer's cart. +{% 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 - https://shopify.dev/docs/storefronts/themes/architecture/templates/cart -{% endcomment %} + 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 +%} -

{{ 'cart.title' | t }}

+
+
+

{{ 'cart.title' | t }}

+ + {% if cart.item_count == 0 %} +
+

{{ 'cart_drawer.empty' | t }}

+ {{ 'cart.continue' | t }} +
+ {% else %} +
+
+ {% for item in cart.items %} +
+ + {% if item.image %} + {{ + item.image + | image_url: width: 240 + | image_tag: + loading: 'lazy', + alt: item.product.title, + class: 'cart-page__img', + widths: '96, 160, 240', + sizes: '96px' + }} + {% endif %} + + +
+ {{ item.product.title | escape }} + {% unless item.variant.title == 'Default Title' %} +

{{ item.variant.title | escape }}

+ {% endunless %} +

+ {{ item.final_line_price | money_without_trailing_zeros }} + {% if item.original_line_price > item.final_line_price %} + {{ item.original_line_price | money_without_trailing_zeros }} + {% endif %} +

+
+ {% if item.quantity > 1 %} + − + {% else %} + + {% endif %} + {{ item.quantity }} + + +
+
+ + + + +
+ {% endfor %} +
+ + +
+ {% endif %} +
+
-
- - {% for item in cart.items %} - - - - - - {% endfor %} -
- {% render 'image', image: item.image, url: item.url %} - -

{{ item.product.title }}

- {{ 'cart.remove' | t | link_to: item.url_to_remove }} -
- - -
- -
{% schema %} { "name": "t:general.cart", - "settings": [] + "settings": [ + { + "type": "number", + "id": "free_shipping", + "label": "t:cart_drawer.free_shipping", + "info": "t:cart_drawer.free_shipping_info", + "default": 699 + } + ] } {% endschema %} diff --git a/sections/collection.liquid b/sections/collection.liquid index 4635931..0123b17 100644 --- a/sections/collection.liquid +++ b/sections/collection.liquid @@ -14,6 +14,42 @@ assign banner_title = collection.title endif + assign banner_asset = blank + case collection.handle + when 'all-products' + assign banner_asset = 'banner-todos-productos.avif' + when 'proteccion-solar-1' + assign banner_asset = 'banner-proteccion-solar.avif' + when '4-protege-bloqueadores-solares' + assign banner_asset = 'banner-protectores.avif' + when 'hidratantes' + assign banner_asset = 'banner-hidratantes.avif' + when 'limpiadores' + assign banner_asset = 'banner-limpiadores.avif' + when 'mascarillas' + assign banner_asset = 'banner-mascarillas.avif' + when 'serum' + assign banner_asset = 'banner-serums.avif' + when 'kits-skincare-facial' + assign banner_asset = 'banner-kits.avif' + when 'piel-mixta-grasa' + assign banner_asset = 'banner-piel-mixta-grasa.avif' + when 'piel-grasa' + assign banner_asset = 'banner-piel-grasa.avif' + when 'piel-seca-1' + assign banner_asset = 'banner-piel-seca.avif' + when 'control-grasa' + assign banner_asset = 'banner-control-grasa.avif' + when 'acne-1' + assign banner_asset = 'banner-preocupacion-acne.avif' + when 'hidratacion' + assign banner_asset = 'banner-preocupacion-hidratacion.avif' + when 'antiedad-1' + assign banner_asset = 'banner-antiedad.avif' + when 'aclarar' + assign banner_asset = 'banner-manchas.avif' + endcase + 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 @@ -35,6 +71,10 @@ assign show_hero = true endif + if banner_asset != blank + 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 @@ -65,16 +105,30 @@ data-cart-add-url="{{ routes.cart_add_url }}.js" > {% if show_hero %} - -
-
+ -
-
+ -{% stylesheet %} - .collections { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(min(var(--collection-card-size), 100%), 1fr)); - gap: var(--grid-gap); - } - .collections--compact { - --collection-card-size: 160px; - } - .collections--full { - --collection-card-size: 280px; - } - .collection-card { - display: flex; - flex-direction: column; - width: 100%; - } -{% endstylesheet %} + {% schema %} { diff --git a/sections/custom-section.liquid b/sections/custom-section.liquid index 529d497..42ca9a7 100644 --- a/sections/custom-section.liquid +++ b/sections/custom-section.liquid @@ -10,35 +10,7 @@
-{% stylesheet %} - .custom-section { - position: relative; - overflow: hidden; - width: 100%; - } - .custom-section__background { - position: absolute; - width: 100%; - height: 100%; - z-index: -1; - overflow: hidden; - } - .custom-section__background img { - position: absolute; - width: 100%; - height: auto; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - } - .custom-section__content { - display: grid; - grid-template-columns: var(--content-grid); - } - .custom-section__content > * { - grid-column: 2; - } -{% endstylesheet %} + {% schema %} { diff --git a/sections/distributors.liquid b/sections/distributors.liquid index dca82dc..c140bc0 100644 --- a/sections/distributors.liquid +++ b/sections/distributors.liquid @@ -54,6 +54,9 @@ width="1157" height="1300" loading="lazy" + srcset="{{ 'distributors-photo-sm.avif' | asset_url }} 680w, {{ 'distributors-photo.avif' | asset_url }} 1157w" + sizes="(max-width: 1024px) 372px, 859px" + decoding="async" > {% endif %} @@ -63,6 +66,8 @@ alt="{{ 'distributors.wordmark' | t }}" width="324" height="210" + loading="lazy" + decoding="async" >
@@ -73,6 +78,8 @@ alt="" width="355" height="403" + loading="lazy" + decoding="async" >
@@ -109,227 +118,6 @@
-{% 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", diff --git a/sections/footer-group.json b/sections/footer-group.json index 758a5df..3e5f38e 100644 --- a/sections/footer-group.json +++ b/sections/footer-group.json @@ -1,12 +1,3 @@ -/* - * ------------------------------------------------------------ - * IMPORTANT: The contents of this file are auto-generated. - * - * This file may be updated by the Shopify admin theme editor - * or related systems. Please exercise caution as any changes - * made to this file may be overwritten. - * ------------------------------------------------------------ - */ { "type": "footer", "name": "t:general.footer", diff --git a/sections/footer.liquid b/sections/footer.liquid index 45d591c..6aa3e43 100644 --- a/sections/footer.liquid +++ b/sections/footer.liquid @@ -1,26 +1,5 @@ {% 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 @@ -63,9 +42,24 @@ {% else %} @@ -83,9 +77,8 @@
{% endif %} @@ -250,409 +237,7 @@ -{% stylesheet %} - .footer { - color: #000; - background: #fff; - } - .footer__brand { - display: flex; - justify-content: center; - padding: 158px 100px; - } - - .footer__logo { - display: block; - max-width: 100%; - line-height: 0; - text-decoration: none; - } - - .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; - 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 () { diff --git a/sections/glow-army.liquid b/sections/glow-army.liquid new file mode 100644 index 0000000..496128b --- /dev/null +++ b/sections/glow-army.liquid @@ -0,0 +1,172 @@ +{% render 'glow-army-page' %} + +{% schema %} +{ + "name": "t:glow_army.name", + "tag": "section", + "settings": [ + { + "type": "text", + "id": "heading", + "label": "t:glow_army.heading", + "default": "Glow Army" + }, + { + "type": "textarea", + "id": "text", + "label": "t:glow_army.text", + "default": "Nuestro espacio exclusivo dónde recompensamos que cuides tu carita. Cada compra que hagas te acerca a recompensas increíbles." + }, + { + "type": "text", + "id": "join_label", + "label": "t:glow_army.join", + "default": "Unirse" + }, + { + "type": "url", + "id": "join_link", + "label": "t:glow_army.join_link" + }, + { + "type": "text", + "id": "points_label", + "label": "t:glow_army.points", + "default": "Ver mis puntos" + }, + { + "type": "url", + "id": "points_link", + "label": "t:glow_army.points_link" + }, + { + "type": "text", + "id": "how_heading", + "label": "t:glow_army.how", + "default": "Cómo funciona" + }, + { + "type": "text", + "id": "earn_heading", + "label": "t:glow_army.earn", + "default": "Formas de ganar puntos" + }, + { + "type": "text", + "id": "redeem_heading", + "label": "t:glow_army.redeem", + "default": "Formas de canjear puntos" + }, + { + "type": "text", + "id": "referral_heading", + "label": "t:glow_army.referral_heading", + "default": "Da 10% de descuento, recibe 10% de descuento" + }, + { + "type": "textarea", + "id": "referral_text", + "label": "t:glow_army.referral_text", + "default": "Únete al programa de referidos y reclama tus recompensas" + }, + { + "type": "text", + "id": "referral_button", + "label": "t:glow_army.referral_button", + "default": "Únete ahora" + }, + { + "type": "url", + "id": "referral_link", + "label": "t:glow_army.referral_link" + } + ], + "blocks": [ + { + "type": "step", + "name": "t:glow_army.step", + "settings": [ + { + "type": "text", + "id": "number", + "label": "t:glow_army.number", + "default": "01" + }, + { + "type": "text", + "id": "title", + "label": "t:glow_army.heading", + "default": "Crear una cuenta" + }, + { + "type": "textarea", + "id": "text", + "label": "t:glow_army.text", + "default": "Conviértete en miembro para recibir recompensas" + } + ] + }, + { + "type": "earn", + "name": "t:glow_army.earn_item", + "settings": [ + { + "type": "select", + "id": "icon", + "label": "t:glow_army.icon", + "default": "order", + "options": [ + { "value": "order", "label": "t:glow_army.icons.order" }, + { "value": "birthday", "label": "t:glow_army.icons.birthday" }, + { "value": "review", "label": "t:glow_army.icons.review" }, + { "value": "profile", "label": "t:glow_army.icons.profile" } + ] + }, + { + "type": "text", + "id": "title", + "label": "t:glow_army.heading", + "default": "Completar un pedido" + }, + { + "type": "text", + "id": "text", + "label": "t:glow_army.text", + "default": "Gana 1 punto por cada $1" + } + ] + }, + { + "type": "reward", + "name": "t:glow_army.reward", + "settings": [ + { + "type": "image_picker", + "id": "image", + "label": "t:glow_army.image" + }, + { + "type": "text", + "id": "title", + "label": "t:glow_army.heading", + "default": "$50 off" + }, + { + "type": "text", + "id": "text", + "label": "t:glow_army.text", + "default": "1,000 puntos" + } + ] + } + ], + "presets": [ + { + "name": "t:glow_army.name" + } + ], + "disabled_on": { + "groups": ["header", "footer"] + } +} +{% endschema %} diff --git a/sections/header-group.json b/sections/header-group.json index 25ed907..b3ae708 100644 --- a/sections/header-group.json +++ b/sections/header-group.json @@ -1,12 +1,3 @@ -/* - * ------------------------------------------------------------ - * IMPORTANT: The contents of this file are auto-generated. - * - * This file may be updated by the Shopify admin theme editor - * or related systems. Please exercise caution as any changes - * made to this file may be overwritten. - * ------------------------------------------------------------ - */ { "type": "header", "name": "t:general.header", @@ -18,5 +9,5 @@ }, "order": [ "header" - ], + ] } diff --git a/sections/header.liquid b/sections/header.liquid index c25d5a5..9dfe3fa 100644 --- a/sections/header.liquid +++ b/sections/header.liquid @@ -17,7 +17,7 @@ data-header data-menu-close="{{ 'header.menu_close' | t | escape }}" > -
+
-{% stylesheet %} - .welcome { - display: grid; - grid-template-columns: var(--content-grid); - background-color: #f6f6f7; - padding: 72px 0; - } - .welcome-content { - grid-column: 2; - display: flex; - justify-content: space-between; - align-items: center; - gap: 1rem; - width: 100%; - padding: 0 24px; - } - - .welcome-description { - max-width: 80ch; - line-height: 1.4; - margin-top: 1.5rem; - } - - .icon { - width: 300px; - } - - .highlights { - display: grid; - gap: 2rem; - grid-template-columns: repeat(3, 1fr); - margin-top: 50px; - } - - @media (max-width: 1100px) { - .highlights { - grid-template-columns: 1fr; - } - } - - .highlight { - display: flex; - flex-direction: column; - height: 100%; - padding: 24px; - border-radius: 8px; - background-color: #eef3ff; - color: rgb(92, 95, 98); - line-height: 1.4; - } - - .highlight > * + * { - margin-top: 1rem; - } - - .highlight h3 { - font-size: 1rem; - color: rgb(32, 34, 35); - } - - .highlight-description { - flex: 1 1; - } - - .highlight a { - display: flex; - width: fit-content; - background-color: rgb(250, 251, 251); - box-shadow: rgba(0, 0, 0, 0.2) 0px -3px 0px 0px inset, rgba(255, 255, 255, 0.9) 0px 2px 0px 0px inset; - border: 1px solid rgb(140, 145, 150); - border-radius: 4px; - color: rgb(92, 95, 98); - padding: 3px 10px 5px; - text-decoration: none; - } -{% endstylesheet %} {% schema %} { diff --git a/sections/hero.liquid b/sections/hero.liquid index a589a06..abe965f 100644 --- a/sections/hero.liquid +++ b/sections/hero.liquid @@ -196,359 +196,7 @@ -{% 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 %} + + + - {% if review_items != blank %} -
- {% for review in review_items %} - {% liquid - assign review_field = review.texto | default: review.text | default: review.comentario | default: review.resena - assign review_author = review.autor.value | default: review.autor | default: review.author.value | default: review.nombre.value | default: review.name.value - assign review_stars = review.calificacion.value | default: review.rating.value | default: 5 | round - assign review_photo = review.foto.value | default: review.image.value | default: review.avatar.value - assign review_image = blank - if review_photo.preview_image != blank - assign review_image = review_photo.preview_image - elsif review_photo.width != blank - assign review_image = review_photo - endif - if review_author == blank - assign review_author = 'product_page.reviewer' | t - endif - assign review_initial = review_author | slice: 0, 1 | upcase - assign review_plain = '' - if review.id == blank - assign review_plain = review | strip - endif - %} - {% if review_field != blank or review_plain != blank %} -
3 %}hidden{% endif %}> - {% if review_image %} - {{ review_image | image_url: width: 120 | image_tag: class: 'product__avatar', alt: review_author, loading: 'lazy' }} - {% else %} - - {% endif %} -
-

{{ review_author | escape }}

- -
- {% if review_field != blank %} - {{ review_field | metafield_tag }} - {% else %} - {{ review_plain | escape | newline_to_br }} - {% endif %} -
-
-
- {% endif %} +
+ + + + + + +
+ {{ 'product_page.review_rating' | t }} + {% for star in (1..5) %} + {% endfor %} -
- {% if review_count > 3 %} - - {% endif %} - {% endif %} + + + + + + +
+ {% endif %}
-{% stylesheet %} - .product { - box-sizing: border-box; - width: 100%; - padding: 24px 50px 88px; - background: #fff; - color: #111; - font-family: inherit; - } - - .product__hero { - display: grid; - grid-template-columns: minmax(0, 1.6fr) minmax(340px, 640px); - align-items: start; - gap: 10px; - } - - .product__details { - position: sticky; - top: 24px; - align-self: start; - min-width: 0; - padding: 8px 10px 0 36px; - } - - .product__gallery { - display: flex; - flex-direction: column; - gap: 10px; - min-width: 0; - } - - .product__main-image, - .product__thumbs img { - display: block; - width: 100%; - height: auto; - aspect-ratio: 1; - object-fit: cover; - background: #f4f4f4; - } - - .product__thumbs { - display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 10px; - } - - .product__badges { - display: flex; - flex-wrap: wrap; - gap: 8px; - margin: 0 0 12px; - } - - .product__badge { - display: inline-flex; - align-items: center; - height: 22px; - padding: 0 8px; - border-radius: 4px; - font-size: 12px; - font-weight: 500; - line-height: 1; - } - - .product__badge--best { - background: #bfffb2; - } - - .product__badge--skin { - background: #f7c585; - } - - .product__title { - margin: 0; - font-size: 32px; - line-height: 1.1; - font-weight: 700; - } - - .product__subtitle { - margin: 6px 0 0; - color: #808181; - font-size: 16px; - font-weight: 300; - } - - .product__rating, - .product__summary { - display: flex; - align-items: center; - gap: 8px; - } - - .product__rating { - margin-top: 10px; - } - - .product__reviews-count, - .product__based { - margin: 0; - color: #808181; - font-size: 14px; - font-weight: 300; - } - - .product__stars { - display: inline-flex; - gap: 2px; - color: #111; - } - - .product__star.is-off { - color: #d5d5d5; - } - - .product__price { - display: flex; - align-items: baseline; - gap: 10px; - margin: 12px 0 0; - font-size: 24px; - font-weight: 700; - } - - .product__price s { - color: #808181; - font-size: 18px; - font-weight: 400; - } - - .product__excerpt { - margin: 12px 0 0; - font-size: 16px; - font-weight: 300; - line-height: 1.45; - } - - .product__options-label { - margin: 18px 0 0; - font-size: 16px; - font-weight: 500; - } - - .product__swatches { - display: flex; - gap: 12px; - margin-top: 10px; - overflow-x: auto; - } - - .product__swatch { - width: 140px; - flex: none; - padding: 10px 10px 12px; - border: 1px solid #e6e6e6; - border-radius: 10px; - background: #fff; - text-align: center; - cursor: pointer; - } - - .product__swatch.is-selected { - border-color: #111; - } - - .product__swatch img { - display: block; - width: 120px; - height: 120px; - margin: 0 auto 8px; - object-fit: cover; - } - - .product__swatch span { - display: block; - font-size: 14px; - font-weight: 400; - } - - .product__trust { - display: flex; - flex-direction: column; - gap: 15px; - margin: 18px 0; - padding: 15px 20px; - border: 1px solid #ececec; - border-radius: 12px; - list-style: none; - } - - .product__trust-row { - display: flex; - align-items: center; - gap: 12px; - font-size: 15px; - font-weight: 300; - line-height: 20px; - } - - .product__trust-icon { - display: flex; - flex: none; - width: 20px; - height: 20px; - } - - .product__trust-icon svg { - width: 20px; - height: 20px; - } - - .product__purchase { - display: flex; - gap: 12px; - } - - .product__qty { - display: flex; - flex: none; - align-items: center; - justify-content: space-between; - width: 160px; - height: 50px; - padding: 0 14px; - border: 1px solid #111; - border-radius: 60px; - } - - .product__qty button, - .product__add, - .product__buy, - .product__favorite, - .product__pager button { - font-family: inherit; - } - - .product__qty button { - width: 28px; - height: 28px; - border: 0; - background: transparent; - font-size: 20px; - line-height: 1; - cursor: pointer; - } - - .product__qty input { - width: 42px; - border: 0; - background: transparent; - text-align: center; - font-size: 16px; - -moz-appearance: textfield; - } - - .product__qty input::-webkit-outer-spin-button, - .product__qty input::-webkit-inner-spin-button { - margin: 0; - -webkit-appearance: none; - } - - .product__add, - .product__buy { - height: 50px; - border-radius: 60px; - font-size: 16px; - font-weight: 300; - cursor: pointer; - } - - .product__add { - flex: 1; - border: 0; - background: #111; - color: #fff; - } - - .product__buy { - width: 100%; - margin-top: 10px; - border: 1px solid #111; - background: #fff; - color: #111; - } - - .product__add:disabled, - .product__buy:disabled { - cursor: not-allowed; - opacity: 0.45; - } - - .product__favorite { - display: flex; - align-items: center; - justify-content: center; - gap: 8px; - width: 100%; - height: 50px; - margin-top: 4px; - border: 0; - background: transparent; - font-size: 16px; - font-weight: 300; - cursor: pointer; - } - - .product__favorite.is-active svg path { - fill: currentColor; - } - - .product__accordions { - margin-top: 8px; - border-top: 1px solid #ececec; - } - - .product__accordion { - border-bottom: 1px solid #ececec; - } - - .product__accordion summary { - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; - min-height: 52px; - font-size: 16px; - font-weight: 300; - list-style: none; - cursor: pointer; - } - - .product__accordion summary::-webkit-details-marker { - display: none; - } - - .product__chevron { - flex: none; - transition: transform 0.2s ease; - } - - .product__accordion[open] .product__chevron { - transform: rotate(180deg); - } - - .product__accordion-body { - padding: 0 0 16px; - color: #333; - font-size: 15px; - font-weight: 300; - line-height: 1.5; - } - - .product__accordion-body img { - max-width: 100%; - height: auto; - } - - .product__routine { - margin-top: 28px; - } - - .product__routine-title, - .product__block-title { - margin: 0 0 16px; - font-weight: 500; - } - - .product__routine-title { - font-size: 16px; - } - - .product__block-title { - margin-bottom: 24px; - font-size: 32px; - } - - .product__routine-grid, - .product__also-grid { - display: grid; - gap: 20px; - } - - .product__routine-grid { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - - .product__also-grid { - grid-template-columns: repeat(4, minmax(0, 1fr)); - } - - .product__routine .collection-card__title { - font-size: 15px; - } - - .product__routine .collection-card__subtitle, - .product__routine .collection-card__reviews { - font-size: 12px; - } - - .product__compare { - display: flex; - height: 550px; - margin-top: 56px; - overflow: hidden; - border-radius: 16px; - position: relative; - } - - .product__compare-pane { - position: relative; - flex: 1; - min-width: 0; - } - - .product__compare-pane img { - display: block; - width: 100%; - height: 100%; - object-fit: cover; - } - - .product__compare-label { - position: absolute; - top: 24px; - left: 24px; - display: inline-flex; - align-items: center; - height: 44px; - padding: 0 22px; - border-radius: 999px; - background: #fff; - font-size: 16px; - font-weight: 500; - } - - .product__compare-label--after { - right: 24px; - left: auto; - } - - .product__compare-mark { - position: absolute; - top: 50%; - left: 50%; - width: min(280px, 28%); - height: auto; - transform: translate(-50%, -50%); - filter: brightness(0) invert(1); - pointer-events: none; - } - - .product__also, - .product__reviews { - margin-top: 72px; - } - - .product__score { - margin: 0; - font-size: 28px; - font-weight: 600; - } - - .product__summary { - justify-content: space-between; - align-items: flex-end; - margin-bottom: 8px; - } - - .product__review { - display: grid; - grid-template-columns: 56px minmax(0, 1fr); - gap: 16px; - padding: 20px 0; - border-top: 1px solid #ececec; - } - - .product__avatar { - display: grid; - width: 56px; - height: 56px; - place-items: center; - overflow: hidden; - border-radius: 50%; - background: #f3f3f3; - font-weight: 600; - } - - img.product__avatar { - display: block; - object-fit: cover; - } - - .product__review-name { - margin: 0 0 6px; - font-size: 16px; - font-weight: 600; - } - - .product__review-text { - margin-top: 8px; - font-size: 15px; - font-weight: 300; - line-height: 1.5; - } - - .product__pager { - display: flex; - justify-content: center; - gap: 8px; - margin-top: 28px; - } - - .product__pager button { - display: grid; - width: 40px; - height: 40px; - place-items: center; - border: 0; - border-radius: 50%; - background: transparent; - cursor: pointer; - } - - .product__pager button.is-current { - background: #111; - color: #fff; - } - - .product__pager [data-review-next] { - background: #c9c9c9; - } - - .product [hidden] { - display: none !important; - } - - @media (max-width: 1119px) { - .product { - padding: 16px 20px 64px; - } - - .product__hero { - grid-template-columns: 1fr; - } - - .product__details { - position: static; - padding: 24px 0 0; - } - - .product__also-grid { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - - .product__compare { - height: 360px; - } - } - - @media (max-width: 767px) { - .product { - padding: 12px 16px 56px; - } - - .product__title { - font-size: 26px; - } - - .product__block-title { - font-size: 24px; - } - - .product__compare { - height: 240px; - margin-top: 32px; - border-radius: 12px; - } - - .product__compare-label { - top: 12px; - left: 12px; - height: 34px; - padding: 0 14px; - font-size: 13px; - } - - .product__compare-label--after { - right: 12px; - } - - .product__compare-mark { - display: none; - } - - .product__also, - .product__reviews { - margin-top: 40px; - } - - .product__summary { - align-items: flex-start; - flex-direction: column; - } - } -{% endstylesheet %} - {% javascript %} (() => { if (window.__seasonProduct) return; @@ -1170,6 +658,24 @@ } }; + const readWishlist = () => { + try { + const stored = JSON.parse(window.localStorage.getItem(wishlistKey)); + if (!Array.isArray(stored)) return []; + return stored.map((item) => { + if (item && typeof item === 'object') return { id: String(item.id || ''), handle: String(item.handle || '') }; + return { id: String(item), handle: '' }; + }).filter((item) => item.id); + } catch (error) { + return []; + } + }; + + const writeWishlist = (items) => { + window.localStorage.setItem(wishlistKey, JSON.stringify(items)); + document.dispatchEvent(new CustomEvent('seasons:wishlist')); + }; + const root = document.querySelector('[data-product-page]'); if (!root) return; @@ -1180,7 +686,7 @@ } const applyWish = () => { - const saved = readList(wishlistKey); + const saved = readWishlist().map((item) => item.id); root.querySelectorAll('[data-product-wish]').forEach((button) => { const active = saved.includes(String(button.dataset.productId)); button.classList.toggle('is-active', active); @@ -1191,6 +697,60 @@ }; applyWish(); + document.addEventListener('seasons:wishlist', applyWish); + + root.querySelectorAll('.product__accordion').forEach((details) => { + details.addEventListener('toggle', () => { + if (!details.open) return; + root.querySelectorAll('.product__accordion[open]').forEach((other) => { + if (other !== details) other.open = false; + }); + }); + }); + + const thumbs = root.querySelector('[data-product-thumbs]'); + if (thumbs) { + let pointerId = null; + let startX = 0; + let startScroll = 0; + + thumbs.addEventListener('pointerdown', (event) => { + if (event.pointerType !== 'mouse' || event.button !== 0) return; + pointerId = event.pointerId; + startX = event.clientX; + startScroll = thumbs.scrollLeft; + thumbs.classList.add('is-dragging'); + thumbs.setPointerCapture(pointerId); + }); + + thumbs.addEventListener('pointermove', (event) => { + if (event.pointerId !== pointerId) return; + thumbs.scrollLeft = startScroll - (event.clientX - startX); + }); + + const endDrag = (event) => { + if (event.pointerId !== pointerId) return; + pointerId = null; + thumbs.classList.remove('is-dragging'); + }; + + thumbs.addEventListener('pointerup', endDrag); + thumbs.addEventListener('pointercancel', endDrag); + thumbs.addEventListener('dragstart', (event) => event.preventDefault()); + + const progress = root.querySelector('[data-gallery-progress]'); + const mark = progress ? progress.querySelector('span') : null; + const syncProgress = () => { + if (!mark || !thumbs.clientWidth) return; + const slides = thumbs.children.length; + const index = Math.max(0, Math.min(slides - 1, Math.round(thumbs.scrollLeft / thumbs.clientWidth))); + mark.style.transform = 'translateX(' + (index * 100) + '%)'; + if (progress) progress.setAttribute('aria-valuenow', String(index + 1)); + }; + thumbs.addEventListener('scroll', syncProgress, { passive: true }); + window.addEventListener('resize', syncProgress); + syncProgress(); + } const form = root.querySelector('.product__form'); const qtyInput = root.querySelector('[data-qty-input]'); @@ -1199,10 +759,13 @@ const wish = event.target.closest('[data-product-wish]'); if (wish && root.contains(wish)) { const id = String(wish.dataset.productId || ''); + const handle = String(wish.dataset.productHandle || ''); if (!id) return; - const saved = readList(wishlistKey); - const next = saved.includes(id) ? saved.filter((item) => item !== id) : saved.concat(id); - window.localStorage.setItem(wishlistKey, JSON.stringify(next)); + const saved = readWishlist(); + const next = saved.some((item) => item.id === id) + ? saved.filter((item) => item.id !== id) + : saved.concat({ id, handle }); + writeWishlist(next); applyWish(); return; } @@ -1241,16 +804,28 @@ const available = option.dataset.available === 'true'; const addButton = root.querySelector('[data-add]'); const buyButton = root.querySelector('[data-buy]'); + const stickyAdd = root.querySelector('[data-sticky-add]'); + const stickyPrice = root.querySelector('[data-sticky-price]'); if (addButton) { addButton.disabled = !available; addButton.textContent = available ? addButton.dataset.label || addButton.textContent : addButton.dataset.soldOut || addButton.textContent; } + if (stickyAdd) { + stickyAdd.disabled = !available; + stickyAdd.textContent = available ? stickyAdd.dataset.label || stickyAdd.textContent : stickyAdd.dataset.soldOut || stickyAdd.textContent; + } + if (stickyPrice) stickyPrice.textContent = option.dataset.price || ''; if (buyButton) buyButton.disabled = !available; const main = root.querySelector('[data-main-image]'); if (main && option.dataset.image) { main.removeAttribute('srcset'); main.src = option.dataset.image; } + const stickyImage = root.querySelector('[data-sticky-image]'); + if (stickyImage && option.dataset.image) { + stickyImage.removeAttribute('srcset'); + stickyImage.src = option.dataset.image; + } }); form?.addEventListener('submit', async (event) => { @@ -1343,33 +918,163 @@ } })(); - const reviewNodes = [...root.querySelectorAll('[data-review]')]; - const pager = root.querySelector('[data-review-pager]'); - if (reviewNodes.length && pager) { - const pageSize = 3; - const pageButtons = [...pager.querySelectorAll('[data-review-page]')]; - const showPage = (page) => { - const maxPage = Math.max(0, pageButtons.length - 1); - const nextPage = Math.min(Math.max(0, page), maxPage); - reviewNodes.forEach((node, index) => { - const visible = index >= nextPage * pageSize && index < (nextPage + 1) * pageSize; - node.hidden = !visible; - }); - pageButtons.forEach((button) => { - button.classList.toggle('is-current', Number(button.dataset.reviewPage) === nextPage); - }); - pager.dataset.page = String(nextPage); + const reviewsRoot = root.querySelector('[data-product-reviews]'); + if (reviewsRoot) { + const list = reviewsRoot.querySelector('[data-review-list]'); + const more = reviewsRoot.querySelector('[data-review-more]'); + const writeButton = reviewsRoot.querySelector('[data-write-review]'); + const writeForm = reviewsRoot.querySelector('#product-review-form'); + const cache = new Map(); + let productExternalId = reviewsRoot.dataset.productId; + let currentPage = 1; + let loading = false; + const reviewsShop = reviewsRoot.dataset.reviewsShop || reviewsRoot.dataset.shop; + const starPath = 'M7 1.2l1.45 3.22 3.5.4-2.62 2.38.74 3.46L7 8.95 3.93 10.66l.74-3.46L2.05 4.82l3.5-.4L7 1.2z'; + + const plainText = (html) => { + const parsed = new DOMParser().parseFromString(html || '', 'text/html'); + return (parsed.body.textContent || '').trim(); }; - pager.addEventListener('click', (event) => { - const pageButton = event.target.closest('[data-review-page]'); - if (pageButton) { - showPage(Number(pageButton.dataset.reviewPage)); - return; + + const renderReviews = (reviews, append) => { + if (!append) list.replaceChildren(); + reviews.forEach((review) => { + const rating = Math.max(1, Math.min(5, Math.round(Number(review.rating) || 0))); + const article = document.createElement('article'); + article.className = 'product__review'; + article.dataset.review = ''; + + const stars = document.createElement('span'); + stars.className = 'product__stars'; + stars.setAttribute('aria-label', rating + ' de 5'); + for (let star = 1; star <= 5; star += 1) { + const icon = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); + icon.setAttribute('class', 'product__star' + (star > rating ? ' is-off' : '')); + icon.setAttribute('width', '16'); + icon.setAttribute('height', '16'); + icon.setAttribute('viewBox', '0 0 14 14'); + icon.setAttribute('aria-hidden', 'true'); + const path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); + path.setAttribute('d', starPath); + path.setAttribute('fill', 'currentColor'); + icon.append(path); + stars.append(icon); + } + + const person = document.createElement('div'); + person.className = 'product__review-person'; + const avatar = document.createElement('span'); + avatar.className = 'product__avatar'; + avatar.setAttribute('aria-hidden', 'true'); + avatar.innerHTML = ''; + const name = document.createElement('p'); + name.className = 'product__review-name'; + name.textContent = review.reviewer_name || 'Cliente'; + person.append(avatar, name); + + const text = document.createElement('p'); + text.className = 'product__review-text'; + const body = plainText(review.body_html); + text.textContent = body || review.title || ''; + + article.append(stars, person, text); + list.append(article); + }); + }; + + const updateMore = (page, total) => { + currentPage = page; + if (!more) return; + more.hidden = page >= total; + }; + + const loadPage = async (page, append) => { + if (loading || !productExternalId || !reviewsShop) return; + loading = true; + if (more) more.disabled = true; + try { + if (!cache.has(page)) { + const url = new URL('https://judge.me/reviews/reviews_for_widget'); + url.searchParams.set('url', reviewsShop); + url.searchParams.set('shop_domain', reviewsShop); + url.searchParams.set('platform', 'shopify'); + url.searchParams.set('page', String(page)); + url.searchParams.set('per_page', '3'); + url.searchParams.set('product_id', String(productExternalId)); + const response = await fetch(url); + if (!response.ok) return; + cache.set(page, await response.json()); + } + const data = cache.get(page); + renderReviews(data.reviews || [], append); + updateMore(page, data.pagination ? data.pagination.total_pages : 1); + } finally { + loading = false; + if (more) more.disabled = false; } - if (event.target.closest('[data-review-next]')) { - showPage(Number(pager.dataset.page || 0) + 1); - } - }); + }; + + const resolveProduct = async () => { + if (!reviewsShop || reviewsShop === reviewsRoot.dataset.shop) return; + const storefront = (reviewsRoot.dataset.reviewsStorefront || '').replace(/\/$/, ''); + const handle = reviewsRoot.dataset.productHandle; + if (!storefront || !handle) return; + const response = await fetch(storefront + '/products/' + handle + '.js'); + if (!response.ok) return; + const product = await response.json(); + if (product && product.id) productExternalId = String(product.id); + }; + + if (more) { + more.addEventListener('click', () => { + loadPage(currentPage + 1, true); + }); + } + + resolveProduct().then(() => loadPage(1, false)).catch(() => {}); + + if (writeButton && writeForm) { + const openForm = (open) => { + writeForm.classList.toggle('is-open', open); + writeButton.setAttribute('aria-expanded', open ? 'true' : 'false'); + }; + writeButton.addEventListener('click', () => { + openForm(!writeForm.classList.contains('is-open')); + }); + writeForm.addEventListener('submit', async (event) => { + event.preventDefault(); + const success = writeForm.querySelector('.product__write-success'); + const error = writeForm.querySelector('.product__write-error'); + if (success) success.hidden = true; + if (error) error.hidden = true; + const payload = new URLSearchParams(); + payload.set('shop_domain', reviewsShop); + payload.set('platform', 'shopify'); + payload.set('id', String(productExternalId || '')); + payload.set('name', writeForm.reviewer_name.value); + payload.set('email', writeForm.reviewer_email.value); + payload.set('rating', (writeForm.querySelector('input[name="score"]:checked') || {}).value || '5'); + payload.set('body', writeForm.review_body.value); + try { + const response = await fetch('https://api.judge.me/api/v1/reviews', { + method: 'POST', + headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + body: payload, + }); + if (!response.ok) throw new Error('review'); + if (success) { + success.hidden = false; + success.textContent = writeForm.dataset.sent || ''; + } + writeForm.reset(); + } catch (submitError) { + if (error) { + error.hidden = false; + error.textContent = writeForm.dataset.error || ''; + } + } + }); + } } })(); {% endjavascript %} @@ -1381,6 +1086,20 @@ { "type": "paragraph", "content": "t:product_page.metafields" + }, + { + "type": "text", + "id": "reviews_shop", + "label": "t:product_page.reviews_shop", + "info": "t:product_page.reviews_shop_info", + "default": "seasons-world.myshopify.com" + }, + { + "type": "text", + "id": "reviews_storefront", + "label": "t:product_page.reviews_storefront", + "info": "t:product_page.reviews_storefront_info", + "default": "https://www.seasonsmexico.com" } ], "disabled_on": { diff --git a/sections/recently-viewed.liquid b/sections/recently-viewed.liquid index a2e2547..6e3ce33 100644 --- a/sections/recently-viewed.liquid +++ b/sections/recently-viewed.liquid @@ -12,54 +12,6 @@ -{% 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; diff --git a/sections/routine.liquid b/sections/routine.liquid index bbbf2be..9de1b92 100644 --- a/sections/routine.liquid +++ b/sections/routine.liquid @@ -29,7 +29,7 @@ widths: '400, 800, 1200, 1700', sizes: '(max-width: 1024px) calc(100vw - 30px), 50vw', class: 'routine__cover-image', - loading: 'eager' + loading: 'lazy' }} {% else %} {{ heading | escape }} {% endif %}

{{ heading | escape | newline_to_br }}

@@ -53,7 +57,21 @@ assign step_title = step_key | t endif - if block.settings.link != blank + assign step_url = block.settings.link + if step_url == blank + case forloop.index + when 1 + assign step_url = '/collections/1-limpia' + when 2 + assign step_url = '/collections/2-trata' + when 3 + assign step_url = '/collections/3-hidrata' + when 4 + assign step_url = '/collections/4-protege-bloqueadores-solares' + endcase + endif + + if step_url != blank assign step_tag = 'a' else assign step_tag = 'div' @@ -76,7 +94,7 @@ class="routine__card" {{ block.shopify_attributes }} {% if step_tag == 'a' %} - href="{{ block.settings.link }}" + href="{{ step_url }}" {% endif %} > @@ -98,6 +116,10 @@ alt="{{ step_title | escape }}" width="415" height="436" + srcset="{{ fallback_image | replace: '.avif', '-sm.avif' | asset_url }} 450w, {{ fallback_image | asset_url }} 750w" + sizes="(max-width: 1024px) 245px, 415px" + loading="lazy" + decoding="async" > {% endif %} @@ -122,208 +144,6 @@ -{% 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", diff --git a/sections/search.liquid b/sections/search.liquid index 7177c18..84e4434 100644 --- a/sections/search.liquid +++ b/sections/search.liquid @@ -1,66 +1,94 @@ -{% comment %} - This section is used in the search template to render search results for - products, articles, and pages. +{% liquid + assign search_heading = search.terms | remove: '*' | strip + if search_heading == blank + assign search_heading = 'search.title' | t + endif +%} - https://shopify.dev/docs/storefronts/themes/architecture/templates/search -{% endcomment %} +
+
+

{{ search_heading | escape }}

-

{{ 'search.title' | t }}

+ -
- - -
+ {% if search.performed %} + {% if search.results_count == 0 %} +

{{ 'search.no_results_html' | t: terms: search_heading }}

+ {% else %} +

{{ 'search.results_for_html' | t: terms: search_heading, count: search.results_count }}

-{% if search.performed %} - {% if search.results_count == 0 %} -

{{ 'search.no_results_html' | t: terms: search.terms }}

- {% else %} -

{{ 'search.results_for_html' | t: terms: search.terms, count: search.results_count }}

- -
- {% paginate search.results by 20 %} - {% # Search result items may be an article, a page, or a product. %} - {% for result in search.results %} -
- {% assign featured_image = result.featured_image | default: result.image %} - {% if featured_image %} - {% render 'image', class: 'search-result__image', image: featured_image, url: result.url, width: 400 %} - {% endif %} -
-

- {{ result.title | link_to: result.url }} - {% if result.price %} - {{ result.price | money_with_currency }} - {% endif %} -

-
+ {% paginate search.results by 9 %} +
+ {% for result in search.results %} + {% if result.object_type == 'product' %} + {% assign card_suffix = section.id | append: '-' | append: forloop.index %} + {% render 'collection-card', product: result, form_suffix: card_suffix %} + {% else %} + {% assign result_image = result.image | default: result.featured_image %} + + {% endif %} + {% endfor %}
- {% endfor %} - {{ paginate | default_pagination }} - {% endpaginate %} -
- {% endif %} -{% endif %} + {% if paginate.pages > 1 %} + + {% endif %} + {% endpaginate %} + {% endif %} + {% endif %} +
+
+ -{% stylesheet %} - .search-results { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); - } - .search-results .prev, - .search-results .page, - .search-results .next { - grid-column: 1 / -1; - } -{% endstylesheet %} {% schema %} { diff --git a/sections/signup.liquid b/sections/signup.liquid index 3e74305..04da024 100644 --- a/sections/signup.liquid +++ b/sections/signup.liquid @@ -48,6 +48,8 @@ alt="" width="317" height="360" + loading="lazy" + decoding="async" > @@ -92,7 +94,10 @@ > @@ -115,252 +120,6 @@ -{% 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", diff --git a/sections/skin-match.liquid b/sections/skin-match.liquid index b1b591d..6a654d7 100644 --- a/sections/skin-match.liquid +++ b/sections/skin-match.liquid @@ -44,6 +44,7 @@ width="308" height="301" loading="lazy" + decoding="async" > @@ -100,9 +104,12 @@ class="skin-match__image skin-match__image--serum" src="{{ 'skin-match-photo-serum.avif' | asset_url }}" alt="{{ serum_alt | escape }}" - width="1333" - height="2000" + width="720" + height="1080" loading="lazy" + srcset="{{ 'skin-match-photo-serum-sm.avif' | asset_url }} 460w, {{ 'skin-match-photo-serum.avif' | asset_url }} 720w" + sizes="(max-width: 1024px) 251px, 482px" + decoding="async" > {% endif %} @@ -124,9 +131,12 @@ class="skin-match__image skin-match__image--dropper" src="{{ 'skin-match-photo-dropper.avif' | asset_url }}" alt="{{ dropper_alt | escape }}" - width="2498" - height="3123" + width="600" + height="750" loading="lazy" + srcset="{{ 'skin-match-photo-dropper-sm.avif' | asset_url }} 360w, {{ 'skin-match-photo-dropper.avif' | asset_url }} 600w" + sizes="(max-width: 1024px) 188px, 324px" + decoding="async" > {% endif %} @@ -148,9 +158,12 @@ class="skin-match__image skin-match__image--cheek" src="{{ 'skin-match-photo-cheek.avif' | asset_url }}" alt="{{ cheek_alt | escape }}" - width="3043" - height="3043" + width="600" + height="600" loading="lazy" + srcset="{{ 'skin-match-photo-cheek-sm.avif' | asset_url }} 360w, {{ 'skin-match-photo-cheek.avif' | asset_url }} 600w" + sizes="(max-width: 1024px) 193px, 332px" + decoding="async" > {% endif %} @@ -172,9 +185,12 @@ class="skin-match__image skin-match__image--jar" src="{{ 'skin-match-photo-jar.avif' | asset_url }}" alt="{{ jar_alt | escape }}" - width="4096" - height="2731" + width="1440" + height="960" loading="lazy" + srcset="{{ 'skin-match-photo-jar-sm.avif' | asset_url }} 960w, {{ 'skin-match-photo-jar.avif' | asset_url }} 1440w" + sizes="(max-width: 1024px) 522px, 1002px" + decoding="async" > {% endif %} @@ -189,340 +205,14 @@ {{ button_label | escape }} {% else %} - {{ button_label | escape }} + {% endif %} -{% 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", diff --git a/sections/testimonials.liquid b/sections/testimonials.liquid index b8271b1..d10d5f2 100644 --- a/sections/testimonials.liquid +++ b/sections/testimonials.liquid @@ -25,6 +25,8 @@ alt="" width="434" height="486" + loading="lazy" + decoding="async" >
@@ -45,7 +47,7 @@ {% unless forloop.first %}hidden{% endunless %} >
-
+ -{% stylesheet %} - .collection-card { - display: flex; - flex-direction: column; - gap: 15px; - min-width: 0; - } - - .collection-card__media { - position: relative; - aspect-ratio: 1; - overflow: hidden; - border-radius: 10px; - background: #fff; - } - - .collection-card__link { - position: absolute; - inset: 0; - display: block; - } - - .collection-card__image { - display: block; - width: 100%; - height: 100%; - object-fit: cover; - } - - .collection-card__image--hover { - position: absolute; - inset: 0; - opacity: 0; - transition: opacity 0.35s ease; - } - - .collection-card__media:hover .collection-card__image--hover, - .collection-card__media:focus-within .collection-card__image--hover { - opacity: 1; - } - - .collection-card__image--empty { - background: #f3f3f3; - } - - .collection-card__badges { - position: absolute; - top: 10px; - left: 10px; - z-index: 1; - display: flex; - flex-direction: column; - align-items: flex-start; - gap: 4px; - } - - .collection-card__badge { - display: inline-flex; - align-items: center; - padding: 3px 5px; - border-radius: 2px; - color: #000; - font-size: 10px; - font-weight: 300; - line-height: normal; - text-transform: uppercase; - } - - .collection-card__badge--best { - background: #bfffb2; - } - - .collection-card__badge--skin { - background: #f7c585; - } - - .collection-card__wish { - position: absolute; - top: 16px; - right: 16px; - z-index: 2; - display: grid; - width: 25px; - height: 25px; - place-items: center; - padding: 0; - border: 0; - background: transparent; - cursor: pointer; - } - - .collection-card__wish svg { - display: block; - width: 25px; - height: 25px; - } - - .collection-card__wish.is-active svg path { - fill: #000; - } - - .collection-card__actions { - position: absolute; - right: 16px; - bottom: 16px; - left: 16px; - z-index: 2; - display: flex; - gap: 10px; - margin: 0; - opacity: 0; - pointer-events: none; - transition: opacity 0.25s ease; - } - - .collection-card__media:hover .collection-card__actions, - .collection-card__media:focus-within .collection-card__actions { - opacity: 1; - pointer-events: auto; - } - - .collection-card__add, - .collection-card__buy { - flex: 1 1 0; - height: 48px; - border-radius: 60px; - font: inherit; - font-size: 14px; - font-weight: 500; - line-height: 1; - cursor: pointer; - } - - .collection-card__add { - border: 1px solid #111; - background: #fff; - color: #000; - } - - .collection-card__buy { - border: 0; - background: #9dd6c7; - color: #000; - } - - .collection-card__add:disabled, - .collection-card__buy:disabled { - cursor: default; - opacity: 0.55; - } - - .collection-card__info { - display: flex; - flex-direction: column; - gap: 5px; - } - - .collection-card__title { - color: #000; - font-size: 22px; - font-weight: 700; - line-height: normal; - text-decoration: none; - } - - .collection-card__subtitle, - .collection-card__reviews, - .collection-card__prices { - margin: 0; - } - - .collection-card__subtitle { - color: #808181; - font-size: 18px; - font-weight: 300; - line-height: normal; - } - - .collection-card__rating { - display: flex; - align-items: center; - gap: 10px; - } - - .collection-card__stars { - display: flex; - gap: 1px; - color: #000; - } - - .collection-card__star { - display: block; - width: 14px; - height: 14px; - } - - .collection-card__star.is-off { - opacity: 0.25; - } - - .collection-card__reviews { - color: #000; - font-size: 14px; - font-weight: 300; - } - - .collection-card__prices { - display: flex; - align-items: baseline; - gap: 16px; - } - - .collection-card__price, - .collection-card__compare { - font-size: 20px; - line-height: normal; - } - - .collection-card__price { - font-weight: 700; - } - - .collection-card__compare { - color: #808181; - font-weight: 400; - } - - .recent .collection-card__title { - font-size: 18px; - } - - .recent .collection-card__subtitle, - .recent .collection-card__reviews { - font-size: 14px; - } - - .recent .collection-card__price, - .recent .collection-card__compare { - font-size: 16px; - } - - .recent .collection-card__star { - width: 10px; - height: 10px; - } - - @media (max-width: 767px) { - .collection-card { - gap: 10px; - } - - .collection-card__media { - aspect-ratio: auto; - overflow: visible; - background: transparent; - } - - .collection-card__link { - position: relative; - aspect-ratio: 1; - overflow: hidden; - border-radius: 10px; - background: #fff; - } - - .collection-card__image { - position: absolute; - inset: 0; - } - - .collection-card__actions { - position: static; - opacity: 1; - pointer-events: auto; - margin-top: 8px; - } - - .collection-card__add, - .collection-card__buy { - height: 36px; - font-size: 11px; - } - - .collection-card__title, - .recent .collection-card__title { - font-size: 12px; - } - - .collection-card__subtitle, - .recent .collection-card__subtitle { - font-size: 10px; - } - - .collection-card__price, - .collection-card__compare, - .recent .collection-card__price, - .recent .collection-card__compare { - font-size: 12px; - } - - .collection-card__reviews, - .recent .collection-card__reviews { - display: none; - } - - .collection-card__wish { - top: 8px; - right: 8px; - } - - .collection-card__wish svg { - width: 18px; - height: 18px; - } - } - - @media (prefers-reduced-motion: reduce) { - .collection-card__image--hover, - .collection-card__actions { - transition: none; - } - } -{% endstylesheet %} - {% javascript %} (() => { if (window.__seasonCollectionCard) return; @@ -508,14 +185,18 @@ const readWishlist = () => { try { const stored = JSON.parse(window.localStorage.getItem(wishlistKey)); - return Array.isArray(stored) ? stored.map(String) : []; + if (!Array.isArray(stored)) return []; + return stored.map((item) => { + if (item && typeof item === 'object') return { id: String(item.id || ''), handle: String(item.handle || '') }; + return { id: String(item), handle: '' }; + }).filter((item) => item.id); } catch (error) { return []; } }; const applyWishlist = () => { - const saved = readWishlist(); + const saved = readWishlist().map((item) => item.id); document.querySelectorAll('.collection-card [data-wishlist]').forEach((button) => { const active = saved.includes(String(button.dataset.productId)); button.classList.toggle('is-active', active); @@ -526,15 +207,20 @@ }; applyWishlist(); + document.addEventListener('seasons:wishlist', applyWishlist); document.addEventListener('click', (event) => { const wish = event.target.closest('.collection-card [data-wishlist]'); if (!wish) return; const id = String(wish.dataset.productId || ''); + const handle = String(wish.dataset.productHandle || ''); if (!id) return; const saved = readWishlist(); - const next = saved.includes(id) ? saved.filter((item) => item !== id) : saved.concat(id); + const next = saved.some((item) => item.id === id) + ? saved.filter((item) => item.id !== id) + : saved.concat({ id, handle }); window.localStorage.setItem(wishlistKey, JSON.stringify(next)); + document.dispatchEvent(new CustomEvent('seasons:wishlist')); applyWishlist(); }); diff --git a/snippets/delay-header-scripts.liquid b/snippets/delay-header-scripts.liquid index d860738..4c74d8d 100644 --- a/snippets/delay-header-scripts.liquid +++ b/snippets/delay-header-scripts.liquid @@ -9,10 +9,16 @@ {% render 'delay-header-scripts', html: shopify_header %} {% enddoc %} +{% capture blocking_style %}rel="stylesheet" media="screen"{% endcapture %} +{% capture deferred_style %}rel="stylesheet" media="print" onload="this.media='all'"{% endcapture %} + {% liquid if request.design_mode or html == blank echo html else + assign blocking_style = blocking_style | strip + assign deferred_style = deferred_style | strip + assign html = html | replace: 'media="screen"', 'media="print" onload="this.media='all'"' assign chunks = html | split: ' @font-face { font-family: Archivo; - src: url('{{ 'archivo-light.ttf' | asset_url }}') format('truetype'); + src: url('{{ 'archivo-light.woff2' | asset_url }}') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @font-face { font-family: Archivo; - src: url('{{ 'archivo-regular.ttf' | asset_url }}') format('truetype'); + src: url('{{ 'archivo-regular.woff2' | asset_url }}') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @font-face { font-family: Archivo; - src: url('{{ 'archivo-medium.ttf' | asset_url }}') format('truetype'); + src: url('{{ 'archivo-medium.woff2' | asset_url }}') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @font-face { font-family: Archivo; - src: url('{{ 'archivo-bold.ttf' | asset_url }}') format('truetype'); + src: url('{{ 'archivo-bold.woff2' | asset_url }}') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } body { diff --git a/snippets/glow-army-page.liquid b/snippets/glow-army-page.liquid new file mode 100644 index 0000000..1ec95f6 --- /dev/null +++ b/snippets/glow-army-page.liquid @@ -0,0 +1,247 @@ +{% doc %} + Renders the Glow Army rewards page. + + When the Glow Army section renders this snippet, its settings and blocks are used. + On the default page template it falls back to the theme copy. + + @example + {% render 'glow-army-page' %} +{% enddoc %} + +{% liquid + assign glow_editor = false + if section.type == 'glow-army' + assign glow_editor = true + endif + + assign heading = 'glow_army.heading' | t + if glow_editor + if section.settings.heading != blank + assign heading = section.settings.heading + endif + endif + + assign intro = 'glow_army.text' | t + assign join_label = 'glow_army.join' | t + assign points_label = 'glow_army.points' | t + assign join_url = routes.account_register_url + assign points_url = routes.account_url + assign how_heading = 'glow_army.how' | t + assign earn_heading = 'glow_army.earn' | t + assign redeem_heading = 'glow_army.redeem' | t + assign referral_heading = 'glow_army.referral_heading' | t + assign referral_text = 'glow_army.referral_text' | t + assign referral_button = 'glow_army.referral_button' | t + assign referral_url = join_url + + if glow_editor + if section.settings.text != blank + assign intro = section.settings.text + endif + if section.settings.join_label != blank + assign join_label = section.settings.join_label + endif + if section.settings.points_label != blank + assign points_label = section.settings.points_label + endif + if section.settings.join_link != blank + assign join_url = section.settings.join_link + endif + if section.settings.points_link != blank + assign points_url = section.settings.points_link + endif + if section.settings.how_heading != blank + assign how_heading = section.settings.how_heading + endif + if section.settings.earn_heading != blank + assign earn_heading = section.settings.earn_heading + endif + if section.settings.redeem_heading != blank + assign redeem_heading = section.settings.redeem_heading + endif + if section.settings.referral_heading != blank + assign referral_heading = section.settings.referral_heading + endif + if section.settings.referral_text != blank + assign referral_text = section.settings.referral_text + endif + if section.settings.referral_button != blank + assign referral_button = section.settings.referral_button + endif + if section.settings.referral_link != blank + assign referral_url = section.settings.referral_link + endif + endif +%} + +
+
+
+

{{ heading }}

+

{{ intro }}

+ +
+
+ + {% if section.blocks.size > 0 %} +
+ {% assign step_count = 0 %} + {% assign earn_count = 0 %} + {% assign reward_count = 0 %} + {% for block in section.blocks %} + {% if block.type == 'step' %} + {% assign step_count = step_count | plus: 1 %} + {% endif %} + {% if block.type == 'earn' %} + {% assign earn_count = earn_count | plus: 1 %} + {% endif %} + {% if block.type == 'reward' %} + {% assign reward_count = reward_count | plus: 1 %} + {% endif %} + {% endfor %} + + {% if step_count > 0 %} +
+

{{ how_heading }}

+
    + {% for block in section.blocks %} + {% if block.type == 'step' %} +
  1. +

    {{ block.settings.number }}

    +

    {{ block.settings.title }}

    +

    {{ block.settings.text }}

    +
  2. + {% endif %} + {% endfor %} +
+
+ {% endif %} + + {% if earn_count > 0 %} +
+

{{ earn_heading }}

+
    + {% for block in section.blocks %} + {% if block.type == 'earn' %} +
  • + +

    {{ block.settings.title }}

    +

    {{ block.settings.text }}

    +
  • + {% endif %} + {% endfor %} +
+
+ {% endif %} + + {% if reward_count > 0 %} +
+

{{ redeem_heading }}

+
    + {% for block in section.blocks %} + {% if block.type == 'reward' %} +
  • + {% if block.settings.image != blank %} + {{ + block.settings.image + | image_url: width: 160 + | image_tag: class: 'glow-army__reward-image', alt: block.settings.title, widths: '80, 160', loading: 'lazy' + }} + {% endif %} +

    {{ block.settings.title }}

    +

    {{ block.settings.text }}

    +
  • + {% endif %} + {% endfor %} +
+
+ {% endif %} +
+ {% else %} +
+
+

{{ how_heading }}

+
    +
  1. +

    01

    +

    {{ 'glow_army.steps.one_title' | t }}

    +

    {{ 'glow_army.steps.one_text' | t }}

    +
  2. +
  3. +

    02

    +

    {{ 'glow_army.steps.two_title' | t }}

    +

    {{ 'glow_army.steps.two_text' | t }}

    +
  4. +
  5. +

    03

    +

    {{ 'glow_army.steps.three_title' | t }}

    +

    {{ 'glow_army.steps.three_text' | t }}

    +
  6. +
+
+
+

{{ earn_heading }}

+
    +
  • + +

    {{ 'glow_army.earn_items.order_title' | t }}

    +

    {{ 'glow_army.earn_items.order_text' | t }}

    +
  • +
  • + +

    {{ 'glow_army.earn_items.birthday_title' | t }}

    +

    {{ 'glow_army.earn_items.birthday_text' | t }}

    +
  • +
  • + +

    {{ 'glow_army.earn_items.review_title' | t }}

    +

    {{ 'glow_army.earn_items.review_text' | t }}

    +
  • +
  • + +

    {{ 'glow_army.earn_items.profile_title' | t }}

    +

    {{ 'glow_army.earn_items.profile_text' | t }}

    +
  • +
+
+
+

{{ redeem_heading }}

+
    +
  • {{ 'glow_army.rewards.rate_title' | t }}

    {{ 'glow_army.rewards.rate_text' | t }}

  • +
  • {{ 'glow_army.rewards.off_50_title' | t }}

    {{ 'glow_army.rewards.off_50_text' | t }}

  • +
  • {{ 'glow_army.rewards.balm_title' | t }}

    {{ 'glow_army.rewards.balm_text' | t }}

  • +
  • {{ 'glow_army.rewards.off_100_title' | t }}

    {{ 'glow_army.rewards.off_100_text' | t }}

  • +
  • {{ 'glow_army.rewards.toner_title' | t }}

    {{ 'glow_army.rewards.toner_text' | t }}

  • +
  • {{ 'glow_army.rewards.off_200_title' | t }}

    {{ 'glow_army.rewards.off_200_text' | t }}

  • +
  • {{ 'glow_army.rewards.off_300_title' | t }}

    {{ 'glow_army.rewards.off_300_text' | t }}

  • +
  • {{ 'glow_army.rewards.sunscreen_title' | t }}

    {{ 'glow_army.rewards.sunscreen_text' | t }}

  • +
+
+
+ {% endif %} + +
+
+

{{ referral_heading }}

+

{{ referral_text }}

+ {{ referral_button }} +
+
+
+ + + diff --git a/snippets/header-menu-item.liquid b/snippets/header-menu-item.liquid index 08f3a7d..fe2d67e 100644 --- a/snippets/header-menu-item.liquid +++ b/snippets/header-menu-item.liquid @@ -8,6 +8,7 @@ @param {string} url - Link URL @param {link[]} [child_links] - Nested links from a menu @param {string} [child_menu] - Fallback items as `Label::/url`, separated by `|` + @param {string} [image_set] - Card images: categories, routine, skin or concern @param {boolean} [show_caret] - Shows a decorative caret when there are no child links @example @@ -24,6 +25,80 @@ assign manual_items = child_menu | strip | split: '|' assign child_count = manual_items.size endif + + assign cards = false + if child_menu contains '/collections/1-limpia' + assign cards = true + endif + if child_menu contains '/collections/2-trata' + assign cards = true + endif + if child_menu contains '/collections/3-hidrata' + assign cards = true + endif + if child_menu contains '/collections/4-protege-bloqueadores-solares' + assign cards = true + endif + if child_menu contains '/collections/kits-skincare-facial' + assign cards = true + endif + if child_menu contains '/collections/piel-mixta-grasa' + assign cards = true + endif + if child_menu contains '/collections/piel-grasa' + assign cards = true + endif + if child_menu contains '/collections/piel-seca-1' + assign cards = true + endif + if child_links != blank + for child in child_links + if child.url contains '/collections/1-limpia' + assign cards = true + endif + if child.url contains '/collections/2-trata' + assign cards = true + endif + if child.url contains '/collections/3-hidrata' + assign cards = true + endif + if child.url contains '/collections/4-protege-bloqueadores-solares' + assign cards = true + endif + if child.url contains '/collections/kits-skincare-facial' + assign cards = true + endif + if child.url contains '/collections/piel-mixta-grasa' + assign cards = true + endif + if child.url contains '/collections/piel-grasa' + assign cards = true + endif + if child.url contains '/collections/piel-seca-1' + assign cards = true + endif + endfor + endif + + if image_set == blank + assign title_key = title | handleize + if title_key == 'categorias' + assign image_set = 'categories' + endif + if title_key == 'preocupacion' + assign image_set = 'concern' + endif + if title_key == 'rutina' + assign image_set = 'routine' + endif + if title_key == 'tipo-de-piel' + assign image_set = 'skin' + endif + endif + + if image_set != blank + assign cards = true + endif %}
  • @@ -46,15 +121,89 @@ {{ 'icon-caret-down.svg' | inline_asset_content }} -