/
assassins.html
103 lines (96 loc) · 3.16 KB
/
assassins.html
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
<head>
<title>Assassins</title>
</head>
<body>
{{> layout}}
</body>
<template name="layout">
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">{{{prefix}}}Assassins</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
</div><!-- /.container-fluid -->
</nav>
<div class="container">
<div class="row">
{{#if isAdmin}}
{{> adminContent}}
{{else}}
{{> userContent}}
{{/if}}
</div>
</div>
</template>
<template name="userContent">
<div class="col-xs-12">
{{#if currentUser}}
<div class="jumbotron">
<h1>Hello, {{username}}.</h1>
{{#if gameStarted}}
<p>You have {{print_kills}}.</p>
{{#if dead}}
<p>You are dead. Better luck next time.</p>
{{else}}
{{#if lastOneStanding}}
<p>Congratulations! You're the last man standing!</p>
{{else}}
<p>Your mission is simple. Assassinate {{target}}.</p>
<p>When the deed is done, press this button:</p>
<div class="row">
<div class="col-xs-6 col-xs-offset-3 text-center">
{{> assassinateButton}}
</div>
</div>
<p>In order to prove you've assassinated your target, you'll need to get their secret phrase. <em>Your</em> secret phrase is <strong>{{phrase}}</strong>. If you are assassinated, this is the phrase you must give to your assassin.</p>
{{/if}}
{{/if}}
{{else}}
<p>The game has not begun yet. Soon...</p>
{{/if}}
</div>
{{else}}
{{> loginButton}}
{{/if}}
</div>
</template>
<template name="adminContent">
<div class="col-xs-12">
<div class="jumbotron">
<h1>Welcome, game master.</h1>
<div class="row">
<p>To go to the admin panel, <a href="/admin">click here.</a></p>
{{#if gameStarted}}
<p>The following {{livingUsers.length}} users are still in the game: </p>
<ol class="list-group">
{{#each livingUsers}}
<li class="list-group-item">{{profile.name}}</li>
{{/each}}
</ol>
{{else}}
<p>The game has not yet started. Press the button to let the games begin.</p>
<div class="col-xs-6 col-xs-offset-3 text-center">
{{> gameStartButton}}
</div>
{{/if}}
</div>
</div>
</div>
</template>
<template name="gameStartButton">
<button class="btn btn-warning btn-lg btn-block">START</button>
</template>
<template name="assassinateButton">
<button class="btn btn-warning btn-lg btn-block">It is done!</button>
</template>
<template name="loginButton">
<img class="login-button" src="login-with-facebook.png">
</template>