1import{_ as D}from"./D1DOg1S_.js";import{_ as F}from"./KUAp4_Qp.js";import{_ as I,o as a,c as n,b as o,g as p,w as v,h as y,t as i,d as T,F as B,r as k,n as V,u as L,A as b,l as C,e as c,f as w,z as O,y as H,C as R,a as M,R as P,m as A,G as U,D as G,E as J,H as K}from"./oRcD7oAp.js";import Q from"./DAgxeYOj.js";import{I as W}from"./B5DrVYMR.js";import{a as X}from"./BSoApO2F.js";import{_ as Y}from"./D3sZ-mLw.js";import{u as Z}from"./CukyQwHq.js";import{u as tt}from"./2KQF1Ynz.js";import{q as et}from"./DVFRPd37.js";import"./BEp6ToNd.js";import"./BkUp7sjC.js";import"./BKQMjpJi.js";const ot={},at={class:"bg-white pt-16 pb-4 md:pt-32 md:pb-12"},st={class:"section-container text-center"},nt={class:"text-4xl md:text-5xl font-bold tracking-tight text-neutral"},lt={class:"mt-4 text-lg text-neutral/60 max-w-xl mx-auto"};function rt(t,l){const m=D,e=F;return a(),n("section",at,[o("div",st,[p(e,{animation:"fade-in-up"},{default:v(()=>[p(m,{class:"mb-6"},{default:v(()=>[y(i(t.$t("blog.title")),1)]),_:1}),o("h1",nt,i(t.$t("blog.hero.title")),1),o("p",lt,i(t.$t("blog.hero.subtitle")),1)]),_:1})])])}const ct=Object.assign(I(ot,[["render",rt]]),{__name:"BlogHeroSection"}),it={class:"flex flex-wrap gap-2 justify-center"},ut=["onClick"],mt=T({__name:"TagFilterBar",props:{tags:{},activeTag:{}},emits:["update:activeTag"],setup(t){return(l,m)=>(a(),n("div",it,[(a(!0),n(B,null,k(t.tags,e=>(a(),n("button",{key:e,class:V(["rounded-full px-4 py-1.5 text-sm font-medium transition-colors",t.activeTag===e?"bg-blue/10 text-blue":"bg-neutral/5 text-neutral/70 hover:bg-neutral/10"]),onClick:f=>l.$emit("update:activeTag",e)},i(e),11,ut))),128))]))}}),dt=Object.assign(mt,{__name:"BlogTagFilterBar"}),_t={key:0,class:"aspect-video overflow-hidden"},gt={class:"p-6 flex flex-col flex-1"},pt={class:"flex flex-wrap gap-2 mb-3"},ft={class:"text-lg font-bold text-neutral group-hover:text-blue transition-colors line-clamp-2"},ht={class:"mt-2 text-sm text-neutral/60 line-clamp-2"},xt={class:"mt-auto pt-4 flex items-center justify-between text-xs text-neutral/50"},vt={class:"flex items-center gap-1.5"},bt=["src","alt"],wt=T({__name:"BlogCard",props:{article:{},to:{}},setup(t){const l=t,{locale:m}=L(),e=w(()=>X(l.article.author)),f=w(()=>new Date(l.article.date).toLocaleDateString(m.value,{year:"numeric",month:"long",day:"numeric"}));return(S,$)=>{const h=W,d=D,g=O;return a(),b(g,{to:t.to,class:"group flex flex-col bg-white rounded-2xl overflow-hidden shadow-sm hover:shadow-lg transition-shadow"},{default:v(()=>[t.article.image?(a(),n("div",_t,[p(h,{src:t.article.image,alt:t.article.title,class:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",loading:"lazy",sizes:"(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw"},null,8,["src","alt"])])):C("",!0),o("div",gt,[o("div",pt,[(a(!0),n(B,null,k(t.article.tags,x=>(a(),b(d,{key:x,variant:"neutral",class:"text-[10px]"},{default:v(()=>[y(i(x),1)]),_:2},1024))),128))]),o("h3",ft,i(t.article.title),1),o("p",ht,i(t.article.description),1),o("div",xt,[o("span",null,i(c(f)),1),o("span",vt,[c(e)?(a(),n("img",{key:0,src:c(e),alt:t.article.author,class:"size-7 rounded-full object-cover"},null,8,bt)):C("",!0),y(" "+i(t.article.author),1)])])])]),_:1},8,["to"])}}}),$t=Object.assign(wt,{__name:"BlogCard"}),yt={class:"bg-cream section-padding"},Ct={class:"section-container"},Tt={class:"flex flex-col sm:flex-row items-center justify-center gap-4 mb-12"},Bt={class:"relative w-full sm:w-auto"},kt=["placeholder"],St={key:0,class:"flex flex-wrap justify-center gap-8 [&>*]:w-full [&>*]:md:w-[calc(50%-1rem)] [&>*]:lg:w-[calc(33.333%-1.334rem)]"},jt={key:1,class:"text-center text-neutral/50"},Mt=T({__name:"index",async setup(t){let l,m;const{t:e,locale:f}=L(),S=H(),$=R();Z(),M({title:e("blog.meta.title"),description:e("blog.meta.description")});const{data:h}=([l,m]=P(()=>tt(`blog-${f.value}`,()=>et("blog").where("locale","=",f.value).order("date","DESC").all())),l=await l,m(),l),d=A($.query.tag||e("blog.allTags"));U(()=>$.query.tag,s=>{d.value=s||e("blog.allTags")});const g=A(""),x=w(()=>{const s=new Set;return h.value?.forEach(r=>r.tags?.forEach(u=>s.add(u))),[e("blog.allTags"),...Array.from(s).sort()]}),j=w(()=>
1{if(!h.value)return[];let s=h.value;d.value!==e("blog.allTags")&&(s=s.filter(u=>u.tags?.includes(d.value)));const r=g.value.trim().toLowerCase();return r&&(s=s.filter(u=>u.title?.toLowerCase().includes(r)||u.description?.toLowerCase().includes(r))),s});return(s,r)=>{const u=ct,z=dt,N=Q,q=$t,E=Y;return a(),n("div",null,[p(u),o("section",yt,[o("div",Ct,[o("div",Tt,[c(x).length>1?(a(),b(z,{key:0,tags:c(x),"active-tag":c(d),"onUpdate:activeTag":r[0]||(r[0]=_=>d.value=_)},null,8,["tags","active-tag"])):C("",!0),o("div",Bt,[p(N,{name:"lucide:search",class:"absolute left-3 top-1/2 -translate-y-1/2 size-4 text-neutral/40"}),G(o("input",{"onUpdate:modelValue":r[1]||(r[1]=_=>K(g)?g.value=_:null),type:"text",placeholder:s.$t("blog.search"),class:"w-full sm:w-56 rounded-full border border-neutral/10 bg-white py-2 pl-10 pr-4 text-sm text-neutral placeholder:text-neutral/40 focus:outline-none focus:ring-2 focus:ring-nectar-green/50"},null,8,kt),[[J,c(g)]])])]),c(j).length?(a(),n("div",St,[(a(!0),n(B,null,k(c(j),_=>(a(),b(q,{key:_.path,article:_,to:c(S)(`/blog/${_.stem?.split("/").pop()}`)},null,8,["article","to"]))),128))])):(a(),n("p",jt,i(s.$t("blog.noArticles")),1))])]),p(E)])}}});export{Mt 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.