Some checks failed
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 6m49s
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 7m19s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 7m29s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 7m39s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 9m38s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 9m25s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 7m57s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 8m4s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 46s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m9s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 line
No EOL
20 KiB
JavaScript
1 line
No EOL
20 KiB
JavaScript
import{D as e,E as t,Ht as n,On as r,Yt as i,Zn as a,_ as o,b as s,bt as c,ct as l,er as u,g as d,mt as f,o as p,qt as m,tr as h,tt as g,v as _,vn as v,wt as y,y as b}from"./runtime-core.esm-bundler-B8D2lM98.js";import{C as x,w as S,x as C}from"./runtime-dom.esm-bundler-BEWGoe8n.js";import{i as w,o as T,s as E}from"./dist--2OKCVzt.js";import{t as D}from"./createLucideIcon-VlaMqNX_.js";import{t as O}from"./arrow-left-DROE4wuA.js";import{t as k}from"./check-ZP3y69wT.js";import{t as A}from"./corner-down-right-D6giudNX.js";import{t as j}from"./link-2-Cy2KvWtg.js";import{t as M}from"./loader-circle-Wr6tQn-J.js";import{t as N}from"./message-circle-EmbkkOXQ.js";import{t as P}from"./pen-line-B1UtLKH3.js";import{t as F}from"./send-B_gp9Kto.js";import{t as I}from"./trash-CONUPzoz.js";import{o as L}from"./dist-DtZOZ5EL.js";import{A as R,D as z,Lt as B,P as V,Ut as H,Yt as U,_ as W,h as G,kt as K,w as q}from"./app-CEvkC1-R.js";import{t as J}from"./PageContent-mFABZ6CX.js";var Y=D({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`]}),X=D({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`}]]}),ee=D({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`}]]}),Z={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`},Q={__name:`NewsComments`,props:{postSlug:{type:String,required:!0},comments:{type:Object,required:!0}},setup(n){let u=n,d=T(),y=d.props.auth?.user,w=v(``),D=v(!1),O=v({}),k=v(null),j=v(``),P=v(null),L=v(``),R=new Intl.RelativeTimeFormat(`de-DE`,{numeric:`auto`}),B=new Intl.DateTimeFormat(`de-DE`,{dateStyle:`medium`,timeStyle:`short`});function V(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 R.format(Math.round(r),t);r/=e}return B.format(new Date(e))}function H(e,t){D.value=!0,E.post(`/neuigkeiten/${u.postSlug}/kommentare`,e,{preserveScroll:!0,only:[`comments`,`flash`],onError:e=>O.value=e,onSuccess:()=>{O.value={},t();let e=d.props.flash?.comment;e&&g(()=>Q(e))},onFinish:()=>D.value=!1})}function U(){w.value.trim()&&H({body:w.value},()=>w.value=``)}function G(e){P.value=null,k.value=e,j.value=``,g(()=>document.getElementById(`antwort-${e.id}`)?.focus())}function K(){j.value.trim()&&H({body:j.value,parent_id:k.value.id},()=>{k.value=null,j.value=``})}function q(e){k.value=null,P.value=e.id,L.value=e.body}function J(e){E.put(`/kommentare/${e.id}`,{body:L.value},{preserveScroll:!0,only:[`comments`,`flash`],onSuccess:()=>P.value=null})}function Y(e){window.confirm(`Kommentar löschen?`)&&E.delete(`/kommentare/${e.id}`,{preserveScroll:!0,only:[`comments`,`flash`]})}function Q(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))}l(()=>{let e=window.location.hash.match(/^#kommentar-(\d+)$/);e&&setTimeout(()=>Q(e[1]),300)});let $=e=>{e.target.style.height=`auto`,e.target.style.height=`${e.target.scrollHeight}px`};return(l,u)=>(f(),s(`section`,Z,[o(`h2`,te,[e(r(N),{class:`size-5 text-brand-text`}),u[6]||=t(` Kommentare `,-1),n.comments.count?(f(),s(`span`,ne,h(n.comments.count),1)):b(``,!0)]),n.comments.enabled?(f(),s(`form`,{key:0,class:`mt-5 flex gap-3`,onSubmit:S(U,[`prevent`])},[r(y)?(f(),_(z,{key:0,person:r(y),class:`size-9 shrink-0`},null,8,[`person`])):b(``,!0),o(`div`,re,[i(o(`textarea`,{"onUpdate:modelValue":u[0]||=e=>w.value=e,rows:`2`,maxlength:n.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:$,onKeydown:[x(S(U,[`ctrl`]),[`enter`]),x(S(U,[`meta`]),[`enter`])]},null,40,ie),[[C,w.value]]),O.value.body&&!k.value?(f(),s(`p`,ae,h(O.value.body),1)):b(``,!0),w.value.trim()?(f(),s(`div`,oe,[u[8]||=o(`span`,{class:`text-xs text-muted-foreground`},`Strg + Enter zum Senden`,-1),e(r(W),{type:`submit`,size:`sm`,disabled:D.value},{default:m(()=>[D.value?(f(),_(r(M),{key:0,class:`animate-spin`})):(f(),_(r(F),{key:1})),u[7]||=t(` Kommentieren`,-1)]),_:1},8,[`disabled`])])):b(``,!0)])],32)):(f(),s(`p`,se,`Die Kommentare zu diesem Beitrag sind geschlossen.`)),!n.comments.threads.length&&n.comments.enabled?(f(),s(`p`,ce,`Noch keine Kommentare – schreiben Sie den ersten.`)):b(``,!0),o(`ol`,le,[(f(!0),s(p,null,c(n.comments.threads,l=>(f(),s(`li`,{key:l.id},[(f(!0),s(p,null,c([l,...l.replies],(c,l)=>(f(),s(`article`,{key:c.id,id:`kommentar-${c.id}`,class:a([`flex gap-3 rounded-lg transition-shadow`,l>0?`mt-4 ml-6 sm:ml-12`:``])},[c.author?(f(),_(z,{key:0,person:c.author,class:a([l>0?`size-8`:`size-9`,`shrink-0`])},null,8,[`person`,`class`])):(f(),s(`span`,{key:1,class:a([`grid shrink-0 place-items-center rounded-full bg-muted text-muted-foreground`,l>0?`size-8`:`size-9`])},[e(r(N),{class:`size-4`})],2)),o(`div`,de,[c.deleted?(f(),s(`p`,fe,`Dieser Kommentar wurde gelöscht.`)):(f(),s(p,{key:1},[o(`div`,pe,[o(`p`,me,[o(`span`,he,h(c.author?.name??`Ehemalige Person`),1),c.author?.department?(f(),s(`span`,ge,h(c.author.department),1)):b(``,!0)]),c.reply_to?(f(),s(`p`,_e,[e(r(A),{class:`size-3`}),t(` Antwort an `+h(c.reply_to),1)])):b(``,!0),P.value===c.id?(f(),s(`form`,{key:1,class:`mt-2`,onSubmit:S(e=>J(c),[`prevent`])},[i(o(`textarea`,{"onUpdate:modelValue":u[1]||=e=>L.value=e,rows:`3`,maxlength:n.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),[[C,L.value]]),o(`div`,be,[e(r(W),{type:`button`,size:`sm`,variant:`ghost`,onClick:u[2]||=e=>P.value=null},{default:m(()=>[...u[9]||=[t(`Abbrechen`,-1)]]),_:1}),e(r(W),{type:`submit`,size:`sm`,disabled:!L.value.trim()},{default:m(()=>[...u[10]||=[t(`Speichern`,-1)]]),_:1},8,[`disabled`])])],40,ve)):(f(),s(`p`,xe,h(c.body),1))]),o(`div`,Se,[o(`time`,{datetime:c.created_at,title:r(B).format(new Date(c.created_at))},h(V(c.created_at)),9,Ce),c.edited?(f(),s(`span`,we,`bearbeitet`)):b(``,!0),n.comments.enabled?(f(),s(`button`,{key:1,type:`button`,class:`inline-flex items-center gap-1 font-medium hover:text-foreground`,onClick:e=>G(c)},[e(r(ee),{class:`size-3.5`}),u[11]||=t(` Antworten`,-1)],8,Te)):b(``,!0),c.can.edit?(f(),s(`button`,{key:2,type:`button`,class:`inline-flex items-center gap-1 hover:text-foreground`,onClick:e=>q(c)},[e(r(X),{class:`size-3`}),u[12]||=t(` Bearbeiten`,-1)],8,Ee)):b(``,!0),c.can.delete?(f(),s(`button`,{key:3,type:`button`,class:`inline-flex items-center gap-1 hover:text-destructive`,onClick:e=>Y(c)},[e(r(I),{class:`size-3`}),u[13]||=t(` Löschen`,-1)],8,De)):b(``,!0)])],64))])],10,ue))),128)),k.value&&[l.id,...l.replies.map(e=>e.id)].includes(k.value.id)?(f(),s(`form`,{key:0,class:`mt-3 ml-6 flex gap-3 sm:ml-12`,onSubmit:S(K,[`prevent`])},[r(y)?(f(),_(z,{key:0,person:r(y),class:`size-8 shrink-0`},null,8,[`person`])):b(``,!0),o(`div`,Oe,[o(`p`,ke,`Antwort an `+h(k.value.author?.name),1),i(o(`textarea`,{id:`antwort-${k.value.id}`,"onUpdate:modelValue":u[3]||=e=>j.value=e,rows:`2`,maxlength:n.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:$,onKeydown:[x(S(K,[`ctrl`]),[`enter`]),x(S(K,[`meta`]),[`enter`]),u[4]||=x(e=>k.value=null,[`esc`])]},null,40,Ae),[[C,j.value]]),O.value.body?(f(),s(`p`,je,h(O.value.body),1)):b(``,!0),o(`div`,Me,[e(r(W),{type:`button`,size:`sm`,variant:`ghost`,onClick:u[5]||=e=>k.value=null},{default:m(()=>[...u[14]||=[t(`Abbrechen`,-1)]]),_:1}),e(r(W),{type:`submit`,size:`sm`,disabled:D.value||!j.value.trim()},{default:m(()=>[e(r(F)),u[15]||=t(` Antworten`,-1)]),_:1},8,[`disabled`])])])],32)):b(``,!0)]))),128))])]))}},$={class:`fixed inset-x-0 top-0 z-50 h-1 bg-transparent`,"aria-hidden":`true`},Ne={class:`mb-4 flex items-center justify-between gap-4`},Pe={class:`relative isolate overflow-hidden rounded-xl bg-brand text-white shadow-sm`},Fe=[`src`,`alt`],Ie={key:1,class:`absolute inset-0 -z-10 bg-gradient-to-t from-black/85 via-black/45 to-black/5`},Le={key:2,class:`absolute inset-0 -z-10 opacity-20 [background-image:radial-gradient(circle_at_85%_15%,white_0,transparent_45%),radial-gradient(circle_at_10%_110%,white_0,transparent_40%)]`},Re={class:`flex min-h-[260px] flex-col justify-end gap-3 p-6 sm:min-h-[360px] sm:p-10 lg:min-h-[420px]`},ze={key:0,class:`w-fit rounded-pill bg-white/15 px-3 py-1 text-[11px] font-semibold tracking-wider uppercase ring-1 ring-white/30 backdrop-blur`},Be={class:`max-w-4xl text-3xl leading-tight font-semibold tracking-tight text-balance sm:text-4xl lg:text-[44px]`},Ve={key:1,class:`max-w-3xl text-base leading-relaxed text-white/85 sm:text-lg`},He={class:`mt-2 flex flex-wrap items-center gap-x-5 gap-y-2 text-sm text-white/80`},Ue={class:`inline-flex items-center gap-1.5`},We={class:`inline-flex items-center gap-1.5`},Ge={key:0,class:`inline-flex items-center gap-1.5`},Ke={key:1,href:`#kommentare`,class:`inline-flex items-center gap-1.5 hover:text-white`},qe={class:`mt-6 grid gap-6 lg:grid-cols-12`},Je={class:`grid min-w-0 grid-cols-1 content-start gap-6 lg:col-span-8`},Ye={key:0,class:`mb-8 flex items-center gap-3 border-b pb-6 lg:hidden`},Xe={class:`min-w-0 text-sm`},Ze={key:0,class:`text-muted-foreground`},Qe=[`innerHTML`],$e=[`innerHTML`],et={class:`mt-10 flex flex-wrap items-center gap-2 border-t pt-6`},tt={key:0,class:`tabular-nums`},nt=[`href`],rt={class:`grid content-start gap-6 lg:col-span-4`},it={key:0,class:`rounded-xl border bg-card p-5 shadow-xs`},at={class:`min-w-0`},ot={class:`block font-semibold`},st={key:0,class:`block text-[13px] text-muted-foreground`},ct={key:1,class:`rounded-xl border bg-card p-5 shadow-xs`},lt={class:`mb-3 flex items-center gap-1.5 text-xs font-semibold tracking-wider text-muted-foreground uppercase`},ut={class:`grid grid-cols-3 gap-3 text-center`},dt={class:`text-xl font-semibold tabular-nums`},ft={class:`text-xl font-semibold tabular-nums`},pt={class:`text-xl font-semibold tabular-nums`},mt={key:0,class:`mt-4`},ht=[`aria-label`],gt=[`title`],_t={key:1,class:`mt-4 border-t pt-3`},vt={key:0,class:`mt-2 text-[13px] leading-relaxed text-muted-foreground`},yt={key:2,class:`rounded-xl border bg-card p-5 shadow-xs lg:sticky lg:top-20`},bt={class:`grid gap-1`},xt=[`src`],St={key:1,class:`grid h-16 w-20 shrink-0 place-items-center rounded-md bg-brand-soft text-brand-text`},Ct={class:`min-w-0`},wt={key:0,class:`block text-[10px] font-semibold tracking-wider text-accent2-text uppercase`},Tt={class:`line-clamp-2 text-sm leading-snug font-medium group-hover:underline`},Et={class:`block text-xs text-muted-foreground`},Dt={__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(i){let l=i,g=v(!1),x=v(null),S=v(!!l.post.liked),C=v(l.post.likes??0);n(()=>[l.post.liked,l.post.likes],([e,t])=>{S.value=!!e,C.value=t??0});function T(){let e=!S.value;S.value=e,C.value+=e?1:-1,E.visit(`/neuigkeiten/${l.post.slug}/herz`,{method:e?`post`:`delete`,preserveScroll:!0,preserveState:!0,onError:()=>{S.value=!e,C.value+=e?-1:1}})}let D=d(()=>Math.max(1,...(l.reach?.days??[]).map(e=>e.readers))),A=v(!1),M=v(null),F=v(0),{y:I}=L();n(I,()=>{let e=M.value;if(!e)return;let t=e.getBoundingClientRect(),n=t.height-window.innerHeight*.6;F.value=Math.min(100,Math.max(0,-t.top/Math.max(n,1)*100))});let X=v(!1);async function ee(){try{await navigator.clipboard.writeText(window.location.href),X.value=!0,setTimeout(()=>X.value=!1,2e3)}catch{window.prompt(`Link zum Beitrag:`,window.location.href)}}let Z=e=>[e?.department,e?.job_title].filter(Boolean).join(` | `),te=()=>`mailto:?subject=${encodeURIComponent(l.post.title)}&body=${encodeURIComponent(window.location.href)}`;return(n,l)=>(f(),_(q,{title:i.post.title},{default:m(()=>[o(`div`,$,[o(`div`,{class:`h-full bg-brand transition-[width] duration-150`,style:u({width:`${F.value}%`})},null,4)]),o(`div`,Ne,[e(r(w),{href:`/neuigkeiten`,class:`inline-flex items-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground`},{default:m(()=>[e(r(O),{class:`size-4`}),l[2]||=t(` Alle Neuigkeiten `,-1)]),_:1}),i.editUrl?(f(),_(r(W),{key:0,variant:`outline`,size:`sm`,"as-child":``},{default:m(()=>[e(r(w),{href:i.editUrl},{default:m(()=>[e(r(P)),l[3]||=t(` Bearbeiten`,-1)]),_:1},8,[`href`])]),_:1})):b(``,!0)]),o(`header`,Pe,[i.post.cover_url?(f(),s(`img`,{key:0,src:i.post.cover_url,alt:i.post.title,class:`absolute inset-0 -z-10 size-full object-cover`},null,8,Fe)):b(``,!0),i.post.cover_url?(f(),s(`div`,Ie)):(f(),s(`div`,Le)),o(`div`,Re,[i.post.category?(f(),s(`span`,ze,h(i.post.category.name),1)):b(``,!0),o(`h1`,Be,h(i.post.title),1),i.post.teaser?(f(),s(`p`,Ve,h(i.post.teaser),1)):b(``,!0),o(`div`,He,[o(`span`,Ue,[e(r(U),{class:`size-4`}),t(` `+h(r(R)(i.post.published_at)),1)]),o(`span`,We,[e(r(H),{class:`size-4`}),t(` `+h(i.post.reading_minutes)+` Min. Lesezeit`,1)]),C.value?(f(),s(`span`,Ge,[e(r(B),{class:`size-4`}),t(` `+h(C.value),1)])):b(``,!0),i.comments?.count?(f(),s(`a`,Ke,[e(r(N),{class:`size-4`}),t(` `+h(i.comments.count)+` `+h(i.comments.count===1?`Kommentar`:`Kommentare`),1)])):b(``,!0)])])]),o(`div`,qe,[o(`div`,Je,[o(`article`,{ref_key:`article`,ref:M,class:`min-w-0 rounded-xl border bg-card p-6 shadow-xs sm:p-10`},[i.post.author?(f(),s(`div`,Ye,[e(z,{person:i.post.author,class:`size-11`},null,8,[`person`]),o(`div`,Xe,[e(r(w),{href:`/personen/${i.post.author.id}`,class:`font-semibold hover:underline`},{default:m(()=>[t(h(i.post.author.name),1)]),_:1},8,[`href`]),Z(i.post.author)?(f(),s(`p`,Ze,h(Z(i.post.author)),1)):b(``,!0)])])):b(``,!0),e(G,{modelValue:g.value,"onUpdate:modelValue":l[0]||=e=>g.value=e,easy:i.easy,"read-source":()=>`${i.post.title}.\n${i.post.teaser??``}\n${x.value?.innerText??``}`,class:`-mt-2 mb-6`},null,8,[`modelValue`,`easy`,`read-source`]),o(`div`,{ref_key:`body`,ref:x},[g.value&&i.easy?.html?(f(),s(`div`,{key:0,class:`prose prose-neutral max-w-none text-[17px] leading-relaxed prose-headings:tracking-tight dark:prose-invert`,lang:`de`,innerHTML:i.easy.html},null,8,Qe)):i.content?(f(),_(J,{key:1,content:i.content},null,8,[`content`])):(f(),s(`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:i.post.body_html},null,8,$e))],512),i.form?(f(),_(J,{key:1,content:i.form,class:`mt-10`},null,8,[`content`])):b(``,!0),o(`footer`,et,[e(r(W),{variant:`outline`,size:`sm`,"aria-pressed":S.value,class:a(S.value?`border-brand/40 bg-brand-soft text-brand-text hover:bg-brand-soft hover:text-brand-text`:``),onClick:T},{default:m(()=>[e(r(B),{class:a(S.value?`fill-current`:``)},null,8,[`class`]),t(` `+h(S.value?`Gefällt mir`:`Herz geben`),1),C.value?(f(),s(`span`,tt,` · `+h(C.value),1)):b(``,!0)]),_:1},8,[`aria-pressed`,`class`]),l[5]||=o(`span`,{class:`mr-2 ml-auto text-sm text-muted-foreground max-sm:ml-0`},`Beitrag teilen:`,-1),e(r(W),{variant:`outline`,size:`sm`,onClick:ee},{default:m(()=>[(f(),_(y(X.value?r(k):r(j)))),t(` `+h(X.value?`Link kopiert`:`Link kopieren`),1)]),_:1}),e(r(W),{variant:`outline`,size:`sm`,"as-child":``},{default:m(()=>[o(`a`,{href:te()},[e(r(K)),l[4]||=t(` Per E-Mail`,-1)],8,nt)]),_:1})])],512),i.comments?(f(),_(Q,{key:0,"post-slug":i.post.slug,comments:i.comments},null,8,[`post-slug`,`comments`])):b(``,!0)]),o(`aside`,rt,[i.post.author?(f(),s(`section`,it,[l[6]||=o(`h2`,{class:`mb-3 text-xs font-semibold tracking-wider text-muted-foreground uppercase`},`Geschrieben von`,-1),e(r(w),{href:`/personen/${i.post.author.id}`,class:`flex items-center gap-3 rounded-lg p-1 hover:bg-accent/50`},{default:m(()=>[e(z,{person:i.post.author,class:`size-14`},null,8,[`person`]),o(`span`,at,[o(`span`,ot,h(i.post.author.name),1),Z(i.post.author)?(f(),s(`span`,st,h(Z(i.post.author)),1)):b(``,!0)])]),_:1},8,[`href`])])):b(``,!0),i.reach?(f(),s(`section`,ct,[o(`h2`,lt,[e(r(Y),{class:`size-3.5`}),l[7]||=t(` Reichweite`,-1)]),o(`dl`,ut,[o(`div`,null,[l[8]||=o(`dt`,{class:`text-[11px] text-muted-foreground`},`Gelesen`,-1),o(`dd`,dt,h(i.reach.readers),1)]),o(`div`,null,[l[9]||=o(`dt`,{class:`text-[11px] text-muted-foreground`},`der Belegschaft`,-1),o(`dd`,ft,h(i.reach.share)+` %`,1)]),o(`div`,null,[l[10]||=o(`dt`,{class:`text-[11px] text-muted-foreground`},`Herzen`,-1),o(`dd`,pt,h(i.reach.likes),1)])]),i.reach.days.length>1?(f(),s(`div`,mt,[o(`div`,{class:`flex h-16 items-end gap-0.5`,role:`img`,"aria-label":`Lesende je Tag in den ersten ${i.reach.days.length} Tagen`},[(f(!0),s(p,null,c(i.reach.days,e=>(f(),s(`div`,{key:e.date,class:`flex-1 rounded-t-sm bg-brand/70`,style:u({height:`${Math.max(4,e.readers/D.value*100)}%`}),title:`${r(V)(e.date)}: ${e.readers}`},null,12,gt))),128))],8,ht),l[11]||=o(`p`,{class:`mt-1 text-[11px] text-muted-foreground`},`Lesende je Tag seit Veröffentlichung`,-1)])):b(``,!0),i.reach.likers.length?(f(),s(`div`,_t,[o(`button`,{type:`button`,class:`text-[13px] font-medium text-brand-text hover:underline`,onClick:l[1]||=e=>A.value=!A.value},h(A.value?`Ausblenden`:`Wer hat ein Herz gegeben?`),1),A.value?(f(),s(`p`,vt,h(i.reach.likers.join(`, `)),1)):b(``,!0)])):b(``,!0),l[12]||=o(`p`,{class:`mt-3 text-[11px] leading-snug text-muted-foreground`},`Gezählt wird anonym: jede Person einmal, ohne festzuhalten, wer gelesen hat.`,-1)])):b(``,!0),i.related.data.length?(f(),s(`section`,yt,[l[14]||=o(`h2`,{class:`mb-3 text-xs font-semibold tracking-wider text-muted-foreground uppercase`},`Weitere Beiträge`,-1),o(`ul`,bt,[(f(!0),s(p,null,c(i.related.data,t=>(f(),s(`li`,{key:t.id},[e(r(w),{href:`/neuigkeiten/${t.slug}`,class:`group flex gap-3 rounded-lg p-2 hover:bg-accent/50`},{default:m(()=>[t.thumb_url?(f(),s(`img`,{key:0,src:t.thumb_url,alt:``,loading:`lazy`,class:`h-16 w-20 shrink-0 rounded-md object-cover`},null,8,xt)):(f(),s(`span`,St,[e(r(U),{class:`size-5`})])),o(`span`,Ct,[t.category?(f(),s(`span`,wt,h(t.category.name),1)):b(``,!0),o(`span`,Tt,h(t.title),1),o(`span`,Et,h(r(V)(t.published_at)),1)])]),_:2},1032,[`href`])]))),128))]),e(r(w),{href:`/neuigkeiten`,class:`mt-3 block border-t pt-3 text-[13px] font-medium text-brand-text hover:underline`},{default:m(()=>[...l[13]||=[t(`Alle Neuigkeiten`,-1)]]),_:1})])):b(``,!0)])])]),_:1},8,[`title`]))}};export{Dt as default}; |