feat(profile): add new profile pages and styles

This commit is contained in:
shenghuo2
2025-06-21 23:35:30 +08:00
parent ef5eda8cf4
commit 35145dbf76
12 changed files with 2426 additions and 6 deletions

388
profile/styles/share.css Normal file
View File

@ -0,0 +1,388 @@
/* 共享页面样式 */
/* 页面头部 */
.page-header {
background: #f6f6f6;
color: rgb(43, 42, 42);
padding: 15px 0;
position: sticky;
top: 0;
z-index: 100;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.header-content {
display: flex;
align-items: center;
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
.back-btn {
background: none;
border: none;
color: rgb(0, 0, 0);
font-size: 18px;
cursor: pointer;
padding: 8px;
border-radius: 50%;
transition: background-color 0.3s ease;
margin-right: 15px;
}
.back-btn:hover {
background-color: rgba(255, 255, 255, 0.1);
}
.page-title {
font-size: 18px;
font-weight: 600;
margin: 0;
}
/* 共享卡片 */
.share-section {
margin: 20px 0;
padding: 0 20px;
}
.share-card {
background: white;
border-radius: 16px;
padding: 20px;
display: flex;
align-items: center;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
cursor: pointer;
transition: all 0.3s ease;
border: 1px solid #f0f0f0;
}
.share-card:hover {
transform: translateY(-2px);
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
.share-card.family-share {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.share-card.device-share {
background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
color: white;
}
.card-icon {
width: 50px;
height: 50px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
margin-right: 15px;
background: rgba(255, 255, 255, 0.2);
}
.card-content {
flex: 1;
}
.card-content h3 {
margin: 0 0 5px 0;
font-size: 18px;
font-weight: 600;
}
.card-content p {
margin: 0;
opacity: 0.9;
font-size: 14px;
}
.card-action {
font-size: 16px;
opacity: 0.8;
}
/* 当前共享状态 */
.current-shares {
margin: 30px 0;
padding: 0 20px;
}
.section-title {
font-size: 18px;
font-weight: 600;
margin: 0 0 15px 0;
color: #333;
}
.share-item {
background: white;
border-radius: 12px;
padding: 15px;
display: flex;
align-items: center;
margin-bottom: 10px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
border: 1px solid #f0f0f0;
}
.share-avatar {
width: 50px;
height: 50px;
margin-right: 15px;
}
.share-avatar img {
width: 100%;
height: 100%;
border-radius: 50%;
object-fit: cover;
}
.share-info {
flex: 1;
}
.share-info h4 {
margin: 0 0 5px 0;
font-size: 16px;
font-weight: 600;
color: #333;
}
.share-info p {
margin: 0;
font-size: 14px;
color: #666;
}
.share-status {
margin-left: 10px;
}
.status-badge {
padding: 4px 12px;
border-radius: 20px;
font-size: 12px;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.status-badge.active {
background: #e8f5e8;
color: #2e7d32;
}
.status-badge.pending {
background: #fff3e0;
color: #f57c00;
}
/* 邀请按钮 */
.invite-section {
padding: 0 20px;
margin: 30px 0;
}
.invite-btn {
width: 100%;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
border-radius: 12px;
padding: 15px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.invite-btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}
.invite-btn:active {
transform: translateY(0);
}
/* 共享设置 */
.share-settings {
margin: 30px 0;
padding: 0 20px;
}
.setting-item {
background: white;
border-radius: 12px;
padding: 20px;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
border: 1px solid #f0f0f0;
}
.setting-info h4 {
margin: 0 0 5px 0;
font-size: 16px;
font-weight: 600;
color: #333;
}
.setting-info p {
margin: 0;
font-size: 14px;
color: #666;
}
/* 切换开关样式 */
.setting-toggle {
position: relative;
}
.toggle-switch {
position: relative;
display: inline-block;
width: 50px;
height: 28px;
background-color: #ccc;
border-radius: 14px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.toggle-switch::before {
content: '';
position: absolute;
top: 2px;
left: 2px;
width: 24px;
height: 24px;
background-color: white;
border-radius: 50%;
transition: transform 0.3s ease;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
input[type="checkbox"] {
display: none;
}
input[type="checkbox"]:checked + .toggle-switch {
background-color: #667eea;
}
input[type="checkbox"]:checked + .toggle-switch::before {
transform: translateX(22px);
}
/* 响应式设计 */
@media (max-width: 768px) {
.header-content {
padding: 0 15px;
}
.share-section,
.current-shares,
.invite-section,
.share-settings {
padding: 0 15px;
}
.share-card {
padding: 15px;
}
.card-icon {
width: 45px;
height: 45px;
font-size: 20px;
}
.card-content h3 {
font-size: 16px;
}
.share-item {
padding: 12px;
}
.share-avatar {
width: 45px;
height: 45px;
}
}
/* 动画效果 */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.share-card,
.share-item,
.setting-item {
animation: fadeInUp 0.6s ease forwards;
}
.share-card:nth-child(1) { animation-delay: 0.1s; }
.share-card:nth-child(2) { animation-delay: 0.2s; }
.share-item:nth-child(1) { animation-delay: 0.3s; }
.share-item:nth-child(2) { animation-delay: 0.4s; }
.setting-item:nth-child(1) { animation-delay: 0.5s; }
.setting-item:nth-child(2) { animation-delay: 0.6s; }
/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
.share-card:not(.family-share):not(.device-share) {
background: #2d2d2d;
color: white;
border-color: #404040;
}
.share-item,
.setting-item {
background: #2d2d2d;
color: white;
border-color: #404040;
}
.share-info h4 {
color: white;
}
.share-info p {
color: #ccc;
}
.setting-info h4 {
color: white;
}
.setting-info p {
color: #ccc;
}
.section-title {
color: white;
}
}