1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{a as t,i as n}from"./utils-BnWVMw-Y.js";import{t as r}from"./router-compat-Dpit9KL0.js";import{t as i}from"./client-BBCYuZ6g.js";import{t as a}from"./useQuery-BLizMODv.js";import{t as o}from"./arrow-right-Djh-WOH7.js";import{t as s}from"./calendar-s6ia_pMy.js";import{n as c,t as l}from"./Footer-BhRdJTgd.js";import{t as u}from"./search-XP1Q0anB.js";import{t as d}from"./user-aK9Fg46R.js";import{t as f}from"./input-CnpRaHvL.js";import{t as p}from"./proxy-DiDUjhap.js";import{i as m,n as h,t as g}from"./card-BAAA_IUb.js";import{t as _}from"./WaveDivider-C_5kNLTK.js";import{n as v,t as y}from"./GeometricDecorations-D7QyroQj.js";import{t as b}from"./badge-XIYhsipm.js";import{t as x}from"./skeleton-D8EcuH-6.js";var S=e(t(),1),C=`/assets/blog-hero-CONhoH3s.png`,w=n(),T={hidden:{opacity:0,y:40},visible:{opacity:1,y:0,transition:{duration:.6}}},E={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1,delayChildren:.2}}},D=()=>{let[e,t]=(0,S.useState)(``),{data:n,isLoading:c}=a({queryKey:[`published-blogs`],queryFn:async()=>{let{data:e,error:t}=await i.from(`blogs`).select(`*`).eq(`status`,`published`).order(`published_at`,{ascending:!1});if(t)throw t;return e}}),l=n?.filter(t=>t.title.toLowerCase().includes(e.toLowerCase())||t.excerpt?.toLowerCase().includes(e.toLowerCase())||t.category?.toLowerCase().includes(e.toLowerCase()))||[],D=e=>new Date(e).toLocaleDateString(`en-US`,{year:`numeric`,month:`long`,day:`numeric`});return(0,w.jsx)(w.Fragment,{children:(0,w.jsxs)(`div`,{className:`min-h-screen relative overflow-hidden bg-background`,children:[(0,w.jsxs)(`section`,{className:`section-padding bg-background relative overflow-hidden`,children:[(0,w.jsx)(v,{className:`top-10 left-10 opacity-5`,variant:`gold`}),(0,w.jsx)(y,{}),(0,w.jsx)(`div`,{className:`container-custom max-w-6xl mx-auto relative z-10`,children:(0,w.jsxs)(`div`,{className:`grid lg:grid-cols-2 gap-12 items-center`,children:[(0,w.jsxs)(p.div,{initial:`hidden`,animate:`visible`,variants:E,className:`space-y-6 text-center lg:text-left`,children:[(0,w.jsx)(p.div,{variants:T,className:`inline-flex items-center space-x-2 px-4 py-2 rounded-full bg-primary/10 text-secondary mb-6`,children:(0,w.jsx)(`span`,{className:`text-sm font-semibold tracking-wider uppercase`,children:`Insights & Stories`})}),(0,w.jsxs)(p.h1,{variants:T,className:`text-4xl sm:text-5xl lg:text-6xl font-black mb-6 text-secondary tracking-tight`,children:[`RITE `,(0,w.jsx)(`span`,{className:`text-primary`,children:`Blog`})]}),(0,w.jsx)(p.p,{variants:T,className:`text-lg sm:text-xl text-muted-foreground max-w-3xl`,children:`Stories, insights, and updates from our mission to democratize technology and AI education.`})]}),(0,w.jsx)(p.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.8,delay:.3},className:`flex justify-center lg:justify-end`,children:(0,w.jsx)(`img`,{src:C,alt:`Professional with tablet`,className:`max-w-full w-[450px] h-auto`})})]})})]}),(0,w.jsx)(_,{variant:`white-to-black`}),(0,w.jsx)(`section`,{className:`section-padding bg-secondary relative`,children:(0,w.jsxs)(`div`,{className:`container-custom max-w-6xl mx-auto`,children:[(0,w.jsx)(p.div,{initial:`hidden`,whileInView:`visible`,viewport:{once:!0},variants:T,className:`mb-12`,children:(0,w.jsxs)(`div`,{className:`relative max-w-md mx-auto`,children:[(0,w.jsx)(u,{className:`absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-muted-foreground`}),(0,w.jsx)(f,{placeholder:`Search articles...`,value:e,onChange:e=>t(e.target.value),className:`pl-10 bg-white/10 border-primary/20 text-white placeholder:text-white/50`})]})}),c?(0,w.jsx)(`div`,{className:`grid md:grid-cols-2 lg:grid-cols-3 gap-8`,children:[1,2,3,4,5,6].map(e=>(0,w.jsxs)(g,{className:`bg-white/5 border-primary/20`,children:[(0,w.jsx)(x,{className:`h-48 w-full rounded-t-lg`}),(0,w.jsxs)(m,{children:[(0,w.jsx)(x,{className:`h-6 w-3/4`}),(0,w.jsx)(x,{className:`h-4 w-1/2 mt-2`})]}),(0,w.jsx)(h,{children:(0,w.jsx)(x,{className:`h-16 w-full`})})]},e))}):l.length===0?(0,w.jsx)(p.div,{initial:`hidden`,animate:`visible`,variants:T,className:`text-center py-16`,children:(0,w.jsx)(`p`,{className:`text-white/70 text-lg`,children:e?`No articles found matching your search.`:`No blog posts yet. Check back soon!`})}):(0,w.jsx)(p.div,{initial:`hidden`,whileInView:`visible`,viewport:{once:!0},variants:E,className:`grid md:grid-cols-2 lg:grid-cols-3 gap-8`,children:l.map(e=>(0,w.jsx)(p.div,{variants:T,children:(0,w.jsx)(r,{to:`/blog/${e.slug}`,children:(0,w.jsxs)(g,{className:`group h-full bg-white/5 border-primary/20 hover:border-primary/50 transition-all duration-300 hover:-translate-y-2 overflow-hidden`,children:[e.featured_image_url&&(0,w.jsx)(`div`,{className:`h-48 overflow-hidden`,children:(0,w.jsx)(`img`,{src:e.featured_image_url,alt:e.title,className:`w-full h-full object-cover group-hover:scale-105 transition-transform duration-500`})}),(0,w.jsxs)(m,{children:[e.category&&(0,w.jsx)(b,{variant:`outline`,className:`w-fit mb-2 border-primary/50 text-primary`,children:e.category}),(0,w.jsx)(`h3`,{className:`text-xl font-bold text-white group-hover:text-primary transition-colors line-clamp-2`,children:e.title}),(0,w.jsxs)(`div`,{className:`flex items-center gap-4 text-sm text-white/60 mt-2`,children:[e.author_name&&(0,w.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,w.jsx)(d,{className:`h-4 w-4`}),e.author_name]}),e.published_at&&(0,w.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,w.jsx)(s,{className:`h-4 w-4`}),D(e.published_at)]})]})]}),(0,w.jsxs)(h,{children:[e.excerpt&&(0,w.jsx)(`p`,{className:`text-white/70 line-clamp-3 mb-4`,children:e.excerpt}),(0,w.jsxs)(`span`,{className:`inline-flex items-center text-primary font-semibold group-hover:gap-2 transition-all`,"aria-label":`Read ${e.title}`,children:[`Read `,e.title,` `,(0,w.jsx)(o,{className:`h-4 w-4 ml-1`})]})]})]})})},e.id))})]})}),(0,w.jsx)(_,{variant:`black-to-white`})]})})},O=()=>(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(c,{}),(0,w.jsx)(`main`,{className:`flex-1 pt-16 sm:pt-20 md:pt-24 bg-white`,children:(0,w.jsx)(D,{})}),(0,w.jsx)(l,{})]});
1export{O as component};
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.