1import{d as C,r as y,o as D,B as S,J as T,c as n,a,w as u,b as e,u as l,h as j,n as g,e as f,l as m,t as d,f as o,F as x,g as p,p as k,i as B,j as I}from"./app-CqbOMvUx.js";import{A as N,_ as V}from"./PublicLayout.vue_vue_type_script_setup_true_lang-BlZb88-3.js";import{_ as L}from"./Input.vue_vue_type_script_setup_true_lang-D6YrCT7H.js";import{B as P}from"./book-open-DR3XsM6m.js";import{S as E}from"./search-xzhwF2of.js";import{T as F}from"./tag-pHf0MF-M.js";import{C as M}from"./calendar-DvQxyX4Z.js";import{U as W}from"./user-BQbu5CAX.js";import{E as $}from"./eye-BfglJr0z.js";import"./Button.vue_vue_type_script_setup_true_lang-CwQgyPq0.js";import"./createLucideIcon-ycY0zbnc.js";import"./x-DxtVOdel.js";import"./phone-bZWoSuCJ.js";import"./index-CIiWasEK.js";const O={class:"relative min-h-[50vh] overflow-hidden bg-gradient-to-br from-[#0a0a0a] via-[#1a0505] to-[#0a0a0a] flex items-center"},U={class:"relative mx-auto max-w-7xl px-6 py-24 lg:px-8 w-full"},R={class:"inline-flex items-center gap-2 rounded-full border border-[#f53003]/30 bg-[#f53003]/10 px-4 py-2 text-sm text-[#FF4433] backdrop-blur-sm mb-6"},z={class:"py-16"},H={class:"mx-auto max-w-7xl px-6 lg:px-8"},J={class:"grid grid-cols-1 gap-8 lg:grid-cols-4"},Q={class:"lg:col-span-1"},q={class:"sticky top-24 space-y-6"},G={class:"rounded-3xl border border-[#e3e3e0] bg-white p-6 shadow-lg dark:border-[#3E3E3A] dark:bg-[#161615]"},K={class:"mb-4 text-lg font-bold text-[#1b1b18] dark:text-[#EDEDEC] flex items-center gap-2"},X={class:"relative"},Y={class:"rounded-3xl border border-[#e3e3e0] bg-white p-6 shadow-lg dark:border-[#3E3E3A] dark:bg-[#161615]"},Z={class:"mb-4 text-lg font-bold text-[#1b1b18] dark:text-[#EDEDEC] flex items-center gap-2"},ee={class:"space-y-2"},te={class:"rounded-full bg-white/20 px-2.5 py-0.5 text-xs font-bold"},se={class:"rounded-full bg-white/20 px-2.5 py-0.5 text-xs font-bold"},ae={class:"lg:col-span-3"},re={key:0,class:"rounded-3xl border border-[#e3e3e0] bg-white p-12 text-center shadow-lg dark:border-[#3E3E3A] dark:bg-[#161615]"},le={key:1,class:"grid gap-8"},oe={key:0,class:"aspect-video overflow-hidden relative"},ne=["src","alt"],ie={class:"p-8"},de={key:0,class:"mb-4 flex flex-wrap gap-2"},ce={class:"mb-4 text-3xl font-black text-[#1b1b18] group-hover:text-[#f53003] transition-colors dark:text-[#EDEDEC] dark:group-hover:text-[#FF4433]"},ue={class:"mb-6 text-[#706f6c] dark:text-[#A1A09A] leading-relaxed"},xe={class:"flex flex-wrap items-center gap-6 text-sm text-[#706f6c] dark:text-[#A1A09A]"},ge={class:"flex items-center gap-2"},fe={class:"p-1.5 rounded-lg bg-[#f53003]/10"},me={class:"flex items-center gap-2"},pe={class:"p-1.5 rounded-lg bg-[#f53003]/10"},be={class:"flex items-center gap-2"},he={class:"p-1.5 rounded-lg bg-[#f53003]/10"},ve={class:"mt-6 flex items-center gap-2 text-[#f53003] dark:text-[#FF4433] font-semibold group-hover:gap-3 transition-all"},ke={key:2,class:"mt-8 flex justify-center"},we={class:"flex gap-2"},Pe=C({__name:"Index",props:{posts:{},categories:{},selectedCategory:{},search:{}},setup(i){const w=y(!1);D(()=>{setTimeout(()=>{w.value=!0},100)});const b=i,h=y(b.search||"");let v;S(h,r=>{typeof window>"u"||(v&&clearTimeout(v),v=setTimeout(()=>{const t=new URLSearchParams;r&&t.set("search",r),b.selectedCategory&&t.set("category",b.selectedCategory),T.get(`/blog${t.toString()?"?"+t.toString():""}`,{},{preserveState:!0,preserveScroll:!0})},300))});const A=r=>{if(!r)return console.warn("No date provided to formatDate"),"";try{let t=r;r.includes("T")?t=r.split("T")[0]:r.includes(" ")&&(t=r.split(" ")[0]);const[s,c,_]=t.split("-");return!s||!c||!_?(console.error("Invalid date format:",r),r):new Date(parseInt(s),parseInt(c)-1,parseInt(_)).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}catch(t){return console.error("Error formatting date:",r,t),r}};return(r,t)=>(o(),n(x,null,[a(l(j),{title:"Blog - Web Development & Digital Marketing Insights | WPressNinja"},{default:u(()=>[...t[1]||(t[1]=[e("meta",{name:"description",content:"Explore articles about WordPress development, Laravel applications, SEO strategies, and digital marketing tips. Expert insights from Angel Mendez at WPressNinja."},null,-1)])]),_:1}),a(V,null,{default:u(()=>[e("section",O,[t[5]||(t[5]=e("div",{class:"absolute inset-0"},[e("div",{class:"absolute top-1/4 right-1/4 w-96 h-96 bg-[#f53003]/20 rounded-full blur-3xl animate-pulse"}),e("div",{class:"absolute bottom-1/4 left-1/4 w-96 h-96 bg-[#FF4433]/20 rounded-full blur-3xl animate-pulse",style:{"animation-delay":"1s"}})],-1)),e("div",U,[e("div",{class:g(["mx-auto max-w-3xl text-center transition-all duration-1000",w.value?"opacity-100 translate-y-0":"opacity-0 translate-y-4"])},[e("div",R,[a(l(P),{class:"h-4 w-4"}),t[2]||(t[2]=e("span",null,"Blog & Insights",-1))]),t[3]||(t[3]=e("h1",{class:"text-5xl font-black tracking-tight text-white sm:text-6xl lg:text-7xl mb-6"},[f(" Web Dev "),e("span",{class:"bg-gradient-to-r from-[#FF4433] to-white bg-clip-text text-transparent"},"Insights")],-1)),t[4]||(t[4]=e("p",{class:"text-xl text-white/70 leading-relaxed"}," Tutorials, tips, and updates on WordPress, Laravel, SEO, and Digital Marketing ",-1))],2)])]),e("section",z,[e("div",H,[e("div",J,[e("aside",Q,[e("div",q,[e("div",G,[e("h3",K,[a(l(E),{class:"h-5 w-5 text-[#f53003] dark:text-[#FF4433]"}),t[6]||(t[6]=f(" Search ",-1))]),e("div",X,[a(l(E),{class:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[#706f6c] dark:text-[#A1A09A]"}),a(L,{modelValue:h.value,"onUpdate:modelValue":t[0]||(t[0]=s=>h.value=s),type:"text",placeholder:"Search posts...",class:"pl-9 rounded-xl"},null,8,["modelValue"])])]),e("div",Y,[e("h3",Z,[a(l(F),{class:"h-5 w-5 text-[#f53003] dark:text-[#FF4433]"}
1),t[7]||(t[7]=f(" Categories ",-1))]),e("ul",ee,[e("li",null,[a(l(m),{href:"/blog",class:g(["flex items-center justify-between rounded-xl px-4 py-3 text-sm font-medium transition-all",i.selectedCategory?"text-[#706f6c] hover:bg-[#f53003]/5 dark:text-[#A1A09A] dark:hover:bg-[#FF4433]/5":"bg-gradient-to-r from-[#f53003] to-[#d42900] text-white shadow-lg"])},{default:u(()=>[t[8]||(t[8]=e("span",null,"All Posts",-1)),e("span",te,d(i.posts.data.length),1)]),_:1},8,["class"])]),(o(!0),n(x,null,p(i.categories,s=>(o(),n("li",{key:s.id},[a(l(m),{href:`/blog?category=${s.slug}`,class:g(["flex items-center justify-between rounded-xl px-4 py-3 text-sm font-medium transition-all",i.selectedCategory===s.slug?"bg-gradient-to-r from-[#f53003] to-[#d42900] text-white shadow-lg":"text-[#706f6c] hover:bg-[#f53003]/5 dark:text-[#A1A09A] dark:hover:bg-[#FF4433]/5"])},{default:u(()=>[e("span",null,d(s.name),1),e("span",se,d(s.posts_count),1)]),_:2},1032,["href","class"])]))),128))])])])]),e("div",ae,[i.posts.data.length===0?(o(),n("div",re,[...t[9]||(t[9]=[e("div",{class:"text-6xl mb-4"},"ð",-1),e("p",{class:"text-lg font-medium text-[#1b1b18] dark:text-[#EDEDEC] mb-2"}," No posts found ",-1),e("p",{class:"text-sm text-[#706f6c] dark:text-[#A1A09A]"}," Check back soon for new content! ",-1)])])):(o(),n("div",le,[(o(!0),n(x,null,p(i.posts.data,s=>(o(),n("article",{key:s.id,class:"group relative overflow-hidden rounded-3xl border border-[#e3e3e0] bg-white shadow-lg transition-all hover:shadow-2xl hover:-translate-y-1 dark:border-[#3E3E3A] dark:bg-[#161615]"},[a(l(m),{href:`/blog/${s.slug}`,class:"block"},{default:u(()=>[s.featured_image?(o(),n("div",oe,[t[10]||(t[10]=e("div",{class:"absolute inset-0 bg-gradient-to-t from-black/50 to-transparent z-10"},null,-1)),e("img",{src:`/storage/${s.featured_image}`,alt:s.title,class:"h-full w-full object-cover transition-transform duration-500 group-hover:scale-110"},null,8,ne)])):k("",!0),e("div",ie,[s.categories.length>0?(o(),n("div",de,[(o(!0),n(x,null,p(s.categories,c=>(o(),n("span",{key:c.id,class:"inline-flex items-center gap-1.5 rounded-full bg-gradient-to-r from-[#f53003]/10 to-[#d42900]/10 px-3 py-1.5 text-xs font-bold text-[#f53003] dark:text-[#FF4433] border border-[#f53003]/20"},[a(l(F),{class:"h-3 w-3"}),f(" "+d(c.name),1)]))),128))])):k("",!0),e("h2",ce,d(s.title),1),e("p",ue,d(s.excerpt||"Read more..."),1),e("div",xe,[e("div",ge,[e("div",fe,[a(l(M),{class:"h-4 w-4 text-[#f53003] dark:text-[#FF4433]"})]),e("span",null,d(A(s.published_at||s.created_at)),1)]),e("div",me,[e("div",pe,[a(l(W),{class:"h-4 w-4 text-[#f53003] dark:text-[#FF4433]"})]),e("span",null,d(s.user.name),1)]),e("div",be,[e("div",he,[a(l($),{class:"h-4 w-4 text-[#f53003] dark:text-[#FF4433]"})]),e("span",null,d(s.views)+" views",1)])]),e("div",ve,[t[11]||(t[11]=e("span",null,"Read Article",-1)),a(l(N),{class:"h-4 w-4"})])])]),_:2},1032,["href"])]))),128))])),i.posts.last_page>1?(o(),n("div",ke,[e("div",we,[(o(!0),n(x,null,p(i.posts.links,s=>(o(),B(I(s.url?l(m):"span"),{key:s.label,href:s.url||void 0,class:g(["rounded-md px-4 py-2 text-sm",s.active?"bg-[#f53003] text-white dark:bg-[#FF4433]":"border border-[#e3e3e0] bg-white text-[#1b1b18] hover:bg-[#FDFDFC] dark:border-[#3E3E3A] dark:bg-[#161615] dark:text-[#EDEDEC] dark:hover:bg-[#1C1C1A]",!s.url&&"pointer-events-none opacity-50"]),innerHTML:s.label},null,8,["href","class","innerHTML"]))),128))])])):k("",!0)])])])])]),_:1})],64))}});export{Pe 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.