The two newly-shipped components (Footer with cream/brand/paper tones, CheckoutStepper with active/completed/upcoming states) are now documented in the design system at /design/footer and /design/checkout-stepper. Sidebar entries added under "Sections" and "Components" respectively, with DE + EN copy. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 line
7.7 KiB
JavaScript
1 line
7.7 KiB
JavaScript
import{A as e,B as t,C as n,G as r,S as i,b as a,ft as o,j as s,m as c,o as l,p as u,r as ee,s as d,u as f,x as te}from"./runtime-core.esm-bundler-DTXUv7Wx.js";import{a as p,o as m}from"./vue-router-Cyqru1db.js";import{t as h}from"./i18n-D7Ao3GC7.js";import{r as g}from"./products-BqW5PUnm.js";import{c as _,d as v,f as y,p as b,u as ne}from"./api-DlB23x7f.js";import{t as re}from"./Navbar-DhReqfWX.js";import{t as x}from"./Footer-C7VVtZ3C.js";import{t as S}from"./CartDrawer-Bmyv2SnQ.js";import{t as C}from"./Hero-CYtP_CK_.js";import{t as w}from"./Bundles-D7HcUXuU.js";import{t as T}from"./Revitalization-Cr74N6Zm.js";import{t as E}from"./About-DLWLHk5Z.js";var D={class:`flex flex-col bg-brand md:min-h-[calc(100svh-var(--nav-h))] md:justify-center`},O={class:`italic font-light text-accent-soft`},k={class:`italic font-light text-brand-soft`},A=`/products/kaiser-natron-pulver-250-g-grosspackung.webp`,j=`kaiser-natron-pulver-250-g-grosspackung`,M=`/products/kaiser-natron-bad-500-g.webp`,N=`kaiser-natron-bad-500-g`,P={__name:`HomePage`,setup(P){let{t:F}=h(),I=b(),L=m(),R=p(),z=t(!1);e(()=>R.hash,async e=>{if(!e)return;await a();let t=document.querySelector(e);t&&t.scrollIntoView({behavior:`smooth`,block:`start`})},{immediate:!0});function B(){z.value=!1,L.push(`/checkout`)}let V=[{key:`nav.shop`,href:`/shop`},{key:`nav.bundles`,href:`/#bundles`},{key:`nav.revitalization`,href:`/#revitalize`},{key:`nav.about`,href:`/#about`}],H=[],U=l(()=>({headline:F(`bundles.headline.a`),headlineEm:F(`bundles.headline.em`),sub:F(`bundles.sub`),joinCta:F(`bundles.joinCta`),benefits:[F(`bundles.benefit.1.title`),F(`bundles.benefit.2.title`),F(`bundles.benefit.3.title`)]})),W=l(()=>({eyebrow:F(`revit.eyebrow`),headline:F(`revit.headline.a`),headlineEm:F(`revit.headline.em`),sub:F(`revit.sub`),notifyCta:F(`revit.notifyCta`),features:[{title:F(`revit.feature.1.title`),icon:`⚗️`},{title:F(`revit.feature.2.title`),icon:`💊`},{title:F(`revit.feature.3.title`),icon:`🌿`}]})),G=l(()=>({eyebrow:F(`about.eyebrow`),headline:F(`about.headline`),sub:F(`about.sub`),milestones:[1,2,3].map(e=>({year:F(`about.milestone.${e}.year`),title:F(`about.milestone.${e}.title`),text:F(`about.milestone.${e}.text`)}))})),K=[{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/kaiser-natron-pulver-250-g-grosspackung.webp`,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/kaiser-natron-pulver-250-g-grosspackung.webp`,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/kaiser-natron-bad-500-g.webp`,imageAlt:`Wohlfühl-Bundle mit Kaiser-Natron Bad`,badge:``,badgeVariant:`accent`}];async function q(){await _(j,1),z.value=!0}async function J(){await _(N,1),z.value=!0}let Y={haushalt:`kaiser-natron-pulver-250-g-grosspackung`,waesche:`holste-wasch-soda-500-g-beutel`,wohlfuehl:`kaiser-natron-bad-500-g`};async function X(e){let t=Y[e];t&&(await _(t,1),z.value=!0)}function ie(){let e=document.getElementById(`bundles`);e&&e.scrollIntoView({block:`start`})}function ae(){}async function oe({productId:e,quantity:t}){await y(e,t)}async function se(e){await v(e)}async function ce(e){await _(e.id,1),z.value=!0}let Z=t(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 i(()=>{if(ne(),$(),typeof ResizeObserver<`u`&&Z.value){let e=Z.value.$el||Z.value;Q=new ResizeObserver($),Q.observe(e)}window.addEventListener(`resize`,$)}),te(()=>{Q&&Q.disconnect(),typeof window<`u`&&window.removeEventListener(`resize`,$)}),(e,t)=>(n(),f(ee,null,[c(re,{ref_key:`navRef`,ref:Z,variant:`brand`,layout:`standard`,items:V,"secondary-items":H,"cart-count":r(I).count,products:r(g),onCart:t[0]||=e=>z.value=!0,onSearch:ce},null,8,[`cart-count`,`products`]),d(`div`,D,[c(C,{class:`w-full`,variant:`split`,tone:`brand`,subheadline:r(F)(`ds.hero.sub`),image:A,"image-alt":`Kaiser-Natron Pulver 250 g Großpackung`,"cta-label":r(F)(`ds.buttons.addToCart`),"secondary-label":r(F)(`ds.buttons.learnMore`),"secondary-href":`/shop/${j}`,onCta:q},{headline:s(()=>[u(o(r(F)(`ds.hero.headline.a`))+` `,1),d(`em`,O,o(r(F)(`ds.hero.headline.em`)),1),u(` `+o(r(F)(`ds.hero.headline.b`)),1)]),_:1},8,[`subheadline`,`cta-label`,`secondary-label`,`secondary-href`])]),t[2]||=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),c(C,{class:`-mt-px`,variant:`split`,tone:`cream`,reverse:``,compact:``,eyebrow:r(F)(`home.banner.eyebrow`),subheadline:r(F)(`home.banner.sub`),image:M,"image-alt":`Kaiser-Natron Pulver 250 g Großpackung`,"cta-label":r(F)(`ds.buttons.addToCart`),"secondary-label":r(F)(`ds.buttons.learnMore`),"secondary-href":`/shop/${N}`,onCta:J},{headline:s(()=>[u(o(r(F)(`home.banner.headline.a`))+` `,1),d(`em`,k,o(r(F)(`home.banner.headline.em`)),1),u(` `+o(r(F)(`home.banner.headline.b`)),1)]),_:1},8,[`eyebrow`,`subheadline`,`cta-label`,`secondary-label`,`secondary-href`]),t[3]||=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),c(w,{class:`-mt-px`,layout:`stacked`,bundles:K,headline:U.value.headline,"headline-em":U.value.headlineEm,sub:U.value.sub,benefits:U.value.benefits,"join-cta":U.value.joinCta,onAdd:X,onJoin:ie},null,8,[`headline`,`headline-em`,`sub`,`benefits`,`join-cta`]),t[4]||=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),c(T,{class:`-mt-px`,eyebrow:W.value.eyebrow,headline:W.value.headline,"headline-em":W.value.headlineEm,sub:W.value.sub,features:W.value.features,"notify-cta":W.value.notifyCta,onNotify:ae},null,8,[`eyebrow`,`headline`,`headline-em`,`sub`,`features`,`notify-cta`]),t[5]||=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),c(E,{class:`-mt-px`,eyebrow:G.value.eyebrow,headline:G.value.headline,sub:G.value.sub,milestones:G.value.milestones},null,8,[`eyebrow`,`headline`,`sub`,`milestones`]),c(x),t[6]||=d(`div`,{"aria-hidden":`true`,class:`md:hidden`,style:{height:`calc(100px + env(safe-area-inset-bottom))`}},null,-1),c(S,{modelValue:z.value,"onUpdate:modelValue":t[1]||=e=>z.value=e,items:r(I).items,subtotal:r(I).subtotal,count:r(I).count,onUpdateQuantity:oe,onRemove:se,onCheckout:B},null,8,[`modelValue`,`items`,`subtotal`,`count`])],64))}};export{P as default}; |