-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathindex.html
More file actions
165 lines (161 loc) · 5.09 KB
/
index.html
File metadata and controls
165 lines (161 loc) · 5.09 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>emoji-panel</title>
<script src="dist/emoji-panel.min.js"></script>
<link rel="stylesheet" href="dist/emoji-panel-apple-32.min.css" id="emoji-style">
<link rel="stylesheet" href="dist/example.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.3.0/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.3.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="https://code.jquery.com/jquery-2.2.3.min.js" integrity="sha256-a23g1Nt4dtEYOj7bR+vTu7+T8VP13humZFBJNIYoEJo=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js" integrity="sha256-xNjb53/rY+WmG+4L6tTl9m6PpqknWZvRt0rO1SRnJzw=" crossorigin="anonymous"></script>
<link href="https://fonts.googleapis.com/css?family=Poiret+One" rel="stylesheet" type="text/css">
</head>
<body>
<div class="main">
<h1>
<a href="https://github.com/TimeToKnow/emoji-panel">
EMOJI PANEL
</a>
</h1>
<h3 class="tagline">
<span class="tagline-text">
create emoji picker panel anywhere easily
</span>
</h3>
<h4 class="tagline">
<span class="tagline-text">
Extra small, with 3ms creation time!
</span>
</h4>
<a class="fork" href="https://github.com/TimeToKnow/emoji-panel">
<img class="gh-fork" src="https://camo.githubusercontent.com/52760788cde945287fbb584134c4cbc2bc36f904/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f77686974655f6666666666662e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png" />
</a>
</div>
<div id="example-0" class="example">
<h4 class="tagline">
<span class="tagline-text">
Seperated css, with multiple emojies options
</span>
</h4>
<div>
Will affect entire demo site -
<label>
Size:
<select id="select-size">
<option value="16">16</option>
<option value="20">20</option>
<option value="32" selected>32</option>
<option value="64">64</option>
</select>
</label>
<label>
imageSet:
<select id="select-image-set">
<option value="apple" selected>Apple</option>
<option value="google">Google</option>
<option value="twitter">Twitter</option>
<option value="emojione">Emojione</option>
</select>
</label>
</div>
<pre>
<code>
<head>
<link rel="stylesheet" href="dist/emoji-panel-apple-32.min.css">
<head/>
</code>
</pre>
</div>
<div class="example">
<div id="example-1"></div>
<pre>
<code>
// es6
import EmojiPanel from 'emoji-panel';
new EmojiPanel(document.getElementById('example-1'));
// es5
var EmojiPanel = require('emoji-panel');
new EmojiPanel(document.getElementById('example-1'));
</code>
</pre>
<pre>
<code>
/* Must provide or limit the height of the container */
#example-1 {
height: 400px
}
</code>
</pre>
</div>
<div class="example">
<div id="example-2"></div>
<pre>
<code>
// Click event example
new EmojiPanel(
document.getElementById('example-2'), {
onClick: e => {
alert(e.index);
alert(e.unified);
}
}
);
</code>
</pre>
</div>
<div class="example">
<div id="example-3-container">
<button id="example-3-btn">Click me to toggle dialog</button>
<div id="example-3"></div>
</div>
<pre>
<code class="javascript">
// Create the panel before opening the dialog for quick opening
// Though lazy creation also works and is blazing fast! (3ms)
new EmojiPanel(document.getElementById('example-3'));
// Toggle dialog
document.getElementById('example-3-btn').addEventListener('click', () => {
document.getElementById('example-3-container').classList.toggle('open');
});
</code>
</pre>
</div>
<div class="example">
<button id="example-4-btn">Click me to open jQuery dialog</button>
<div id="example-4"></div>
<pre>
<code>
new EmojiPanel(document.getElementById('example-4'));
$('#example-4').dialog({
minWidth: 274,
height: 800,
width: 600
});
</code>
</pre>
<pre>
<code>
/* So the dialog won't be visible before opening, jQuery will override the `dispaly`*/
#example-4 {
display: none;
}
</code>
</pre>
</div>
<div class="example">
<div id="example-5"></div>
<pre>
<code>
new EmojiPanel(document.getElementById('example-5'), {
animationDuration: 1000 // 300ms default
});
</code>
</pre>
</div>
<script type="text/javascript" src="dist/example.min.js"></script>
</body>
</html>