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
6.0 KiB
JavaScript
1 line
6.0 KiB
JavaScript
import{B as e,C as t,D as n,G as r,S as i,T as a,c as ee,ft as o,j as s,l as te,m as c,o as l,p as u,r as d,s as f,u as p,x as m}from"./runtime-core.esm-bundler-DTXUv7Wx.js";import{o as ne}from"./vue-router-Cyqru1db.js";import{t as re}from"./i18n-D7Ao3GC7.js";import{i as ie,r as h}from"./products-BqW5PUnm.js";import{c as g,d as ae,f as oe,p as se,u as ce}from"./api-DlB23x7f.js";import{t as le}from"./Navbar-DhReqfWX.js";import{t as _}from"./Button-D1Rp2Xe1.js";import{t as v}from"./ProductCard-CoLSt6Am.js";import{t as y}from"./WaveDivider-xrSvFNvN.js";import{t as b}from"./Footer-C7VVtZ3C.js";import{t as x}from"./CartDrawer-Bmyv2SnQ.js";var S={class:`bg-brand text-cream md:min-h-[calc(70svh-var(--nav-h))] md:flex md:items-center`},C={class:`mx-auto w-full max-w-4xl px-6 py-16 sm:px-8 sm:py-20 md:px-12 md:py-24 lg:px-16 text-center flex flex-col gap-5`},w={class:`eyebrow text-accent`},T={class:`font-display font-normal leading-[1.05] tracking-tight text-cream text-headline-lg`},E={class:`italic font-light text-accent-soft`},D={class:`text-base md:text-lg leading-relaxed text-cream/80 max-w-2xl mx-auto`},O={class:`-mt-px bg-cream text-ink`},k={class:`mx-auto w-full max-w-6xl px-6 py-16 sm:px-8 sm:py-20 md:px-12 md:py-24 lg:px-16`},A={class:`flex flex-col gap-4 max-w-3xl`},j={class:`font-display font-normal leading-[1.05] tracking-tight text-ink text-headline-md`},M={class:`italic font-light text-brand`},N={class:`text-lg leading-relaxed text-muted max-w-2xl`},P={key:0,class:`mt-12 md:mt-14 grid gap-5 md:gap-7 grid-cols-1 sm:grid-cols-2 md:grid-cols-3`},F={class:`-mt-px bg-surface text-ink`},I={class:`mx-auto w-full max-w-6xl px-6 py-16 sm:px-8 sm:py-20 md:px-12 md:py-24 lg:px-16`},L={class:`flex flex-col gap-4 max-w-3xl`},R={class:`eyebrow`},z={class:`font-display font-normal leading-[1.05] tracking-tight text-ink text-headline-md`},B={class:`italic font-light text-brand`},ue={class:`mt-12 md:mt-14 grid gap-6 md:gap-8 grid-cols-1 sm:grid-cols-3`},V={class:`inline-flex items-center justify-center w-10 h-10 rounded-full bg-brand text-accent font-display text-base`},H={class:`font-display text-xl font-normal text-brand leading-tight`},U={class:`text-[15px] leading-relaxed text-ink`},de={class:`-mt-px bg-brand text-cream`},fe={class:`mx-auto w-full max-w-3xl px-6 py-16 sm:px-8 sm:py-20 md:px-12 md:py-24 lg:px-16 text-center flex flex-col items-center gap-5`},pe={class:`font-display font-normal leading-[1.05] tracking-tight text-cream text-headline-md`},me={class:`italic font-light text-accent-soft`},he={class:`text-base md:text-lg leading-relaxed text-cream/80 max-w-xl`},W={__name:`CategoryPage`,props:{slug:{type:String,required:!0,validator:e=>[`pflege`,`haushalt`].includes(e)},useCase:{type:String,required:!0,validator:e=>[`clean`,`care`].includes(e)}},setup(W){let G=W,{t:K}=re(),q=se(),ge=ne(),J=e(!1);function _e(){J.value=!1,ge.push(`/checkout`)}let ve=[{key:`nav.shop`,href:`/shop`},{key:`nav.bundles`,href:`/#bundles`},{key:`nav.revitalization`,href:`/#revitalize`},{key:`nav.about`,href:`/#about`}],Y=l(()=>ie(h)[G.useCase]||[]),ye=l(()=>[1,2,3].map(e=>({title:K(`category.${G.slug}.benefit.${e}.title`),text:K(`category.${G.slug}.benefit.${e}.text`)})));async function X(e){await g(e.id,1),J.value=!0}async function be(e){await g(e.id,1),J.value=!0}async function xe({productId:e,quantity:t}){await oe(e,t)}async function Se(e){await ae(e)}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 i(()=>{if(ce(),$(),typeof ResizeObserver<`u`&&Z.value){let e=Z.value.$el||Z.value;Q=new ResizeObserver($),Q.observe(e)}window.addEventListener(`resize`,$)}),m(()=>{Q&&Q.disconnect(),typeof window<`u`&&window.removeEventListener(`resize`,$)}),(e,i)=>{let l=n(`RouterLink`);return t(),p(d,null,[c(le,{ref_key:`navRef`,ref:Z,variant:`brand`,layout:`standard`,items:ve,"cart-count":r(q).count,products:r(h),onCart:i[0]||=e=>J.value=!0,onSearch:be},null,8,[`cart-count`,`products`]),f(`section`,S,[f(`div`,C,[f(`p`,w,o(r(K)(`category.${W.slug}.eyebrow`)),1),f(`h1`,T,[u(o(r(K)(`category.${W.slug}.title.a`))+` `,1),f(`em`,E,o(r(K)(`category.${W.slug}.title.em`)),1)]),f(`p`,D,o(r(K)(`category.${W.slug}.sub`)),1)])]),c(y,{from:`brand`,to:`cream`}),f(`section`,O,[f(`div`,k,[f(`div`,A,[f(`h2`,j,[u(o(r(K)(`category.${W.slug}.products.headline`))+` `,1),f(`em`,M,o(r(K)(`category.${W.slug}.products.headline.em`)),1)]),f(`p`,N,o(r(K)(`category.${W.slug}.products.sub`)),1)]),Y.value.length?(t(),p(`div`,P,[(t(!0),p(d,null,a(Y.value,e=>(t(),ee(v,{key:e.id,title:e.title,size:e.size,price:e.price,image:e.image,"image-alt":e.title,href:e.href,tone:`cream`,"in-stock":e.inStock,onAdd:t=>X(e)},null,8,[`title`,`size`,`price`,`image`,`image-alt`,`href`,`in-stock`,`onAdd`]))),128))])):te(``,!0)])]),c(y,{from:`cream`,to:`surface`}),f(`section`,F,[f(`div`,I,[f(`div`,L,[f(`p`,R,o(r(K)(`category.${W.slug}.benefits.eyebrow`)),1),f(`h2`,z,[u(o(r(K)(`category.${W.slug}.benefits.headline`))+` `,1),f(`em`,B,o(r(K)(`category.${W.slug}.benefits.headline.em`)),1)])]),f(`ul`,ue,[(t(!0),p(d,null,a(ye.value,(e,n)=>(t(),p(`li`,{key:n,class:`flex flex-col gap-3 rounded-md border border-line bg-paper p-6 md:p-8`},[f(`span`,V,o(n+1),1),f(`h3`,H,o(e.title),1),f(`p`,U,o(e.text),1)]))),128))])])]),c(y,{from:`surface`,to:`brand`}),f(`section`,de,[f(`div`,fe,[f(`h2`,pe,[u(o(r(K)(`category.${W.slug}.cta.headline`))+` `,1),f(`em`,me,o(r(K)(`category.${W.slug}.cta.headline.em`)),1)]),f(`p`,he,o(r(K)(`category.${W.slug}.cta.sub`)),1),c(l,{to:`/shop`,class:`inline-flex`},{default:s(()=>[c(_,{variant:`accent`,size:`lg`},{default:s(()=>[u(o(r(K)(`category.${W.slug}.cta.button`)),1)]),_:1})]),_:1})])]),c(b,{variant:`cream`}),i[2]||=f(`div`,{"aria-hidden":`true`,class:`md:hidden`,style:{height:`calc(100px + env(safe-area-inset-bottom))`}},null,-1),c(x,{modelValue:J.value,"onUpdate:modelValue":i[1]||=e=>J.value=e,items:r(q).items,subtotal:r(q).subtotal,count:r(q).count,onUpdateQuantity:xe,onRemove:Se,onCheckout:_e},null,8,[`modelValue`,`items`,`subtotal`,`count`])],64)}}};export{W as default}; |