summaryrefslogtreecommitdiff
path: root/views/join.pug
blob: 8232645c1d9ed875c0fffc56a7c8bdadb7af8fea (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
//- 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.title_name
		style.
			table { min-width: auto; }
			th,td { min-width: 10em; border: 1px solid black; }
			table td a.red { text-decoration: none; color: brown; font-size: 14px; }
			td a { text-decoration: underline; color: blue; }
			.hide { display: none; }
		script.
			let game = !{ JSON.stringify(game) };
			let roles = !{ JSON.stringify(roles) };
			let players = !{ JSON.stringify(players) };
			let user_id = !{ user.user_id };
			let ready = !{ ready };
		script(src="/join.js")
	body
		include header
		article
			h1= game.title_name
			p.error#error

			div.logo
				+gamecover(game.title_id)

			p
				if game.is_private
					| Owner: #{game.owner_name} (private)
				else
					| Owner: #{game.owner_name}
				br
				| Scenario: #{game.scenario}
				br
				| Options: #{game.options}

			p= game.description || "No description."

			br(clear="left")

			p
			table
				thead
					tr
						each role in roles
							th.command(id="role_"+role.replace(/ /g, "_")+"_name")= role
				tbody
					tr
						each role in roles
							td.command(id="role_"+role.replace(/ /g, "_")) -
					tr
						td.command#message(colspan=roles.length) -

			p
				button.hide#delete_button(onclick="confirm_delete()") Delete
				button.hide#start_button(onclick=`javascript:send('/start/${game.game_id}')` disabled) Start