Files
PetCommunity/miniprogram/pages/profile/profile.wxss
2026-06-05 17:46:51 +08:00

311 lines
5.4 KiB
Plaintext

.profile-page {
min-height: 100vh;
background: linear-gradient(180deg, #fff8f2 0%, #fff4fb 50%, #f5f0ff 100%);
}
.profile-scroll { min-height: 100vh; }
/* 用户信息区 */
.profile-header {
padding: 0 28rpx 28rpx;
background: linear-gradient(180deg, rgba(255, 225, 90, 0.18), transparent);
}
.header-topbar {
display: flex;
justify-content: flex-end;
padding: 16rpx 0 12rpx;
}
.settings-btn {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
background: rgba(255, 255, 255, 0.72);
box-shadow: 0 8rpx 18rpx rgba(78, 56, 96, 0.10);
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
}
.user-top {
display: flex;
align-items: flex-start;
gap: 24rpx;
margin-bottom: 28rpx;
}
.user-avatar-wrap {
position: relative;
flex-shrink: 0;
}
.user-avatar {
width: 128rpx;
height: 128rpx;
border-radius: 40rpx;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 12rpx 24rpx rgba(98, 60, 118, 0.18);
}
.avatar-text {
font-size: 56rpx;
font-weight: 800;
color: rgba(39, 34, 53, 0.72);
}
.avatar-edit {
position: absolute;
bottom: -6rpx;
right: -6rpx;
width: 44rpx;
height: 44rpx;
border-radius: 50%;
background: #fff;
box-shadow: 0 4rpx 10rpx rgba(78, 56, 96, 0.16);
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: 36rpx;
font-weight: 900;
color: #272235;
}
.user-handle {
display: block;
font-size: 24rpx;
color: #9b8fa8;
margin-bottom: 10rpx;
}
.user-bio {
display: block;
font-size: 26rpx;
color: #6a6178;
line-height: 1.5;
}
.edit-profile-btn {
background: rgba(255, 255, 255, 0.80);
border: 1rpx solid rgba(255, 255, 255, 0.72);
border-radius: 999rpx;
padding: 14rpx 28rpx;
font-size: 24rpx;
font-weight: 800;
color: #272235;
flex-shrink: 0;
box-shadow: 0 8rpx 18rpx rgba(78, 56, 96, 0.08);
align-self: flex-start;
}
/* 数据统计 */
.stats-row {
display: flex;
gap: 16rpx;
align-items: center;
}
.stat-item {
flex: 1;
padding: 24rpx 0;
text-align: center;
background: rgba(255, 255, 255, 0.78);
border: 1rpx solid rgba(255, 255, 255, 0.72);
border-radius: 30rpx;
box-shadow: 0 10rpx 22rpx rgba(78, 56, 96, 0.07);
}
.stat-num {
display: block;
font-size: 40rpx;
font-weight: 900;
color: #ff4f91;
}
.stat-label {
display: block;
font-size: 22rpx;
font-weight: 700;
color: #9b8fa8;
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: 26rpx;
font-weight: 900;
color: #9b8fa8;
letter-spacing: 0.5rpx;
text-transform: uppercase;
}
.add-pet-btn {
font-size: 24rpx;
font-weight: 800;
color: #ff4f91;
background: #ffe5f0;
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: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(201, 247, 223, 0.72));
border: 1rpx solid rgba(255, 255, 255, 0.72);
border-radius: 36rpx;
padding: 20rpx 24rpx;
margin-right: 20rpx;
box-shadow: 0 12rpx 26rpx rgba(78, 56, 96, 0.09);
white-space: normal;
vertical-align: top;
max-width: 560rpx;
}
.pet-card-empty {
background: rgba(255, 255, 255, 0.60);
border: 3rpx dashed rgba(43, 37, 61, 0.16);
}
.pet-avatar {
width: 84rpx;
height: 84rpx;
border-radius: 28rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.pet-avatar-add { background: rgba(255, 255, 255, 0.60); color: #9b8fa8; }
.pet-emoji { font-size: 44rpx; line-height: 1; }
.pet-info { min-width: 0; }
.pet-name {
display: block;
font-size: 28rpx;
font-weight: 900;
color: #272235;
margin-bottom: 6rpx;
}
.pet-breed {
display: block;
font-size: 22rpx;
color: #9b8fa8;
}
.pet-badge {
background: #ffe5f0;
border-radius: 999rpx;
padding: 8rpx 16rpx;
font-size: 20rpx;
color: #a91d5b;
font-weight: 900;
flex-shrink: 0;
}
/* 视图切换 */
.view-toggle {
display: flex;
background: rgba(255, 255, 255, 0.60);
border: 1rpx solid rgba(43, 37, 61, 0.10);
border-radius: 14rpx;
overflow: hidden;
}
.toggle-item {
padding: 10rpx 20rpx;
font-size: 24rpx;
color: #9b8fa8;
}
.toggle-item.active {
background: rgba(255, 79, 145, 0.12);
color: #ff4f91;
font-weight: 800;
}
/* 动态网格 */
.post-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 6rpx;
padding: 0 28rpx 20rpx;
}
.grid-item {
aspect-ratio: 1;
border-radius: 28rpx;
overflow: hidden;
background: #f0eef5;
display: flex;
align-items: center;
justify-content: center;
}
.grid-img { width: 100%; height: 100%; }
.grid-no-img {
padding: 12rpx;
font-size: 20rpx;
color: #9b8fa8;
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: #9b8fa8; }
.post-btn { padding: 18rpx 48rpx; font-size: 26rpx; font-weight: 800; margin-top: 8rpx; }