-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
76 lines (72 loc) · 2.96 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>mdNotepad</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/marked.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dompurify/2.3.3/purify.min.js"></script>
</head>
<body>
<div class="notepad">
<div class="header">
<div class="app-title">mdNotepad</div>
</div>
<div class="content">
<div class="sidebar">
<div class="title">DOCUMENTS</div>
<select id="tagFilter">
<option value="">Filter by tag</option>
</select>
<ul id="documentList"></ul>
<div class="sidebar-buttons">
<button onclick="newNote()">new</button>
<input type="file" id="fileInput" accept=".txt,.md" style="display: none;"
onchange="handleFileUpload(event)">
<button onclick="document.getElementById('fileInput').click()">import</button>
<hr class="sidebar-divider">
<button onclick="openCheatSheet()">md cheat sheet</button>
</div>
</div>
<div class="main">
<div class="document-header">
<div id="currentDocTitle" class="document-title" onclick="editTitle()">No document selected</div>
<div>
<input type="text" id="tagInput" placeholder="Add tags">
<button id="saveTitleButton" style="display: none;">Save</button>
<button onclick="saveNote()">save</button>
<button onclick="exportNote()">export</button>
<button onclick="showDeleteModal()">delete</button>
</div>
</div>
<div id="tagDisplay"></div>
<div class="editor-container">
<textarea id="markdownEditor"></textarea>
<div id="previewPane"></div>
</div>
</div>
</div>
</div>
<div id="deleteModal" class="modal">
<div class="modal-content">
Are you sure you want to delete this note?
<div class="modal-buttons">
<button onclick="deleteNote()">Delete</button>
<button onclick="closeModal('deleteModal')">Cancel</button>
</div>
</div>
</div>
<div id="dropOverlay" class="drop-overlay">
Drop it here
</div>
<div id="cheatSheetModal" class="modal">
<div class="modal-content">
<h2>Markdown Cheat Sheet</h2>
<div id="cheatSheetContent"></div>
<button onclick="closeCheatSheet()">Close</button>
</div>
</div>
<script src="script.js"></script>
</body>
</html>