PageSourceSearch

https://genx.be/assets/Projects-DfoQyDQP.js

js genx.be collected 2026-10-07 16:27:31 UTC 4,161 bytes, 1 lines download raw bytes

1import{r as c,j as t,L as v}from"./vendor-react-B9zYIx_v.js";import{u as y,g as N,f as p}from"./index-BUnRSC5N.js";import{M as w}from"./MiniHero-BWhObpIY.js";import{S as P}from"./SeoHead-B0RjapVu.js";import{C}from"./check-BUOvRBEr.js";import{C as k}from"./chevron-left-DvkBQKh9.js";import{C as A}from"./chevron-right-BjLRtU2y.js";const d=6;function F(){const{lang:m,t:a,localPath:g}=y(),[l,x]=c.useState(null),[o,r]=c.useState(1),i=N(m),f=c.useMemo(()=>{const e=new Set;return i.forEach(s=>s.tags.forEach(b=>e.add(b))),Array.from(e).sort()},[i]),u=l?i.filter(e=>e.tags.includes(l)):i,n=Math.ceil(u.length/d),h=u.slice((o-1)*d,o*d);function j(e){x(e),r(1)}return t.jsxs(t.Fragment,{children:[t.jsx(P,{title:a.projects.title,description:a.meta.projectsDesc,path:g("projects"),lang:m}),t.jsx(w,{title:a.projects.title,subtitle:a.projects.subtitle}),t.jsx("section",{className:"py-12 md:py-16",children:t.jsxs("div",{className:"container",children:[t.jsx("div",{role:"group","aria-label":a.common.filterByTag,className:"mb-8 flex flex-wrap gap-2",children:[null,...f].map(e=>{const s=l===e;return t.jsxs("button",{type:"button",onClick:()=>j(e),"aria-pressed":s,"data-umami-event":"projects-filter-tag","data-umami-event-tag":e??"all",className:p("inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm transition-colors",s?"bg-primary font-semibold text-primary-foreground":"bg-muted font-medium text-muted-foreground hover:text-foreground"),children:[s&&t.jsx(C,{className:"h-3.5 w-3.5","aria-hidden":"true"}),e??a.common.all]},e??"all")})}),t.jsx("div",{className:"grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:h.map(e=>t.jsxs(v,{to:g("projects.detail",{slug:e.slug}),"data-umami-event":"projects-card","data-umami-event-project":e.slug,className:"group overflow-hidden rounded-2xl border bg-card shadow-sm transition-all hover:shadow-md active:scale-[0.99]",children:[e.image?t.jsx("div",{className:"aspect-[16/10] overflow-hidden bg-muted",style:e.imageBg?{backgroundColor:e.imageBg}:void 0,children:t.jsx("img",{src:e.image,alt:e.title,className:`h-full w-full transition-transform duration-500 group-hover:scale-105 ${e.imageFit==="contain"?"object-contain":"object-cover"}`,style:e.imagePosition?{objectPosition:e.imagePosition}:void 0,loading:"lazy"})}):t.jsx("div",{className:"aspect-[16/10] bg-muted/50"}),t.jsxs("div",{className:"p-6",children:[t.jsx("h2",{className:"text-lg font-semibold",children:e.title}),t.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:e.tags.map(s=>t.jsx("span",{className:"rounded-lg bg-muted px-2.5 py-1 text-xs font-medium text-muted-foreground",children:s},s))})]})]},e.slug))}),n>1&&t.jsxs("nav",{"aria-label":a.common.pagination,className:"mt-12 flex items-center justify-center gap-2",children:[t.jsx("button",{type:"button",onClick:()=>r(e=>Math.max(1,e-1)),disabled:o===1,"aria-label":a.common.previousPage,"data-umami-event":"projects-pagination","data-umami-event-direction":"previous",className:"inline-flex h-9 w-9 items-center justify-center rounded-lg border bg-card text-muted-foreground transition-colors hover:bg-accent disabled:opacity-30 disabled:pointer-events-none",children:t.jsx(k,{className:"h-4 w-4","aria-hidden":"true"})}),Array.from({length:n},(e,s)=>s+1).map(e=>t.jsx("button",{type:"button",onClick:()=>r(e),"aria-label":a.common.pageN.replace("{n}",String(e)),"aria-current":e===o?"page":void 0,"data-umami-event":"projects-pagination","data-umami-event-page":e,className:p("inline-flex h-9 w-9 items-center justify-center rounded-lg text-sm transition-colors",e===o?"bg-primary font-bold text-primary-foreground":"border bg-card font-medium text-muted-foreground hover:bg-accent"),children:e},e)),t.jsx("button",{type:"button",onClick:()=>r(e=>Math.min(n,e+1)),disabled:o===n,"aria-label":a.common.nextPage,"data-umami-event":"projects-pagination","data-umami-event-direction":"next",className:"inline-flex h-9 w-9 items-center justify-center rounded-lg border bg-card text-muted-foreground transition-colors hover:bg-accent disabled:opacity-30 disabled:pointer-events-none",children:t.jsx(A,{className:"h-4 w-4","aria-hidden":"true"})})]})]})})]})}export{F 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.