- 新增 Pagination 通用组件:首页/上一页/页码/下一页/末页导航 - PickModal 和 SwapModal 集成分页功能,每页20项 - 搜索/筛选切换自动回到第1页 - 现代化CSS样式:hover浮起动效、主色高亮、移动端适配 - 新增 dashboard、admin 管理模板 - 菜系(cuisine)模型和迁移 - 构建脚本 build.py 支持 PyInstaller 打包 - 前端资源重新构建
72 lines
3.9 KiB
HTML
72 lines
3.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<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}
|
|
body{font-family:'Microsoft YaHei','PingFang SC',system-ui,sans-serif;background:#0f172a;color:#f1f5f9;min-height:100vh;display:flex;align-items:center;justify-content:center}
|
|
|
|
.container{max-width:720px;width:100%;padding:40px 24px;text-align:center}
|
|
|
|
.logo{margin-bottom:12px}
|
|
.logo h1{font-size:28px;font-weight:800;letter-spacing:1px;background:linear-gradient(135deg,#38bdf8 0%,#22d3ee 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}
|
|
.logo .sub{font-size:14px;color:#94a3b8;margin-top:6px}
|
|
|
|
.cards{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:40px}
|
|
|
|
.card{display:flex;flex-direction:column;align-items:center;gap:16px;padding:40px 24px;background:linear-gradient(145deg,#1e293b 0%,#1a2332 100%);border:1px solid #334155;border-radius:16px;cursor:pointer;text-decoration:none;color:#f1f5f9;transition:all .2s;position:relative;overflow:hidden}
|
|
.card:hover{transform:translateY(-4px);border-color:#38bdf8;box-shadow:0 8px 32px rgba(56,189,248,0.15)}
|
|
.card::after{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,#38bdf8,#22d3ee);opacity:0;transition:opacity .2s}
|
|
.card:hover::after{opacity:1}
|
|
|
|
.card-icon{width:64px;height:64px;border-radius:16px;display:flex;align-items:center;justify-content:center;font-size:32px}
|
|
.card-icon svg{width:36px;height:36px;stroke-width:1.8}
|
|
.card-icon.frontend{background:rgba(56,189,248,0.15);color:#38bdf8}
|
|
.card-icon.backend{background:rgba(168,85,247,0.15);color:#a855f7}
|
|
|
|
.card-title{font-size:18px;font-weight:700}
|
|
.card-desc{font-size:13px;color:#94a3b8;line-height:1.6;text-align:center}
|
|
|
|
|
|
|
|
@media(max-width:540px){
|
|
.cards{grid-template-columns:1fr}
|
|
.logo h1{font-size:22px}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="logo">
|
|
<h1>学校订餐菜单系统</h1>
|
|
<div class="sub">School Meal Planner</div>
|
|
</div>
|
|
|
|
<div class="cards">
|
|
<div class="card" onclick="openPage('/app/', '学校订餐菜单生成器')">
|
|
<div class="card-icon frontend"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><path d="M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2"/><path d="M7 2v20"/><path d="M21 15V2v0a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7"/></svg></div>
|
|
<div class="card-title">菜单生成器</div>
|
|
<div class="card-desc">自选菜品、生成营养 A/B 两套周菜单,支持替换与导出 Excel</div>
|
|
</div>
|
|
<div class="card" onclick="openPage('/admin/', '后台管理')">
|
|
<div class="card-icon backend"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg></div>
|
|
<div class="card-title">后台管理</div>
|
|
<div class="card-desc">管理菜品数据、查看统计面板、系统配置</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function openPage(path, title) {
|
|
if (window.pywebview && window.pywebview.api) {
|
|
window.pywebview.api.open_page(path, title);
|
|
} else {
|
|
// Fallback for browser (non-pywebview) environments
|
|
window.location.href = path;
|
|
}
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |