feat: Optimize UI layout with fixed navigation and scrollable content
Layout Optimization: - Fixed navigation bar at the top with sticky positioning - Main content area now properly scrollable with flex layout - Improved overall page structure for better UX Scrolling Enhancements: - Added custom scrollbar styling for better visual appeal - Implemented smooth scrolling behavior across the application - Optimized scroll areas in ProjectDetails, TemplateManagement, AiClassificationSettings, and ModelList - Added proper overflow handling for long content lists Visual Improvements: - Beautiful custom scrollbars with hover effects - Proper height constraints for content areas (calc(100vh-16rem)) - Enhanced scrolling experience with backdrop blur effects - Added scroll indicators and shadow effects for better UX Responsive Design: - Mobile-optimized scrolling behavior - Proper touch scrolling on mobile devices - Adaptive content heights for different screen sizes - Maintained accessibility with reduced motion support Technical Improvements: - Fixed JSX syntax errors in TemplateManagement and ModelList - Improved component structure for better maintainability - Added comprehensive CSS classes for scroll management - Enhanced performance with optimized overflow handling All pages now provide a smooth, professional scrolling experience while keeping the navigation always accessible.
This commit is contained in:
@@ -62,20 +62,22 @@ function App() {
|
||||
|
||||
return (
|
||||
<Router>
|
||||
<div className="min-h-screen bg-gradient-to-br from-gray-50 via-white to-gray-50">
|
||||
{/* 导航栏 */}
|
||||
<div className="h-screen flex flex-col bg-gradient-to-br from-gray-50 via-white to-gray-50">
|
||||
{/* 固定的导航栏 */}
|
||||
<Navigation />
|
||||
|
||||
{/* 主要内容区域 */}
|
||||
<main className="container mx-auto px-4 sm:px-6 lg:px-8 py-4 sm:py-6 lg:py-8 max-w-7xl">
|
||||
<Routes>
|
||||
<Route path="/" element={<ProjectList />} />
|
||||
<Route path="/project/:id" element={<ProjectDetails />} />
|
||||
<Route path="/models" element={<Models />} />
|
||||
<Route path="/ai-classification-settings" element={<AiClassificationSettings />} />
|
||||
<Route path="/templates" element={<TemplateManagement />} />
|
||||
<Route path="/material-model-binding" element={<MaterialModelBinding />} />
|
||||
</Routes>
|
||||
{/* 可滚动的主要内容区域 */}
|
||||
<main className="flex-1 overflow-y-auto smooth-scroll">
|
||||
<div className="container mx-auto px-4 sm:px-6 lg:px-8 py-4 sm:py-6 lg:py-8 max-w-7xl min-h-full">
|
||||
<Routes>
|
||||
<Route path="/" element={<ProjectList />} />
|
||||
<Route path="/project/:id" element={<ProjectDetails />} />
|
||||
<Route path="/models" element={<Models />} />
|
||||
<Route path="/ai-classification-settings" element={<AiClassificationSettings />} />
|
||||
<Route path="/templates" element={<TemplateManagement />} />
|
||||
<Route path="/material-model-binding" element={<MaterialModelBinding />} />
|
||||
</Routes>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{/* 创建项目模态框 */}
|
||||
|
||||
Reference in New Issue
Block a user