blob: bc77ac167b83405d24f39ab1cab1d933c924a870 (
plain)
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
|
---
---
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="editor.css">
<title>Tabler Icons</title>
<style>
body {
display: none;
}
</style>
</head>
<body>
<div class="container">
<div class="box">
<div class="mb">
<div class="icons-list">
{% for icon in site.icons %}
{% assign name = icon.slug %}
<div class="icons-list-icon js-icon" title="{{ icon.slug }}" data-icon="{{ name }}">
{% include icon.html name=name %}
</div>
{% endfor %}
</div>
</div>
<div class="mb">
<div class="icons-list">
{% for icon in site.icons %}
{% assign name = icon.slug %}
<div class="icons-list-icon js-icon" title="{{ icon.slug }}" data-icon="{{ name }}">
{% include icon.html name=name stroke=1.25 %}
</div>
{% endfor %}
</div>
</div>
</div>
</div>
<script src="{{ site.baseurl }}/jquery-3.4.1.slim.min.js"></script>
<script>
$(document).ready(function () {
$('body')
.on('click', '.js-icon', function (e) {
var icon = $(this).attr('data-icon');
$('.js-icon-name').html(icon);
localStorage.setItem('icon', icon);
$('.js-icon-manager svg').replaceWith($(this).find('>svg:eq(0)').clone());
e.preventDefault();
return false;
})
.on('input', '.js-input-range', function(e){
$('.js-icon svg').css('stroke-width', $(this).val());
e.preventDefault();
return false;
});
var icon = localStorage.getItem('icon');
if (icon) {
$('.js-icon[data-icon="' + icon + '"]').eq(0).click();
}
document.body.style.display = "block"
});
</script>
</body>
</html>
|