refactor(layout): 统一布局边距配置,改用百分比

- layoutConfig.js: LAYOUT_PADDING.x 改为 { base: 4, md: 6, lg: '12%' }
- HomeNavbar.js: 导入 LAYOUT_PADDING,替换硬编码边距
- AppFooter.js: 导入 LAYOUT_PADDING,替换硬编码边距

现在导航栏、内容区、页脚统一使用 LAYOUT_PADDING.x 配置,
修改边距只需调整 layoutConfig.js 一处即可全局生效。

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
zdl
2025-12-25 12:59:31 +08:00
parent ccbef35cf3
commit 54c8ec3660
3 changed files with 7 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
import React from 'react';
import { Box, VStack, HStack, Text, Link, useColorModeValue } from '@chakra-ui/react';
import RiskDisclaimer from '../components/RiskDisclaimer';
import { LAYOUT_PADDING } from './config/layoutConfig';
/**
* 应用通用页脚组件
@@ -8,7 +9,7 @@ import RiskDisclaimer from '../components/RiskDisclaimer';
*/
const AppFooter = () => {
return (
<Box bg={useColorModeValue('gray.100', 'gray.800')} py={2} px={{ base: 4, md: 6, lg: '80px' }}>
<Box bg={useColorModeValue('gray.100', 'gray.800')} py={2} px={LAYOUT_PADDING.x}>
<VStack spacing={1}>
<RiskDisclaimer />
<Text color="gray.500" fontSize="sm">