import { skillFocusAreas, slopFocusAreas, dimensionGuidelineCounts } from '../data.js'; import { foundationAnimations } from './foundation-animations.js'; // Renders the seven-discipline grid. The container picks its data source via // `data-source="foundation"` (the original "loaded on every command" copy) or // `data-source="slop"` (the slop-tells-we-prevent copy used on /catch-the-slop). // Both share the icon + plinth + card chrome so we get the elegant magazine // rail twice without two parallel components. export function initFoundationGrid() { const containers = document.querySelectorAll('.foundation-grid'); if (!containers.length) return; containers.forEach((container) => { const source = container.dataset.source || 'foundation'; const data = source === 'slop' ? slopFocusAreas['impeccable'] : skillFocusAreas['impeccable']; if (!data) return; const showCount = source !== 'slop'; container.innerHTML = data.map((dim, i) => `
${foundationAnimations[dim.area] || ''}
${dim.area} ${showCount ? `${dimensionGuidelineCounts[dim.area] || ''}` : ''}

${dim.detail}

`).join(''); }); }