mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
feat(nav): resume entry in the bar with a shared language dialog
ResumeNavButton is the third item in .nav-brand, right after the home icon: a 44px icon target named by strings.nav.resume, aria-haspopup=dialog on its own #resume-modal-nav, gated on resumeAvailable. The picker markup is no longer duplicated. ResumeDialog owns the overlay, panel and resumeLanguages options and takes a dialogId, so the hero keeps #resume-modal and the bar gets #resume-modal-nav. useResumeDialog holds the state both triggers share: open flag, container/trigger/panel refs, click-outside (close guarded on openRef, because the listener is live while closed and otherwise steals focus on every page click), Escape, body-overflow lock and focus return. Panel focus moved from onAnimationComplete to a one-frame effect: AnimatePresence keeps open=true on the exiting copy, so the old handler refired at the end of the exit and stranded focus on <body>. resumeAvailable now gates the leaf components, so Hero renders <DownloadResume /> plainly.
This commit is contained in:
1 parent
25b0ead76a
commit
4f1d4ebe30
8 files changed
+224
-90
No files matched your search
@@ -9,6 +9,7 @@ import { RollingTextLink } from '@/components/ui/RollingTextLink'
|
||||
import { ThemePaletteMenu } from '@/components/layout/ThemePaletteMenu'
|
||||
import { LanguageIcon } from '@/components/ui/LanguageIcon'
|
||||
import { MobileMenu } from '@/components/layout/MobileMenu'
|
||||
import { ResumeNavButton } from '@/components/layout/ResumeNavButton'
|
||||
|
||||
export function Navigation() {
|
||||
const { cycleTheme, resolvedTheme } = useTheme()
|
||||
@@ -107,6 +108,9 @@ export function Navigation() {
|
||||
<polyline points="9 22 9 12 15 12 15 22" />
|
||||
</svg>
|
||||
</Link>
|
||||
{/* Resume lives next to home: it is a site-wide action, not an appearance control, so
|
||||
it belongs in the brand group and stays put when the sheet takes over the bar. */}
|
||||
<ResumeNavButton />
|
||||
</div>
|
||||
|
||||
<ul className="nav-menu">
|
||||
|
||||
Reference in new issue
Block a user