提交样式修改,登录和云盘页面
This commit is contained in:
364
docs/front-proto/01login/index.html
Normal file
364
docs/front-proto/01login/index.html
Normal file
@@ -0,0 +1,364 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>CloudStorage - 登录</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
background: linear-gradient(135deg, #667eea, #764ba2);
|
||||
background-size: 400% 400%;
|
||||
animation: gradientBG 15s ease infinite;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
@keyframes gradientBG {
|
||||
0% { background-position: 0% 50%; }
|
||||
50% { background-position: 100% 50%; }
|
||||
100% { background-position: 0% 50%; }
|
||||
}
|
||||
|
||||
.login-container {
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
backdrop-filter: blur(10px);
|
||||
border-radius: 20px;
|
||||
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
|
||||
width: 100%;
|
||||
max-width: 420px;
|
||||
padding: 40px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.login-container::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -50%;
|
||||
left: -50%;
|
||||
width: 200%;
|
||||
height: 200%;
|
||||
background: conic-gradient(
|
||||
transparent,
|
||||
rgba(168, 85, 247, 0.4),
|
||||
transparent 30%
|
||||
);
|
||||
animation: rotate 6s linear infinite;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
@keyframes rotate {
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.logo {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.logo i {
|
||||
font-size: 48px;
|
||||
color: #667eea;
|
||||
background: linear-gradient(135deg, #667eea, #764ba2);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
.logo h1 {
|
||||
font-size: 28px;
|
||||
font-weight: 700;
|
||||
margin-top: 15px;
|
||||
color: #333;
|
||||
background: linear-gradient(135deg, #667eea, #764ba2);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
.logo p {
|
||||
color: #666;
|
||||
margin-top: 8px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
margin-bottom: 25px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.input-group i {
|
||||
position: absolute;
|
||||
left: 15px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #999;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.input-group input {
|
||||
width: 100%;
|
||||
padding: 15px 15px 15px 45px;
|
||||
border: 2px solid #e1e5e9;
|
||||
border-radius: 12px;
|
||||
font-size: 16px;
|
||||
transition: all 0.3s ease;
|
||||
background: #f8f9fa;
|
||||
}
|
||||
|
||||
.input-group input:focus {
|
||||
outline: none;
|
||||
border-color: #667eea;
|
||||
background: white;
|
||||
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
|
||||
}
|
||||
|
||||
.options {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 25px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.remember-me {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.remember-me input {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.forgot-password {
|
||||
color: #667eea;
|
||||
text-decoration: none;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
.forgot-password:hover {
|
||||
color: #764ba2;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
width: 100%;
|
||||
padding: 15px;
|
||||
background: linear-gradient(135deg, #667eea, #764ba2);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
|
||||
}
|
||||
|
||||
.login-btn:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
|
||||
}
|
||||
|
||||
.login-btn:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.divider {
|
||||
text-align: center;
|
||||
margin: 30px 0;
|
||||
position: relative;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.divider::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 1px;
|
||||
background: #e1e5e9;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.divider span {
|
||||
background: white;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.signup-link {
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.signup-link a {
|
||||
color: #667eea;
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
.signup-link a:hover {
|
||||
color: #764ba2;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.login-container {
|
||||
padding: 30px 20px;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.logo h1 {
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="login-container">
|
||||
<div class="logo">
|
||||
<i class="fas fa-cloud"></i>
|
||||
<h1>CloudStorage</h1>
|
||||
<p>安全可靠的云端存储服务</p>
|
||||
</div>
|
||||
|
||||
<form id="loginForm">
|
||||
<div class="input-group">
|
||||
<i class="fas fa-user"></i>
|
||||
<input type="text" placeholder="用户名或邮箱" required>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<i class="fas fa-lock"></i>
|
||||
<input type="password" placeholder="密码" required>
|
||||
</div>
|
||||
|
||||
<div class="options">
|
||||
<label class="remember-me">
|
||||
<input type="checkbox"> 记住我
|
||||
</label>
|
||||
<a href="#" class="forgot-password">忘记密码?</a>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="login-btn">
|
||||
登录账户
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<div class="divider">
|
||||
<span>新用户?</span>
|
||||
</div>
|
||||
|
||||
<div class="signup-link">
|
||||
还没有账户?<a href="#" onclick="showRegisterPage()">立即注册</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function showRegisterPage() {
|
||||
document.body.innerHTML = `
|
||||
<div class="login-container">
|
||||
<div class="logo">
|
||||
<i class="fas fa-user-plus"></i>
|
||||
<h1>用户注册</h1>
|
||||
<p>创建您的云端存储账户</p>
|
||||
</div>
|
||||
|
||||
<form id="registerForm">
|
||||
<div class="input-group">
|
||||
<i class="fas fa-user"></i>
|
||||
<input type="text" placeholder="账户名" required>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<i class="fas fa-lock"></i>
|
||||
<input type="password" placeholder="密码" required id="password">
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<i class="fas fa-lock"></i>
|
||||
<input type="password" placeholder="确认密码" required id="confirmPassword">
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<i class="fas fa-envelope"></i>
|
||||
<input type="email" placeholder="邮箱地址" required>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="login-btn">
|
||||
注册账户
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<div class="signup-link">
|
||||
已有账户?<a href="#" onclick="showLoginPage()">立即登录</a>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
document.getElementById('registerForm').addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
const password = document.getElementById('password').value;
|
||||
const confirmPassword = document.getElementById('confirmPassword').value;
|
||||
|
||||
if (password !== confirmPassword) {
|
||||
alert('密码和确认密码不匹配!');
|
||||
return;
|
||||
}
|
||||
|
||||
const btn = this.querySelector('.login-btn');
|
||||
const originalText = btn.textContent;
|
||||
|
||||
btn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> 注册中...';
|
||||
btn.disabled = true;
|
||||
|
||||
// 模拟注册过程
|
||||
setTimeout(() => {
|
||||
btn.innerHTML = originalText;
|
||||
btn.disabled = false;
|
||||
alert('注册成功!');
|
||||
}, 2000);
|
||||
});
|
||||
}
|
||||
|
||||
function showLoginPage() {
|
||||
location.reload();
|
||||
}
|
||||
|
||||
document.getElementById('loginForm').addEventListener('submit', function(e) {
|
||||
e.preventDefault();
|
||||
const btn = this.querySelector('.login-btn');
|
||||
const originalText = btn.textContent;
|
||||
|
||||
btn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> 登录中...';
|
||||
btn.disabled = true;
|
||||
|
||||
// 模拟登录过程
|
||||
setTimeout(() => {
|
||||
btn.innerHTML = originalText;
|
||||
btn.disabled = false;
|
||||
alert('登录成功!');
|
||||
}, 2000);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user