Files
PetCommunity/miniprogram/pages/feed/feed.wxss

252 lines
4.4 KiB
Plaintext

/* ── 广场页:Vital 风格 ──
顶部紫色渐变向下淡出融入灰底,白卡信息流叠压其上 */
.feed-page {
height: 100vh;
background-color: #f1f2f6;
background-image: linear-gradient(180deg, #9181f4 0%, #a99bf8 52%, rgba(241, 242, 246, 0) 100%);
background-repeat: no-repeat;
background-size: 100% 520rpx;
display: flex;
flex-direction: column;
}
/* 主导航栏:与胶囊按钮同高,右侧避让胶囊 */
.navbar {
display: flex;
align-items: center;
padding-left: 28rpx;
flex-shrink: 0;
box-sizing: border-box;
}
/* 次级菜单栏:胶囊按钮下方,全宽 */
.subbar {
display: flex;
align-items: center;
padding: 8rpx 28rpx 12rpx;
gap: 16rpx;
flex-shrink: 0;
}
/* logo:玻璃顶栏上的深色标题(颜色由 .glass-topbar 统一控制) */
.topbar-logo {
font-size: 46rpx;
font-weight: 700;
letter-spacing: -0.5rpx;
flex-shrink: 0;
}
.topbar-tabs {
flex: 1;
display: flex;
gap: 8rpx;
justify-content: center;
}
/* 紫底上的 tab:半透明白文字,激活态为白色胶囊 + 黑字 */
.feed-tab {
font-size: 26rpx;
font-weight: 600;
color: rgba(255, 255, 255, 0.72);
padding: 8rpx 20rpx;
border-radius: 999rpx;
transition: all 0.2s;
}
.feed-tab-active {
color: #1b1b20;
background: #ffffff;
font-weight: 700;
box-shadow: 0 8rpx 20rpx rgba(27, 27, 32, 0.10);
}
/* 故事圈 */
.stories-scroll {
flex-shrink: 0;
white-space: nowrap;
padding: 16rpx 28rpx 24rpx;
}
.story {
display: inline-flex;
flex-direction: column;
align-items: center;
gap: 10rpx;
margin-right: 24rpx;
white-space: normal;
}
/* 故事环:未读 = 紫色渐变环(单一主色家族),已读 = 浅灰 */
.story-ring {
width: 116rpx;
height: 116rpx;
border-radius: 40rpx;
padding: 6rpx;
box-sizing: border-box;
background: linear-gradient(135deg, #7563e0, #a99bf8);
box-shadow: 0 16rpx 36rpx rgba(27, 27, 32, 0.10);
}
.story-ring-seen {
background: rgba(27, 27, 32, 0.10);
}
/* 我的故事:强调黑(与发布 CTA 呼应) */
.story-ring-me {
background: #2b2b30;
}
.story-inner {
width: 100%;
height: 100%;
border-radius: 32rpx;
display: flex;
align-items: center;
justify-content: center;
border: 5rpx solid rgba(255, 255, 255, 0.92);
}
.story-emoji {
font-size: 46rpx;
line-height: 1;
}
.story-name {
font-size: 21rpx;
font-weight: 600;
color: #6e7280;
}
/* 信息流 */
.feed-scroll {
flex: 1;
padding-top: 8rpx;
}
/* 骨架屏 */
.skeleton-wrap {
padding-top: 8rpx;
}
.skeleton-card {
margin: 0 28rpx 32rpx;
background: #ffffff;
border-radius: 48rpx;
box-shadow: 0 16rpx 48rpx rgba(27, 27, 32, 0.06);
overflow: hidden;
padding-bottom: 20rpx;
}
.skeleton-header {
display: flex;
align-items: center;
gap: 20rpx;
padding: 24rpx;
}
.skeleton-avatar {
width: 76rpx;
height: 76rpx;
border-radius: 28rpx;
flex-shrink: 0;
}
.skeleton-meta {
flex: 1;
display: flex;
flex-direction: column;
gap: 12rpx;
}
.skeleton-line {
height: 26rpx;
border-radius: 8rpx;
}
.skeleton-img {
width: 100%;
height: 360rpx;
}
.w100 { width: 100%; }
.w80 { width: 80%; }
.w60 { width: 60%; }
.w40 { width: 40%; }
.skeleton {
background: linear-gradient(90deg, #ebecf1 25%, #e2e4ea 50%, #ebecf1 75%);
background-size: 200% 100%;
animation: shine 1.4s infinite;
}
@keyframes shine {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
/* 加载更多 */
.load-more {
display: flex;
justify-content: center;
gap: 12rpx;
padding: 32rpx;
}
.load-dot {
width: 16rpx;
height: 16rpx;
border-radius: 50%;
background: var(--purple);
animation: bounce 1.2s infinite;
}
.load-dot-2 { animation-delay: 0.2s; }
.load-dot-3 { animation-delay: 0.4s; }
@keyframes bounce {
0%, 80%, 100% { transform: scale(0.8); opacity: 0.4; }
40% { transform: scale(1); opacity: 1; }
}
/* 到底了 */
.end-tip {
text-align: center;
font-size: 24rpx;
color: var(--text-tertiary);
padding: 32rpx;
}
/* 空态 */
.empty-feed {
display: flex;
flex-direction: column;
align-items: center;
padding: 120rpx 60rpx 40rpx;
gap: 16rpx;
}
.empty-emoji {
font-size: 80rpx;
line-height: 1;
}
.empty-title {
font-size: 34rpx;
font-weight: 700;
color: var(--text-primary);
}
.empty-desc {
font-size: 26rpx;
color: var(--text-tertiary);
text-align: center;
line-height: 1.6;
}
.empty-btn {
margin-top: 24rpx;
padding: 22rpx 60rpx;
font-size: 28rpx;
font-weight: 600;
}