sunpayus/templates/start_debate.html

120 lines
3.5 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>开始辩论 - {{ workshop.name }}</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;
}
form {
margin-top: 20px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
select, textarea {
width: 100%;
padding: 10px;
margin-bottom: 15px;
border: 1px solid #ddd;
border-radius: 4px;
}
textarea {
height: 150px;
}
input[type="submit"] {
padding: 10px 20px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
.btn {
display: inline-block;
padding: 10px 20px;
background-color: #333;
color: white;
text-decoration: none;
border-radius: 4px;
margin: 10px 0;
}
.debate-list {
margin: 20px 0;
padding: 10px;
background-color: #f9f9f9;
border-radius: 4px;
}
.debate-item {
padding: 10px;
border-bottom: 1px solid #eee;
}
.debate-item:last-child {
border-bottom: none;
}
.role-tag {
display: inline-block;
padding: 3px 10px;
background-color: #4CAF50;
color: white;
border-radius: 12px;
font-size: 12px;
margin-right: 10px;
}
</style>
</head>
<body>
<div class="container">
<h1>开始辩论 - {{ workshop.name }}</h1>
<a href="{{ url_for('index') }}" class="btn">返回首页</a>
<a href="{{ url_for('show_results', workshop_id=workshop_id) }}" class="btn">查看结果</a>
<div class="debate-list">
<h3>辩论内容</h3>
{% if workshop.debate_content %}
{% for item in workshop.debate_content %}
<div class="debate-item">
<span class="role-tag">{{ item.role }}</span>
<p>{{ item.opinion }}</p>
</div>
{% endfor %}
{% else %}
<p>暂无辩论内容,请选择角色发表观点</p>
{% endif %}
</div>
<form method="post">
<label for="role_index">选择角色:</label>
<select id="role_index" name="role_index" required>
{% for i in range(workshop.roles|length) %}
<option value="{{ i }}">{{ workshop.roles[i].name }}</option>
{% endfor %}
</select>
<label for="role_opinion">发表观点:</label>
<textarea id="role_opinion" name="role_opinion" required></textarea>
<input type="submit" value="提交观点">
</form>
</div>
</body>
</html>