init: TEALab 2025 实验室网站项目
从百度网盘 /apps/bypy/dofile/ 下载的完整项目结构,包含: - dofile/: Flask 后端(端口 5000)+ 静态前端(端口 6002) - officefile/: 项目相关文档 - .gitignore: Python venv / 日志 / 缓存 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,184 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN" class="scroll-smooth">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>用户登录 | Design AI & Ecology Lab</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="css/common.css">
|
||||
</head>
|
||||
<body class="antialiased bg-gray-50">
|
||||
|
||||
<!-- Navigation -->
|
||||
<nav class="fixed w-full z-50 bg-white/90 backdrop-blur-sm border-b border-gray-100 transition-all duration-300" id="navbar">
|
||||
<div class="max-w-7xl mx-auto px-6 lg:px-12 h-20 flex items-center justify-between">
|
||||
<a href="website.html" class="text-xl tracking-tight font-bold flex items-center gap-2">
|
||||
<div class="w-8 h-8 bg-black text-white flex items-center justify-center font-serif italic">D</div>
|
||||
<span>DAEL<span class="text-gray-400 font-light mx-2">/</span><span class="text-sm font-normal text-gray-600 hidden sm:inline">Design AI & Ecology Lab</span></span>
|
||||
</a>
|
||||
|
||||
<button id="mobile-menu-btn" class="md:hidden p-2 text-gray-600">
|
||||
<i data-lucide="menu"></i>
|
||||
</button>
|
||||
|
||||
<div class="hidden md:flex items-center space-x-6 text-sm font-medium tracking-wide text-gray-800">
|
||||
<a href="website.html#about" class="nav-link hover:text-black">关于实验室</a>
|
||||
<a href="website.html#research" class="nav-link hover:text-black">研究方向</a>
|
||||
<a href="publications.html" class="nav-link hover:text-black">成果展示</a>
|
||||
<a href="website.html#team" class="nav-link hover:text-black">研究团队</a>
|
||||
<a href="news.html" class="nav-link hover:text-black">新闻资讯</a>
|
||||
<a href="website.html#contact" class="nav-link hover:text-black">加入我们</a>
|
||||
|
||||
<form id="search-form" class="relative search-box">
|
||||
<input type="text" id="search-input" placeholder="搜索..."
|
||||
class="px-4 py-2 text-sm border border-gray-300 rounded-full focus:outline-none focus:border-black w-40">
|
||||
<button type="submit" class="absolute right-2 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-black">
|
||||
<i data-lucide="search" class="w-4 h-4"></i>
|
||||
</button>
|
||||
<div id="search-results" class="search-results"></div>
|
||||
</form>
|
||||
|
||||
<a href="login.html" id="login-btn" class="text-xs border border-gray-300 px-4 py-2 rounded hover:bg-black hover:text-white transition-colors">登录</a>
|
||||
<a href="#" id="logout-btn" class="hidden text-xs border border-gray-300 px-4 py-2 rounded hover:bg-black hover:text-white transition-colors">退出</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="mobile-menu" class="hidden md:hidden bg-white border-b border-gray-100 absolute w-full px-6 py-4 space-y-4 shadow-lg">
|
||||
<a href="website.html#about" class="block text-gray-800 hover:text-black">关于实验室</a>
|
||||
<a href="website.html#research" class="block text-gray-800 hover:text-black">研究方向</a>
|
||||
<a href="publications.html" class="block text-gray-800 hover:text-black">成果展示</a>
|
||||
<a href="website.html#team" class="block text-gray-800 hover:text-black">研究团队</a>
|
||||
<a href="news.html" class="block text-gray-800 hover:text-black">新闻资讯</a>
|
||||
<a href="website.html#contact" class="block text-gray-800 hover:text-black">加入我们</a>
|
||||
<a href="login.html" class="block text-gray-800 hover:text-black">登录</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Login Form -->
|
||||
<section class="pt-32 pb-24 min-h-screen flex items-center">
|
||||
<div class="max-w-md mx-auto px-6 w-full">
|
||||
<div class="bg-white p-8 border border-gray-200">
|
||||
<h1 class="text-3xl font-bold mb-2">登录</h1>
|
||||
<p class="text-gray-600 text-sm mb-8">登录以访问更多内容</p>
|
||||
|
||||
<form id="login-form" class="login-form">
|
||||
<div class="mb-6">
|
||||
<label for="username" class="block text-sm font-medium text-gray-700 mb-2">用户名</label>
|
||||
<input type="text" id="username" name="username" required
|
||||
class="form-input" placeholder="请输入用户名">
|
||||
</div>
|
||||
|
||||
<div class="mb-6">
|
||||
<label for="password" class="block text-sm font-medium text-gray-700 mb-2">密码</label>
|
||||
<input type="password" id="password" name="password" required
|
||||
class="form-input" placeholder="请输入密码">
|
||||
</div>
|
||||
|
||||
<div class="mb-6 flex items-center justify-between">
|
||||
<label class="flex items-center">
|
||||
<input type="checkbox" id="remember" class="mr-2">
|
||||
<span class="text-sm text-gray-600">记住我</span>
|
||||
</label>
|
||||
<a href="#" class="text-sm text-gray-600 hover:text-black">忘记密码?</a>
|
||||
</div>
|
||||
|
||||
<div id="login-error" class="mb-4 text-sm text-red-600 hidden"></div>
|
||||
|
||||
<button type="submit"
|
||||
class="w-full bg-black text-white py-3 px-4 rounded hover:bg-gray-800 transition-colors font-medium">
|
||||
登录
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<div class="mt-6 text-center text-sm text-gray-600">
|
||||
<p>演示模式:任意用户名和密码即可登录</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="bg-black text-white py-16 border-t border-gray-800">
|
||||
<div class="max-w-7xl mx-auto px-6 lg:px-12">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-12 mb-16">
|
||||
<div>
|
||||
<h5 class="text-sm font-bold uppercase tracking-widest text-gray-500 mb-6">Contact</h5>
|
||||
<p class="text-sm text-gray-400 leading-loose">
|
||||
Design AI & Ecology Lab<br>
|
||||
1234 Design Avenue, Innovation District<br>
|
||||
Shanghai, China<br>
|
||||
<a href="mailto:hello@dael.edu.cn" class="text-white hover:underline">hello@dael.edu.cn</a>
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<h5 class="text-sm font-bold uppercase tracking-widest text-gray-500 mb-6">Social</h5>
|
||||
<div class="flex flex-col space-y-2 text-sm text-gray-400">
|
||||
<a href="#" class="hover:text-white transition-colors">WeChat / 微信公众号</a>
|
||||
<a href="#" class="hover:text-white transition-colors">Instagram</a>
|
||||
<a href="#" class="hover:text-white transition-colors">Twitter / X</a>
|
||||
<a href="#" class="hover:text-white transition-colors">GitHub</a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h5 class="text-sm font-bold uppercase tracking-widest text-gray-500 mb-6">Resources</h5>
|
||||
<div class="flex flex-col space-y-2 text-sm text-gray-400">
|
||||
<a href="resources.html" class="hover:text-white transition-colors">资源下载</a>
|
||||
<a href="academic.html" class="hover:text-white transition-colors">学术资料</a>
|
||||
<a href="team.html" class="hover:text-white transition-colors">完整团队</a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h5 class="text-sm font-bold uppercase tracking-widest text-gray-500 mb-6">Join Us</h5>
|
||||
<p class="text-sm text-gray-400 mb-4">
|
||||
我们长期招收博士后、博士生及研究助理。欢迎具有跨学科背景的申请者。
|
||||
</p>
|
||||
<a href="#" class="text-white text-sm border-b border-white hover:text-gray-300 hover:border-gray-300 pb-0.5">申请职位</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col md:flex-row justify-between items-center pt-8 border-t border-gray-800 text-xs text-gray-600">
|
||||
<div>
|
||||
<p>© 2024 Design AI & Ecology Lab. All Rights Reserved.</p>
|
||||
<p class="mt-2">页面访问数: <span id="visit-counter" class="font-bold">0</span></p>
|
||||
</div>
|
||||
<div class="flex gap-4 mt-4 md:mt-0">
|
||||
<a href="#" class="hover:text-gray-400">Privacy Policy</a>
|
||||
<a href="#" class="hover:text-gray-400">Terms of Use</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://unpkg.com/lucide@latest"></script>
|
||||
<script src="js/api.js"></script>
|
||||
<script src="js/common.js"></script>
|
||||
<script src="js/search.js"></script>
|
||||
<script src="js/auth.js"></script>
|
||||
<script>
|
||||
// Login form handler
|
||||
document.getElementById('login-form').addEventListener('submit', async (e) => {
|
||||
e.preventDefault();
|
||||
const username = document.getElementById('username').value;
|
||||
const password = document.getElementById('password').value;
|
||||
const remember = document.getElementById('remember').checked;
|
||||
const errorDiv = document.getElementById('login-error');
|
||||
|
||||
try {
|
||||
const success = await login(username, password, remember);
|
||||
if (success) {
|
||||
// Redirect to home page
|
||||
window.location.href = 'website.html';
|
||||
} else {
|
||||
errorDiv.textContent = '登录失败,请检查用户名和密码';
|
||||
errorDiv.classList.remove('hidden');
|
||||
}
|
||||
} catch (error) {
|
||||
errorDiv.textContent = '登录失败:' + (error.message || '网络错误');
|
||||
errorDiv.classList.remove('hidden');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user