1 line
8.1 KiB
JavaScript
1 line
8.1 KiB
JavaScript
import{B as e,C as t,G as n,S as r,T as i,j as a,lt as o,m as s,o as c,p as l,r as u,s as d,u as f,x as ee}from"./runtime-core.esm-bundler-BD0e4RlP.js";import{t as p}from"./i18n-CJQl3WLC.js";import{r as m}from"./products-Dhgp5EjC.js";import{a as h,i as g,o as _,r as v,t as y}from"./api-tyvtUCGz.js";import{t as te}from"./Navbar-DRsVuXxb.js";import{t as b}from"./Hero-CBIJn5YV.js";import{t as ne}from"./Bundles-BUFH-aMm.js";import{t as x}from"./Revitalization-D6Ehuu8K.js";import{t as S}from"./About-rqnuePZN.js";import{t as C}from"./CartDrawer-GmlNs2mL.js";var w={class:`flex flex-col bg-brand md:min-h-[calc(100svh-var(--nav-h))] md:justify-center md:pb-[var(--nav-h)]`},T={class:`italic font-light text-accent-soft`},E={class:`md:hidden mt-6 flex items-center justify-center gap-2`},D=[`href`],O={class:`italic font-light text-brand-soft`},k=`/products/ai/kaiser-natron-pulver-250-g-grosspackung.png`,A=`kaiser-natron-pulver-250-g-grosspackung`,j=`/products/ai/kaiser-natron-bad-500-g.png`,M=`kaiser-natron-pulver-250-g-grosspackung`,N={__name:`HomePage`,setup(N){let{t:P}=p(),F=_(),I=e(!1),re=[{key:`nav.shop`,href:`/shop`},{key:`nav.cook`,href:`/shop#cook`},{key:`nav.clean`,href:`/shop#clean`},{key:`nav.care`,href:`/shop#care`}],L=[{key:`nav.bundles`,href:`#bundles`},{key:`nav.revitalization`,href:`#revitalize`},{key:`nav.about`,href:`#about`}],R=c(()=>[{label:P(`home.categories.clean`),href:`#clean`},{label:P(`home.categories.cook`),href:`#cook`},{label:P(`home.categories.care`),href:`#care`}]),z=c(()=>({headline:P(`bundles.headline.a`),headlineEm:P(`bundles.headline.em`),sub:P(`bundles.sub`),joinCta:P(`bundles.joinCta`),benefits:[P(`bundles.benefit.1.title`),P(`bundles.benefit.2.title`),P(`bundles.benefit.3.title`)]})),B=c(()=>({eyebrow:P(`revit.eyebrow`),headline:P(`revit.headline.a`),headlineEm:P(`revit.headline.em`),sub:P(`revit.sub`),notifyCta:P(`revit.notifyCta`),features:[{title:P(`revit.feature.1.title`),icon:`⚗️`},{title:P(`revit.feature.2.title`),icon:`💊`},{title:P(`revit.feature.3.title`),icon:`🌿`}]})),V=c(()=>({eyebrow:P(`about.eyebrow`),headline:P(`about.headline`),sub:P(`about.sub`),milestones:[1,2,3].map(e=>({year:P(`about.milestone.${e}.year`),title:P(`about.milestone.${e}.title`),text:P(`about.milestone.${e}.text`)}))})),H=[{id:`haushalt`,name:`Haushalts-Bundle`,usage:`2–3× pro Quartal empfohlen`,items:[`1× Kaiser-Natron Pulver 250 g`,`1× Allzweck-Spray 500 ml`,`1× Spülmittel 500 ml`],price:24.9,memberPrice:21.17,image:`/products/ai/kaiser-natron-pulver-250-g-grosspackung.png`,imageAlt:`Haushalts-Bundle mit Kaiser-Natron`,badge:`Bestseller`,badgeVariant:`accent`},{id:`waesche`,name:`Wäsche & Pflege`,usage:`1–2× pro Quartal`,items:[`1× Holste Wasch-Soda 500 g`,`1× Gazelle Wäschestärke 1 l`,`1× Linda Fleckenweg 200 ml`],price:22.9,memberPrice:19.47,image:`/products/ai/kaiser-natron-pulver-250-g-grosspackung.png`,imageAlt:`Wäsche & Pflege Bundle`,badge:``,badgeVariant:`accent`},{id:`wohlfuehl`,name:`Wohlfühl-Bundle`,usage:`1× pro Quartal`,items:[`1× Kaiser-Natron Tabletten 100 g`,`1× Kaiser-Natron Bad 500 g`,`1× Kaiser-Natron Fußbad 500 g`],price:29.9,memberPrice:25.42,image:`/products/ai/kaiser-natron-bad-500-g.png`,imageAlt:`Wohlfühl-Bundle mit Kaiser-Natron Bad`,badge:``,badgeVariant:`accent`}];async function U(){await y(A,1),I.value=!0}async function W(){await y(M,1),I.value=!0}let G={haushalt:`kaiser-natron-pulver-250-g-grosspackung`,waesche:`holste-wasch-soda-500-g-beutel`,wohlfuehl:`kaiser-natron-bad-500-g`};async function K(e){let t=G[e];t&&(await y(t,1),I.value=!0)}function q(){let e=document.getElementById(`bundles`);e&&e.scrollIntoView({behavior:`smooth`,block:`start`})}function J(){}async function Y({productId:e,quantity:t}){await h(e,t)}async function X(e){await g(e)}async function ie(e){await y(e.id,1),I.value=!0}let Z=e(null),Q=null;function $(){let e=Z.value,t=e&&(e.$el||e);if(!t||typeof window>`u`)return;let n=Math.round(t.getBoundingClientRect().height);document.documentElement.style.setProperty(`--nav-h`,`${n}px`)}return r(()=>{if(v(),$(),typeof ResizeObserver<`u`&&Z.value){let e=Z.value.$el||Z.value;Q=new ResizeObserver($),Q.observe(e)}window.addEventListener(`resize`,$)}),ee(()=>{Q&&Q.disconnect(),typeof window<`u`&&window.removeEventListener(`resize`,$)}),(e,r)=>(t(),f(u,null,[s(te,{ref_key:`navRef`,ref:Z,variant:`brand`,layout:`standard`,items:re,"secondary-items":L,"cart-count":n(F).count,products:n(m),onCart:r[0]||=e=>I.value=!0,onSearch:ie},null,8,[`cart-count`,`products`]),d(`div`,w,[s(b,{class:`w-full`,variant:`split`,tone:`brand`,eyebrow:n(P)(`ds.hero.eyebrow`),subheadline:n(P)(`ds.hero.sub`),image:k,"image-alt":`Kaiser-Natron Pulver 250 g Großpackung`,"cta-label":n(P)(`ds.buttons.addToCart`),"secondary-label":n(P)(`ds.buttons.learnMore`),"secondary-href":`/anwendungen`,onCta:U},{headline:a(()=>[l(o(n(P)(`ds.hero.headline.a`))+` `,1),d(`em`,T,o(n(P)(`ds.hero.headline.em`)),1),l(` `+o(n(P)(`ds.hero.headline.b`)),1)]),afterMedia:a(()=>[d(`div`,E,[(t(!0),f(u,null,i(R.value,e=>(t(),f(`a`,{key:e.href,href:e.href,class:`inline-flex items-center justify-center rounded-pill border border-cream/50 px-5 py-2.5 text-sm font-semibold tracking-label text-cream transition-colors duration-base hover:border-cream hover:bg-cream-wash-strong`},o(e.label),9,D))),128))])]),_:1},8,[`eyebrow`,`subheadline`,`cta-label`,`secondary-label`])]),r[3]||=d(`svg`,{"aria-hidden":`true`,class:`block w-full h-12 md:h-16 shrink-0 -mb-px bg-brand`,viewBox:`0 0 1440 64`,preserveAspectRatio:`none`},[d(`rect`,{width:`1440`,height:`64`,fill:`var(--color-cream)`}),d(`path`,{d:`M0,0 L0,40 C320,4 520,60 720,32 C920,4 1120,60 1440,24 L1440,0 Z`,fill:`var(--color-brand)`})],-1),s(b,{class:`-mt-px`,variant:`split`,tone:`cream`,reverse:``,compact:``,eyebrow:n(P)(`home.banner.eyebrow`),subheadline:n(P)(`home.banner.sub`),image:j,"image-alt":`Kaiser-Natron Pulver 250 g Großpackung`,"cta-label":n(P)(`ds.buttons.addToCart`),"secondary-label":n(P)(`ds.buttons.learnMore`),"secondary-href":`/anwendungen`,onCta:W},{headline:a(()=>[l(o(n(P)(`home.banner.headline.a`))+` `,1),d(`em`,O,o(n(P)(`home.banner.headline.em`)),1),l(` `+o(n(P)(`home.banner.headline.b`)),1)]),_:1},8,[`eyebrow`,`subheadline`,`cta-label`,`secondary-label`]),r[4]||=d(`svg`,{"aria-hidden":`true`,class:`block w-full h-12 md:h-16 shrink-0 -mb-px bg-cream`,viewBox:`0 0 1440 64`,preserveAspectRatio:`none`},[d(`rect`,{width:`1440`,height:`64`,fill:`var(--color-surface)`}),d(`path`,{d:`M0,0 L0,40 C320,4 520,60 720,32 C920,4 1120,60 1440,24 L1440,0 Z`,fill:`var(--color-cream)`})],-1),s(ne,{class:`-mt-px`,layout:`stacked`,bundles:H,headline:z.value.headline,"headline-em":z.value.headlineEm,sub:z.value.sub,benefits:z.value.benefits,"join-cta":z.value.joinCta,onAdd:K,onJoin:q},null,8,[`headline`,`headline-em`,`sub`,`benefits`,`join-cta`]),r[5]||=d(`svg`,{"aria-hidden":`true`,class:`block w-full h-12 md:h-16 shrink-0 -mb-px bg-surface`,viewBox:`0 0 1440 64`,preserveAspectRatio:`none`},[d(`rect`,{width:`1440`,height:`64`,fill:`var(--color-brand)`}),d(`path`,{d:`M0,0 L0,40 C320,4 520,60 720,32 C920,4 1120,60 1440,24 L1440,0 Z`,fill:`var(--color-surface)`})],-1),s(x,{class:`-mt-px`,eyebrow:B.value.eyebrow,headline:B.value.headline,"headline-em":B.value.headlineEm,sub:B.value.sub,features:B.value.features,"notify-cta":B.value.notifyCta,onNotify:J},null,8,[`eyebrow`,`headline`,`headline-em`,`sub`,`features`,`notify-cta`]),r[6]||=d(`svg`,{"aria-hidden":`true`,class:`block w-full h-12 md:h-16 shrink-0 -mb-px bg-brand`,viewBox:`0 0 1440 64`,preserveAspectRatio:`none`},[d(`rect`,{width:`1440`,height:`64`,fill:`var(--color-cream)`}),d(`path`,{d:`M0,0 L0,40 C320,4 520,60 720,32 C920,4 1120,60 1440,24 L1440,0 Z`,fill:`var(--color-brand)`})],-1),s(S,{class:`-mt-px`,eyebrow:V.value.eyebrow,headline:V.value.headline,sub:V.value.sub,milestones:V.value.milestones},null,8,[`eyebrow`,`headline`,`sub`,`milestones`]),r[7]||=d(`div`,{"aria-hidden":`true`,class:`md:hidden`,style:{height:`calc(100px + env(safe-area-inset-bottom))`}},null,-1),s(C,{modelValue:I.value,"onUpdate:modelValue":r[1]||=e=>I.value=e,items:n(F).items,subtotal:n(F).subtotal,count:n(F).count,onUpdateQuantity:Y,onRemove:X,onCheckout:r[2]||=e=>I.value=!1},null,8,[`modelValue`,`items`,`subtotal`,`count`])],64))}};export{N as default}; |