Update model
This commit is contained in:
parent
a10553bcbb
commit
51a47e6b5b
59
admin.html
Normal file
59
admin.html
Normal 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>
|
3
model.py
3
model.py
@ -40,6 +40,9 @@ class Model(object):
|
|||||||
|
|
||||||
self.secretlookup = { self.users[uuid].get_secret() : uuid for uuid in self.users }
|
self.secretlookup = { self.users[uuid].get_secret() : uuid for uuid in self.users }
|
||||||
print(self.secretlookup)
|
print(self.secretlookup)
|
||||||
|
for user in self.users.values():
|
||||||
|
print(f"{user.name.rjust(25)} -> {user.get_secret()}")
|
||||||
|
|
||||||
|
|
||||||
def to_json(self):
|
def to_json(self):
|
||||||
model = {
|
model = {
|
||||||
|
Loading…
Reference in New Issue
Block a user