-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
121 lines (106 loc) · 3.93 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
<html>
<head>
<title>Auto-incorrect text</title>
<link rel="icon" href="./favicon.png">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
@import url('https://fonts.googleapis.com/css?family=Roboto&display=swap');
@import url('https://fonts.googleapis.com/css?family=Fira+Mono|Roboto&display=swap');
body {
padding: 3em;
width: 40em;
margin: auto;
}
h3 {
text-align: center;
margin-bottom: 2em;
font-family: 'Roboto', sans-serif;
}
textarea { width: 100%; }
#settings {
font-family: 'Roboto', sans-serif;
margin: 2em auto;
width: 50%;
}
#settings .center {
display: flex;
justify-content: center;
}
#settings .range input {
display: inline-block;
margin: 10px 0;
width: 100%;
}
#settings .presets {
display: flex;
justify-content: space-between;
}
#settings .presets button {
width: 24%;
}
.setting {
margin: 0 0 15px;
}
.text {
border-radius: 10px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
border: none;
min-height: 6em;
padding: 8px;
/* Monospaced, because the random character changes are twitchy */
font-family: 'Fira Mono', monospace;
font-size: 14px;
/* Horizontal scaling looks bad */
max-width: 100%;
min-width: 100%;
box-sizing: border-box;
}
@media only screen and (max-width: 768px) {
body {
width: inherit;
padding: 1.5em;
}
#settings {
width: inherit;
}
.text {
min-height: 12em;
}
}
</style>
</head>
<body>
<h3>Auto-incorrect text</h3>
<textarea id="inputText" class="text">In 1974 Egyptologists visiting his tomb noticed that the mummy's condition was rapidly deteriorating and flew it to Paris for examination.[71] Ramesses II was issued an Egyptian passport that listed his occupation as "King (deceased)"</textarea>
<div id="settings">
<div class="setting drunkedness">
<label>Randomizer strength</label>
<control>
<div class="range">
<input type="range" min="0" max="100" value="50" class="slider" id="drunkednessPercentage">
</div>
<div class="presets">
<button onclick="setSlider(0)">Sober</button>
<button onclick="setSlider(10)">Tipsy</button>
<button onclick="setSlider(20)">Full drunk</button>
<button onclick="setSlider(40)">Illegible</button>
</div>
</control>
</div>
<div class="setting digits">
<label>Use digits?</label>
<control>
<input type="checkbox" id="useDigits">
</control>
</div>
<div class="setting punct">
<label>Use punctuation?</label>
<control>
<input type="checkbox" id="usePunct">
</control>
</div>
</div>
<p id="outputText" class="text"></p>
<script src="./index.js"></script>
</body>
</html>