1import{j as e}from"./vendor-motion-DedOVqex.js";import{f as g,r as s,N as x,L as o}from"./vendor-react-CKt5niIp.js";import{L as u}from"./Layout-BExOj5Wp.js";import{S as h}from"./SEOHead-p9A3kcGW.js";import{B as f}from"./Breadcrumbs-Kzq5_E_P.js";import{s as b,i as y}from"./App-vsTbtGw1.js";import{a as j,b as N}from"./blogCategoryHubs-C-Y8EpAU.js";import"./chevron-right-3hl8rv9N.js";import"./RutledgeLogo-C4OGVXpW.js";import"./plus-DCkG_MwG.js";import"./chevron-down-D3I365fS.js";import"./mail-DKLsFbtw.js";import"./map-pin-BmkgsCCh.js";import"./graduation-cap-Cs951smf.js";import"./CookieBanner-CkvoUqIj.js";import"./arrow-up-MXP2B8Wq.js";import"./briefcase-Cntrviqs.js";import"./index.esm-DTIGCfEG.js";import"./index-Bv8XFQwf.js";import"./vendor-ui-DBXKNI_v.js";import"./vendor-recharts-Dg5ZbfIV.js";import"./vendor-query-C_W9aiJD.js";import"./vendor-supabase-D7MryUeb.js";const K=()=>{const{slug:i=""}=g(),r=s.useMemo(()=>j(i),[i]),[a,d]=s.useState([]),[n,m]=s.useState(!0);if(s.useEffect(()=>{r&&(m(!0),b.from("blog_posts").select(y).eq("status","Published").eq("category",r.category).order("created_at",{ascending:!1}).then(({data:t})=>{d(t??[]),m(!1)}))},[r]),!r)return e.jsx(x,{to:"/blog",replace:!0});const l=`/blog/category/${r.slug}`,c=[{name:"Blog",path:"/blog"},{name:r.h1,path:l}],p={"@context":"https://schema.org","@type":"CollectionPage",name:r.h1,description:r.description,url:`https://rutledgegroup.co.uk${l}`,isPartOf:{"@type":"Blog",name:"Rutledge Journal",url:"https://rutledgegroup.co.uk/blog"}};return e.jsxs(u,{children:[e.jsx(h,{title:r.title,description:r.description.slice(0,158),canonical:l,jsonLd:p,breadcrumbs:c,noindex:a.length===0&&!n}),e.jsx("section",{className:"border-b border-border",children:e.jsxs("div",{className:"max-w-[1240px] mx-auto px-6 pt-8 sm:pt-12 pb-10 sm:pb-14",children:[e.jsx(f,{items:c}),e.jsxs("p",{className:"font-body font-semibold text-[0.6875rem] uppercase tracking-[0.3em] text-primary mt-6 mb-4",children:["Journal · ",r.category]}),e.jsx("h1",{className:"font-display text-foreground leading-[0.95] tracking-tight",style:{fontSize:"clamp(2rem, 5.5vw, 4rem)"},children:r.h1}),e.jsx("p",{className:"font-body text-foreground/70 text-[1rem] mt-5 max-w-[64ch]",style:{lineHeight:1.7},children:r.intro}),e.jsx("div",{className:"mt-6 flex flex-wrap gap-x-6 gap-y-2",children:r.links.map(t=>e.jsx(o,{to:t.to,className:"font-ui font-semibold text-[0.875rem] text-primary hover:underline",children:t.label},t.to))})]})}),e.jsx("section",{children:e.jsxs("div",{className:"max-w-[1240px] mx-auto px-6 py-12 lg:py-16",children:[n?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx("div",{className:"w-8 h-8 border-4 border-primary border-t-transparent rounded-full animate-spin"})}):a.length===0?e.jsxs("p",{className:"font-body text-foreground/70",children:["No articles in this category yet. ",e.jsx(o,{to:"/blog",className:"text-primary hover:underline",children:"Read the latest from the journal"}),"."]}):e.jsx("ul",{className:"divide-y divide-border border-y border-border",children:a.map(t=>e.jsx("li",{children:e.jsxs(o,{to:`/blog/${t.slug}`,className:"group grid lg:grid-cols-12 gap-x-8 gap-y-2 py-6 lg:py-7 hover:pl-3 transition-all",children:[e.jsx("div",{className:"lg:col-span-2",children:e.jsx("p",{className:"font-body font-semibold text-[0.6875rem] uppercase tracking-[0.3em] text-primary",children:t.category||"Article"})}),e.jsxs("div",{className:"lg:col-span-8",children:[e.jsx("h2",{className:"font-ui font-bold text-[1.125rem] lg:text-[1.375rem] text-foreground group-hover:text-primary transition-colors leading-snug",children:t.title}),e.jsx("p",{className:"font-body text-foreground/65 text-[0.9375rem] mt-2 max-w-[64ch] line-clamp-2",style:{lineHeight:1.65},children:t.excerpt})]}),e.jsxs("div",{className:"lg:col-span-2 lg:text-right font-body text-[0.8125rem] text-foreground/55",children:[e.jsx("p",{children:t.date}),e.jsx("p",{className:"text-foreground/40 mt-1",children:t.read_time})]})]})},t.slug))}),e.jsxs("div",{className:"mt-12",children:[e.jsx("p",{className:"font-body font-semibold text-[0.6875rem] uppercase tracking-[0.3em] text-muted-foreground mb-3",children:"Other topics"}),e.jsx("ul",{className:"flex flex-wrap gap-x-5 gap-y-2",children:N.filter(t=>t.slug!==r.slug).map(t=>e.jsx("li",{children:e.jsx(o,{to:`/blog/category/${t.slug}`,className:"font-body text-[0.9375rem] text-foreground hover:text-primary",children:t.category})},t.slug))})]})]})})]})};export{K 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.