PageSourceSearch

https://weddingpeer.com/assets/BlogPage-BCHINGDV.js

js weddingpeer.com collected 2026-10-08 15:04:41 UTC 9,476 bytes, 1 lines download raw bytes

1import{u as L,b as P,g as $,f as B,S as D,s as I,j as e,d as b}from"./index-BdadQeZ5.js";import{r as d}from"./vendor-react-YsBxPMQB.js";import{u as R}from"./useDocumentHead-BChueHzu.js";import{S as U}from"./search-DtJVfekX.js";import{C as _}from"./clock-Dz5e6Zp3.js";import{T as M}from"./tag-B-XBV811.js";import{A as f}from"./arrow-right-DQi553KF.js";import{S as q}from"./sparkles-38wHsGR4.js";import"./vendor-supabase-CeDX8o7s.js";const F="id,title,slug,slug_de,slug_fr,slug_it,slug_es,excerpt,cover_image_url,cover_image_desktop_url,cover_image_mobile_url,category,read_time_minutes,published_at,tags,title_de,title_fr,title_it,title_es,excerpt_de,excerpt_fr,excerpt_it,excerpt_es";function j(i,t){const r=o=>{if(t==="en")return i[o];const u=`${o}_${t}`,x=i[u];return x&&x.trim()?x:i[o]};return{title:r("title"),excerpt:r("excerpt")}}function w(i,t){if(t==="en")return i.slug;const r=`slug_${t}`,o=i[r];return o&&o.trim()?o:i.slug}function H(){return e.jsxs("div",{className:"bg-white border border-stone-100 rounded-2xl overflow-hidden animate-pulse",children:[e.jsx("div",{className:"w-full h-44 bg-stone-100"}),e.jsxs("div",{className:"p-5 space-y-3",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("div",{className:"h-3 w-16 bg-stone-100 rounded"}),e.jsx("div",{className:"h-3 w-12 bg-stone-100 rounded"})]}),e.jsx("div",{className:"h-4 w-3/4 bg-stone-100 rounded"}),e.jsx("div",{className:"h-3 w-full bg-stone-100 rounded"}),e.jsx("div",{className:"h-3 w-2/3 bg-stone-100 rounded"})]})]})}function W(){return e.jsx("div",{className:"mb-12 animate-pulse",children:e.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 items-center bg-stone-50 rounded-3xl overflow-hidden border border-stone-100",children:[e.jsx("div",{className:"w-full h-72 lg:h-80 bg-stone-100"}),e.jsxs("div",{className:"px-6 py-8 lg:px-10 space-y-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("div",{className:"h-3 w-20 bg-stone-200 rounded"}),e.jsx("div",{className:"h-3 w-14 bg-stone-200 rounded"})]}),e.jsx("div",{className:"h-7 w-4/5 bg-stone-200 rounded"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"h-4 w-full bg-stone-100 rounded"}),e.jsx("div",{className:"h-4 w-3/4 bg-stone-100 rounded"})]}),e.jsx("div",{className:"h-4 w-28 bg-stone-200 rounded"})]})]})})}function ee({onNavigate:i}){const{t,language:r}=L(),[o,u]=d.useState([]),[x,y]=d.useState(!0),[m,k]=d.useState(""),[g,S]=d.useState("All"),v=P(r,"blog"),C=$("blog"),A=B([{name:"WeddingPeer",url:D},{name:t("blog.title"),url:v}]);R({title:`${t("blog.title")} — WeddingPeer`,description:t("blog.subtitle"),canonical:v,language:r,alternates:C,structuredData:A}),d.useEffect(()=>{let s=!1;return(async()=>{const{data:l}=await I.from("blog_posts").select(F).eq("status","published").order("published_at",{ascending:!1});s||(u(l||[]),y(!1))})(),()=>{s=!0}},[]);const p=d.useMemo(()=>o.filter(s=>{if(g!=="All"&&s.category!==g)return!1;if(m){const l=m.toLowerCase(),{title:n,excerpt:c}=j(s,r);if(!n.toLowerCase().includes(l)&&!c.toLowerCase().includes(l))return!1}return!0}),[o,g,m,r]),a=p[0],N=p.slice(1),z=d.useMemo(()=>["All",...Array.from(new Set(o.map(s=>s.category)))],[o]),h=s=>{if(s==="All")return t("blog.category.all");const l=`blog.category.${s}`,n=t(l);return n!==l?n:s},T=s=>{const l=`blog.tag.${s}`,n=t(l);return n!==l?n:s};return e.jsxs("div",{className:"min-h-screen bg-white pt-16",children:[e.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-14",children:[e.jsxs("div",{className:"max-w-xl mb-12",children:[e.jsx("h1",{className:"text-4xl font-bold text-stone-900 mb-4",children:t("blog.title")}),e.jsx("p",{className:"text-lg text-stone-500 leading-relaxed",children:t("blog.subtitle")})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 mb-10",children:[e.jsxs("div",{className:"relative flex-1 max-w-sm",children:[e.jsx(U,{size:15,className:"absolute left-3.5 top-1/2 -translate-y-1/2 text-stone-400"}),e.jsx("input",{value:m,onChange:s=>k(s.target.value),placeholder:t("blog.searchPlaceholder"),className:"w-full pl-10 pr-4 py-2.5 border border-stone-200 rounded-xl text-sm outline-none focus:border-stone-400"})]}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:z.map(s=>e.jsx("button",{onClick:()=>S(s),className:`px-3.5 py-2 rounded-xl text-xs font-medium transition-colors border ${g===s?"bg-stone-900 text-white border-stone-900":"bg-white text-stone-600 border-stone-200 hover:border-stone-400"}`,children:h(s)},s))})]}),x?e.jsxs("div",{children:[e.jsx(W,{}),e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-6",children:Array.from({length:6}).map((s,l)=>e.jsx(H,{},l))})]}):p.length===0?e.jsx("div",{className:"text-center py-24",children:e.jsx("p",{className:"text-stone-400 text-base",children:t("blog.noArticles")})}):e.jsxs(e.Fragment,{children:[a&&(()=>{const{title:s,excerpt:l}=j(a,r),n=w(a,r);return e.jsx("a",{href:b(r,"blog-post",{slug:n}),onClick:c=>{c.preventDefault(),i("blog-post",n)},className:"w-full text-left mb-12 group block",children:e.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 items-center bg-stone-50 rounded-3xl overflow-hidden border border-stone-100 hover:border-stone-200 transition-colors",children:[a.cover_image_url?e.jsxs("picture",{children:[a.cover_image_mobile_url&&e.jsx("source",{media:"(max-width: 1023px)",srcSet:a.cover_image_mobile_url,type:"image/webp"}),a.cover_image_desktop_url&&e.jsx("source",{media:"(min-width: 1024px)",srcSet:a.cover_image_desktop_url,type:"image/webp"}
1),e.jsx("img",{src:a.cover_image_desktop_url||a.cover_image_url,alt:s,loading:"eager",className:"w-full h-72 lg:h-full object-cover"})]}):e.jsx("div",{className:"w-full h-72 bg-stone-200 flex items-center justify-center",children:e.jsx("span",{className:"text-stone-400 text-sm",children:t("blog.noCover")})}),e.jsxs("div",{className:"px-6 py-8 lg:px-10",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("span",{className:"text-xs font-semibold text-rose-500 uppercase tracking-widest",children:h(a.category)}),e.jsx("span",{className:"text-stone-300",children:"·"}),e.jsxs("span",{className:"text-xs text-stone-400 flex items-center gap-1",children:[e.jsx(_,{size:11}),a.read_time_minutes," ",t("blog.minRead")]})]}),e.jsx("h2",{className:"text-2xl font-bold text-stone-900 mb-3 group-hover:text-rose-600 transition-colors leading-tight",children:s}),e.jsx("p",{className:"text-stone-500 text-sm leading-relaxed mb-5 line-clamp-3",children:l}),a.tags.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mb-5",children:a.tags.slice(0,3).map(c=>e.jsxs("span",{className:"text-xs text-stone-400 flex items-center gap-1",children:[e.jsx(M,{size:10}),T(c)]},c))}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm font-semibold text-rose-500 group-hover:gap-2.5 transition-all",children:[t("blog.readArticle")," ",e.jsx(f,{size:14})]})]})]})})})(),N.length>0&&e.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-6",children:N.map(s=>{const{title:l,excerpt:n}=j(s,r),c=w(s,r);return e.jsxs("a",{href:b(r,"blog-post",{slug:c}),onClick:E=>{E.preventDefault(),i("blog-post",c)},className:"text-left group bg-white border border-stone-100 rounded-2xl overflow-hidden hover:border-stone-200 hover:shadow-sm transition-all block",children:[s.cover_image_url?e.jsx("img",{src:s.cover_image_mobile_url||s.cover_image_url,alt:l,loading:"lazy",className:"w-full h-44 object-cover"}):e.jsx("div",{className:"w-full h-44 bg-stone-100"}),e.jsxs("div",{className:"p-5",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("span",{className:"text-[10px] font-semibold text-rose-500 uppercase tracking-widest",children:h(s.category)}),e.jsx("span",{className:"text-stone-200",children:"·"}),e.jsxs("span",{className:"text-[10px] text-stone-400 flex items-center gap-1",children:[e.jsx(_,{size:9}),s.read_time_minutes," ",t("blog.min")]})]}),e.jsx("h3",{className:"text-sm font-bold text-stone-900 mb-2 line-clamp-2 group-hover:text-rose-600 transition-colors leading-snug",children:l}),e.jsx("p",{className:"text-xs text-stone-500 leading-relaxed line-clamp-2",children:n}),e.jsxs("div",{className:"mt-4 flex items-center gap-1 text-xs font-semibold text-rose-500 group-hover:gap-2 transition-all",children:[t("blog.read")," ",e.jsx(f,{size:11})]})]})]},s.id)})})]})]}),e.jsx("div",{className:"border-t border-stone-100 bg-stone-50",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-20 text-center",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-rose-50 text-rose-500 text-xs font-bold uppercase tracking-widest px-4 py-1.5 rounded-full mb-6",children:[e.jsx(q,{size:12}),t("blog.ctaBadge")||"Entdecken"]}),e.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-stone-900 mb-4 leading-tight",children:t("blog.ctaTitle")||"Bereit, dein perfektes Hochzeitszubehör zu finden?"}),e.jsx("p",{className:"text-stone-500 text-base leading-relaxed mb-8 max-w-xl mx-auto",children:t("blog.ctaSubtitle")||"Stöbere durch hunderte von Dekorations- und Zubehörartikeln direkt von anderen Brautpaaren."}),e.jsxs("a",{href:b(r,"explore"),onClick:s=>{s.preventDefault(),i("explore")},className:"inline-flex items-center gap-2 bg-rose-500 hover:bg-rose-600 text-white font-semibold text-sm px-7 py-3.5 rounded-xl transition-colors shadow-sm hover:shadow-md",children:[t("blog.ctaButton")||"Alle Inserate durchstöbern",e.jsx(f,{size:15})]})]})})]})}export{ee as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.