From 973e0ea3f506a702264a0c74d589c880ea2ffdf2 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Tue, 11 Nov 2025 13:13:00 +0800 Subject: [PATCH] refactor: adjust layout dimensions for consistent width and height MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Changes: 1. **Hero Section Layout** (commonHome.tsx) - Changed `lg:items-start` → `lg:items-stretch` for equal height alignment - Added `min-h-full` to hero content column for full height - Ensures Sidebar height matches ProductMatrix height 2. **Content Section Layout** (commonHome.tsx) - When Sidebar present, uses matching grid structure from hero section - Grid: `grid-cols-[minmax(0,1fr)_360px]` (same as hero) - Content slots span full width with hidden spacer for visual balance - CommunityFeed now matches total width of (ProductMatrix + Sidebar) 3. **Sidebar Component** (Sidebar.tsx) - Added `h-full` and `flex flex-col` for full height support - Maintains sticky positioning while filling available space 4. **HomepageLanding** (page.tsx) - Applied same height adjustment: `lg:items-stretch` + `min-h-full` - Consistent with template version layout ### Result: - Sidebar height = Hero section height (full height alignment) - CommunityFeed width = ProductMatrix width + Sidebar width - Visual consistency across hero and content sections - Both homepage versions (template and direct) have identical layout 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- dashboard/src/components/home/Sidebar.tsx | 2 +- dashboard/src/modules/homepage/page.tsx | 4 +- .../modules/templates/layouts/commonHome.tsx | 75 +++++++++++++------ 3 files changed, 57 insertions(+), 24 deletions(-) diff --git a/dashboard/src/components/home/Sidebar.tsx b/dashboard/src/components/home/Sidebar.tsx index a27c733..867cc6e 100644 --- a/dashboard/src/components/home/Sidebar.tsx +++ b/dashboard/src/components/home/Sidebar.tsx @@ -75,7 +75,7 @@ export default function Sidebar() { const data = sidebarContent[language] return ( -