Commit Graph

213 Commits

Author SHA1 Message Date
08117a11c5 feat: client-side Mermaid diagram rendering with interactive viewer
Render mermaid code blocks as SVG diagrams instead of syntax-highlighted
source code. Includes a full pan/zoom viewer with drag, scroll wheel zoom,
pinch-to-zoom, fit-to-view, and fullscreen support. Theme-aware (dark/light).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:29:53 +08:00
6ac6ea5545 Update content submodule
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:05:12 +08:00
bdd42b9d26 feat: display Mastodon post media inline (images, video, gif)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-14 09:57:00 +08:00
f7f2451357 feat: HomeLab CSS art hero with Proxmox, Switch, NAS
- Add homelab-device-hero component (Proxmox VE + Router icon, Switch, TrueNAS)
- Dashed lines for network connections between devices
- Custom not-found page (replace Next.js 404)
- Homelab page uses CSS hero instead of feature image

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-14 09:38:56 +08:00
8d08383391 style: reduce empty space on dev-env page
- Tighter vertical spacing (space-y-4, smaller header margins)
- Larger device mockup at all breakpoints (up to 700px monitor)
- Wider content area (max-w-5xl) for dev-env page
- Less padding in device hero section

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-14 08:39:15 +08:00
1077c76366 style: responsive design for dev-env device hero on large screens
- Scale monitor, desk, keyboard, Mac mini proportionally at 1024/1280/1536px
- Increase terminal window, logos, and font sizes on larger viewports
- Scale bezel, stand, screen inset for consistent proportions

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-14 08:19:39 +08:00
a09b7505be feat: dev-env page - Mac mini + 螢幕 mockup with Arch/Ubuntu/Linux SVG logos
- Add DevEnvDeviceHero component with 3D device mockup
- Terminal window displays Arch, Ubuntu, Tux logos (react-icons Simple Icons)
- 4:3 screen ratio, taller display for full logo visibility
- Remove dock for cleaner layout

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-14 00:43:16 +08:00
240d44842a chore: add browser optimizations
- Add browserslist (Chrome 111+, Edge 111+, Firefox 111+, Safari 16.4+)
- Add loading=lazy and decoding=async to markdown images for better LCP

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-14 00:09:59 +08:00
d5ea352775 perf: frame-rate independent animation + Scroll-Driven progress bar
- MatrixRain: add delta time for consistent speed across 60/120/144Hz displays
- ReadingProgress: use Scroll-Driven Animations API with JS fallback
- Fallback to scroll events for unsupported browsers (Firefox) and prefers-reduced-motion

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-14 00:02:35 +08:00
f185048abc feat: improve Mastodon feed loading animation with shimmer and stagger
- Replace animate-pulse with shimmer wave effect
- Add staggered animation-delay for cascade feel
- Light/dark mode gradients with Mastodon purple accent
- Respect prefers-reduced-motion for accessibility

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 23:56:16 +08:00
8170fa0aa5 style: terminal adapts to light/dark mode
- Light: slate-100 bg, slate-300 border, emerald-600 accent
- Dark: slate-900 bg, slate-700 border, emerald-400 accent

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 23:48:28 +08:00
fe28262ef4 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>
2026-02-13 23:41:10 +08:00
7d85446ac5 feat: add page transition animations and loading indicators
- Add nextjs-toploader for instant top progress bar on navigation
- Add next-view-transitions for View Transitions API page transitions
- Enhance template.tsx page enter animation (0.45s, scale effect)
- Replace next/link with next-view-transitions Link for smooth transitions
- Add prefers-reduced-motion support for accessibility

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 23:07:51 +08:00
a4e88fa506 style: make terminal hero responsive on wider screens
- Hero: responsive max-width (2xl→3xl→4xl→5xl) and min-height
- Terminal: responsive font size (sm→base→lg), padding, title bar

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 22:54:42 +08:00
62d5973e1f fix: move sidebar FAB to bottom-left to avoid overlap with back-to-top
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 22:47:18 +08:00
42a1d3cbbe feat: add Matrix rain + terminal hero with typing effect
- Matrix rain animation on homepage load (duration tied to page load)
- Sequential transition to terminal window with typing effect
- cat welcome.txt → title & tagline
- fastfetch → dual eagle-eye ASCII art (霍德爾之目)
- prefers-reduced-motion support
- SEO: sr-only h1 for accessibility

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 22:44:24 +08:00
d27cc01c87 feat: add mobile sidebar access via FAB and slide-over drawer
- Extract RightSidebarContent for reuse in desktop and mobile
- Add floating action button (FAB) on narrow screens to open sidebar
- Slide-over drawer from right with author card, Mastodon feed, tags
- Lazy load Mastodon feed when drawer opens (forceLoadFeed prop)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 22:03:13 +08:00
8a4ecf9634 Add repo card component and GitHub language colors for projects page
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 21:45:45 +08:00
27dc2db3ee Update posts per page to 7, layout and sidebar changes
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 21:21:25 +08:00
fde17c2308 feat: add GitHub projects page
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 16:59:56 +08:00
2402c94760 perf: 全面優化部落格載入速度與效能
- 字體載入優化:添加 preconnect 到 Google Fonts,優化載入順序
- 元件延遲載入:RightSidebar、MastodonFeed、PostToc、BackToTop 使用動態載入
- 圖片優化:添加 blur placeholder,首屏圖片添加 priority,優化圖片尺寸配置
- 快取策略:為 HTML 頁面、OG 圖片、RSS feed 添加快取標頭
- 程式碼分割:確保路由層級分割正常,延遲載入非關鍵元件
- 效能監控:添加 WebVitals 元件追蹤基本效能指標
- 連結優化:為重要連結添加 prefetch 屬性

