accounts/rag-server
Haitao Pan 0a55d3c4a1 refactor: move Sidebar to hero section with two-column layout
### Layout Changes:
1. **Homepage Layout Restructure** (`src/modules/homepage/page.tsx`)
   - Changed hero section to two-column grid: `lg:grid-cols-[minmax(0,1fr)_360px]`
   - Moved Sidebar component to right side of hero section (360px width)
   - Hero content now spans left column with full-width appearance
   - Sidebar is sticky on large screens: `lg:sticky lg:top-0`
   - Maintains consistent width between upper and lower sections

2. **Template System Updates**
   - Removed Sidebar from `HomePageTemplateSlots` type (`src/modules/templates/types.ts`)
   - Updated `defaultHomeLayoutConfig` to remove Sidebar from content slots
   - Updated default template to remove Sidebar registration
   - Updated `app/page.tsx` to pass only ProductMatrix and CommunityFeed slots

3. **Sidebar Component Conversion** (`src/components/home/Sidebar.tsx`)
   - Converted from Server Component to Client Component
   - Added 'use client' directive to enable useLanguage hook
   - Replaced dynamic CMS content with static bilingual content
   - Hardcoded sections: 社区热议, 推荐资源, 热门标签
   - Maintains same visual structure and styling

4. **Homepage Module Cleanup** (`src/modules/homepage/page.tsx`)
   - Removed unused `getHomepagePosts` import (was causing fs error in client)
   - Kept useLanguage hook for internationalization support
   - Sidebar now works as client component alongside homepage

### Technical Details:
- Grid layout: Two columns on large screens (hero + sidebar)
- Sidebar width: Fixed 360px, sticky positioning
- Hero content: Flexible width with max-w-6xl constraint
- Visual consistency: Upper and lower sections maintain same max-width
- Component architecture: All client components, no server-client mixing

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 13:06:49 +08:00
..
api Move RAG module under rag-server (#526) 2025-10-15 13:27:37 +08:00
cmd feat(auth): implement rag-server remote auth middleware 2025-11-05 21:01:20 +08:00
config feat(auth): implement rag-server remote auth middleware 2025-11-05 21:01:20 +08:00
internal refactor: move Sidebar to hero section with two-column layout 2025-11-11 13:06:49 +08:00
migrations Refactor server layout to rag-server (#525) 2025-10-15 13:04:58 +08:00
proxy Refactor server layout to rag-server (#525) 2025-10-15 13:04:58 +08:00
sql refactor(postgresql): replace zhparser+scws with pg_jieba; update Makefile and setup scripts 2025-10-30 15:16:32 +08:00
cors.go Refactor server layout to rag-server (#525) 2025-10-15 13:04:58 +08:00
Makefile update rag-server/Makefile 2025-10-15 14:36:37 +08:00
server.go Refactor server layout to rag-server (#525) 2025-10-15 13:04:58 +08:00