huahuazenmehua/pages/home/home.wxss

242 lines
3.9 KiB
Plaintext
Raw Permalink Normal View History

2026-05-08 17:00:10 +08:00
.home-page {
height: 100vh;
background: #f7f8fc;
}
/* Header */
.home-header {
background: linear-gradient(135deg, #6C8CFF 0%, #8BA4FF 100%);
padding: 60rpx 32rpx 40rpx;
}
.header-top {
margin-bottom: 28rpx;
}
.header-title {
display: block;
font-size: 48rpx;
font-weight: 700;
color: #ffffff;
letter-spacing: 2rpx;
}
.header-slogan {
display: block;
font-size: 26rpx;
color: rgba(255,255,255,0.85);
margin-top: 8rpx;
}
/* 搜索框 */
.search-bar {
display: flex;
align-items: center;
background: #ffffff;
border-radius: 50rpx;
padding: 18rpx 28rpx;
gap: 12rpx;
}
.search-icon {
font-size: 30rpx;
}
.search-input {
flex: 1;
font-size: 28rpx;
color: #333333;
height: 40rpx;
line-height: 40rpx;
}
/* 主体 */
.home-body {
padding: 0 32rpx;
}
/* 通用section */
.section {
margin-top: 48rpx;
}
.section-header {
display: flex;
align-items: baseline;
gap: 16rpx;
margin-bottom: 24rpx;
}
.section-title {
font-size: 34rpx;
font-weight: 700;
color: #333333;
}
.section-sub {
font-size: 24rpx;
color: #AAAAAA;
}
/* 入门路径 */
.path-scroll {
margin: 0 -32rpx;
padding: 0 32rpx;
}
.path-list {
display: flex;
flex-direction: row;
gap: 20rpx;
padding-right: 32rpx;
width: max-content;
}
.path-card {
width: 240rpx;
border-radius: 24rpx;
padding: 28rpx 24rpx;
display: flex;
flex-direction: column;
flex-shrink: 0;
}
.path-step {
font-size: 22rpx;
color: rgba(255,255,255,0.75);
margin-bottom: 12rpx;
}
.path-icon {
font-size: 56rpx;
margin-bottom: 16rpx;
}
.path-title {
font-size: 30rpx;
font-weight: 700;
color: #ffffff;
margin-bottom: 8rpx;
}
.path-desc {
font-size: 22rpx;
color: rgba(255,255,255,0.85);
line-height: 1.5;
}
/* 分类网格 */
.category-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20rpx;
}
.category-item {
background: #ffffff;
border-radius: 20rpx;
padding: 28rpx 16rpx;
display: flex;
flex-direction: column;
align-items: center;
gap: 12rpx;
box-shadow: 0 4rpx 16rpx rgba(108,140,255,0.08);
}
.category-emoji {
font-size: 48rpx;
}
.category-name {
font-size: 26rpx;
color: #333333;
font-weight: 500;
}
/* 今日推荐 */
.recommend-list {
display: flex;
flex-direction: column;
gap: 20rpx;
}
.recommend-card {
background: #ffffff;
border-radius: 20rpx;
display: flex;
flex-direction: row;
overflow: hidden;
box-shadow: 0 4rpx 16rpx rgba(108,140,255,0.08);
}
.recommend-cover {
width: 160rpx;
height: 160rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.recommend-emoji {
font-size: 64rpx;
}
.recommend-info {
flex: 1;
padding: 24rpx 24rpx 24rpx 20rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.recommend-title {
font-size: 30rpx;
font-weight: 600;
color: #333333;
}
.recommend-desc {
font-size: 24rpx;
color: #888888;
line-height: 1.5;
margin: 8rpx 0;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.recommend-meta {
display: flex;
align-items: center;
gap: 16rpx;
}
.recommend-lessons {
font-size: 22rpx;
color: #AAAAAA;
}
/* 最近学习 */
.history-list {
display: flex;
flex-direction: column;
gap: 16rpx;
}
.history-item {
background: #ffffff;
border-radius: 20rpx;
display: flex;
align-items: center;
padding: 20rpx;
gap: 20rpx;
box-shadow: 0 4rpx 16rpx rgba(108,140,255,0.06);
}
.history-cover {
width: 80rpx;
height: 80rpx;
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.history-emoji {
font-size: 36rpx;
}
.history-info {
flex: 1;
}
.history-title {
font-size: 28rpx;
font-weight: 600;
color: #333333;
display: block;
}
.history-time {
font-size: 24rpx;
color: #AAAAAA;
margin-top: 6rpx;
display: block;
}
.history-arrow {
font-size: 36rpx;
color: #CCCCCC;
}