import{d as w,Y as y,b as k,f as M,c as o,a as e,h as r,w as c,l,F as h,j as g,p as $,Q as C,o as a,k as b,dG as D,N as x,dH as N,t as u,b3 as S,g as B,b4 as I,_ as Y}from"./Co0rzPff.js";import{a as j}from"./BNIq7RTg.js";import{_ as R}from"./BXV9WDHh.js";import{_ as T}from"./DK2gdI-M.js";import{u as F}from"./DN-g_sLF.js";import"./N3sMM75Y.js";import"./CdDJKVfF.js";const G={class:"page experimental-styles-within py-6"},V={class:"flex flex-wrap items-center justify-between gap-4 px-6"},A={class:"flex gap-2"},E={"aria-label":"RSS feed",href:"/news/feed/rss.xml",target:"_blank"},K={href:"/news/changelog","aria-label":"Changelog"},U={key:0,class:"full-width-bg brand-gradient-bg mt-6 border-0 border-y-[1px] border-solid py-4"},H={class:"featured-article px-6"},L={class:"featured-image-container"},Q=["src"],q={class:"featured-content"},z={class:"m-0 text-3xl leading-tight group-hover:underline"},J={class:"m-0 text-lg leading-tight"},O={class:"mt-auto text-secondary"},P={class:"mt-6 px-6"},W={class:"group flex w-fit items-center gap-1"},X={class:"mt-4 grid grid-cols-[repeat(auto-fill,minmax(250px,1fr))] gap-4"},Z={key:1,class:"pt-4"},ee=w({__name:"index",setup(te){const d=y(j.map(t=>({...t,path:`/news/article/${t.slug}/`,thumbnail:t.thumbnail?`/news/article/${t.slug}/thumbnail.webp`:"/news/default.webp",title:t.title,summary:t.summary,date:t.date})).sort((t,s)=>new Date(s.date).getTime()-new Date(t.date).getTime())),i=k(()=>{var t;return(t=d.value)==null?void 0:t[0]}),m=I();return F({title:"Modrinth News",ogTitle:"Modrinth News",description:"Keep up-to-date on the latest news from Modrinth.",ogDescription:"Keep up-to-date on the latest news from Modrinth.",ogType:"website",ogImage:()=>`${m.public.siteUrl}/news/thumbnail.webp`,twitterCard:"summary_large_image",twitterImage:()=>`${m.public.siteUrl}/news/thumbnail.webp`}),(t,s)=>{const v=C,p=M("tooltip");return a(),o("div",G,[e("div",V,[s[0]||(s[0]=e("div",null,[e("h1",{class:"m-0 text-3xl font-extrabold"},"News")],-1)),e("div",A,[r(T),r(l(x),{circular:""},{default:c(()=>[b((a(),o("a",E,[r(l(D))])),[[p,"RSS feed"]])]),_:1}),r(l(x),{circular:"","icon-only":""},{default:c(()=>[b((a(),o("a",K,[r(l(N))])),[[p,"Changelog"]])]),_:1})])]),d.value&&d.value.length?(a(),o(h,{key:0},[i.value?(a(),o("div",U,[r(v,{to:`${i.value.path}`,class:"active:scale-[0.99]! group flex cursor-pointer transition-all ease-in-out hover:brightness-125"},{default:c(()=>{var n,_,f;return[e("article",H,[e("div",L,[e("img",{src:i.value.thumbnail,class:"aspect-video w-full rounded-2xl border-[1px] border-solid border-button-border object-cover"},null,8,Q)]),e("div",q,[s[1]||(s[1]=e("p",{class:"m-0 font-bold"},"Featured article",-1)),e("h3",z,u((n=i.value)==null?void 0:n.title),1),e("p",J,u((_=i.value)==null?void 0:_.summary),1),e("div",O,u(l(S)((f=i.value)==null?void 0:f.date).format("MMMM D, YYYY")),1)])])]}),_:1},8,["to"])])):g("",!0),e("div",P,[e("div",W,[s[2]||(s[2]=e("h2",{class:"m-0 text-xl font-extrabold"},"More articles",-1)),g("",!0)]),e("div",X,[(a(!0),o(h,null,$(d.value.slice(1),n=>(a(),B(l(R),{key:n.path,article:n},null,8,["article"]))),128))])])],64)):(a(),o("div",Z,"Error: Articles could not be loaded."))])}}}),de=Y(ee,[["__scopeId","data-v-9f0a1e62"]]);export{de as default};