441 lines
8.5 KiB
Plaintext
441 lines
8.5 KiB
Plaintext
@import '../../style/theme.less';
|
|
@import '../../style/tags.less';
|
|
|
|
@home-track-gap: 16rpx;
|
|
|
|
.home-page {
|
|
min-height: 100vh;
|
|
background: @bg-page;
|
|
padding-bottom: 48rpx;
|
|
box-sizing: border-box;
|
|
color: @text-secondary;
|
|
}
|
|
|
|
.home-body {
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.home-search-wrap {
|
|
margin-top: @section-gap-xs;
|
|
padding: 0 @page-padding-x;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.home-search {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
gap: 16rpx;
|
|
background: #e5dcc9;
|
|
border-radius: 999rpx;
|
|
padding: 22rpx 32rpx;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.home-search__icon {
|
|
flex-shrink: 0;
|
|
line-height: 1;
|
|
}
|
|
|
|
.home-search__placeholder {
|
|
font-size: 28rpx;
|
|
color: rgba(50, 46, 37, 0.45);
|
|
flex: 1;
|
|
}
|
|
|
|
.home-tabs-wrap {
|
|
margin-top: @section-gap;
|
|
}
|
|
|
|
.home-hero-placeholder {
|
|
margin: @section-gap @page-padding-x 0;
|
|
height: 480rpx;
|
|
border-radius: 40rpx;
|
|
background: rgba(50, 46, 37, 0.04);
|
|
}
|
|
|
|
/** 首页顶部「精选」横滑行(与下方模块 track 列表的 .home-track-row 区分) */
|
|
.home-hero-row {
|
|
display: inline-flex;
|
|
flex-direction: row;
|
|
gap: @section-gap-sm;
|
|
padding: 24rpx @page-padding-x;
|
|
}
|
|
|
|
.home-hero-card {
|
|
width: 560rpx;
|
|
flex-shrink: 0;
|
|
border-radius: 32rpx;
|
|
/* 让阴影不被自身 overflow: hidden 裁切 */
|
|
overflow: visible;
|
|
background: #ffffff;
|
|
box-shadow: 0 10rpx 28rpx rgba(50, 46, 37, 0.08);
|
|
}
|
|
|
|
.home-hero-card__top {
|
|
height: 260rpx;
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
/* 顶部背景用自身圆角裁切,替代 card 的 overflow: hidden */
|
|
border-top-left-radius: 32rpx;
|
|
border-top-right-radius: 32rpx;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.home-hero-card__icon {
|
|
font-size: 96rpx;
|
|
line-height: 1;
|
|
}
|
|
|
|
.home-hero-card__badge {
|
|
position: absolute;
|
|
top: 24rpx;
|
|
right: 24rpx;
|
|
padding: 8rpx 18rpx;
|
|
border-radius: 999rpx;
|
|
background: rgba(50, 46, 37, 0.12);
|
|
font-size: 22rpx;
|
|
color: @text-title;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.home-hero-card__body {
|
|
padding: 28rpx @page-padding-inner-x 30rpx;
|
|
}
|
|
|
|
.home-hero-card__title-row {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: baseline;
|
|
justify-content: space-between;
|
|
gap: 16rpx;
|
|
/* 允许 flex 子项在文本过长时正确截断 */
|
|
min-width: 0;
|
|
}
|
|
|
|
.home-hero-card__title {
|
|
font-size: 34rpx;
|
|
line-height: 1.35;
|
|
color: @text-title;
|
|
font-weight: 700;
|
|
margin: 0;
|
|
flex: 1;
|
|
min-width: 0;
|
|
/* 标题与 meta 同行:超出后省略号(避免高度抖动) */
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.home-hero-card__sub {
|
|
margin-top: 10rpx;
|
|
font-size: 24rpx;
|
|
line-height: 1.4;
|
|
color: @text-secondary;
|
|
/* 第二行:超出后省略号 */
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
|
|
.home-hero-card__meta {
|
|
margin: 0;
|
|
font-size: 22rpx;
|
|
color: @text-gray;
|
|
/* meta 也做单行截断,防止极端长文本把布局挤爆 */
|
|
flex: 0 1 auto;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.home-section-panel {
|
|
margin-top: @section-gap;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.home-section-head {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 @page-padding-x;
|
|
}
|
|
|
|
.home-section-head__title {
|
|
font-size: @fs-section-head-title;
|
|
font-weight: 700;
|
|
color: @text-title;
|
|
}
|
|
|
|
.home-section-head__more {
|
|
font-size: 24rpx;
|
|
color: @text-selected-btn;
|
|
}
|
|
|
|
.home-section-head__title--module {
|
|
font-size: @fs-section-head-title;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.home-track-scroll {
|
|
margin-top: @section-gap-sm;
|
|
width: 100%;
|
|
white-space: nowrap;
|
|
// padding: 16rpx 0 20rpx;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.home-track-row {
|
|
display: inline-flex;
|
|
flex-direction: row;
|
|
gap: @section-gap-sm;
|
|
// padding-right: @page-padding-x;
|
|
padding: 16rpx @page-padding-x 20rpx;
|
|
}
|
|
|
|
.home-track-card {
|
|
width: calc((750rpx - 2 * @page-padding-x - 2 * @home-track-gap) / 2.2);
|
|
flex-shrink: 0;
|
|
border-radius: 24rpx;
|
|
overflow: hidden;
|
|
background: #ffffff;
|
|
box-shadow: 0 6rpx 20rpx rgba(50, 46, 37, 0.06);
|
|
}
|
|
|
|
.home-track-card__top {
|
|
/* 与 supportPages/mathIndex .function-item-img-wrapper 一致 */
|
|
height: 270rpx;
|
|
flex-shrink: 0;
|
|
position: relative;
|
|
overflow: hidden;
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: center;
|
|
}
|
|
|
|
.home-track-card__cover {
|
|
width: 100%;
|
|
display: block;
|
|
}
|
|
|
|
.home-track-card__icon {
|
|
font-size: 72rpx;
|
|
line-height: 1;
|
|
}
|
|
|
|
.home-track-card__tags {
|
|
position: absolute;
|
|
right: 12rpx;
|
|
bottom: 12rpx;
|
|
display: flex;
|
|
gap: 10rpx;
|
|
}
|
|
|
|
.home-track-card__body {
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
padding: 20rpx @page-padding-inner-x 22rpx;
|
|
background: #ffffff;
|
|
white-space: normal;
|
|
border-top: 1rpx solid #c5c5c5;
|
|
}
|
|
|
|
.home-track-card__title {
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
font-size: 28rpx;
|
|
font-weight: 600;
|
|
color: @text-title;
|
|
line-height: 1.35;
|
|
display: -webkit-box;
|
|
-webkit-box-orient: vertical;
|
|
line-clamp: 2;
|
|
-webkit-line-clamp: 2;
|
|
overflow: hidden;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.home-track-card__sub {
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
margin-top: 8rpx;
|
|
font-size: 22rpx;
|
|
color: @text-gray;
|
|
line-height: 1.45;
|
|
display: -webkit-box;
|
|
-webkit-box-orient: vertical;
|
|
-webkit-line-clamp: 2;
|
|
line-clamp: 2;
|
|
overflow: hidden;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.home-age-scroll {
|
|
margin-top: @section-gap-sm;
|
|
width: 100%;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.home-age-row {
|
|
display: inline-flex;
|
|
flex-direction: row;
|
|
gap: 12rpx;
|
|
padding-right: @page-padding-x;
|
|
}
|
|
|
|
.home-age-item {
|
|
width: calc((750rpx - 2 * @page-padding-x - 36rpx) / 3.5);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.home-age-item__icon-wrap {
|
|
width: 120rpx;
|
|
height: 120rpx;
|
|
border-radius: 50%;
|
|
background: rgba(248, 240, 224, 0.85);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.home-age-item__icon-wrap--active {
|
|
background: rgba(255, 215, 9, 0.28);
|
|
}
|
|
|
|
.home-age-item__icon {
|
|
font-size: 44rpx;
|
|
line-height: 1;
|
|
}
|
|
|
|
.home-age-item__label {
|
|
margin-top: 12rpx;
|
|
font-size: 26rpx;
|
|
color: @text-title;
|
|
font-weight: 600;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.home-age-item__desc {
|
|
margin-top: 8rpx;
|
|
font-size: 22rpx;
|
|
color: @text-gray;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.home-hot-list {
|
|
margin-top: @section-gap-sm;
|
|
padding: 0 @page-padding-x;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: @section-gap-stack;
|
|
}
|
|
|
|
.home-hot-card {
|
|
background: #ffffff;
|
|
border-radius: 24rpx;
|
|
padding: 24rpx @page-padding-inner-x;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 20rpx;
|
|
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.04);
|
|
}
|
|
|
|
.home-hot-card__thumb {
|
|
width: 144rpx;
|
|
height: 144rpx;
|
|
border-radius: 24rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.home-hot-card__thumb-emoji {
|
|
font-size: 56rpx;
|
|
}
|
|
|
|
.home-hot-card__content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 0;
|
|
flex: 1;
|
|
}
|
|
|
|
.home-hot-card__title {
|
|
font-size: 30rpx;
|
|
color: #2f2f2f;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.home-hot-card__desc {
|
|
margin-top: 8rpx;
|
|
font-size: 24rpx;
|
|
color: #616161;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.home-hot-card__meta {
|
|
margin-top: 16rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16rpx;
|
|
}
|
|
|
|
.home-hot-card__tag {
|
|
font-size: 22rpx;
|
|
color: @text-selected-btn;
|
|
background: @brand;
|
|
border-radius: 999rpx;
|
|
padding: 4rpx 16rpx;
|
|
}
|
|
|
|
.home-hot-card__score {
|
|
font-size: 24rpx;
|
|
color: #6b6b6b;
|
|
}
|
|
|
|
.home-hot-card__action {
|
|
width: 56rpx;
|
|
height: 56rpx;
|
|
border-radius: 50%;
|
|
background: @brand;
|
|
color: #2b2b2b;
|
|
font-size: 36rpx;
|
|
line-height: 56rpx;
|
|
text-align: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.home-section-panel__sub {
|
|
margin-top: 10rpx;
|
|
font-size: 24rpx;
|
|
line-height: 1.5;
|
|
color: @text-gray;
|
|
display: block;
|
|
}
|
|
|
|
|
|
.home-page .category-tabs {
|
|
background: @bg-page;
|
|
}
|
|
|
|
.home-page .category-tabs__pill {
|
|
background: rgba(96, 91, 80, 0.08);
|
|
color: @text-secondary;
|
|
}
|
|
|
|
.home-page .category-tabs__pill--active {
|
|
background: @brand;
|
|
color: @text-selected-btn;
|
|
font-weight: 600;
|
|
} |