026b9e5d9b
Extended the "2 → 4 → 8 → 16 → 32" visual to the full doubling 2→4→8→16→32→64→128→256 (510 positions), keeping the 30-position first milestone in the caption. Matrix is now data-driven (data-n) with icons capped at 12 + a "+" for deeper generations so 256 stays compact; compact icon styling + horizontal scroll safety. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
24 lines
1.3 KiB
JavaScript
24 lines
1.3 KiB
JavaScript
(async function(){
|
|
try{
|
|
const r=await fetch('/api/public/config');
|
|
if(!r.ok)return;
|
|
const c=await r.json();
|
|
document.title=`${c.siteName} | ${c.programName}`;
|
|
const bn=document.getElementById('brandName');if(bn&&c.siteName)bn.textContent=c.siteName;
|
|
const bp=document.getElementById('brandProgram');if(bp&&c.programName)bp.textContent=c.programName;
|
|
const sub=document.getElementById('bridgeSubheadline');
|
|
if(sub&&c.bridgeSubheadline)sub.textContent=c.bridgeSubheadline;
|
|
const h=document.getElementById('bridgeHeadline');
|
|
if(h&&c.bridgeHeadline)h.textContent=c.bridgeHeadline;
|
|
const qs=window.location.search; if(qs){document.querySelectorAll('a[href="/start"]').forEach(a=>a.href='/start'+qs)}
|
|
}catch(e){}
|
|
// fill each generation's crowd from data-n; cap the rendered icons so the
|
|
// deeper generations (up to 256) stay compact — the number label is the truth
|
|
const ICON_CAP=12;
|
|
document.querySelectorAll('.people[data-n]').forEach(node=>{
|
|
const n=parseInt(node.dataset.n,10)||0, show=Math.min(n,ICON_CAP);
|
|
for(let i=0;i<show;i++){const s=document.createElement('span');s.className='person';node.appendChild(s)}
|
|
if(n>ICON_CAP){const d=document.createElement('span');d.className='person-more';d.textContent='+';node.appendChild(d)}
|
|
});
|
|
})();
|