Update model

This commit is contained in:
Dominic Zimmer 2020-07-18 00:03:44 +02:00
parent a10553bcbb
commit 51a47e6b5b
2 changed files with 62 additions and 0 deletions

59
admin.html Normal file
View File

@ -0,0 +1,59 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Waschmarken.io</title>
<meta name="description" content="Waschmarken Scoreboard">
<link rel="stylesheet" href="static/css/normalize.css">
<link rel="stylesheet" href="static/css/sakura-dark.css">
<style>
.heading {
text-align: center;
}
#scoreboard .score {
text-align: right;
}
#scoreboard .bar {
height: 1.2em;
border-radius: 0.6em;
}
</style>
</head>
<body>
<h1 class="heading">Waschmarken Scoreboard</h1>
<table id="scoreboard">
<thead>
<tr>
<th>Name</th>
<th style="width: 100%;"></th>
<th class="score">Score</th>
</tr>
</thead>
<tbody></tbody>
<template>
<tr class="row">
<td class="name"></td>
<td>
<div class="bar"></div>
</td>
<td class="score">42069</td>
</tr>
</template>
</table>
<script src="static/js/main.js"></script>
</body>
</html>

View File

@ -40,6 +40,9 @@ class Model(object):
self.secretlookup = { self.users[uuid].get_secret() : uuid for uuid in self.users }
print(self.secretlookup)
for user in self.users.values():
print(f"{user.name.rjust(25)} -> {user.get_secret()}")
def to_json(self):
model = {