-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
406 lines (358 loc) · 13.7 KB
/
index.html
File metadata and controls
406 lines (358 loc) · 13.7 KB
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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1"/>
<link rel="stylesheet" type="text/css" href="fonts/bigoo/bigoo.min.css">
<link rel="stylesheet" type="text/css" href="stylesheets/index.css">
<title>Bigoo - Font Icon</title>
</head>
<body>
<h1 id="title" class="title">Bigo<span class="secondColor">o</span></h1>
<div class="subtitle">Bicolor Font Icon by <a class="ninjalink" href="http://undless.fr">undless</a></div>
<div class="githublink">Hosted on <a href="https://github.com/undless/bigoo" class="link">Github</a></div>
<div class="text">
<b>Bigo<span class="secondColor">o</span></b> is a bicolor font icon.<br>
CSS & font-face only, as regular font icon.<br>
<span class="highlight">I'll update the project with new icons, <a href="https://github.com/undless/bigoo" class="ninjalink"><strong>stay tuned!</strong></a></span>
</div>
<div class="description pickers">
<h2>It's so FLUFFY</h2>
<div class="picker-text">Because it's a font, you can change colors and size the way you want / need / love :</div>
<div id="colorpicker1" class="picker">
<div class="picker-label">Main Color</div>
</div>
<div id="colorpicker2" class="picker">
<div class="picker-label">Second Color</div>
</div>
<div id="sizepicker" class="picker">
<div class="picker-label">Size</div>
</div>
<div id="pickerReset" class="picker-reset">Reset colors and size</div>
</div>
<div id="demo" class="demo"></div>
<div class="description">
<h2>I NEED IT</h2>
Well, to use it in your project : <br><br>
<ol>
<li><a href="downloads/bigoo.zip" class="link">Download the file</a></li>
<li>Unzip where you want in your project</li>
<li>Link the css to your project : <span class="code"><link rel="stylesheet" type="text/css" href="yourPathToTheFile/bigoo/bigoo.min.css"></span></li>
<li>Chose the two colors you want and add them in your own CSS using CSS Variables (<a href="https://caniuse.com/#feat=css-variables" class="link">CSS Variables Support table</a> )
<span class="code">
:root {<br>
 --bigoo-main-color: <span class="hexcode-main"></span>;<br>
 --bigoo-second-color: <span class="hexcode-second"></span>;<br>
}</span>
Make sure that this declaration is made BEFORE the bigoo.min.css import.<br><br>
<b>If you prefer to use SASS Variables:</b><br>
<a href="downloads/bigooSCSS.zip" class="link">Download the SASS version</a>
and set the two colors you want in your SCSS vars definitions
<span class="code">
$bigoo-main-color: <span class="hexcode-main"></span>;<br>
$bigoo-second-color: <span class="hexcode-second"></span>;<br>
</span>
Make sure that the var initialization is made BEFORE the bigoo.min.scss import and to preprocess it with all your other stylesheets.<br><br>
<b>If you dont want to use variables at all:</b><br>
Just edit the bigoo.min.css file with your 2 colors:
<span class="code">
.bigoo:before{color:<span class="hexcode-main"></span>}<br>
.bigoo:after{color:<span class="hexcode-second"></span>}
</span>
</li>
<li>Use it in your project. You need the general class "bigoo" and the specific icon class. Exemple: <span class="code"><i class="bigoo bigoo-arrow-circle-left"></i></span> You can use it directly on existing tags with text inside. <span class="code"><h1 class="bigoo bigoo-arrow-circle-left">Big Title Here</h1></span> But be aware that the line-height property is set to 0.<br>
I would recommand to use a specific <i>, <span> or <div> tag.</li>
</ol>
</div>
<div class="description hooks">
<h2>Hooks</h2>
The <b>Bigo<span class="secondColor">o</span></b> CSS is !important free and single class only so you can easily overide any style from your own CSS. Here are some exemples:<br><br>
If you need spécific color on only one icon:
<span class="code">
.bigoo-cross::before {<br>
 color:darkred;<br>
}<br>
.bigoo-cross::after {<br>
 color:red;<br>
}
</span>
<span class="exemple"><i class="bigoo bigoo-cross"></i></span>
If you need animation:
<span class="code">
.bigoo-battery-1::before {<br>
 color:red;<br>
 animation-name: lowbattery;<br>
 animation-duration: 1s;<br>
 animation-iteration-count: infinite;<br>
}<br>
@keyframes lowbattery {<br>
 0% {opacity: 1;}<br>
 49% {opacity: 1;}<br>
 50% {opacity: 0;}<br>
 100% {opacity: 0;}<br>
}<br>
.bigoo-battery-1::after {<br>
 color:#ddd;<br>
}
</span>
<span class="exemple"><i class="bigoo bigoo-battery-1"></i></span>
If you need hover effect:
<span class="code">
.hooks .bigoo-rafters-up::after {<br>
 transform: translateY(0);<br>
 transition: transform 200ms;<br>
}<br>
.hooks .bigoo-rafters-up:hover::after {<br>
 transform: translateY(-14px);<br>
}
</span>
<span class="exemple"><i class="bigoo bigoo-rafters-up"></i></span>
Do what you want, and show me!
</div>
<br><br><br><br>
<h2>Anything else ?</h2><br>
Feel free to open an <a href="https://github.com/undless/bigoo/issues" class="link">issue on Github</a> i'll answer as fast as i can.<br><br><br><br>
Enjoy!<br><br><br><br><br><br>
</div>
<footer class="footer">
Made with love by <a class="link" href="http://undless.fr">undless</a>
</footer>
<script>
// Icon Demo Creation
var iconlist = [
'bigoo-arrow-circle-left',
'bigoo-arrow-circle-right',
'bigoo-arrow-double-left',
'bigoo-arrow-double-right',
'bigoo-arrow-down',
'bigoo-arrow-left',
'bigoo-arrow-right',
'bigoo-arrow-up',
'bigoo-rafter-down',
'bigoo-rafter-left',
'bigoo-rafter-right',
'bigoo-rafter-up',
'bigoo-check',
'bigoo-cross',
'bigoo-info',
'bigoo-minus',
'bigoo-plus',
'bigoo-question',
'bigoo-danger',
'bigoo-rafters-down',
'bigoo-rafters-left',
'bigoo-rafters-right',
'bigoo-rafters-up',
'bigoo-arrow-rect-left',
'bigoo-arrow-rect-right',
'bigoo-battery-empty',
'bigoo-battery-0',
'bigoo-battery-1',
'bigoo-battery-2',
'bigoo-battery-3',
'bigoo-battery-4',
'bigoo-battery-5',
'bigoo-checkbox',
'bigoo-checkbox-checked',
'bigoo-checkbox-minus',
'bigoo-cursors',
'bigoo-cursors',
'bigoo-edit',
'bigoo-edit',
'bigoo-circle',
'bigoo-eye',
'bigoo-eye-blocked',
'bigoo-radio',
'bigoo-radio-checked',
'bigoo-upload',
'bigoo-download',
'bigoo-switch-off',
'bigoo-switch-on',
'bigoo-time',
'bigoo-time-back',
'bigoo-time-glass'
];
var demo = document.getElementById('demo');
for (i=0; i<iconlist.length; i++) {
var iconblock = document.createElement('div');
iconblock.classList.add('iconblock');
var iconname = document.createElement('span');
iconname.classList.add('iconname');
var icon = document.createElement('i');
icon.classList.add('bigoo',iconlist[i]);
iconname.innerHTML = iconlist[i];
iconblock.appendChild(icon);
iconblock.appendChild(iconname);
demo.appendChild(iconblock);
}
// Demo Colors and Size Customization
var colors = [
'#f44336',
'#e91e63',
'#9c27b0',
'#673ab7',
'#3f51b5',
'#2196f3',
'#03a9f4',
'#00bcd4',
'#009688',
'#4caf50',
'#8bc34a',
'#cddc39',
'#ffeb3b',
'#ffc107',
'#ff9800',
'#ff5722',
'#795548',
'#607d8b',
'#EEEEEE',
'#DDDDDD',
'#AAAAAA',
'#888888',
'#444444',
'#222222',
'#000000'
];
var sizes = [
'14px',
'16px',
'18px',
'20px',
'22px',
'24px',
'26px',
'28px',
'30px',
'32px',
'34px',
'36px',
'38px'
];
var defaultMainColor = colors[6];
var defaultSecondColor = colors[17];
var defaultSize = sizes[4];
if (localStorage.getItem('bigoo-main-color')) {
defaultMainColor = localStorage.getItem('bigoo-main-color');
}
if (localStorage.getItem('bigoo-second-color')) {
defaultSecondColor = localStorage.getItem('bigoo-second-color');
}
if (localStorage.getItem('bigoo-size')) {
defaultSize = localStorage.getItem('bigoo-size');
}
var hexcodeMain = document.getElementsByClassName('hexcode-main');
var hexcodeSecond = document.getElementsByClassName('hexcode-second');
var colorpicker1 = document.getElementById('colorpicker1');
var colorpicker2 = document.getElementById('colorpicker2');
var sizepicker = document.getElementById('sizepicker');
var title = document.getElementById('title');
// init colors
document.body.style.setProperty('--bigoo-main-color', defaultMainColor);
document.body.style.setProperty('--bigoo-second-color', defaultSecondColor);
for (i=0; i<hexcodeMain.length; i++) {
hexcodeMain[i].innerHTML = defaultMainColor;
}
for (i=0; i<hexcodeSecond.length; i++) {
hexcodeSecond[i].innerHTML = defaultSecondColor;
}
// Color Picker
createColorPicker(colorpicker1, defaultMainColor);
createColorPicker(colorpicker2, defaultSecondColor);
function createColorPicker(wrapper, defaultColor) {
for (i=0; i<colors.length; i++) {
var color = document.createElement('div');
color.classList.add('color');
color.style.backgroundColor = colors[i];
color.setAttribute('data-color', colors[i]);
if (colors[i] === defaultColor) {
color.classList.add('color-active');
}
color.addEventListener('click', function() {
var turnoff = wrapper.getElementsByClassName('color-active');
for (i=0; i<turnoff.length; i++) {
turnoff[i].classList.remove('color-active');
}
this.classList.add('color-active');
if (wrapper === colorpicker1) {
localStorage.setItem("bigoo-main-color",this.getAttribute('data-color'));
setColorProperty(hexcodeMain, '--bigoo-main-color', this.getAttribute('data-color'));
}
if (wrapper === colorpicker2) {
localStorage.setItem("bigoo-second-color",this.getAttribute('data-color'));
setColorProperty(hexcodeSecond, '--bigoo-second-color', this.getAttribute('data-color'));
}
});
wrapper.appendChild(color);
}
}
function setColorProperty(elemArray, property, value) {
for (i=0; i<elemArray.length; i++) {
elemArray[i].innerHTML = value;
}
document.body.style.setProperty(property, value);
}
// init size
document.body.style.setProperty('--icon-size', defaultSize);
// Size Picker
createSizePicker(sizepicker, defaultSize);
function createSizePicker(wrapper, defaultSize) {
for (i=0; i<sizes.length; i++) {
var size = document.createElement('div');
size.classList.add('size');
size.innerHTML = sizes[i];
size.setAttribute('data-size', sizes[i]);
if (sizes[i] === defaultSize) {
size.classList.add('size-active');
}
size.addEventListener('click', function() {
var turnoff = wrapper.getElementsByClassName('size-active');
for (i=0; i<turnoff.length; i++) {
turnoff[i].classList.remove('size-active');
}
this.classList.add('size-active');
localStorage.setItem("bigoo-size",this.getAttribute('data-size'));
document.body.style.setProperty('--icon-size', this.getAttribute('data-size'));
});
wrapper.appendChild(size);
}
}
// Reset ALL Custom settings
var pickerReset = document.getElementById('pickerReset');
pickerReset.addEventListener('click', function() {
localStorage.removeItem("bigoo-main-color");
localStorage.removeItem("bigoo-second-color");
localStorage.removeItem("bigoo-size");
defaultMainColor = colors[6];
defaultSecondColor = colors[17];
defaultSize = sizes[4];
var resetAll = colorpicker1.getElementsByClassName('color');
for (i=0; i<resetAll.length; i++) {
if (resetAll[i].getAttribute('data-color') === defaultMainColor) {
resetAll[i].classList.add('color-active');
} else {
resetAll[i].classList.remove('color-active');
}
}
resetAll = colorpicker2.getElementsByClassName('color');
for (i=0; i<resetAll.length; i++) {
if (resetAll[i].getAttribute('data-color') === defaultSecondColor) {
resetAll[i].classList.add('color-active');
} else {
resetAll[i].classList.remove('color-active');
}
}
resetAll = document.getElementsByClassName('size');
for (i=0; i<resetAll.length; i++) {
if (resetAll[i].getAttribute('data-size') === defaultSize) {
resetAll[i].classList.add('size-active');
} else {
resetAll[i].classList.remove('size-active');
}
}
setColorProperty(hexcodeMain, '--bigoo-main-color', defaultMainColor);
setColorProperty(hexcodeSecond, '--bigoo-second-color', defaultSecondColor);
document.body.style.setProperty('--icon-size', defaultSize);
});
</script>
</body>
</html>