forked from christabor/css-progress-wizard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
561 lines (546 loc) · 19 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
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, maximum-scale=1">
<title>CSS Progress wizard</title>
<!--stylesheets-->
<link href='http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic' rel='stylesheet' type='text/css'>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<link href="css/progress-wizard.min.css" rel="stylesheet">
<style>
body {
font-family: 'Lato', sans-serif;
font-size: 20px;
padding: 20px;
}
.container {
width: 70%;
margin: 3em auto;
}
a {
color: #406753;
text-decoration: none;
border-bottom: 1px dotted #999;
}
a:hover {
color: black;
border-color: black;
}
hr {
opacity: 0.3;
}
h1 {
font-size: 50px;
}
h3 {
border-left: 12px solid #f1f1f1;
text-indent: 1em;
color: #999;
margin-top: 2em;
font-weight: 100;
}
ul {
margin: 0;
padding: 0.4em;
list-style-type: square;
}
li {
padding-left: 0.5em;
line-height: 2.4em;
}
code {
font-family: Monaco, Consolas, "Lucida Console", monospace;
background-color: #f1f1f1;
font-size: 70%;
padding: 4px 8px;
border-radius: 4px;
border: 1px solid #ccc;
}
pre.code {
font-family: Monaco, Consolas, "Lucida Console", monospace;
background-color: #f1f1f1;
font-size: 70%;
padding: 4px 8px;
border-radius: 4px;
border: 1px solid #ccc;
}
.subdued {
font-size: 80%;
opacity: 0.6;
}
/* A totally custom override */
.progress-indicator.custom-complex {
background-color: #f1f1f1;
padding: 10px 5px;
border: 1px solid #ddd;
border-radius: 10px;
}
.progress-indicator.custom-complex > li .bubble {
height: 12px;
width: 99%;
border-radius: 2px;
box-shadow: inset -5px 0 12px rgba(0, 0, 0, 0.2);
}
.progress-indicator.custom-complex > li .bubble:before,
.progress-indicator.custom-complex > li .bubble:after {
display: none;
}
/* Demo for vertical bars */
.progress-indicator.stepped.stacked {
width: 48%;
display: inline-block;
}
.progress-indicator.stepped.stacked > li {
height: 150px;
}
.progress-indicator.stepped.stacked > li .bubble {
padding: 0.1em;
}
.progress-indicator.stepped.stacked > li:first-of-type .bubble {
padding: 0.5em;
}
.progress-indicator.stepped.stacked > li:last-of-type .bubble {
padding: 0em;
}
/* Nocenter */
.progress-indicator.nocenter.stacked > li {
min-height: 100px;
}
.progress-indicator.nocenter.stacked > li span {
display: block;
}
/* Demo for Timeline vertical bars */
#timeline-speaker-example {
background-color: #2b4a6d;
color: white;
padding: 1em 2em;
text-align: center;
border-radius: 10px;
}
#timeline-speaker-example .progress-indicator {
width: 100%;
}
#timeline-speaker-example .bubble {
padding: 0;
}
#timeline-speaker-example .progress-indicator > li {
color: white;
}
#timeline-speaker-example .time {
position: relative;
left: -80px;
top: 30px;
font-size: 130%;
text-align: right;
opacity: 0.6;
font-weight: 100;
}
#timeline-speaker-example .current-time .time {
font-size: 170%;
opacity: 1;
}
#timeline-speaker-example .stacked-text {
top: -37px;
left: -50px;
}
#timeline-speaker-example .subdued {
font-size: 10px;
display: block;
}
#timeline-speaker-example > li:hover {
color: #ff3d54;
}
#timeline-speaker-example > li:hover .bubble,
#timeline-speaker-example > li:hover .bubble:before,
#timeline-speaker-example > li:hover .bubble:after {
background-color: #ff3d54;
}
#timeline-speaker-example .current-time .sub-info {
font-size: 60%;
line-height: 0.2em;
text-transform: capitalize;
color: #6988be;
}
@media handheld, screen and (max-width: 400px) {
.container {
margin: 0;
width: 100%;
}
.progress-indicator.stacked {
display: block;
width: 100%;
}
.progress-indicator.stacked > li {
height: 80px;
}
}
</style>
</head>
<body>
<div class="container">
<h1>
(CSS) Progress Wizard <br>
<small>A pure css <del class="subdued">progress indicator</del> node/vertex thing!</small>
</h1>
<ul>
<li><strong>Pure CSS</strong> (lightweight, easy to implement)</li>
<li><strong>Flexbox</strong> - easy to update and add more items</li>
<li><strong>Resizeable/responsive </strong>(text-resize, etc... try it!)</li>
<li><strong>Easy to customize design</strong> (sass mixins/variables, etc...)</li>
<li><strong>Written with SASS</strong></li>
</ul>
<h3>Usage.</h3>
<p>Just add <code>.progress-indicator</code> to any ul or ol. Add bubbles by embedding a <code><span class="bubble"></code> in your <code><li></code>. See below for an example:</p>
<pre class="code">
<ul class="progress-indicator">
<li class="completed">
<span class="bubble"></span>
Step 1.
</li>
<li class="completed">
<span class="bubble"></span>
Step 2.
</li>
<li class="completed">
<span class="bubble"></span>
Step 3.
</li>
<li class="completed">
<span class="bubble"></span>
Step 4.
</li>
<li>
<span class="bubble"></span>
Step 5.
</li>
</ul>
</pre>
<h2>Examples</h2>
<h3>Basic.</h3>
<ul class="progress-indicator">
<li class="completed">
<span class="bubble"></span>
Step 1. <br><small>(complete)</small>
</li>
<li class="completed">
<span class="bubble"></span>
Step 2. <br><small>(complete)</small>
</li>
<li class="active">
<span class="bubble"></span>
Step 3. <br><small>(active)</small>
</li>
<li>
<span class="bubble"></span>
Step 4.
</li>
<li>
<span class="bubble"></span>
Step 5.
</li>
</ul>
<ul class="progress-indicator">
<li class="completed">
<span class="bubble"></span>
Step 1.
</li>
<li class="completed">
<span class="bubble"></span>
Step 2.
</li>
<li class="completed">
<span class="bubble"></span>
Step 3.
</li>
<li class="completed">
<span class="bubble"></span>
Step 4.
</li>
<li>
<span class="bubble"></span>
Step 5.
</li>
</ul>
<h3>Moderate</h3>
<p>Toss in some <a href="http://fortawesome.github.io/Font-Awesome/"><strong>Font Awesome</strong></a> icons to mix things up.</p>
<ul class="progress-indicator">
<li class="completed">
<span class="bubble"></span>
<i class="fa fa-check-circle"></i>
Step 1.
</li>
<li class="completed">
<span class="bubble"></span>
<i class="fa fa-check-circle"></i>
Step 2.
</li>
<li>
<span class="bubble"></span>
Step 3.
</li>
<li>
<span class="bubble"></span>
Step 4.
</li>
<li>
<span class="bubble"></span>
Step 5.
</li>
</ul>
<ul class="progress-indicator">
<li class="completed">
<span class="bubble"></span>
<i class="fa fa-check-circle"></i>
Step 1.
</li>
<li class="completed">
<span class="bubble"></span>
<i class="fa fa-check-circle"></i>
Step 2.
</li>
<li class="completed">
<span class="bubble"></span>
<i class="fa fa-check-circle"></i>
Step 3.
</li>
<li class="completed">
<span class="bubble"></span>
<i class="fa fa-check-circle"></i>
Step 4.
</li>
<li>
<span class="bubble"></span>
Step 5.
</li>
</ul>
<h3>Complex</h3>
<ul class="progress-indicator custom-complex">
<li class="completed">
<span class="bubble"></span>
<i class="fa fa-check-circle"></i>
Step 1.
</li>
<li class="completed">
<span class="bubble"></span>
<i class="fa fa-check-circle"></i>
Step 2.
</li>
<li>
<span class="bubble"></span>
Step 3.
</li>
<li>
<span class="bubble"></span>
Step 4.
</li>
<li>
<span class="bubble"></span>
Step 5.
</li>
</ul>
<ul class="progress-indicator custom-complex">
<li class="completed">
<a href="#">
<span class="bubble"></span>
<i class="fa fa-check-circle"></i>
Step 1 - I'm a link!
</a>
</li>
<li class="completed">
<a href="#">
<span class="bubble"></span>
<i class="fa fa-check-circle"></i>
Step 2. - I'm a link!
</a>
</li>
<li class="completed">
<span class="bubble"></span>
<i class="fa fa-check-circle"></i>
Step 3.
</li>
<li class="completed">
<span class="bubble"></span>
<i class="fa fa-check-circle"></i>
Step 4.
</li>
<li>
<span class="bubble"></span>
Step 5.
</li>
</ul>
<h3>States</h3>
<ul class="progress-indicator">
<li class="warning">
<span class="bubble"></span><span class="fa fa-minus"></span>
Add some steps
</li>
<li class="danger">
<span class="bubble"></span><span class="fa fa-exclamation"></span> Add some more...
</li>
<li class="info">
<span class="bubble"></span><span class="fa fa-exclamation"></span> ????
</li>
<li class="completed">
<span class="bubble"></span><span class="fa fa-time"></span> PROFIT!!
</li>
<li>
<span class="bubble"></span><span class="fa fa-calendar"></span> Do a barrel roll
</li>
</ul>
<hr>
<h2>Other uses!</h2>
<p>If you want to stack things up, you can use it for all kinds of things, like timelines. Just add <code>.stacked</code> to the container.</p>
<p class="subdued"><strong>Note: </strong> in order to keep text looking good, add the <code><span class="stacked-text">Text Label</span></code> to all of your text blocks in each node, which can be styled however you like.</p>
<ul class="progress-indicator stepped stacked">
<li class="completed warning">
<a href="#">
<span class="bubble"></span>
<span class="stacked-text">
<span class="fa fa-calendar"></span> June 3rd, 2014
<span class="subdued">/ Added a thing. <em>Pssst... I'm a link!</em></span>
</span>
</a>
</li>
<li class="completed">
<span class="bubble"></span>
<span class="stacked-text">
<span class="fa fa-calendar"></span> May 21st, 2014
<span class="subdued">/ Some stuff happened. It was amazing.</span>
</span>
</li>
<li>
<span class="bubble"></span>
<span class="stacked-text">
<span class="fa fa-calendar"></span> April 11th, 2014
<span class="subdued">/ What a wild day!</span>
</span>
</li>
<li>
<span class="bubble"></span>
<span class="stacked-text">
<span class="fa fa-calendar"></span> February 3rd, 2014
<span class="subdued">/ This day is toooo long.</span>
</span>
</li>
<li>
<span class="bubble"></span>
<span class="stacked-text">
<span class="fa fa-comment"></span> January 5th, 2014
<span class="subdued">/ Happy birthday, me!</span>
</span>
</li>
</ul>
<ul class="progress-indicator stepped stacked">
<li class="completed info">
<a href="#">
<span class="bubble"></span>
<span class="stacked-text">
<span class="fa fa-calendar"></span> June 3rd, 2014
<span class="subdued">/ Added a thing. <em>Pssst... I'm a link!</em></span>
</span>
</a>
</li>
<li class="completed">
<span class="bubble"></span>
<span class="stacked-text">
<span class="fa fa-calendar"></span> May 21st, 2014
<span class="subdued">/ Some stuff happened. It was amazing.</span>
</span>
</li>
<li class="completed">
<span class="bubble"></span>
<span class="stacked-text">
<span class="fa fa-calendar"></span> April 11th, 2014
<span class="subdued">/ What a wild day!</span>
</span>
</li>
<li class="completed">
<span class="bubble"></span>
<span class="stacked-text">
<span class="fa fa-calendar"></span> February 3rd, 2014
<span class="subdued">/ This day is toooo long.</span>
</span>
</li>
<li>
<span class="bubble"></span>
<span class="stacked-text">
<span class="fa fa-comment"></span> January 5th, 2014
<span class="subdued">/ Happy birthday, me!</span>
</span>
</li>
</ul>
<div id="timeline-speaker-example">
<h4>How about a speaker timeline?</h4>
<ul class="progress-indicator stacked dark">
<li class="current-time">
<span class="time">2:45 - 3:30</span>
<span class="bubble"></span>
<span class="stacked-text">
Some really cool title
<span class="subdued">By a special speaker</span>
<span class="sub-info">
<ul>
<li>Intro to stuff</li>
<li>Stuff</li>
<li>Advanced Stuff</li>
</ul>
</span>
</span>
</li>
<li>
<span class="time">1:30 - 2:30</span>
<span class="bubble"></span>
<span class="stacked-text">
Some really cool title
<span class="subdued">By a special speaker</span>
</span>
</li>
<li>
<span class="time">12:45 - 1:30</span>
<span class="bubble"></span>
<span class="stacked-text">
Some really cool title
<span class="subdued">By a special speaker</span>
</span>
</li>
<li>
<span class="time">12:00 - 12:30</span>
<span class="bubble"></span>
<span class="stacked-text">
Some really cool title
<span class="subdued">By a special speaker</span>
</span>
</li>
</ul>
</div>
<h3>No centering in the container</h3>
<p>To disable centering and margins that auto-center the timeline, just add <code>.nocenter</code> To the <code>ul/ol</code>. <em>Note: depending on your icons and text, you may want to massage the alignment for your content.</em></p>
<ul class="progress-indicator nocenter stacked">
<li class="completed info">
<a href="#">
<span class="bubble"></span>
<span class="stacked-text">
<span class="fa fa-calendar"></span> June 3rd, 2014
<span class="subdued">/ Added a thing. <em>Pssst... I'm a link!</em></span>
</span>
</a>
</li>
<li class="completed">
<span class="bubble"></span>
<span class="stacked-text">
<span class="fa fa-calendar"></span> May 21st, 2014
<span class="subdued">/ Some stuff happened. It was amazing.</span>
</span>
</li>
<li class="completed">
<span class="bubble"></span>
<span class="stacked-text">
<span class="fa fa-calendar"></span> April 11th, 2014
<span class="subdued">/ What a wild day!</span>
</span>
</li>
</ul>
</div>
</body>
</html>