import{_ as k,a as y}from"./CXBp9qZA.js";import{d as u,r as w,o as v,Q as $,e as l,aN as g,c as i,f as e,t as h,I as f,l as x,aO as C,V as S,w as p,Z as M,aP as b,h as n,F as B,a3 as N,k as T}from"./DEDOUQvL.js";import{u as j}from"./DIRuqXti.js";import{_ as L}from"./ByOekYdZ.js";import{_ as D}from"./DijR_jkT.js";import O from"./CzOmoJ8x.js";import"./DSKzdWKr.js";import"./BEdJAkns.js";const V=Symbol.for("nuxt:client-only"),F=u({name:"ClientOnly",inheritAttrs:!1,props:["fallback","placeholder","placeholderTag","fallbackTag"],setup(d,{slots:t,attrs:a}){const r=w(!1);return v(()=>{r.value=!0}),$(V,!0),s=>{var o;if(r.value)return(o=t.default)==null?void 0:o.call(t);const c=t.fallback||t.placeholder;if(c)return c();const _=s.fallback||s.placeholder||"",m=s.fallbackTag||s.placeholderTag||"span";return l(m,a,_)}}}),P={class:"relative font-medium before:absolute before:-bottom-1 before:h-0.5 before:w-full before:origin-left before:scale-x-0 before:bg-red-600 before:transition hover:before:scale-100",href:"/"},A={class:"text-3xl font-bold sm:text-5xl dark:text-white"},H=u({__name:"BlogHeader",setup(d){const t=g();return(a,r)=>(i(),l("a",P,[e("h1",A,h(f(t).name),1)]))}}),I={name:C,props:{placeholder:String,tag:{type:String,default:"span"}}};function q(d,t,a,r,s,c){const _=F;return i(),S(_,{placeholder:a.placeholder,"placeholder-tag":a.tag},{default:p(()=>[M(d.$slots,"default")]),_:3},8,["placeholder","placeholder-tag"])}const E=x(I,[["render",q]]),Q=b("/dark.svg"),R=b("/light.svg"),U={class:"flex justify-between"},Z={key:0,src:Q,alt:"darkMode",class:"w-5 h-5"},z={key:1,src:R,alt:"lightMode",class:"w-5 h-5"},G={class:"mt-4 dark:text-white"},J=u({__name:"ColorModeSwitch",setup(d){const t=j(),a=g(),r=()=>t.value==="light"?t.preference="dark":t.preference="light";return(s,c)=>{const _=H,m=E;return i(),l("div",null,[e("div",U,[n(_),e("button",{"aria-label":"Color Mode",class:"inline-block w-5",onClick:r},[n(m,{placeholder:"..."},{default:p(()=>[f(t).value==="dark"?(i(),l("img",Z)):(i(),l("img",z))]),_:1})])]),e("h2",G,h(f(a).description),1)])}}}),K={class:"max-w-none"},W=e("hr",{class:"py-2 mt-8 border-t-2 w-20 mx-auto"},null,-1),X={class:"flex bg-white transition hover:shadow-xl dark:bg-gray-800 dark:shadow-gray-800/25"},Y={class:"rotate-180 p-2 [writing-mode:_vertical-lr]"},ee={datetime:"{{ post.publishDate }}",class:"flex items-center justify-between gap-4 text-xs font-bold uppercase text-gray-900 dark:text-white"},te=e("span",{class:"w-px flex-1 bg-gray-900/10 dark:bg-white/10"},null,-1),oe={class:"hidden sm:block sm:basis-56"},ae={class:"flex flex-1 flex-col justify-between"},se={class:"border-l border-gray-900/10 p-4 dark:border-white/10 sm:!border-l-transparent sm:p-6"},ne={class:"font-bold uppercase text-gray-900 dark:text-white"},re={class:"mt-2 text-sm leading-relaxed text-gray-700 line-clamp-3 dark:text-gray-200"},ce={class:"sm:flex sm:items-end sm:justify-end"},le=u({__name:"PostCard",setup(d){const t={path:"/posts",sort:{_id:-1,$numeric:!0},without:["body"]};return(a,r)=>{const s=L,c=D,_=O;return i(),l("main",K,[n(_,{query:t},{default:p(({list:m})=>[(i(!0),l(B,null,N(m,o=>(i(),l("div",{key:o._id},[W,e("article",X,[e("div",Y,[e("time",ee,[e("span",null,h(o.publishDate.slice(7,11)),1),te,e("span",null,h(o.publishDate.slice(0,6)),1)])]),e("div",oe,[n(s,{provider:"twicpics",alt:o.alt,src:o.heroImage,width:o.image.width,height:o.image.height,class:"aspect-auto h-full w-full object-cover"},null,8,["alt","src","width","height"])]),e("div",ae,[e("div",se,[n(c,{to:o._path},{default:p(()=>[e("h3",ne,h(o.title),1)]),_:2},1032,["to"]),e("p",re,h(o.description),1)]),e("div",ce,[n(c,{to:o._path,class:"block bg-yellow-400 px-5 py-3 text-center text-xs font-bold uppercase text-gray-900 transition hover:bg-yellow-500"},{default:p(()=>[T(" Link ")]),_:2},1032,["to"])])])])]))),128))]),_:1})])}}}),ie={},_e={class:"bg-white dark:bg-slate-900 h-screen"},de={class:"max-w-2xl px-4 py-10 m-auto bg-slate-50 dark:bg-gray-800 sm:px-8 sm:shadow ring-1 ring-gray-200 dark:ring-gray-700 sm:rounded-lg"},he={id:"main",class:"max-w-none"};function me(d,t){const a=k,r=J,s=le,c=y;return i(),l("div",null,[n(a),e("div",_e,[e("div",de,[e("main",he,[n(r,{class:"dark:text-grey-100 hover:text-grey-700 dark:hover:text-grey-300"}),n(s),n(c)])])])])}const we=x(ie,[["render",me]]);export{we as default};