-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.html
120 lines (99 loc) · 2.74 KB
/
example.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
<head>
<style>
.fl_r{float: right;}
.fl_l{float: left;}
.hide{display: none;}
body{
font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, Verdana, sans-serif;
font-size: 13px;
color: #272d35;
max-width: 800px;
margin: 20px auto;
}
a{
text-decoration: none;
color: #8c98a9;
}
a:hover{color: #76a2de;}
header{
padding: 20px 0;
border-bottom: 1px solid #e3e6e8;
}
header h1{
display: inline-block;
margin: 0 30px 0 0;
font-size: 1.5em;
}
footer{
padding: 20px 0;
border-top: 1px solid #e3e6e8;
text-align: center;
}
.content{
min-height: 300px;
padding: 30px 0;
font-size: 30px;
}
.btn{
display: inline-block;
padding: 10px 30px;
margin-top: -.8em;
border-radius: 25px;
background: #28d491;
color: #fff;
cursor: pointer;
}
.btn:hover{opacity: .8;}
.footer_push{cursor: pointer;}
.footer_push.off{
color: #e23d3d;
margin-left: 1em;
}
.footer_push.on{color: #15d46a;}
</style>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Emoji parser example</title>
</head>
<body>
<header>
<h1>Emoji parser example</h1>
<a href="https://github.com/neSpecc/emoji-parser">/doc</a>
</header>
<div class="content js-emoji-included">
😏 🏄
</div>
<footer>
<a class="fl_r" href="https://spark.ru">https://spark.ru</a>
<span class="fl_l">Spark Team</span>
<span class="footer_push on" id="togglerOn" onclick="toggleParse()">Parse Emoji</span>
<span class="footer_push off hide" id="togglerOff" onclick="toggleParse(true)">Parse back</span>
</footer>
</body>
<script src="specc-emoji.js" type="text/javascript"></script>
<script>
/**
*
* USAGE
*
* 1) Add class 'js-emoji-included' to Elements where Emoji may be included
* 2) Fire Emoji.parse()
*
*/
Emoji.parse();
</script>
<script>
/**
* Force parser on example page footer
*/
var toggleParse = function ( back ) {
var on = document.getElementById('togglerOn'),
off = document.getElementById('togglerOff');
if (!back) {
Emoji.parse(true);
} else {
Emoji.parseBack();
}
on.classList.toggle('hide');
off.classList.toggle('hide');
};
</script>