PageSourceSearch

https://engineawesome.com/assets/TemplatesSlider-1SuRfhx8.js

js engineawesome.com collected 2026-09-24 18:56:05 UTC 4,880 bytes, 1 lines download raw bytes

1import{a as p,j as e}from"./vendor-framer-motion-7g6XWQ1T.js";import{A as c,L as a}from"./main-ngl9OQpB.js";const d=["from-blue-500 to-cyan-500","from-purple-500 to-pink-500","from-orange-500 to-red-500","from-green-500 to-teal-500","from-indigo-500 to-violet-500","from-rose-500 to-amber-500"];function g({templates:m,heading:x,hideHeading:l}){const t=p.useRef(null),i=r=>{if(!t.current)return;const s=t.current.querySelector(".template-slider-card");if(!s)return;const o=s.offsetWidth+24,h=Math.floor(t.current.clientWidth/o),n=o*Math.max(h,1);t.current.scrollBy({left:r==="right"?n:-n,behavior:"smooth"})};return e.jsxs("section",{className:l?"pt-8 pb-20 sm:pb-28 lg:pb-32":"py-20 sm:py-28 lg:py-32",children:[e.jsx("div",{className:"container-custom px-6 sm:px-8 lg:px-12 mb-12",children:e.jsxs(c,{className:`flex ${l?"justify-end":"flex-col sm:flex-row sm:items-end sm:justify-between"} gap-6`,children:[!l&&e.jsx("div",{children:x??e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm font-medium text-primary-500 dark:text-primary-400 mb-4 tracking-wide uppercase",children:"Templates"}),e.jsxs("h2",{children:["Start with ",e.jsx("span",{className:"gradient-text",children:"ready-made templates"})]})]})}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(a,{to:"/templates",className:"text-sm font-medium text-primary-500 dark:text-primary-400 hover:text-primary-600 dark:hover:text-primary-300 transition-colors",children:"View all templates"}),e.jsx("button",{onClick:()=>i("left"),className:"w-10 h-10 rounded-full border border-slate-200 dark:border-white/10 flex items-center justify-center text-slate-400 hover:text-slate-900 hover:border-slate-400 dark:hover:text-white dark:hover:border-white/30 transition-colors","aria-label":"Scroll templates left",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),e.jsx("button",{onClick:()=>i("right"),className:"w-10 h-10 rounded-full border border-slate-200 dark:border-white/10 flex items-center justify-center text-slate-400 hover:text-slate-900 hover:border-slate-400 dark:hover:text-white dark:hover:border-white/30 transition-colors","aria-label":"Scroll templates right",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]})]})}),e.jsx(c,{children:e.jsxs("div",{ref:t,className:"template-slider",children:[m.map((r,s)=>e.jsx("div",{className:"template-slider-card",children:e.jsx(a,{to:"/templates/$slug",params:{slug:r.slug},title:`View ${r.title} template`,children:e.jsxs("div",{className:"glass-card cursor-pointer group h-full",children:[r.featured_image?e.jsx("div",{className:"w-full aspect-[4/3] rounded-xl overflow-hidden mb-4",children:e.jsx("img",{src:r.featured_image,srcSet:`${r.featured_image_sm??r.featured_image} 462w, ${r.featured_image} 760w`,sizes:"(max-width: 768px) 462px, 348px",alt:r.title,width:"760",height:"570",loading:"lazy",decoding:"async",className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"})}):e.jsx("div",{className:`w-full aspect-[4/3] rounded-xl bg-gradient-to-br ${d[s%d.length]} flex items-center justify-center text-4xl mb-4`,children:"📋"}),r.template_type.length>0&&e.jsx("span",{className:"inline-block px-3 py-1 text-xs font-medium bg-slate-100 dark:bg-white/[0.06] text-slate-600 dark:text-slate-400 rounded-full mb-2",children:r.template_type[0]}),e.jsx("h3",{className:"font-semibold text-[15px] group-hover:text-primary-500 dark:group-hover:text-primary-400 transition-colors",children:r.title}),e.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 mt-1 line-clamp-2",children:r.excerpt})]})})},r.slug)),e.jsx("div",{className:"template-slider-card",children:e.jsx(a,{to:"/templates",title:"Browse all templates",children:e.jsxs("div",{className:"glass-card h-full flex flex-col items-center justify-center text-center min-h-[320px] group cursor-pointer",children:[e.jsx("div",{className:"w-14 h-14 roun
1ded-2xl bg-slate-100 dark:bg-white/[0.06] flex items-center justify-center mb-4 group-hover:bg-primary-500/10 transition-colors",children:e.jsx("svg",{className:"w-6 h-6 text-slate-400 group-hover:text-primary-500 transition-colors",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13 7l5 5m0 0l-5 5m5-5H6"})})}),e.jsx("h3",{className:"text-lg font-semibold mb-1 group-hover:text-primary-500 dark:group-hover:text-primary-400 transition-colors",children:"View All Templates"}),e.jsx("p",{className:"text-sm text-slate-400",children:"Browse our full library"})]})})})]})})]})}export{g as T};

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.