PageSourceSearch

https://engineawesome.com/assets/index-Ct6bdnRw.js

js engineawesome.com collected 2026-09-24 18:56:53 UTC 7,989 bytes, 10 lines download raw bytes

1import{a as o,j as e,L as w,m as b,A as S}from"./vendor-framer-motion-7g6XWQ1T.js";import{o as C,p as L,A as x,L as j,N as A}from"./main-ngl9OQpB.js";import{B as f}from"./BlogIllustration-CzQrC7YC.js";import{P as B}from"./PillFilter-CqpH6Kk_.js";import{a as P}from"./CTACard-Dl8uVl0-.js";const v={"Product Updates":"from-violet-600 to-indigo-600",Business:"from-cyan-600 to-blue-600","Customer Success Stories":"from-amber-500 to-orange-500"};function W(){const{featuredPosts:s,categories:i}=C.useLoaderData(),[r,u]=o.useState("All"),[c,t]=o.useState(1),[d,l]=o.useState(!1),m=o.useRef(null),n=o.useRef(null),N=a=>{u(a),t(1)},y=a=>{t(a),l(!0),m.current?.scrollIntoView({behavior:"smooth",block:"start"})};o.useEffect(()=>{if(d&&n.current){const a=setTimeout(()=>{n.current?.focus(),l(!1)},100);return()=>clearTimeout(a)}},[d,c]);const p=o.useMemo(()=>r==="All"?s.map(a=>a.slug):[],[s,r]),{posts:h,totalPages:g}=o.useMemo(()=>L(c,r,p),[c,r,p]);return e.jsxs("div",{className:"pt-32",children:[e.jsx(M,{}),s.length>0&&s[0]&&e.jsx("section",{className:"section-padding pb-8",children:e.jsx("div",{className:"container-custom",children:e.jsx(x,{children:e.jsx(j,{to:"/blog/$slug",params:{slug:s[0].slug},children:e.jsx("article",{className:"glass-card group cursor-pointer overflow-hidden",children:e.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:`h-64 md:h-80 rounded-xl bg-gradient-to-br ${v[s[0].category]||"from-slate-600 to-slate-700"} relative overflow-hidden`,children:[e.jsx("div",{className:"absolute inset-0 bg-black/10 group-hover:bg-black/0 transition-colors"}),e.jsx(f,{category:s[0].category,className:"absolute inset-0 p-8 opacity-90 group-hover:opacity-100 group-hover:scale-105 transition-all duration-300"})]}),e.jsxs("div",{className:"flex flex-col justify-center py-2",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("span",{className:"px-3 py-1 text-xs font-medium bg-primary-500/20 text-primary-600 dark:text-primary-400 rounded-full",children:s[0].category}),e.jsx("span",{className:"text-sm text-slate-500 dark:text-slate-400",children:s[0].date})]}),e.jsx("h2",{className:"mb-4 group-hover:text-primary-500 dark:group-hover:text-primary-400 transition-colors",children:s[0].title}),e.jsx("p",{className:"text-slate-600 dark:text-slate-400 text-lg mb-6",children:s[0].excerpt}),e.jsxs("div",{className:"flex items-center gap-2 text-primary-500 dark:text-primary-400 font-medium",children:["Read article",e.jsx("svg",{className:"w-4 h-4 group-hover:translate-x-1 transition-transform",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})]})]})})})})})}),e.jsx("section",{ref:m,className:"section-padding pt-8",children:e.jsxs("div",{className:"container-custom",children:[e.jsx(x,{className:"mb-8",children:e.jsx(B,{items:i,activeItem:r,onSelect:N})}),e.jsx(w,{id:"posts-grid",children:e.jsx(b.div,{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-6",children:e.jsx(S,{mode:"popLayout",children:h.map((a,k)=>e.jsx(b.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.3},children:e.jsx(j,{to:"/blog/$slug",params:{slug:a.slug},ref:k===0?n:void 0,children:e.jsxs("article",{className:"glass-card group cursor-pointer h-full",children:[e.jsxs("div",{className:`h-40 rounded-xl bg-gradient-to-br ${v[a.category]||"from-slate-600 to-slate-700"} mb-4 relative overflow-hidden`,children:[e.jsx("div",{className:"absolute inset-0 bg-black/10 group-hover:bg-black/0 transition-colors"}),e.jsx(f,{category:a.category,className:"absolute inset-0 p-4 opacity-90 group-hover:opacity-100 group-hover:scale-105 transition-all duration-300"}),e.jsx("div",{className:"absolute bottom-3 left-3",children:e.jsx("span",{className:"px-2 py-1 text-xs font-medium bg-white/20 backdrop-blur-sm text-white rounded-full",children:a.category})})]}),e.jsx("div",{className:"flex items-center gap-2 text-xs text-slate-500 dark:text-slate-400 mb-2",children:e.jsx("span",{children:a.date})}),e.jsx("h3",{className:"text-base leading-snug font-semibold mb-2 group-hover:text-primary-500 dark:group-hover:text-primary-400 transition-colors line-clamp-2",children:a.title}
1),e.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400 line-clamp-2",children:a.excerpt})]})})},a.slug))})})}),h.length===0&&e.jsx("div",{className:"text-center py-12",children:e.jsx("p",{className:"text-slate-600 dark:text-slate-400",children:"No posts found in this category."})}),g>1&&e.jsx($,{currentPage:c,totalPages:g,onPageChange:y})]})}),e.jsx(R,{})]})}function M(){return e.jsx("section",{className:"section-padding pb-8",children:e.jsx("div",{className:"container-custom text-center",children:e.jsxs(x,{children:[e.jsxs("h1",{className:"mb-6",children:["Blog & ",e.jsx("span",{className:"gradient-text",children:"Updates"})]}),e.jsx("p",{className:"text-xl text-slate-600 dark:text-slate-400 max-w-3xl mx-auto",children:"Stay up to date with the latest Engine Awesome news, product updates, tutorials, and customer success stories."})]})})})}function R(){return e.jsx("section",{className:"section-padding",children:e.jsx("div",{className:"container-custom",children:e.jsx(x,{children:e.jsxs(P,{title:e.jsxs(e.Fragment,{children:["Stay in the ",e.jsx("span",{className:"gradient-text",children:"loop"})]}),description:"Subscribe to our newsletter for the latest updates, tips, and insights delivered directly to your inbox.",children:[e.jsx(A,{className:"max-w-md mx-auto"}),e.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"No spam, unsubscribe anytime."})]})})})})}function $({currentPage:s,totalPages:i,onPageChange:r}){const c=(()=>{const t=[];if(i<=7)for(let l=1;l<=i;l++)t.push(l);else{t.push(1),s>3&&t.push("...");
1const l=Math.max(2,s-1),m=Math.min(i-1,s+1);for(let n=l;n<=m;n++)t.push(n);s<i-2&&t.push("..."),t.push(i)}return t})();return e.jsxs("nav",{className:"flex items-center justify-center gap-2 mt-12","aria-label":"Pagination",children:[e.jsxs("button",{onClick:()=>r(s-1),disabled:s===1,className:`flex items-center gap-1 px-3 py-2 text-sm font-medium rounded-lg
2          text-slate-600 dark:text-slate-400
3          hover:bg-slate-100 dark:hover:bg-slate-800
4          disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent dark:disabled:hover:bg-transparent
5          transition-colors`,"aria-label":"Previous page",children:[e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),e.jsx("span",{className:"hidden sm:inline",children:"Previous"})]}),e.jsx("div",{className:"flex items-center gap-1",children:c.map((t,d)=>typeof t=="string"?e.jsx("span",{className:"px-3 py-2 text-sm text-slate-400 dark:text-slate-500",children:t},`ellipsis-${d}`):e.jsx("button",{onClick:()=>r(t),className:`min-w-[40px] px-3 py-2 text-sm font-medium rounded-lg transition-colors
6                ${s===t?"bg-primary-500 text-white":"text-slate-600 dark:text-slate-400 hover:bg-slate-100 dark:hover:bg-slate-800"}`,"aria-label":`Page ${t}`,"aria-current":s===t?"page":void 0,children:t},t))}),e.jsxs("button",{onClick:()=>r(s+1),disabled:s===i,className:`flex items-center gap-1 px-3 py-2 text-sm font-medium rounded-lg
7          text-slate-600 dark:text-slate-400
8          hover:bg-slate-100 dark:hover:bg-slate-800
9          disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent dark:disabled:hover:bg-transparent
10          transition-colors`,"aria-label":"Next page",children:[e.jsx("span",{className:"hidden sm:inline",children:"Next"}),e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})]})}export{W 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.