Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Failing after 15m6s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 15m58s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 15m42s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 15m21s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 1h1m41s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 1h2m13s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 23m20s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 23m33s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 1m17s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m57s
Feed-Registry mit Anbietern (Neu im Team, Neuigkeiten, Termine, Umfragen), Schnellaktionen je nach Rechten, Nachladen über /feed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 line
No EOL
19 KiB
JavaScript
1 line
No EOL
19 KiB
JavaScript
import{Mt as e,Nt as t,Ot as n,P as r,ut as i}from"./ui-DY0WbyhT.js";import{At as a,C as o,Dt as s,E as c,O as l,Q as u,S as d,T as f,Tt as p,V as m,W as h,Y as g,_t as _,g as v,h as y,i as b,k as x,kt as S,o as ee,ot as C,p as w,q as T,rt as E,s as D,st as O,v as k,w as A,x as j}from"./framework-Cy4cevSy.js";import{t as M}from"./corner-down-right-CllUTQAi.js";import{t as N}from"./link-2-BdN1y1H6.js";import{t as P}from"./send-cXiW05LR.js";import{t as F}from"./trash-5Sd5z4th.js";import{J as I,Tt as L,b as R,bt as z,d as B,et as V,f as H,g as U,i as W,pt as G,rt as K,u as q,w as J}from"./app-JMV1_L9S.js";import{t as Y}from"./NewsStats-C2YYMKBF.js";var X=t({name:`chart-no-axes-column`,size:24,node:[[`path`,{d:`M5 21v-6`,key:`1hz6c0`}],[`path`,{d:`M12 21V3`,key:`1lcnhd`}],[`path`,{d:`M19 21V9`,key:`unv183`}]],aliases:[`bar-chart-2`]}),Z=t({name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]}),Q=t({name:`reply`,size:24,node:[[`path`,{d:`M20 18v-2a4 4 0 0 0-4-4H4`,key:`5vmcpk`}],[`path`,{d:`m9 17-5-5 5-5`,key:`nvlc11`}]]}),$={id:`kommentare`,class:`rounded-xl border bg-card p-6 shadow-xs sm:p-8`,"aria-labelledby":`kommentare-titel`},te={id:`kommentare-titel`,class:`flex items-center gap-2 text-lg font-semibold`},ne={key:0,class:`rounded-pill bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground tabular-nums`},re={class:`min-w-0 flex-1`},ie=[`maxlength`,`onKeydown`],ae={key:0,class:`mt-1 text-[13px] text-destructive`},oe={key:1,class:`mt-2 flex items-center justify-end gap-3`},se={key:1,class:`mt-4 rounded-md bg-muted px-3 py-2 text-[13px] text-muted-foreground`},ce={key:2,class:`mt-6 text-sm text-muted-foreground`},le={class:`mt-6 grid gap-6`},ue=[`id`],de={class:`min-w-0 flex-1`},fe={key:0,class:`py-1 text-sm text-muted-foreground italic`},pe={class:`rounded-lg bg-muted/60 px-3.5 py-2.5`},me={class:`flex flex-wrap items-baseline gap-x-2 text-[13px]`},he={class:`font-semibold`},ge={key:0,class:`text-muted-foreground`},_e={key:0,class:`mt-0.5 flex items-center gap-1 text-xs text-muted-foreground`},ve=[`onSubmit`],ye=[`maxlength`],be={class:`mt-2 flex justify-end gap-2`},xe={key:2,class:`mt-1 text-sm leading-relaxed break-words whitespace-pre-line`},Se={class:`mt-1 flex flex-wrap items-center gap-x-3 px-1 text-xs text-muted-foreground`},Ce=[`datetime`,`title`],we={key:0},Te=[`onClick`],Ee=[`onClick`],De=[`onClick`],Oe={class:`min-w-0 flex-1`},ke={class:`mb-1 text-xs text-muted-foreground`},Ae=[`id`,`maxlength`,`onKeydown`],je={key:0,class:`mt-1 text-[13px] text-destructive`},Me={class:`mt-2 flex justify-end gap-2`},Ne={__name:`NewsComments`,props:{postSlug:{type:String,required:!0},comments:{type:Object,required:!0}},setup(e){let t=e,i=ee(),c=i.props.auth?.user,u=_(``),b=_(!1),S=_({}),E=_(null),j=_(``),N=_(null),I=_(``),L=new Intl.RelativeTimeFormat(`de-DE`,{numeric:`auto`}),R=new Intl.DateTimeFormat(`de-DE`,{dateStyle:`medium`,timeStyle:`short`});function z(e){let t=(new Date(e)-new Date)/1e3,n=[[60,`second`],[60,`minute`],[24,`hour`],[7,`day`]],r=t;for(let[e,t]of n){if(Math.abs(r)<e)return L.format(Math.round(r),t);r/=e}return R.format(new Date(e))}function B(e,n){b.value=!0,D.post(`/neuigkeiten/${t.postSlug}/kommentare`,e,{preserveScroll:!0,only:[`comments`,`flash`],onError:e=>S.value=e,onSuccess:()=>{S.value={},n();let e=i.props.flash?.comment;e&&m(()=>Y(e))},onFinish:()=>b.value=!1})}function H(){u.value.trim()&&B({body:u.value},()=>u.value=``)}function W(e){N.value=null,E.value=e,j.value=``,m(()=>document.getElementById(`antwort-${e.id}`)?.focus())}function G(){j.value.trim()&&B({body:j.value,parent_id:E.value.id},()=>{E.value=null,j.value=``})}function K(e){E.value=null,N.value=e.id,I.value=e.body}function q(e){D.put(`/kommentare/${e.id}`,{body:I.value},{preserveScroll:!0,only:[`comments`,`flash`],onSuccess:()=>N.value=null})}function J(e){window.confirm(`Kommentar löschen?`)&&D.delete(`/kommentare/${e.id}`,{preserveScroll:!0,only:[`comments`,`flash`]})}function Y(e){let t=document.getElementById(`kommentar-${e}`);t&&(t.scrollIntoView({behavior:`smooth`,block:`center`}),t.classList.add(`ring-2`,`ring-brand/40`),setTimeout(()=>t.classList.remove(`ring-2`,`ring-brand/40`),2e3))}h(()=>{let e=window.location.hash.match(/^#kommentar-(\d+)$/);e&&setTimeout(()=>Y(e[1]),300)});let X=e=>{e.target.style.height=`auto`,e.target.style.height=`${e.target.scrollHeight}px`};return(t,i)=>(T(),f(`section`,$,[d(`h2`,te,[x(p(V),{class:`size-5 text-brand-text`}),i[6]||=l(` Kommentare `,-1),e.comments.count?(T(),f(`span`,ne,a(e.comments.count),1)):A(``,!0)]),e.comments.enabled?(T(),f(`form`,{key:0,class:`mt-5 flex gap-3`,onSubmit:v(H,[`prevent`])},[p(c)?(T(),o(U,{key:0,person:p(c),class:`size-9 shrink-0`},null,8,[`person`])):A(``,!0),d(`div`,re,[O(d(`textarea`,{"onUpdate:modelValue":i[0]||=e=>u.value=e,rows:`2`,maxlength:e.comments.max,placeholder:`Was meinen Sie dazu?`,"aria-label":`Kommentar schreiben`,class:`w-full resize-none rounded-lg border border-input bg-background px-3 py-2 text-sm leading-relaxed focus-visible:border-brand-400 focus-visible:ring-3 focus-visible:ring-ring/30 focus-visible:outline-none`,onInput:X,onKeydown:[y(v(H,[`ctrl`]),[`enter`]),y(v(H,[`meta`]),[`enter`])]},null,40,ie),[[w,u.value]]),S.value.body&&!E.value?(T(),f(`p`,ae,a(S.value.body),1)):A(``,!0),u.value.trim()?(T(),f(`div`,oe,[i[8]||=d(`span`,{class:`text-xs text-muted-foreground`},`Strg + Enter zum Senden`,-1),x(p(r),{type:`submit`,size:`sm`,disabled:b.value},{default:C(()=>[b.value?(T(),o(p(n),{key:0,class:`animate-spin`})):(T(),o(p(P),{key:1})),i[7]||=l(` Kommentieren`,-1)]),_:1},8,[`disabled`])])):A(``,!0)])],32)):(T(),f(`p`,se,`Die Kommentare zu diesem Beitrag sind geschlossen.`)),!e.comments.threads.length&&e.comments.enabled?(T(),f(`p`,ce,`Noch keine Kommentare – schreiben Sie den ersten.`)):A(``,!0),d(`ol`,le,[(T(!0),f(k,null,g(e.comments.threads,t=>(T(),f(`li`,{key:t.id},[(T(!0),f(k,null,g([t,...t.replies],(t,n)=>(T(),f(`article`,{key:t.id,id:`kommentar-${t.id}`,class:s([`flex gap-3 rounded-lg transition-shadow`,n>0?`mt-4 ml-6 sm:ml-12`:``])},[t.author?(T(),o(U,{key:0,person:t.author,class:s([n>0?`size-8`:`size-9`,`shrink-0`])},null,8,[`person`,`class`])):(T(),f(`span`,{key:1,class:s([`grid shrink-0 place-items-center rounded-full bg-muted text-muted-foreground`,n>0?`size-8`:`size-9`])},[x(p(V),{class:`size-4`})],2)),d(`div`,de,[t.deleted?(T(),f(`p`,fe,`Dieser Kommentar wurde gelöscht.`)):(T(),f(k,{key:1},[d(`div`,pe,[d(`p`,me,[d(`span`,he,a(t.author?.name??`Ehemalige Person`),1),t.author?.department?(T(),f(`span`,ge,a(t.author.department),1)):A(``,!0)]),t.reply_to?(T(),f(`p`,_e,[x(p(M),{class:`size-3`}),l(` Antwort an `+a(t.reply_to),1)])):A(``,!0),N.value===t.id?(T(),f(`form`,{key:1,class:`mt-2`,onSubmit:v(e=>q(t),[`prevent`])},[O(d(`textarea`,{"onUpdate:modelValue":i[1]||=e=>I.value=e,rows:`3`,maxlength:e.comments.max,class:`w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/30`,"aria-label":`Kommentar bearbeiten`},null,8,ye),[[w,I.value]]),d(`div`,be,[x(p(r),{type:`button`,size:`sm`,variant:`ghost`,onClick:i[2]||=e=>N.value=null},{default:C(()=>[...i[9]||=[l(`Abbrechen`,-1)]]),_:1}),x(p(r),{type:`submit`,size:`sm`,disabled:!I.value.trim()},{default:C(()=>[...i[10]||=[l(`Speichern`,-1)]]),_:1},8,[`disabled`])])],40,ve)):(T(),f(`p`,xe,a(t.body),1))]),d(`div`,Se,[d(`time`,{datetime:t.created_at,title:p(R).format(new Date(t.created_at))},a(z(t.created_at)),9,Ce),t.edited?(T(),f(`span`,we,`bearbeitet`)):A(``,!0),e.comments.enabled?(T(),f(`button`,{key:1,type:`button`,class:`inline-flex items-center gap-1 font-medium hover:text-foreground`,onClick:e=>W(t)},[x(p(Q),{class:`size-3.5`}),i[11]||=l(` Antworten`,-1)],8,Te)):A(``,!0),t.can.edit?(T(),f(`button`,{key:2,type:`button`,class:`inline-flex items-center gap-1 hover:text-foreground`,onClick:e=>K(t)},[x(p(Z),{class:`size-3`}),i[12]||=l(` Bearbeiten`,-1)],8,Ee)):A(``,!0),t.can.delete?(T(),f(`button`,{key:3,type:`button`,class:`inline-flex items-center gap-1 hover:text-destructive`,onClick:e=>J(t)},[x(p(F),{class:`size-3`}),i[13]||=l(` Löschen`,-1)],8,De)):A(``,!0)])],64))])],10,ue))),128)),E.value&&[t.id,...t.replies.map(e=>e.id)].includes(E.value.id)?(T(),f(`form`,{key:0,class:`mt-3 ml-6 flex gap-3 sm:ml-12`,onSubmit:v(G,[`prevent`])},[p(c)?(T(),o(U,{key:0,person:p(c),class:`size-8 shrink-0`},null,8,[`person`])):A(``,!0),d(`div`,Oe,[d(`p`,ke,`Antwort an `+a(E.value.author?.name),1),O(d(`textarea`,{id:`antwort-${E.value.id}`,"onUpdate:modelValue":i[3]||=e=>j.value=e,rows:`2`,maxlength:e.comments.max,class:`w-full resize-none rounded-lg border border-input bg-background px-3 py-2 text-sm focus-visible:border-brand-400 focus-visible:ring-3 focus-visible:ring-ring/30 focus-visible:outline-none`,"aria-label":`Antwort schreiben`,onInput:X,onKeydown:[y(v(G,[`ctrl`]),[`enter`]),y(v(G,[`meta`]),[`enter`]),i[4]||=y(e=>E.value=null,[`esc`])]},null,40,Ae),[[w,j.value]]),S.value.body?(T(),f(`p`,je,a(S.value.body),1)):A(``,!0),d(`div`,Me,[x(p(r),{type:`button`,size:`sm`,variant:`ghost`,onClick:i[5]||=e=>E.value=null},{default:C(()=>[...i[14]||=[l(`Abbrechen`,-1)]]),_:1}),x(p(r),{type:`submit`,size:`sm`,disabled:b.value||!j.value.trim()},{default:C(()=>[x(p(P)),i[15]||=l(` Antworten`,-1)]),_:1},8,[`disabled`])])])],32)):A(``,!0)]))),128))])]))}},Pe={key:0,class:`block text-[15px] leading-relaxed`},Fe={class:`mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-[13px]`},Ie={key:0,class:`rounded-pill bg-brand-soft px-2.5 py-0.5 text-[11px] font-semibold tracking-wider text-brand-text uppercase`},Le={class:`inline-flex items-center gap-1.5`},Re={class:`inline-flex items-center gap-1.5`},ze={key:1,class:`inline-flex items-center gap-1.5`},Be={key:2,href:`#kommentare`,class:`inline-flex items-center gap-1.5 hover:text-foreground`},Ve={class:`fixed inset-x-0 top-0 z-50 h-1 bg-transparent`,"aria-hidden":`true`},He=[`src`,`alt`],Ue={class:`grid gap-6 lg:grid-cols-12`},We={class:`grid min-w-0 grid-cols-1 content-start gap-6 lg:col-span-8`},Ge={key:0,class:`mb-8 flex items-center gap-3 border-b pb-6 lg:hidden`},Ke={class:`min-w-0 text-sm`},qe={key:0,class:`text-muted-foreground`},Je=[`innerHTML`],Ye=[`innerHTML`],Xe={class:`mt-10 flex flex-wrap items-center gap-2 border-t pt-6`},Ze={key:0,class:`tabular-nums`},Qe=[`href`],$e={class:`grid content-start gap-6 lg:col-span-4`},et={key:0,class:`rounded-xl border bg-card p-5 shadow-xs`},tt={class:`min-w-0`},nt={class:`block font-semibold`},rt={key:0,class:`block text-[13px] text-muted-foreground`},it={key:1,class:`rounded-xl border bg-card p-5 shadow-xs`},at={class:`mb-3 flex items-center gap-1.5 text-xs font-semibold tracking-wider text-muted-foreground uppercase`},ot={class:`grid grid-cols-3 gap-3 text-center`},st={class:`text-xl font-semibold tabular-nums`},ct={class:`text-xl font-semibold tabular-nums`},lt={class:`text-xl font-semibold tabular-nums`},ut={key:0,class:`mt-4`},dt=[`aria-label`],ft=[`title`],pt={key:1,class:`mt-4 border-t pt-3`},mt={key:0,class:`mt-2 text-[13px] leading-relaxed text-muted-foreground`},ht={key:2,class:`rounded-xl border bg-card p-5 shadow-xs lg:sticky lg:top-20`},gt={class:`grid gap-1`},_t=[`src`],vt={key:1,class:`grid h-16 w-20 shrink-0 place-items-center rounded-md bg-brand-soft text-brand-text`},yt={class:`min-w-0`},bt={key:0,class:`block text-[10px] font-semibold tracking-wider text-accent2-text uppercase`},xt={class:`line-clamp-2 text-sm leading-snug font-medium group-hover:underline`},St={class:`flex flex-wrap items-center gap-x-3 text-xs text-muted-foreground`},Ct={__name:`Show`,props:{post:{type:Object,required:!0},related:{type:Object,required:!0},editUrl:{type:String,default:null},form:{type:Object,default:null},content:{type:Object,default:null},comments:{type:Object,default:null},reach:{type:Object,default:null},easy:{type:Object,default:null}},setup(t){let n=t,m=_(!1),h=_(null),v=_(!!n.post.liked),y=_(n.post.likes??0);E(()=>[n.post.liked,n.post.likes],([e,t])=>{v.value=!!e,y.value=t??0});function ee(){let e=!v.value;v.value=e,y.value+=e?1:-1,D.visit(`/neuigkeiten/${n.post.slug}/herz`,{method:e?`post`:`delete`,preserveScroll:!0,preserveState:!0,onError:()=>{v.value=!e,y.value+=e?-1:1}})}let w=j(()=>Math.max(1,...(n.reach?.days??[]).map(e=>e.readers))),O=_(!1),M=_(null),P=_(0),{y:F}=i();E(F,()=>{let e=M.value;if(!e)return;let t=e.getBoundingClientRect(),n=t.height-window.innerHeight*.6;P.value=Math.min(100,Math.max(0,-t.top/Math.max(n,1)*100))});let Z=_(!1);async function Q(){try{await navigator.clipboard.writeText(window.location.href),Z.value=!0,setTimeout(()=>Z.value=!1,2e3)}catch{window.prompt(`Link zum Beitrag:`,window.location.href)}}let $=e=>[e?.department,e?.job_title].filter(Boolean).join(` | `),te=()=>`mailto:?subject=${encodeURIComponent(n.post.title)}&body=${encodeURIComponent(window.location.href)}`;return(n,i)=>(T(),o(q,{title:t.post.title},{default:C(()=>[x(B,{title:t.post.title,breadcrumbs:[{label:`Neuigkeiten`,href:`/neuigkeiten`}]},c({description:C(()=>[t.post.teaser?(T(),f(`span`,Pe,a(t.post.teaser),1)):A(``,!0),d(`span`,Fe,[t.post.category?(T(),f(`span`,Ie,a(t.post.category.name),1)):A(``,!0),d(`span`,Le,[x(p(L),{class:`size-4`}),l(` `+a(p(R)(t.post.published_at)),1)]),d(`span`,Re,[x(p(z),{class:`size-4`}),l(` `+a(t.post.reading_minutes)+` Min. Lesezeit`,1)]),y.value?(T(),f(`span`,ze,[x(p(G),{class:`size-4`}),l(` `+a(y.value),1)])):A(``,!0),t.comments?.count?(T(),f(`a`,Be,[x(p(V),{class:`size-4`}),l(` `+a(t.comments.count)+` `+a(t.comments.count===1?`Kommentar`:`Kommentare`),1)])):A(``,!0)])]),_:2},[t.editUrl?{name:`actions`,fn:C(()=>[x(p(r),{variant:`outline`,size:`sm`,"as-child":``},{default:C(()=>[x(p(b),{href:t.editUrl},{default:C(()=>[x(p(I)),i[2]||=l(` Bearbeiten`,-1)]),_:1},8,[`href`])]),_:1})]),key:`0`}:void 0]),1032,[`title`]),d(`div`,Ve,[d(`div`,{class:`h-full bg-brand transition-[width] duration-150`,style:S({width:`${P.value}%`})},null,4)]),t.post.cover_url?(T(),f(`img`,{key:0,src:t.post.cover_url,alt:t.post.title,class:`mb-6 aspect-[2/1] max-h-[460px] w-full rounded-xl object-cover shadow-xs`},null,8,He)):A(``,!0),d(`div`,Ue,[d(`div`,We,[d(`article`,{ref_key:`article`,ref:M,class:`min-w-0 rounded-xl border bg-card p-6 shadow-xs sm:p-10`},[t.post.author?(T(),f(`div`,Ge,[x(U,{person:t.post.author,class:`size-11`},null,8,[`person`]),d(`div`,Ke,[x(p(b),{href:`/personen/${t.post.author.id}`,class:`font-semibold hover:underline`},{default:C(()=>[l(a(t.post.author.name),1)]),_:1},8,[`href`]),$(t.post.author)?(T(),f(`p`,qe,a($(t.post.author)),1)):A(``,!0)])])):A(``,!0),x(W,{modelValue:m.value,"onUpdate:modelValue":i[0]||=e=>m.value=e,easy:t.easy,"read-source":()=>`${t.post.title}.\n${t.post.teaser??``}\n${h.value?.innerText??``}`,class:`-mt-2 mb-6`},null,8,[`modelValue`,`easy`,`read-source`]),d(`div`,{ref_key:`body`,ref:h},[m.value&&t.easy?.html?(T(),f(`div`,{key:0,class:`prose prose-neutral max-w-none text-[17px] leading-relaxed prose-headings:tracking-tight dark:prose-invert`,lang:`de`,innerHTML:t.easy.html},null,8,Je)):t.content?(T(),o(H,{key:1,content:t.content},null,8,[`content`])):(T(),f(`div`,{key:2,class:`prose prose-neutral max-w-none prose-headings:tracking-tight prose-h2:mt-10 prose-a:text-brand-text prose-blockquote:border-l-brand prose-blockquote:bg-brand-soft/50 prose-blockquote:py-1 prose-blockquote:not-italic prose-img:rounded-lg dark:prose-invert first-of-type:prose-p:text-lg`,innerHTML:t.post.body_html},null,8,Ye))],512),t.form?(T(),o(H,{key:1,content:t.form,class:`mt-10`},null,8,[`content`])):A(``,!0),d(`footer`,Xe,[x(p(r),{variant:`outline`,size:`sm`,"aria-pressed":v.value,class:s(v.value?`border-brand/40 bg-brand-soft text-brand-text hover:bg-brand-soft hover:text-brand-text`:``),onClick:ee},{default:C(()=>[x(p(G),{class:s(v.value?`fill-current`:``)},null,8,[`class`]),l(` `+a(v.value?`Gefällt mir`:`Herz geben`),1),y.value?(T(),f(`span`,Ze,` · `+a(y.value),1)):A(``,!0)]),_:1},8,[`aria-pressed`,`class`]),i[4]||=d(`span`,{class:`mr-2 ml-auto text-sm text-muted-foreground max-sm:ml-0`},`Beitrag teilen:`,-1),x(p(r),{variant:`outline`,size:`sm`,onClick:Q},{default:C(()=>[(T(),o(u(Z.value?p(e):p(N)))),l(` `+a(Z.value?`Link kopiert`:`Link kopieren`),1)]),_:1}),x(p(r),{variant:`outline`,size:`sm`,"as-child":``},{default:C(()=>[d(`a`,{href:te()},[x(p(K)),i[3]||=l(` Per E-Mail`,-1)],8,Qe)]),_:1})])],512),t.comments?(T(),o(Ne,{key:0,"post-slug":t.post.slug,comments:t.comments},null,8,[`post-slug`,`comments`])):A(``,!0)]),d(`aside`,$e,[t.post.author?(T(),f(`section`,et,[i[5]||=d(`h2`,{class:`mb-3 text-xs font-semibold tracking-wider text-muted-foreground uppercase`},`Geschrieben von`,-1),x(p(b),{href:`/personen/${t.post.author.id}`,class:`flex items-center gap-3 rounded-lg p-1 hover:bg-accent/50`},{default:C(()=>[x(U,{person:t.post.author,class:`size-14`},null,8,[`person`]),d(`span`,tt,[d(`span`,nt,a(t.post.author.name),1),$(t.post.author)?(T(),f(`span`,rt,a($(t.post.author)),1)):A(``,!0)])]),_:1},8,[`href`])])):A(``,!0),t.reach?(T(),f(`section`,it,[d(`h2`,at,[x(p(X),{class:`size-3.5`}),i[6]||=l(` Reichweite`,-1)]),d(`dl`,ot,[d(`div`,null,[i[7]||=d(`dt`,{class:`text-[11px] text-muted-foreground`},`Gelesen`,-1),d(`dd`,st,a(t.reach.readers),1)]),d(`div`,null,[i[8]||=d(`dt`,{class:`text-[11px] text-muted-foreground`},`der Belegschaft`,-1),d(`dd`,ct,a(t.reach.share)+` %`,1)]),d(`div`,null,[i[9]||=d(`dt`,{class:`text-[11px] text-muted-foreground`},`Herzen`,-1),d(`dd`,lt,a(t.reach.likes),1)])]),t.reach.days.length>1?(T(),f(`div`,ut,[d(`div`,{class:`flex h-16 items-end gap-0.5`,role:`img`,"aria-label":`Lesende je Tag in den ersten ${t.reach.days.length} Tagen`},[(T(!0),f(k,null,g(t.reach.days,e=>(T(),f(`div`,{key:e.date,class:`flex-1 rounded-t-sm bg-brand/70`,style:S({height:`${Math.max(4,e.readers/w.value*100)}%`}),title:`${p(J)(e.date)}: ${e.readers}`},null,12,ft))),128))],8,dt),i[10]||=d(`p`,{class:`mt-1 text-[11px] text-muted-foreground`},`Lesende je Tag seit Veröffentlichung`,-1)])):A(``,!0),t.reach.likers.length?(T(),f(`div`,pt,[d(`button`,{type:`button`,class:`text-[13px] font-medium text-brand-text hover:underline`,onClick:i[1]||=e=>O.value=!O.value},a(O.value?`Ausblenden`:`Wer hat ein Herz gegeben?`),1),O.value?(T(),f(`p`,mt,a(t.reach.likers.join(`, `)),1)):A(``,!0)])):A(``,!0),i[11]||=d(`p`,{class:`mt-3 text-[11px] leading-snug text-muted-foreground`},`Gezählt wird anonym: jede Person einmal, ohne festzuhalten, wer gelesen hat.`,-1)])):A(``,!0),t.related.data.length?(T(),f(`section`,ht,[i[13]||=d(`h2`,{class:`mb-3 text-xs font-semibold tracking-wider text-muted-foreground uppercase`},`Weitere Beiträge`,-1),d(`ul`,gt,[(T(!0),f(k,null,g(t.related.data,e=>(T(),f(`li`,{key:e.id},[x(p(b),{href:`/neuigkeiten/${e.slug}`,class:`group flex gap-3 rounded-lg p-2 hover:bg-accent/50`},{default:C(()=>[e.thumb_url?(T(),f(`img`,{key:0,src:e.thumb_url,alt:``,loading:`lazy`,class:`h-16 w-20 shrink-0 rounded-md object-cover`},null,8,_t)):(T(),f(`span`,vt,[x(p(L),{class:`size-5`})])),d(`span`,yt,[e.category?(T(),f(`span`,bt,a(e.category.name),1)):A(``,!0),d(`span`,xt,a(e.title),1),d(`span`,St,[l(a(p(J)(e.published_at))+` `,1),x(Y,{post:e},null,8,[`post`])])])]),_:2},1032,[`href`])]))),128))]),x(p(b),{href:`/neuigkeiten`,class:`mt-3 block border-t pt-3 text-[13px] font-medium text-brand-text hover:underline`},{default:C(()=>[...i[12]||=[l(`Alle Neuigkeiten`,-1)]]),_:1})])):A(``,!0)])])]),_:1},8,[`title`]))}};export{Ct as default}; |