Files
EAP_Interface_html/.preview/swimming_plan/scheme_2_action_dock.html
T

126 lines
6.8 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>游泳训练计划 - 方案 2:底部操作扩展坞 (无图标统一纯净版)</title>
<style>
:root {
--color-primary: #2563EB;
--bg: #EEF2F6;
--surface: #FFFFFF;
--text-main: #0F172A;
--text-sub: #64748B;
--divider: #E2E8F0;
--content-max-width: 1240px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background: var(--bg); color: var(--text-main); min-height: 100vh; padding: 20px;
}
.device-wrapper {
width: 100%; max-width: var(--content-max-width); margin: 0 auto; background: var(--surface);
border-radius: 20px; border: 1px solid var(--divider); box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.08);
min-height: 740px; display: flex; flex-direction: column; overflow: hidden; position: relative;
}
.appbar {
height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px;
border-bottom: 1px solid var(--divider); background: var(--surface);
}
.view-panel { flex: 1; display: none; flex-direction: column; background: #F8FAFC; padding: 20px; padding-bottom: 100px; }
.view-panel.active { display: flex; }
.floating-dock-bar {
position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
background: rgba(15, 23, 42, 0.88); backdrop-filter: blur(12px); border-radius: 100px;
padding: 6px 10px; display: flex; align-items: center; gap: 8px; box-shadow: 0 12px 30px rgba(0,0,0,0.25);
border: 1px solid rgba(255,255,255,0.15); z-index: 100;
}
.dock-btn {
height: 40px; padding: 0 20px; border-radius: 100px; border: none; font-size: 14px; font-weight: 700;
cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s ease;
}
.dock-btn-sub { background: transparent; color: #E2E8F0; }
.dock-btn-sub:hover { background: rgba(255,255,255,0.1); color: white; }
.dock-btn-main { background: var(--color-primary); color: white; box-shadow: 0 4px 12px rgba(37,99,235,0.4); }
.card {
background: white; border: 1.5px solid var(--divider); border-radius: 14px; padding: 18px 20px;
display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; cursor: pointer; transition: all 0.15s ease;
border-left: 4px solid var(--color-primary);
}
.card:hover { border-color: var(--color-primary); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
</style>
</head>
<body>
<div class="device-wrapper">
<header class="appbar">
<div style="display: flex; align-items: center; gap: 10px;">
<button style="border: none; background: transparent; cursor: pointer;" onclick="goToList()"><svg style="width: 22px; height: 22px;" viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></svg></button>
<h1 style="font-size: 18px; font-weight: 700;" id="dockTitle">游泳训练计划 · 操作坞版</h1>
</div>
</header>
<main class="view-panel active" id="pList">
<div class="card" onclick="goToEdit('郑梅')">
<div style="display: flex; justify-content: space-between;"><b>郑梅 (ID: 108203) · 竞技级</b><span style="color: #94A3B8; font-size: 12px;">2026-08-18 09:52:09</span></div>
<div style="font-size: 13.5px; color: var(--text-sub);">比赛期 | 主要目标: 恢复 | 主要项目: 长距离 | 单次训练</div>
</div>
<div class="card" onclick="goToEdit('吴静')">
<div style="display: flex; justify-content: space-between;"><b>吴静 (ID: 103717) · 初学者</b><span style="color: #94A3B8; font-size: 12px;">2026-08-17 12:12:26</span></div>
<div style="font-size: 13.5px; color: var(--text-sub);">GPP | 主要目标: 耐力 | 主要项目: 50米 | 单次训练</div>
</div>
<!-- 纯文字底部扩展坞 (无图标) -->
<div class="floating-dock-bar">
<button class="dock-btn dock-btn-sub" onclick="goToLogs()">调整日志</button>
<div style="width: 1px; height: 20px; background: rgba(255,255,255,0.2);"></div>
<button class="dock-btn dock-btn-main" onclick="goToEdit('新运动员')">新建训练计划</button>
</div>
</main>
<main class="view-panel" id="pEdit">
<div style="background: white; padding: 24px; border-radius: 16px; border: 1.5px solid var(--divider);">
<h2 style="font-size: 16px; font-weight: 800;" id="editHead">更新训练计划</h2>
<div style="margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px;">
<div><label style="font-size: 12px; color: var(--text-sub);">用户名</label><input id="inpAthName" style="width: 100%; height: 38px; border: 1px solid var(--divider); border-radius: 6px; padding: 0 10px;" value="郑梅"></div>
<div><label style="font-size: 12px; color: var(--text-sub);">训练阶段</label><select style="width: 100%; height: 38px; border: 1px solid var(--divider); border-radius: 6px; padding: 0 10px;"><option>比赛期</option><option>GPP</option></select></div>
</div>
<button style="margin-top: 16px; height: 42px; width: 100%; background: var(--color-primary); color: white; border: none; border-radius: 8px; font-weight: 700;" onclick="alert('已执行更新计划!')">更新训练计划</button>
</div>
</main>
<main class="view-panel" id="pLogs">
<div style="background: white; padding: 20px; border-radius: 16px; border: 1.5px solid var(--divider);">
<h2 style="font-size: 16px; font-weight: 800;">调整日志</h2>
<p style="color: var(--text-sub); font-size: 13px; margin-top: 6px;">记录: R011 · 自动调整 · primaryGoal: Threshold -> Recovery</p>
</div>
</main>
</div>
<script>
function goToList() {
document.getElementById('pList').className = 'view-panel active';
document.getElementById('pEdit').className = 'view-panel';
document.getElementById('pLogs').className = 'view-panel';
document.getElementById('dockTitle').innerText = '游泳训练计划 · 操作坞版';
}
function goToEdit(name) {
document.getElementById('pList').className = 'view-panel';
document.getElementById('pEdit').className = 'view-panel active';
document.getElementById('pLogs').className = 'view-panel';
document.getElementById('editHead').innerText = `更新训练计划 - ${name}`;
document.getElementById('inpAthName').value = name;
document.getElementById('dockTitle').innerText = `更新训练计划 - ${name}`;
}
function goToLogs() {
document.getElementById('pList').className = 'view-panel';
document.getElementById('pEdit').className = 'view-panel';
document.getElementById('pLogs').className = 'view-panel active';
document.getElementById('dockTitle').innerText = '调整日志';
}
</script>
</body>
</html>