feat: add global search, mobile drawer navigation, and View Transitions fixes#44
Merged
Conversation
Signed-off-by: dongjiang <dongjiang1989@126.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
lyj715824
approved these changes
Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ctrl+K/⌘Ksearch modal powered by Fuse.js with lazy-loaded build-time index (/search-index.json), fuzzy matching across blog posts, projects, adopters, events, and staticpages, bilingual support (zh/en), keyboard navigation, match highlighting, and View Transitions compatibility
ESC/backdrop/link-click dismiss, and auto-close on desktop resize
transform: scale()with JS dynamic wrapper height to eliminate excess scroll space on mobileChanges
Added
SearchModal.astro— global search with Fuse.js, lazy-loaded index, grouped results,<mark>highlighting, ↑↓/Enter/EscSearchButton.astro— header search trigger buttonsearch-index.json.ts— build-time endpoint aggregating 5 content sources (posts, projects, adopters, events, pages)AdopterModal.astro— Layout-level adopter detail modal with hash routing and retry mechanismevents.ts— shared event data source for events page and search index#mobile-drawer) with tree-structured nav, connector dots, backdrop blurdata.icon→<img>, fallback → gradient circle)Changed
Header.astro— mobile drawer with tree nav;ToggleTheme/ToggleLanguagewrapped inhidden md:flexLayout.astro— includeAdopterModalat Layout levelBasicScripts.astro— remove conflicting mobile menu handlers (h-screen/bg-page/overflow-hidden)adopters.astro— remove inline modal HTML/JS (moved toAdopterModal.astro)landscape.astro— JSscaleLandscape()with dynamic wrapper height on resize/swapnavigation.ts— addhrefto "博客" nav link.cache/— refresh project stats (⭐18,727) and contributors (170 from 60 repos)Fixed
refreshRefs()+attachElementListeners()loadAdopterData()on every open +astro:after-swappreventDefault()+ manualwindow.location.hasharia-hiddenfocus warning →blur()before hiding modalhiddenclass toggle in BasicScriptshidden md:flexwrapper divshref: getBlogPermalink()is:inlineto AdopterModal JSON script, removed deprecatedposition="right"Which issue(s) this PR fixes:
Fixes #
Special notes for reviewers:
Add global search, mobile drawer navigation, and View Transitions fixes