-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
147 lines (137 loc) · 5.92 KB
/
index.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="./libs/bootstrap/bootstrap.min.css">
<script src="./libs/jquery-1.11.3.min.js"></script>
<script src="./libs/bootstrap/bootstrap.min.js"></script>
<script src="./libs/handlebars.js"></script>
<script src="./libs/underscore.js"></script>
<script src="./libs/showdown.js"></script>
<script src="sequence.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="container-fluid">
<h1 class="title">Sequence Board Game Assistant</h1>
<button type="button" id="descriptionBtn" class="btn" data-toggle="modal" data-target=".bs-example-modal-lg">Description / Help</button>
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="App Description">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div id="description-content" class="modal-body">
<a href="https://github.com/calvinjc/sequence_assistant">https://github.com/calvinjc/sequence_assistant</a>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-10 col-md-6">
<div id="gameBoardDiv"></div>
</div>
<div class="col-sm-2 col-md-2">
<div id="displayOptionsDiv">
<h4>Options:</h4>
<div class="checkbox totalWorth">
<label><input id="showTotalWorth" type="checkbox">Show Total Worth</label>
</div>
<div class="checkbox colorWorth">
<label><input id="showColorWorth" type="checkbox">Show Color Worth</label>
</div>
<div class="checkbox onlyHand">
<label><input id="showOnlyHand" type="checkbox">Show Only Hand Worth</label>
</div>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div id="cardListDiv"></div>
</div>
</div>
</div>
<script id="gameBoard" type="text/template">
<table class="game-board-table table table-bordered">
{{#each rows}}
<tr>
{{#each this}}
<td class="game-cell {{token}} {{showHighlight token highlight}}">
{{value}}
<br/>
{{#if token}}
{{#if (showRemoveToken token)}}
<div class="remove-token">Remove</div>
{{/if}}
{{else}}
{{#if (showWorth ../../showOnlyHand highlight)}}
{{#if ../../showColorWorth}}
<div class="red-worth">R: {{redWorth}}</div>
<div class="blue-worth">B: {{blueWorth}}</div>
{{/if}}
{{#if ../../showTotalWorth}}
<div class="total-worth">{{totalWorth}}</div>
{{/if}}
{{/if}}
{{/if}}
</td>
{{/each}}
</tr>
{{/each}}
</table>
<button id="addRedToken" class="add-token btn">Add Red Token</button>
<button id="addBlueToken" class="add-token btn">Add Blue Token</button>
{{#if addTokenMode}}
<button id="cancelAddToken" class="add-token btn">Cancel</button>
{{/if}}
<br/>
<div class="hand">
<h4>Hand:</h4>
{{#each hand}}
<button class="hand-card btn">{{this}}</button>
{{/each}}
</div>
</script>
<script id="cardList" type="text/template">
<h2 class="hand-header">Add a card to your hand:</h2>
<div class="row add-card-lists">
<div class="select-card-suit col-xs-3 col-md-3">
<ul class="list-group">
{{#each hearts}}
<li class="select-card list-group-item" value="{{value}}">{{value}}</li>
{{/each}}
</ul>
</div>
<div class="select-card-suit col-xs-3 col-md-3">
<ul class="list-group">
{{#each diamonds}}
<li class="select-card list-group-item" value="{{value}}">{{value}}</li>
{{/each}}
</ul>
</div>
<div class="select-card-suit col-xs-3 col-md-3">
<ul class="list-group">
{{#each clubs}}
<li class="select-card list-group-item" value="{{value}}">{{value}}</li>
{{/each}}
</ul>
</div>
<div class="select-card-suit col-xs-3 col-md-3">
<ul class="list-group">
{{#each spades}}
<li class="select-card list-group-item" value="{{value}}">{{value}}</li>
{{/each}}
</ul>
</div>
</div>
</script>
<nav class="navbar navbar-default navbar-bottom">
<div class="container">
<p class="navbar-text">
<a href="https://github.com/calvinjc/sequence_assistant">View it on GitHub</a>
</p>
</div>
</nav>
</body>
</html>