Commit Graph

17 Commits

Author SHA1 Message Date
b6f0bd1d69 Fix search modal z-index and improve text readability
- Use React Portal to render modal at document body level to avoid stacking context issues
- Increase z-index to z-[9999] to ensure modal appears on top of all content
- Add cleanup function to prevent duplicate Pagefind initializations
- Replace CSS class overrides with CSS variables for better maintainability
- Enhance search result text colors for improved readability in both light and dark modes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 02:46:54 +08:00
2c9d5ed650 Add full-text search with Chinese tokenization using Pagefind
Integrated Pagefind for static site search with built-in Chinese word segmentation support.

Changes:
1. **Installed Pagefind** (v1.4.0) as dev dependency
2. **Updated build script** to run Pagefind indexing after Next.js build
   - Indexes all 69 pages with 5,711 words
   - Automatic Chinese (zh-tw) language detection
3. **Created search modal component** (components/search-modal.tsx)
   - Dynamic Pagefind UI loading (lazy-loaded on demand)
   - Keyboard shortcuts (Cmd+K / Ctrl+K)
   - Chinese translations for UI elements
   - Dark mode compatible styling
4. **Added search button to header** (components/site-header.tsx)
   - Integrated SearchButton with keyboard shortcut display
   - Modal state management
5. **Custom Pagefind styles** (styles/globals.css)
   - Tailwind-based styling to match site design
   - Dark mode support
   - Highlight styling for search results

Features:
-  Full-text search across all blog posts and pages
-  Built-in Chinese word segmentation (Unicode-based)
-  Mixed Chinese/English query support
-  Zero bundle impact (20KB lazy-loaded on search activation)
-  Keyboard shortcuts (⌘K / Ctrl+K)
-  Search result highlighting with excerpts
-  Dark mode compatible

Technical Details:
- Pagefind runs post-build to index .next directory
- Search index stored in .next/pagefind/
- Chinese segmentation works automatically via Unicode boundaries
- No third-party services or API keys required

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 00:10:26 +08:00
a249a120a5 Stage all layout updates 2025-11-19 17:38:45 +08:00
77bd180d97 Remove animated timeline dot 2025-11-19 01:55:56 +08:00
eefc38d562 Add glow and animation to timeline 2025-11-19 01:46:37 +08:00
82a459bede Restyle blockquotes with academic flair 2025-11-19 00:47:28 +08:00
af0d2e3a6c Formalize font weight hierarchy 2025-11-19 00:42:53 +08:00
9235ab291b Expand system font stack for multilingual UI 2025-11-19 00:37:12 +08:00
dc5ca97fee Add fluid typography scale and responsive headings 2025-11-19 00:22:09 +08:00
3509b43643 Inline TOC list style overrides 2025-11-18 23:49:08 +08:00
6ca024b0ba Force TOC list styles with !important 2025-11-18 23:47:47 +08:00
9d86cd4663 Force TOC markers to be hidden 2025-11-18 23:46:20 +08:00
31f1c6979d Ensure TOC items have no default bullets 2025-11-18 23:44:24 +08:00
b69755c2d6 Force TOC list to remove default bullets 2025-11-18 23:41:37 +08:00
80d0b236c5 Refine navigation and post UI 2025-11-18 17:34:05 +08:00
675f5de74f Narrow content width and slightly increase base typography size 2025-11-17 22:08:26 +08:00
0c64279e34 Initial commit 2025-11-17 15:28:20 +08:00