Searching now has three peer modes on /stops: by stop code, by place name,
and by device location.
- StopsView: third tab (data-mode=near) plus its own panel holding the
location button, hint and result area; the button no longer sits in the
toolbar with Search/Reset/Back
- stops.search.ts: setMode handles the near mode, disables the other panels,
hides the full stop list while the ranked results are shown, and skips
filtering in that mode
- stops.nearme.ts: applies the security gate - the tab is revealed only when
window.isSecureContext && navigator.geolocation exist, otherwise it is
hidden and any active near mode falls back to stop-code search
- i18n: stops.modeNear / nearCta / nearHint (th + en, both copies)
Distance is computed from each stop's own coordinates (busstop_list.json)
against the device position, sorted nearest first.
Verified: secure context shows all three tabs and returns a ranked map;
a forced insecure context hides the tab and refuses the mode.
The topbar carried five small buttons in a row (3 theme + 2 language).
Replaced with two single buttons that open their own popover menu:
- ThemeSwitch: single icon button showing the active mode, menu with
light/dark/auto as menuitemradio
- LangSwitch: new component showing the active code (ไทย / EN), menu
keeps the existing [data-i18n-switch] mechanism from i18n.ts
- .mu-topbar-tools wrapper, 8px gap (WCAG 2.5.8), 40px buttons / 44px on touch
- popovers close on select, outside click and Escape (focus returns to button)
Also fixed two bugs found on /stops:
- .mu-btn.outline had no CSS rule, so the browser painted a light grey
background that ignored the dark theme
- deleted the unused StopSearch component which still carried the old
number pad and its delete key, plus the now-unused stops.padDelete key
Verified at 375px: no horizontal overflow, buttons 40x40 and 59x40,
8px gap; menus open/close correctly in both themes.
- src/lib/site.ts: single source for site name/url/description (rename via env only)
- src/app/robots.ts: allow all, disallow /api /files, explicit Googlebot/Bingbot/DuckDuckBot/Bravebot/Applebot
- src/app/sitemap.ts: static pages + routes/check/stops from backend, falls back to static when API is down
- src/components/JsonLd.tsx: WebSite + Organization + SearchAction, BreadcrumbList, BusStop, Service
- layout.tsx: metadataBase, canonical, keywords, robots, openGraph, twitter
- generateMetadata for /stops/[code], /routes/[routeId], /check/[routeId]
- canonical + description on /stops /routes /blog /about /credits
- public/og-image.png 1200x630