1import{z as n,r as o,j as e,L as i}from"./main-mRxYJJ_y.js";import m from"./purify.es-BZstNxVn.js";import{S as h,N as p,a as g}from"./SiteFooter-BjI9Y47x.js";import{A as u}from"./arrow-left-DfVKo1o3.js";import"./Logo-BBIFnJ7N.js";import"./button-HWRTzAwW.js";import"./utils-BaKjIkR5.js";import"./chevron-down-1m8Skf7-.js";import"./x-gJWv_tbH.js";import"./useServerFn-tBXopjXj.js";import"./phone-B2bBBtYB.js";function b(a){return typeof window<"u"&&typeof m.sanitize=="function"?m.sanitize(a):a.replace(/<\s*(script|style|iframe|object|embed)\b[\s\S]*?<\s*\/\s*\1\s*>/gi,"").replace(/\son[a-z]+\s*=\s*("[^"]*"|'[^']*'|[^\s>]+)/gi,"").replace(/javascript:/gi,"")}function q(){const{slug:a}=n.useParams(),l=n.useLoaderData(),[t,c]=o.useState(l.post??null),[r,x]=o.useState(l.related??[]);o.useEffect(()=>{c(l.post??null),x(l.related??[])},[a,l]);const d=typeof t=="object"&&t!==null?/<h1[\s>]/i.test(t.body??""):!1;return e.jsxs("div",{className:"flex min-h-screen flex-col bg-background",children:[e.jsx(h,{}),e.jsx("main",{className:"flex-1",children:t===null?e.jsx("p",{className:"p-10 text-center text-sm text-navy/60",children:"Loadingâ¦"}):t==="missing"?e.jsxs("div",{className:"mx-auto max-w-2xl px-4 py-24 text-center",children:[e.jsx("h1",{className:"text-3xl font-semibold text-navy",children:"Post not found"}),e.jsx(i,{to:"/blog",className:"mt-6 inline-block text-orange hover:underline",children:"Back to blog"})]}):e.jsxs("article",{children:[e.jsx("div",{className:"bg-cream/40 py-12 md:py-16",children:e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6",children:[e.jsxs(i,{to:"/blog",className:"inline-flex items-center gap-1 text-sm text-navy/70 hover:text-navy",children:[e.jsx(u,{className:"h-4 w-4"})," All posts"]}),t.category&&e.jsx("p",{className:"mt-6 text-sm font-medium uppercase tracking-wider text-orange",children:t.category}),d?e.jsx("div",{className:"mt-2 text-4xl font-semibold tracking-tight text-navy md:text-5xl",children:t.title}):e.jsx("h1",{className:"mt-2 text-4xl font-semibold tracking-tight text-navy md:text-5xl",children:t.title}),e.jsxs("p",{className:"mt-4 text-sm text-navy/70",children:[new Date(t.publish_date).toLocaleDateString("en-GB",{year:"numeric",month:"long",day:"numeric"}),t.author?` · ${t.author}`:""]})]})}),t.cover_image_url&&e.jsx("div",{className:"mx-auto max-w-5xl px-4 md:px-6",children:e.jsx("img",{src:t.cover_image_url,alt:t.title,className:"-mt-6 w-full rounded-xl object-cover shadow-sm md:-mt-10"})}),e.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12 md:px-6 md:py-16",children:[t.body?e.jsx("div",{className:"blog-body text-base leading-relaxed text-navy/85 [&_a]:text-orange [&_a]:underline [&_blockquote]:my-6 [&_blockquote]:border-l-4 [&_blockquote]:border-orange/40 [&_blockquote]:pl-4 [&_blockquote]:italic [&_h2]:mb-3 [&_h2]:mt-8 [&_h2]:text-2xl [&_h2]:font-semibold [&_h2]:text-navy [&_h3]:mb-2 [&_h3]:mt-6 [&_h3]:text-xl [&_h3]:font-semibold [&_h3]:text-navy [&_ol]:my-4 [&_ol]:list-decimal [&_ol]:pl-6 [&_p]:my-4 [&_ul]:my-4 [&_ul]:list-disc [&_ul]:pl-6",dangerouslySetInnerHTML:{__html:b(t.body)}}):e.jsx("p",{className:"text-navy/60",children:"No content yet."}),e.jsxs("div",{"data-newsletter-banner":!0,className:"mt-12 flex flex-col gap-8 rounded-xl border border-white/5 bg-[#0F1B2D] px-6 py-8 shadow-xl lg:flex-row lg:items-center lg:justify-between lg:gap-10 lg:px-10 lg:py-10",children:[e.jsxs("div",{className:"w-full lg:w-1/2",children:[e.jsx("h2",{className:"text-xl font-semibold tracking-tight text-white md:text-2xl",children:"The No Compromise Newsletter"}),e.jsx("p",{className:"mt-2 text-sm text-white/80 md:text-base",children:"Straight-talking hiring insight, once a month."})]}),e.jsx("div",{className:"w-full lg:w-1/2",children:e.jsx(p,{variant:"blog-banner"})})]})]}),r.length>0&&e.jsx("section",{className:"bg-cream/40 py-16 md:py-20",children:e.jsxs("div",{className:"mx-auto max-w-7xl px-4 md:px-6",children:[e.jsx("h2",{className:"text-2xl font-semibold text-navy md:text-3xl",children:"Related posts"}),e.jsx("div",{className:"mt-8 grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:r.map(s=>e.jsxs(i,{to:"/blog/$slug",params:{slug:s.slug},className:"group flex flex-col overflow-hidden rounded-xl border border-border bg-card shadow-sm transition hover:-translate-y-0.5 hover:shadow-md",children:[e.jsx("div",{className:"aspect-[16/9] w-full overflow-hidden bg-cream",children:s.cover_image_url?e.jsx("img",{src:s.cover_image_url,alt:s.title,className:"h-full w-full object-cover transition group-hover:scale-105"}):e.jsx("div",{className:"grid h-full place-items-center text-sm text-navy/40",children:s.title})}),e.jsxs("div",{className:"flex flex-1 flex-col p-5",children:[s.category&&e.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-orange",children:s.category}),e.jsx("h3",{className:"mt-1 text-lg font-semibold text-navy",children:s.title}),e.jsx("span",{className:"mt-4 text-sm font-medium text-orange transition group-hover:underline",children:"Read article â"})]})]},s.id))})]})})]})}),e.jsx(g,{})]})}
1export{q as component};
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.