/* global React, PROJECTS, Header, Footer, Btn, Tag, Reveal, Img */
const { useEffect: pUE } = React;
function ProjectScreen({ id, onNav }) {
const p = PROJECTS.find(x => x.slug === id || x.id === id) || PROJECTS[0];
const idx = PROJECTS.indexOf(p);
const next = PROJECTS[(idx + 1) % PROJECTS.length];
pUE(() => { window.scrollTo(0, 0); }, [id]);
return (
{/* Full-bleed cover */}
{/* Meta-bar */}
Leistungen
{p.services.join(' · ')}
{/* Intro */}
{/* Gallery */}
{p.gallery && p.gallery.length > 0 && (
{p.gallery.map((g, i) => {
const ratio = g.ratio || '2 / 1';
const parts = ratio.split('/').map(s => parseFloat(s.trim()));
const isPortrait = parts[1] > parts[0];
return (
);
})}
)}
{/* Challenge */}
HerausforderungDie Aufgabe.
{p.challenge.map((para, i) =>
{para}
)}
{/* Fazit */}
FazitDas Ergebnis.
{p.fazit.map((para, i) =>
{para}
)}
{p.liveUrl && (
)}
{/* Next case */}
);
}
Object.assign(window, { ProjectScreen });