-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
285 lines (269 loc) · 13.2 KB
/
index.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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Family Emoji</title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="css/materialize.min.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="css/family.css" media="screen,projection"/>
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="Family Emoji" />
<meta name="twitter:description" content="Create emoji zero-width joiner sequences for families of arbitrary size and skin tone combinations." />
<meta name="twitter:image" content="http://family-emoji.org/img/sample_family.png" />
</head>
<body>
<header>
<h1>Family Emoji</h1>
</header>
<div id="content">
<div class="full-width row">
<div class="col s6">
<a class="dropdown-button btn" href="#" data-activates="dropdown-add-person">
<i class="material-icons left">add</i>Add person
</a>
<!-- Dropdown Structure -->
<ul id='dropdown-add-person' class='dropdown-content'>
<li><a onclick="addPerson('woman')">Woman</a></li>
<li><a onclick="addPerson('man')">Man</a></li>
<li class="divider"></li>
<li><a onclick="addPerson('girl')">Girl</a></li>
<li><a onclick="addPerson('boy')">Boy</a></li>
<!--<li><a href="#!">Baby</a></li>-->
</ul>
</div>
<div class="col s6 right-align">
<a class="btn" href="#" onclick="$('#modal-info').modal('open'); return false;">
<i class="material-icons left">info</i>About</a>
</div>
</div>
<svg id="family" preserveAspectRatio="xMidYMid meet" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
<g id="parents-container"></g>
<g id="children-container"></g>
</svg>
</div>
<footer class="page-footer">
<div class="container white-text">
<div class="row">
<div class="input-field col s6">
<input id="emoji" type="text" readonly>
</div>
<div class="input-field col s2">
<a class="btn" onclick="copyFamily();">Copy</a>
</div>
</div>
</div>
<div class="footer-copyright">
<div class="container">
<div class="row">
<div class="col s8">
Emoji artwork is provided by <a class="grey-text text-lighten-4" href="https://www.emojione.com/">EmojiOne</a>
and is licensed under <a class="grey-text text-lighten-4" href="https://creativecommons.org/licenses/by/4.0/legalcode">CC-BY 4.0</a>
</div>
<div class="col s4 right-align">
Created by <a class="grey-text text-lighten-4" href="https://twitter.com/cketti">cketti</a>
</div>
</div>
</div>
</div>
</footer>
<div id="modal-change-person" class="modal">
<div class="modal-content">
<h4>Configure person</h4>
<h5>Type</h5>
<div id="change-type-parents" class="person-type">
<a id="change-type-woman" href="#" onclick="changePersonType('woman'); return false;"><img src="img/woman.svg"></a>
<a id="change-type-man" href="#" onclick="changePersonType('man'); return false;"><img src="img/man.svg"></a>
</div>
<div id="change-type-children" class="person-type" style="display: none">
<a id="change-type-girl" href="#" onclick="changePersonType('girl'); return false;"><img src="img/girl.svg"></a>
<a id="change-type-boy" href="#" onclick="changePersonType('boy'); return false;"><img src="img/boy.svg"></a>
<!--<a id="change-type-baby" href="#" onclick="changePersonType('baby'); return false;">Baby</a>-->
</div>
<h5>Skin tone</h5>
<div class="skin-container">
<a class="skin-none" href="#" onclick="changeSkinTone(0); return false;">No skin color</a>
<a class="skin-tone-1-2" href="#" onclick="changeSkinTone(1); return false;">Skin tone type 1-2</a>
<a class="skin-tone-3" href="#" onclick="changeSkinTone(2); return false;">Skin tone type 3</a>
<a class="skin-tone-4" href="#" onclick="changeSkinTone(3); return false;">Skin tone type 4</a>
<a class="skin-tone-5" href="#" onclick="changeSkinTone(4); return false;">Skin tone type 5</a>
<a class="skin-tone-6" href="#" onclick="changeSkinTone(5); return false;">Skin tone type 6</a>
</div>
</div>
<div class="modal-footer">
<a href="#" class="modal-action modal-close waves-effect waves-red btn-flat" onclick="return false;">Cancel</a>
<a href="#" class="modal-action modal-close waves-effect waves-red btn-flat remove-person" onclick="removePerson(); return false;">Remove person</a>
</div>
</div>
<div id="modal-info" class="modal">
<div class="modal-content">
<h4>About family-emoji.org</h4>
<p>
This site allows you to create emoji <a href="https://en.wikipedia.org/wiki/Zero-width_joiner">zero-width joiner (ZWJ)</a> sequences for families of arbitrary size and skin tone combinations.
</p>
<img id="sample-family" src="img/sample_family.svg">
<p>
<a href="https://emojipedia.org/">Emojipedia</a> has a great blog post on the technical details and platform support for various ZWJ sequences:
<a href="https://blog.emojipedia.org/why-there-arent-black-family-emojis/">Why There Aren't Black Family Emojis</a>.
</p>
<br>
<h5>How do I change the composition and appearance of the family?</h5>
<p>
To <strong>add a person</strong> press the button «Add person» in the upper left corner. A dialog will pop up allowing you to select what type of person to add.<br>
To <strong>change the appearance</strong> of a family member click on the person. You will see a dialog that allows you to change the gender or skin tone of the person.
If you want to <strong>remove a person</strong> press the «Remove person» button at the bottom of that dialog.
</p>
<h5>I assembled my dream family. Now what?</h5>
<p>
Use the «Copy» button at the bottom of this site to copy the emoji ZWJ sequence representing the configured family to the clipboard. You can now paste it to the application of your choice, e.g. an instant messaging app to send the family emoji to a friend.<br>
However, it's possible that either your platform, or the recipient's platform, or both, don't support that particular emoji sequence. Please see the Emojipedia blog post linked above for more information on platform support.
</p>
<p>
The URL of this website is automatically updated when you make changes to the family. So simply copying the URL from your browser's address bar and sending it to someone else will allow them to open this website with your family configuration.
</p>
<h5>Limitations</h5>
<p>
Currently the person configuration is limited to the <a href="https://en.wikipedia.org/wiki/Gender_binary">gender binary</a>. Contributions that add support for the gender-neutral emojis added in <a href="https://emojipedia.org/emoji-5.0/">Emoji 5.0</a> are very welcome.
</p>
<p>
<a href="https://emojipedia.org/baby/">Babies</a> and <a href="https://emojipedia.org/older-adult/">older adults</a> are currently not supported.
</p>
<p>
Mixing persons without specified skin color (displayed as yellow) and persons with a skin tone is deliberately not supported. That's why all family members will change skin color when switching from using no skin tone to using skin tones and vice versa.
</p>
<p>
A family (in the context of this site) consists of at least one adult and one child. Hence removing the last remaining person in each category is not possible.
</p>
<h5>Contribute</h5>
<p>
To report bugs, request features, or contribute code please head over to GitHub: <a href="https://github.com/cketti/FamilyEmoji">https://github.com/cketti/FamilyEmoji</a>.
</p>
</div>
<div class="modal-footer">
<a href="#" class="modal-action modal-close waves-effect waves-green btn-flat" onclick="return false;">Ok</a>
</div>
</div>
<svg id="template" viewBox="0 0 64 64" style="width: 200px; position: absolute; display: none;"
xmlns="http://www.w3.org/2000/svg">
<g
id="woman">
<path
class="hair"
d="M17,2C7.3,2,2,8.3,2,16.7v18.5h30V16.7c0-12.4-8.1-12.2-8.1-12.2S23.3,2,17,2z"
fill="#ffb300"/>
<path
d="M2,34.8V62h30V34.8C32,29,2,29,2,34.8z"
fill="#c2185b"/>
<path
class="skin"
d="m6.4 23.6c0 0-2.2-.6-2.2-3.9 0-2.6 1.7-3.1 1.7-3.1 6 0 15.8-7.8 15.8-7.8s3.7 6.9 7.3 7.8c0 0 1.7.3 1.7 3.1 0 3.3-2.3 3.9-2.3 3.9 0 5-6.8 10-11 10-4 0-11-5-11-10"
fill="#ffdd67"/>
<g
class="mouth-and-eyes"
fill="#937237">
<circle
r="2.2"
cy="20.3"
cx="12.1"/>
<circle
r="2.2"
cy="20.3"
cx="22.9"/>
<path
d="m21.1 27.1c-2.3 1.8-4.9 1.8-7.2 0-.3-.2-.5.2-.3.5.7 1.3 2.1 2.4 3.9 2.4s3.2-1.1 3.9-2.4c.2-.3 0-.7-.3-.5"/>
</g>
</g>
<g
id="man">
<path
d="m32 34.8v27.2h30v-27.2c0-5.8-30-5.8-30 0"
fill="#01579b"/>
<path
class="hair"
d="m31.9 17.3l1.5 2.8h26.2l1.1-2.9c0-10.6-2.5-15-14.1-15.1-11.8-.2-14.7 4.5-14.7 15.2"
fill="#ffb300"/>
<path
class="skin"
d="m59.7 17.1c-.1.6-.2 1.2-.4 1.5-.3.6-.9.9-.9.9s.2-1.2.1-2.8c-.7-9.7-1.2-5.1-11.9-5.1-10.7 0-11.3-4.7-11.9 5-.1 1.7.1 2.8.1 2.8s-.6-.3-.9-.9c-.2-.3-.3-.9-.4-1.5-1-.3-2.3 0-2.3 2.9 0 1.8.7 3.3 2.9 3.5.8 6.1 8.9 10.1 12.6 10.1 3.6 0 11.8-4.1 12.6-10.1 2.2-.2 2.9-1.7 2.9-3.5-.2-2.8-1.5-3-2.5-2.8"
fill="#ffdd67"/>
<g
class="mouth-and-eyes"
fill="#937237">
<circle
r="2.2"
cy="20.3"
cx="41"/>
<circle
r="2.2"
cy="20.3"
cx="52"/>
<path
d="m50.1 27.1c-2.3 1.8-4.9 1.8-7.2 0-.3-.2-.5.2-.3.5.7 1.3 2.1 2.4 3.9 2.4s3.2-1.1 3.9-2.4c.2-.3 0-.7-.3-.5"/>
</g>
</g>
<g
id="boy">
<path
fill="#29b6f6"
d="m57 62h-25c0-8.4 25-8.4 25 0"/>
<path
class="hair"
fill="#ffb300"
d="m44.5 36c-6.7 0-10.9 3.8-10.9 8.5v3.2c0 3.7 2.9 3.7 2.9 3.7h16.4c0 0 2.5 0 2.5-3.7 0-1.7 0-3.2 0-3.2 0-4.7-4.4-8.5-10.9-8.5"/>
<path
class="skin"
fill="#ffdd67"
d="m34.6 48.5l.4-4.5c0-2.9 4.5-.6 9.5-.6s9.5-2.3 9.5.6l.4 4.5c2.2 0 2.2 3.5 0 3.5 0 4.4-5.9 7-9.9 7-4 0-9.9-2.6-9.9-7-2.1 0-2.1-3.5 0-3.5"/>
<g
class="mouth-and-eyes"
fill="#937237">
<circle
r="1.8"
cy="49.8"
cx="39.7"/>
<circle
r="1.8"
cy="49.8"
cx="49.3"/>
<path
d="m41.4 54.4c2 1.5 4.3 1.5 6.3 0 .2-.2.5.1.3.4-.6 1.1-1.9 2-3.4 2-1.6 0-2.8-1-3.4-2-.3-.3-.1-.6.2-.4"/>
</g>
</g>
<g
id="girl">
<path
class="hair"
fill="#ffb300"
d="m30 51.6h.9v-5.7c0-5.5-4.4-9.8-11.6-9.8-6.9 0-11.6 4.4-11.6 9.8 0 1.1 0 5.7 0 5.7h1.2c-1.5 1.7-2.7 5.4-1.4 7.7.5.9 5.9 4.2 6.4-1.6h11.1c.5 5.8 5.9 2.5 6.4 1.6 1.3-2.3.1-6-1.4-7.7"/>
<g
fill="#ff81ab">
<path
d="m19.3 37.8c-6.2 0-10.4 3.2-10.4 7.2 0 0 0 .5 0 1.2 0-4 4.2-7.2 10.4-7.2 6.4 0 10.4 3.2 10.4 7.2v-1.2c0-4-3.9-7.2-10.4-7.2"/>
<path
d="m7 62h25c0-8.4-25-8.4-25 0"/>
</g>
<path
class="skin"
fill="#ffdd67"
d="m29.3 52.8c0 0 1.8.3 1.8-1.7 0-1.6-1.8-1.5-1.8-1.5v-1.8c0 0-13.5-.6-16.6-5.7.8 5.1-3.3 7.4-3.3 7.4s-1.8-.2-1.8 1.5c0 2 1.8 1.7 1.8 1.7 0 3 5.3 6.2 10.2 6.2 4.4.1 9.7-2.6 9.7-6.1"/>
<g
class="mouth-and-eyes"
fill="#937237">
<path
d="m25.8 49.8c0 1-.8 1.8-1.8 1.8-1 0-1.8-.8-1.8-1.8s.9-1.8 1.8-1.8c1 0 1.8.8 1.8 1.8"/>
<circle
r="1.8"
cy="49.8"
cx="14.9"/>
<path
d="m22.6 54.4c-2 1.5-4.3 1.5-6.3 0-.2-.2-.5.1-.3.4.6 1.1 1.9 2 3.4 2 1.6 0 2.8-1 3.4-2 .3-.3 0-.6-.2-.4"/>
</g>
</g>
</svg>
<!--Import jQuery before materialize.js-->
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/materialize.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</body>
</html>