-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
177 lines (158 loc) · 4.48 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta property="og:image" content="https://repository-images.githubusercontent.com/187298416/d6e26800-944f-11e9-8226-b783000852e0" />
<script src="https://imlolman.github.io/js/controller.js"></script>
<title>Font Awesome Font</title>
<link rel="stylesheet" href="css/all.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-142979168-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', '{{ site.google_analytics }}');
</script>
<style>
.font {
line-height: 1.4;
text-align: center;
background-color: #f9f9f9;
border: 1px solid #fff;
height: 120px;
margin-bottom: 10px;
padding: 5px;
border-radius: 2px;
box-shadow: 0px 0px 1px grey;
cursor: pointer;
}
.font:active {
box-shadow: 0px 0px 3px grey;
}
.icon {
margin-top: 5px;
margin-bottom: 10px;
font-size: 40px;
position: absolute;
bottom: 20px;
left: 75px;
}
.tooltip {
position: relative;
display: inline-block;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 140px;
background-color: #555;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px;
position: absolute;
z-index: 1;
bottom: 150%;
left: 50%;
margin-left: -75px;
opacity: 0;
transition: opacity 0.3s;
}
.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #555 transparent transparent transparent;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
#notification {
background: #20c997;
display: none;
margin: 0px auto;
position: fixed;
animation: fadein 1s;
z-index: 1031;
top: 20px;
right: 20px;
animation-iteration-count: 1;
color: #fff;
padding: 10px 30px;
border-radius: 5px;
}
@keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
</style>
</head>
<body>
<div class="container mt-2">
<h1>Font-Awesome 5.8.2 Offline Documentation </h1>
<br>
<div class="input-group mb-3">
<input type="text" class="form-control" placeholder="Search Icon Here.." aria-label="Recipient's username"
aria-describedby="basic-addon2" onkeyup="search()" id="search">
<div class="input-group-append">
<span class="input-group-text" id="basic-addon2"><i class="fas fa-search"></i></span>
</div>
</div>
<div class="row fonts mt-4" id="fonts"></div>
</div>
<div id="notification"><i class="far fa-check-circle"></i> Successfully Copied </div>
</body>
<script>
function search() {
searchedIcons = []
searchString = document.getElementById("search").value.toLowerCase();
icons.forEach(function (icon) {
if (icon.name.search(searchString) != -1) {
searchedIcons.push(icon)
}
})
addIcons(searchedIcons)
}
function addIcons(icons) {
document.getElementById('fonts').innerHTML = ""
icons.forEach(function (icon) {
init = icon.type;
name = icon.name;
var template = document.createElement('template');
template.innerHTML = `<div class="col-md-2" onclick="copyIt('` + init + ` ` + name + `')"><div class="font"><div class="title">
` + init + ` ` + name + `
</div><div class="icon"><i class="
` + init + ` ` + name + `
"></i></div></div></div>`;
document.getElementById('fonts').append(template.content.firstChild);
})
}
function copyIt(icon) {
tocopy = '<i class="' + icon + '"></i>'
var temp = document.createElement("input");
document.body.append(temp);
temp.value = tocopy
temp.select()
document.execCommand("copy");
temp.remove()
document.getElementById("notification").style.display = "inline-block"
setTimeout(function () {
document.getElementById("notification").style.display = "none"
}, 2000)
}
</script>
<script src="js/icons.js"></script>
</html>