PageSourceSearch

https://wedding-buddy-ai.lovable.app/assets/Blog-qajtlUKa.js

js wedding-buddy-ai.lovable.app collected 2026-10-03 03:46:20 UTC 4,551 bytes, 1 lines download raw bytes

1import{o as y,D as m,j as e,J as N,N as b,B as g,C as x,d as h,z as w,f as v,Z as C,l as k,Y as E,s as p}from"./index-DaxYHL_c.js";import{S as r}from"./skeleton-BhNP70EB.js";import{B as _}from"./badge-BgIO1kHT.js";const S=()=>{const[u,l]=y(),a=u.get("category"),{data:t}=m({queryKey:["blog-categories"],queryFn:async()=>{const{data:s,error:n}=await p.from("blog_categories").select("*").order("name");if(n)throw n;return s}}),{data:i,isLoading:f}=m({queryKey:["blog-posts",a],queryFn:async()=>{let s=p.from("blog_posts").select("*, blog_categories(name, slug)").eq("published",!0).order("published_at",{ascending:!1});if(a){const c=t==null?void 0:t.find(j=>j.slug===a);c&&(s=s.eq("category_id",c.id))}const{data:n,error:d}=await s;if(d)throw d;return n},enabled:!a||!!t}),o=s=>{l(s?{category:s}:{})};return e.jsxs(e.Fragment,{children:[e.jsxs(N,{children:[e.jsx("title",{children:"Wedding Blog | Elite Weddings & Events"}),e.jsx("meta",{name:"description",content:"Expert wedding planning tips and inspiration from Elite Weddings & Events across North Wales, Cheshire & Shropshire."}),e.jsx("link",{rel:"canonical",href:"https://eliteweddingsandeventswithcara.com/blog"}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:title",content:"Wedding Blog | Elite Weddings & Events"}),e.jsx("meta",{property:"og:description",content:"Expert wedding planning tips and inspiration from Elite Weddings & Events across North Wales, Cheshire & Shropshire."}),e.jsx("meta",{property:"og:url",content:"https://eliteweddingsandeventswithcara.com/blog"})]}),e.jsx(b,{}),e.jsxs("main",{children:[e.jsx("section",{className:"bg-gradient-to-b from-primary/10 to-background py-16 md:py-24",children:e.jsxs("div",{className:"container mx-auto px-4 text-center",children:[e.jsx("h1",{className:"font-display text-4xl md:text-5xl lg:text-6xl text-foreground mb-4",children:"Wedding Blog"}),e.jsx("p",{className:"text-muted-foreground text-lg max-w-2xl mx-auto",children:"Expert tips, inspiration, and advice to help you plan your perfect wedding day"})]})}),e.jsx("section",{className:"py-8 bg-background border-b",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs("div",{className:"flex flex-wrap justify-center gap-2",children:[e.jsx(g,{variant:a?"outline":"default",size:"sm",onClick:()=>o(null),children:"All Posts"}),t==null?void 0:t.map(s=>e.jsx(g,{variant:a===s.slug?"default":"outline",size:"sm",onClick:()=>o(s.slug),children:s.name},s.id))]})})}),e.jsx("section",{className:"py-16 bg-background",children:e.jsx("div",{className:"container mx-auto px-4",children:f?e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:[1,2,3,4,5,6].map(s=>e.jsxs(x,{className:"overflow-hidden",children:[e.jsx(r,{className:"h-48 w-full"}),e.jsxs(h,{className:"p-6",children:[e.jsx(r,{className:"h-4 w-24 mb-3"}),e.jsx(r,{className:"h-6 w-full mb-2"}),e.jsx(r,{className:"h-4 w-full"}),e.jsx(r,{className:"h-4 w-3/4 mt-1"})]})]},s))}):i&&i.length>0?e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:i.map(s=>e.jsx(w,{to:`/blog/${s.slug}`,children:e.jsxs(x,{className:"overflow-hidden h-full hover:shadow-lg transition-shadow group",children:[s.featured_image&&e.jsx("div",{className:"aspect-video overflow-hidden",children:e.jsx("img",{src:s.featured_image,alt:s.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"})}),e.jsxs(h,{className:"p-6",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mb-3",children:[e.jsx(v,{className:"w-4 h-4"}),s.published_at&&C(new Date(s.published_at),"MMMM d, yyyy"),s.blog_categories&&e.jsx(_,{variant:"secondary",className:"ml-2",children:s.blog_categories.name})]}),e.jsx("h2",{className:"font-display text-xl text-foreground mb-2 group-hover:text-primary transition-colors",children:s.title}),s.excerpt&&e.jsx("p",{className:"text-muted-foreground text-sm line-clamp-3",children:s.excerpt}),e.jsxs("div",{className:"flex items-center gap-1 text-primary mt-4 text-sm font-medium",children:["Read More ",e.jsx(k,{className:"w-4 h-4"})]})]})]})},s.id))}):e.jsxs("div",{className:"text-center py-16",children:[e.jsx("h2",{className:"font-display text-2xl text-foreground mb-2",children:a?"No posts in this category":"Coming Soon"}),e.jsx("p",{className:"text-muted-foreground",children:a?"Check out other categories for more content.":"We're working on bringing you amazing wedding content. Check back soon!"})]})})})]}),e.jsx(E,{})]})};export{S 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.