// Project detail page
function ProjectDetail({ projectId, lang, onBack, onOpen }) {
const project = window.PROJECTS.find(p => p.id === projectId);
if (!project) {
return (
);
}
React.useEffect(() => { window.scrollTo({ top: 0, behavior: 'instant' }); }, [projectId]);
const related = window.PROJECTS.filter(p => p.id !== projectId && p.kind === project.kind).slice(0, 3);
return (
[ {String(window.PROJECTS.indexOf(project) + 1).padStart(2, '0')} / {project.kind === 'game' ? 'GAME' : 'APP'} ]
{project.title}.
{project.description[lang]}
{lang === 'es' ? 'Plataformas' : 'Platforms'}
{project.platforms.map(p => )}
{lang === 'es' ? 'Lanzamiento' : 'Released'}
{project.year}
{lang === 'es' ? 'Versión' : 'Version'}
{project.version}
{lang === 'es' ? 'Motor' : 'Engine'}
{project.engine}
{/* Trailer */}
[ A ] {lang === 'es' ? 'Trailer' : 'Trailer'}
{lang === 'es' ? 'Míralo en' : 'See it in'} movimiento.
{/* Features */}
[ B ] {lang === 'es' ? 'Características' : 'Features'}
{lang === 'es' ? 'Lo que lo hace' : 'What makes it'} {lang === 'es' ? 'especial' : 'special'}.
{project.features.map((f, i) => (
0{i + 1} — Feature
{f.t[lang]}
{f.d[lang]}
))}
{/* Gallery */}
[ C ] {lang === 'es' ? 'Galería' : 'Gallery'}
{lang === 'es' ? 'Capturas' : 'Screenshots'}.
{lang === 'es' ? 'Selecciona una para ampliar' : 'Click to enlarge'}
{/* CTA */}
[ {lang === 'es' ? 'LLEVÁTELO' : 'TAKE IT HOME'} ]
{project.kind === 'game'
? (lang === 'es' ? 'Juega ' : 'Play ')
: (lang === 'es' ? 'Descarga ' : 'Download ')}
{project.title}.
{/* Related */}
{related.length > 0 && (
[ D ] {lang === 'es' ? 'También podría interesarte' : 'You might also like'}
{lang === 'es' ? 'Más' : 'More'} {project.kind === 'game' ? (lang === 'es' ? 'videojuegos' : 'games') : 'apps'}.
)}
);
}
window.ProjectDetail = ProjectDetail;