1 line
4.8 KiB
JavaScript
1 line
4.8 KiB
JavaScript
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[893],{24700:(e,t,s)=>{"use strict";s.d(t,{default:()=>d});var l=s(95155),a=s(12115),c=s(6874),r=s.n(c),i=s(29706),n=s(32941);function d(e){let{projects:t}=e,[s,c]=(0,a.useState)("All"),d=["All",...Array.from(new Set(t.map(e=>e.category).filter(Boolean)))],o="All"===s?t:t.filter(e=>e.category===s),m=o.filter(e=>!0===e.featured),x=o.filter(e=>!0!==e.featured);return(0,l.jsxs)(n.mc,{children:[(0,l.jsx)("div",{className:"flex flex-wrap gap-2 mb-8 justify-center",children:d.map(e=>(0,l.jsx)("button",{onClick:()=>c(e),className:"px-3 py-1.5 rounded text-xs font-medium ".concat(s===e?"bg-accent text-surface-900":"bg-surface-700 text-text-muted hover:bg-surface-600 hover:text-white"),children:e},e))}),(0,l.jsxs)("div",{className:"relative",children:[m.length>0&&(0,l.jsxs)("div",{className:"mb-12",children:[(0,l.jsx)("h3",{className:"text-xl font-display text-white mb-6 text-center",children:"Featured Projects"}),(0,l.jsx)("div",{className:"grid md:grid-cols-2 gap-6",children:m.map(e=>{let t=new Date(e.createdAt).getFullYear().toString();return(0,l.jsxs)(r(),{href:"/projects/".concat(e.id),className:"group relative overflow-hidden rounded",children:[(0,l.jsxs)("div",{className:"aspect-cinema relative overflow-hidden",children:[(0,l.jsx)(i.default,{src:e.thumbnail,alt:e.title,fill:!0,className:"object-cover",placeholderText:"Project Thumbnail"}),(0,l.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent opacity-70"})]}),(0,l.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 p-5",children:[(0,l.jsxs)("p",{className:"text-accent text-xs font-medium mb-1",children:[e.category||"Project"," • ",t]}),(0,l.jsx)("h3",{className:"text-white text-xl font-bold",children:e.title})]}),(0,l.jsx)("div",{className:"absolute top-3 left-3",children:(0,l.jsx)("span",{className:"badge badge-accent text-xs",children:"FEATURED"})})]},e.id)})})]}),x.length>0&&(0,l.jsxs)("div",{children:[m.length>0&&(0,l.jsx)("h3",{className:"text-xl font-display text-white mb-6 text-center",children:"All Projects"}),(0,l.jsx)("div",{className:"grid md:grid-cols-3 gap-4",children:x.map(e=>{let t=new Date(e.createdAt).getFullYear().toString();return(0,l.jsxs)(r(),{href:"/projects/".concat(e.id),className:"group relative overflow-hidden rounded",children:[(0,l.jsxs)("div",{className:"aspect-cinema relative overflow-hidden",children:[(0,l.jsx)(i.default,{src:e.thumbnail,alt:e.title,fill:!0,className:"object-cover",placeholderText:"Project Thumbnail"}),(0,l.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent opacity-70"})]}),(0,l.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 p-4",children:[(0,l.jsxs)("p",{className:"text-accent text-xs font-medium mb-1",children:[e.category||"Project"," • ",t]}),(0,l.jsx)("h3",{className:"text-white text-lg font-bold",children:e.title})]})]},e.id)})})]})]})]})}},29706:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});var l=s(95155),a=s(66766),c=s(12115);function r(e){let{src:t,alt:s="Image",placeholderText:r="Image Coming Soon",placeholderSize:i,...n}=e,[d,o]=(0,c.useState)(!1),{width:m,height:x,fill:h}=n,u=(0,c.useMemo)(()=>{let e="number"==typeof m?m:(null==i?void 0:i.width)||1200,t="number"==typeof x?x:(null==i?void 0:i.height)||(h?675:800),s=encodeURIComponent(r);return"https://placehold.co/".concat(e,"x").concat(t,"/111113/CCCCCC?text=").concat(s)},[m,x,h,i,r]),g=!t||""===t.trim()||d?u:t;return(0,l.jsx)(a.default,{...n,src:g,alt:s,onError:()=>o(!0)})}},32941:(e,t,s)=>{"use strict";s.d(t,{mc:()=>r,wn:()=>c,xA:()=>i,zY:()=>a});var l=s(95155);function a(e){let{title:t,subtitle:s,actions:a}=e;return(0,l.jsx)("div",{className:"mb-6",children:(0,l.jsxs)("div",{className:"flex items-start justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h1",{className:"text-3xl font-display tracking-tight text-white mb-2",children:t}),s&&(0,l.jsx)("p",{className:"text-text-muted text-base max-w-3xl",children:s})]}),a&&(0,l.jsx)("div",{className:"flex items-center gap-2",children:a})]})})}function c(e){let{children:t,className:s=""}=e;return(0,l.jsx)("section",{className:"section-spacing ".concat(s),children:t})}function r(e){let{children:t,className:s=""}=e;return(0,l.jsx)("div",{className:"w-full px-4 sm:px-6 lg:px-8 ".concat(s),children:t})}function i(e){let{children:t,cols:s=3,gap:a="md",className:c=""}=e;return(0,l.jsx)("div",{className:"grid ".concat({1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}[s]," ").concat({sm:"gap-3",md:"gap-4",lg:"gap-6"}[a]," ").concat(c),children:t})}s(12115)},59969:(e,t,s)=>{Promise.resolve().then(s.t.bind(s,6874,23)),Promise.resolve().then(s.bind(s,24700)),Promise.resolve().then(s.bind(s,29706))}},e=>{e.O(0,[6874,6766,8441,5964,7358],()=>e(e.s=59969)),_N_E=e.O()}]); |