-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
161 lines (159 loc) · 6.88 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
<!DOCTYPE html>
<html>
<head>
<title>Emoji Ipsum</title>
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,500' rel='stylesheet' type='text/css'>
<link href='css/main.css' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="container">
<h1 class="header">Emoji Ipsum</h1>
<p class="introPara">This is really just a silly, mostly useless experiment that will probably not work properly for all browsers, but was a fun hack nonetheless. It's just a simple generator for lots of random emoji. Desktop Chrome will likely not work with this, at least not at the time of creation. You can get it to work by using the lovely <a href="https://chrome.google.com/webstore/detail/chromoji-emoji-for-google/cahedbegdkagmcjfolhdlechbkeaieki">Chromoji</a> addon. It should work in Firefox and Safari at least. As for the pervasive Internet Explorer, <a href="http://browsehappy.com/">get a modern browser</a>. There's a lot of work to be done on this. Please check out the <a href="https://github.com/caffeinewriter/Emoji-Ipsum/issues">issues page</a> if you're interested in contributing.</p>
<div class="buttons">
<button class="genPara">New Emoji Ipsum</button>
<button class="togglePlain">Toggle Plain Text</button>
<button class="toggleSettings">Toggle Settings</button>
</div>
<div class="settingsDisplay">
<fieldset>
<table>
<th>
Emoji to Ipsum Ratio:
</th>
<tr>
<td>
<label for="emojiRatio">Ratio:</label>
</td>
<td>
Mostly Ipsum<input type="range" min="10" max="100" step="10" name="emojiRatio" class="emojiRatio" value="100">All Emoji
</td>
</tr>
<th>
Emoji per word:
</th>
<tr>
<td>
<label for="wordMin">Minimum:</label>
</td>
<td>
<input type="number" value="4" name="wordMin" class="wordMin" min="1">
</td>
</tr>
<tr>
<td>
<label for="wordMax">Maximum:</label></td>
<td>
<input type="number" value="8" name="wordMax" class="wordMax" min="1">
</td>
</tr>
<th>Words per Sentence:</th>
<tr>
<td>
<label for="wordsPerSentenceMin">Minimum:</label>
</td>
<td>
<input type="number" value="8" name="wordsPerSentenceMin" class="wordsPerSentenceMin" min="1">
</td>
</tr>
<tr>
<td>
<label for="wordsPerSentenceMax">Maximum:</label>
</td>
<td>
<input type="number" value="16" name="wordsPerSentenceMax" class="wordsPerSentenceMax" min="1">
</td>
</tr>
<th>Sentences per Paragraph:</th>
<tr>
<td>
<label for="paraSentenceMin">Minimum:</label>
</td>
<td>
<input type="number" value="3" name="paraSentenceMin" class="paraSentenceMin" min="1">
</td>
</tr>
<tr>
<td>
<label for="paraSentenceMax">Minimum:</label>
</td>
<td>
<input type="number" value="6" name="paraSentenceMax" class="paraSentenceMax" min="1">
</td>
</tr>
<th>Total Paragraphs:</th>
<tr>
<td>
<label for="totParas">Number:</label>
</td>
<td>
<input type="number" value="4" name="totParas" class="totParas" min="1">
</td>
</tr>
</table>
<button class="saveSettings">Save Settings</button>
</fieldset>
</div>
<div class="emojiDisplay">
<div class="emojiIpsum"></div>
<textarea class="emojiPlain"></textarea>
</div>
<div class="footer"><small>Made with 💘 by <a href="https://github.com/caffeinewriter">Brandon Anzaldi</a></small></div>
</div>
<a href="https://github.com/caffeinewriter/Emoji-Ipsum"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="js/emojiIpsum.js"></script>
<script>
var emoji;
var wordMin = 4;
var wordMax = 8;
var wordsPerSentenceMin = 8;
var wordsPerSentenceMax = 16;
var paraSentenceMin = 3;
var paraSentenceMax = 6;
var totParas = 4;
$('.togglePlain').click(function(){
$('.emojiIpsum').toggle();
$('.emojiPlain').toggle();
});
$('.genPara').click(function() {
var emojiHTML = emoji.genHTML();
$('.emojiIpsum').html(emojiHTML);
$('.emojiPlain').val(emojiHTML.replace(/<\/?p>/,''));
});
$('.emojiPlain').click(function() {
$(this).select();
});
$('.toggleSettings').click(function(){
$('.settingsDisplay').toggle(400);
});
$('.saveSettings').click(function() {
worMin = $('.wordMin').val();
worMax = $('.wordMax').val();
wordPerSentenceMin = $('.wordsPerSentenceMin').val();
wordPerSentenceMax = $('.wordsPerSentenceMax').val();
parSentenceMin = $('.paraSentenceMin').val();
parSentenceMax = $('.paraSentenceMax').val();
totParas = $('.totParas').val();
emojiRat = $('.emojiRatio').val();
emoji = new EmojiIpsum(worMin,worMax,wordPerSentenceMin,wordPerSentenceMax,parSentenceMin,parSentenceMax,emojiRat);
var emojiHTML = emoji.genHTML(totParas);
$('.emojiIpsum').html(emojiHTML);
$('.emojiPlain').val(emojiHTML.replace(/<\/?p>/,''));
});
$(document).ready(function() {
emoji = new EmojiIpsum();
var emojiHTML = emoji.genHTML(totParas);
$('.emojiIpsum').html(emojiHTML);
$('.emojiPlain').val(emojiHTML.replace(/<\/?p>/,''));
});
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-56155581-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>