-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
659 lines (613 loc) · 32.2 KB
/
index.html
File metadata and controls
659 lines (613 loc) · 32.2 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Writelo - Simple Text Editor</title>
<meta name="description"
content="A beautifully designed, fully offline text editor that saves automatically to your browser.">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="index.css">
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
</head>
<body>
<div class="app-container">
<header>
<div class="brand">
<!-- Modern pen/document SVG Icon -->
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="url(#gradient)" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<defs>
<linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" stop-color="#4CAF50" />
<stop offset="100%" stop-color="#818cf8" />
</linearGradient>
</defs>
<path d="M12 20h9"></path>
<path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>
</svg>
<div class="brand-text">
<h1>Writelo</h1>
<span class="app-subtitle">Simple Text Editor</span>
</div>
</div>
<div class="actions" id="header-actions">
<div id="sync-indicator" class="sync-indicator" style="display: none;" title="Syncing across tabs">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<polyline points="23 4 23 10 17 10"></polyline>
<polyline points="1 20 1 14 7 14"></polyline>
<path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path>
</svg>
<span class="sync-text">Live Sync</span>
</div>
<!-- Secondary actions: inline on desktop, expandable panel on mobile -->
<div class="actions-overflow" id="actions-overflow">
<button id="settings-btn" title="Settings">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="3"></circle>
<path
d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z">
</path>
</svg>
</button>
<button id="undo-btn" title="Undo (Ctrl+Z)">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<polyline points="1 4 1 10 7 10"></polyline>
<path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path>
</svg>
</button>
<button id="preview-btn" title="Markdown Preview">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
<circle cx="12" cy="12" r="3"></circle>
</svg>
</button>
<button id="find-btn" title="Find and Replace (Ctrl+F)">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<circle cx="11" cy="11" r="8"></circle>
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
</svg>
</button>
<button id="clear-btn" title="Clear Editor">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<polyline points="3 6 5 6 21 6"></polyline>
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
<line x1="10" y1="11" x2="10" y2="17"></line>
<line x1="14" y1="11" x2="14" y2="17"></line>
</svg>
</button>
<button id="focus-btn" title="Focus Mode">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path>
</svg>
</button>
</div>
<!-- Always visible -->
<button id="copy-btn" class="btn-primary" title="Copy Text">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
</button>
<div class="status-indicator saved" id="status-indicator" title="All changes saved">
<div class="status-dot"></div>
<svg class="status-icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
<polyline points="20 6 9 17 4 12"></polyline>
</svg>
</div>
<!-- Mobile-only overflow toggle -->
<button id="actions-toggle-btn" class="actions-toggle-btn" title="More options">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<circle cx="5" cy="12" r="1"></circle>
<circle cx="12" cy="12" r="1"></circle>
<circle cx="19" cy="12" r="1"></circle>
</svg>
</button>
</div>
</header>
<main class="editor-container">
<div class="tabs-bar" id="tabs-bar">
<button id="sidebar-toggle-btn" class="sidebar-toggle-btn" title="Collapse sidebar">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<polyline points="15 18 9 12 15 6"></polyline>
</svg>
</button>
<div class="tabs-list" id="tabs-list">
<!-- Populated by JS -->
</div>
<button id="add-tab-btn" class="add-tab-btn" title="Add new tab">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
</button>
</div>
<div class="editor-main">
<div id="find-replace-panel" class="find-replace-panel" style="display: none;">
<div class="find-replace-row">
<input type="text" id="find-input" placeholder="Find...">
<button class="icon-btn" id="find-prev-btn" title="Previous Match" disabled>
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polyline points="18 15 12 9 6 15"></polyline>
</svg>
</button>
<button class="icon-btn" id="find-next-btn" title="Next Match" disabled>
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
<button class="icon-btn close-find-btn" id="close-find-btn" title="Close">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</button>
</div>
<div class="find-replace-row">
<input type="text" id="replace-input" placeholder="Replace with...">
<button id="replace-btn" class="text-btn" disabled>Replace</button>
<button id="replace-all-btn" class="text-btn" disabled>All</button>
</div>
<div class="find-status" id="find-status">No matches</div>
</div>
<div class="editor-wrapper">
<div id="editor-backdrop" class="editor-backdrop">
<div id="editor-highlights" class="editor-highlights"></div>
</div>
<textarea id="editor" placeholder="Start typing your notes here." autofocus></textarea>
</div>
<button id="scroll-top-btn" class="scroll-top-btn" title="Scroll to top">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<line x1="12" y1="19" x2="12" y2="5"></line>
<polyline points="5 12 12 5 19 12"></polyline>
</svg>
</button>
<div class="footer">
<span id="word-count">0 Words</span>
<span id="char-count">0 Characters</span>
</div>
</div>
</main>
</div>
<div class="app-bottom-links">
<a href="https://github.com/saneeshnp/writelo" target="_blank" rel="noopener noreferrer" class="bottom-link" title="View on GitHub">
<svg width="12" height="12" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.166 6.839 9.489.5.092.682-.217.682-.482 0-.237-.009-.868-.013-1.703-2.782.604-3.369-1.342-3.369-1.342-.454-1.154-1.11-1.462-1.11-1.462-.908-.62.069-.608.069-.608 1.003.07 1.531 1.03 1.531 1.03.892 1.529 2.341 1.087 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.11-4.555-4.943 0-1.091.39-1.984 1.029-2.683-.103-.253-.446-1.27.098-2.647 0 0 .84-.269 2.75 1.025A9.578 9.578 0 0 1 12 6.836a9.59 9.59 0 0 1 2.504.337c1.909-1.294 2.747-1.025 2.747-1.025.546 1.377.202 2.394.1 2.647.64.699 1.028 1.592 1.028 2.683 0 3.842-2.339 4.687-4.566 4.935.359.309.678.919.678 1.852 0 1.336-.012 2.415-.012 2.741 0 .267.18.578.688.48C19.138 20.163 22 16.418 22 12c0-5.523-4.477-10-10-10z"/>
</svg>
GitHub
</a>
<span class="bottom-link-sep">·</span>
<button id="help-btn" class="bottom-link">Help</button>
<span class="bottom-link-sep">·</span>
<button id="about-btn" class="bottom-link">About</button>
</div>
<button id="focus-exit-btn" class="focus-exit-btn" title="Exit Focus Mode">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"></path>
</svg>
Exit focus
</button>
<div id="settings-modal" class="modal-overlay">
<div class="modal">
<div class="modal-header">
<h2>Settings</h2>
<button id="close-settings-btn" class="close-btn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</button>
</div>
<div class="modal-body">
<div class="setting-group">
<h3>Theme</h3>
<div class="theme-options">
<button class="theme-btn" data-theme-value="ultra-dark">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
<polygon points="3 3 4 5 6 6 4 7 3 9 2 7 0 6 2 5"></polygon>
</svg>
Ultra Dark
</button>
<button class="theme-btn" data-theme-value="dark">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
Dark
</button>
<button class="theme-btn" data-theme-value="light">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
Light
</button>
</div>
</div>
<div class="setting-group">
<h3>Accent Color</h3>
<div class="color-options" id="color-options">
<!-- Populated by JS -->
</div>
</div>
<div class="setting-group">
<h3>Features</h3>
<label class="feature-toggle" title="When disabled, Ctrl+F opens the native browser search">
<input type="checkbox" id="find-replace-toggle">
<div class="toggle-switch"></div>
<span>Enable Find & Replace (Experimental)</span>
</label>
<label class="feature-toggle" title="Show the Markdown Preview button in the toolbar">
<input type="checkbox" id="markdown-preview-toggle">
<div class="toggle-switch"></div>
<span>Enable Markdown Preview</span>
</label>
</div>
<div class="setting-group setting-group--last">
<h3>Data Export & Import</h3>
<label class="feature-toggle" title="Include theme, accent color, and feature settings in the export file">
<input type="checkbox" id="include-settings-toggle" checked>
<div class="toggle-switch"></div>
<span>Include app settings</span>
</label>
<div class="data-io-buttons">
<button id="export-btn" class="data-btn">
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
<polyline points="7 10 12 15 17 10"></polyline>
<line x1="12" y1="15" x2="12" y2="3"></line>
</svg>
Export
</button>
<button id="import-btn" class="data-btn">
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
<polyline points="17 8 12 3 7 8"></polyline>
<line x1="12" y1="3" x2="12" y2="15"></line>
</svg>
Import
</button>
<input type="file" id="import-file-input" accept=".json" style="display:none">
</div>
</div>
</div>
</div>
</div>
<div id="preview-modal" class="modal-overlay">
<div class="modal preview-modal-content">
<div class="modal-header">
<h2>Markdown Preview</h2>
<button id="close-preview-btn" class="close-btn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</button>
</div>
<div id="preview-content" class="markdown-body">
<!-- populated by JS -->
</div>
</div>
</div>
<div id="toast" class="toast">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#10b981" stroke-width="2" stroke-linecap="round"
stroke-linejoin="round">
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path>
<polyline points="22 4 12 14.01 9 11.01"></polyline>
</svg>
<span id="toast-message">Copied to clipboard!</span>
</div>
<div id="tab-context-menu" class="context-menu" style="display: none;">
<div class="menu-item" id="menu-rename">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path>
<path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path>
</svg>
Rename
</div>
<div class="menu-item" id="menu-duplicate">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
Duplicate
</div>
<div class="menu-item" id="menu-copy-contents">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
Copy contents
</div>
<div class="menu-item" id="menu-export-txt">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path>
<polyline points="14 2 14 8 20 8"></polyline>
<line x1="16" y1="13" x2="8" y2="13"></line>
<line x1="16" y1="17" x2="8" y2="17"></line>
</svg>
Export as .txt
</div>
<div class="menu-item menu-item-danger" id="menu-close">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
Close
</div>
</div>
<div id="help-modal" class="modal-overlay">
<div class="modal help-modal">
<div class="modal-header">
<h2>Help</h2>
<button id="close-help-btn" class="close-btn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</button>
</div>
<div class="help-body">
<div class="help-section">
<h3>Writing</h3>
<ul>
<li>Click anywhere in the editor and start typing — your work is saved automatically after a short pause.</li>
<li>The save indicator (top-right checkmark) confirms everything is stored.</li>
</ul>
</div>
<div class="help-section">
<h3>Tabs</h3>
<ul>
<li><strong>New tab</strong> — click the <strong>+</strong> button in the sidebar.</li>
<li><strong>Switch</strong> — click any tab name.</li>
<li><strong>Rename</strong> — double-click a tab name, type, then press Enter.</li>
<li><strong>Close</strong> — click the × on a tab (requires confirmation). You need at least two tabs for × to appear.</li>
<li><strong>Duplicate / Export as .txt / Close</strong> — right-click a tab to open the context menu.</li>
</ul>
</div>
<div class="help-section">
<h3>Undo</h3>
<ul>
<li>Press <kbd>Ctrl+Z</kbd> (or <kbd>Cmd+Z</kbd> on Mac) or click the undo button in the toolbar.</li>
<li>Each tab has its own undo history (up to 50 states). History resets when you reload the page.</li>
</ul>
</div>
<div class="help-section">
<h3>Find & Replace</h3>
<ul>
<li>First enable it in <strong>Settings → Features → Enable Find & Replace</strong>.</li>
<li>Once enabled, open it with the search button or <kbd>Ctrl+F</kbd>.</li>
<li>Use <strong>Prev / Next</strong> (or <kbd>Enter</kbd> / <kbd>Shift+Enter</kbd>) to navigate matches.</li>
<li><strong>Replace</strong> replaces the current match; <strong>All</strong> replaces every occurrence at once.</li>
</ul>
</div>
<div class="help-section">
<h3>Markdown Preview</h3>
<ul>
<li>Click the eye button in the toolbar to render the current tab as formatted Markdown.</li>
<li>Requires an internet connection on first load so the Markdown library can be cached.</li>
</ul>
</div>
<div class="help-section">
<h3>Focus Mode</h3>
<ul>
<li>Click the ⤢ icon in the toolbar to enter Focus Mode — hides the header, sidebar, and footer for distraction-free writing.</li>
<li>Press <kbd>Escape</kbd> or click <strong>Exit focus</strong> (top-right corner) to return to normal view.</li>
</ul>
</div>
<div class="help-section">
<h3>Copy & Clear</h3>
<ul>
<li><strong>Copy</strong> (clipboard button) — copies all text in the active tab to your clipboard.</li>
<li><strong>Clear</strong> (trash button) — erases all text in the active tab after confirmation.</li>
</ul>
</div>
<div class="help-section">
<h3>Settings</h3>
<ul>
<li>Click the gear icon to open Settings.</li>
<li>Choose between <strong>Dark</strong>, <strong>Ultra Dark</strong>, and <strong>Light</strong> themes.</li>
<li>Pick an accent color to personalize the interface.</li>
</ul>
</div>
<div class="help-section">
<h3>Export & Import</h3>
<ul>
<li>Open <strong>Settings</strong> and scroll to the <strong>Data</strong> section at the bottom.</li>
<li><strong>Export</strong> — downloads a <code>.json</code> backup of all your tabs to your device.</li>
<li><strong>Import</strong> — loads a backup file and replaces your current notes with its contents (a confirmation is shown first).</li>
<li>Check <strong>Include app settings</strong> to also save and restore your theme, accent color, and feature preferences.</li>
</ul>
</div>
<div class="help-section">
<h3>Keyboard Shortcuts</h3>
<div class="help-shortcuts">
<div class="help-shortcut-row"><kbd>Ctrl+Z</kbd><span>Undo</span></div>
<div class="help-shortcut-row"><kbd>Ctrl+F</kbd><span>Open Find & Replace (when enabled)</span></div>
<div class="help-shortcut-row"><kbd>Enter</kbd><span>Next match (in Find input)</span></div>
<div class="help-shortcut-row"><kbd>Shift+Enter</kbd><span>Previous match (in Find input)</span></div>
<div class="help-shortcut-row"><kbd>Escape</kbd><span>Exit Focus Mode</span></div>
</div>
</div>
</div>
</div>
</div>
<div id="welcome-modal" class="modal-overlay">
<div class="modal welcome-modal">
<div class="welcome-header">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="url(#welcome-gradient)" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<defs>
<linearGradient id="welcome-gradient" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" stop-color="#4CAF50" />
<stop offset="100%" stop-color="#818cf8" />
</linearGradient>
</defs>
<path d="M12 20h9"></path>
<path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>
</svg>
<div>
<h2 class="welcome-title">Welcome to Writelo</h2>
<p class="welcome-subtitle">Here's what you can do</p>
</div>
</div>
<div class="welcome-features">
<div class="welcome-feature">
<div class="welcome-feature-icon">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"></path>
<polyline points="17 21 17 13 7 13 7 21"></polyline>
</svg>
</div>
<div>
<p class="welcome-feature-title">Auto-saves as you type</p>
<p class="welcome-feature-desc">Everything is saved to your browser's local storage — no account or internet needed.</p>
<p class="welcome-feature-desc" style="color: #f43f5e; margin-top: 4px;">Note: Clearing your browsing history or site data will permanently delete all your notes from the app.</p>
</div>
</div>
<div class="welcome-feature">
<div class="welcome-feature-icon">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect>
<line x1="8" y1="21" x2="16" y2="21"></line>
<line x1="12" y1="17" x2="12" y2="21"></line>
</svg>
</div>
<div>
<p class="welcome-feature-title">Live sync across browser tabs</p>
<p class="welcome-feature-desc">Open Writelo in multiple tabs — your notes stay in sync automatically across all of them.</p>
</div>
</div>
<div class="welcome-feature">
<div class="welcome-feature-icon">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path>
<polyline points="14 2 14 8 20 8"></polyline>
</svg>
</div>
<div>
<p class="welcome-feature-title">Multiple tabs, one place</p>
<p class="welcome-feature-desc">Create as many named tabs as you need. Each one keeps its own undo history.</p>
</div>
</div>
<div class="welcome-feature">
<div class="welcome-feature-icon">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="11" cy="11" r="8"></circle>
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
</svg>
</div>
<div>
<p class="welcome-feature-title">Find & Replace, Markdown preview</p>
<p class="welcome-feature-desc">Enable Find & Replace in Settings. Preview your Markdown as formatted HTML anytime.</p>
</div>
</div>
</div>
<button id="close-welcome-btn" class="welcome-cta">Start writing</button>
</div>
</div>
<div id="about-modal" class="modal-overlay">
<div class="modal about-modal">
<div class="modal-header">
<h2>About Writelo</h2>
<button id="close-about-btn" class="close-btn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</button>
</div>
<div class="about-body">
<div class="about-brand">
<svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="url(#about-gradient)" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<defs>
<linearGradient id="about-gradient" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" stop-color="#4CAF50" />
<stop offset="100%" stop-color="#818cf8" />
</linearGradient>
</defs>
<path d="M12 20h9"></path>
<path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>
</svg>
<div>
<p class="about-name">Writelo</p>
<p class="about-tagline">Simple Text Editor</p>
<p class="about-version">v1.2.0</p>
</div>
</div>
<p class="about-description">
A fast, beautiful, fully offline text editor that runs entirely in your browser.
No account, no server, no installation — just open the file and start writing.
</p>
<div class="about-features">
<div class="about-feature-item">
<span class="about-feature-dot"></span>Auto-saves to localStorage as you type
</div>
<div class="about-feature-item">
<span class="about-feature-dot"></span>Multi-tab with left sidebar — scroll when you have many tabs
</div>
<div class="about-feature-item">
<span class="about-feature-dot"></span>Undo history per tab (up to 50 states)
</div>
<div class="about-feature-item">
<span class="about-feature-dot"></span>Markdown preview, Copy All, Find & Replace
</div>
<div class="about-feature-item">
<span class="about-feature-dot"></span>Live sync across multiple browser tabs
</div>
<div class="about-feature-item">
<span class="about-feature-dot"></span>Three themes & six accent colors — all data stays on your device
</div>
</div>
<div class="about-privacy">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path>
</svg>
All your notes stay on your device — nothing is ever sent to a server.
</div>
<a href="https://github.com/saneeshnp/writelo" target="_blank" rel="noopener noreferrer" class="about-github-link">
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 2C6.477 2 2 6.477 2 12c0 4.418 2.865 8.166 6.839 9.489.5.092.682-.217.682-.482 0-.237-.009-.868-.013-1.703-2.782.604-3.369-1.342-3.369-1.342-.454-1.154-1.11-1.462-1.11-1.462-.908-.62.069-.608.069-.608 1.003.07 1.531 1.03 1.531 1.03.892 1.529 2.341 1.087 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.11-4.555-4.943 0-1.091.39-1.984 1.029-2.683-.103-.253-.446-1.27.098-2.647 0 0 .84-.269 2.75 1.025A9.578 9.578 0 0 1 12 6.836a9.59 9.59 0 0 1 2.504.337c1.909-1.294 2.747-1.025 2.747-1.025.546 1.377.202 2.394.1 2.647.64.699 1.028 1.592 1.028 2.683 0 3.842-2.339 4.687-4.566 4.935.359.309.678.919.678 1.852 0 1.336-.012 2.415-.012 2.741 0 .267.18.578.688.48C19.138 20.163 22 16.418 22 12c0-5.523-4.477-10-10-10z"/>
</svg>
github.com/saneeshnp/writelo
</a>
</div>
</div>
</div>
<div id="focus-veil" class="focus-veil"></div>
<script src="app.js"></script>
</body>
</html>