PageSourceSearch

https://www.abstra.io/assets/Articles-DPckbF2Q.js

js abstra.io collected 2026-10-03 20:37:21 UTC 5,850 bytes, 1 lines download raw bytes

1import{u as e,j as s,L as t,y as r,r as a,t as l,w as i,H as o,B as c,F as n,A as d}from"./app-pXZx1eas.js";import{C as m,b as x,c as h,d as u,a as g}from"./card-C9WxpUfC.js";import{B as p}from"./badge-FIoImjAW.js";import{N as j}from"./NewsletterCta-DyDW-SRU.js";import{B as b}from"./Breadcrumb-BgWIaAaq.js";import{getFiltersByLocale as f,articleMatchesFilter as v}from"./articleFilters-DOGQLXrx.js";import{g as N}from"./filterColors-CrVw7Ahu.js";import{C as y}from"./clock-Bfvf4zrU.js";import{U as w}from"./user-CrDK09YR.js";import{C as _}from"./calendar-xuAHOvg3.js";import"./integrations-en-catalogIndex-CslcD8ZJ.js";import"./integrations-pt-catalogIndex-CslcD8ZJ.js";const B=e=>{const s={blue:"hover:bg-blue-50 hover:border-blue-300 hover:text-blue-700 border-blue-200",purple:"hover:bg-purple-50 hover:border-purple-300 hover:text-purple-700 border-purple-200",green:"hover:bg-green-50 hover:border-green-300 hover:text-green-700 border-green-200",orange:"hover:bg-orange-50 hover:border-orange-300 hover:text-orange-700 border-orange-200"};return s[e]||s.blue},P=()=>{const{t:r,currentLocale:a}=e(),l=f(a);return s.jsx("div",{className:"border-b bg-white",children:s.jsx("div",{className:"container mx-auto px-4 py-6",children:s.jsxs("div",{className:"flex items-center gap-4 flex-wrap",children:[s.jsx("span",{className:"text-sm font-medium text-gray-700",children:r("i18n_articles_filter_by_topic")}),s.jsx("div",{className:"flex flex-wrap gap-2",children:l.map((e=>s.jsx(t,{to:`/articles/tag/${e.slug}`,children:s.jsx(p,{variant:"outline",className:`transition-colors cursor-pointer ${B(e.color)}`,children:e.label})},e.id)))})]})})})},A=()=>{const{t:B,currentLocale:A}=e(),C=r(),[$,L]=a.useState((null==C?void 0:C.articles)||[]),[D,T]=a.useState([]),[k,F]=a.useState(!1),I=a.useRef(A),S=e=>{const s=D.find((s=>s.name===e));return null==s?void 0:s.image};a.useEffect((()=>{l.trackPageView("Blog - Articles")}),[]),a.useEffect((()=>{const e=A!==I.current;I.current=A;var s,t,r;s=void 0,t=null,r=function*(){try{e&&F(!0);const[s,t]=yield Promise.all([e?d.getArticles(A):Promise.resolve(void 0),d.getAuthors(A)]);e&&s&&L(s),T(t)}catch(s){e&&L([]),T([])}finally{F(!1)}},new Promise(((e,a)=>{var l=e=>{try{o(r.next(e))}catch(s){a(s)}},i=e=>{try{o(r.throw(e))}catch(s){a(s)}},o=s=>s.done?e(s.value):Promise.resolve(s.value).then(l,i);o((r=r.apply(s,t)).next())}))}),[A]);const E=a.useMemo((()=>$.sort(((e,s)=>new Date(s.published_at).getTime()-new Date(e.published_at).getTime()))),[$]),H={"@context":"https://schema.org","@type":"Blog",name:"Abstra Blog",description:B("i18n_articles_subtitle"),url:"https://abstra.cloud/articles",blogPost:E.map((e=>({"@type":"BlogPosting",headline:e.title,description:e.description,author:{"@type":"Person",name:e.author},datePublished:e.published_at,url:`https://abstra.cloud/articles/${e.slug}`,image:e.featured_image})))},R=[{label:B("i18n_articles_title"),current:!0}];return s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsx(i,{title:`${B("i18n_articles_title")} | Abstra Blog`,description:B("i18n_articles_subtitle"),ogType:"website",structuredData:H}),s.jsx(o,{}),s.jsx("section",{className:"bg-white border-b",children:s.jsx("div",{className:"container mx-auto px-4 py-4",children:s.jsx(b,{items:R})})}),s.jsx("section",{className:"bg-white border-b",children:s.jsx("div",{className:"container mx-auto px-4 py-16",children:s.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[s.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-gray-900 mb-6",children:B("i18n_articles_title")}),s.jsx("p",{className:"text-xl text-gray-600 mb-8",children:B("i18n_articles_subtitle")})]})})}),s.jsx(P,{}),s.jsx("section",{className:"py-16",children:s.jsx("div",{className:"container mx-auto px-4",children:k?s.jsx("div",{className:"flex justify-center items-center py-16",children:s.jsx("div",{className:"text-lg",children:"Loading articles..."})}):s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:E.map((e=>s.jsxs(m,{className:"hover:shadow-lg transition-shadow flex flex-col h-full",children:[e.featured_image&&s.jsx("div",{className:"aspect-video overflow-hidden rounded-t-lg",children:s.jsx("img",{src:e.featured_image,alt:e.title,className:"w-full h-full object-cover"})}),s.jsxs(x,{className:"flex-grow",children:[s.jsxs("div",{className:"flex items-start justify-between mb-2",children:[s.jsx("div",{className:"flex flex-wrap gap-1 flex-1 mr-2",children:e.tags&&f(A).filter((s=>
1v(e.tags,s))).map((e=>s.jsx(t,{to:`/articles/tag/${e.slug}`,children:s.jsx(p,{variant:"outline",className:`text-xs cursor-pointer hover:opacity-80 transition-opacity ${N(e.color)}`,children:e.label})},e.id)))}),s.jsxs("div",{className:"flex items-center text-sm text-gray-500 flex-shrink-0",children:[s.jsx(y,{className:"h-4 w-4 mr-1"}),e.read_time]})]}),s.jsx(h,{className:"text-xl",children:e.title}),s.jsx(u,{children:e.description})]}),s.jsxs(g,{className:"mt-auto",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center text-sm text-gray-500",children:[e.author_image||S(e.author)?s.jsx("img",{src:e.author_image||S(e.author),alt:e.author,className:"w-5 h-5 rounded-full object-cover mr-2"}):s.jsx(w,{className:"h-4 w-4 mr-1"}),"Abstra Team"!==e.author?s.jsx(t,{to:`/authors/${e.author.toLowerCase().replace(/\s+/g,"-")}`,className:"hover:text-abstra-primary transition-colors",children:e.author}):s.jsx("span",{children:e.author})]}),s.jsxs("div",{className:"flex items-center text-sm text-gray-500",children:[s.jsx(_,{className:"h-4 w-4 mr-1"}),e.published_at.split("-").reverse().join("/")]})]}),s.jsx(c,{asChild:!0,className:"w-full",variant:"outline",children:s.jsx(t,{to:`/articles/${e.slug}`,children:"Read Article"})})]})]},e.id)))})})}),s.jsx(j,{}),s.jsx(n,{})]})};export{A 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.