Jotley / website / src / app / components / SiteHeader.tsx
| 1 | 'use client'; |
| 2 | |
| 3 | import './home/home.css'; |
| 4 | import Link from 'next/link'; |
| 5 | import { sendGAEvent } from '@/app/utils/analytics'; |
| 6 | import ThemeSwitcher from './ThemeSwitcher'; |
| 7 | import { TestFlightNavLink } from './TestFlightButton'; |
| 8 | |
| 9 | /** |
| 10 | * Shared sticky glass nav for every page. Must live inside a `.jt-home` |
| 11 | * wrapper so the scoped styles + tokens apply. Section links are absolute |
| 12 | * (`/#…`) so they work from any route. |
| 13 | * |
| 14 | * The primary action follows the visitor's likely device: "Download for Mac" |
| 15 | * on wide screens, the TestFlight beta on phone-sized screens. |
| 16 | */ |
| 17 | export default function SiteHeader() { |
| 18 | return ( |
| 19 | <header className="nav"> |
| 20 | <div className="wrap nav-in"> |
| 21 | <Link href="/" className="brand"> |
| 22 | <img src="/jotley-logo.png" alt="Jotley" /> |
| 23 | <span>Jotley</span> |
| 24 | </Link> |
| 25 | <nav className="nav-links" aria-label="Primary"> |
| 26 | <Link href="/#how">How it works</Link> |
| 27 | <Link href="/#walkthrough">Tutorials</Link> |
| 28 | <Link href="/#features">Features</Link> |
| 29 | <Link href="/#free">Free & open source</Link> |
| 30 | </nav> |
| 31 | <div className="nav-cta"> |
| 32 | <ThemeSwitcher /> |
| 33 | <Link |
| 34 | href="/download" |
| 35 | className="nav-get nav-get-mac" |
| 36 | onClick={() => sendGAEvent('download_click_mac', { location: 'nav' })} |
| 37 | > |
| 38 | <svg width={15} height={15} viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.8-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z" /></svg> |
| 39 | Download for Mac |
| 40 | </Link> |
| 41 | <TestFlightNavLink /> |
| 42 | </div> |
| 43 | </div> |
| 44 | </header> |
| 45 | ); |
| 46 | } |