|
57 | 57 | <header class="site-header"> |
58 | 58 | <div class="container nav"> |
59 | 59 | <a class="brand" href="#top" aria-label="PromptOpsKit home">PromptOpsKit</a> |
60 | | - <nav aria-label="Primary"> |
| 60 | + |
| 61 | + <button |
| 62 | + class="menu-toggle" |
| 63 | + type="button" |
| 64 | + aria-expanded="false" |
| 65 | + aria-controls="primary-nav" |
| 66 | + aria-label="Toggle navigation menu" |
| 67 | + > |
| 68 | + <span aria-hidden="true">☰</span> |
| 69 | + <span>Menu</span> |
| 70 | + </button> |
| 71 | + |
| 72 | + <nav id="primary-nav" aria-label="Primary"> |
61 | 73 | <a href="#why">Why</a> |
62 | 74 | <a href="#what">What</a> |
63 | 75 | <a href="#quickstart">How</a> |
64 | 76 | <a href="#features">Features</a> |
65 | 77 | <a href="#faq">FAQ</a> |
66 | 78 | <a href="/docs/index.html">Docs</a> |
| 79 | + <a class="button button-primary mobile-github" href="https://github.com/PredictabilityAtScale/promptopskit">GitHub</a> |
67 | 80 | </nav> |
68 | | - <a class="button button-primary" href="https://github.com/PredictabilityAtScale/promptopskit">GitHub</a> |
| 81 | + |
| 82 | + <a class="button button-primary desktop-github" href="https://github.com/PredictabilityAtScale/promptopskit">GitHub</a> |
69 | 83 | </div> |
70 | 84 | </header> |
71 | 85 |
|
@@ -349,5 +363,38 @@ <h2>Repo-native, not dashboard-native</h2> |
349 | 363 | <p><a href="https://github.com/PredictabilityAtScale/promptopskit">GitHub</a></p> |
350 | 364 | </div> |
351 | 365 | </footer> |
| 366 | + <script> |
| 367 | + (() => { |
| 368 | + const header = document.querySelector('.site-header'); |
| 369 | + const toggle = document.querySelector('.menu-toggle'); |
| 370 | + const nav = document.getElementById('primary-nav'); |
| 371 | + |
| 372 | + if (!header || !toggle || !nav) return; |
| 373 | + |
| 374 | + const closeMenu = () => { |
| 375 | + header.classList.remove('is-menu-open'); |
| 376 | + toggle.setAttribute('aria-expanded', 'false'); |
| 377 | + }; |
| 378 | + |
| 379 | + toggle.addEventListener('click', () => { |
| 380 | + const isOpen = header.classList.toggle('is-menu-open'); |
| 381 | + toggle.setAttribute('aria-expanded', isOpen ? 'true' : 'false'); |
| 382 | + }); |
| 383 | + |
| 384 | + nav.querySelectorAll('a').forEach((link) => { |
| 385 | + link.addEventListener('click', () => { |
| 386 | + if (window.matchMedia('(max-width: 900px)').matches) { |
| 387 | + closeMenu(); |
| 388 | + } |
| 389 | + }); |
| 390 | + }); |
| 391 | + |
| 392 | + window.addEventListener('resize', () => { |
| 393 | + if (!window.matchMedia('(max-width: 900px)').matches) { |
| 394 | + closeMenu(); |
| 395 | + } |
| 396 | + }); |
| 397 | + })(); |
| 398 | + </script> |
352 | 399 | </body> |
353 | 400 | </html> |
0 commit comments