Files
PetCommunity/miniprogram/pages/profile/profile.wxss

327 lines
5.7 KiB
Plaintext

/* ── 我的页:Vital 风格 ──
紫色渐变淡出头部,白色英雄卡叠压其上,统计用大数字锚点 */
.profile-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% 460rpx;
display: flex;
flex-direction: column;
}
/* 主导航栏:与胶囊等高,右侧避让胶囊 */
.navbar {
display: flex;
align-items: center;
padding-left: 28rpx;
flex-shrink: 0;
box-sizing: border-box;
}
/* 标题颜色由 .glass-topbar 统一控制 */
.navbar-title {
font-size: 36rpx;
font-weight: 700;
}
.profile-scroll { flex: 1; }
/* 用户信息区:白色英雄卡叠压在紫色头部上 */
.profile-header {
position: relative;
margin: 8rpx 28rpx 20rpx;
padding: 32rpx 28rpx 26rpx;
overflow: hidden;
border-radius: 48rpx;
background: #ffffff;
box-shadow: 0 20rpx 50rpx rgba(27, 27, 32, 0.10);
}
/* 旧版渐变光斑已停用(Vital 用纯白卡面) */
.hero-blob {
display: none;
}
.user-top {
position: relative;
z-index: 1;
display: flex;
align-items: flex-start;
gap: 24rpx;
margin-bottom: 28rpx;
}
.user-avatar-wrap {
position: relative;
flex-shrink: 0;
}
.user-avatar {
width: 132rpx;
height: 132rpx;
border-radius: 44rpx;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 14rpx 32rpx rgba(27, 27, 32, 0.10);
}
.avatar-text {
font-size: 56rpx;
font-weight: 700;
color: rgba(27, 27, 32, 0.65);
}
.avatar-edit {
position: absolute;
bottom: -6rpx;
right: -6rpx;
width: 46rpx;
height: 46rpx;
border-radius: 50%;
background: #ffffff;
box-shadow: 0 8rpx 18rpx rgba(27, 27, 32, 0.14);
display: flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
}
.user-meta {
flex: 1;
padding-top: 6rpx;
min-width: 0;
}
.user-name-row {
display: flex;
align-items: center;
gap: 12rpx;
margin-bottom: 4rpx;
}
.user-name {
font-size: 34rpx;
font-weight: 700;
color: #1b1b20;
}
.user-handle {
display: block;
font-size: 24rpx;
color: #b9bdc6;
margin-bottom: 10rpx;
}
.user-bio {
display: block;
font-size: 24rpx;
color: #6e7280;
line-height: 1.6;
}
/* 编辑资料:浅灰静默胶囊 */
.edit-profile-btn {
background: #f1f2f6;
border-radius: 999rpx;
padding: 14rpx 28rpx;
font-size: 24rpx;
font-weight: 600;
color: #1b1b20;
flex-shrink: 0;
align-self: flex-start;
}
/* 数据统计:大数字锚点(整数大、标签小且灰) */
.stats-row {
position: relative;
z-index: 1;
display: flex;
gap: 16rpx;
align-items: center;
}
.stat-item {
flex: 1;
padding: 22rpx 0;
text-align: center;
background: #f6f7fa;
border-radius: 32rpx;
}
.stat-num {
display: block;
font-size: 44rpx;
font-weight: 700;
letter-spacing: -1rpx;
color: #1b1b20;
font-variant-numeric: tabular-nums;
}
.stat-label {
display: block;
font-size: 21rpx;
font-weight: 600;
color: #b9bdc6;
margin-top: 4rpx;
}
/* 区块 */
.section-wrap {
margin-bottom: 12rpx;
}
.section-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 28rpx 14rpx;
}
.section-title {
font-size: 22rpx;
font-weight: 600;
color: #b9bdc6;
letter-spacing: 0.6rpx;
}
.add-pet-btn {
font-size: 24rpx;
font-weight: 600;
color: #7563e0;
background: rgba(139, 124, 246, 0.12);
border-radius: 999rpx;
padding: 8rpx 20rpx;
}
/* 宠物卡片:白卡 */
.pets-scroll {
white-space: nowrap;
padding: 0 28rpx 16rpx;
}
.pet-card {
display: inline-flex;
align-items: center;
gap: 18rpx;
background: #ffffff;
border-radius: 40rpx;
padding: 20rpx 24rpx;
margin-right: 20rpx;
box-shadow: var(--shadow-soft);
white-space: normal;
vertical-align: top;
max-width: 560rpx;
}
.pet-card-empty {
background: transparent;
border: 3rpx dashed rgba(27, 27, 32, 0.14);
box-shadow: none;
}
.pet-avatar {
width: 84rpx;
height: 84rpx;
border-radius: 30rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.pet-avatar-add { background: #f1f2f6; border: 2.5rpx dashed rgba(27, 27, 32, 0.14); color: #b9bdc6; }
.pet-emoji { font-size: 44rpx; line-height: 1; }
.pet-info { min-width: 0; }
.pet-name {
display: block;
font-size: 28rpx;
font-weight: 600;
color: #1b1b20;
margin-bottom: 6rpx;
}
.pet-breed {
display: block;
font-size: 22rpx;
color: #b9bdc6;
}
/* 宠物徽章:淡紫静默胶囊,不旋转 */
.pet-badge {
background: rgba(139, 124, 246, 0.12);
color: #7563e0;
border-radius: 999rpx;
padding: 10rpx 18rpx;
font-size: 20rpx;
font-weight: 600;
flex-shrink: 0;
}
/* 视图切换:灰底分段控件 */
.view-toggle {
display: flex;
background: #e7e9ef;
border-radius: 18rpx;
overflow: hidden;
}
.toggle-item {
padding: 10rpx 20rpx;
font-size: 24rpx;
color: #6e7280;
}
.toggle-item.active {
background: #ffffff;
color: #1b1b20;
font-weight: 700;
}
/* 动态网格 */
.post-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 9rpx;
padding: 0 28rpx 20rpx;
}
.grid-item {
aspect-ratio: 1;
border-radius: 26rpx;
overflow: hidden;
background: #ffffff;
display: flex;
align-items: center;
justify-content: center;
}
.grid-img { width: 100%; height: 100%; }
.grid-no-img {
padding: 12rpx;
font-size: 20rpx;
color: #b9bdc6;
text-align: center;
line-height: 1.4;
}
.grid-empty {
grid-column: span 3;
display: flex;
flex-direction: column;
align-items: center;
padding: 60rpx 0;
gap: 16rpx;
}
.empty-emoji { font-size: 72rpx; }
.empty-tip { font-size: 26rpx; color: #b9bdc6; }
.post-btn { padding: 18rpx 48rpx; font-size: 26rpx; font-weight: 600; margin-top: 8rpx; }