-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
253 lines (229 loc) · 9.35 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
<!DOCTYPE html>
<html>
<head>
<title>MoeLib</title>
<meta charset="UTF-8">
<meta name="keywords" content="二次元,萌,资源,应用,技术,dev,app,moe,api,lib,library,萌え,リブ,ライブラリ,アプリ,資源">
<meta name="description" content="Moelib aims for providing various nijigen resources and informations.">
<link rel="shortcut icon" href="favicon.ico">
<link href="css/semantic.min.css" rel="stylesheet" type="text/css">
<link href="css/icon.min.css" rel="stylesheet" type="text/css">
<link href="css/main.css" rel="stylesheet" type="text/css">
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?6830939f784f4956acb6f0d033c21ee3";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body>
<div class="ui inverted borderless main menu">
<div class="ui container">
<div href="#" class="header item">
moelib
</div>
<a href="/" class="item" data-i18n="menu.library"></a>
<a href="/about.html" class="item" data-i18n="menu.about"></a>
<div class="right item">
<div id="langsel" class="ui dropdown icon button">
<i class="world icon"></i>
<span class="text">Select Language</span>
<div class="menu">
<div class="item" data-value="zh">中文</div>
<div class="item" data-value="en">English</div>
<div class="item" data-value="jp">日本語</div>
</div>
</div>
</div>
</div>
</div>
<div class="main content">
<div class="ui text container message">
<p data-i18n="library.header"></p>
<p><span data-i18n="[html]misc.contribute"></span><a href="https://github.com/moelib/moelib.github.io/edit/master/data/dev.json" target="_blank"><button class="ui compact button" data-i18n="[html]misc.clicktoedit"></button></a></p>
</div>
<div class="filters ui centered grid" style="margin:1rem 0">
<div class="marginva">
<i class="large filter icon"></i>
</div>
<div>
<select id="pcfilter" class="ui search dropdown">
<option value="all" data-i18n="filter.all" selected></option>
<option value="audio" data-i18n="filter.audio"></option>
<option value="danmaku" data-i18n="filter.danmaku"></option>
<option value="downloader" data-i18n="filter.downloader"></option>
<option value="database" data-i18n="filter.database"></option>
<option value="imageboard" data-i18n="filter.imageboard"></option>
<option value="imageprocessing" data-i18n="filter.imageprocessing"></option>
<option value="imagerecognition" data-i18n="filter.imagerecognition"></option>
<option value="imagereversesearch" data-i18n="filter.imagereversesearch"></option>
<option value="mobileapp" data-i18n="filter.mobileapp"></option>
<option value="programlang" data-i18n="filter.programlang"></option>
<option value="subtitle" data-i18n="filter.subtitle"></option>
<option value="tool" data-i18n="filter.tool"></option>
<option value="web" data-i18n="filter.web"></option>
<option value="uncat" data-i18n="filter.uncat"></option>
</select>
</div>
<div>
<div class="ui icon input">
<input id="psinput" class="prompt" type="text" data-i18n="[placeholder]misc.search">
<i class="search icon"></i>
</div>
</div>
</div>
<div class="ui container">
<div id="devcards" class="ui three stackable cards">
<div rv-each-project="projects" rv-hide="project.hide" class="ui card">
<div class="content">
<div class="header">{project.name}</div>
<div class="meta">{project.author}</div>
<div rv-html="moe.getDesc | call moe.locale project" class="description">
</div>
</div>
<div class="ui two bottom attached buttons">
<div rv-on-click="moe.goSource" rv-if="project.source" class="ui button">
<i class="github icon"></i> Source
</div>
<div rv-on-click="moe.goLink" rv-if="project.link" class="ui button">
<i class="linkify icon"></i> Link
</div>
</div>
</div>
</div>
<div id="noresgrid" class="ui centered grid" rv-hide="moe.rCount">
<img src="img/noresult.jpg" />
</div>
</div>
</div>
<div class="ui inverted vertical footer segment">
<div class="ui center aligned container">
<div>
Site made with <i aria-label="love" class="ui centered mini heart icon" style="color:#bd081c"></i>by <a href="http://hexenq.com" target="_blank">Hexen</a>.
<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<span id="busuanzi_container_site_pv">Visits:<span id="busuanzi_value_site_pv"></span></span>
</div>
<div>
Copyright 2017 by <a href="http://hexenq.com" target="_blank">Hexen</a>. All Rights Reserved.
</div>
</div>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/semantic.min.js"></script>
<script src="js/i18next.min.js"></script>
<script src="js/lodash.min.js"></script>
<script src="js/rivets.bundled.min.js"></script>
<script src="js/pace.min.js"></script>
<script>
var spec = function(){
var pdata;
var pfilter = [];
moe.goSource = function(evt, data){
window.open(data.project.source);
};
moe.goLink = function(evt, data){
window.open(data.project.link);
};
moe.getDesc = function(locale,data){
return data["desc_"+locale] || data.desc;
};
moe.rCount = 9999;
moe.refreshI18N = function(){
$("body").i18n();
$("#pcfilter").dropdown("set text", $.t("filter."+$('#pcfilter').dropdown("get value")[0]));
};
// get result count
var getRCount = function(){
return _.countBy(pdata, function(o){
if(o.hide) return 'hide';
else return 'show';
})['show'];
}
var psearch = function(){
var kw = $("#psinput").val().trim();
pfilter.splice(0,pfilter.length);
if($("#pcfilter").val()!="all") pfilter.push($("#pcfilter").val());
_.each(pdata, function(project){
if(_.intersection(project.cats, pfilter).length == pfilter.length || pfilter.length == 0){
if(kw && kw != ""){
if(!!~project.name.toLowerCase().indexOf(kw) || !!~project.author.join(',').toLowerCase().indexOf(kw) || !!~project.desc.toLowerCase().indexOf(kw) || !!~project.cats.join(',').toLowerCase().indexOf(kw) )
project.hide = false;
else
project.hide = true;
}else{
project.hide = false;
}
}else{
project.hide = true;
}
})
moe.rCount = getRCount();
};
// init rivets settings
rivets.binders.hide = function (el, value) {
if (value) {
$(el).hide();
} else {
$(el).fadeIn(500);
}
}
$.getJSON("data/dev.json", function(data){
pdata = data;
moe.rCount = getRCount();
rivets.bind($("#devcards"), {
projects: pdata,
moe: moe
});
rivets.bind($("#noresgrid"), {
moe: moe
});
});
$("#psinput").on("input", function (evt) {
psearch();
});
$("#pcfilter").on("change", function (evt) {
psearch();
});
};
</script>
<script>
$(window).on('load', function () {
window.moe = {
locale: "en"
};
if(typeof spec != "undefined") {
spec();
}
// init elements
$(".ui.dropdown").dropdown();
// init i18n
i18n.init({load:'unspecific'}, function(err, t) {
$("#langsel").dropdown("set selected", i18n.lng());
moe.locale = i18n.lng();
if(moe.refreshI18N) moe.refreshI18N();
else{
$("body").i18n();
}
});
$("#langsel .item").click(function(evt){
i18n.setLng($(this).data("value"), function(){
if(moe.refreshI18N) moe.refreshI18N();
else{
$("body").i18n();
}
});
moe.locale = i18n.lng();
});
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-64105900-1', 'auto');
ga('send', 'pageview');
});
</script>
</body>
</html>