feat(mine): 我的页渐变头部与菜单卡片化
This commit is contained in:
parent
ae532724f9
commit
429ebfc5fb
|
|
@ -4,40 +4,45 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
padding: 80px 32px;
|
padding: 120px 32px 80px;
|
||||||
background: $color-bg-white;
|
background: $color-primary-grad;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 白底绿字头像:与渐变头形成对比
|
||||||
.avatar {
|
.avatar {
|
||||||
width: 120px;
|
width: 132px;
|
||||||
height: 120px;
|
height: 132px;
|
||||||
border-radius: $radius-circle;
|
border-radius: $radius-circle;
|
||||||
background: $color-primary-grad;
|
background: $color-bg-white;
|
||||||
color: #ffffff;
|
|
||||||
font-size: 48px;
|
|
||||||
font-weight: 600;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-right: 32px;
|
margin-right: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.avatarText {
|
||||||
|
font-size: 52px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: $color-primary;
|
||||||
|
}
|
||||||
|
|
||||||
.headerInfo { display: flex; flex-direction: column; }
|
.headerInfo { display: flex; flex-direction: column; }
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
font-size: 36px;
|
font-size: 36px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: $color-text;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uid {
|
.uid {
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
color: $color-text-secondary;
|
color: rgba(255, 255, 255, 0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 菜单卡上浮叠在渐变区上
|
||||||
.menuCard {
|
.menuCard {
|
||||||
margin: 20px 24px 0;
|
margin: -48px 24px 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,9 @@ export default function Mine() {
|
||||||
<View className={styles.page}>
|
<View className={styles.page}>
|
||||||
<Navbar title="个人中心" autoBack={false} />
|
<Navbar title="个人中心" autoBack={false} />
|
||||||
<View className={styles.header}>
|
<View className={styles.header}>
|
||||||
<Text className={styles.avatar}>{user?.name?.[0] ?? '?'}</Text>
|
<View className={styles.avatar}>
|
||||||
|
<Text className={styles.avatarText}>{user?.name?.[0] ?? '?'}</Text>
|
||||||
|
</View>
|
||||||
<View className={styles.headerInfo}>
|
<View className={styles.headerInfo}>
|
||||||
<Text className={styles.name}>{user?.name ?? '加载中...'}</Text>
|
<Text className={styles.name}>{user?.name ?? '加载中...'}</Text>
|
||||||
<Text className={styles.uid}>{auth.userId ? `ID: ${auth.userId}` : ''}</Text>
|
<Text className={styles.uid}>{auth.userId ? `ID: ${auth.userId}` : ''}</Text>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue