/
index.html
323 lines (302 loc) · 13.2 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
<!DOCTYPE html>
<html>
<head>
<!--Meta-->
<title>Commander Spellbook - Combo Database for Commander (EDH)</title>
<meta name="description"
content="The Premier Magic: the Gathering Combo Database for the Commander / Elder Dragon Highlander (EDH) Format.">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--Favicon-->
<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
<link rel="manifest" href="favicon/site.webmanifest">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-0LPW4VGE0F"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-0LPW4VGE0F');
</script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous">
</script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"
integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous">
</script>
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<!-- Deckbox -->
<script src="https://deckbox.org/assets/external/tooltip.js"></script>
<!-- Internal CSS -->
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<!--Nav Bar-->
<nav class="navbar navbar-expand-xl navbar-light bg-light">
<a class="navbar-brand" href="#">Commander Spellbook</a>
<span class="navbar-text">
Combo Database for EDH
</span>
<button class="navbar-toggler navbar-right" type="button" data-toggle="collapse" data-target="#navbar"
aria-controls="navbarText" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbar">
<ul class="nav navbar-nav navbar-right ml-auto">
<li class="nav-item">
<button class="btn btn-success d-none d-lg-inline-block" data-toggle="modal"
data-target="#submitComboModal">Submit</button>
<a class="d-inline d-lg-none" role="button" data-toggle="modal" data-target="#submitComboModal">Submit a
Combo</a>
</li>
<li class="nav-item">
<a class="btn btn-dark d-none d-lg-inline-block" role="button" target="_blank"
href="https://discord.com/invite/DkAyVJG">Discord</a>
<a class="d-inline d-lg-none" role="button" target="_blank"
href="https://discord.com/invite/DkAyVJG">Discord</a>
</li>
<li class="nav-item">
<button class="btn btn-dark d-none d-lg-inline-block" data-toggle="modal"
data-target="#metricsModal">Metrics</button>
<a class="d-inline d-lg-none" role="button" data-toggle="modal" data-target="#metricsModal">Combo Metrics</a>
</li>
<li class="nav-item">
<button class="btn btn-dark d-none d-lg-inline-block" data-toggle="modal"
data-target="#dataModal">Database</button>
<a class="d-inline d-lg-none" role="button" data-toggle="modal" data-target="#metricsModal">Data</a>
</li>
</ul>
</div>
</nav>
<!--Combos Table-->
<div class="container-fluid" id="global">
<input class="form-control w-100" id="card-input" ftype="text" placeholder="Loading Combos..." onkeyup="filterCombos()">
<div id="identitySelector" style="display:flex; width:75%; justify-content: space-evenly; margin: 10px;">
<div id="manaW">
<img src="images/mana/manaw.png" width="40" alt="white">
<input type="checkbox" id="checkboxW" checked onclick="filterCombos()">
</div>
<div id="manaU">
<img src="images/mana/manau.png" width="40" alt="blue">
<input type="checkbox" id="checkboxU" checked onclick="filterCombos()">
</div>
<div id="manaB">
<img src="images/mana/manab.png" width="40" alt="black">
<input type="checkbox" id="checkboxB" checked onclick="filterCombos()">
</div>
<div id="manaR">
<img src="images/mana/manar.png" width="40" alt="red">
<input type="checkbox" id="checkboxR" checked onclick="filterCombos()">
</div>
<div id="manaG">
<img src="images/mana/manag.png" width="40" alt="green">
<input type="checkbox" id="checkboxG" checked onclick="filterCombos()">
</div>
<div id="manaC">
<img src="images/mana/manac.png" width="40" alt="colorless">
<input type="checkbox" id="checkboxC" checked onclick="filterCombos()">
</div>
</div>
<!-- Load metrics.js -->
<script src="js/metrics.js"></script>
<div class="table-responive-sm">
<table class="table" id="no-more-tables">
<thead>
<tr>
<th width="15%">
<center>CARDS</center>
</th>
<th width="15%">
<center>IDENTITY</center>
</th>
<th width="20%">
<center>PREREQUISITES</center>
</th>
<th width="25%">
<center>STEPS</center>
</th>
<th width="15%">
<center>RESULT</center>
</th>
<th width="10%">
<center>COMBO ID</center>
</th>
</tr>
</thead>
<tbody id="combos"></tbody>
</table>
</div>
</div>
<!-- Submit Combo Modal -->
<div class="modal fade" id="submitComboModal" tabindex="-1" role="dialog" aria-labelledby="submitComboModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="submitComboModalLabel">Want to Submit a Combo?</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
At this time, combo submissions are only being accepted via <a target="_blank"
href="https://discord.gg/KDnvP5f">Discord</a>, as we've learned from experience that
many of them require a discussion. If your combo isn't listed here, please join us on that platform to
contribute to the catalog.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<a role="button" class="btn btn-success" target="_blank" href="https://discord.gg/KDnvP5f">Join us on
Discord</a>
</div>
</div>
</div>
</div>
<!-- Metrics Modal -->
<div class="modal fade" id="metricsModal" tabindex="-1" role="dialog" aria-labelledby="metricsModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="metricsModalLabel">Combo Metrics</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th width="38%">
<center>METRIC</center>
</th>
<th width="57%">
<center>IDENTITY</center>
</th>
<th width="5%">
<center>COUNT</center>
</th>
</tr>
</thead>
<tbody id="metrics"></tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Data Modal -->
<div class="modal fade" id="dataModal" tabindex="-1" role="dialog" aria-labelledby="dataLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="dataLabel">Source Code, Database, and API</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
The data powering the website, and the source code for the website itself, are completely free and open
source.
<p>We encourage you copy and clone this data!</p>
<ul>
<li><a target="_blank" href="https://github.com/ArtSabintsev/CommanderSpellbook">Website Source Code on
GitHub</a></li>
<li><a target="_blank"
href="https://docs.google.com/spreadsheets/d/1JJo8MzkpuhfvsaKVFVlOoNymscCt-Aw-1sob2IhpwXY/">Combo
Database Backend on Google Sheets</a></li>
<li><a target="_blank"
href="https://sheets.googleapis.com/v4/spreadsheets/1JJo8MzkpuhfvsaKVFVlOoNymscCt-Aw-1sob2IhpwXY/values:batchGet?ranges=combos!A2:O&key=AIzaSyDzQ0jCf3teHnUK17ubaLaV6rcWf9ZjG5E">Combo
Database GET API on Google Sheets</a></li>
</ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Filter Combo Table -->
<script>
function tableStriping() {
// Re-apply table striping on search
$("tr:visible").each(function (index) {
$(this).css("background-color", !!(index & 1) ? "rgba(0,0,0,.05)" : "rgba(0,0,0,0)");
});
}
function filterCombos() {
filter = $("#card-input").val().toLowerCase();
// $("#combos tr #tdCardLinks").filter(function () { // Search only Cards
$("#combos tr").filter(function () {
let matchedText = $(this).text().toLowerCase().indexOf(filter)
// $(this).parent().toggle(matchedText > -1) // Toggle to use if searching only cards
$(this).toggle(matchedText > -1 && inIdentity( $(this) ));
});
tableStriping();
};
function inIdentity(context) {
white = $("#checkboxW").prop("checked");
blue = $("#checkboxU").prop("checked");
black = $("#checkboxB").prop("checked");
red = $("#checkboxR").prop("checked");
green = $("#checkboxG").prop("checked");
colorless = $("#checkboxC").prop("checked");
tdWhite = context.children("#tdColorIdentity").children().prop("outerHTML").indexOf("white") > -1;
if(!white && tdWhite) {
return false;
}
tdBlue = context.children("#tdColorIdentity").children().prop("outerHTML").indexOf("blue") > -1;
if(!blue && tdBlue) {
return false;
}
tdBlack = context.children("#tdColorIdentity").children().prop("outerHTML").indexOf("black") > -1;
if(!black && tdBlack) {
return false;
}
tdRed = context.children("#tdColorIdentity").children().prop("outerHTML").indexOf("red") > -1;
if(!red && tdRed) {
return false;
}
tdGreen = context.children("#tdColorIdentity").children().prop("outerHTML").indexOf("green") > -1;
if(!green && tdGreen) {
return false;
}
tdColorless = context.children("#tdColorIdentity").children().prop("outerHTML").indexOf("colorless") > -1;
if(!colorless && tdColorless) {
return false;
}
return true;
}
</script>
</div>
</body>
<footer>
<div class="container" width="50%">
Magic: The Gathering and Commander are trademarks of Wizards of the Coast LLC in the United
States and other countries. The Spellbook (EXO) imagery used on this site are copyright of Wizards of the Coast LLC.
Commander Spellbook is not affiliated with, endorsed, sponsored, or specifically
approved by Wizards of the Coast LLC. Commander Spellbook may use the trademarks and other intellectual property of
Wizards of the Coast LLC, which is permitted under Wizards' Fan Site Policy. MAGIC: THE GATHERING® is a trademark of
Wizards of the Coast. For more
information about Wizards of the Coast or any of Wizards' trademarks or other intellectual property, please visit
their
website at <a href="https://company.wizards.com/">https://company.wizards.com/</a>.
</div>
<!-- Load combos.js after page loads -->
<script src="js/combos.js"></script>
</footer>
</html>