OC nav: match Manus — always-white frosted glass, small no-wrap desktop links + smaller CTA, hamburger->circle mobile menu with CTA inside the dropdown

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Michael Victory
2026-06-17 06:15:57 -07:00
parent d2f80b1565
commit 049e9aec11
2 changed files with 81 additions and 48 deletions
+40 -24
View File
@@ -13,16 +13,29 @@
</head>
<body>
<header class="nav on-light" id="nav">
<div class="wrap nav-row">
<a class="wordmark" href="#top" aria-label="Open Communications — home"><span class="logo-mark" role="img" aria-label="Open Communications"></span></a>
<nav class="nav-links" aria-label="Main">
<a href="#problem">The problem</a>
<a href="#work">How we work</a>
<a href="#who">Who we are</a>
<a class="tel nav-phone" data-p1="778" data-p2="985" data-p3="6736" href="#contact" aria-label="Call Open Communications">778&#8209;985&#8209;OPEN</a>
<a class="nav-cta" href="#contact">Book a conversation</a>
</nav>
<header class="nav" id="nav">
<a class="nav-logo" href="#top" aria-label="Open Communications — home">
<img class="nav-logo-img" src="assets/brand/oc-logo.svg" alt="Open Communications">
</a>
<nav class="nav-links-desktop" aria-label="Main">
<a href="#problem">The problem</a>
<a href="#work">How we work</a>
<a href="#who">Who we are</a>
<a class="nav-cta" href="#contact">Book a conversation</a>
</nav>
<button class="nav-toggle" id="navToggle" aria-label="Open menu" aria-expanded="false">
<svg class="nav-toggle-icon" viewBox="0 0 32 32" aria-hidden="true">
<line class="bar bar-top" x1="6" y1="10" x2="26" y2="10"/>
<line class="bar bar-mid" x1="6" y1="16" x2="26" y2="16"/>
<line class="bar bar-bot" x1="6" y1="22" x2="26" y2="22"/>
<circle class="o-ring" cx="16" cy="16" r="9"/>
</svg>
</button>
<div class="nav-mobile-menu" id="navMobileMenu">
<a href="#problem">The problem</a>
<a href="#work">How we work</a>
<a href="#who">Who we are</a>
<a class="nav-cta" href="#contact">Book a conversation</a>
</div>
</header>
@@ -192,21 +205,24 @@
for (var l of document.querySelectorAll('a.tel')) {
l.setAttribute('href', 'tel:+1' + l.dataset.p1 + l.dataset.p2 + l.dataset.p3);
}
var nav = document.getElementById('nav');
var sections = Array.from(document.querySelectorAll('[data-bg]'));
function setNav() {
var line = nav.offsetHeight * 0.5, current = sections[0];
for (var s of sections) {
var r = s.getBoundingClientRect();
if (r.top <= line && r.bottom > line) { current = s; break; }
}
var dark = current.dataset.bg === 'dark';
nav.classList.toggle('on-dark', dark);
nav.classList.toggle('on-light', !dark);
var toggle = document.getElementById('navToggle');
var menu = document.getElementById('navMobileMenu');
function closeMenu() {
menu.classList.remove('open');
toggle.classList.remove('open');
toggle.setAttribute('aria-label', 'Open menu');
toggle.setAttribute('aria-expanded', 'false');
}
if (toggle && menu) {
toggle.addEventListener('click', function () {
var open = !menu.classList.contains('open');
menu.classList.toggle('open', open);
toggle.classList.toggle('open', open);
toggle.setAttribute('aria-label', open ? 'Close menu' : 'Open menu');
toggle.setAttribute('aria-expanded', open ? 'true' : 'false');
});
for (var a of menu.querySelectorAll('a')) { a.addEventListener('click', closeMenu); }
}
setNav();
window.addEventListener('scroll', function () { window.requestAnimationFrame(setNav); }, { passive: true });
window.addEventListener('resize', setNav);
})();
</script>