Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Failing after 7m6s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 13s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 7m24s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 8m34s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 9m51s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 10m39s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 9m4s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 47s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m9s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 8m42s
Tasks-Registry mit Anbietern aus QM, Umfragen und Redaktion; Kachel auf der Startseite und Seite /aufgaben. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 line
No EOL
3.8 KiB
JavaScript
1 line
No EOL
3.8 KiB
JavaScript
import{At as e,C as t,Dt as n,O as r,S as i,T as a,Tt as o,U as s,W as c,Y as l,_t as u,i as d,k as f,ot as p,q as m,v as h,w as g,x as _}from"./framework-Cy4cevSy.js";import{t as v}from"./chevron-left-DIunBPjc.js";import{G as y,Mt as b,Y as x,wt as S}from"./app-DHlPv52N.js";import{t as C}from"./NewsStats-B70VmSJJ.js";var w=[`src`,`aria-hidden`,`loading`],T={class:`flex h-full flex-col justify-end p-6 sm:max-w-[65%] sm:justify-center sm:p-10`,"aria-live":`polite`},E={key:0,class:`mb-3 w-fit rounded-sm bg-brand px-2 py-0.5 text-[11px] font-semibold tracking-wide text-brand-foreground uppercase`},D={class:`text-2xl leading-tight font-semibold tracking-tight sm:text-[32px]`},O={key:1,class:`mt-3 line-clamp-3 hidden text-[15px] text-white/85 sm:block`},k={key:0,class:`absolute right-4 bottom-4 flex items-center gap-2 sm:right-6 sm:bottom-6`},A={class:`flex items-center gap-1.5 px-1`},j=[`aria-label`,`aria-current`,`onClick`],M=[`aria-label`],N={__name:`HeroSlider`,props:{posts:{type:Array,required:!0}},setup(N){let P=N,F=u(0),I=u(!1),L=_(()=>P.posts[F.value]),R=null;function z(e){F.value=(e+P.posts.length)%P.posts.length}function B(){V(),P.posts.length>1&&!I.value&&!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches&&(R=setInterval(()=>z(F.value+1),7e3))}function V(){clearInterval(R)}function H(){I.value=!I.value,B()}return c(B),s(V),(s,c)=>(m(),a(`section`,{class:`relative isolate aspect-[16/10] overflow-hidden rounded-lg bg-brand-950 text-white sm:aspect-[16/9] lg:aspect-auto lg:h-full lg:min-h-[400px]`,"aria-roledescription":`Karussell`,"aria-label":`Hervorgehobene Neuigkeiten`,onMouseenter:V,onMouseleave:B,onFocusin:V,onFocusout:B},[(m(!0),a(h,null,l(N.posts,(e,t)=>(m(),a(`img`,{key:e.id,src:e.cover_url,alt:``,"aria-hidden":t!==F.value,loading:t===0?`eager`:`lazy`,class:n([`absolute inset-0 -z-10 size-full object-cover transition-opacity duration-700`,t===F.value?`opacity-100`:`opacity-0`])},null,10,w))),128)),c[3]||=i(`div`,{class:`absolute inset-0 -z-10 bg-gradient-to-t from-black/80 via-black/35 to-black/5 sm:bg-gradient-to-r sm:from-black/75 sm:via-black/40 sm:to-transparent`},null,-1),i(`div`,T,[L.value.category?(m(),a(`span`,E,e(L.value.category.name),1)):g(``,!0),i(`h2`,D,e(L.value.title),1),L.value.teaser?(m(),a(`p`,O,e(L.value.teaser),1)):g(``,!0),L.value.likes||L.value.comments?(m(),t(C,{key:2,post:L.value,light:``,class:`mt-3`},null,8,[`post`])):g(``,!0),f(o(d),{href:`/neuigkeiten/${L.value.slug}`,class:`mt-5 inline-flex w-fit items-center gap-2 rounded-md bg-brand px-4 py-2.5 text-sm font-medium text-brand-foreground transition-colors hover:bg-brand-700`},{default:p(()=>[c[2]||=r(` Mehr erfahren `,-1),f(o(b),{class:`size-4`})]),_:1},8,[`href`])]),N.posts.length>1?(m(),a(`div`,k,[i(`button`,{type:`button`,class:`grid size-9 place-items-center rounded-full bg-black/35 hover:bg-black/55`,"aria-label":`Vorheriger Beitrag`,onClick:c[0]||=e=>z(F.value-1)},[f(o(v),{class:`size-5`})]),i(`div`,A,[(m(!0),a(h,null,l(N.posts,(e,t)=>(m(),a(`button`,{key:e.id,type:`button`,class:n([`h-1.5 rounded-full transition-all`,t===F.value?`w-6 bg-white`:`w-1.5 bg-white/50 hover:bg-white/80`]),"aria-label":`Beitrag ${t+1} von ${N.posts.length}`,"aria-current":t===F.value,onClick:e=>z(t)},null,10,j))),128))]),i(`button`,{type:`button`,class:`grid size-9 place-items-center rounded-full bg-black/35 hover:bg-black/55`,"aria-label":`Nächster Beitrag`,onClick:c[1]||=e=>z(F.value+1)},[f(o(S),{class:`size-5`})]),i(`button`,{type:`button`,class:`grid size-9 place-items-center rounded-full bg-black/35 hover:bg-black/55`,"aria-label":I.value?`Automatisch weiterblättern`:`Anhalten`,onClick:H},[I.value?(m(),t(o(y),{key:0,class:`size-4`})):(m(),t(o(x),{key:1,class:`size-4`}))],8,M)])):g(``,!0)],32))}},P={__name:`Hero`,props:{posts:{type:Array,required:!0}},setup(e){return(n,r)=>(m(),t(N,{posts:e.posts,class:`h-full`},null,8,[`posts`]))}};export{P as default}; |