-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
8 lines (8 loc) · 2.39 KB
/
Copy pathscript.js
File metadata and controls
8 lines (8 loc) · 2.39 KB
1
2
3
4
5
6
7
8
const projects=[
{id:"01",year:"NOW",name:"0xEngine",type:"Systems project / multi-language build",stack:["Go","Python","JavaScript"],note:"01 // A systems project built across Go, Python, and JavaScript. Work in progress, built in the open.",href:"https://github.com/0xkhush/0xEngine"},
{id:"02",year:"2026",name:"Focus",type:"Chrome extension / distraction control",stack:["JavaScript","Chrome API","DOM"],note:"02 // Rewired YouTube’s interface to remove distraction at the point of attention.",href:"https://github.com/0xkhush/focus"},
{id:"03",year:"2026",name:"yt-filter-api",type:"ML classifier / productivity infra",stack:["Python","ML","API"],note:"03 // A lean classifier for deciding whether a YouTube video earns the next click.",href:"https://github.com/0xkhush/yt-filter-api"},
{id:"04",year:"NOW",name:"Open Source",type:"Public work / engineering in the open",stack:["GitHub","Community","Shipping"],note:"04 // Experiments, contributions, and the unglamorous iteration that makes systems better.",href:"https://github.com/0xkhush"},
{id:"05",year:"2026",name:"0xkhush.in",type:"Portfolio / interface experiment",stack:["HTML","CSS","JavaScript"],note:"05 // This site: a signal, not a résumé. Built to move, inspect, and evolve.",href:"https://0xkhush.in"}];
let active=0;const list=document.querySelector('#project-list'),signal=document.querySelector('#detail-signal'),type=document.querySelector('#detail-type'),note=document.querySelector('#detail-note'),stack=document.querySelector('#detail-stack'),link=document.querySelector('#detail-link');
function render(){const p=projects[active];list.innerHTML=projects.map((item,index)=>`<button class="project-row ${index===active?'active':''}" type="button" role="tab" aria-selected="${index===active}" data-index="${index}"><span>${item.id}</span><strong>${item.name}</strong><i>${item.year}</i><b>↗</b></button>`).join('');signal.textContent=`ACTIVE_SIGNAL / ${p.id}`;type.textContent=p.type;note.textContent=p.note;stack.innerHTML=p.stack.map(item=>`<span>${item}</span>`).join('');link.href=p.href;list.querySelectorAll('button').forEach(button=>button.addEventListener('click',()=>{active=Number(button.dataset.index);render()}))}document.addEventListener('keydown',event=>{if(event.key==='ArrowDown'||event.key==='ArrowUp'){event.preventDefault();active=event.key==='ArrowDown'?(active+1)%projects.length:(active-1+projects.length)%projects.length;render()}});render();