forked from Zauvohi/gbf-info
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
198 lines (190 loc) · 6.95 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>GBF GW Info</title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.2/css/materialize.min.css">
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="api.js">
</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<script type="text/javascript">
$(document).ready(function() {
$('#day_select').material_select();
$('#search_type').material_select();
$('#edition').material_select();
fillCutOffs();
$('#day_select').on('change', function(e) {
console.log(e.target.value);
day = e.target.value;
if (day == 'global') {
$('#individual_day_table').addClass('hide');
$('#global_table').removeClass('hide');
$('#individual_day_table > tr').remove();
} else {
$('#global_table').addClass('hide');
$('#individual_day_table').removeClass('hide');
$('#global_table > tr').remove();
$('#individual_day_table > tr').remove();
}
});
$('#edition').on('change', function(e) {
document.querySelector('#search_players').disabled = false;
});
$('#group_name_value').on('keyup', function(e) {
$('#group_title').text(e.target.value);
});
$('#search_players').on('click', function(e) {
e.preventDefault();
var search_terms = $('#search_terms').val().split(',');
var search_type = $('#search_type').val();
var gw_edition = $('#edition').val();
var day = $('#day_select').val();
if (search_terms.length > 30) {
Materialize.toast('You can only search 30 items at a time!', 4000)
} else {
searchPlayers(search_terms, gw_edition, day, search_type);
}
});
});
</script>
<nav class="nav-extended light-blue lighten-2">
<div class="nav-wrapper">
<a href="#" class="brand-logo">GBF GW</a>
</div>
<div class="nav-content">
<ul class="tabs tabs-transparent">
<li class="tab"><a class="active" href="#cutoffs">Cutoffs</a></li>
<li class="tab"><a href="#rankings">Individual Rankings</a></li>
<li class="tab disabled"><a href="#bets">Bets Rigging</a></li>
<li class="tab"><a href="#ad">Free crystals</a></li>
</ul>
</div>
</nav>
<div id="cutoffs" class="col s12">
<div class="container">
<div class="row">
<div class="col s6 offset-s2">
<h2 class="center-align">Cutoffs</h2>
<table class="stripped centered" id="cutoff-table">
<thead>
<th>Position</th>
<th>Points</th>
</thead>
<tbody>
</tbody>
</table>
<p class="center-align">
Last update at: <span class="cutoffs-updated-at"></span> (You)r local time.
</p>
</div>
</div>
</div>
</div>
<div id="rankings" class="col s12">
<div class="container">
<div class="row">
<p>
You can look up by ID or player name and pick a day ("Global" being the results for the whole event).
</p>
<p>
Only searches by ID can pick a day in specific, and you can input multiple IDs if you separate them with a comma.
</p>
</div>
<div class="row">
<form class="col s12">
<div class="row">
<div class="input-field col s5">
<input type="text" name="search_terms" id="search_terms" class="materialize-textarea" placeholder="Search value(s) go here!">
</div>
<div class="input-field col s2 m2 l1">
<select id="day_select">
<option value="prelims">Prelims</option>
<option value="interlude">Interlude</option>
<option value="1">Day 1</option>
<option value="2">Day 2</option>
<option value="3">Day 3</option>
<option value="4">Day 4</option>
<option value="5">Day 5</option>
<option value="global">Global</option>
</select>
</div>
<div class="input-field col s2 m2 l1">
<select id="search_type">
<option value="id">ID</option>
<option value="name">Name</option>
</select>
</div>
<div class="input-field col s2 m2 l1">
<select id="edition">
<option value="" disabled selected>GW Edition</option>
<option value="29">29</option>
</select>
</div>
</div>
<button class="btn light-blue lighten-2" type="submit" name="action" id="search_players" disabled="true">Submit
<i class="material-icons right">send</i>
</button>
</form>
</div>
<div class="row group-name">
<div class="input-field col s3">
<input type="text" name="name" value="" id="group_name_value">
<label for="">Name for this group</label>
</div>
</div>
<div class="row group-name">
<h3 id="group_title"></h3>
</div>
<div class="row">
<div class="col s12">
<table class="stripped" id="individual_day_table">
<thead>
<th>Position</th>
<th>Player ID</th>
<th>Player Name</th>
<th>Player Rank</th>
<th>Points</th>
<th>Total Battles</th>
</thead>
<tbody>
</tbody>
</table>
<table class="stripped hide" id="global_table">
<thead>
<th>Position</th>
<th>ID</th>
<th>Name</th>
<th>Rank</th>
<th>Battles</th>
<th>Prelims</th>
<th>Day 1</th>
<th>Day 2</th>
<th>Day 3</th>
<th>Day 4</th>
<th>Day 5</th>
<th>Total</th>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div id="bets" class="col s12">Test 3</div>
<div id="ad" class="col s12">
<div class="container">
<div class="col s12">
<p>
JOIN IDOLGUILD
</p>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.2/js/materialize.min.js"></script>
</body>
</html>