// courses.jsx — Courses listing + Course detail (function () { const { useState, useMemo } = React; const Icon = window.Icon; const D = window.DATA; const { Placeholder, CourseCard, CAT_LABEL } = window; function PageHero({ eyebrow, title, sub, crumb, navigate }) { return ( { e.preventDefault(); navigate("home"); }} style={{ color: "rgba(255,255,255,.7)" }}>Home {crumb && crumb.map((c, i) => ( {c.key ? { e.preventDefault(); navigate(c.key); }} style={{ color: "rgba(255,255,255,.7)" }}>{c.label} : {c.label}} ))} {eyebrow} {title} {sub && {sub}} ); } function Courses({ navigate }) { const [cat, setCat] = useState("all"); const [q, setQ] = useState(""); const list = useMemo(() => D.COURSES.filter((c) => (cat === "all" || c.cat === cat) && (q.trim() === "" || (c.title + " " + c.tagline + " " + c.software.join(" ")).toLowerCase().includes(q.toLowerCase()))), [cat, q]); return ( {/* controls */} {D.CATEGORIES.map((c) => ( setCat(c.key)} style={{ display: "inline-flex", alignItems: "center", gap: 8, padding: "11px 18px", borderRadius: 999, fontWeight: 700, fontSize: ".92rem", border: "1.5px solid", cursor: "pointer", transition: "all .15s ease", borderColor: cat === c.key ? "var(--brand)" : "var(--line)", background: cat === c.key ? "var(--brand)" : "var(--surface)", color: cat === c.key ? "#fff" : "var(--ink-2)" }}> {c.label} ))} setQ(e.target.value)} style={{ paddingLeft: 44 }} /> {list.length === 0 ? ( No courses found Try a different category or search term. { setCat("all"); setQ(""); }}>Clear filters ) : ( {list.map((c) => )} )} ); } function CourseDetail({ slug, navigate }) { const c = D.COURSES.find((x) => x.slug === slug); if (!c) { return ( navigate("courses")}>Back to all courses ); } const related = D.COURSES.filter((x) => x.cat === c.cat && x.slug !== c.slug).slice(0, 3); return ( About this course {c.blurb} You'll work through guided projects and finish with portfolio-ready pieces and the confidence to apply your skills professionally. What you'll learn {c.outcomes.map((o) => ( {o} ))} Course curriculum {c.modules.map((m, i) => ( {String(i + 1).padStart(2, "0")} {m.t} {m.d} ))} {/* sticky enroll card */} {related.length > 0 && ( Keep exploringRelated courses {related.map((r) => )} )} ); } Object.assign(window, { Courses, CourseDetail, PageHero }); })();
{sub}
Try a different category or search term.
{c.blurb} You'll work through guided projects and finish with portfolio-ready pieces and the confidence to apply your skills professionally.