-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathslangs.html
112 lines (106 loc) · 6.05 KB
/
slangs.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>EZ</title>
<link rel="icon" type="image/svg+xml" sizes="78x78" href="https://cdn.jsdelivr.net/gh/ezealot/ez/Designs/cdn/Logo.svg">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/fonts/font-awesome.min.css">
<link rel="stylesheet" href="assets/css/styles.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.3.1/css/swiper.min.css">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VC3G40V4ZG"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-VC3G40V4ZG');
</script>
</head>
<body style="background: url("https://cdn.jsdelivr.net/gh/ezealot/ez/Designs/cdn/BG.svg");margin-bottom: 30px;">
<nav class="navbar navbar-light navbar-expand-md navigation-clean-search" style="background: rgba(255,255,255,0);">
<div class="container"><button data-toggle="collapse" class="navbar-toggler" data-target="#navcol-1"><span class="sr-only">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse" id="navcol-1"><img class="mr-auto" src="https://cdn.jsdelivr.net/gh/ezealot/ez/Designs/cdn/Logo.svg" width="60" height="60" alt="Esports Zealot">
<ul class="nav navbar-nav border rounded ml-auto" style="background: rgba(255,255,255,0.5);">
<li class="nav-item"><a class="nav-link" href="/">Home</a></li>
<li class="nav-item"><a class="nav-link active" href="/slangs">Slangs</a></li>
<li class="nav-item"><a class="nav-link" href="/about">About</a></li>
</ul>
<form id="slangSearch" class="form-inline ml-auto" target="_self">
<div class="form-group border rounded" style="background: rgba(255,255,255,0.5);padding-left: 12px;"><label for="search-field"><i class="fa fa-search"></i></label><input class="form-control search-field" type="search" id="search-field" name="search" style="color: #ffffff;"></div>
</form>
</div>
</div>
</nav>
<div class="container border rounded" style="background: rgba(255,255,255,0.3);">
<h1 style="color: #ffffff;margin-top: 12px;margin-left: 50px;margin-bottom: 12px;"><strong>Slangs</strong></h1>
<div class="table-responsive table-bordered border rounded" style="margin-top: 20px;margin-left: 50px;width: 1000px;margin-bottom: 20px;">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th style="color: rgb(255,255,255);font-size: 25px;text-align: center;">Slang</th>
<th style="color: rgb(255,255,255);font-size: 25px;text-align: center;">Actual Word</th>
<th style="color: rgb(255,255,255);font-size: 25px;text-align: center;">Description</th>
</tr>
</thead>
<tbody class="slangsTable">
<!-- Slangs is Appended here -->
</tbody>
</table>
</div>
</div>
<footer>
<img id="goToTop" width="70px" src="https://www.flaticon.com/svg/static/icons/svg/992/992703.svg">
</footer>
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.3.1/js/swiper.jquery.min.js"></script>
<script src="assets/js/script.min.js"></script>
</body>
<script>
$.getJSON( `https://raw.githubusercontent.com/ezealot/ezealot.github.io/main/data/slangs/slangs.json`, function(data) {
data.forEach(element => {
let id = element.slang;
id = id.toUpperCase();
$( '.slangsTable' ).append( `<tr id="${id}"><td style="color: rgb(255,255,255);font-size: 20px;text-align: center;" >${element.slang}</td>
<td style="color: rgb(255,255,255);font-size: 20px;text-align: center;" >${element.acc_word}</td>
<td style="color: rgb(255,255,255);font-size: 20px;text-align: center;" >${element.definition}</td></tr>` );
if (window.location.hash) {
let sl = window.location.hash.slice(1,window.location.hash.length);
let ind = document.getElementById(sl);
document.getElementById("search-field").value = sl;
if(ind===null)
{document.getElementById("slangSearch").style.backgroundColor = "#cf0000";}
else
{document.getElementById("slangSearch").style.backgroundColor = "inherit";}
window.location = `${window.location.origin}/slangs${window.location.hash}`;
}
});
});
$( "#slangSearch" ).submit(function( event ) {
event.preventDefault();
let query = document.getElementById("search-field").value;
query = query.toUpperCase();
let ind = document.getElementById(query);
if(ind===null)
{document.getElementById("slangSearch").style.backgroundColor = "#cf0000";}
else
{document.getElementById("slangSearch").style.backgroundColor = "inherit";}
window.location = `${window.location.origin}/slangs#${query}`;
});
$("#goToTop").click(function () {
$("html, body").animate({scrollTop: 0}, 1000);
});
mybutton = document.getElementById("goToTop");
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}
</script>
</html>