style(index): 优化首页样式与布局

- 重新设计首页背景色与容器安全区适配
- 优化Hero Banner区域增加圆角遮罩效果
- 调整Hero Grid菜单区样式,去除背景色实现透明效果
- 新增公告条样式,自定义样式替代NutUI NoticeBar
- 优化底部购买按钮样式,调整高度及阴影
- 统一首页通用section的左右边距,融合TrustSection和ContactSection样式
This commit is contained in:
2026-04-09 13:09:45 +08:00
parent 0be67bdb91
commit 25abd81d9f
13 changed files with 836 additions and 600 deletions

View File

@@ -1,109 +1,144 @@
.catalog-showcase {
margin: 16px;
padding: 16px;
background: #ffffff;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.catalog-card {
position: relative;
margin: 24px 16px 8px;
padding: 24px 20px;
background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #3b82f6 100%);
border-radius: 18px;
overflow: hidden;
box-shadow: 0 8px 32px rgba(37, 99, 235, 0.3);
.catalog-header {
margin-bottom: 16px;
}
.catalog-title-bar {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 4px;
}
.catalog-icon {
width: 20px;
height: 20px;
color: #3b82f6;
}
.catalog-title {
font-size: 16px;
font-weight: 600;
color: #1f2937;
}
.catalog-subtitle {
font-size: 12px;
color: #6b7280;
margin-left: 28px;
}
.catalog-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.catalog-preview {
width: 100%;
display: flex;
justify-content: center;
}
.catalog-cover {
width: 140px;
height: 180px;
background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
border-radius: 8px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.cover-icon {
width: 48px;
height: 48px;
color: rgba(255, 255, 255, 0.9);
}
.cover-text {
font-size: 14px;
font-weight: 600;
color: #ffffff;
text-align: center;
padding: 0 12px;
}
.cover-subtext {
font-size: 11px;
color: rgba(255, 255, 255, 0.7);
}
.view-catalog-btn {
width: 100%;
height: 44px;
background: linear-gradient(to right, #3b82f6, #2563eb);
border-radius: 22px;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
border: none;
&::after {
border: none;
&:active {
opacity: 0.92;
}
.btn-text {
/* ═══ 装饰圆 ═══ */
&__deco {
position: absolute;
border-radius: 50%;
pointer-events: none;
&--1 {
width: 160px;
height: 160px;
top: -40px;
right: -30px;
background: rgba(255, 255, 255, 0.06);
}
&--2 {
width: 100px;
height: 100px;
bottom: -20px;
left: 20%;
background: rgba(255, 255, 255, 0.04);
}
}
/* ═══ 内容区 ═══ */
&__content {
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
z-index: 1;
}
&__left {
flex: 1;
display: flex;
flex-direction: column;
gap: 6px;
padding-right: 16px;
}
&__badge {
font-size: 14px;
font-weight: 700;
color: rgba(255, 255, 255, 0.5);
letter-spacing: 2px;
}
&__title {
font-size: 24px;
font-weight: 700;
color: #ffffff;
margin-bottom: 2px;
}
&__desc {
font-size: 15px;
font-weight: 500;
color: rgba(255, 255, 255, 0.65);
line-height: 1.5;
}
&__cta {
display: inline-flex;
align-items: center;
gap: 4px;
margin-top: 12px;
background: rgba(255, 255, 255, 0.15);
border-radius: 100px;
padding: 8px 16px;
align-self: flex-start;
backdrop-filter: blur(4px);
border: 1px solid rgba(255, 255, 255, 0.2);
}
&__cta-text {
font-size: 15px;
font-weight: 600;
color: #ffffff;
}
.btn-icon {
width: 16px;
height: 16px;
color: #ffffff;
/* ═══ 右侧书本图形 ═══ */
&__right {
flex-shrink: 0;
}
&__book {
width: 72px;
height: 90px;
background: rgba(255, 255, 255, 0.12);
border-radius: 4px 10px 10px 4px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
border: 1px solid rgba(255, 255, 255, 0.2);
}
&__book-spine {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 6px;
background: rgba(255, 255, 255, 0.15);
border-radius: 4px 0 0 4px;
}
&__book-pages {
display: flex;
gap: 3px;
align-items: flex-end;
}
&__book-page {
width: 4px;
background: rgba(255, 255, 255, 0.25);
border-radius: 2px;
&:nth-child(1) { height: 28px; }
&:nth-child(2) { height: 40px; }
&:nth-child(3) { height: 32px; }
}
&__book-label {
position: absolute;
bottom: 6px;
right: 8px;
font-size: 14px;
font-weight: 700;
color: rgba(255, 255, 255, 0.4);
}
}