預期效果:
- FCP 減少 20-30%
- LCP 減少 30-40%
- CLS 減少 50%+
- TTI 減少 25-35%
- Bundle Size 減少 15-25%

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 16:18:51 +08:00
62090c7742 perf: 优化字体加载性能和字间距
- 添加 adjustFontFallback: false 优化 CLS(累积布局偏移)
- 调整霞鹜文楷字间距:从负值改为正值,让手写风格字体更自然
  - h1: -0.03em → 0.01em
  - h2: -0.02em → 0.015em
  - type-display: 添加 0.01em
  - type-title: 0.02em → 0.025em
- 改善字体加载时的视觉稳定性

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 16:08:26 +08:00
a9bd56b658 feat: 将霞鹜文楷也应用到文章内 h2 标题
- 统一文章内所有标题层级的字体风格
- 保持视觉一致性

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 16:01:28 +08:00
e8666d19ee feat: 扩展霞鹜文楷字体到所有主标题级别
- 应用到 .type-title(页面标题、站点标题)
- 应用到 .type-subtitle(区块副标题)
- 应用到全局 h1 和 h2(所有主标题级别)
- 保持卡片标题、导航、正文等使用系统字体
- 统一大标题层级的视觉风格

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 16:01:21 +08:00
2229f6bb6f feat: 添加霞鹜文楷字体到文章主标题
- 使用 Google Fonts 的 LXGW WenKai TC 字体
- 仅应用到文章主标题 (.prose h1 和 .type-display)
- 只加载 Regular (400) 和 Bold (700) 字重以优化性能
- 添加字体子集化脚本(可选,用于本地字体文件)
- 保持系统字体作为 fallback

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 15:05:00 +08:00
ed63ec7d9a Remove unnecessary Partial Prerendering (PPR) configuration
- Remove cacheComponents: true from next.config.mjs
- Update README.md to remove PPR references
- All pages are fully static-generated, PPR provides no benefit

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 14:57:08 +08:00
5a80567117 Fix sidebar personal info section turning white on hover in dark mode
Added dark:hover:bg-slate-800/80 to prevent the light hover:bg-slate-50
from overriding the dark background.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 20:14:41 +08:00
614d8dd5aa Update content submodule: fix article line breaks
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 15:04:14 +08:00
31b5821532 Migrate to Tailwind CSS v4 with CSS-first configuration
- Replace tailwindcss v3 + autoprefixer with tailwindcss v4 + @tailwindcss/postcss
- Migrate tailwind.config.cjs theme to @theme block in globals.css
- Add @custom-variant dark for class-based dark mode (next-themes)
- Load typography plugin via @plugin directive, replace prose-dark with prose-invert
- Convert prose dark mode overrides from JS config to CSS (.dark .prose rules)
- Add @source directive for content submodule detection
- Replace postcss.config.cjs with postcss.config.mjs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 14:55:43 +08:00
661b67cc01 Fix PPR empty generateStaticParams error and update dependencies
- Add placeholder fallback to generateStaticParams for cacheComponents compatibility
- Update npm packages within semver range (next 16.1.6, react 19.2.4, shiki 3.22.0, etc.)
- Add /new-post skill for blog publishing workflow
- Update CLAUDE.md with git remote mirroring docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 14:39:17 +08:00
9c7f2463aa Add new post and update CLAUDE.md with deployment docs
- New post: 不是所有眼淚,都該被濃縮成重點
- CLAUDE.md: add deployment workflow and content submodule instructions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 12:50:36 +08:00
ce4245c148 Revert "Migrate to HeroUI v3 and Tailwind CSS v4"
This reverts commit 6a9296f33d.
2026-01-23 02:46:02 +08:00
6a9296f33d Migrate to HeroUI v3 and Tailwind CSS v4
- Upgrade from Tailwind CSS v3 to v4 with CSS-first configuration
- Install HeroUI v3 beta packages (@heroui/react, @heroui/styles)
- Migrate PostCSS config to new @tailwindcss/postcss plugin
- Convert tailwind.config.cjs to CSS @theme directive in globals.css
- Replace @tailwindcss/typography with custom prose styles

