Files
piano-plan/app/templates/wechat_card.html
T

166 lines
6.0 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>{{ student_name }} - 练习方案</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 600px;
margin: 0 auto;
}
.card {
background: white;
border-radius: 16px;
overflow: hidden;
box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 25px;
text-align: center;
}
.header h1 { font-size: 22px; margin-bottom: 5px; }
.header p { opacity: 0.9; font-size: 14px; }
.body { padding: 20px; }
.student-info {
display: flex;
justify-content: space-between;
align-items: center;
background: #f8f9fa;
padding: 15px;
border-radius: 10px;
margin-bottom: 20px;
}
.student-info .name { font-weight: bold; font-size: 18px; }
.student-info .time { color: #666; font-size: 14px; }
.section { margin-bottom: 20px; }
.section-title {
font-size: 14px;
color: #999;
margin-bottom: 10px;
text-transform: uppercase;
letter-spacing: 1px;
border-bottom: 1px solid #eee;
padding-bottom: 8px;
}
.section-title:not(:first-child) { margin-top: 20px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
padding: 6px 12px;
border-radius: 20px;
font-size: 13px;
font-weight: 500;
}
.tag.severity-严重 { background: #ffebee; color: #c62828; }
.tag.severity-中等 { background: #fff3e0; color: #ef6c00; }
.tag.severity-轻微 { background: #e8f5e9; color: #2e7d32; }
.problem-item { background: #f8f9fa; padding: 12px; border-radius: 8px; margin-bottom: 10px; }
.problem-item h4 { font-size: 15px; margin-bottom: 8px; color: #333; }
.problem-item p { font-size: 13px; color: #666; line-height: 1.6; }
.schedule-item {
display: flex;
align-items: flex-start;
padding: 12px 0;
border-bottom: 1px solid #f0f0f0;
}
.schedule-item:last-child { border-bottom: none; }
.schedule-item .phase {
width: 60px;
font-weight: bold;
color: #667eea;
font-size: 13px;
}
.schedule-item .details { flex: 1; }
.schedule-item .content { font-size: 14px; color: #333; }
.schedule-item .purpose { font-size: 12px; color: #999; margin-top: 3px; }
.schedule-item .duration {
width: 50px;
text-align: right;
font-size: 12px;
color: #666;
background: #f5f5f5;
padding: 3px 8px;
border-radius: 10px;
}
.ai-report {
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
padding: 15px;
border-radius: 10px;
font-size: 14px;
line-height: 1.8;
color: #333;
white-space: pre-wrap;
}
.ai-report h2 { font-size: 16px; color: #667eea; margin-bottom: 10px; }
.ai-report p { margin-bottom: 8px; }
.ai-report ul, .ai-report ol { margin-left: 20px; margin-bottom: 8px; }
.ai-report li { margin-bottom: 4px; }
.footer {
text-align: center;
padding: 20px;
color: white;
font-size: 12px;
opacity: 0.8;
}
</style>
</head>
<body>
<div class="container">
<div class="card">
<div class="header">
<h1>🎹 个性化练习方案</h1>
<p>针对性问题专项训练</p>
</div>
<div class="body">
<div class="student-info">
<span class="name">{{ student_name }}</span>
<span class="time">{{ content.practice_time }} (共{{ content.total_daily_minutes }}分钟)</span>
</div>
{% if content.ai_report %}
<div class="section">
<div class="section-title">📝 AI个性化报告</div>
<div class="ai-report">{{ content.ai_report }}</div>
</div>
{% endif %}
<div class="section">
<div class="section-title">🔍 问题诊断</div>
<div class="tags">
{% for problem in content.problems %}
<span class="tag severity-{{ problem.severity }}">
{{ problem.name }} · {{ problem.severity }}
</span>
{% endfor %}
</div>
</div>
{% if content.problem_details %}
<div class="section">
<div class="section-title">📚 问题详解</div>
{% for detail in content.problem_details %}
<div class="problem-item">
<h4>{{ detail.name }} ({{ detail.severity }})</h4>
<p>{{ detail.content }}</p>
</div>
{% endfor %}
</div>
{% endif %}
</div>
</div>
<div class="footer">
坚持练习 · 必有进步
</div>
</div>
</body>
</html>