1 Commits
Author SHA1 Message Date
zimonianhua 3d6ba87546 style(ui): 优化页面布局与视觉样式
- 为 Header 组件添加 fixed 定位,并调整 body 顶部内边距
- 为主内容区域增加内边距和最大宽度限制以提升可读性
- 为多个 Segment 组件添加 basic 属性以移除背景和阴影
- 新增 CSS 工具类 `neu-no-shadow` 用于透明化元素
- 优化按钮间距、菜单项悬停效果及活动状态样式
2026-02-11 14:29:26 +08:00
4 changed files with 32 additions and 6 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ const Footer = () => {
}); });
return ( return (
<Segment vertical> <Segment vertical basic>
<Container textAlign='center'> <Container textAlign='center'>
{Footer === '' ? ( {Footer === '' ? (
<div className='custom-footer'> <div className='custom-footer'>
+1 -1
View File
@@ -168,7 +168,7 @@ const Header = () => {
return ( return (
<> <>
<Menu borderless style={{ borderTop: 'none' }}> <Menu borderless fixed='top' style={{ borderTop: 'none' }}>
<Container> <Container>
<Menu.Item as={Link} to='/' className={'hide-on-mobile'}> <Menu.Item as={Link} to='/' className={'hide-on-mobile'}>
<img src='/logo.png' alt='logo' style={{ marginRight: '0.75em' }} /> <img src='/logo.png' alt='logo' style={{ marginRight: '0.75em' }} />
+29 -3
View File
@@ -13,7 +13,7 @@
body { body {
margin: 0; margin: 0;
padding-top: 55px; padding-top: 70px; /* Increased for better header separation */
overflow-y: scroll; overflow-y: scroll;
font-family: Lato, 'Helvetica Neue', Arial, Helvetica, "Microsoft YaHei", sans-serif; font-family: Lato, 'Helvetica Neue', Arial, Helvetica, "Microsoft YaHei", sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
@@ -32,7 +32,9 @@ code {
} }
.main-content { .main-content {
padding: 4px; padding: 24px; /* Increased padding */
max-width: 1200px; /* Limit width for better readability */
margin: 0 auto;
} }
.small-icon .icon { .small-icon .icon {
@@ -87,6 +89,13 @@ a:hover {
border-radius: 50% !important; border-radius: 50% !important;
} }
/* New Helper to remove shadow */
.neu-no-shadow {
box-shadow: none !important;
background: transparent !important;
border: none !important;
}
/* Semantic UI Overrides */ /* Semantic UI Overrides */
/* Segments, Cards, Messages */ /* Segments, Cards, Messages */
@@ -101,6 +110,13 @@ a:hover {
color: var(--neu-text) !important; color: var(--neu-text) !important;
} }
/* Special class for transparent segments */
.ui.basic.segment {
box-shadow: none !important;
background: transparent !important;
border: none !important;
}
.ui.card > .content > .header, .ui.card > .content > .header,
.ui.cards > .card > .content > .header, .ui.cards > .card > .content > .header,
.ui.header { .ui.header {
@@ -126,6 +142,7 @@ a:hover {
border-radius: 10px !important; border-radius: 10px !important;
transition: all 0.2s ease !important; transition: all 0.2s ease !important;
font-weight: 600 !important; font-weight: 600 !important;
margin-right: 8px !important; /* Add spacing between buttons */
} }
.ui.button:hover { .ui.button:hover {
@@ -191,24 +208,33 @@ a:hover {
box-shadow: none !important; box-shadow: none !important;
} }
/* Fixed Header Style */
.ui.menu.fixed { .ui.menu.fixed {
box-shadow: 0px 4px 10px var(--neu-shadow-dark) !important; box-shadow: 0px 4px 10px var(--neu-shadow-dark) !important;
z-index: 1000;
} }
.ui.menu .item { .ui.menu .item {
color: var(--neu-text) !important; color: var(--neu-text) !important;
margin: 0 4px !important;
border-radius: 8px !important;
transition: all 0.2s ease;
} }
.ui.menu .item:before { .ui.menu .item:before {
background: transparent !important; background: transparent !important;
} }
.ui.menu .item:hover {
background: transparent !important;
box-shadow: 3px 3px 6px var(--neu-shadow-dark), -3px -3px 6px var(--neu-shadow-light) !important;
}
.ui.menu .active.item { .ui.menu .active.item {
background: transparent !important; background: transparent !important;
color: var(--neu-accent) !important; color: var(--neu-accent) !important;
font-weight: bold !important; font-weight: bold !important;
box-shadow: inset 3px 3px 6px var(--neu-shadow-dark), inset -3px -3px 6px var(--neu-shadow-light) !important; box-shadow: inset 3px 3px 6px var(--neu-shadow-dark), inset -3px -3px 6px var(--neu-shadow-light) !important;
border-radius: 8px !important;
} }
/* Dropdown */ /* Dropdown */
+1 -1
View File
@@ -40,7 +40,7 @@ const Home = () => {
</> </>
) : ( ) : (
<> <>
<Segment> <Segment basic>
<Header as='h3'>系统状况</Header> <Header as='h3'>系统状况</Header>
<Grid columns={2} stackable> <Grid columns={2} stackable>
<Grid.Column> <Grid.Column>