feat: launcher-style search UI (Raycast/Spotlight)
- Replace Pagefind UI with cmdk + Pagefind low-level API - Quick actions when empty: nav (home, blog, tags) + recent posts - Debounced full-text search with keyboard navigation - Pass recent posts from layout to SearchModal - Extract cn utility to lib/utils.ts - Remove Pagefind UI styles, add Radix overlay styling - Align blog search bar styling with launcher Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -15,7 +15,11 @@ const SearchModal = dynamic(
|
||||
{ ssr: false }
|
||||
);
|
||||
|
||||
export function SiteHeader() {
|
||||
interface SiteHeaderProps {
|
||||
recentPosts?: { title: string; url: string }[];
|
||||
}
|
||||
|
||||
export function SiteHeader({ recentPosts = [] }: SiteHeaderProps) {
|
||||
const [isSearchOpen, setIsSearchOpen] = useState(false);
|
||||
const pages = allPages
|
||||
.slice()
|
||||
@@ -93,6 +97,7 @@ export function SiteHeader() {
|
||||
<SearchModal
|
||||
isOpen={isSearchOpen}
|
||||
onClose={() => setIsSearchOpen(false)}
|
||||
recentPosts={recentPosts}
|
||||
/>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user