-
Notifications
You must be signed in to change notification settings - Fork 434
/
index.html
287 lines (274 loc) · 13.5 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
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/list.js/1.5.0/list.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js"></script>
<title>Hodl's Item List</title>
<script type="text/javascript">
const itemListURL = "https://raw.githubusercontent.com/hodldeeznuts/hodl.github.io/master/itemlist.json";
const eventListURL = "https://raw.githubusercontent.com/hodldeeznuts/hodl.github.io/master/eventlist.json";
</script>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<a class="navbar-brand" href="#">HodlHodl</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://www.twitch.tv/hodlhodl">My Stream</a>
</li>
</ul>
</div>
</nav>
<main role="main">
<div class="jumbotron">
<div class="container">
<h1 class="display-3">TwitchToolkit</h1>
<p>TwitchToolkit is a mod written by Twitch.tv/hodlhodl that integrates storytelling decisions into chat votes, awards viewers coins for watching, and those coins can be spent on items/events in game.</p>
<ul class="list-group">
<li class="list-group-item">!bal - check balance and karma rate</li>
<li class="list-group-item">!buy - Syntax: !buy beer 6 - purchase an item or event</li>
<li class="list-group-item">!whatiskarma - explains what the karma system is</li>
<li class="list-group-item">!purchaselist - gives users a link to the public purchase list</li>
<li class="list-group-item">!instructions - gives users info on using the mod</li>
<li class="list-group-item">!modinfo - gives users info about the mod</li>
<li class="list-group-item">!modsettings - gives user info on how many coins are being earned and global settings</li>
<li class="list-group-item">!giftcoins - Syntax: !giftcoins @username 100 - give another viewer your coins</li>
<li class="list-group-item">!toolkitcmds - shows all available commands to the user, this does not translate by default so it can be universally recognized.</li>
<li class="list-group-item">!buy ticket - join the viewer name queue</li>
<li class="list-group-item">!mypawnstory - view information about your pawns backstory</li>
<li class="list-group-item">!mypawnskills - view information about your pawns skills</li>
</ul>
</div>
</div>
<div ng-app='tabs' ng-controller='tabCtrl'>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class='tabs'>
<form>
<div class="form-group">
<button class="btn btn-success" ng-class="{'active': (selected == '1')}" ng-click='selected=1'>
Items
</button>
<button class="btn btn-success" ng-class="{'active': (selected == '2')}" ng-click='selected=2'>
Events
</button>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label" for="">Price Between:</label>
<div class="col-sm-2">
<input type="number" class="form-control" id="item-price-min" placeholder="0">
</div>
<div class="col-sm-2">
<input type="number" class="form-control" id="item-price-max" placeholder="100000">
</div>
</div>
</form>
</div>
</div>
</div>
<div class="row" ng-show='selected == 1'>
<div class="col-md-12">
<div id="items">
<div class="input-group input-group-sm mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="inputGroup-sizing-sm">Search</span>
</div>
<input type="text" class="form-control search" aria-label="Search" aria-describedby="inputGroup-sizing-sm">
</div>
<p>
<button type="button" class="btn btn-primary sort" data-sort="abr">
Sort
</button>
<button type="button" class="btn btn-primary sort" data-sort="price">
Sort by Price
</button>
</p>
<table class="table items">
<tr>
<th scope="col" class="sort" data-sort="abr">Name</th>
<th scope="col" class="sort" data-sort="price">Price</th>
<th scope="col" class="sort" data-sort="category">Category</th>
</tr>
<tbody class="list">
</tbody>
</table>
</div>
</div>
</div>
<div class="row" ng-show='selected == 2'>
<div class="col-md-12">
<div id="events">
<div class="input-group input-group-sm mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="inputGroup-sizing-sm">Search</span>
</div>
<input type="text" class="form-control search" aria-label="Search" aria-describedby="inputGroup-sizing-sm">
</div>
<p>
<button type="button" class="btn btn-primary sort" data-sort="abr">
Sort
</button>
<button type="button" class="btn btn-primary sort" data-sort="price">
Sort by Price
</button>
<button type="button" class="btn btn-primary sort" data-sort="karmatype">
Sort by Karma
</button>
</p>
<table class="table events">
<tr>
<th scope="col" class="sort" data-sort="abr">Name</th>
<th scope="col" class="sort" data-sort="price">Price</th>
<th scope="col" class="sort" data-sort="karmatype">Karma</th>
</tr>
<tbody class="list">
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<!-- Example row of columns -->
<div class="row">
<div class="col-md-6">
</div>
<div class="col-md-6">
</div>
</div>
<hr>
</div>
</main>
<footer class="text-muted">
<div class="container">
<p class="float-right">
<a href="#">Back to top</a>
</p>
<p>Album example is © Bootstrap, but please download and customize it for yourself!</p>
<p>New to Bootstrap? <a href="../../">Visit the homepage</a> or read our <a href="../../getting-started/">getting started guide</a>.</p>
</div>
</footer>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="https://embed.twitch.tv/embed/v1.js"></script>
<style>
.sort:after {
display: inline-block;
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 5px solid transparent;
content: "";
position: relative;
top: -10px;
right: -5px;
}
.sort.asc:after {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 5px solid #fff;
content: "";
position: relative;
top: 4px;
right: -5px;
}
.sort.desc:after {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 5px solid #fff;
content: "";
position: relative;
top: -4px;
right: -5px;
}
</style>
<script type="text/javascript">
let itemList = null;
$.getJSON(itemListURL, function(data) {
var options = {
valueNames: ['abr', 'price', 'category'],
item: '<tr><td class="abr" scope="row"></td><td class="price"></td><td class="category"></td></tr>'
};
var itemData = [];
$.each(data.items, function(index, value) {
if (value["price"] > 0) {
itemData.push(value);
}
});
itemList = new List('items', options, itemData);
});
let eventList = null;
$.getJSON(eventListURL, function(data) {
var options = {
valueNames: ['abr', 'price', 'karmatype'],
item: '<tr><td class="abr" scope="row"></td><td class="price"></td><td class="karmatype"></td></tr>'
};
var eventData = [];
$.each(data.incitems, function(index, value) {
if (value["price"] > 0) {
eventData.push(value);
}
});
eventList = new List('events', options, eventData);
});
$("#item-price-min").keyup(function() {
updateItemFilter();
});
$("#item-price-max").keyup(function() {
updateItemFilter();
});
function updateItemFilter() {
var minPrice = $("#item-price-min").val();
var maxPrice = $("#item-price-max").val();
itemList.filter(function(item) {
var allow = true;
if (minPrice != "" && parseInt(item.values().price) < minPrice) {
allow = false;
}
if (maxPrice != "" && parseInt(item.values().price) > maxPrice) {
allow = false;
}
return allow;
});
eventList.filter(function(item) {
var allow = true;
if (minPrice != "" && parseInt(item.values().price) < minPrice) {
allow = false;
}
if (maxPrice != "" && parseInt(item.values().price) > maxPrice) {
allow = false;
}
return allow;
});
}
</script>
<script type="text/javascript">
var tabs = angular.module('tabs', [])
.controller('tabCtrl', function($scope) {
$scope.selected = "1";
});
</script>
</body>
</html>