PageSourceSearch

https://steamlabsafrica.com/assets/events-DyerCoRJ.js

js steamlabsafrica.com collected 2026-10-03 20:01:21 UTC 4,750 bytes, 1 lines download raw bytes

1import{k as p,l as u,j as e,R as c,g as m,L as d}from"./index-SF1vOKJG.js";import{S as h,P as g}from"./site-shell-BNXviLbt.js";import{f as o}from"./format-D5ebMS61.js";function v(){const n=p(u.useLoaderData()).filter(s=>s.status==="published"),l=Date.now(),a=n.filter(s=>+new Date(s.endsAt)>=l).sort((s,r)=>+new Date(s.startsAt)-+new Date(r.startsAt)),i=n.filter(s=>+new Date(s.endsAt)<l).sort((s,r)=>+new Date(r.startsAt)-+new Date(s.startsAt));return e.jsxs(h,{children:[e.jsx(g,{eyebrow:"Events",title:"Learning communities in motion",subtitle:"Bootcamps, showcases, webinars and innovation experiences across the STEAMLabs Africa ecosystem. Register to save your spot.",image:"clubFullHouse",imageAlt:"A full Code Club session in a school computer lab"}),e.jsx("section",{className:"py-20",children:e.jsx("div",{className:"mx-auto max-w-7xl px-6 lg:px-10",children:n.length===0?e.jsx(f,{}):e.jsxs("div",{className:"space-y-16",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xs font-semibold uppercase tracking-[0.2em] text-secondary",children:"Upcoming"}),a.length===0?e.jsx("p",{className:"mt-4 text-muted-foreground",children:"No upcoming events right now — check back soon."}):e.jsx("div",{className:"mt-6 grid gap-8 sm:grid-cols-2 lg:grid-cols-3",children:a.map((s,r)=>e.jsx(c,{variant:"card",delayMs:m(r),className:"grid",children:e.jsx(x,{event:s})},s.id))})]}),i.length>0&&e.jsxs("div",{children:[e.jsx("h2",{className:"text-xs font-semibold uppercase tracking-[0.2em] text-muted-foreground",children:"Past events"}),e.jsx("div",{className:"mt-6 grid gap-8 sm:grid-cols-2 lg:grid-cols-3",children:i.map((s,r)=>e.jsx(c,{variant:"card",delayMs:m(r),className:"grid",children:e.jsx(x,{event:s,past:!0})},s.id))})]})]})})})]})}function x({event:t,past:n=!1}){const l=new Date(t.startsAt),a=t.capacity===null?null:t.capacity-(t.registeredCount??0);return e.jsxs(d,{to:"/events/$slug",params:{slug:t.slug},className:`group flex flex-col overflow-hidden rounded-xl border border-border bg-card transition-transform hover:-translate-y-1 ${n?"opacity-70":""}`,children:[e.jsx("div",{className:"aspect-[16/9] overflow-hidden bg-muted",children:t.coverImage?e.jsx("img",{src:t.coverImage,alt:t.title,loading:"lazy",decoding:"async",className:"h-full w-full object-cover transition-transform duration-500 group-hover:scale-105"}):e.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center bg-hampton text-secondary-deep",children:[e.jsx("span",{className:"text-4xl font-black",children:o(l,"d")}),e.jsx("span",{className:"text-sm font-semibold uppercase tracking-[0.2em]",children:o(l,"MMM yyyy")})]})}),e.jsxs("div",{className:"flex flex-1 flex-col p-6",children:[e.jsx("div",{className:"text-xs font-semibold uppercase tracking-[0.14em] text-secondary-deep",children:o(l,"EEE d MMM yyyy · h:mm a")}),e.jsx("h3",{className:"mt-3 text-xl font-bold leading-snug text-balance group-hover:text-secondary-deep",children:t.title}),e.jsx("p",{className:"mt-3 flex-1 text-sm leading-relaxed text-muted-foreground",children:t.summary}),e.jsxs("div",{className:"mt-5 flex items-center justify-between text-xs text-muted-foreground",children:[e.jsx("span",{className:"truncate",children:t.location}),n?e.jsx("span",{className:"shrink-0 rounded-full bg-muted px-3 py-1 font-semibold",children:"Ended"}):a!==null&&a<=0?e.jsx("span",{className:"shrink-0 rounded-full bg-destructive/10 px-3 py-1 font-semibold text-destructive",children:"Full"}):e.jsx("span",{className:"shrink-0 rounded-full bg-secondary/15 px-3 py-1 font-semibold text-secondary-deep",children:a===null?"Open":`${a} spots left`})]})]})]})}function f(){return e.jsxs("div",{className:"rounded-xl border border-dashed border-border bg-card p-12 text-center",children:[e.jsx("h2",{className:"text-xl font-bold",children:"Nothing on the calendar right now"}),e.jsx("p",{className:"mx-auto mt-3 max-w-lg text-muted-foreground",children:"We're planning the next bootcamps, showcases and community experiences. The programmes below run year-round, and Get Involved is where partnerships and Code Clubs start."}),e.jsxs("div",{className:"mt-8 flex flex-wrap items-center justify-center gap-3",children:[e.jsxs(d,{to:"/programs",className:"inline-flex items-center gap-2 rounded-lg bg-secondary px-5 py-3 text-sm font-semibold text-secondary-foreground transition-transform hover:-translate-y-0.5",children:["Explore programmes ",e.jsx("span",{"aria-hidden":!0,
1children:"→"})]}),e.jsxs(d,{to:"/get-involved",className:"inline-flex items-center gap-2 rounded-lg border border-border px-5 py-3 text-sm font-semibold transition-colors hover:border-secondary",children:["Get involved ",e.jsx("span",{"aria-hidden":!0,children:"→"})]})]})]})}export{v 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.