1import{f as x,u as h,r as m,h as p,c as o,a as t,b as y,w as u,j as r,F as b,k as f,e as w,o as s,d as k,C as v,i as D,t as l}from"#entry";import{n as N}from"./CpvNRxAT.js";import{u as B}from"./Dy9pVEbO.js";import"./DKLWY9DJ.js";const C={class:"min-h-screen bg-gray-50"},F={class:"bg-white border-b border-gray-100"},H={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12"},L={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-10"},S={key:0,class:"text-gray-600 py-12 text-center"},V={key:1,class:"text-center py-16 text-gray-500"},j={key:2,class:"grid md:grid-cols-2 lg:grid-cols-3 gap-8"},q=["src","alt"],K={key:1,class:"w-full h-48 bg-amber-100 flex items-center justify-center text-5xl"},P={class:"p-5"},T={key:0,class:"text-xs font-semibold uppercase tracking-wide text-amber-700 mb-2"},U={class:"text-xl font-bold text-gray-900 mb-2"},A={class:"text-sm text-gray-600 line-clamp-3"},E={class:"text-xs text-gray-400 mt-3"},O=x({__name:"index",setup(G){B({title:"DogHealthy news",description:"UK dog health news, NFC tag updates and tips from DogHealthy.",path:"/news"});const _=h(),i=m(!0),d=m([]),g=n=>{try{return new Date(n).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"})}catch{return""}};return p(async()=>{const{data:n}=await _.from("doghealthy_news").select("id, slug, title, excerpt, body, image_url, image_alt, is_featured, category, published_at, created_at").eq("is_published",!0).eq("category","news").order("published_at",{ascending:!1});d.value=n||[],i.value=!1}),(n,a)=>{const c=w;return s(),o("div",C,[t("div",F,[t("div",H,[a[1]||(a[1]=t("h1",{class:"text-4xl font-bold text-gray-900 mb-3"},"DogHealthy news",-1)),a[2]||(a[2]=t("p",{class:"text-lg text-gray-600 max-w-2xl"}," Tips, product updates and UK dog-health stories from the DogHealthy team. ",-1)),y(c,{to:"/how-to",class:"inline-block mt-4 text-emerald-800 font-semibold hover:underline"},{default:u(()=>[...a[0]||(a[0]=[k(" Browse how-to guides â ",-1)])]),_:1})])]),t("div",L,[r(i)?(s(),o("div",S,"Loading articlesâ¦")):r(d).length===0?(s(),o("div",V," No news yet â check back soon. ")):(s(),o("div",j,[(s(!0),o(b,null,f(r(d),e=>(s(),v(c,{key:e.id,to:r(N)(e),class:"bg-white rounded-xl shadow-md hover:shadow-xl transition-shadow overflow-hidden border border-gray-100"},{default:u(()=>[e.image_url?(s(),o("img",{key:0,src:e.image_url,alt:e.image_alt||e.title,class:"w-full h-48 object-cover"},null,8,q)):(s(),o("div",K,"ð°")),t("div",P,[e.is_featured?(s(),o("p",T," Featured ")):D("",!0),t("h2",U,l(e.title),1),t("p",A,l(e.excerpt||e.body),1),t("p",E,l(g(e.published_at||e.created_at)),1)])]),_:2},1032,["to"]))),128))]))])])}}});export{O as default};
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.