demo_mode 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/demo_mode/version.rb +1 -1
- data/public/assets/demo_mode/demo_mode.css +318 -0
- data/public/assets/demo_mode/demo_mode.js +117 -0
- data/public/assets/demo_mode/icon--tophat.png +0 -0
- data/public/assets/demo_mode/icon--user.png +0 -0
- data/public/assets/demo_mode/icon--users.png +0 -0
- data/public/assets/demo_mode/loader.png +0 -0
- data/public/assets/demo_mode/vendor/normalize-v8.0.1.css +349 -0
- data/public/assets/demo_mode/vendor/typed-v2.1.0.js +2 -0
- metadata +9 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b196c5819bc10bf1250a85f86945116322e6b5c6b80ab5aa5203f53bdb51703e
|
4
|
+
data.tar.gz: 4ff919a389d224246010c59644c400608afb1e0d55a80fe5f049ba0cc86280f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b82b5aef0976ca6267cbf9bcce2aabc49e157c0bbba42623819f30559e3edd8d6486b5ec1caa02df20fbd61995bdf1759aef00d3361d1a264ef2c2ff59b57df
|
7
|
+
data.tar.gz: 02ba40ba00c3247bb9652b4fafad550b23821ca1326fa380384042d21bc2c5c33eba7b246cc634bdef0681b69d9e1e80492905bb208c4c82ba06ae7cc0e4beb3
|
data/lib/demo_mode/version.rb
CHANGED
@@ -0,0 +1,318 @@
|
|
1
|
+
:root {
|
2
|
+
--font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
3
|
+
--primary-color: #228be6;
|
4
|
+
}
|
5
|
+
|
6
|
+
*,
|
7
|
+
*:before,
|
8
|
+
*:after {
|
9
|
+
box-sizing: inherit;
|
10
|
+
-webkit-box-sizing: inherit;
|
11
|
+
box-sizing: border-box;
|
12
|
+
-webkit-box-sizing: border-box;
|
13
|
+
}
|
14
|
+
|
15
|
+
html {
|
16
|
+
color: #333;
|
17
|
+
font-size: 10px;
|
18
|
+
line-height: 1.15;
|
19
|
+
font-family: var(--font-family);
|
20
|
+
font-smoothing: antialiased;
|
21
|
+
-webkit-font-smoothing: antialiased;
|
22
|
+
osx-font-smoothing: grayscale;
|
23
|
+
-moz-osx-font-smoothing: grayscale;
|
24
|
+
text-size-adjust: 100%;
|
25
|
+
-ms-text-size-adjust: 100%;
|
26
|
+
-webkit-text-size-adjust: 100%;
|
27
|
+
}
|
28
|
+
|
29
|
+
body {
|
30
|
+
max-width: 1264px;
|
31
|
+
height: 100vh;
|
32
|
+
display: grid;
|
33
|
+
grid-template-rows: auto 1fr auto;
|
34
|
+
margin: 0 auto;
|
35
|
+
padding: 0 32px;
|
36
|
+
font-size: 1.6rem;
|
37
|
+
line-height: 2.4rem;
|
38
|
+
}
|
39
|
+
|
40
|
+
header,
|
41
|
+
main,
|
42
|
+
footer {
|
43
|
+
width: 100%;
|
44
|
+
margin: 0 auto;
|
45
|
+
padding: 0;
|
46
|
+
}
|
47
|
+
|
48
|
+
article {
|
49
|
+
padding-top: 3.2rem;
|
50
|
+
}
|
51
|
+
section {
|
52
|
+
margin-bottom: 3.2rem;
|
53
|
+
}
|
54
|
+
|
55
|
+
h1,
|
56
|
+
h2,
|
57
|
+
h3,
|
58
|
+
h4 {
|
59
|
+
color: #222;
|
60
|
+
margin-top: 0;
|
61
|
+
}
|
62
|
+
h1:last-child, h2:last-child, h3:last-child, h4:last-child {
|
63
|
+
margin-bottom: 0;
|
64
|
+
}
|
65
|
+
|
66
|
+
a {
|
67
|
+
color: var(--primary-color);
|
68
|
+
cursor: pointer;
|
69
|
+
text-decoration: none;
|
70
|
+
}
|
71
|
+
a:hover,
|
72
|
+
a:focus,
|
73
|
+
a:active {
|
74
|
+
text-decoration: underline;
|
75
|
+
}
|
76
|
+
|
77
|
+
hr {
|
78
|
+
border: 0;
|
79
|
+
width: 100%;
|
80
|
+
border-top: 1px solid #e3e3e3;
|
81
|
+
margin: 1.4rem 0;
|
82
|
+
}
|
83
|
+
|
84
|
+
header {
|
85
|
+
display: grid;
|
86
|
+
grid-template-columns: auto 1fr auto;
|
87
|
+
gap: 1.6rem;
|
88
|
+
align-items: center;
|
89
|
+
height: 6.4rem;
|
90
|
+
}
|
91
|
+
|
92
|
+
header small {
|
93
|
+
padding-left: 1.6rem;
|
94
|
+
border-left: 1px solid #e3e3e3;
|
95
|
+
color: #666;
|
96
|
+
font-size: 1.2rem;
|
97
|
+
line-height: 1.6rem;
|
98
|
+
}
|
99
|
+
|
100
|
+
.personas-callout {
|
101
|
+
display: grid;
|
102
|
+
grid-template-columns: repeat(auto-fill, minmax(20em, 1fr));
|
103
|
+
gap: 3rem;
|
104
|
+
}
|
105
|
+
|
106
|
+
.personas-callout section {
|
107
|
+
display: grid;
|
108
|
+
grid-template-rows: auto auto auto 1fr auto;
|
109
|
+
gap: 1rem;
|
110
|
+
justify-items: center;
|
111
|
+
text-align: center;
|
112
|
+
border: 3px solid #e3e3e3;
|
113
|
+
padding: 3.2rem;
|
114
|
+
margin-bottom: 2rem;
|
115
|
+
}
|
116
|
+
.personas-callout section:hover {
|
117
|
+
border-color: #cdcdcd;
|
118
|
+
cursor: pointer;
|
119
|
+
text-decoration: none;
|
120
|
+
}
|
121
|
+
.personas-callout figure {
|
122
|
+
width: 7em;
|
123
|
+
}
|
124
|
+
.personas-callout img, svg {
|
125
|
+
max-width: 100%;
|
126
|
+
}
|
127
|
+
.personas-callout h2,
|
128
|
+
.personas-callout select,
|
129
|
+
.personas-callout input {
|
130
|
+
margin: 0;
|
131
|
+
}
|
132
|
+
.personas-callout ul {
|
133
|
+
margin: 0 0 0.5rem 0;
|
134
|
+
padding: 0;
|
135
|
+
list-style-type: none;
|
136
|
+
list-style-position: outside;
|
137
|
+
}
|
138
|
+
.personas-callout li {
|
139
|
+
color: #666;
|
140
|
+
font-size: 1.4rem;
|
141
|
+
line-height: 2rem;
|
142
|
+
}
|
143
|
+
|
144
|
+
form,
|
145
|
+
input,
|
146
|
+
select,
|
147
|
+
textarea,
|
148
|
+
button {
|
149
|
+
display: block;
|
150
|
+
width: 100%;
|
151
|
+
max-width: 40rem;
|
152
|
+
}
|
153
|
+
|
154
|
+
input,
|
155
|
+
select,
|
156
|
+
textarea,
|
157
|
+
button {
|
158
|
+
border: 1px solid #444;
|
159
|
+
border-radius: 0.3rem;
|
160
|
+
background-color: white;
|
161
|
+
font-family: inherit;
|
162
|
+
padding: 1.1rem 1.6rem;
|
163
|
+
font-size: 1.6rem;
|
164
|
+
line-height: 2.4rem;
|
165
|
+
margin-bottom: 2rem;
|
166
|
+
color: #222;
|
167
|
+
font-weight: 500;
|
168
|
+
}
|
169
|
+
|
170
|
+
select {
|
171
|
+
padding-right: 3.5rem;
|
172
|
+
appearance: none;
|
173
|
+
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
|
174
|
+
background-repeat: no-repeat;
|
175
|
+
background-position: right 1rem center;
|
176
|
+
background-size: 1em;
|
177
|
+
}
|
178
|
+
|
179
|
+
input[type="submit"],
|
180
|
+
button,
|
181
|
+
a.button {
|
182
|
+
font-size: 1.6rem;
|
183
|
+
line-height: 2rem;
|
184
|
+
font-weight: 600;
|
185
|
+
color: white;
|
186
|
+
text-align: center;
|
187
|
+
background-color: var(--primary-color);
|
188
|
+
border: 0;
|
189
|
+
cursor: pointer;
|
190
|
+
padding: 1.4rem 2.4rem;
|
191
|
+
margin: 0.8rem 0 0.8rem;
|
192
|
+
width: auto;
|
193
|
+
display: inline-block;
|
194
|
+
border-radius: 0.3rem;
|
195
|
+
}
|
196
|
+
input[type="submit"]:hover,
|
197
|
+
button:hover,
|
198
|
+
a.button:hover {
|
199
|
+
background-color: var(--primary-color);
|
200
|
+
filter: brightness(0.85);
|
201
|
+
text-decoration: none;
|
202
|
+
}
|
203
|
+
input[type="submit"]:focus,
|
204
|
+
button:focus,
|
205
|
+
a.button:focus {
|
206
|
+
outline: 2px solid rgba(29, 106, 229, 0.5);
|
207
|
+
outline-offset: 1px;
|
208
|
+
text-decoration: underline;
|
209
|
+
}
|
210
|
+
|
211
|
+
input[type="submit"].secondary,
|
212
|
+
button.secondary,
|
213
|
+
a.button.secondary {
|
214
|
+
color: #212121;
|
215
|
+
background-color: #ffffff;
|
216
|
+
border: 0.1rem solid #a3a3a3;
|
217
|
+
padding: 1.3rem 2.3rem;
|
218
|
+
padding-top: 1.3rem;
|
219
|
+
padding-bottom: 1.3rem;
|
220
|
+
padding-right: 2.4rem;
|
221
|
+
line-height: 2rem;
|
222
|
+
}
|
223
|
+
input[type="submit"].secondary:hover,
|
224
|
+
button.secondary:hover,
|
225
|
+
a.button.secondary:hover {
|
226
|
+
filter: none;
|
227
|
+
background-color: #e3e3e3;
|
228
|
+
color: #212121;
|
229
|
+
}
|
230
|
+
|
231
|
+
input[type="submit"].small,
|
232
|
+
button.small,
|
233
|
+
a.button.small {
|
234
|
+
font-size: 1.4rem;
|
235
|
+
line-height: 2rem;
|
236
|
+
margin-top: 0;
|
237
|
+
padding: 0.5rem 2.3rem;
|
238
|
+
}
|
239
|
+
|
240
|
+
label {
|
241
|
+
font-size: 1.6rem;
|
242
|
+
line-height: 2.4rem;
|
243
|
+
font-weight: 500;
|
244
|
+
color: #222;
|
245
|
+
display: block;
|
246
|
+
margin-bottom: 0.8rem;
|
247
|
+
}
|
248
|
+
|
249
|
+
fieldset {
|
250
|
+
background-color: white;
|
251
|
+
border: 1px solid #e3e3e3;
|
252
|
+
border-radius: 0.4rem;
|
253
|
+
position: relative;
|
254
|
+
width: 100%;
|
255
|
+
max-width: 400px;
|
256
|
+
margin: 0 auto;
|
257
|
+
padding: 2.4rem;
|
258
|
+
}
|
259
|
+
|
260
|
+
legend {
|
261
|
+
float: left;
|
262
|
+
width: 100%;
|
263
|
+
margin-bottom: 1.5em;
|
264
|
+
padding-bottom: 1em;
|
265
|
+
border-bottom: 1px solid #e3e3e3;
|
266
|
+
}
|
267
|
+
|
268
|
+
table {
|
269
|
+
font-size: 1.6rem;
|
270
|
+
line-height: 2.4rem;
|
271
|
+
border-collapse: collapse;
|
272
|
+
color: #363636;
|
273
|
+
width: 100%;
|
274
|
+
overflow-x: auto;
|
275
|
+
vertical-align: middle;
|
276
|
+
}
|
277
|
+
|
278
|
+
table select,
|
279
|
+
table input,
|
280
|
+
table input[type="submit"],
|
281
|
+
table button {
|
282
|
+
white-space: nowrap;
|
283
|
+
}
|
284
|
+
table select {
|
285
|
+
font-size: 1.4rem;
|
286
|
+
line-height: 2rem;
|
287
|
+
padding: 0.5rem 2.3rem;
|
288
|
+
}
|
289
|
+
|
290
|
+
th {
|
291
|
+
font-size: 1.6rem;
|
292
|
+
line-height: 2.4rem;
|
293
|
+
font-weight: 500;
|
294
|
+
color: #222;
|
295
|
+
}
|
296
|
+
|
297
|
+
th,
|
298
|
+
td {
|
299
|
+
padding: 1.6rem;
|
300
|
+
min-width: 8rem;
|
301
|
+
border-bottom: 1px solid #eee;
|
302
|
+
text-align: left;
|
303
|
+
white-space: normal;
|
304
|
+
}
|
305
|
+
|
306
|
+
.middle {
|
307
|
+
height: 100%;
|
308
|
+
display: grid;
|
309
|
+
grid-template-rows: auto auto;
|
310
|
+
justify-items: center;
|
311
|
+
align-items: center;
|
312
|
+
align-content: space-evenly;
|
313
|
+
gap: 1rem;
|
314
|
+
}
|
315
|
+
|
316
|
+
.center {
|
317
|
+
text-align: center;
|
318
|
+
}
|
@@ -0,0 +1,117 @@
|
|
1
|
+
(function(document, performance, location) {
|
2
|
+
function* getJSON(url) {
|
3
|
+
while(true) { yield fetch(url).then(resp => resp.json()); }
|
4
|
+
}
|
5
|
+
|
6
|
+
function pollURL(url, minInterval, success, func) {
|
7
|
+
const then = performance.now();
|
8
|
+
if(!minInterval) { minInterval = 1000 }
|
9
|
+
if(!func) { func = getJSON(url) }
|
10
|
+
|
11
|
+
func.next().value.then((resp) => {
|
12
|
+
if(resp.processing) {
|
13
|
+
setTimeout(
|
14
|
+
() => pollURL(url, minInterval, success, func),
|
15
|
+
Math.max(0, minInterval - (performance.now() - then))
|
16
|
+
);
|
17
|
+
} else {
|
18
|
+
success();
|
19
|
+
}
|
20
|
+
});
|
21
|
+
}
|
22
|
+
|
23
|
+
document.addEventListener('DOMContentLoaded', (event) => {
|
24
|
+
[...document.querySelectorAll('[data-polling-refresh-url]')].forEach((elem) => {
|
25
|
+
pollURL(
|
26
|
+
elem.getAttribute('data-polling-refresh-url'),
|
27
|
+
elem.getAttribute('data-polling-refresh-interval') * 1000,
|
28
|
+
() => location.reload()
|
29
|
+
);
|
30
|
+
});
|
31
|
+
});
|
32
|
+
}(document, performance, location));
|
33
|
+
|
34
|
+
(function() {
|
35
|
+
var TableFilter = (function() {
|
36
|
+
var input;
|
37
|
+
var inputValue;
|
38
|
+
|
39
|
+
function onInputEvent(e) {
|
40
|
+
input = e.target;
|
41
|
+
inputValue = input.value.toLowerCase().replace(/[^0-9a-zA-Z ]/g, '');
|
42
|
+
updateTable()
|
43
|
+
updateHistory()
|
44
|
+
}
|
45
|
+
|
46
|
+
function updateTable() {
|
47
|
+
var table = document.querySelector(`.${input.dataset.table}`);
|
48
|
+
if (table) {
|
49
|
+
Array.prototype.forEach.call(table.tBodies, function(tbody) {
|
50
|
+
Array.prototype.forEach.call(tbody.rows, filter);
|
51
|
+
});
|
52
|
+
} else {
|
53
|
+
alert('TableFilter cannot find its table')
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
function updateHistory() {
|
58
|
+
var searchParams = new URLSearchParams(window.location.search)
|
59
|
+
searchParams.set("search", inputValue);
|
60
|
+
var newRelativePathQuery = window.location.pathname + '?' + searchParams.toString();
|
61
|
+
history.pushState(null, '', newRelativePathQuery);
|
62
|
+
}
|
63
|
+
|
64
|
+
function filter(row) {
|
65
|
+
var text = row.textContent.toLowerCase().replace(/[^0-9a-zA-Z ]/g,'');
|
66
|
+
row.style.display = text.indexOf(inputValue) === -1 ? 'none' : 'table-row';
|
67
|
+
}
|
68
|
+
|
69
|
+
function debounce(func, threshold) {
|
70
|
+
var timeout;
|
71
|
+
|
72
|
+
return function debounced() {
|
73
|
+
var obj = this;
|
74
|
+
var args = arguments;
|
75
|
+
|
76
|
+
function delayed() {
|
77
|
+
func.apply(obj, args);
|
78
|
+
timeout = null;
|
79
|
+
};
|
80
|
+
|
81
|
+
if (timeout) {
|
82
|
+
clearTimeout(timeout);
|
83
|
+
}
|
84
|
+
timeout = setTimeout(delayed, threshold);
|
85
|
+
};
|
86
|
+
}
|
87
|
+
|
88
|
+
return {
|
89
|
+
init: function() {
|
90
|
+
var input = document.querySelector('input[data-behavior=table-filter]');
|
91
|
+
if (!input) return;
|
92
|
+
|
93
|
+
input.oninput = debounce(onInputEvent, 250);
|
94
|
+
var urlParams = new URLSearchParams(window.location.search);
|
95
|
+
var search = urlParams.get('search');
|
96
|
+
if (search) {
|
97
|
+
input.value = search
|
98
|
+
input.dispatchEvent(new InputEvent('input', { data: search }));
|
99
|
+
}
|
100
|
+
|
101
|
+
window.addEventListener('popstate', (event) => {
|
102
|
+
var urlParams = new URLSearchParams(window.location.search);
|
103
|
+
var search = urlParams.get('search');
|
104
|
+
if (search) {
|
105
|
+
input.value = search;
|
106
|
+
inputValue = search;
|
107
|
+
updateTable()
|
108
|
+
}
|
109
|
+
});
|
110
|
+
}
|
111
|
+
};
|
112
|
+
})();
|
113
|
+
|
114
|
+
document.addEventListener('DOMContentLoaded', (event) => {
|
115
|
+
TableFilter.init();
|
116
|
+
});
|
117
|
+
})();
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,349 @@
|
|
1
|
+
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
|
2
|
+
|
3
|
+
/* Document
|
4
|
+
========================================================================== */
|
5
|
+
|
6
|
+
/**
|
7
|
+
* 1. Correct the line height in all browsers.
|
8
|
+
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
9
|
+
*/
|
10
|
+
|
11
|
+
html {
|
12
|
+
line-height: 1.15; /* 1 */
|
13
|
+
-webkit-text-size-adjust: 100%; /* 2 */
|
14
|
+
}
|
15
|
+
|
16
|
+
/* Sections
|
17
|
+
========================================================================== */
|
18
|
+
|
19
|
+
/**
|
20
|
+
* Remove the margin in all browsers.
|
21
|
+
*/
|
22
|
+
|
23
|
+
body {
|
24
|
+
margin: 0;
|
25
|
+
}
|
26
|
+
|
27
|
+
/**
|
28
|
+
* Render the `main` element consistently in IE.
|
29
|
+
*/
|
30
|
+
|
31
|
+
main {
|
32
|
+
display: block;
|
33
|
+
}
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Correct the font size and margin on `h1` elements within `section` and
|
37
|
+
* `article` contexts in Chrome, Firefox, and Safari.
|
38
|
+
*/
|
39
|
+
|
40
|
+
h1 {
|
41
|
+
font-size: 2em;
|
42
|
+
margin: 0.67em 0;
|
43
|
+
}
|
44
|
+
|
45
|
+
/* Grouping content
|
46
|
+
========================================================================== */
|
47
|
+
|
48
|
+
/**
|
49
|
+
* 1. Add the correct box sizing in Firefox.
|
50
|
+
* 2. Show the overflow in Edge and IE.
|
51
|
+
*/
|
52
|
+
|
53
|
+
hr {
|
54
|
+
box-sizing: content-box; /* 1 */
|
55
|
+
height: 0; /* 1 */
|
56
|
+
overflow: visible; /* 2 */
|
57
|
+
}
|
58
|
+
|
59
|
+
/**
|
60
|
+
* 1. Correct the inheritance and scaling of font size in all browsers.
|
61
|
+
* 2. Correct the odd `em` font sizing in all browsers.
|
62
|
+
*/
|
63
|
+
|
64
|
+
pre {
|
65
|
+
font-family: monospace, monospace; /* 1 */
|
66
|
+
font-size: 1em; /* 2 */
|
67
|
+
}
|
68
|
+
|
69
|
+
/* Text-level semantics
|
70
|
+
========================================================================== */
|
71
|
+
|
72
|
+
/**
|
73
|
+
* Remove the gray background on active links in IE 10.
|
74
|
+
*/
|
75
|
+
|
76
|
+
a {
|
77
|
+
background-color: transparent;
|
78
|
+
}
|
79
|
+
|
80
|
+
/**
|
81
|
+
* 1. Remove the bottom border in Chrome 57-
|
82
|
+
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
83
|
+
*/
|
84
|
+
|
85
|
+
abbr[title] {
|
86
|
+
border-bottom: none; /* 1 */
|
87
|
+
text-decoration: underline; /* 2 */
|
88
|
+
text-decoration: underline dotted; /* 2 */
|
89
|
+
}
|
90
|
+
|
91
|
+
/**
|
92
|
+
* Add the correct font weight in Chrome, Edge, and Safari.
|
93
|
+
*/
|
94
|
+
|
95
|
+
b,
|
96
|
+
strong {
|
97
|
+
font-weight: bolder;
|
98
|
+
}
|
99
|
+
|
100
|
+
/**
|
101
|
+
* 1. Correct the inheritance and scaling of font size in all browsers.
|
102
|
+
* 2. Correct the odd `em` font sizing in all browsers.
|
103
|
+
*/
|
104
|
+
|
105
|
+
code,
|
106
|
+
kbd,
|
107
|
+
samp {
|
108
|
+
font-family: monospace, monospace; /* 1 */
|
109
|
+
font-size: 1em; /* 2 */
|
110
|
+
}
|
111
|
+
|
112
|
+
/**
|
113
|
+
* Add the correct font size in all browsers.
|
114
|
+
*/
|
115
|
+
|
116
|
+
small {
|
117
|
+
font-size: 80%;
|
118
|
+
}
|
119
|
+
|
120
|
+
/**
|
121
|
+
* Prevent `sub` and `sup` elements from affecting the line height in
|
122
|
+
* all browsers.
|
123
|
+
*/
|
124
|
+
|
125
|
+
sub,
|
126
|
+
sup {
|
127
|
+
font-size: 75%;
|
128
|
+
line-height: 0;
|
129
|
+
position: relative;
|
130
|
+
vertical-align: baseline;
|
131
|
+
}
|
132
|
+
|
133
|
+
sub {
|
134
|
+
bottom: -0.25em;
|
135
|
+
}
|
136
|
+
|
137
|
+
sup {
|
138
|
+
top: -0.5em;
|
139
|
+
}
|
140
|
+
|
141
|
+
/* Embedded content
|
142
|
+
========================================================================== */
|
143
|
+
|
144
|
+
/**
|
145
|
+
* Remove the border on images inside links in IE 10.
|
146
|
+
*/
|
147
|
+
|
148
|
+
img {
|
149
|
+
border-style: none;
|
150
|
+
}
|
151
|
+
|
152
|
+
/* Forms
|
153
|
+
========================================================================== */
|
154
|
+
|
155
|
+
/**
|
156
|
+
* 1. Change the font styles in all browsers.
|
157
|
+
* 2. Remove the margin in Firefox and Safari.
|
158
|
+
*/
|
159
|
+
|
160
|
+
button,
|
161
|
+
input,
|
162
|
+
optgroup,
|
163
|
+
select,
|
164
|
+
textarea {
|
165
|
+
font-family: inherit; /* 1 */
|
166
|
+
font-size: 100%; /* 1 */
|
167
|
+
line-height: 1.15; /* 1 */
|
168
|
+
margin: 0; /* 2 */
|
169
|
+
}
|
170
|
+
|
171
|
+
/**
|
172
|
+
* Show the overflow in IE.
|
173
|
+
* 1. Show the overflow in Edge.
|
174
|
+
*/
|
175
|
+
|
176
|
+
button,
|
177
|
+
input { /* 1 */
|
178
|
+
overflow: visible;
|
179
|
+
}
|
180
|
+
|
181
|
+
/**
|
182
|
+
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
183
|
+
* 1. Remove the inheritance of text transform in Firefox.
|
184
|
+
*/
|
185
|
+
|
186
|
+
button,
|
187
|
+
select { /* 1 */
|
188
|
+
text-transform: none;
|
189
|
+
}
|
190
|
+
|
191
|
+
/**
|
192
|
+
* Correct the inability to style clickable types in iOS and Safari.
|
193
|
+
*/
|
194
|
+
|
195
|
+
button,
|
196
|
+
[type="button"],
|
197
|
+
[type="reset"],
|
198
|
+
[type="submit"] {
|
199
|
+
-webkit-appearance: button;
|
200
|
+
}
|
201
|
+
|
202
|
+
/**
|
203
|
+
* Remove the inner border and padding in Firefox.
|
204
|
+
*/
|
205
|
+
|
206
|
+
button::-moz-focus-inner,
|
207
|
+
[type="button"]::-moz-focus-inner,
|
208
|
+
[type="reset"]::-moz-focus-inner,
|
209
|
+
[type="submit"]::-moz-focus-inner {
|
210
|
+
border-style: none;
|
211
|
+
padding: 0;
|
212
|
+
}
|
213
|
+
|
214
|
+
/**
|
215
|
+
* Restore the focus styles unset by the previous rule.
|
216
|
+
*/
|
217
|
+
|
218
|
+
button:-moz-focusring,
|
219
|
+
[type="button"]:-moz-focusring,
|
220
|
+
[type="reset"]:-moz-focusring,
|
221
|
+
[type="submit"]:-moz-focusring {
|
222
|
+
outline: 1px dotted ButtonText;
|
223
|
+
}
|
224
|
+
|
225
|
+
/**
|
226
|
+
* Correct the padding in Firefox.
|
227
|
+
*/
|
228
|
+
|
229
|
+
fieldset {
|
230
|
+
padding: 0.35em 0.75em 0.625em;
|
231
|
+
}
|
232
|
+
|
233
|
+
/**
|
234
|
+
* 1. Correct the text wrapping in Edge and IE.
|
235
|
+
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
236
|
+
* 3. Remove the padding so developers are not caught out when they zero out
|
237
|
+
* `fieldset` elements in all browsers.
|
238
|
+
*/
|
239
|
+
|
240
|
+
legend {
|
241
|
+
box-sizing: border-box; /* 1 */
|
242
|
+
color: inherit; /* 2 */
|
243
|
+
display: table; /* 1 */
|
244
|
+
max-width: 100%; /* 1 */
|
245
|
+
padding: 0; /* 3 */
|
246
|
+
white-space: normal; /* 1 */
|
247
|
+
}
|
248
|
+
|
249
|
+
/**
|
250
|
+
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
251
|
+
*/
|
252
|
+
|
253
|
+
progress {
|
254
|
+
vertical-align: baseline;
|
255
|
+
}
|
256
|
+
|
257
|
+
/**
|
258
|
+
* Remove the default vertical scrollbar in IE 10+.
|
259
|
+
*/
|
260
|
+
|
261
|
+
textarea {
|
262
|
+
overflow: auto;
|
263
|
+
}
|
264
|
+
|
265
|
+
/**
|
266
|
+
* 1. Add the correct box sizing in IE 10.
|
267
|
+
* 2. Remove the padding in IE 10.
|
268
|
+
*/
|
269
|
+
|
270
|
+
[type="checkbox"],
|
271
|
+
[type="radio"] {
|
272
|
+
box-sizing: border-box; /* 1 */
|
273
|
+
padding: 0; /* 2 */
|
274
|
+
}
|
275
|
+
|
276
|
+
/**
|
277
|
+
* Correct the cursor style of increment and decrement buttons in Chrome.
|
278
|
+
*/
|
279
|
+
|
280
|
+
[type="number"]::-webkit-inner-spin-button,
|
281
|
+
[type="number"]::-webkit-outer-spin-button {
|
282
|
+
height: auto;
|
283
|
+
}
|
284
|
+
|
285
|
+
/**
|
286
|
+
* 1. Correct the odd appearance in Chrome and Safari.
|
287
|
+
* 2. Correct the outline style in Safari.
|
288
|
+
*/
|
289
|
+
|
290
|
+
[type="search"] {
|
291
|
+
-webkit-appearance: textfield; /* 1 */
|
292
|
+
outline-offset: -2px; /* 2 */
|
293
|
+
}
|
294
|
+
|
295
|
+
/**
|
296
|
+
* Remove the inner padding in Chrome and Safari on macOS.
|
297
|
+
*/
|
298
|
+
|
299
|
+
[type="search"]::-webkit-search-decoration {
|
300
|
+
-webkit-appearance: none;
|
301
|
+
}
|
302
|
+
|
303
|
+
/**
|
304
|
+
* 1. Correct the inability to style clickable types in iOS and Safari.
|
305
|
+
* 2. Change font properties to `inherit` in Safari.
|
306
|
+
*/
|
307
|
+
|
308
|
+
::-webkit-file-upload-button {
|
309
|
+
-webkit-appearance: button; /* 1 */
|
310
|
+
font: inherit; /* 2 */
|
311
|
+
}
|
312
|
+
|
313
|
+
/* Interactive
|
314
|
+
========================================================================== */
|
315
|
+
|
316
|
+
/*
|
317
|
+
* Add the correct display in Edge, IE 10+, and Firefox.
|
318
|
+
*/
|
319
|
+
|
320
|
+
details {
|
321
|
+
display: block;
|
322
|
+
}
|
323
|
+
|
324
|
+
/*
|
325
|
+
* Add the correct display in all browsers.
|
326
|
+
*/
|
327
|
+
|
328
|
+
summary {
|
329
|
+
display: list-item;
|
330
|
+
}
|
331
|
+
|
332
|
+
/* Misc
|
333
|
+
========================================================================== */
|
334
|
+
|
335
|
+
/**
|
336
|
+
* Add the correct display in IE 10+.
|
337
|
+
*/
|
338
|
+
|
339
|
+
template {
|
340
|
+
display: none;
|
341
|
+
}
|
342
|
+
|
343
|
+
/**
|
344
|
+
* Add the correct display in IE 10.
|
345
|
+
*/
|
346
|
+
|
347
|
+
[hidden] {
|
348
|
+
display: none;
|
349
|
+
}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):(t||self).Typed=s()}(this,function(){function t(){return t=Object.assign?Object.assign.bind():function(t){for(var s=1;s<arguments.length;s++){var e=arguments[s];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},t.apply(this,arguments)}var s={strings:["These are the default values...","You know what you should do?","Use your own!","Have a great day!"],stringsElement:null,typeSpeed:0,startDelay:0,backSpeed:0,smartBackspace:!0,shuffle:!1,backDelay:700,fadeOut:!1,fadeOutClass:"typed-fade-out",fadeOutDelay:500,loop:!1,loopCount:Infinity,showCursor:!0,cursorChar:"|",autoInsertCss:!0,attr:null,bindInputFocusEvents:!1,contentType:"html",onBegin:function(t){},onComplete:function(t){},preStringTyped:function(t,s){},onStringTyped:function(t,s){},onLastStringBackspaced:function(t){},onTypingPaused:function(t,s){},onTypingResumed:function(t,s){},onReset:function(t){},onStop:function(t,s){},onStart:function(t,s){},onDestroy:function(t){}},e=new(/*#__PURE__*/function(){function e(){}var n=e.prototype;return n.load=function(e,n,i){if(e.el="string"==typeof i?document.querySelector(i):i,e.options=t({},s,n),e.isInput="input"===e.el.tagName.toLowerCase(),e.attr=e.options.attr,e.bindInputFocusEvents=e.options.bindInputFocusEvents,e.showCursor=!e.isInput&&e.options.showCursor,e.cursorChar=e.options.cursorChar,e.cursorBlinking=!0,e.elContent=e.attr?e.el.getAttribute(e.attr):e.el.textContent,e.contentType=e.options.contentType,e.typeSpeed=e.options.typeSpeed,e.startDelay=e.options.startDelay,e.backSpeed=e.options.backSpeed,e.smartBackspace=e.options.smartBackspace,e.backDelay=e.options.backDelay,e.fadeOut=e.options.fadeOut,e.fadeOutClass=e.options.fadeOutClass,e.fadeOutDelay=e.options.fadeOutDelay,e.isPaused=!1,e.strings=e.options.strings.map(function(t){return t.trim()}),e.stringsElement="string"==typeof e.options.stringsElement?document.querySelector(e.options.stringsElement):e.options.stringsElement,e.stringsElement){e.strings=[],e.stringsElement.style.cssText="clip: rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px;";var r=Array.prototype.slice.apply(e.stringsElement.children),o=r.length;if(o)for(var a=0;a<o;a+=1)e.strings.push(r[a].innerHTML.trim())}for(var u in e.strPos=0,e.currentElContent=this.getCurrentElContent(e),e.currentElContent&&e.currentElContent.length>0&&(e.strPos=e.currentElContent.length-1,e.strings.unshift(e.currentElContent)),e.sequence=[],e.strings)e.sequence[u]=u;e.arrayPos=0,e.stopNum=0,e.loop=e.options.loop,e.loopCount=e.options.loopCount,e.curLoop=0,e.shuffle=e.options.shuffle,e.pause={status:!1,typewrite:!0,curString:"",curStrPos:0},e.typingComplete=!1,e.autoInsertCss=e.options.autoInsertCss,e.autoInsertCss&&(this.appendCursorAnimationCss(e),this.appendFadeOutAnimationCss(e))},n.getCurrentElContent=function(t){return t.attr?t.el.getAttribute(t.attr):t.isInput?t.el.value:"html"===t.contentType?t.el.innerHTML:t.el.textContent},n.appendCursorAnimationCss=function(t){var s="data-typed-js-cursor-css";if(t.showCursor&&!document.querySelector("["+s+"]")){var e=document.createElement("style");e.setAttribute(s,"true"),e.innerHTML="\n .typed-cursor{\n opacity: 1;\n }\n .typed-cursor.typed-cursor--blink{\n animation: typedjsBlink 0.7s infinite;\n -webkit-animation: typedjsBlink 0.7s infinite;\n animation: typedjsBlink 0.7s infinite;\n }\n @keyframes typedjsBlink{\n 50% { opacity: 0.0; }\n }\n @-webkit-keyframes typedjsBlink{\n 0% { opacity: 1; }\n 50% { opacity: 0.0; }\n 100% { opacity: 1; }\n }\n ",document.body.appendChild(e)}},n.appendFadeOutAnimationCss=function(t){var s="data-typed-fadeout-js-css";if(t.fadeOut&&!document.querySelector("["+s+"]")){var e=document.createElement("style");e.setAttribute(s,"true"),e.innerHTML="\n .typed-fade-out{\n opacity: 0;\n transition: opacity .25s;\n }\n .typed-cursor.typed-cursor--blink.typed-fade-out{\n -webkit-animation: 0;\n animation: 0;\n }\n ",document.body.appendChild(e)}},e}()),n=new(/*#__PURE__*/function(){function t(){}var s=t.prototype;return s.typeHtmlChars=function(t,s,e){if("html"!==e.contentType)return s;var n=t.substring(s).charAt(0);if("<"===n||"&"===n){var i;for(i="<"===n?">":";";t.substring(s+1).charAt(0)!==i&&!(1+ ++s>t.length););s++}return s},s.backSpaceHtmlChars=function(t,s,e){if("html"!==e.contentType)return s;var n=t.substring(s).charAt(0);if(">"===n||";"===n){var i;for(i=">"===n?"<":"&";t.substring(s-1).charAt(0)!==i&&!(--s<0););s--}return s},t}());/*#__PURE__*/
|
2
|
+
return function(){function t(t,s){e.load(this,s,t),this.begin()}var s=t.prototype;return s.toggle=function(){this.pause.status?this.start():this.stop()},s.stop=function(){this.typingComplete||this.pause.status||(this.toggleBlinking(!0),this.pause.status=!0,this.options.onStop(this.arrayPos,this))},s.start=function(){this.typingComplete||this.pause.status&&(this.pause.status=!1,this.pause.typewrite?this.typewrite(this.pause.curString,this.pause.curStrPos):this.backspace(this.pause.curString,this.pause.curStrPos),this.options.onStart(this.arrayPos,this))},s.destroy=function(){this.reset(!1),this.options.onDestroy(this)},s.reset=function(t){void 0===t&&(t=!0),clearInterval(this.timeout),this.replaceText(""),this.cursor&&this.cursor.parentNode&&(this.cursor.parentNode.removeChild(this.cursor),this.cursor=null),this.strPos=0,this.arrayPos=0,this.curLoop=0,t&&(this.insertCursor(),this.options.onReset(this),this.begin())},s.begin=function(){var t=this;this.options.onBegin(this),this.typingComplete=!1,this.shuffleStringsIfNeeded(this),this.insertCursor(),this.bindInputFocusEvents&&this.bindFocusEvents(),this.timeout=setTimeout(function(){0===t.strPos?t.typewrite(t.strings[t.sequence[t.arrayPos]],t.strPos):t.backspace(t.strings[t.sequence[t.arrayPos]],t.strPos)},this.startDelay)},s.typewrite=function(t,s){var e=this;this.fadeOut&&this.el.classList.contains(this.fadeOutClass)&&(this.el.classList.remove(this.fadeOutClass),this.cursor&&this.cursor.classList.remove(this.fadeOutClass));var i=this.humanizer(this.typeSpeed),r=1;!0!==this.pause.status?this.timeout=setTimeout(function(){s=n.typeHtmlChars(t,s,e);var i=0,o=t.substring(s);if("^"===o.charAt(0)&&/^\^\d+/.test(o)){var a=1;a+=(o=/\d+/.exec(o)[0]).length,i=parseInt(o),e.temporaryPause=!0,e.options.onTypingPaused(e.arrayPos,e),t=t.substring(0,s)+t.substring(s+a),e.toggleBlinking(!0)}if("`"===o.charAt(0)){for(;"`"!==t.substring(s+r).charAt(0)&&(r++,!(s+r>t.length)););var u=t.substring(0,s),p=t.substring(u.length+1,s+r),c=t.substring(s+r+1);t=u+p+c,r--}e.timeout=setTimeout(function(){e.toggleBlinking(!1),s>=t.length?e.doneTyping(t,s):e.keepTyping(t,s,r),e.temporaryPause&&(e.temporaryPause=!1,e.options.onTypingResumed(e.arrayPos,e))},i)},i):this.setPauseStatus(t,s,!0)},s.keepTyping=function(t,s,e){0===s&&(this.toggleBlinking(!1),this.options.preStringTyped(this.arrayPos,this));var n=t.substring(0,s+=e);this.replaceText(n),this.typewrite(t,s)},s.doneTyping=function(t,s){var e=this;this.options.onStringTyped(this.arrayPos,this),this.toggleBlinking(!0),this.arrayPos===this.strings.length-1&&(this.complete(),!1===this.loop||this.curLoop===this.loopCount)||(this.timeout=setTimeout(function(){e.backspace(t,s)},this.backDelay))},s.backspace=function(t,s){var e=this;if(!0!==this.pause.status){if(this.fadeOut)return this.initFadeOut();this.toggleBlinking(!1);var i=this.humanizer(this.backSpeed);this.timeout=setTimeout(function(){s=n.backSpaceHtmlChars(t,s,e);var i=t.substring(0,s);if(e.replaceText(i),e.smartBackspace){var r=e.strings[e.arrayPos+1];e.stopNum=r&&i===r.substring(0,s)?s:0}s>e.stopNum?(s--,e.backspace(t,s)):s<=e.stopNum&&(e.arrayPos++,e.arrayPos===e.strings.length?(e.arrayPos=0,e.options.onLastStringBackspaced(),e.shuffleStringsIfNeeded(),e.begin()):e.typewrite(e.strings[e.sequence[e.arrayPos]],s))},i)}else this.setPauseStatus(t,s,!1)},s.complete=function(){this.options.onComplete(this),this.loop?this.curLoop++:this.typingComplete=!0},s.setPauseStatus=function(t,s,e){this.pause.typewrite=e,this.pause.curString=t,this.pause.curStrPos=s},s.toggleBlinking=function(t){this.cursor&&(this.pause.status||this.cursorBlinking!==t&&(this.cursorBlinking=t,t?this.cursor.classList.add("typed-cursor--blink"):this.cursor.classList.remove("typed-cursor--blink")))},s.humanizer=function(t){return Math.round(Math.random()*t/2)+t},s.shuffleStringsIfNeeded=function(){this.shuffle&&(this.sequence=this.sequence.sort(function(){return Math.random()-.5}))},s.initFadeOut=function(){var t=this;return this.el.className+=" "+this.fadeOutClass,this.cursor&&(this.cursor.className+=" "+this.fadeOutClass),setTimeout(function(){t.arrayPos++,t.replaceText(""),t.strings.length>t.arrayPos?t.typewrite(t.strings[t.sequence[t.arrayPos]],0):(t.typewrite(t.strings[0],0),t.arrayPos=0)},this.fadeOutDelay)},s.replaceText=function(t){this.attr?this.el.setAttribute(this.attr,t):this.isInput?this.el.value=t:"html"===this.contentType?this.el.innerHTML=t:this.el.textContent=t},s.bindFocusEvents=function(){var t=this;this.isInput&&(this.el.addEventListener("focus",function(s){t.stop()}),this.el.addEventListener("blur",function(s){t.el.value&&0!==t.el.value.length||t.start()}))},s.insertCursor=function(){this.showCursor&&(this.cursor||(this.cursor=document.createElement("span"),this.cursor.className="typed-cursor",this.cursor.setAttribute("aria-hidden",!0),this.cursor.innerHTML=this.cursorChar,this.el.parentNode&&this.el.parentNode.insertBefore(this.cursor,this.el.nextSibling)))},t}()});
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: demo_mode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Griffith
|
@@ -350,6 +350,14 @@ files:
|
|
350
350
|
- lib/generators/demo_mode/install_generator.rb
|
351
351
|
- lib/generators/templates/initializer.rb
|
352
352
|
- lib/generators/templates/sample_persona.rb
|
353
|
+
- public/assets/demo_mode/demo_mode.css
|
354
|
+
- public/assets/demo_mode/demo_mode.js
|
355
|
+
- public/assets/demo_mode/icon--tophat.png
|
356
|
+
- public/assets/demo_mode/icon--user.png
|
357
|
+
- public/assets/demo_mode/icon--users.png
|
358
|
+
- public/assets/demo_mode/loader.png
|
359
|
+
- public/assets/demo_mode/vendor/normalize-v8.0.1.css
|
360
|
+
- public/assets/demo_mode/vendor/typed-v2.1.0.js
|
353
361
|
homepage: http://github.com/betterment/demo_mode
|
354
362
|
licenses:
|
355
363
|
- MIT
|