This repository has been archived by the owner on Apr 9, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
icons.html
226 lines (128 loc) · 9.62 KB
/
icons.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
<!doctype html>
<html>
<head>
<title>Material Design</title>
<link rel="shortcut icon" type="image/png" href="assets/img/icon.png"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#1a73e8">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="description" content="Material '18 - Icons">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="assets/css/material.min.css" />
<link rel="stylesheet" href="assets/css/waves.min.css" />
<script src="assets/js/waves.min.js"></script>
<script src="assets/js/material.min.js"></script>
</head>
<body>
<nav>
<a id="menuTrigger" class="waves-effect waves-blue menu-trigger"><i class="material-icons menu">menu</i><i class="material-icons close">close</i></a>
<h1><img src="assets/img/icon.png" /> Material '18</h1>
</nav>
<div id="sidenav" class="sidenav waves-white">
<a href="index.html" class="waves-effect waves-light-blue"><span class="sidenav-icon"><i class="material-icons">home</i></span><span>Home</span></a>
<a href="setup.html" class="waves-effect waves-light-blue"><span class="sidenav-icon"><i class="material-icons">build</i></span><span>Setup the library</span></a>
<a href="buttons.html" class="waves-effect waves-light-blue"><span class="sidenav-icon"><i class="material-icons">dashboard</i></span><span>Buttons</span></a>
<a href="text-inputs.html" class="waves-effect waves-light-blue"><span class="sidenav-icon"><i class="material-icons">text_format</i></span><span>Text inputs</span></a>
<a href="other-inputs.html" class="waves-effect waves-light-blue"><span class="sidenav-icon"><i class="material-icons">adjust</i></span><span>Other inputs</span></a>
<a href="modals.html" class="waves-effect waves-light-blue"><span class="sidenav-icon"><i class="material-icons">computer</i></span><span>Modals</span></a>
<a href="headers.html" class="waves-effect waves-light-blue"><span class="sidenav-icon"><i class="material-icons">vertical_align_top</i></span><span>Headers</span></a>
<a href="toasts.html" class="waves-effect waves-light-blue"><span class="sidenav-icon"><i class="material-icons">info</i></span><span>Toasts</span></a>
<a href="icons.html" class="waves-effect waves-light-blue"><span class="sidenav-icon"><i class="material-icons">extension</i></span><span>Icons</span></a>
<a href="loaders.html" class="waves-effect waves-light-blue"><span class="sidenav-icon"><i class="material-icons">cached</i></span><span>Loaders</span></a>
<a href="cards.html" class="waves-effect waves-light-blue"><span class="sidenav-icon"><i class="material-icons">check_box_outline_blank</i></span><span>Cards</span></a>
</div>
<div id="main" class="main">
<h1 class="title">Icons</h1>
<p class="subtitle">Icons are the best way to get the atention of the user or short something in menus.</p>
<textarea class="code" readonly><i class="material-icons">save_alt</i></textarea>
<p>Different sizes are available by using the pre-written size templates or the font-size property.</p>
<i class="tiny material-icons">save_alt</i>
<textarea class="code" readonly><i class="tiny material-icons">save_alt</i></textarea>
<i class="small material-icons">save_alt</i>
<textarea class="code" readonly><i class="small material-icons">save_alt</i></textarea>
<i class="medium material-icons">save_alt</i>
<textarea class="code" readonly><i class="medium material-icons">save_alt</i></textarea>
<i class="large material-icons">save_alt</i>
<textarea class="code" readonly><i class="large material-icons">save_alt</i></textarea>
<p>Click on the icons for more information!</p>
<div id="icons-presentation">
<div class="circular-loader">
<div class="loaderbox">
<div class="loader">
<svg class="circular" viewBox="25 25 50 50">
<circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/>
</svg>
</div>
</div>
</div>
</div>
<footer>
<h1 class="title">Material '18</h1>
<h1>A library for the Material Design 2018 edition</h1>
<iframe src="https://ghbtns.com/github-btn.html?user=MartonDev&repo=Material-Design-18&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
<h1 class="author">Made with ♥ by <a href="https://martondev.github.io" target="_blank">Marton</a></h1>
</footer>
</div>
<script>
$.get("https://raw.githubusercontent.com/google/material-design-icons/master/iconfont/codepoints", function(data) {
$("#icons-presentation").html("");
var lines = data.split("\n");
for(i = 0; i < lines.length; i++) {
var icon = lines[i].split(" ")[0];
if(icon != "") {
$("#icons-presentation").append('<div id="pres-' + icon + '" class="icon-presentation waves-effect waves-blue"><i class="material-icons">' + icon + '</i>' + icon + '</div>');
$("body").append('<div class="modal" id="icon-' + icon + '"><div class="modal-container"><div class="modal-header"><h1>' + icon + '</h1><a class="close waves-effect waves-light-blue"><i class="material-icons">close</i></a></div><div class="modal-content"><div style="display:inline-block;vertical-align:top;margin-right:10px;"><i class="large material-icons example-icon">' + icon + '</i></div><div style="display:inline-block;vertical-align:top;"><textarea class="code" style="width:250px;" readonly><i class="material-icons">' + icon + '</i></textarea><h1>Color</h1><label><input type="radio" name="group1" class="grey-radio" /><span>Normal</span></label><br /><label><input name="group1" type="radio" checked /><span>Primary</span></label><br /><label><input name="group1" type="radio" class="success" /><span>Success</span></label><br /><label><input name="group1" type="radio" class="warning" /><span>Warning</span></label><br /><label><input name="group1" type="radio" class="error" /><span>Error</span></label><h1>Size</h1><label><input name="group2" type="radio" checked /><span>Tiny</span></label><br /><label><input name="group2" type="radio" /><span>Small</span></label><br /><label><input name="group2" type="radio" /><span>Medium</span></label><br /><label><input name="group2" type="radio" /><span>Large</span></label></div></div></div></div>');
$("#pres-" + icon).click(function() {
toggleModal('icon-' + $(this).attr("id").split("pres-")[1]);
});
$("#icon-" + icon + " input[type=radio]").click(function() {
if($(this).attr("name") == "group1") {
switch ($(this).parent().find("span").html()) {
case "Normal":
$(this).parent().parent().parent().find(".example-icon").removeClass("primary success warning error");
break;
case "Primary":
$(this).parent().parent().parent().find(".example-icon").removeClass("primary success warning error");
$(this).parent().parent().parent().find(".example-icon").addClass("primary");
break;
case "Success":
$(this).parent().parent().parent().find(".example-icon").removeClass("primary success warning error");
$(this).parent().parent().parent().find(".example-icon").addClass("success");
break;
case "Warning":
$(this).parent().parent().parent().find(".example-icon").removeClass("primary success warning error");
$(this).parent().parent().parent().find(".example-icon").addClass("warning");
break;
case "Error":
$(this).parent().parent().parent().find(".example-icon").removeClass("primary success warning error");
$(this).parent().parent().parent().find(".example-icon").addClass("error");
break;
}
}else if($(this).attr("name") == "group2") {
switch ($(this).parent().find("span").html()) {
case "Tiny":
$(this).parent().parent().parent().find(".example-icon").removeClass("tiny small medium large");
$(this).parent().parent().parent().find(".example-icon").addClass("tiny");
break;
case "Small":
$(this).parent().parent().parent().find(".example-icon").removeClass("tiny small medium large");
$(this).parent().parent().parent().find(".example-icon").addClass("small");
break;
case "Medium":
$(this).parent().parent().parent().find(".example-icon").removeClass("tiny small medium large");
$(this).parent().parent().parent().find(".example-icon").addClass("medium");
break;
case "Large":
$(this).parent().parent().parent().find(".example-icon").removeClass("tiny small medium large");
$(this).parent().parent().parent().find(".example-icon").addClass("large");
break;
}
}
$(this).parent().parent().parent().find("textarea.code").val($(this).parent().parent().parent().find(".example-icon").parent().html());
});
}
}
});
</script>
</body>
</html>