This commit is contained in:
oneao committed 2025-12-02 17:30:50 +08:00
1 parent 0ab2796dd4
commit f7b0c6ad2f
26 files changed
+1893 -354

No files matched your search

+194 -123
View File
@@ -1,148 +1,219 @@
<!DOCTYPE html>
<html lang="zh">
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<title>高级邀请页面</title>
<style>
body {
margin: 0;
font-family: "Inter", sans-serif;
background: #f3f4f7;
}
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>初次登录引导页</title>
<style>
/* 重置样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Arial, sans-serif;
}
/* 顶部渐变 Header */
.header {
width: 100%;
padding: 40px 24px;
background: linear-gradient(135deg, #4d8dff, #6fa5ff);
color: white;
font-size: 26px;
font-weight: 600;
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: #f7f7f7;
}
/* 内容卡片 */
.container {
margin-top: -32px;
padding: 0 24px 40px;
}
.onboarding-container {
width: 90%;
max-width: 400px;
background: #fff;
border-radius: 16px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
overflow: hidden;
display: flex;
flex-direction: column;
text-align: center;
padding: 24px;
animation: fadeIn 0.5s ease-in-out;
}
.card {
background: white;
padding: 24px;
border-radius: 20px;
box-shadow: 0 6px 20px rgba(0,0,0,0.06);
margin-bottom: 24px;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
.title-row {
display: flex;
align-items: center;
justify-content: space-between;
}
to {
opacity: 1;
transform: translateY(0);
}
}
.title {
font-size: 20px;
font-weight: 600;
}
.onboarding-step {
display: none;
flex-direction: column;
align-items: center;
}
.invite-code {
font-size: 40px;
font-weight: 700;
letter-spacing: 4px;
color: #333;
text-align: center;
margin-top: 12px;
}
.onboarding-step.active {
display: flex;
}
.copy-btn {
display: flex;
justify-content: center;
margin-top: 8px;
font-size: 14px;
color: #4d8dff;
cursor: pointer;
}
.avatar {
width: 100px;
height: 100px;
border-radius: 50%;
background: #ccc;
margin-bottom: 16px;
overflow: hidden;
}
/* 二维码卡片设计 */
.qr-card {
background: white;
padding: 20px;
border-radius: 20px;
text-align: center;
box-shadow: 0 4px 14px rgba(0,0,0,0.05);
margin-bottom: 24px;
}
.avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}
.qr-img {
width: 190px;
height: 190px;
border-radius: 12px;
border: 1px solid #eee;
}
.username {
font-size: 20px;
font-weight: bold;
margin-bottom: 8px;
}
.badge {
background: #eef1ff;
padding: 6px 14px;
border-radius: 14px;
font-size: 14px;
color: #4d5bff;
}
.info-text {
font-size: 14px;
color: #666;
margin-bottom: 24px;
}
.member-item {
padding: 14px 0;
border-bottom: 1px solid #f0f0f0;
font-size: 16px;
}
.buttons {
display: flex;
justify-content: space-between;
width: 100%;
}
.member-item:last-child {
border-bottom: none;
}
</style>
.btn {
padding: 10px 20px;
border-radius: 8px;
border: none;
cursor: pointer;
font-size: 16px;
flex: 1;
margin: 0 4px;
}
.btn-primary {
background: #4CAF50;
color: #fff;
}
.btn-secondary {
background: #e0e0e0;
color: #333;
}
.progress {
display: flex;
justify-content: center;
margin-top: 16px;
}
.dot {
width: 10px;
height: 10px;
background: #ddd;
border-radius: 50%;
margin: 0 4px;
transition: background 0.3s;
}
.dot.active {
background: #4CAF50;
}
</style>
</head>
<body>
<!-- Header -->
<div class="header">邀请好友加入空间</div>
<!-- 内容 -->
<div class="container">
<!-- 邀请码卡片 -->
<div class="card">
<div class="title-row">
<div class="title">我的邀请码</div>
<div class="onboarding-container">
<!-- 步骤 1 -->
<div class="onboarding-step active" id="step-1">
<div class="avatar">
<img src="https://placekitten.com/200/200" alt="头像">
</div>
<div class="username">张三</div>
<div class="info-text">欢迎加入我们的平台!让我们来完成一些设置吧。</div>
<div class="buttons">
<button class="btn btn-secondary" disabled>上一步</button>
<button class="btn btn-primary" onclick="nextStep()">下一步</button>
</div>
</div>
<div class="invite-code">123456</div>
<div class="copy-btn">点击复制邀请码</div>
</div>
<!-- 二维码卡片 -->
<div class="qr-card">
<img
src="https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=demo"
class="qr-img"
alt="二维码"
/>
<p style="margin-top: 12px; color: #666; font-size: 14px;">
扫码加入我的共享空间
</p>
</div>
<!-- 成员卡片 -->
<div class="card">
<div class="title-row">
<div class="title">空间成员</div>
<div class="badge">3 人</div>
<!-- 步骤 2 -->
<div class="onboarding-step" id="step-2">
<div class="username">选择你的兴趣</div>
<div class="info-text">帮助我们推荐更适合你的内容</div>
<div class="buttons">
<button class="btn btn-secondary" onclick="prevStep()">上一步</button>
<button class="btn btn-primary" onclick="nextStep()">下一步</button>
</div>
</div>
<div class="member-item">成员 A</div>
<div class="member-item">成员 B</div>
<div class="member-item">成员 C</div>
<!-- 步骤 3 -->
<div class="onboarding-step" id="step-3">
<div class="username">完成!</div>
<div class="info-text">你已经准备好开始使用了</div>
<div class="buttons">
<button class="btn btn-secondary" onclick="prevStep()">上一步</button>
<button class="btn btn-primary" onclick="finishOnboarding()">开始使用</button>
</div>
</div>
<!-- 进度指示器 -->
<div class="progress">
<div class="dot active" id="dot-1"></div>
<div class="dot" id="dot-2"></div>
<div class="dot" id="dot-3"></div>
</div>
</div>
</div>
<script>
let currentStep = 1;
const totalSteps = 3;
function showStep(step) {
for (let i = 1; i <= totalSteps; i++) {
const s = document.getElementById(`step-${i}`);
const d = document.getElementById(`dot-${i}`);
if (i === step) {
s.classList.add('active');
d.classList.add('active');
} else {
s.classList.remove('active');
d.classList.remove('active');
}
}
}
function nextStep() {
if (currentStep < totalSteps) {
currentStep++;
showStep(currentStep);
}
}
function prevStep() {
if (currentStep > 1) {
currentStep--;
showStep(currentStep);
}
}
function finishOnboarding() {
alert('初始化完成,进入应用!');
// 这里可以跳转到首页或关闭引导页
}
</script>
</body>
</html>
</html>