1import{dB as d,dA as m,b as x,dC as p,f as u,j as e,a1 as h,dD as f,dy as g}from"./index-DfAU25pB.js";import{s as j}from"./sanitize-html.server-C6c2d54S.js";import{D as b}from"./DraftPreviewBanner-BKScIvtF.js";import{S as w,a as y}from"./SiteChrome-qE_RgbGE.js";import"./default-home-CpbMCnki.js";function v(t,s){return t?new Date(t).toLocaleDateString(`${s}-${s.toUpperCase()}`,{day:"2-digit",month:"long",year:"numeric"}):""}function L(){const{token:t,locale:s}=d.useParams(),n=m(s),l=x(p),o=u({queryKey:["news","preview-token",n,t],queryFn:()=>l({data:{token:t,locale:n}}),retry:!1,staleTime:0});if(o.isLoading)return e.jsx("div",{className:"min-h-screen flex items-center justify-center text-muted-foreground",children:"Lädt Vorschauâ¦"});const r=o.data?.article??null;if(!r)throw h();const c=j(r.body_html),i=f(r);return e.jsx(g,{locale:n,reason:"news-preview",children:e.jsxs("div",{className:"min-h-screen bg-background text-foreground overflow-x-hidden",children:[e.jsx(b,{}),e.jsx(w,{}),e.jsx("main",{className:"mx-auto max-w-3xl px-6 pt-28 pb-16",children:e.jsxs("article",{children:[e.jsxs("header",{className:"mt-4 mb-6",children:[e.jsxs("div",{className:"flex flex-wrap gap-2 items-center text-xs",children:[(r.categories?.length?r.categories:r.category?[r.category]:[]).map(a=>e.jsx("span",{className:"inline-flex items-center rounded-full border border-primary/30 bg-primary/10 px-3 py-1 text-[11px] font-semibold uppercase tracking-wide text-primary",children:a.name},a.id)),e.jsx("span",{className:"text-muted-foreground",children:r.published_at?v(r.published_at,n):r.is_published?"":"Entwurf â noch nicht veröffentlicht"}),r.author&&e.jsxs("span",{className:"text-muted-foreground",children:["· ",r.author]})]}),e.jsx("h1",{className:"mt-3 text-4xl md:text-5xl font-bold tracking-tight",children:i}),r.excerpt&&e.jsx("p",{className:"mt-4 text-lg text-muted-foreground",children:r.excerpt})]}),r.cover_image&&e.jsx("img",{src:r.cover_image,alt:i,className:"rounded-2xl border border-border w-full mb-8"}),e.jsx("div",{className:"tiptap-content prose prose-invert max-w-none",dangerouslySetInnerHTML:{__html:c}}),r.tags.length>0&&e.jsx("div",{className:"mt-10 flex flex-wrap gap-2",children:r.tags.map(a=>e.jsxs("span",{className:"text-xs uppercase tracking-wide border border-border rounded px-2 py-1",children:["#",a.name]},a.id))})]})}),e.jsx(y,{})]})})}export{L 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.