You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
885 lines
24 KiB
885 lines
24 KiB
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=375, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
<title>青核 Youthome - 完善资料</title>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<link rel="stylesheet" href="../colors_and_type.css">
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
:root {
|
|
/* Traework 设计令牌 - 圆角/间距/阴影/高度 */
|
|
--radius-xs: 4px;
|
|
--radius-sm: 8px;
|
|
--radius-md: 12px;
|
|
--radius-lg: 16px;
|
|
--radius-xl: 20px;
|
|
--radius-full: 9999px;
|
|
--height-btn: 44px;
|
|
--height-input: 44px;
|
|
--height-nav: 64px;
|
|
--space-1: 4px;
|
|
--space-2: 8px;
|
|
--space-3: 12px;
|
|
--space-4: 16px;
|
|
--space-5: 20px;
|
|
--space-6: 24px;
|
|
--shadow-card: 0 2px 12px rgba(0, 0, 0, 0.04);
|
|
--shadow-card-hover: 0 6px 20px rgba(0, 0, 0, 0.06);
|
|
--shadow-btn: 0 2px 8px rgba(38, 194, 187, 0.25);
|
|
--shadow-btn-hover: 0 4px 16px rgba(38, 194, 187, 0.35);
|
|
--shadow-modal: 0 16px 48px rgba(0, 0, 0, 0.12);
|
|
--shadow-float: 0 4px 24px rgba(0, 0, 0, 0.08);
|
|
--shadow-inset: inset 0 1px 3px rgba(0, 0, 0, 0.03);
|
|
--glass-bg: rgba(255, 255, 255, 0.72);
|
|
--glass-blur: blur(20px);
|
|
--glass-border: rgba(255, 255, 255, 0.3);
|
|
|
|
}
|
|
|
|
html, body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'SF Pro Display', 'Helvetica Neue', 'Segoe UI', Roboto, sans-serif;
|
|
background: var(--youth-bg-page);
|
|
color: var(--youth-text-primary);
|
|
min-height: 100vh;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.app-container {
|
|
width: 375px;
|
|
height: 812px;
|
|
margin: 0 auto;
|
|
background: var(--youth-bg-page);
|
|
position: relative;
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* ===== 状态栏 ===== */
|
|
.status-bar {
|
|
height: 36px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 20px;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: var(--youth-text-primary);
|
|
position: relative;
|
|
z-index: 10;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.status-bar .right-icons {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.status-bar svg {
|
|
width: 16px;
|
|
height: 16px;
|
|
}
|
|
|
|
/* ===== 导航栏 ===== */
|
|
.nav-bar {
|
|
height: 64px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 16px;
|
|
position: relative;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.nav-btn {
|
|
width: 32px;
|
|
height: 32px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: var(--youth-radius-lg);
|
|
background: var(--youth-bg-card);
|
|
border: 1px solid var(--youth-border-light);
|
|
box-shadow: var(--shadow-card), var(--youth-inset-soft);
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
color: var(--youth-text-primary);
|
|
}
|
|
|
|
.nav-btn:active {
|
|
transform: scale(0.95);
|
|
box-shadow: var(--youth-inset-soft);
|
|
}
|
|
|
|
.nav-skip {
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: var(--youth-muted-foreground);
|
|
cursor: pointer;
|
|
padding: 6px 10px;
|
|
border-radius: var(--youth-radius-md);
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.nav-skip:active {
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.nav-title {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: var(--youth-text-primary);
|
|
position: absolute;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
}
|
|
|
|
/* ===== 分步进度条 ===== */
|
|
.stepper-section {
|
|
padding: 4px 20px 4px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.stepper-track {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
position: relative;
|
|
padding: 0 4px;
|
|
}
|
|
|
|
.stepper-line {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 16px;
|
|
right: 16px;
|
|
height: 3px;
|
|
transform: translateY(-50%);
|
|
background: var(--youth-gray-200);
|
|
border-radius: var(--youth-radius-full);
|
|
box-shadow: var(--youth-inset-soft);
|
|
z-index: 0;
|
|
}
|
|
|
|
.stepper-line-fill {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
height: 100%;
|
|
width: 0%;
|
|
background: var(--youth-gradient-progress);
|
|
border-radius: var(--youth-radius-full);
|
|
box-shadow: 0 1px 2px rgba(38, 194, 187, 0.3);
|
|
transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
.stepper-line-fill::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 50%;
|
|
background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
|
|
border-radius: var(--youth-radius-full) var(--youth-radius-full) 0 0;
|
|
}
|
|
|
|
.stepper-dot {
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: 50%;
|
|
background: var(--youth-gray-200);
|
|
border: 2px solid var(--youth-gray-300);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: var(--youth-gray-400);
|
|
position: relative;
|
|
z-index: 1;
|
|
transition: all 0.3s ease;
|
|
box-shadow: var(--youth-inset-soft);
|
|
}
|
|
|
|
.stepper-dot.active {
|
|
background: var(--youth-gradient-primary);
|
|
border-color: transparent;
|
|
color: white;
|
|
box-shadow: 0 3px 10px rgba(38, 194, 187, 0.4),
|
|
0 0 0 3px rgba(38, 194, 187, 0.15),
|
|
var(--youth-inset-soft);
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.stepper-dot.active::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 2px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: 8px;
|
|
height: 3px;
|
|
background: rgba(255,255,255,0.4);
|
|
border-radius: 2px;
|
|
filter: blur(1px);
|
|
}
|
|
|
|
.stepper-info {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-top: 4px;
|
|
padding: 0 4px;
|
|
}
|
|
|
|
.stepper-label {
|
|
font-size: 12px;
|
|
color: var(--youth-muted-foreground);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.stepper-step-text {
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
color: var(--youth-primary);
|
|
}
|
|
|
|
/* ===== 内容区 ===== */
|
|
.content-scroll {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
position: relative;
|
|
z-index: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 0;
|
|
}
|
|
|
|
/* ===== 标题区 ===== */
|
|
.hero-section {
|
|
padding: 8px 20px 6px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.hero-title {
|
|
font-size: 20px;
|
|
line-height: 1.2;
|
|
font-weight: 700;
|
|
letter-spacing: -0.02em;
|
|
color: var(--youth-text-primary);
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.hero-subtitle {
|
|
font-size: 14px;
|
|
color: var(--youth-muted-foreground);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* ===== 头像上传区 ===== */
|
|
.avatar-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 2px 20px 8px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.avatar-wrapper {
|
|
position: relative;
|
|
width: 64px;
|
|
height: 64px;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.avatar-wrapper:active {
|
|
transform: scale(0.96);
|
|
}
|
|
|
|
.avatar-ring {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
border-radius: 50%;
|
|
padding: 2.5px;
|
|
background: var(--youth-gradient-primary);
|
|
box-shadow: 0 3px 12px rgba(38, 194, 187, 0.25);
|
|
}
|
|
|
|
.avatar-inner {
|
|
width: 100%;
|
|
height: 100%;
|
|
border-radius: 50%;
|
|
background: var(--youth-bg-card);
|
|
border: 2px dashed var(--youth-primary-300, #7ED6D2);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: var(--youth-inset-soft);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.avatar-placeholder-icon {
|
|
color: var(--youth-gray-300);
|
|
}
|
|
|
|
.avatar-camera-btn {
|
|
position: absolute;
|
|
bottom: 0;
|
|
right: 0;
|
|
width: 26px;
|
|
height: 26px;
|
|
border-radius: 50%;
|
|
background: var(--youth-gradient-primary);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: 0 2px 6px rgba(38, 194, 187, 0.4);
|
|
border: 2px solid var(--youth-bg-card);
|
|
z-index: 2;
|
|
}
|
|
|
|
.avatar-camera-btn svg {
|
|
width: 13px;
|
|
height: 13px;
|
|
color: white;
|
|
}
|
|
|
|
.avatar-hint {
|
|
margin-top: 6px;
|
|
font-size: 12px;
|
|
color: var(--youth-muted-foreground);
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* ===== 表单区 ===== */
|
|
.form-section {
|
|
padding: 0 20px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.form-label {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: var(--youth-text-primary);
|
|
margin-bottom: 8px;
|
|
display: block;
|
|
}
|
|
|
|
/* ===== 昵称输入框 ===== */
|
|
.input-wrapper {
|
|
position: relative;
|
|
}
|
|
|
|
.input-icon {
|
|
position: absolute;
|
|
left: 12px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
color: var(--youth-gray-400);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 1;
|
|
}
|
|
|
|
.input-icon svg {
|
|
width: 16px;
|
|
height: 44px;
|
|
}
|
|
|
|
.youth-input {
|
|
background: var(--youth-input);
|
|
border: 1px solid var(--youth-border-light);
|
|
border-radius: var(--youth-radius-lg);
|
|
padding: 9px 12px 9px 34px;
|
|
font-size: 14px;
|
|
color: var(--youth-text-primary);
|
|
box-shadow: var(--youth-inset-input);
|
|
transition: all 0.2s ease;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
font-family: inherit;
|
|
}
|
|
|
|
.youth-input:focus {
|
|
outline: none;
|
|
border-color: var(--youth-primary);
|
|
box-shadow: var(--youth-inset-input), 0 0 0 3px rgba(38, 194, 187, 0.15);
|
|
}
|
|
|
|
.youth-input::placeholder {
|
|
color: var(--youth-gray-400);
|
|
}
|
|
|
|
.char-count {
|
|
position: absolute;
|
|
right: 12px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
font-size: 11px;
|
|
color: var(--youth-gray-400);
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* ===== 性别选择卡片 ===== */
|
|
.gender-cards {
|
|
display: flex;
|
|
gap: 10px;
|
|
}
|
|
|
|
.gender-card {
|
|
flex: 1;
|
|
height: 76px;
|
|
border-radius: var(--youth-radius-xl);
|
|
background: var(--youth-bg-card);
|
|
border: 2px solid var(--youth-border-light);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 4px;
|
|
cursor: pointer;
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
position: relative;
|
|
box-shadow: var(--shadow-card), var(--youth-inset-soft);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.gender-card::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 1px;
|
|
background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.gender-card:active {
|
|
transform: scale(0.97);
|
|
}
|
|
|
|
.gender-card.selected {
|
|
background: linear-gradient(180deg, rgba(38, 194, 187, 0.12) 0%, rgba(38, 194, 187, 0.06) 100%);
|
|
border-color: var(--youth-primary);
|
|
box-shadow: 0 6px 18px rgba(38, 194, 187, 0.2),
|
|
0 0 0 1px rgba(38, 194, 187, 0.1),
|
|
var(--youth-inset-soft);
|
|
}
|
|
|
|
.gender-card.selected::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 50%;
|
|
background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 100%);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.gender-icon {
|
|
width: 32px;
|
|
height: 32px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: var(--youth-radius-lg);
|
|
background: var(--youth-gray-100);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.gender-card.selected .gender-icon {
|
|
background: var(--youth-gradient-primary);
|
|
box-shadow: 0 3px 10px rgba(38, 194, 187, 0.3);
|
|
}
|
|
|
|
.gender-icon svg {
|
|
width: 20px;
|
|
height: 20px;
|
|
color: var(--youth-gray-500);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.gender-card.selected .gender-icon svg {
|
|
color: white;
|
|
}
|
|
|
|
.gender-text {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: var(--youth-muted-foreground);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.gender-card.selected .gender-text {
|
|
color: var(--youth-primary);
|
|
}
|
|
|
|
/* ===== 底部操作区 ===== */
|
|
.bottom-actions {
|
|
padding: 8px 20px 14px;
|
|
flex-shrink: 0;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.btn-next {
|
|
width: 100%;
|
|
height: 44px;
|
|
background: var(--youth-gradient-primary);
|
|
color: var(--youth-primary-foreground);
|
|
border: none;
|
|
border-radius: var(--youth-radius-xl);
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
box-shadow: var(--youth-shadow-soft), 0 4px 12px rgba(38, 194, 187, 0.25);
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
position: relative;
|
|
overflow: hidden;
|
|
font-family: inherit;
|
|
}
|
|
|
|
.btn-next::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 50%;
|
|
background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 100%);
|
|
border-radius: var(--youth-radius-xl) var(--youth-radius-xl) 0 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.btn-next::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: -100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
|
|
transition: left 0.6s ease;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.btn-next:active {
|
|
transform: scale(0.98);
|
|
box-shadow: 0 2px 8px rgba(38, 194, 187, 0.2);
|
|
}
|
|
|
|
.btn-next:active::after {
|
|
left: 100%;
|
|
}
|
|
|
|
.btn-skip-bottom {
|
|
display: block;
|
|
width: 100%;
|
|
text-align: center;
|
|
margin-top: 6px;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: var(--youth-muted-foreground);
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
padding: 4px 0;
|
|
}
|
|
|
|
.btn-skip-bottom:active {
|
|
opacity: 0.7;
|
|
}
|
|
|
|
@media (max-width: 375px) {
|
|
}
|
|
|
|
.bg-decoration-2 {
|
|
position: absolute;
|
|
bottom: 150px;
|
|
left: -100px;
|
|
width: 220px;
|
|
height: 220px;
|
|
background: radial-gradient(circle, rgba(84, 202, 197, 0.07) 0%, transparent 70%);
|
|
border-radius: 50%;
|
|
pointer-events: none;
|
|
z-index: 0;
|
|
}
|
|
|
|
/* ===== 响应式 ===== */
|
|
@media (max-width: 375px) {
|
|
.app-container {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
/* SVG 图标统一尺寸 */
|
|
.icon-svg {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 1em;
|
|
height: 1em;
|
|
vertical-align: middle;
|
|
line-height: 1;
|
|
}
|
|
.icon-svg svg {
|
|
width: 100%;
|
|
height: 100%;
|
|
stroke: currentColor;
|
|
}
|
|
/* 侧栏图标 */
|
|
.sidebar-icon .icon-svg { width: 22px; height: 22px; font-size: 22px; }
|
|
/* 社团logo图标 */
|
|
.club-logo .icon-svg { width: 28px; height: 28px; font-size: 28px; color: #fff; }
|
|
/* 头图大图标 */
|
|
.hero-icon .icon-svg { width: 56px; height: 56px; font-size: 56px; opacity: 0.3; }
|
|
/* meta 小图标 */
|
|
.club-meta .icon-svg { width: 12px; height: 12px; font-size: 12px; }
|
|
/* 分类选择网格图标 */
|
|
.cat-option .icon-svg { width: 26px; height: 26px; font-size: 26px; }
|
|
/* logo预览图标 */
|
|
.logo-preview .icon-svg { width: 40px; height: 40px; font-size: 40px; color: #fff; }
|
|
/* 提示图标 */
|
|
.notice-icon .icon-svg { width: 18px; height: 18px; font-size: 18px; }
|
|
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="app-container" id="page-profile-1">
|
|
<!-- 背景装饰 -->
|
|
<div class="bg-decoration"></div>
|
|
<div class="bg-decoration-2"></div>
|
|
|
|
<!-- 状态栏 -->
|
|
<div class="status-bar">
|
|
<span>9:41</span>
|
|
<div class="right-icons">
|
|
<svg viewBox="0 0 24 24" fill="currentColor">
|
|
<path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3c-1.65-1.66-4.34-1.66-6 0zm-4-4l2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13z"/>
|
|
</svg>
|
|
<svg viewBox="0 0 24 24" fill="currentColor">
|
|
<path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4z"/>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 导航栏 -->
|
|
<div class="nav-bar">
|
|
<button class="nav-btn" data-dom-id="btn-back" onclick="history.back()">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
<polyline points="15 18 9 12 15 6"></polyline>
|
|
</svg>
|
|
</button>
|
|
<span class="nav-title">完善资料</span>
|
|
<span class="nav-skip" data-dom-id="btn-skip-top" onclick="handleSkip()">跳过</span>
|
|
</div>
|
|
|
|
<!-- 分步进度条 -->
|
|
<div class="stepper-section">
|
|
<div class="stepper-track">
|
|
<div class="stepper-line">
|
|
<div class="stepper-line-fill" id="stepper-fill"></div>
|
|
</div>
|
|
<div class="stepper-dot active">
|
|
<span>1</span>
|
|
</div>
|
|
<div class="stepper-dot">
|
|
<span>2</span>
|
|
</div>
|
|
<div class="stepper-dot">
|
|
<span>3</span>
|
|
</div>
|
|
</div>
|
|
<div class="stepper-info">
|
|
<span class="stepper-label">基本信息</span>
|
|
<span class="stepper-step-text">1 / 3</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 可滚动内容区 -->
|
|
<div class="content-scroll">
|
|
<!-- 标题区 -->
|
|
<div class="hero-section">
|
|
<h1 class="hero-title">你叫什么名字?</h1>
|
|
<p class="hero-subtitle">让同学们更好地认识你</p>
|
|
</div>
|
|
|
|
<!-- 头像上传区 -->
|
|
<div class="avatar-section">
|
|
<div class="avatar-wrapper" data-dom-id="btn-avatar-upload" onclick="handleAvatarUpload()">
|
|
<div class="avatar-ring">
|
|
<div class="avatar-inner">
|
|
<svg class="avatar-placeholder-icon" width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
|
<circle cx="12" cy="7" r="4"></circle>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<div class="avatar-camera-btn">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path>
|
|
<circle cx="12" cy="13" r="4"></circle>
|
|
</svg>
|
|
</div>
|
|
</div>
|
|
<span class="avatar-hint">点击上传头像</span>
|
|
</div>
|
|
|
|
<!-- 表单区 -->
|
|
<div class="form-section">
|
|
<!-- 昵称输入 -->
|
|
<div class="form-group">
|
|
<label class="form-label" for="input-nickname">你的昵称</label>
|
|
<div class="input-wrapper">
|
|
<span class="input-icon">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
|
<circle cx="12" cy="7" r="4"></circle>
|
|
</svg>
|
|
</span>
|
|
<input
|
|
type="text"
|
|
id="input-nickname"
|
|
class="youth-input"
|
|
data-dom-id="input-nickname"
|
|
placeholder="请输入昵称"
|
|
maxlength="20"
|
|
oninput="handleNicknameInput(this)"
|
|
>
|
|
<span class="char-count" id="char-count">0/20</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 性别选择 -->
|
|
<div class="form-group">
|
|
<label class="form-label">选择你的性别</label>
|
|
<div class="gender-cards">
|
|
<div class="gender-card" data-dom-id="gender-male" onclick="selectGender('male')">
|
|
<div class="gender-icon">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<circle cx="10" cy="14" r="5"></circle>
|
|
<line x1="19" y1="5" x2="13.6" y2="10.4"></line>
|
|
<polyline points="21 2 21 8 15 8"></polyline>
|
|
</svg>
|
|
</div>
|
|
<span class="gender-text">男</span>
|
|
</div>
|
|
<div class="gender-card" data-dom-id="gender-female" onclick="selectGender('female')">
|
|
<div class="gender-icon">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<circle cx="12" cy="9" r="5"></circle>
|
|
<line x1="12" y1="14" x2="12" y2="21"></line>
|
|
<line x1="9" y1="18" x2="15" y2="18"></line>
|
|
</svg>
|
|
</div>
|
|
<span class="gender-text">女</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 底部操作区 -->
|
|
<div class="bottom-actions">
|
|
<button class="btn-next" data-dom-id="btn-next" onclick="handleNext()">
|
|
下一步
|
|
</button>
|
|
<span class="btn-skip-bottom" data-dom-id="btn-skip-bottom" onclick="handleSkip()">
|
|
跳过此步
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script>// ===== 主题切换 =====
|
|
|
|
// 初始化主题
|
|
})();
|
|
|
|
// ===== 昵称输入字数统计 =====
|
|
function handleNicknameInput(input) {
|
|
const count = input.value.length;
|
|
document.getElementById('char-count').textContent = count + '/20';
|
|
}
|
|
|
|
// ===== 性别选择 =====
|
|
let selectedGender = null;
|
|
|
|
function selectGender(gender) {
|
|
selectedGender = gender;
|
|
const maleCard = document.querySelector('[data-dom-id="gender-male"]');
|
|
const femaleCard = document.querySelector('[data-dom-id="gender-female"]');
|
|
|
|
if (gender === 'male') {
|
|
maleCard.classList.add('selected');
|
|
femaleCard.classList.remove('selected');
|
|
} else {
|
|
femaleCard.classList.add('selected');
|
|
maleCard.classList.remove('selected');
|
|
}
|
|
}
|
|
|
|
// ===== 头像上传 =====
|
|
function handleAvatarUpload() {
|
|
// 模拟头像上传
|
|
console.log('上传头像');
|
|
// 实际项目中可触发文件选择
|
|
// const input = document.createElement('input');
|
|
// input.type = 'file';
|
|
// input.accept = 'image/*';
|
|
// input.click();
|
|
}
|
|
|
|
// ===== 下一步 =====
|
|
function handleNext() {
|
|
const nickname = document.getElementById('input-nickname').value.trim();
|
|
|
|
if (!nickname) {
|
|
alert('请输入昵称');
|
|
return;
|
|
}
|
|
|
|
if (!selectedGender) {
|
|
alert('请选择性别');
|
|
return;
|
|
}
|
|
|
|
// 保存到 localStorage(模拟)
|
|
localStorage.setItem('youth-profile-nickname', nickname);
|
|
localStorage.setItem('youth-profile-gender', selectedGender);
|
|
|
|
// 跳转到下一步
|
|
window.location.href = 'profile-2.html';
|
|
}
|
|
|
|
// ===== 跳过 =====
|
|
function handleSkip() {
|
|
// 跳过资料完善
|
|
console.log('跳过此步');
|
|
// 实际项目中可跳转到首页或下一步
|
|
// window.location.href = 'profile-2.html';
|
|
alert('已跳过此步');
|
|
}</script>
|
|
</body>
|
|
</html>
|
|
|