1import{a$ as d,r as o,y as x,j as e,N as s,L as n,S as m,b0 as g,a4 as p,b6 as u,F as h}from"./index-CzMEFmtw.js";function j(){var l,i;const{slug:r}=d(),[t,c]=o.useState(void 0);return o.useEffect(()=>{(async()=>{const{data:a}=await x.from("blog_posts").select("id,title,slug,excerpt,cover_image_url,body_md,tags,published_at,meta_title,meta_description,og_image_url,author:blog_authors(name,avatar_url,bio),category:blog_categories(name,slug)").eq("slug",r).maybeSingle();c(a??null)})()},[r]),t===void 0?e.jsxs(e.Fragment,{children:[e.jsx(s,{}),e.jsx("div",{className:"pt-[72px] min-h-screen flex items-center justify-center text-gray-500 text-sm",children:"Loadingâ¦"})]}):t===null?e.jsxs(e.Fragment,{children:[e.jsx(s,{}),e.jsxs("div",{className:"pt-[72px] min-h-screen flex flex-col items-center justify-center gap-4",children:[e.jsx("div",{className:"text-2xl font-semibold text-gray-900",children:"Post not found"}),e.jsx(n,{to:"/blog",className:"text-[#F9A01B] font-semibold",children:"â Back to blog"})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(m,{title:t.meta_title||t.title,description:t.meta_description||t.excerpt||t.title,path:`/blog/${t.slug}`,type:"article"}),e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"Article",headline:t.title,image:t.og_image_url||t.cover_image_url||void 0,datePublished:t.published_at,author:(l=t.author)!=null&&l.name?{"@type":"Person",name:t.author.name}:void 0,description:t.meta_description||t.excerpt})}}),e.jsx(s,{}),e.jsx("main",{className:"pt-[72px] bg-white",children:e.jsxs("article",{className:"max-w-3xl mx-auto px-6 py-16",children:[e.jsxs(n,{to:"/blog",className:"text-sm text-gray-500 hover:text-[#F9A01B] font-semibold flex items-center gap-1.5 mb-8",children:[e.jsx(g,{size:14})," All articles"]}),t.category&&e.jsx("div",{className:"text-xs uppercase tracking-widest font-bold text-[#F9A01B] mb-4",children:t.category.name}),e.jsx("h1",{className:"font-display font-extrabold text-gray-900 mb-6",style:{fontSize:"clamp(32px, 5vw, 56px)",letterSpacing:"-1.5px",lineHeight:1.05},children:t.title}),t.excerpt&&e.jsx("p",{className:"text-lg text-gray-600 leading-relaxed mb-8",children:t.excerpt}),e.jsx("div",{className:"flex items-center gap-4 pb-8 mb-8 border-b border-gray-100",children:t.author&&e.jsxs("div",{className:"flex items-center gap-3",children:[t.author.avatar_url?e.jsx("img",{src:t.author.avatar_url,className:"w-10 h-10 rounded-full object-cover",alt:`${t.author.name} avatar`,loading:"lazy",decoding:"async"}):e.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-[#F9A01B] to-[#2CC5F4] text-white text-xs font-bold flex items-center justify-center",children:t.author.name.split(" ").map(a=>a[0]).join("").slice(0,2)}),e.jsxs("div",{className:"text-sm",children:[e.jsx("div",{className:"font-semibold text-gray-900",children:t.author.name}),t.published_at&&e.jsxs("div",{className:"text-xs text-gray-500 flex items-center gap-1",children:[e.jsx(p,{size:11})," ",new Date(t.published_at).toLocaleDateString(void 0,{dateStyle:"medium"})]})]})]})}),t.cover_image_url&&e.jsx("img",{src:t.cover_image_url,alt:t.title,className:"w-full rounded-2xl mb-10 aspect-[16/9] object-cover"}),e.jsx("div",{className:"prose prose-lg max-w-none prose-headings:font-display prose-headings:tracking-tight prose-a:text-[#F9A01B] prose-a:no-underline hover:prose-a:underline",children:e.jsx(u,{children:t.body_md})}),((i=t.tags)==null?void 0:i.length)>0&&e.jsx("div",{className:"mt-12 pt-8 border-t border-gray-100 flex flex-wrap gap-2",children:t.tags.map(a=>e.jsxs("span",{className:"text-xs font-semibold bg-gray-100 text-gray-700 px-3 py-1 rounded-full",children:["#",a]},a))})]})}),e.jsx(h,{})]})}export{j 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.