forked from Aceship/AN-EN-Tags
-
Notifications
You must be signed in to change notification settings - Fork 0
/
akhrchars.html
228 lines (223 loc) · 12.6 KB
/
akhrchars.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
<!DOCTYPE html>
<html lang="zh-Hans" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>明日方舟公开招募干员表</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/multilingual.css">
<script src="js/jquery-3.4.0.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/multilingual.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-138420636-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-138420636-1');
</script>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark bg-dark">
<a class="navbar-brand cn" href="/">明日方舟工具箱</a>
<a class="navbar-brand en" href="/">Arknights Toolbox</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="展开">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-between" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link cn" href="akhr.html">公开招募计算器</a>
<a class="nav-link en" href="akhr.html">Recuitment Recommender</a>
</li>
<li class="nav-item">
<a class="nav-link cn" href="aklevel.html">升级计算</a>
<a class="nav-link en" href="aklevel.html">Levelup Calculator</a>
</li>
<li class="nav-item">
<a class="nav-link cn" href="akevolve.html">精英材料计算</a>
<a class="nav-link en" href="akevolve.html?lang=en">Evolve Calculator</a>
</li>
<li class="nav-item active">
<a class="nav-link cn" href="akhrchars.html">干员表</a>
<a class="nav-link en" href="akhrchars.html">Operators Table</a>
</li>
<li class="nav-item">
<a class="nav-link disabled cn" href="#">施工中…</a>
<a class="nav-link disabled en" href="#">WIP</a>
</li>
</ul>
<ul class="navbar-nav">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="switchLang" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Language
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="?lang=cn">中文</a>
<a class="dropdown-item" href="?lang=en">English</a>
</div>
</li>
</ul>
</div>
</nav>
<div class="container" style="margin:auto;max-width:1000px;">
<div class="col-12 alert alert-dark mt-3" role="alert">
<div id="box-tags">
<button type="button" class="btn btn-sm btn-info my-1" disabled>资质</button> |
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">新手</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">资深干员</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">高级资深干员</button>
<br />
<button type="button" class="btn btn-sm btn-info my-1" disabled>位置</button> |
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">远程位</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">近战位</button>
<br />
<button type="button" class="btn btn-sm btn-info my-1" disabled>性别</button> |
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">男性干员</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">女性干员</button>
<br />
<button type="button" class="btn btn-sm btn-info my-1" disabled>种类</button> |
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">先锋</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">狙击</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">医疗</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">术师</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">近卫</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">重装</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">辅助</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">特种</button>
<br />
<button type="button" class="btn btn-sm btn-info my-1" disabled>词缀</button> |
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">治疗</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">支援</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">输出</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">群攻</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">减速</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">生存</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">防护</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">削弱</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">位移</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">控场</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">爆发</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">召唤</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">快速复活</button>
<button type="button" class="btn btn-sm btn-primary btn-tag my-1">费用回复</button>
</div>
<hr class="my-1" />
<div id="box-options">
<button type="button" class="btn btn-sm btn-primary btn-opt my-1" opt-id="all" id="opt-all">ALL</button>
<button type="button" class="btn btn-sm btn-primary btn-opt my-1" opt-id="6">6★</button>
<button type="button" class="btn btn-sm btn-primary btn-opt my-1" opt-id="5">5★</button>
<button type="button" class="btn btn-sm btn-primary btn-opt my-1" opt-id="4">4★</button>
<button type="button" class="btn btn-sm btn-primary btn-opt my-1" opt-id="3">3★</button>
<button type="button" class="btn btn-sm btn-primary btn-opt my-1" opt-id="2">2★</button>
<button type="button" class="btn btn-sm btn-primary btn-opt my-1" opt-id="1">1★</button>
</div>
<hr class="my-1" />
<button type="button" class="btn btn-sm btn-success my-1" id="btn-all">全选</button>
<button type="button" class="btn btn-sm btn-danger my-1" id="btn-clear">清空</button>
</div>
<table class="table table-striped table-bordered table-hover my-3" id="table-chars">
<thead class="thead-dark">
<tr>
<th scope="col">干员</th>
<th scope="col">类型</th>
<th scope="col">Tags</th>
<th scope="col">公开</th>
</tr>
</thead>
<tbody id="tbody-chars"></tbody>
</table>
<hr />
<div class="row col-12 tutorial">
<div class="col-12 text-left">
<p>使用说明:</p>
<p>1. 选择需要查询的Tag;</p>
<p>2. 自动筛选符合条件的干员。</p>
</div>
</div>
</div>
<hr />
<div class="row col-12 page-footer">
<div class="col-12 text-center">
<p>最近更新:2019/05/05,<a href="https://bbs.nga.cn/read.php?tid=16971344">联系作者</a></p>
<p>
数据来源:
<a href="http://wiki.joyme.com/arknights/%E5%B9%B2%E5%91%98%E6%95%B0%E6%8D%AE%E8%A1%A8">明日方舟Wiki</a>
</p>
<p>Powered by 一只灰猫。</p>
</div>
</div>
<script>
$(function () {
showCurrentLang();
let all_chars = {};
let colors = { 1: "active", 2: "light", 3: "success", 4: "info", 5: "warning", 6: "danger" };
$.getJSON("akhr.json", function (data) {
let char_html = [];
data.sort(function (a, b) {
return a.level > b.level ? -1 : (a.level < b.level ? 1 : 0);
});
$.each(data, function (_, char) {
char.tags.push(char.sex + "性干员");
all_chars[char.name] = { 'level': char.level, 'tags': char.tags };
char_html.push("<tr class='table-" + colors[char.level] + " tr-char'><td>" + char.name + "</td><td>" + char.type + "</td><td>" + char.tags.join(",") + "</td><td>" + (char.hidden ? "否" : "是") + "</td></tr>");
});
$("#tbody-chars").html(char_html.join("\n"));
});
$(document).on("click", ".btn-tag", function () {
$(this).toggleClass("btn-primary btn-secondary");
let checked = $(this).hasClass("btn-primary");
let tag = $(this).text();
if (checked) {
$(".tr-char:contains('" + tag + "')").show();
} else {
$(".tr-char:contains('" + tag + "')").hide();
}
});
$(document).on("click", ".btn-opt", function () {
$(this).toggleClass("btn-primary btn-secondary");
let checked = $(this).hasClass("btn-primary");
if ($(this).attr("id") === "opt-all") {
$(".btn-opt").removeClass("btn-primary btn-secondary").addClass(
checked ? "btn-primary" : "btn-secondary"
);
if ($('#opt-all').hasClass('btn-secondary')) {
$('.tr-char').hide();
} else {
$('.tr-char').show();
}
} else {
if ($("#opt-all").hasClass("btn-primary")) {
$("#opt-all").toggleClass("btn-primary btn-secondary");
} else {
let checkedCount = 0;
$(".btn-opt").each(function (_, __) {
if ($(this).attr("id") === "opt-all") return;
if ($(this).hasClass("btn-primary")) checkedCount++;
});
if (checked) {
$(".table-" + colors[$(this).attr("opt-id")]).show();
} else {
$(".table-" + colors[$(this).attr("opt-id")]).hide();
}
if (checkedCount === 6) $("#opt-all").toggleClass("btn-primary btn-secondary");
}
}
});
$(document).on('click', '#btn-clear', function () {
$('.tr-char').hide();
$('.btn-tag').removeClass('btn-primary').addClass('btn-secondary');
$('.btn-opt').removeClass('btn-primary').addClass('btn-secondary');
});
$(document).on('click', '#btn-all', function () {
$('.tr-char').show();
$('.btn-tag').removeClass('btn-secondary').addClass('btn-primary');
$('.btn-opt').removeClass('btn-secondary').addClass('btn-primary');
});
});
</script>
</body>
</html>