Component migrations:
- theme-toggle, back-to-top: HeroUI Button with onPress
- post-card, post-list-item: HeroUI Card compound components
- right-sidebar: HeroUI Card, Avatar, Chip
- search-modal: HeroUI Modal with compound structure
- nav-menu: HeroUI Button for mobile controls
- post-list-with-controls: HeroUI Button for sorting/pagination

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 17:47:36 +08:00
1cd9106ad0 Add CLAUDE.md for Claude Code session context
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 15:19:20 +08:00
35df76cd13 Fix Mastodon widget line breaks not displaying
Added whitespace-pre-line CSS class to preserve line breaks in
Mastodon post content. Previously, newline characters were being
collapsed into single spaces by default HTML whitespace handling.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-14 12:43:18 +08:00
ee2eb4796e SECURITY: Update Next.js and React to patch critical RCE vulnerability
Addresses CVE-2025-55182 (React) and CVE-2025-66478 (Next.js)
- CVSS Score: 10.0 (Critical)
- Allows unauthenticated remote code execution via RSC payloads

Updates:
- Next.js: 16.0.3 → 16.0.7
- React: 19.2.0 → 19.2.1
- react-dom: 19.2.0 → 19.2.1

References:
- https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components
- https://nextjs.org/blog/CVE-2025-66478

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 21:57:55 +08:00
d90442456b Partial Lecture Updatee 2025-11-25 00:47:32 +08:00
b17930c10b Update content submodule to 5b1737e 2025-11-23 23:56:37 +08:00
1f3323834e Update navigation layout and assets 2025-11-21 14:51:24 +08:00
7cdfb90b1b Portal mobile TOC overlay to stay floating 2025-11-21 01:48:10 +08:00
f6c5be0ee4 Slim reading progress bar 2025-11-21 01:44:23 +08:00
fc24ddb676 Portal reading progress bar above all layers 2025-11-21 01:42:49 +08:00
cafb810155 Make reading progress bar prominent 2025-11-21 01:40:06 +08:00
ae37f93508 Raise reading progress bar above header 2025-11-21 01:36:04 +08:00
4a4d6dd933 Refine typography palette and dark heading colors 2025-11-21 01:29:57 +08:00
7bf2c4149d Add hover delay to nav dropdown 2025-11-21 01:20:48 +08:00
9d7a6757c9 Raise nav dropdown z-index 2025-11-21 01:17:21 +08:00
d03b061c1e Keep dropdown nav open while hovering 2025-11-21 01:15:28 +08:00
d768d108d6 Add nested navigation groups 2025-11-21 01:10:15 +08:00
7685c79705 Fix TOC duplication when navigating 2025-11-21 00:39:56 +08:00