blob: 257e4a82e7bdf86e1a7e43fad6cd371037be0499 (
plain)
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
|
//- vim:ts=4:sw=4:
doctype html
html
head
include head
+social(game.title_name,
"Play " + game.title_name + " with " + players.map(x=>x.name).join(" and ") + ".",
game.title_id)
title ##{game.game_id} - #{game.title_name}
style.
table { width: clamp(240px, 100%, 400px); }
table.invite tr.p { background-color: var(--color-table-invite) }
table.active tr.p { background-color: var(--color-table-active) }
#game_info td { padding: 2px 10px }
#game_info td:first-child { width: 80px }
#game_info tr:first-child td { padding-top: 5px }
#game_info tr:last-child td { padding-bottom: 5px }
td.r a { margin-left: 18px; }
tr.p i { color: #0008; }
td.blacklist::before { color: brown; content: "\1f6ab "; font-size: 15px; }
script.
let game = !{ JSON.stringify(game) }
let players = !{ JSON.stringify(players) }
let roles = !{ JSON.stringify(roles) }
let user_id = !{ user ? user.user_id : 0 }
let blacklist = !{ JSON.stringify(blacklist) }
let friends = !{ JSON.stringify(friends) }
script(src="/join.js")
body
include header
article
if icon
h1 <span class="icon">#{icon}</span> ##{game.game_id} - #{game.title_name}
else
h1 ##{game.game_id} - #{game.title_name}
div.logo
+gamecover(game.title_id)
p.error#error
if limit && game.status < 1
p.error= limit
if !user
p.error You are not logged in!
div#game_info
p#game_enter
div#game_players
p#game_actions
p.error#disconnected
if user
dialog(id="invite")
| Invite a friend:
br
input(id="invite_user" type="text" list="friends" onchange="send_invite()")
datalist(id="friends")
if friends
each who in friends
option= who
br
button(onclick="send_invite()") Invite
button(onclick="hide_invite()") Cancel
if user && user.user_id === 1
hr
div: p
each snap in rewind
<a href="/api/rewind/#{game.game_id}/#{snap.snap_id}">REWIND #{snap.snap_id}</a> - #{snap.state} - #{snap.active}
br
if DEBUG
<a href="/api/clone/#{game.game_id}">CLONE</a>
br
|