blob: 4ccdf92b8f52a229c21378149897ad7860853b5e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Match Up!</title>
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='favicon.ico') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='bulma.min.css') }}">
<script src="{{ url_for('static', filename='htmx.min.js') }}"></script>
<style>
button, input, .select, .select select {
width: 100%;
}
table {
font-size: 30px;
}
td {
width: 20%;
}
img {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
</style>
</head>
<body>
<section class="section">
<nav class="level">
<div class="level-left">
<div class="level-item">
<figure class="image container is-128x128">
<img src="{{ url_for('static', filename='logo.png') }}"/>
</figure>
</div>
</div>
<div class="level-item">
<p class="title">Today's Games</p>
</div>
</nav>
</section>
<section class="section">
<p class="title">Games</p>
<div class="columns">
<div class="column">
<div class="field has-addons">
<div class="control">
<button class="button is-large is-responsive is-dark"
style="text-align:center"
hx-post="/decrement"
hx-swap="outerHTML"
hx-target="#guests">-</button>
</div>
<div hx-get="/guests" hx-swap="outerHTML" hx-trigger="revealed"></div>
<div class="control">
<button class="button is-large is-responsive is-dark"
style="text-align:center"
hx-post="/increment"
hx-swap="outerHTML"
hx-target="#guests">+</button>
</div>
</div>
</div>
<div class="column">
<div class="select is-large is-responsive">
<select name="type">
<option>10 Levels</option>
<option>8 Levels</option>
<option>6 Levels</option>
<option>4 Levels</option>
<option>2 Levels</option>
<option>0 Levels</option>
</select>
</div>
</div>
<div class="column">
<button class="button is-dark is-large is-responsive"
hx-post="/propose"
hx-target="#games"
hx-include="[name='type']">New Round</button>
</div>
<div class="column"></div>
<div class="column">
<button class="button is-dark is-large is-responsive"
hx-post="/confirm"
hx-target="#games">Start Round</button>
</div>
<div class="column">
<button class="button is-dark is-large is-responsive"
hx-post="/clear"
hx-target="#games">Reset</button>
</div>
</div>
<div hx-post="/clear" hx-swap="outerHTML" hx-trigger="revealed"></div>
</section>
<section class="section">
<h2 class="title">Courts</h2>
<div hx-get="/courts" hx-swap="outerHTML" hx-trigger="revealed"></div>
</section>
<section class="section">
<h2 class="title">Players</h2>
<div hx-get="/players" hx-swap="outerHTML" hx-trigger="revealed"></div>
</section>
<footer class="footer">
<div class="content has-text-centered">
Made by <a href="https://karanjayachandra.com/">K. Jayachandra</a> using <a href="https://flask.palletsprojects.com">Flask</a>, <a href="https://htmx.org/">HTMX</a> and <a href="https://bulma.io">Bulma</a>
</div>
</footer>
</body>
</html>
|