-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
123 lines (112 loc) · 5.4 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="keywords" content="UIC, Computer, CS, CST, Computer Science, UICer, 计算机, 联合国际学院">
<meta name="description" content="多少人与你同名, How many of you in UIC">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
<meta http-equiv="Cache-Control" content="no-siteapp">
<title>How Many of You in UIC</title>
<!-- <link rel="icon" href="/img/favicon.ico"> -->
<!-- Bootstrap core CSS -->
<link href="https://lib.baomitu.com/twitter-bootstrap/5.1.3/css/bootstrap.min.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
<script src="https://lib.baomitu.com/jquery/3.6.0/jquery.min.js"></script>
</head>
<body class="text-center" data-gr-c-s-loaded="true" onload="$('#loader-wrapper').fadeOut('slow')">
<div id="loader-wrapper">
<div id="loader"></div>
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
<div class="load_title" style="color: #212529;"><br><br>Loading...
</div>
</div>
<div class="site-wrapper">
<div class="site-wrapper-inner" style="background-color: rgba(0, 0, 0, 0.5);">
<div class="cover-container d-flex h-100 p-3 mx-auto flex-column">
<header class="masthead mb-auto">
<div class="inner">
<h3 class="masthead-brand">How Many of You in UIC</h3>
</div>
</header>
<main role="main" class="inner cover">
<div class="card border-warning invisible bg-transparent" style="margin-bottom: 1rem;" id="amountCard">
<div class="card-header border-warning">数据库中叫 <span id="titleName"></span> 的人有</div>
<div class="card-body">
<h1><span id="amountPlace"></span> 人</h1>
</div>
</div>
<input class="form-control form-control-lg" type="text" placeholder="Your English Name" id="EnglishName"
style="text-align: center;" onkeydown="KeyDown()">
<p class="lead"></p>
<p class="lead">
<button class="btn btn-lg btn-warning" id="InquiryBtn">查询</button>
</p>
<small>我们整理出了 2015 届 - 2019 届学生的英文名,来看看有多少人与你同名呢? <br>(部分英文名大小写敏感)</small>
</main>
<footer class="mastfoot mt-auto">
<div class="row d-flex align-items-center justify-content-center">
<div style="padding-right: 2rem" class="flex-column">
<a href="https://uichcc.com/">
<img class="img-fluid align-self-center p-2" style="height: 2rem;" src="https://uichcc.com/img/uichccwhite.svg">
</a>
<a class="p-2" href="https://uichcc.com/">UIC HCC 计算机俱乐部</a>
</div>
<div class="flex-column">
<a href="https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MjM5OTIxNjgwMA==&scene=124#wechat_redirect">
<img class="img-fluid align-self-center p-2" style="height: 3rem;" src="https://cdn.drjchn.com/img/uichcc/uicerlogo.jpg">
</a>
<a class="p-2" href="https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MjM5OTIxNjgwMA==&scene=124#wechat_redirect">UICer · UIC 新媒体工作室</a>
</div>
</div>
<div class="inner">
<p>2020 Updated · <a href="tou.html">Privacy Policy · Copyright</a></p>
</div>
</footer>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://lib.baomitu.com/popper.js/2.11.4/umd/popper.min.js"></script>
<script src="https://lib.baomitu.com/twitter-bootstrap/5.1.3/js/bootstrap.min.js"></script>
<script src="https://cdn.drjchn.com/js/linq.min.js"></script>
<script src="data.js"></script>
<script>
function titleCase(str) {
const array = str.toLowerCase().split(" ");
for (var i = 0; i < array.length; i++) {
array[i] = array[i][0].toUpperCase() + array[i].substring(1, array[i].length);
}
const string = array.join(" ");
return string;
}
function InquiryEntry(input) {
return Enumerable.from(dataSet)
.where(function (x) {
return x.name === input
})
.select(function (x) {
return x.count
})
.toArray();
}
function InquiryName(rawName) {
const CapName = titleCase(rawName);
const Amount = InquiryEntry(CapName)[0];
const Attempt = InquiryEntry(rawName)[0];
return parseInt(Amount == null ? (Attempt == null ? 0 : Attempt) : Amount);
}
$("#InquiryBtn").click(function () {
$("#amountPlace").text(InquiryName($("#EnglishName").val()));
$("#titleName").text($("#EnglishName").val());
$("#amountCard").removeClass('invisible');
})
function KeyDown(){
if (event.keyCode==13){
$("#InquiryBtn").trigger("click");
}
}
</script>
</html>