77 lines
1.9 KiB
HTML
77 lines
1.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>排行榜</title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
background-color: #f4f4f9;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
.container {
|
|
width: 100%;
|
|
max-width: 600px;
|
|
margin: 50px auto;
|
|
padding: 20px;
|
|
background-color: #fff;
|
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
border-radius: 8px;
|
|
}
|
|
h1 {
|
|
text-align: center;
|
|
color: #333;
|
|
}
|
|
ul {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 20px 0;
|
|
}
|
|
li {
|
|
background-color: #f9f9f9;
|
|
padding: 10px;
|
|
border-radius: 4px;
|
|
margin-bottom: 10px;
|
|
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
|
|
font-size: 18px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
}
|
|
li:nth-child(odd) {
|
|
background-color: #f1f1f1;
|
|
}
|
|
a {
|
|
display: block;
|
|
text-align: center;
|
|
margin-top: 20px;
|
|
font-size: 18px;
|
|
padding: 10px;
|
|
background-color: #4CAF50;
|
|
color: white;
|
|
text-decoration: none;
|
|
border-radius: 4px;
|
|
transition: background-color 0.3s;
|
|
}
|
|
a:hover {
|
|
background-color: #45a049;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<h1>排行榜</h1>
|
|
<ul>
|
|
{% for user in users %}
|
|
<li>
|
|
<span>{{ user.name }}</span>
|
|
<span>分数: {{ user.score }}</span>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
<a href="{{ url_for('index') }}">返回首页</a>
|
|
</div>
|
|
</body>
|
|
</html>
|