Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
173 lines (161 loc) · 7.28 KB
/
Copy pathindex.html
File metadata and controls
173 lines (161 loc) · 7.28 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Organize your thoughts, with Easynotes your thoughts will live in your browser for when you need to find them or save them quickly." />
<title>Easynotes - Organize your thoughts</title>
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png" />
<link rel="icon" href="/favicon/favicon.ico" />
<link rel="manifest" href="/favicon/site.webmanifest" />
<link rel="canonical" href="https://easynotes.io">
<script>
(() => {
const saved = localStorage.getItem("easynotes-theme");
const prefersLight = window.matchMedia("(prefers-color-scheme: light)").matches;
const theme = saved === "dark" || saved === "light" ? saved : prefersLight ? "light" : "dark";
if (theme === "light") {
document.documentElement.setAttribute("data-theme", "light");
}
})();
</script>
<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=Roboto+Mono:wght@300;400;500;700&display=swap"
rel="stylesheet"
/>
</head>
<body>
<div class="app">
<header class="header">
<div class="logo">easynotes</div>
<div class="header-right">
<div class="settings-wrapper">
<button
class="header-action"
id="settingsButton"
type="button"
aria-label="Open settings"
aria-expanded="false"
aria-controls="settingsDropdown"
>
<svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="2" />
<path d="M21 12C21 13.8 19.16 13.02 18.47 14.68C17.78 16.34 19.64 17.09 18.36 18.36C17.09 19.64 16.34 17.78 14.68 18.47C13.02 19.16 13.8 21 12 21C10.2 21 10.98 19.16 9.32 18.47C7.66 17.78 6.91 19.64 5.64 18.36C4.36 17.09 6.22 16.34 5.53 14.68C4.84 13.02 3 13.8 3 12C3 10.2 4.84 10.98 5.53 9.32C6.22 7.66 4.36 6.91 5.64 5.64C6.91 4.36 7.66 6.22 9.32 5.53C10.98 4.84 10.2 3 12 3C13.8 3 13.02 4.84 14.68 5.53C16.34 6.22 17.09 4.36 18.36 5.64C19.64 6.91 17.78 7.66 18.47 9.32C19.16 10.98 21 10.2 21 12Z" />
</svg>
</button>
<div class="settings-dropdown" id="settingsDropdown" hidden>
<div class="settings-group">
<span class="settings-label">Theme</span>
<div class="theme-toggle" id="themeToggle" role="radiogroup" aria-label="Theme">
<button class="theme-toggle-btn" data-theme-value="dark" type="button" role="radio" aria-checked="false">Dark</button>
<button class="theme-toggle-btn" data-theme-value="light" type="button" role="radio" aria-checked="false">Light</button>
<button class="theme-toggle-btn" data-theme-value="system" type="button" role="radio" aria-checked="false">System</button>
</div>
</div>
</div>
</div>
</div>
</header>
<div class="toolbar" id="toolbar">
<button
class="toolbar-btn"
id="undoButton"
type="button"
aria-label="Undo (Ctrl+Z)"
title="Undo (Ctrl+Z)"
disabled
><span class="toolbar-btn-label toolbar-btn-history">↩</span></button>
<button
class="toolbar-btn"
id="redoButton"
type="button"
aria-label="Redo (Ctrl+Shift+Z)"
title="Redo (Ctrl+Shift+Z)"
disabled
><span class="toolbar-btn-label toolbar-btn-history">↪</span></button>
<span class="toolbar-separator"></span>
<button
class="toolbar-btn"
id="boldButton"
type="button"
aria-label="Bold (Ctrl+B)"
title="Bold (Ctrl+B)"
><span class="toolbar-btn-label toolbar-btn-bold">B</span></button>
<button
class="toolbar-btn"
id="italicButton"
type="button"
aria-label="Italic (Ctrl+I)"
title="Italic (Ctrl+I)"
><span class="toolbar-btn-label toolbar-btn-italic">I</span></button>
<button
class="toolbar-btn"
id="underlineButton"
type="button"
aria-label="Underline (Ctrl+U)"
title="Underline (Ctrl+U)"
><span class="toolbar-btn-label toolbar-btn-underline">U</span></button>
<span class="toolbar-separator"></span>
<button
class="toolbar-btn"
id="listButton"
type="button"
aria-label="Bulleted list (Ctrl+Shift+8)"
title="Bulleted list (Ctrl+Shift+8)"
><svg class="toolbar-btn-icon" aria-hidden="true" viewBox="0 0 24 24" fill="currentColor" width="16" height="16"><circle cx="4" cy="5.5" r="2"/><circle cx="4" cy="12" r="2"/><circle cx="4" cy="18.5" r="2"/><rect x="9" y="4.5" width="12" height="2" rx="1"/><rect x="9" y="11" width="12" height="2" rx="1"/><rect x="9" y="17.5" width="12" height="2" rx="1"/></svg></button>
<span class="toolbar-separator"></span>
<button
class="toolbar-btn"
id="clearButton"
type="button"
aria-label="Clear all"
title="Clear all"
><svg class="toolbar-btn-icon toolbar-btn-clear" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="16" height="16"><polyline points="3 6 5 6 21 6"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><path d="M10 11v6"/><path d="M14 11v6"/><path d="M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"/></svg></button>
</div>
<main class="main">
<div class="editor-wrapper">
<div
class="editor"
id="editor"
contenteditable="true"
data-placeholder="organize your thoughts..."
spellcheck="false"
role="textbox"
aria-multiline="true"
></div>
</div>
<div class="stats" id="stats">
<span id="wordCount">0 words</span>
<span class="stats-dot">·</span>
<span id="charCount">0 characters</span>
</div>
</main>
<footer class="footer">
<span class="footer-hint">
notes auto-save
</span>
</footer>
</div>
<script>
(() => {
const editor = document.getElementById("editor");
if (!editor) return;
const raw = localStorage.getItem("easynote");
if (raw === null) return;
try {
const data = JSON.parse(raw);
if (typeof data.content === "string" && data.content !== "") {
editor.innerHTML = data.content;
}
} catch {
localStorage.removeItem("easynote");
}
})();
</script>
<script type="module" src="/src/main.ts"></script>
</body>
</html>