← back to Abrams

public/js/corner-nav.js

32 lines

// Abrams Panel — corner-nav menu (Gucci-style ≡ MENU upper-right)
(function () {
  const cfg = window.CornerNavConfig || {};
  const links = cfg.links || [
    { label: 'Panel', href: '/' },
    { label: 'Terminal', href: '/terminal' },
    { label: 'Thesis', href: '/#thesis' },
    { label: 'Projects', href: '/#projects' },
    { label: 'Ideas + SWOT', href: '/ideas' },
    { label: 'Mag-20 Audit', href: '/mag-20' },
    { label: 'Press Kit', href: '/press' },
    { label: 'Info Hub', href: '/hub' },
    { label: 'Competitors', href: '/competitors' },
    { label: 'Leaderboard', href: '/#leaderboard' },
    { label: 'Trademark', href: '/trademark' },
    { label: 'Wall', href: '/wall' },
    { label: 'Chat', href: '/chat' },
    { label: 'Build Log', href: '/#feed' },
    { label: 'agentabrams.com', href: 'https://agentabrams.com' },
  ];
  const burger = document.querySelector('.nav-burger');
  if (!burger) return;

  const drawer = document.createElement('div');
  drawer.style.cssText = 'position:fixed;top:64px;right:24px;background:var(--bg-2);border:1px solid var(--hairline);padding:18px 0;min-width:260px;z-index:99;display:none;box-shadow:0 12px 40px rgba(0,0,0,.6);';
  drawer.innerHTML = links.map(l => `<a href="${l.href}" style="display:block;padding:10px 24px;color:var(--fg);font-family:var(--mono);font-size:11px;letter-spacing:.25em;text-transform:uppercase;text-decoration:none;">${l.label}</a>`).join('');
  document.body.appendChild(drawer);

  burger.addEventListener('click', e => { e.stopPropagation(); drawer.style.display = drawer.style.display === 'block' ? 'none' : 'block'; });
  document.addEventListener('click', () => { drawer.style.display = 'none'; });
})();