PageSourceSearch

https://akua.la/assets/BlogPage-DDZ80ohb.js

js akua.la collected 2026-10-01 12:01:03 UTC 9,031 bytes, 1 lines download raw bytes

1import{r as h,j as e}from"./client-BI0Keb3K.js";import{a5 as A,a3 as r,W as x,c as j,A as K,k as T,$ as y}from"./main-C6TGSIth.js";import D from"./DotGrid-CQ-5q7-T.js";function q({navigate:i}){var b;const[o,p]=h.useState("Todos"),d=(typeof window<"u"?(b=window.location.pathname.match(/^\/(es|en|pt)(?=\/|$)/))==null?void 0:b[1]:null)||"es",{data:n=[],isLoading:N}=A({queryKey:["blog_posts","published",d],queryFn:async()=>{const{data:a}=await y.from("blog_posts").select("id, title, slug, category, summary, published_at, cover_image_url, author, read_time, source_locale").eq("is_published",!0).order("published_at",{ascending:!1}),l=a??[],v=l.filter(g=>(g.source_locale||"es")!==d);if(v.length>0){const{data:g}=await y.from("blog_post_translations").select("post_id, title, summary").eq("locale",d).in("post_id",v.map(s=>s.id)),k=new Map((g??[]).map(s=>[s.post_id,s]));return l.map(s=>{const u=k.get(s.id);return u?{...s,title:u.title||s.title,summary:u.summary??s.summary}:s})}return l},staleTime:6e4,refetchOnMount:"always"}),t=n[0],w=n.slice(1,4),_=n.slice(4),c=h.useMemo(()=>{const a=n.slice(4);return a.length>0?["Todos",...new Set(a.map(l=>l.category))]:[]},[n]),f=_.filter(a=>o==="Todos"||a.category===o);h.useEffect(()=>{c.length>0&&!c.includes(o)&&p("Todos")},[o,c]);const m=a=>a?new Date(a).toLocaleDateString("es-ES",{day:"numeric",month:"short",year:"numeric"}):"";return e.jsx("div",{className:"min-h-screen pt-20",children:N?e.jsx("div",{className:"flex items-center justify-center py-40",children:e.jsx("div",{className:"w-8 h-8 border-2 border-[hsl(var(--accent-primary))] border-t-transparent rounded-full animate-spin"})}):e.jsxs(e.Fragment,{children:[t&&e.jsxs("section",{className:"relative overflow-hidden pt-24 pb-20 px-[1.5rem] md:px-[2rem] lg:px-[4rem]",style:{background:"linear-gradient(0deg, hsl(var(--background)) 0%, hsl(var(--blog-hero-soft)) 100%)"},children:[e.jsx("div",{className:"absolute inset-0 z-[1] pointer-events-none opacity-50",children:e.jsx(D,{height:"100%",dotColor:"hsl(var(--brand-violet))",className:"pointer-events-auto"})}),e.jsxs("div",{className:"relative z-[2] max-w-7xl mx-auto",children:[e.jsxs("div",{className:"grid lg:grid-cols-[1fr_0.9fr] gap-10 lg:gap-16 items-start pb-[7rem] mb-14",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-sm uppercase tracking-[0.08em] text-[hsl(var(--accent-primary))] mb-8 animate-slide-up",children:e.jsx(r,{contentKey:"blog.hero.eyebrow",fallback:"Blog",as:"span",page:"blog"})}),e.jsx("h1",{className:"text-[hsl(var(--foreground))] leading-[1.08] mb-0 animate-slide-up",style:{animationDelay:"0.05s"},children:e.jsx(r,{contentKey:"blog.hero.title",fallback:"Akua Insights",as:"span",page:"blog"})})]}),e.jsx("p",{className:"text-[hsl(var(--muted-foreground))] text-lg leading-relaxed lg:pt-14 max-w-xl animate-slide-up",style:{animationDelay:"0.1s"},children:e.jsx(r,{contentKey:"blog.hero.description",fallback:"Tendencias, análisis y perspectivas para construir el futuro de la infraestructura financiera global.",as:"span",page:"blog"})})]}),e.jsxs("div",{className:"grid lg:grid-cols-[1fr_1fr] gap-10 lg:gap-14 items-start",children:[e.jsxs("article",{onClick:()=>i(`/blog/${t.slug}`),className:"group cursor-pointer animate-slide-up",style:{animationDelay:"0.15s"},children:[t.cover_image_url&&e.jsx("div",{className:"w-full aspect-[3/2] overflow-hidden mb-7",children:e.jsx("img",{src:t.cover_image_url,alt:t.title,className:"w-full h-full object-cover rounded-[0.25rem] transition-transform duration-300 group-hover:scale-[1.05]",loading:"eager",fetchPriority:"high"})}),e.jsxs("div",{className:"flex items-center gap-4 mb-5",children:[e.jsx(x,{variant:"category",children:t.category}),e.jsx("span",{className:"text-[0.75rem] text-[hsl(var(--muted-foreground))]",children:m(t.published_at)})]}),e.jsx("h2",{className:"text-[2rem] text-[hsl(var(--foreground))] leading-tight mb-4 group-hover:text-[hsl(var(--brand-violet))] transition-colors",children:t.title}),e.jsx("p",{className:"text-[hsl(var(--muted-foreground))] leading-relaxed mb-8 line-clamp-2",children:t.summary}),e.jsxs("div",{className:"flex items-center justify-between gap-4 font-mono text-sm uppercase tracking-[0.08em] text-[hsl(var(--foreground))]",children:[e.jsx(r,{contentKey:"blog.readArticle",fallback:"Leer artículo",as:"span",page:"blog"}),e.jsx(j,{className:"w-5 h-5 -rotate-45 group-hover:translate-x-1 group-hover:-translate-y-1 transition-transform"})]})]}),e.jsxs("div",{className:"space-y-0 animate-slide-up",style:{animationDelay:"0.2s"},children:[e.jsx("h2",{className:"text-[1.25rem] font-bold leading-[1.5] text-[hsl(var(--foreground))] mb-6",children:e.jsx(r,{contentKey:"blog.featured.title",fallback:"Últimos artículos",as:"span",page:"blog"})}),w.map(a=>e.jsxs("article",{onClick:()=>i(`/blog/${a.slug}`),className:"group grid grid-cols-[8.5rem_1fr] md:grid-cols-[14rem_1fr] gap-5 md:gap-7 py-7 border-b border-[hsl(var(--border))] last:border-b-0 cursor-pointer",children:[a.cover_image_url&&e.jsx("div",{className:"w-full aspect-square overflow-hidden self-start",children:e.jsx("img",{src:a.c
1over_image_url,alt:a.title,className:"w-full h-full object-cover rounded-[0.25rem] transition-transform duration-300 group-hover:scale-[1.05]",loading:"lazy"})}),e.jsxs("div",{className:"min-w-0 flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[e.jsx(x,{variant:"category",children:a.category}),e.jsx("span",{className:"text-[0.75rem] text-[hsl(var(--muted-foreground))]",children:m(a.published_at)})]}),e.jsx("h3",{className:"text-[1.5rem] text-[hsl(var(--foreground))] leading-snug mb-5 group-hover:text-[hsl(var(--brand-violet))] transition-colors line-clamp-3",children:a.title}),e.jsxs("div",{className:"mt-auto flex items-center justify-between gap-4 font-mono text-sm uppercase tracking-[0.08em] text-[hsl(var(--foreground))]",children:[e.jsx(r,{contentKey:"blog.readArticle",fallback:"Leer artículo",as:"span",page:"blog"}),e.jsx(j,{className:"w-4 h-4 -rotate-45 group-hover:translate-x-1 group-hover:-translate-y-1 transition-transform"})]})]})]},a.id))]})]})]})]}),e.jsx("section",{className:"py-20 px-[1.5rem] md:px-[2rem] lg:px-[4rem]",children:e.jsxs("div",{className:"max-w-7xl mx-auto",children:[e.jsx("div",{className:"mb-10 flex flex-nowrap gap-[0.5rem] overflow-x-auto pb-2 md:flex-wrap md:overflow-visible md:pb-0",children:c.map(a=>e.jsx("button",{onClick:()=>p(a),className:`shrink-0 font-mono text-[0.875rem] font-normal leading-[1.5] tracking-[0.08em] uppercase px-[1.5rem] py-[0.75rem] rounded-[0.25rem] border transition-colors ${o===a?"border-[hsl(var(--dark-violet))] bg-[hsl(var(--dark-violet))] text-[hsl(var(--text-alt))]":"border-[hsl(var(--border))] bg-[hsl(var(--soft-lighter))] text-[hsl(var(--dark-violet))] hover:bg-[hsl(var(--soft-light))]"}`,children:a},a))}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-14",children:f.map((a,l)=>e.jsxs("article",{onClick:()=>i(`/blog/${a.slug}`),className:"group flex min-h-full cursor-pointer flex-col animate-slide-up",style:{animationDelay:`${l*.05}s`},children:[a.cover_image_url&&e.jsx("div",{className:"mb-7 aspect-[3/2] w-full overflow-hidden",children:e.jsx("img",{src:a.cover_image_url,alt:a.title,className:"h-full w-full object-cover transition-transform duration-300 group-hover:scale-[1.05]",loading:"lazy"})}),e.jsxs("div",{className:"mb-7 flex items-center gap-6",children:[e.jsx(x,{variant:"category",children:a.category}),e.jsx("span",{className:"text-[0.75rem] leading-[1.5] text-[hsl(var(--muted-foreground))]",children:m(a.published_at)})]}),e.jsx("h3",{className:"mb-5 text-[1.5rem] font-normal leading-[1.3] text-[hsl(var(--foreground))] transition-colors line-clamp-3 group-hover:text-[hsl(var(--brand-violet))]",children:a.title}),e.jsx("p",{className:"mb-10 text-[1rem] leading-[1.5] text-[hsl(var(--muted-foreground))] line-clamp-3",children:a.summary}),e.jsxs("div",{className:"mt-auto flex items-center justify-between gap-4 font-mono text-sm uppercase tracking-[0.08em] text-[hsl(var(--foreground))]",children:[e.jsx(r,{contentKey:"blog.readArticle",fallback:"Leer artículo",as:"span",page:"blog"}),e.jsx(K,{className:"h-5 w-5 -rotate-45 transition-transform group-hover:translate-x-1 group-hover:-translate-y-1"})]})]},a.id))}),f.length===0&&e.jsx("p",{className:"text-center text-[hsl(var(--muted-foreground))] py-12",children:e.jsx(r,{contentKey:"blog.noArticles",fallback:"No hay artículos en esta categoría.",as:"span",page:"blog"})})]})}),e.jsx(T,{title:e.jsx(r,{contentKey:"blog.cta.title",fallback:"¿Quieres saber más sobre",as:"span",page:"blog"}),highlight:e.jsx(r,{contentKey:"blog.cta.highlight",fallback:"infraestructura financiera global",as:"span",page:"blog"}),description:e.jsx(r,{contentKey:"blog.cta.description",fallback:"Agenda una demo y conoce cómo Akua puede transformar tu operación.",as:"span",page:"blog"}),primaryLabel:"Agenda un demo",primaryOnClick:()=>i("/contacto")})]})})}export{q 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.