sunpayus/templates/index.html

89 lines
2.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>多 Agent 决策工作坊</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background-color: #f5f5f5;
}
.container {
max-width: 800px;
margin: 0 auto;
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
h1 {
color: #333;
text-align: center;
}
.btn {
display: inline-block;
padding: 10px 20px;
background-color: #4CAF50;
color: white;
text-decoration: none;
border-radius: 4px;
margin: 10px 0;
}
.workshop-list {
margin: 20px 0;
}
.workshop-item {
padding: 15px;
border: 1px solid #ddd;
border-radius: 4px;
margin-bottom: 10px;
background-color: #f9f9f9;
}
.workshop-item h3 {
margin: 0 0 10px 0;
}
.workshop-actions {
margin-top: 10px;
}
.action-btn {
display: inline-block;
padding: 5px 15px;
margin-right: 10px;
background-color: #333;
color: white;
text-decoration: none;
border-radius: 4px;
font-size: 14px;
}
</style>
</head>
<body>
<div class="container">
<h1>多 Agent 决策工作坊</h1>
<a href="{{ url_for('create_workshop') }}" class="btn">创建新工作坊</a>
<div class="workshop-list">
<h2>工作坊列表</h2>
{% if workshops %}
{% for workshop_id, workshop in workshops.items() %}
<div class="workshop-item">
<h3>{{ workshop.name }}</h3>
<p>目标: {{ workshop.goal }}</p>
<p>角色数量: {{ workshop.roles|length }}</p>
<div class="workshop-actions">
<a href="{{ url_for('configure_roles', workshop_id=workshop_id) }}" class="action-btn">配置角色</a>
<a href="{{ url_for('start_debate', workshop_id=workshop_id) }}" class="action-btn">开始辩论</a>
<a href="{{ url_for('show_results', workshop_id=workshop_id) }}" class="action-btn">查看结果</a>
</div>
</div>
{% endfor %}
{% else %}
<p>暂无工作坊,请创建新工作坊</p>
{% endif %}
</div>
</div>
</body>
</html>