-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
170 lines (156 loc) · 6.46 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
---
layout: null
---
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bad Interface</title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/skeleton.css">
<link rel="stylesheet" href="css/dice-1.0.min.css">
<link rel="icon" type="image/png" href="favicon.png">
<script src="js/jquery-3.4.1.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/moment.min.js"></script>
<script src="js/propeller-b5a0ebf.js"></script>
<script src="js/tesseract-v2.0.1.min.js"></script>
<!-- Analytics -->
<script defer data-domain="mattw.io" src="https://plausible.io/js/plausible.js"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="one-third column" style="margin-top: 5%">
<h3>About</h3>
<p>
A collection of purposefully bad user interface implementations.
Inspired by posts on <a href="https://www.reddit.com/r/badUIbattles/">r/badUIbattles</a>.
</p>
<p>
<a href="https://github.com/mattwright324/bad-ui">Fork me on GitHub</a>
</p>
<h4>Bad</h4>
<ul>
<li>Date inputs
<ul>
<li><a href="#all-the-years">All the years</a></li>
<li><a href="#index-of-pi">Index of π</a></li>
<li><a href="#random-date">Random date</a></li>
<li><a href="#day-adder">Day Adder</a></li>
<li><a href="#date-slider">Date Slider</a></li>
<li><a href="#boomerang">Date Boomerang</a></li>
<li><a href="#roll-the-date">Roll the Date</a></li>
</ul>
</li>
<li>Email inputs
<ul>
<li><a href="#ouija-email">Ouija Email</a></li>
</ul>
</li>
<li>Phone inputs
<ul>
<li><a href="#phone-dropdown">Phone Dropdown</a></li>
<li><a href="#random-phone">Random Phone</a></li>
<li><a href="#phone-slider">Phone Slider</a></li>
<li><a href="#boomerang-phone">Phone Boomerang</a></li>
<li><a href="#etch-a-phone">Etch-a-Phone</a></li>
</ul>
</li>
<li>Volume inputs
<ul>
<li><a href="#pump-it-volume">Pump It Volume</a></li>
<li><a href="#fiddle-volume">Fiddle Volume</a></li>
</ul>
</li>
</ul>
</div>
<script>
const global = (function () {
'use strict';
return {
shuffleArray: function (array) {
return array.sort(() => Math.random() - 0.5);
},
randomizeChildren: function randomizeChildren(element) {
function randomize() {
$(element + ">").map(function (i, t) {
let s = $(t).siblings();
s.eq(Math.round(s.length * Math.random())).after(t)
})
}
randomize();
$(element).change(randomize);
},
leftPad(string, char, length) {
let padded = String(string);
while (padded.length < length) {
padded = char + padded;
}
return padded.substr(0, length);
},
rightPad(string, char, length) {
let padded = String(string);
while (padded.length < length) {
padded += char;
}
return padded.substr(0, length);
}
}
})();
</script>
<div class="two-thirds column" style="margin-top: 5%">
<h3>Bad Date</h3>
{% include date-dropdown.html %}
{% include date-index-of-pi.html %}
{% include date-day-adder.html %}
{% include date-slider.html %}
{% include date-boomerang.html %}
{% include date-roll-the.html %}
<h3>Bad Email</h3>
{% include email-ouija-board.html %}
<h3>Bad Phone</h3>
<script>
const phone = (function () {
'use strict';
return {
/**
* Formats a digit to a US style number.
* @param integer
* @returns e.g. +1 (xxx) xxx-xxxx
*/
toUSString: function (integer) {
let number = String(Math.trunc(integer));
while (number.length < 10) {
number = "0" + number;
}
return "+1 (" + number.substr(0, 3) + ") " + number.substr(3, 3) + "-" + number.substr(6, 4);
}
}
})();
</script>
{% include phone-dropdown.html %}
{% include phone-random.html %}
{% include phone-slider.html %}
{% include phone-boomerang.html %}
{% include phone-etch-a.html %}
<h3>Bad Volume</h3>
{% include volume-pumpit.html %}
{% include volume-fiddle.html %}
</div>
</div>
<div class="row" style="margin-top: 5%; margin-bottom: 5%;">
<div class="twelve columns" align=center style="color:darkgray">
mattwright324 | 2019 |
<a href="/">home</a> |
<a href="https://github.com/mattwright324">github</a> |
<a href="https://github.com/mattwright324/bad-ui">bad-ui</a>
</div>
</div>
</div>
</body>
</html>