1import{j as e}from"./vendor-editor-B5v07e1y.js";import{L as k,j as P,H as S,C as M}from"./index-fiGoVOw_.js";import{S as U}from"./SimplifiedHeader-CidPV4uV.js";import{F as I}from"./Footer-CYVsb10q.js";import{C as h}from"./Container-DCdrFgrB.js";import{S as A}from"./SectionBadge-Cc6GVptB.js";import{i as L,a as u,r as v,u as B,b as R}from"./hooks-DogbX3By.js";import{u as w}from"./vendor-i18n-C7sBi11W.js";import{I as $}from"./image-BcCnvldg.js";import{A as D}from"./arrow-up-right-CBsXrUKp.js";import{f as F}from"./format-D6hvz-f7.js";import{h as z,f as m,v as p,s as E}from"./animations-szmoZwYi.js";import{m as c}from"./vendor-motion-DFIFMSyv.js";import{B as y}from"./book-open-BRFiitz0.js";import{C as H}from"./chevron-left-POkY_fya.js";import"./vendor-charts-x3_JpA8L.js";import"./vendor-query-C94pIwNL.js";import"./vendor-sentry-BZrG4QX-.js";import"./vendor-socket-CL3SdtP1.js";import"./i18n.generated-BtOkNL0B.js";import"./Logo-dSSFS_ZP.js";import"./index-C8HjN1ym.js";import"./index-D4mGc1Iv.js";import"./chevron-down-BboIilIx.js";import"./menu-DEG0I9xV.js";import"./user-DFIl0cCu.js";import"./youtube-fKih6TPR.js";import"./linkedin-D-0Ugm2d.js";import"./en-US-B32h3Idb.js";function O(s){var i,a;if(!s||!u(s))return null;const l=((a=(i=s.sizes)==null?void 0:i.card)==null?void 0:a.url)||s.url;return l?v(l):null}function T(s){var i,a;if(!s||!u(s))return null;const l=((a=(i=s.sizes)==null?void 0:i.thumbnail)==null?void 0:a.url)||s.url;return l?v(l):null}const V=({post:s})=>{const{t:l}=w("public"),i=O(s.heroImage),a=L(s.category)?s.category:null,o=T(s.authorImage),n=s.publishedAt?F(new Date(s.publishedAt),"MMM d, yyyy"):null;return e.jsxs(k,{to:`/blog/${s.slug}`,className:"group flex flex-col bg-white rounded-2xl overflow-hidden border border-gray-100 hover:shadow-xl hover:border-purple-200 transition-all duration-300",children:[e.jsx("div",{className:"aspect-[3/2] overflow-hidden bg-gray-100",children:i?e.jsx("img",{src:i,alt:u(s.heroImage)?s.heroImage.alt:s.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",loading:"lazy"}):e.jsx("div",{className:"w-full h-full flex items-center justify-center text-gray-300",children:e.jsx($,{className:"w-12 h-12"})})}),e.jsxs("div",{className:"flex flex-col flex-1 p-5",children:[a&&e.jsx("span",{className:"self-start text-xs font-medium text-purple-700 dark:text-purple-400 bg-purple-200 dark:bg-purple-900/30 px-2.5 py-1 rounded-full mb-3",children:a.name}),e.jsx("h3",{className:"text-lg font-heading font-semibold text-black group-hover:text-purple-700 transition-colors line-clamp-2 mb-2",children:s.title}),s.excerpt&&e.jsx("p",{className:"text-sm text-gray-600 line-clamp-2 mb-4 flex-1",children:s.excerpt}),e.jsxs("div",{className:"flex items-center justify-between mt-auto pt-3 border-t border-gray-100",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.authorName&&e.jsxs(e.Fragment,{children:[o?e.jsx("img",{src:o,alt:s.authorName,className:"w-6 h-6 rounded-full object-cover flex-shrink-0"}):e.jsx("div",{className:"w-6 h-6 rounded-full bg-purple-100 dark:bg-purple-900/30 flex items-center justify-center flex-shrink-0",children:e.jsx("span",{className:"text-xs font-medium text-purple-700 dark:text-purple-400",children:s.authorName.charAt(0).toUpperCase()})}),e.jsx("span",{className:"text-xs font-medium text-gray-700 truncate",children:s.authorName}),n&&e.jsx("span",{className:"text-gray-300 flex-shrink-0",children:"·"})]}),n&&e.jsx("span",{className:"text-xs text-gray-500 flex-shrink-0",children:n})]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-sm font-medium text-purple-700 dark:text-purple-400 group-hover:gap-2 transition-all flex-shrink-0",children:[l("blog.readMore"),e.jsx(D,{className:"w-3.5 h-3.5"})]})]})]})]})},_=9,ye=()=>{const{t:s}=w("public"),[l,i]=P(),a=l.get("category")||void 0,o=parseInt(l.get("page")||"1",10),{data:n,isLoading:N}=B({page:o,limit:_,category:a}),{data:x}=R(),b=t=>{const r=new URLSearchParams;t&&r.set("category",t),r.set("page","1"),i(r)},g=t=>{const r=new URLSearchParams(l);r.set("page",String(t)),i(r),window.scrollTo({top:0,behavior:"smooth"})};return e.jsxs("div",{className:"min-h-screen flex flex-col bg-white transition-colors",children:[e.jsxs(S,{children:[e.jsxs("title",{children:[s("blog.title")," â Kollega"]}),e.jsx("meta",{name:"description",content:s("blog.subtitle")})]}),e.jsx(U,{}),e.jsxs("main",{className:"flex-1",children:[e.jsx("section",{className:"bg-white pt-6 sm:pt-8 pb-10 sm:pb-12",children:e.jsx(h,{children:e.jsxs(c.div,{variants:z,initial:"hidden",animate:"visible",className:"text-center",children:[e.jsx(c.div,{variants:m,children:e.jsx(A,{text:s("blog.title"),icon:y,variant:"header"})}),e.jsxs(c.div,{variants:m,children:[e.jsx("h1",{className:"text-3xl xs:text-4xl sm:text-4xl md:text-5xl lg:text-5xl font-heading font-bold text-black mb-4",children:s("blog.title")}),e.jsx("p",{className:"text-sm sm:text-base md:text-lg lg:text-xl text-gray-600 max-w-2xl mx-auto",children:s("blog.subtitle")})]})]})})}),x&&x.length>0&&e.jsx("section",{className:"bg-white border-b border-gray-100",children:e.jsx(h,{children:e.jsxs(c.div,{variants:m,initial:"hidden",
1whileInView:"visible",viewport:p,className:"flex items-center gap-2 py-4 overflow-x-auto scrollbar-none",children:[e.jsx("button",{onClick:()=>b(void 0),className:`px-4 py-2 rounded-full text-sm font-medium whitespace-nowrap transition-colors ${a?"bg-gray-100 text-gray-600 hover:bg-gray-200":"bg-purple-700 dark:bg-purple-600 text-white shadow-md"}`,children:s("blog.allCategories")}),x.map(t=>e.jsx("button",{onClick:()=>b(t.slug),className:`px-4 py-2 rounded-full text-sm font-medium whitespace-nowrap transition-colors ${a===t.slug?"bg-purple-700 dark:bg-purple-600 text-white shadow-md":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:t.name},t.id))]})})}),e.jsx("section",{className:"bg-white py-12 sm:py-16",children:e.jsx(h,{children:N?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:Array.from({length:6}).map((t,r)=>e.jsxs("div",{className:"bg-white rounded-2xl overflow-hidden border border-gray-100 animate-pulse",children:[e.jsx("div",{className:"aspect-[3/2] bg-gray-200"}),e.jsxs("div",{className:"p-5 space-y-3",children:[e.jsx("div",{className:"h-4 w-20 bg-gray-200 rounded-full"}),e.jsx("div",{className:"h-5 w-3/4 bg-gray-200 rounded"}),e.jsx("div",{className:"h-4 w-full bg-gray-200 rounded"}),e.jsx("div",{className:"h-4 w-2/3 bg-gray-200 rounded"})]})]},r))}):n&&n.docs.length>0?e.jsxs(e.Fragment,{children:[e.jsx(c.div,{variants:E,initial:"hidden",whileInView:"visible",viewport:p,className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:n.docs.map(t=>e.jsx(c.div,{variants:m,children:e.jsx(V,{post:t})},t.id))}),n.totalPages>1&&e.jsxs(c.div,{variants:m,initial:"hidden",whileInView:"visible",viewport:p,className:"flex justify-center items-center gap-2 mt-12",children:[e.jsx("button",{onClick:()=>g(o-1),disabled:!n.hasPrevPage,className:"w-10 h-10 flex items-center justify-center rounded-xl text-sm font-medium text-gray-600 bg-white border border-gray-200 hover:bg-gray-50 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:e.jsx(H,{className:"w-4 h-4"})}),(()=>{const t=n.totalPages,r=[];r.push(1);const f=Math.max(2,o-1),j=Math.min(t-1,o+1);f>2&&r.push("ellipsis");for(let d=f;d<=j;d++)r.push(d);return j<t-1&&r.push("ellipsis"),t>1&&r.push(t),r.map((d,C)=>d==="ellipsis"?e.jsx("span",{className:"w-10 h-10 flex items-center justify-center text-gray-600",children:"..."},`ellipsis-${C}`):e.jsx("button",{onClick:()=>g(d),className:`w-10 h-10 rounded-xl text-sm font-medium transition-colors ${o===d?"bg-purple-700 dark:bg-purple-600 text-white shadow-md":"text-gray-600 bg-white border border-gray-200 hover:bg-gray-50"}`,children:d},d))})(),e.jsx("button",{onClick:()=>g(o+1),disabled:!n.hasNextPage,className:"w-10 h-10 flex items-center justify-center rounded-xl text-sm font-medium text-gray-600 bg-white border border-gray-200 hover:bg-gray-50 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:e.jsx(M,{className:"w-4 h-4"})})]})]}):e.jsxs(c.div,{variants:m,initial:"hidden",animate:"visible",className:"text-center py-16",children:[e.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-gray-100 flex items-center justify-center",children:e.jsx(y,{className:"w-8 h-8 text-gray-400"})}),e.jsx("h3",{className:"text-lg font-semibold text-black mb-2",children:s("blog.noPosts")}),e.jsx("p",{className:"text-gray-600",children:s("blog.noPostsDescription")})]})})})]}),e.jsx(I,{})]})};export{ye 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.