-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
936 lines (760 loc) · 40.1 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
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
<!DOCTYPE html>
<html lang="en">
<head>
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge"> -->
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Instructions Builder</title>
<!-- favicon -->
<link rel="apple-touch-icon" sizes="57x57" href="favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="favicon/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<!-- CSS inlcudes ------------------------------ -->
<link rel="stylesheet" type="text/css" href="css/normalize.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/prettify.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i|Roboto:400,400i,500" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.2/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Set links to open in new window as default -->
<base target="_blank">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Roboto:400,400i,500" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i,600" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Quattrocento:400,700" rel="stylesheet">
<!-- Local remix style sheet -->
<link rel="stylesheet" href="css/remix-styles.css">
<!-- tiny MCE include -->
<script src="tinyMCE/jquery.tinymce.min.js"></script>
<script src="tinyMCE/tinymce.min.js"></script>
<style>
#num-steps-form {
margin-top: 20px;
}
header {
margin-bottom: 9rem;
}
header nav {
background: #db4c3f !important;
padding-bottom: 1rem;
}
label {
font-weight: 600;
}
.stepwise {
font-size: 1.5rem;
color: #777777;
margin: 0 0 1rem .5rem;
color: #db4c3f;
}
#page-title {
color: #FFFFFF;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
#instructions-footer {
margin-top: 6rem;
}
.header-white-style {
color: #FFFFFF;
}
a.header-white-style:hover {
color: #FFFFFF;
opacity: .7;
}
div.pre-footer {
background: transparent;
}
footer {
background: transparent;
border: none;
}
</style>
</head>
<body>
<header>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="col-sm-5">
<h1 id="page-title">Instruction Builder</h1>
</div>
<div class="col-sm-4">
<form id="num-steps-form" class="form-inline">
<div class="form-group">
<label class="control-label header-white-style"><strong># Steps </strong></label>
<div class="input-group">
<span class="input-group-btn">
<a class="btn btn-default" id="down"><span class="fa fa-minus"></span></a>
</span>
<input type="number" id="number-steps" class="form-control text-center" value="1" max="30" min="1">
<span class="input-group-btn">
<a class="btn btn-default" id="up"><span class="fa fa-plus"></span></a>
</span>
</div>
</div>
</form>
</div>
<div class="col-sm-3">
<p style="margin-top:30px;"><a href="https://getbootstrap.com/docs/3.3/components/" target="_blank" class="header-white-style"><i class="fa fa-wrench fa-spacer-right"></i>Bootstrap UI</a></p>
</div>
</div>
</nav>
<div class="col-sm-12" style="background: #999999; height: 6rem; margin-top: -3.75rem; margin-bottom: 4rem; color: white">
<p class="lead text-center" style="margin-top: 2rem;">Looking for a better version of this tool? Try <a href="https://bootstrapr.io/bs3/checklists.html" target="_blank">checklists</a> at Bootstrapr.io.</p>
</div>
</header>
<div class="container">
<div class="row">
<div class="col-sm-6">
<div class='alert alert-default' role='alert'>
<p><i class="fa fa-fw fa-list-ol"></i> Instructions <br>Add a title and instructions to each step below. Next, click <strong>Build</strong> to render them into HTML. Finally, <strong>copy-and-paste</strong> the HTML or save it to a simple text file.</p>
</div>
<form id="steps-form">
<!-- 0 to 10 - - - - - - - - - - - - - - - -->
<div class="form-group">
<p class="stepwise">Step 0 — Make an Outline</p>
<p>Before you enter your steps into the boxes below, we recommend you use a simple text editor, such as <a href="https://docs.google.com/document/create?">Google Docs</a>, to create an outline of instruction steps and sub-steps.</p>
</div>
<div class="form-group titles">
<p class="stepwise">Step 1</p>
<input id="title1" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps">
<textarea id="step1" class="step form-control" name="step1" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 2</p>
<input id="title2" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step2" class="step form-control" name="step1" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 3</p>
<input id="title3" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step3" class="step form-control" name="step1" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 4</p>
<input id="title4" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step4" class="step form-control" name="step1" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 5</p>
<input id="title5" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step5" class="step form-control" name="step1" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 6</p>
<input id="title6" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step6" class="step form-control" name="step1" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 7</p>
<input id="title7" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step7" class="step form-control" name="step1" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 8</p>
<input id="title8" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step8" class="step form-control" name="step1" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 9</p>
<input id="title9" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step9" class="step form-control" name="step1" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 10</p>
<input id="title10" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step10" class="step form-control" name="step1" rows="8" cols="80"></textarea>
</div>
<!-- to 20 - - - - - - - - - - - - - - - -->
<div class="form-group titles hidden">
<p class="stepwise">Step 11</p>
<input id="title11" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step11" class="step form-control" name="step11" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 12</p>
<input id="title12" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step12" class="step form-control" name="step12" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 13</p>
<input id="title13" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step13" class="step form-control" name="step13" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 14</p>
<input id="title14" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step14" class="step form-control" name="step14" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 15</p>
<input id="title15" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step15" class="step form-control" name="step15" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 16</p>
<input id="title16" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step16" class="step form-control" name="step16" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 17</p>
<input id="title17" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step17" class="step form-control" name="step17" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 18</p>
<input id="title18" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step18" class="step form-control" name="step18" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 19</p>
<input id="title19" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step19" class="step form-control" name="step19" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 20</p>
<input id="title20" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step20" class="step form-control" name="step20" rows="8" cols="80"></textarea>
</div>
<!-- to 20 - - - - - - - - - - - - - - - -->
<div class="form-group titles hidden">
<p class="stepwise">Step 21</p>
<input id="title21" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step21" class="step form-control" name="step21" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 22</p>
<input id="title22" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step22" class="step form-control" name="step22" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 23</p>
<input id="title23" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step23" class="step form-control" name="step23" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 24</p>
<input id="title24" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step24" class="step form-control" name="step24" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 25</p>
<input id="title25" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step25" class="step form-control" name="step25" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 26</p>
<input id="title26" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step26" class="step form-control" name="step26" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 27</p>
<input id="title27" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step27" class="step form-control" name="step27" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 28</p>
<input id="title28" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step28" class="step form-control" name="step28" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 29</p>
<input id="title29" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step29" class="step form-control" name="step29" rows="8" cols="80"></textarea>
</div>
<div class="form-group titles hidden">
<p class="stepwise">Step 30</p>
<input id="title30" type="text" class="form-control step-title" placeholder="Title of this step...">
</div>
<div class="form-group steps hidden">
<textarea id="step30" class="step form-control" name="step30" rows="8" cols="80"></textarea>
</div>
</form>
</div>
<!-- col-sm-8 -->
<div class="col-sm-6" id="builder-div">
<div class="example" id="steps-example">
</div>
<div class="well" id="myAddressCode">
<button class="btn btn-primary pull-right copier" type="button" data-clipboard-demo="" data-clipboard-target="#steps-code" data-toggle="tooltip" data-placement="bottom" title="copy HTML">
<i class="fa fa-clipboard" aria-hidden="true"></i>
</button>
<pre class="prettyprint" id="steps-code">
</pre>
</div>
<!-- example closes -->
<div class="row">
<div class="col-sm-9">
<div id="build-buttons">
<button type="button" class="btn btn-default" id="reload-page"><i class="fa fa-refresh fa-spacer-right" aria-hidden="true"></i>Reset</button>
<button type="button" class="btn btn-primary" id="create-steps"><i class="fa fa-wrench fa-spacer-right" aria-hidden="true"></i>Build</button>
</div>
</div>
<div class="col-sm-3">
<button type="button" class="pull-right btn btn-success" id="save-steps"><i class="fa fa-save fa-spacer-right" aria-hidden="true"></i>Save</button>
</div>
</div>
<!-- sub .row -->
</div>
<!-- col-sm-4 -->
</div>
<!-- .row -->
</div>
<!-- .container -->
<div class="container">
<footer class="row" id="instructions-footer">
<div class="col-sm-4">
<p>© 2017 Randal Sean Harrison</p>
</div>
<div class="col-md-4">
<h1 class='short-round center-block scrollToTop' style='font-size: 32px; height: 77px; width: 77px; padding: 14px; border-radius: 87.5px; background: #db4c3f;'><i class="fa fa-arrow-up" aria-hidden="true"></i></h1>
</div>
<div class="col-md-4">
<p class="text-right"><a href="https://github.com/randal-sean-harrison" target="_blank"><i class="fa fa-github fa-spacer-right"></i>github.com/randal-sean-harrison</a></p>
</div>
</div>
</footer>
<!-- JScripts - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<!-- Filesaver include -->
<script src="filesaver/FileSaver.min.js"></script>
<!-- clipboard.js include -->
<script src="js/clipboard.min.js"></script>
<!-- Document Ready Function -->
<script type="text/javascript">
$(document).ready(function() {
// Have to declare these globally for save button to work
var writeSteps = '';
var savedFile = '';
// TinyMCE init - - - - - - - - - - - - - - - - - - - - - - - /
tinymce.init({
selector: "textarea",
plugins: "code hr codesample link paste table lists autoresize",
toolbar: "undo redo | styleselect | bold italic | link | table | alignleft aligncenter alignright | bullist numlist | outdent indent code codesample restoredraft",
branding: false,
verify_html: false,
menubar: false
});
// clipboard button - - - - - - - - - - - - - - - - - - - - - - - /
new Clipboard('.btn');
// max and min number of steps
var max = 30;
var min = 1;
// Add Steps - - - - - - - - - - - - - - - - - - - - - - - /
$('#up').click(function() {
var numberSteps = $('#number-steps').val();
if (numberSteps < max) {
numberSteps++;
$('#number-steps').val(numberSteps);
} else {
$('#number-steps').val(numberSteps);
}
// Show the Titles
titlesLT = '.titles:lt(' + numberSteps + ')';
titlesGT = '.titles:gt(' + numberSteps + ')';
$(titlesLT).removeClass('hidden');
$(titlesGT).addClass('hidden');
// Show the steps
stepsLT = '.steps:lt(' + numberSteps + ')';
stepsGT = '.steps:gt(' + numberSteps + ')';
$(stepsLT).removeClass('hidden');
$(stepsGT).addClass('hidden');
});
// Subtract Steps - - - - - - - - - - - - - - - - - - - - - - - /
$('#down').click(function() {
var numberSteps = $('#number-steps').val();
if (numberSteps > min) {
numberSteps--;
$('#number-steps').val(numberSteps);
} else {
$('#number-steps').val(numberSteps);
}
// Hide the titles
titlesLT = '.titles:lt(' + (numberSteps - 1) + ')';
titlesGT = '.titles:gt(' + (numberSteps - 1) + ')';
$(titlesLT).removeClass('hidden');
$(titlesGT).addClass('hidden');
// Hide the steps
stepsLT = '.steps:lt(' + (numberSteps - 1) + ')';
stepsGT = '.steps:gt(' + (numberSteps - 1) + ')';
$(stepsLT).removeClass('hidden');
$(stepsGT).addClass('hidden');
});
// Reset the Page button - - - - - - - - - - - - - - - - - - - - - - - /
$('#reload-page').click(function() {
$('#number-steps').val('1');
localStorage.clear();
location.reload(true);
});
// Build HTML button - - - - - - - - - - - - - - - - - - - - - - - /
$("#create-steps").click(function() {
// Allow jQuery to capture from the textarea fields when set to tinyMCE
tinyMCE.triggerSave();
// Write null to any hidden inputs by removing tinymce from empty textareas, clearing the textareas themselves, then reiniting tinyMCE on all hidden textareas
$("div[class~='hidden'] input").val('');
tinymce.remove("div[class~='hidden'] textarea");
$("div[class~='hidden'] textarea").val('');
tinymce.init({
selector: '.step',
plugins: "code hr codesample link paste table lists autoresize autosave",
toolbar: "undo redo | paste | styleselect | bold italic | link | table | alignleft aligncenter alignright | bullist numlist | outdent indent code codesample",
branding: false,
menubar: false,
verify_html: false,
selection_toolbar: "bold italic | quicklink h3 h4 h5 h6 blockquote",
});
// Variables Main Section
var rowOpen = "<div class='row'>";
var numColumnOpen = "<div class='col-sm-2'>"
var numColumnClose = "</div> <!-- .col-sm-2 -->"
var textColumnOpen = "<div class='col-sm-10'>"
var textColumnClose = "</div> <!-- .col-sm-10 -->"
var rowClose = "</div> <!-- .row -->";
var title1 = $('#title1').val();
var title2 = $('#title2').val();
var title3 = $('#title3').val();
var title4 = $('#title4').val();
var title5 = $('#title5').val();
var title6 = $('#title6').val();
var title7 = $('#title7').val();
var title8 = $('#title8').val();
var title9 = $('#title9').val();
var title10 = $('#title10').val();
var title11 = $('#title11').val();
var title12 = $('#title12').val();
var title13 = $('#title13').val();
var title14 = $('#title14').val();
var title15 = $('#title15').val();
var title16 = $('#title16').val();
var title17 = $('#title17').val();
var title18 = $('#title18').val();
var title19 = $('#title19').val();
var title20 = $('#title20').val();
var title21 = $('#title21').val();
var title22 = $('#title22').val();
var title23 = $('#title23').val();
var title24 = $('#title24').val();
var title25 = $('#title25').val();
var title26 = $('#title26').val();
var title27 = $('#title27').val();
var title28 = $('#title28').val();
var title29 = $('#title29').val();
var title30 = $('#title30').val();
var step1 = $('#step1').val();
var step2 = $('#step2').val();
var step3 = $('#step3').val();
var step4 = $('#step4').val();
var step5 = $('#step5').val();
var step6 = $('#step6').val();
var step7 = $('#step7').val();
var step8 = $('#step8').val();
var step9 = $('#step9').val();
var step10 = $('#step10').val();
var step11 = $('#step11').val();
var step12 = $('#step12').val();
var step13 = $('#step13').val();
var step14 = $('#step14').val();
var step15 = $('#step15').val();
var step16 = $('#step16').val();
var step17 = $('#step17').val();
var step18 = $('#step18').val();
var step19 = $('#step19').val();
var step20 = $('#step20').val();
var step21 = $('#step21').val();
var step22 = $('#step22').val();
var step23 = $('#step23').val();
var step24 = $('#step24').val();
var step25 = $('#step25').val();
var step26 = $('#step26').val();
var step27 = $('#step27').val();
var step28 = $('#step28').val();
var step29 = $('#step29').val();
var step30 = $('#step30').val();
// The Bootstrap wrappers and fillers
var a = "<div class='row instruction-set'><div class='col-sm-2'>";
var b = "</h1></div> <!-- .col-sm-2 --><div class='col-sm-10'><h4>";
var c = "</h4></div> <!-- .col-sm-10 --><div class='col-sm-2'></div> <!-- .col-sm-10 --><div class='col-sm-10'>";
var d = "</div> <!-- .col-sm-10 --></div> <!-- .row --><hr>";
// set the final output variables
if (title1 !== '' && step1 !== '') {
var output1 = a + "<h1 class='short-round center-block step conditional' id='checkit-1'>" + "1" + b + title1 + c + step1 + d;
} else {
output1 = '';
}
if (title2 !== '' && step2 !== '') {
var output2 = a + "<h1 class='short-round center-block step conditional' id='checkit-2'>" + "2" + b + title2 + c + step2 + d;
} else {
output2 = '';
}
if (title3 !== '' && step3 !== '') {
var output3 = a + "<h1 class='short-round center-block step conditional' id='checkit-3'>" + "3" + b + title3 + c + step3 + d;
} else {
output3 = '';
}
if (title4 !== '' && step4 !== '') {
var output4 = a + "<h1 class='short-round center-block step conditional' id='checkit-4'>" + "4" + b + title4 + c + step4 + d;
} else {
output4 = '';
}
if (title5 !== '' && step5 !== '') {
var output5 = a + "<h1 class='short-round center-block step conditional' id='checkit-5'>" + "5" + b + title5 + c + step5 + d;
} else {
output5 = '';
}
if (title6 !== '' && step6 !== '') {
var output6 = a + "<h1 class='short-round center-block step conditional' id='checkit-6'>" + "6" + b + title6 + c + step6 + d;
} else {
output6 = '';
}
if (title7 !== '' && step7 !== '') {
var output7 = a + "<h1 class='short-round center-block step conditional' id='checkit-7'>" + "7" + b + title7 + c + step7 + d;
} else {
output7 = '';
}
if (title8 !== '' && step8 !== '') {
var output8 = a + "<h1 class='short-round center-block step conditional' id='checkit-8'>" + "8" + b + title8 + c + step8 + d;
} else {
output8 = '';
}
if (title9 !== '' && step9 !== '') {
var output9 = a + "<h1 class='short-round center-block step conditional' id='checkit-9'>" + "9" + b + title9 + c + step9 + d;
} else {
output9 = '';
}
if (title10 !== '' && step10 !== '') {
var output10 = a + "<h1 class='short-round center-block step conditional' id='checkit-10'>" + "10" + b + title10 + c + step10 + d;
} else {
output10 = '';
}
if (title11 !== '' && step11 !== '') {
var output11 = a + "<h1 class='short-round center-block step conditional' id='checkit-11'>" + "11" + b + title11 + c + step11 + d;
} else {
output11 = '';
}
if (title12 !== '' && step12 !== '') {
var output12 = a + "<h1 class='short-round center-block step conditional' id='checkit-12'>" + "12" + b + title12 + c + step12 + d;
} else {
output12 = '';
}
if (title13 !== '' && step13 !== '') {
var output13 = a + "<h1 class='short-round center-block step conditional' id='checkit-13'>" + "13" + b + title13 + c + step13 + d;
} else {
output13 = '';
}
if (title14 !== '' && step14 !== '') {
var output14 = a + "<h1 class='short-round center-block step conditional' id='checkit-14'>" + "14" + b + title14 + c + step14 + d;
} else {
output14 = '';
}
if (title15 !== '' && step15 !== '') {
var output15 = a + "<h1 class='short-round center-block step conditional' id='checkit-15'>" + "15" + b + title15 + c + step15 + d;
} else {
output15 = '';
}
if (title16 !== '' && step16 !== '') {
var output16 = a + "<h1 class='short-round center-block step conditional' id='checkit-16'>" + "16" + b + title16 + c + step16 + d;
} else {
output16 = '';
}
if (title17 !== '' && step17 !== '') {
var output17 = a + "<h1 class='short-round center-block step conditional' id='checkit-17'>" + "17" + b + title17 + c + step17 + d;
} else {
output17 = '';
}
if (title18 !== '' && step18 !== '') {
var output18 = a + "<h1 class='short-round center-block step conditional' id='checkit-18'>" + "18" + b + title18 + c + step18 + d;
} else {
output18 = '';
}
if (title19 !== '' && step19 !== '') {
var output19 = a + "<h1 class='short-round center-block step conditional' id='checkit-19'>" + "19" + b + title19 + c + step19 + d;
} else {
output19 = '';
}
if (title20 !== '' && step20 !== '') {
var output20 = a + "<h1 class='short-round center-block step conditional' id='checkit-20'>" + "20" + b + title20 + c + step20 + d;
} else {
output20 = '';
}
if (title21 !== '' && step21 !== '') {
var output21 = a + "<h1 class='short-round center-block step conditional' id='checkit-21'>" + "21" + b + title21 + c + step21 + d;
} else {
output21 = '';
}
if (title22 !== '' && step22 !== '') {
var output22 = a + "<h1 class='short-round center-block step conditional' id='checkit-22'>" + "22" + b + title22 + c + step22 + d;
} else {
output22 = '';
}
if (title23 !== '' && step23 !== '') {
var output23 = a + "<h1 class='short-round center-block step conditional' id='checkit-23'>" + "23" + b + title23 + c + step23 + d;
} else {
output23 = '';
}
if (title24 !== '' && step24 !== '') {
var output24 = a + "<h1 class='short-round center-block step conditional' id='checkit-24'>" + "24" + b + title24 + c + step24 + d;
} else {
output24 = '';
}
if (title25 !== '' && step25 !== '') {
var output25 = a + "<h1 class='short-round center-block step conditional' id='checkit-25'>" + "25" + b + title25 + c + step25 + d;
} else {
output25 = '';
}
if (title26 !== '' && step26 !== '') {
var output26 = a + "<h1 class='short-round center-block step conditional' id='checkit-26'>" + "26" + b + title26 + c + step26 + d;
} else {
output26 = '';
}
if (title27 !== '' && step27 !== '') {
var output27 = a + "<h1 class='short-round center-block step conditional' id='checkit-27'>" + "27" + b + title27 + c + step27 + d;
} else {
output27 = '';
}
if (title28 !== '' && step28 !== '') {
var output28 = a + "<h1 class='short-round center-block step conditional' id='checkit-28'>" + "28" + b + title28 + c + step28 + d;
} else {
output28 = '';
}
if (title29 !== '' && step29 !== '') {
var output29 = a + "<h1 class='short-round center-block step conditional' id='checkit-29'>" + "29" + b + title29 + c + step29 + d;
} else {
output29 = '';
}
if (title30 !== '' && step30 !== '') {
var output30 = a + "<h1 class='short-round center-block step conditional' id='checkit-30'>" + "30" + b + title30 + c + step30 + d;
} else {
output30 = '';
}
// finds the number of non-hidden steps
var numSteps = $(".steps").not('[class*="hidden"]').length;
var instructionsBox = "<!-- Instruction alert--><div class='alert alert-intro' role='alert'><p><i class='fa fa-check-circle-o fa-spacer-right' aria-hidden='true'></i>Click each step number as you finish to track your progress.</p></div>";
// Write the table - - - - - - - - - - - - - - - - - - - - - - - /
writeSteps = instructionsBox + output1 + output2 + output3 + output4 + output5 + output6 + output7 + output8 + output9 + output10 + output11 + output12 + output13 + output14 + output15 + output16 + output17 + output18 + output19 + output20 +
output21 + output22 + output23 + output24 + output25 + output26 + output27 + output28 + output29 + output30;
//replace all empty Paragraphs and Headers
writeSteps = writeSteps.replace(/<p> <\/p>/g,"");
writeSteps = writeSteps.replace(/<h1> <\/h1>/g,"");
writeSteps = writeSteps.replace(/<h2> <\/h2>/g,"");
writeSteps = writeSteps.replace(/<h3> <\/h3>/g,"");
writeSteps = writeSteps.replace(/<h4> <\/h4>/g,"");
writeSteps = writeSteps.replace(/<h5> <\/h5>/g,"");
writeSteps = writeSteps.replace(/<h6> <\/h6>/g,"");
// Write the output
$("#steps-example").html(writeSteps);
$('#steps-code').text(writeSteps);
// Fix for prettyprint (so it will reset and recolorize after DOM load)
$('pre').removeClass('prettyprinted');
prettyPrint();
});
// Scroll to Top Functionality
$(window).scroll(function() {
if ($(this).scrollTop() > 100) {
$('.scrollToTop').fadeIn();
} else {
$('.scrollToTop').fadeOut();
}
});
//Click event to scroll to top
$('.scrollToTop').click(function() {
$('html, body').animate({
'scrollTop': $('#build-buttons').offset().top - 200
}, 400);
return false;
});
// Saves the current form to a file from @ https://github.com/eligrey/FileSaver.js
$("#save-steps").click( function() {
//var filename = $("#input-fileName").val()
var blob = new Blob([writeSteps], {type: "text/txt;charset=utf-8"});
saveAs(blob, "steps.txt");
});
}); // close document.ready - - - - - - - - - - - - - - - - - - - - - - - /
</script>
<!-- Google Prettify Include - - - - - - - - - - - - - - - - - - - -->
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
<script type="text/javascript" src="js/prettify.js"></script>
</body>
</html>