-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
237 lines (211 loc) · 11.5 KB
/
Copy pathindex.html
File metadata and controls
237 lines (211 loc) · 11.5 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
<!DOCTYPE html>
<html lang="en" data-theme="dark">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Nota — Your Notes</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<!-- ══════════════════════════════════════ TOP BAR ══ -->
<header class="topbar">
<div class="topbar-left">
<div class="logo">
<span class="logo-mark">N</span>
<span class="logo-text">nota</span>
</div>
</div>
<div class="topbar-center">
<div class="search-wrap">
<svg class="search-icon" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
<input type="text" id="searchInput" placeholder="Search notes…" autocomplete="off" />
<kbd class="search-kbd">/</kbd>
</div>
</div>
<div class="topbar-right">
<div class="filter-wrap" id="filterWrap">
<button class="btn-ghost" id="filterBtn">
<svg viewBox="0 0 24 24"><polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"/></svg>
Filter
<span class="filter-count hidden" id="filterCount">0</span>
</button>
<div class="dropdown" id="filterDropdown">
<div class="dropdown-section">Sort by</div>
<label class="dropdown-item"><input type="radio" name="sort" value="date" checked /> Newest First</label>
<label class="dropdown-item"><input type="radio" name="sort" value="title" /> Title A–Z</label>
<label class="dropdown-item"><input type="radio" name="sort" value="priority" /> Pinned First</label>
<div class="dropdown-divider"></div>
<div class="dropdown-section">Tags</div>
<label class="dropdown-item tag-filter" data-tag="Work"><span class="tag-dot" data-tag="Work"></span>Work</label>
<label class="dropdown-item tag-filter" data-tag="Study"><span class="tag-dot" data-tag="Study"></span>Study</label>
<label class="dropdown-item tag-filter" data-tag="Ideas"><span class="tag-dot" data-tag="Ideas"></span>Ideas</label>
<label class="dropdown-item tag-filter" data-tag="Personal"><span class="tag-dot" data-tag="Personal"></span>Personal</label>
</div>
</div>
<button class="btn-ghost" id="exportBtn" title="Export / Import">
<svg viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
</button>
<button class="btn-ghost" id="importBtn" title="Import JSON">
<svg viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" y1="3" x2="12" y2="15"/></svg>
</button>
<input type="file" id="importFile" accept=".json" class="hidden" />
<button class="btn-icon-round" id="themeToggle" title="Toggle theme">
<svg class="icon-sun" viewBox="0 0 24 24"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg>
<svg class="icon-moon" viewBox="0 0 24 24"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>
</button>
</div>
</header>
<!-- ══════════════════════════════════════ LAYOUT ══ -->
<div class="app-layout">
<!-- ── SIDEBAR ── -->
<aside class="sidebar" id="sidebar">
<div class="sidebar-inner">
<!-- Stats Dashboard -->
<section class="sidebar-section">
<h3 class="sidebar-heading">Overview</h3>
<div class="stats-grid">
<div class="stat-card">
<span class="stat-value" id="statTotal">0</span>
<span class="stat-label">Total Notes</span>
</div>
<div class="stat-card">
<span class="stat-value" id="statToday">0</span>
<span class="stat-label">Today</span>
</div>
<div class="stat-card">
<span class="stat-value" id="statPinned">0</span>
<span class="stat-label">Pinned</span>
</div>
<div class="stat-card">
<span class="stat-value" id="statLocked">0</span>
<span class="stat-label">Locked</span>
</div>
</div>
</section>
<!-- Tags -->
<section class="sidebar-section">
<h3 class="sidebar-heading">Tags</h3>
<div class="tag-list" id="tagList">
<button class="tag-pill active" data-tag="all">All</button>
<button class="tag-pill" data-tag="Work">Work</button>
<button class="tag-pill" data-tag="Study">Study</button>
<button class="tag-pill" data-tag="Ideas">Ideas</button>
<button class="tag-pill" data-tag="Personal">Personal</button>
</div>
</section>
<!-- Insights -->
<section class="sidebar-section">
<h3 class="sidebar-heading">Insights</h3>
<div class="insight-list" id="insightList">
<div class="insight-item">
<span class="insight-label">Most used tag</span>
<span class="insight-value" id="insightTopTag">—</span>
</div>
<div class="insight-item">
<span class="insight-label">Avg note length</span>
<span class="insight-value" id="insightAvgLen">0 words</span>
</div>
<div class="insight-item">
<span class="insight-label">This week</span>
<span class="insight-value" id="insightWeek">0 notes</span>
</div>
</div>
</section>
</div>
</aside>
<!-- ── MAIN NOTES GRID ── -->
<main class="notes-area" id="notesArea">
<div class="notes-toolbar">
<span class="notes-count" id="notesCount">0 notes</span>
<div class="view-toggle">
<button class="view-btn active" id="viewGrid" title="Grid view">
<svg viewBox="0 0 24 24"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/></svg>
</button>
<button class="view-btn" id="viewList" title="List view">
<svg viewBox="0 0 24 24"><line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/></svg>
</button>
</div>
</div>
<div class="notes-grid" id="notesGrid">
<!-- Notes rendered here by JS -->
</div>
<div class="empty-state hidden" id="emptyState">
<div class="empty-icon">✦</div>
<p class="empty-title">No notes yet</p>
<p class="empty-sub">Click the + button to create your first note</p>
</div>
</main>
</div>
<!-- ══════════════════════════════════════ FAB ══ -->
<button class="fab" id="newNoteBtn" title="New Note">
<svg viewBox="0 0 24 24"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
</button>
<!-- ══════════════════════════════════════ EDITOR OVERLAY ══ -->
<div class="overlay hidden" id="overlay"></div>
<div class="editor-panel hidden" id="editorPanel">
<div class="editor-header">
<h2 class="editor-title" id="editorTitle">New Note</h2>
<div class="editor-actions">
<button class="btn-ghost small" id="editorPreviewToggle" title="Toggle preview">
<svg viewBox="0 0 24 24"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>
Preview
</button>
<button class="btn-ghost small" id="editorLockToggle" title="Lock note">
<svg class="icon-lock" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>
</button>
<button class="btn-ghost small" id="editorPinToggle" title="Pin note">
<svg viewBox="0 0 24 24"><line x1="12" y1="17" x2="12" y2="22"/><path d="M5 17H19V13L17 7H7L5 13V17Z"/><line x1="12" y1="7" x2="12" y2="3"/></svg>
</button>
<button class="btn-close" id="editorClose">
<svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
</button>
</div>
</div>
<div class="editor-body">
<input type="text" id="noteTitle" class="note-title-input" placeholder="Note title…" />
<div class="tag-selector">
<button class="tag-btn" data-tag="Work">Work</button>
<button class="tag-btn" data-tag="Study">Study</button>
<button class="tag-btn" data-tag="Ideas">Ideas</button>
<button class="tag-btn" data-tag="Personal">Personal</button>
</div>
<div class="markdown-toolbar">
<button class="md-btn" data-md="**" title="Bold"><b>B</b></button>
<button class="md-btn" data-md="*" title="Italic"><i>I</i></button>
<button class="md-btn" data-md="# " title="Heading" data-prefix="true">H</button>
<button class="md-btn" data-md="- " title="List" data-prefix="true">≡</button>
<button class="md-btn" data-md="`" title="Code"><span style="font-family:monospace">`</span></button>
</div>
<div class="editor-content-wrap">
<textarea id="noteContent" class="note-content-input" placeholder="Start writing… supports **bold**, *italic*, # headings, - lists"></textarea>
<div class="note-preview hidden" id="notePreview"></div>
</div>
<div class="editor-footer">
<span class="editor-meta" id="editorMeta"></span>
<div class="editor-footer-actions">
<button class="btn-danger" id="deleteNoteBtn">Delete</button>
<button class="btn-primary" id="saveNoteBtn">Save Note</button>
</div>
</div>
</div>
</div>
<!-- ══════════════════════════════════════ CONFIRM DIALOG ══ -->
<div class="dialog-overlay hidden" id="dialogOverlay">
<div class="dialog">
<div class="dialog-icon">⚠</div>
<h3 class="dialog-title">Delete Note?</h3>
<p class="dialog-msg">This action cannot be undone.</p>
<div class="dialog-actions">
<button class="btn-ghost" id="dialogCancel">Cancel</button>
<button class="btn-danger" id="dialogConfirm">Delete</button>
</div>
</div>
</div>
<!-- ══════════════════════════════════════ TOAST ══ -->
<div class="toast-wrap" id="toastWrap"></div>
<script src="script.js"></script>
</body>
</html>