forked from jcv8000/Codex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
892 lines (809 loc) · 53.8 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
<!doctype html>
<html lang="en" style="height: 100%">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Codex</title>
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.css">
<link rel="stylesheet" href="css/prosemirror.css">
<link rel="stylesheet" href="node_modules/katex/dist/katex.min.css">
<link rel="stylesheet" href="node_modules/@benrbray/prosemirror-math/style/math.css">
<link rel="stylesheet" href="css/styles.css">
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script>
window.jQuery = window.$ = require('jquery');
</script>
<!--<script src="bootstrap/bootstrap.bundle.min.js"></script>-->
<script src="node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="node_modules/feather-icons/dist/feather.min.js"></script>
<!-- HIGHLIHTJS STYLES -->
<link id="codeStyleLink" rel="stylesheet" href="node_modules/highlight.js/styles/atom-one-dark.css">
<!-- HIGHLIHTJS STYLES -->
<link id="codeOverlayLink" rel="stylesheet">
</head>
<body style="height: 100%">
<div class="container-fluid">
<div class="row">
<!-- SIDEBAR -->
<nav id="sidebarMenu" class="d-md-block bg-light sidebar shadow">
<div class="sidebar-sticky pt-3">
<ul class="nav flex-column unselectable">
<li class="nav-item my-sidebar-item">
<a id="homeTab" class="nav-link my-sidebar-link active" href="#" draggable="false"
onclick="showHomePage()">
<span data-feather="home"></span>
Home
</a>
</li>
<li class="nav-item my-sidebar-item">
<a id="settingsTab" class="nav-link my-sidebar-link" href="#" draggable="false"
onclick="showSettingsPage()">
<span data-feather="settings"></span>
Settings
</a>
</li>
<li class="nav-item my-sidebar-item">
<!--<a id="helpTab" class="nav-link unselectable" href="#help-list" data-toggle="collapse"
draggable="false" onclick="">
<span data-feather="help-circle"></span>Help<span
class="caret"></span>
</a>-->
<a id="helpTab" class="nav-link unselectable" href="#help-list" data-toggle="collapse"
draggable="false" onclick="">
<div class="row">
<div class="col-auto pr-0">
<span data-feather="help-circle"></span>
</div>
<div class="col pr-1"
style="padding-left: 5px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;">
Help</div>
<div class="col-auto" style="padding-right: 20px">
<span class="caret"></span>
</div>
</div>
</a>
<ul class="nav collapse" id="help-list">
<li class="nav-item my-sidebar-item">
<a href="#" id="firstHelpPage" class="nav-link my-sidebar-link indent unselectable"
onclick="showHelpPage(); loadHelpPage('gettingstarted')">
<div class="row">
<div class="col-auto pr-0"><span data-feather="zap"></span></div>
<div class="col pr-4" style="padding-left: 5px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;">
Getting Started
</div>
</div>
</a>
</li>
<li class="nav-item my-sidebar-item">
<a href="#" class="nav-link my-sidebar-link indent unselectable"
onclick="showHelpPage(); loadHelpPage('basicediting')">
<div class="row">
<div class="col-auto pr-0"><span data-feather="edit"></span></div>
<div class="col pr-4" style="padding-left: 5px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;">
Basic Editing
</div>
</div>
</a>
</li>
<li class="nav-item my-sidebar-item">
<a href="#" class="nav-link my-sidebar-link indent unselectable"
onclick="showHelpPage(); loadHelpPage('equations')">
<div class="row">
<div class="col-auto pr-0"><span data-feather="divide"></span></div>
<div class="col pr-4" style="padding-left: 5px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;">
Math and Equations
</div>
</div>
</a>
</li>
<li class="nav-item my-sidebar-item">
<a href="#" class="nav-link my-sidebar-link indent unselectable"
onclick="showHelpPage(); loadHelpPage('keybinds')">
<div class="row">
<div class="col-auto pr-0"><span data-feather="command"></span></div>
<div class="col pr-4" style="padding-left: 5px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;">
Keybinds and Macros
</div>
</div>
</a>
</li>
<li class="nav-item my-sidebar-item">
<a href="#" id="cloudSyncPage" class="nav-link my-sidebar-link indent unselectable"
onclick="showHelpPage(); loadHelpPage('exporting')">
<div class="row">
<div class="col-auto pr-0"><span data-feather="external-link"></span></div>
<div class="col pr-4" style="padding-left: 5px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;">
Exporting Help
</div>
</div>
</a>
</li>
<li class="nav-item my-sidebar-item">
<a href="#" id="cloudSyncPage" class="nav-link my-sidebar-link indent unselectable"
onclick="showHelpPage(); loadHelpPage('cloudsyncing')">
<div class="row">
<div class="col-auto pr-0"><span data-feather="upload-cloud"></span></div>
<div class="col pr-4" style="padding-left: 5px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;">
Cloud Syncing
</div>
</div>
</a>
</li>
<li class="nav-item my-sidebar-item">
<a href="#" class="nav-link indent unselectable"
onclick="shell.openExternal('https://forms.gle/uDLJpqLbNLcEx1F8A')">
<div class="row">
<div class="col-auto pr-0"><span data-feather="inbox"></span></div>
<div class="col pr-4" style="padding-left: 5px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;">
Give Feedback (Google Forms)
</div>
</div>
</a>
</li>
</ul>
</li>
<li id="updateBlockLI" class="nav-item my-sidebar-item" style="display: none;" title="www.codexnotes.com/download">
<a id="updateBlock" class="nav-link" href="#" draggable="false"
onclick="shell.openExternal('https://www.codexnotes.com/download')">
<span data-feather="download" style="color: #269700;"></span>
New update available
</a>
</li>
</ul>
<!--<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted"
style="margin-bottom: 8px !important;">
<span class="unselectable">Notebooks</span>
<a id="newNotebookBtn" class="d-flex align-items-center text-muted" href="#newNotebookModal" draggable="false"
data-toggle="modal" title="Create notebook">
<span data-feather="plus-circle"></span>
</a>
</h6>-->
<div class="row px-3 mt-4 mb-0 unselectable">
<div class="col">
<h6 class="sidebar-heading text-muted" style="margin-top: 3px">Notebooks</h6>
</div>
<div class="col-auto" style="padding-right: 16px;">
<a id="newNotebookBtn" class="text-muted" href="#newNotebookModal" draggable="false"
data-toggle="modal" title="New Notebook...">
<span data-feather="plus-circle"></span>
</a>
</div>
</div>
<ul class="nav flex-column mb-2 unselectable" id="notebookList">
</ul>
</div>
<span id="sidebarResizer" class="unselectable"></span>
</nav>
<span id="sidebarToggler" class="unselectable" data-feather="chevrons-left" onclick="toggleSidebar()"
title="Toggle Sidebar"></span>
<!-- MAIN CONTAINER -->
<main id="mainContainer" role="main" class="p-0">
<!-- HOME PAGE -->
<span id="homePage" style="display:block; height: 100%" class="unselectable">
<div class="container-fluid download-header mb-4">
<div>
<center>
<img src="img/logo-shadow.png" style="width: 400px"><br>
<p style="color: white; margin-bottom: 5px; font-weight: 500">Version 1.4.2</p>
<p style="color: white; padding-bottom: 20px;">Made by Josh Vickery</p>
</center>
</div>
</div>
<div class="alert alert-warning mx-auto" role="alert" style="width: 800px; margin-bottom: 30px">
<h4>Codex 2.0 is coming soon</h4>
Version 2.0 is a complete re-write and will finally add Sections, so you can create a tree of chapters/sections inside your notebooks, along with lots of other features and fixes.<br>
If you have any issues or feedback for Codex, create an Issue/Discussion on the GitHub repository.
</div>
<div class="container">
<div class="row">
<div class="col px-5">
<center>
<h3>Favorites</h3>
</center>
<div id="favoritesContainer" class="py-3">
</div>
</div>
<div class="col px-5">
<center>
<h3>More</h3>
</center>
<div class="py-3">
<a class="favoriteBlock shadow-sm" onclick="shell.openExternal('https://www.codexnotes.com/')">
<div class="row" style="width: 100%">
<div class="col-auto">
<span data-feather="globe" style="width: 32px; height: 32px;"></span>
</div>
<div class="col" style="white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-weight: 500; vertical-align: middle; line-height: 34px;">Website</div>
</div>
</a>
<a class="favoriteBlock shadow-sm" onclick="shell.openExternal('https://codexnotes.com/updates/')">
<div class="row" style="width: 100%">
<div class="col-auto">
<span data-feather="file-plus" style="width: 32px; height: 32px;"></span>
</div>
<div class="col" style="white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-weight: 500; vertical-align: middle; line-height: 34px;">Changelog</div>
</div>
</a>
<a class="favoriteBlock shadow-sm" onclick="autoOpenHelpTab()">
<div class="row" style="width: 100%">
<div class="col-auto">
<span data-feather="help-circle" style="width: 32px; height: 32px;"></span>
</div>
<div class="col" style="white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-weight: 500; vertical-align: middle; line-height: 34px;">Help</div>
</div>
</a>
<a class="favoriteBlock shadow-sm" onclick="shell.openExternal('https://github.com/jcv8000/Codex')">
<div class="row" style="width: 100%">
<div class="col-auto">
<span data-feather="github" style="width: 32px; height: 32px;"></span>
</div>
<div class="col" style="white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-weight: 500; vertical-align: middle; line-height: 34px;">GitHub Repository</div>
</div>
</a>
<a class="favoriteBlock shadow-sm" onclick="shell.openExternal('https://github.com/jcv8000/Codex/issues')">
<div class="row" style="width: 100%">
<div class="col-auto">
<span data-feather="alert-circle" style="width: 32px; height: 32px;"></span>
</div>
<div class="col" style="white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-weight: 500; vertical-align: middle; line-height: 34px;">GitHub Issues</div>
</div>
</a>
</div>
</div>
</div>
</div>
</span>
<!-- HELP PAGE -->
<span id="helpPage" style="display:none">
<div class="content shadow-sm" id="helpContent">
</div>
</span>
<!-- SETTINGS PAGE -->
<span id="settingsPage" class="unselectable" style="display: none;">
<div class="content shadow-sm">
<center>
<h2>Appearance</h1>
</center>
<hr>
<div class="form-group">
<h5 class="settingTitle">Theme</h5>
<select class="form-control custom-select" id="themeSelect" onchange="applyPrefsRuntime()">
<option value="0">Light</option>
<option value="1">Dark</option>
<option value="2">System default</option>
</select>
</div>
<div class="form-group">
<h5 class="settingTitle">Accent color</h5>
<input class="form-control" type="color" id="accentColorPicker"
onchange="applyPrefsRuntime()" style="display: inline; width: 58px; height: 48px" title="Choose color...">
<button class="btn mybtn" style="vertical-align: 7px; margin-left: 10px"
onclick="revertAccentColor()">Revert to default</button>
</div>
<center>
<h2 class="mt-5">Code Blocks</h1>
</center>
<hr>
<div class="form-group">
<h5 class="settingTitle">Code Block Theme</h5>
<center>
<div id="exampleCode" class="codeSnippet hljs" data-params="cpp"
style="font-size:14px; width: 100%; text-align: left; tab-size: 4; position: relative"></div>
</center>
<select class="form-control custom-select" id="codeStyleSelect"
onchange="applyPrefsRuntime()">
<optgroup label="Light themes">
<option value="a11y-light">A 11 Y Light</option>
<option value="arduino-light">Arduino Light</option>
<option value="ascetic">Ascetic</option>
<option value="atelier-cave-light">Atelier Cave Light</option>
<option value="atelier-dune-light">Atelier Dune Light</option>
<option value="atelier-estuary-light">Atelier Estuary Light</option>
<option value="atelier-forest-light">Atelier Forest Light</option>
<option value="atelier-heath-light">Atelier Heath Light</option>
<option value="atelier-lakeside-light">Atelier Lakeside Light</option>
<option value="atelier-plateau-light">Atelier Plateau Light</option>
<option value="atelier-savanna-light">Atelier Savanna Light</option>
<option value="atelier-seaside-light">Atelier Seaside Light</option>
<option value="atelier-sulphurpool-light">Atelier Sulphurpool Light</option>
<option value="atom-one-light">Atom One Light</option>
<option value="color-brewer">Color Brewer</option>
<option value="default">Default</option>
<option value="docco">Docco</option>
<option value="foundation">Foundation</option>
<option value="github-gist">Github Gist</option>
<option value="github" style="font-weight: bold;">Github</option>
<option value="googlecode">Googlecode</option>
<option value="grayscale">Grayscale</option>
<option value="gruvbox-light">Gruvbox Light</option>
<option value="idea">Idea</option>
<option value="isbl-editor-light">Isbl Editor Light</option>
<option value="kimbie.light">Kimbie Light</option>
<option value="lightfair">Lightfair</option>
<option value="magula">Magula</option>
<option value="mono-blue">Mono Blue</option>
<option value="nnfx">Nnfx</option>
<option value="paraiso-light">Paraiso Light</option>
<option value="purebasic">Purebasic</option>
<option value="qtcreator_light">Qtcreator Light</option>
<option value="routeros">Routeros</option>
<option value="solarized-light">Solarized Light</option>
<option value="tomorrow">Tomorrow</option>
<option value="vs">Visual Studio (Light)</option>
<option value="xcode">Xcode</option>
</optgroup>
<optgroup label="Dark themes">
<option value="a11y-dark">A 11 Y Dark</option>
<option value="agate">Agate</option>
<option value="androidstudio">Android Studio</option>
<option value="an-old-hope">An Old Hope</option>
<option value="arta">Arta</option>
<option value="atelier-cave-dark">Atelier Cave Dark</option>
<option value="atelier-dune-dark">Atelier Dune Dark</option>
<option value="atelier-estuary-dark">Atelier Estuary Dark</option>
<option value="atelier-forest-dark">Atelier Forest Dark</option>
<option value="atelier-heath-dark">Atelier Heath Dark</option>
<option value="atelier-lakeside-dark">Atelier Lakeside Dark</option>
<option value="atelier-plateau-dark">Atelier Plateau Dark</option>
<option value="atelier-savanna-dark">Atelier Savanna Dark</option>
<option value="atelier-seaside-dark">Atelier Seaside Dark</option>
<option value="atelier-sulphurpool-dark">Atelier Sulphurpool Dark</option>
<option value="atom-one-dark-reasonable">Atom One Dark Reasonable</option>
<option value="atom-one-dark" style="font-weight: bold;">Atom One Dark</option>
<option value="codepen-embed">Codepen Embed</option>
<option value="darcula">Darcula</option>
<option value="dark">Dark</option>
<option value="dracula">Dracula</option>
<option value="far">Far</option>
<option value="gml">GML</option>
<option value="gradient-dark">Gradient Dark</option>
<option value="gruvbox-dark">Gruvbox Dark</option>
<option value="hopscotch">Hopscotch</option>
<option value="hybrid">Hybrid</option>
<option value="ir-black">Ir Black</option>
<option value="isbl-editor-dark">Isbl Editor Dark</option>
<option value="kimbie.dark">Kimbie Dark</option>
<option value="lioshi">Lioshi</option>
<option value="monokai-sublime">Monokai Sublime</option>
<option value="monokai">Monokai</option>
<option value="night-owl">Night Owl</option>
<option value="nnfx-dark">Nnfx Dark</option>
<option value="nord">Nord</option>
<option value="ocean">Ocean</option>
<option value="obsidian">Obsidian</option>
<option value="paraiso-dark">Paraiso Dark</option>
<option value="pojoaque">Pojoaque</option>
<option value="qtcreator_dark">Qtcreator Dark</option>
<option value="railscasts">Railscasts</option>
<option value="rainbow">Rainbow</option>
<option value="shades-of-purple">Shades Of Purple</option>
<option value="solarized-dark">Solarized Dark</option>
<option value="srcery">Srcery</option>
<option value="sunburst">Sunburst</option>
<option value="tomorrow-night-blue">Tomorrow Night Blue</option>
<option value="tomorrow-night-bright">Tomorrow Night Bright</option>
<option value="tomorrow-night-eighties">Tomorrow Night Eighties</option>
<option value="tomorrow-night">Tomorrow Night</option>
<option value="vs2015">Visual Studio 2015</option>
<option value="xt256">Xt256</option>
<option value="zenburn">Zenburn</option>
</optgroup>
</select>
<center>
<p class="mt-2" style="font-size: 15px; font-weight: 400;">(Click the dropdown, press
enter, and press
up/down to cycle through themes)</p>
</center>
</div>
<div class="form-group">
<h5 class="settingTitle">Language Overlay</h5>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="showLanguageOverlayCheck"
onchange="applyPrefsRuntime()">
<label class="custom-control-label" for="showLanguageOverlayCheck">Show the language name at the top-right of code blocks</label>
</div>
</div>
<div class="form-group">
<h5 class="settingTitle">Preferred Tab Size</h5>
<!--<label for="tabSizeSelect">Preferred tab size</label>-->
<select class="form-control custom-select" id="tabSizeSelect"
onchange="applyPrefsRuntime()">
<option value="2">2 spaces</option>
<option value="4">4 spaces</option>
</select>
</div>
<div class="form-group">
<h5 class="settingTitle">Word Wrap</h5>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="codeWordWrapCheck"
onchange="applyPrefsRuntime()">
<label class="custom-control-label" for="codeWordWrapCheck">Enable word wrap in code blocks</label>
</div>
</div>
<center>
<h2 class="mt-5">Exporting</h1>
</center>
<hr>
<div class="form-group">
<h5 class="settingTitle">Exporting to PDF</h5>
<!--<input style="width: 24px; height: 24px;" type="checkbox" id="exportBreakPageOnH1Check" onchange="applyPrefsRuntime()">
<label style="font-weight: normal; vertical-align: top; margin-left: 6px" for="exportBreakPageOnH1Check">Break page before Level 1 Headings</label>
<br>
<input style="width: 24px; height: 24px;" type="checkbox" id="darkmodePDFCheck" onchange="applyPrefsRuntime()">
<label style="font-weight: normal; vertical-align: top; margin-left: 6px" for="darkmodePDFCheck">Dark mode PDFs <span style="font-size: 12px"> (Please do not actually print these)</span></label>
-->
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="exportBreakPageOnH1Check"
onchange="applyPrefsRuntime()">
<label class="custom-control-label" for="exportBreakPageOnH1Check">Break page before
Level 1
Headings</label>
</div>
<!--<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="darkmodePDFCheck"
onchange="applyPrefsRuntime()">
<label class="custom-control-label" for="darkmodePDFCheck">Dark mode PDFs <span
style="font-size: 12px">
(Please do not actually print these out)</span></label>
</div>-->
</div>
<div class="form-group">
<h5 class="settingTitle">Exporting to PDF/Markdown</h5>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="openPDFonExportCheck"
onchange="applyPrefsRuntime()">
<label class="custom-control-label" for="openPDFonExportCheck">Open the created file
after
exporting</label>
</div>
</div>
<center>
<h2 class="mt-5">Other</h1>
</center>
<hr>
<div class="form-group">
<input type="file" id="dataDirInputDialog" webkitdirectory style="display:none">
<h5 class="settingTitle">Save Location</h5>
<div class="input-group">
<!--<input type="text" id="dataDirInput" class="form-control" spellcheck="false" readonly onclick="openDataDir()">-->
<div class="form-control" readonly><a href="#" onclick="openDataDir()" id="dataDirInput"
style="font-size: 14px; vertical-align: 1px;"></a></div>
<div class="input-group-append" id="revertToDefaultDataDirBtnTooltip">
<button id="revertToDefaultDataDirBtn" onclick="revertToDefaultDataDir()"
class="btn mybtn-primary" type="button"
style="padding-left: 12px; padding-right: 12px" title=""><span
data-feather="rotate-ccw"></span></button>
</div>
<div class="input-group-append">
<button onclick="DataDirDialog();" id="dataDirButton" class="btn mybtn-primary"
type="button" style="padding-left: 12px; padding-right: 12px"
title="Change save directory"><span data-feather="folder"></span></button>
</div>
</div>
<br>
<!--<span id="revertToDefaultDataDirBtnTooltip" class="d-inline-block mb-4" data-toggle="tooltip" data-placement="bottom" title="">
<button class="mybtn-primary" style="width: 100%" id="revertToDefaultDataDirBtn" onclick="revertToDefaultDataDir()">Revert to default save directory</button>
</span>-->
<div class="alert alert-warning mb-0" role="alert" style="font-size: 14px">
<i><b>Changing your save location will immediately restart the application.</b><br>Make
sure it has its
own folder to separate the files from others.<br><br>You will have to copy/replace
the
<b><code>save.json</code></b> file and <b><code>notes</code></b> folder from the old
location to the
new location to see your notes.<br>
<hr>This can be used for cloud syncing your notes, check <a href="#"
onclick="_loadCloudSyncPage()">here</a> for a tutorial.
</i>
</div>
</div>
<div class="form-group mb-0">
<h5 class="settingTitle">Unused Files</h5>
<p>When you delete a notebook/page in Codex, the actual files that hold the pages' content stays in the <b><code>notes</code></b> folder in case you need to get it back.<br><br>
Don't worry about this unless you have extremely large notes with embedded images and you need extra space. Most note files are less than 1 MB in size.<br><br>
This button deletes all files that are currently unused by your notebooks.</p>
<center><button class="btn mybtn-danger" onclick="deleteOldPages()">Purge unused files</button></center>
</div>
</div>
</span>
<!-- EDITOR PAGE -->
<span id="editorPage" style="display: none;">
<!-- EDITOR RIBBON -->
<nav id="editorRibbon" class="navbar navbar-expand-sm navbar-light shadow">
</nav>
<div class="content shadow-sm" id="editorContent">
<div id="editor" spellcheck="true" tab-index="0"></div>
</div>
</span>
</main>
</div>
</div>
<span id="saveIndicator" class="shadow-sm">
<span style="margin-left: 10px; margin-right: 16px">
<span data-feather="check"></span> <span id="saveIndicatorTitle">
Page saved!
</span>
</span>
</span>
<!-- NEW NOTEBOOK MODAL -->
<div class="modal fade unselectable" id="newNotebookModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content shadow-lg">
<form id="newNotebookForm">
<div class="modal-header">
<h5 class="modal-title">New Notebook</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<label class="form-label">Icon:</label>
<div class="form-row mb-3">
<div class="col-auto">
<span id="newNotebookIconPreview" data-feather="book" style="width: 32px; height: 32px; vertical-align: -19px; color: black;"></span>
</div>
<div class="col">
<select id="newNotebookIconSelect" class="form-control"></select>
</div>
<div class="col-auto">
<input class="form-control" type="color" style="width: 50px" id="newNotebookColorPicker"
title="Choose color...">
</div>
<div class="col-auto">
<span id="newNotebookIconHelp" data-feather="help-circle" href="#" onclick="shell.openExternal('https://www.feathericons.com/')" style="color: #9AA6B3; width: 24px; height: 24px; vertical-align: -15px; cursor: pointer;" title="View all icons at feathericons.com"></span>
</div>
</div>
<label class="form-label" for="newNotebookNameInput">Name:</label>
<div class="form-row">
<input class="form-control" type="text" id="newNotebookNameInput"
placeholder="New notebook name...">
<div class="invalid-feedback">
Please enter a valid name.
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="mybtn" data-dismiss="modal">Cancel</button>
<input type="submit" class="mybtn-primary" id="createNotebookButton" value="Create">
</div>
</form>
</div>
</div>
</div>
<!-- NEW NOTEBOOK MODAL -->
<!-- EDIT NOTEBOOK MODAL -->
<div class="modal fade unselectable" id="editNotebookModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content shadow-lg">
<form id="editNotebookForm">
<div class="modal-header">
<h5 class="modal-title">Edit Notebook</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<label class="form-label">Icon:</label>
<div class="form-row mb-3">
<div class="col-auto">
<span id="editNotebookIconPreview" data-feather="book" style="width: 32px; height: 32px; vertical-align: -19px; color: black;"></span>
</div>
<div class="col">
<select id="editNotebookIconSelect" class="form-control"></select>
</div>
<div class="col-auto">
<input class="form-control" type="color" style="width: 50px" id="editNotebookColorPicker"
title="Choose color...">
</div>
<div class="col-auto">
<span id="editNotebookIconHelp" data-feather="help-circle" href="#" onclick="shell.openExternal('https://www.feathericons.com/')" style="color: #9AA6B3; width: 24px; height: 24px; vertical-align: -15px; cursor: pointer;" title="View all icons at feathericons.com"></span>
</div>
</div>
<label class="form-label" for="newNotebookNameInput">Name:</label>
<div class="form-row">
<input class="form-control" type="text" id="editNotebookNameInput"
placeholder="New notebook name...">
<div class="invalid-feedback">
Please enter a valid name.
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="mybtn" data-dismiss="modal">Cancel</button>
<input type="submit" class="mybtn-primary" id="editNotebookButton" value="Save">
</div>
</form>
</div>
</div>
</div>
<!-- EDIT NOTEBOOK MODAL -->
<!-- DELETE NOTEBOOK MODAL -->
<div class="modal fade unselectable" id="deleteNotebookModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content shadow-lg">
<div class="modal-body">
<h6>Are you sure you want to delete this notebook?</h6>
</div>
<div class="modal-footer">
<button type="button" class="mybtn" data-dismiss="modal">Cancel</button>
<button type="button" class="mybtn-danger" id="deleteNotebookButton"
onclick="deleteSelectedNotebook(); $('#deleteNotebookModal').modal('hide');">Delete</button>
</div>
</div>
</div>
</div>
<!-- NEW PAGE MODAL -->
<div class="modal fade unselectable" id="newPageModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content shadow-lg">
<form id="newPageForm">
<div class="modal-header">
<h5 class="modal-title">New Page</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<input class="form-control" type="text" id="newPageNameInput" placeholder="New page name...">
<div class="invalid-feedback">
Please enter a valid name.
</div>
</div>
<div class="modal-footer">
<button type="button" class="mybtn" data-dismiss="modal">Cancel</button>
<input type="submit" class="mybtn-primary" id="editNotebookButton" value="Create">
</div>
</form>
</div>
</div>
</div>
<!-- NEW PAGE MODAL -->
<!-- EDIT PAGE MODAL -->
<div class="modal fade unselectable" id="editPageModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content shadow-lg">
<form id="editPageForm">
<div class="modal-header">
<h5 class="modal-title">Rename Page</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<input class="form-control" type="text" id="editPageNameInput" placeholder="New page name...">
<div class="invalid-feedback">
Please enter a valid name.
</div>
</div>
<div class="modal-footer">
<button type="button" class="mybtn" data-dismiss="modal">Cancel</button>
<input type="submit" class="mybtn-primary" id="editPageButton" value="Rename">
</div>
</form>
</div>
</div>
</div>
<!-- EDIT PAGE MODAL -->
<!-- DELETE PAGE MODAL -->
<div class="modal fade unselectable" id="deletePageModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content shadow-lg">
<div class="modal-body">
<h6>Are you sure you want to delete this page?</h6>
</div>
<div class="modal-footer">
<button type="button" class="mybtn" data-dismiss="modal">Cancel</button>
<button type="button" class="mybtn-danger" id="deletePageButton"
onclick="deleteSelectedPage(); $('#deletePageModal').modal('hide');">Delete</button>
</div>
</div>
</div>
</div>
<!-- NOTEBOOK CONTEXT MENU -->
<div class="dropdown-menu shadow m-0 unselectable" id="notebook-context-menu" style="position: fixed">
<a class="dropdown-item" href="#newPageModal" data-toggle="modal"><span data-feather="copy"
class="context-menu-glyph"></span>New Page</a>
<a class="dropdown-item" href="#" onclick="editSelectedNotebook()"><span data-feather="edit"
class="context-menu-glyph"></span>Edit Notebook</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#" onclick="openExportNotebookModal()"><span data-feather="external-link"
class="context-menu-glyph"></span>Export all pages...</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#deleteNotebookModal" data-toggle="modal" style="color: red"><span
data-feather="trash-2" class="context-menu-glyph"></span>Delete notebook</a>
</div>
<!-- PAGE CONTEXT MENU -->
<div class="dropdown-menu shadow m-0 unselectable" id="page-context-menu" style="position: fixed">
<a class="dropdown-item" href="#" onclick="editSelectedPage()"><span data-feather="edit"
class="context-menu-glyph"></span>Rename page</a>
<a class="dropdown-item" href="#" onclick="toggleFavoritePage()"><span data-feather="star"
class="context-menu-glyph"></span><span id="FavoritePageLink">Favorite page</span></a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#" onclick="printRightClickedPage()"><span data-feather="external-link"
class="context-menu-glyph"></span>Export to PDF</a>
<a class="dropdown-item" href="#" onclick="exportRightClickedPageToMarkdown()"><span data-feather="hash"
class="context-menu-glyph"></span>Export to Markdown</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#deletePageModal" data-toggle="modal" style="color: red"><span
data-feather="trash-2" class="context-menu-glyph"></span>Delete page</a>
</div>
<!-- NEW USER POPUP -->
<div class="modal fade unselectable" id="firstUseModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content shadow-lg">
<div class="modal-header">
<h5 class="modal-title">Welcome</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" onclick="prefs.firstUse = false;">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
It looks like this is the first time you're using Codex.<br><br>
Click Continue if you would like to see a short guide about how to use Codex.
</div>
<div class="modal-footer">
<button type="button" class="mybtn" onclick="prefs.firstUse = false;" data-dismiss="modal">No thanks</button>
<button type="button" class="mybtn-primary" data-dismiss="modal"
onclick="autoOpenHelpTab(); prefs.firstUse = false;">Continue</button>
</div>
</div>
</div>
</div>
<!-- NEW USER POPUP -->
<!-- EXPORT NOTEBOOK MODAL -->
<div class="modal fade unselectable" id="exportNotebookModal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document" style="max-width: 700px;">
<div class="modal-content shadow-lg">
<div class="modal-header">
<h5 class="modal-title">Export all Notebook pages</h5>
<!--<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>-->
</div>
<div class="modal-body">
<center>
<span id="exportNotebookModalIcon" data-feather="book" style="width: 32px; height: 32px; vertical-align: -12px;"></span>
<span id="exportNotebookModalTitle" class="ml-2" style="font-size: 16px; font-weight: 500;"></span>
<span id="exportNotebookModalPageCount"></span>
</center>
<hr>
<div class="mb-3">
<span data-feather="info" style="color: dodgerblue;"></span>
You should create a new folder for the files to be saved into.
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<button class="btn mybtn-primary" onclick="exportNotebookDirDialog()" style="padding: 0px 10px; font-size: 13px;">Choose Location</button>
</div>
<div class="form-control">
<span id="exportNodebookLocation" style="font-size: 13px;">No location set</span>
</div>
</div>
<div class="form-group mx-0 my-3">
<label for="exportNotebookFileTypeSelect">Export type</label>
<select id="exportNotebookFileTypeSelect" class="form-control custom-select">
<option value="PDF">PDF</option>
<option value="MD">Markdown</option>
</select>
</div>
<div class="mt-5 mb-2" id="exportNotebookProgressSection" style="display: none;">
<div class="progress mb-1">
<div id="exportNotebookProgressBar" class="progress-bar bg-success" role="progressbar" style="width: 0%"></div>
</div>
<center>
<span id="exportNotebookProgressText"></span>
</center>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn mybtn" id="exportNotebookCancelButton" onclick="closeExportNotebookModal()">Cancel</button>
<button type="button" class="btn mybtn-primary" id="exportNotebookButton" disabled="true" onclick="exportNotebookPages()">Export</button>
<button type="button" class="btn mybtn" id="exportNotebookCloseButton" onclick="closeExportNotebookModal()" style="display: none;">Close</button>
</div>
</div>
</div>
</div>
<!-- NEW PAGE MODAL -->
<script src="renderer.js"></script>
</body>
</html>