sunpayus/templates/configure_roles.html

108 lines
3.1 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: 600px;
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;
}
input[type="text"], textarea {
width: 100%;
padding: 10px;
margin-bottom: 15px;
border: 1px solid #ddd;
border-radius: 4px;
}
textarea {
height: 100px;
}
input[type="submit"] {
padding: 10px 20px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
margin-right: 10px;
}
.btn {
display: inline-block;
padding: 10px 20px;
background-color: #333;
color: white;
text-decoration: none;
border-radius: 4px;
margin: 10px 0;
}
.role-list {
margin: 20px 0;
padding: 10px;
background-color: #f9f9f9;
border-radius: 4px;
}
.role-item {
padding: 10px;
border-bottom: 1px solid #eee;
}
.role-item:last-child {
border-bottom: none;
}
</style>
</head>
<body>
<div class="container">
<h1>配置角色 - {{ workshop.name }}</h1>
<a href="{{ url_for('index') }}" class="btn">返回首页</a>
<div class="role-list">
<h3>已配置角色</h3>
{% if workshop.roles %}
{% for role in workshop.roles %}
<div class="role-item">
<strong>{{ role.name }}</strong>
<p>{{ role.perspective }}</p>
</div>
{% endfor %}
{% else %}
<p>暂无角色,请添加第一个角色</p>
{% endif %}
</div>
<form method="post">
<label for="role_name">角色名称:</label>
<input type="text" id="role_name" name="role_name" required>
<label for="role_perspective">角色视角:</label>
<textarea id="role_perspective" name="role_perspective" required></textarea>
<input type="submit" name="add_more" value="添加更多角色">
<input type="submit" name="finish" value="完成配置,开始辩论">
</form>
</div>
</body>
</html>