// `hidden: true` parks a project: it drops off the list and cannot be opened, // while its folder, photos and manifest stay exactly where they are. Delete the // flag to put it back. const PROJECTS = [ { folder: "assets/projects/sven", title: "Sven Ugau", description: "World record holder in wingsuit target flying.", meta: "Wingsuit BASE jumping", youtube: "https://www.youtube.com/@svenugau9399", key: "sven" }, { folder: "assets/projects/rapax", title: "RAPAX® Birds of Prey", description: "A registered breeding-centre for raptors.", meta: "Zoological institution", url: "https://rapax.be/", instagram: "https://www.instagram.com/rapax.be/", facebook: "https://www.facebook.com/rapax.be", key: "rapax" }, { folder: "assets/projects/motop", title: "MOTOP", description: "A start-up built on the love of motorbikes.", meta: "Motorsport", key: "motop", hidden: true }, { folder: "assets/projects/michael", title: "Michael Bruyninckx", description: "Belgian motocross champion.", meta: "Motocross", key: "michael" }, ].filter((p) => !p.hidden); // The router resolves #/project/ against this list. window.PROJECTS = PROJECTS; // The cover comes from each folder's manifest, so renaming or replacing photos // never leaves a project pointing at a file that is no longer there. function useHeroes(projects) { const [heroes, setHeroes] = React.useState({}); React.useEffect(() => { let cancelled = false; Promise.all(projects.map((p) => window.scanFolder(p.folder).then((d) => [p.key, d.hero]))) .then((pairs) => { if (!cancelled) setHeroes(Object.fromEntries(pairs.filter(([, src]) => src))); }); return () => { cancelled = true; }; }, []); return heroes; } function ProjectsPage() { const heroes = useHeroes(PROJECTS); const isMobile = window.useIsMobile(); // `active` decides which photograph stands behind the list. It follows the // pointer only; it used to advance on its own every 4.2 seconds, which pulled // the eye off whichever name was being read and left the other two at 36% // opacity — two of three projects near-invisible at any moment. The list now // holds still and every title reads at full strength. const [active, setActive] = React.useState(0); const [loaded, setLoaded] = React.useState(false); React.useEffect(() => { const t = setTimeout(() => setLoaded(true), 60); return () => clearTimeout(t); }, []); return (
{PROJECTS.map((p, i) => heroes[p.key] && ( ))}

Projects — selected work

{/* Was "01 / 03", counting the slideshow's position. With nothing advancing there is no position to be at, so it states the count. */}
{String(PROJECTS.length).padStart(2, "0")} Projects — Selected work
); } window.ProjectsPage = ProjectsPage;