-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
188 lines (188 loc) · 16.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8">
<title>MMVI FlowNotes</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js" crossorigin="anonymous" defer></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/marked.umd.min.js" crossorigin="anonymous" defer></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/index.umd.min.js" crossorigin="anonymous" defer></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js-yaml.min.js" integrity="sha256-Rdw90D3AegZwWiwpibjH9wkBPwS9U4bjJ51ORH8H69c=" crossorigin="anonymous" defer></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/picker.min.js" defer></script>
<script type="text/javascript" src="script.js" defer></script>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="manifest" href="manifest.json">
</head>
<body>
<div id="panels">
<div id="panel-left" class="sidepanel">
<div id="tabbar-left" class="tabbar">
<div id="label-recent" class="tablabel noselect" tabindex="-1">Recent</div>
<div id="label-search" class="tablabel noselect" tabindex="-1">Search</div>
<div id="label-pinned" class="tablabel noselect" tabindex="-1">Pinned</div>
</div>
<div id="scrolled" style="display: none;"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path transform="scale(1, -1) translate(0, -24)" d="M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z"/><path d="M0 0h24v24H0z" fill="none"/></svg></div>
<div id="tab-recent" class="tab scrolly" style="display: none;"></div>
<div id="tab-search" class="tab scrolly" style="display: none;">
<div id="search-box">
<input type="search" id="search-input" class="search-controls" placeholder="Search...">
<input type="button" id="search-button" class="search-controls" value="Go">
</div>
<div class="mask">
<div id="search-results">
<div class="tips">
<h1>Search tips</h1>
<p>Simply type your term(s) in any order to do a basic search of the full text of all your notes.</p>
<p>Start your search to a forward slash ("/") to do an advanced search using a Regular Expression. To learn Regular Expressions we recommend <a href="https://www.regular-expressions.info/quickstart.html">www.regular-expressions.info</a>.</p>
<p>Start your search with a hash ("#") followed by a number to quickly go to a specific note ID. The ID of the current note is always shown in the address bar of your browser.</p>
<p>Start your search with a hash followed by letters to search for a hashtag used in your notes. This is case-insensitive but otherwise needs to match the used hashtag exactly, so searching for <code>#recipe</code> will not find notes with hashtag <code>#recipes</code>.</p>
<p>Start your search with a plus ("+") to search specifically in the titles or filenames of uploaded files. Just a plus by itself gives you a list of all notes that have linked files.</p>
</div>
</div>
</div>
</div>
<div id="tab-pinned" class="tab scrolly" style="display: none;"></div>
</div>
<div id="buttons-left" class="panel-buttons">
<div id="button-panel-left-hide" class="button-active" title="Hide left panel">
<svg class="button-svg" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 512 512"><rect y="0" x="0" height="512" width="512" stroke="white" fill="none" style="stroke-width: 100px;"/><rect y="0" x="0" height="512" width="200" stroke="white" fill="white"/></svg>
</div>
<div id="button-mode-edit" class="button-mode button-active" title="Switch to edit mode">
<svg class="button-svg" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 3000 3000" stroke="white" fill="white"><g transform="rotate(-90 1500 1500)"><path d="M2265 2921 c-16 -10 -93 -82 -170 -160 l-140 -141 335 -335 335 -335 153 153 c105 105 155 162 161 185 20 71 7 89 -267 366 -142 142 -271 264 -289 272 -44 19 -82 17 -118 -5z"/><path d="M1072 1737 l-763 -764 332 -331 c182 -183 335 -332 338 -332 3 0 350 344 771 765 l765 765 -330 330 c-181 181 -334 330 -340 330 -6 0 -353 -343 -773 -763z"/><path d="M206 848 c-2 -7 -12 -60 -20 -118 -18 -112 -42 -252 -76 -445 -40 -223 -39 -215 -21 -214 9 0 36 4 61 9 46 9 203 36 395 70 61 11 157 27 215 36 58 9 107 19 110 21 5 5 -642 653 -653 653 -4 0 -9 -6 -11 -12z"/></g></svg>
</div>
<div id="button-mode-view" class="button-mode" title="Switch to view mode">
<svg class="button-svg" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22"><g transform="matrix(.02146 0 0 .02146 1 1)" fill="white"><path d="m466.07 161.53c-205.6 0-382.8 121.2-464.2 296.1-2.5 5.3-2.5 11.5 0 16.9 81.4 174.9 258.6 296.1 464.2 296.1 205.6 0 382.8-121.2 464.2-296.1 2.5-5.3 2.5-11.5 0-16.9-81.4-174.9-258.6-296.1-464.2-296.1m0 514.7c-116.1 0-210.1-94.1-210.1-210.1 0-116.1 94.1-210.1 210.1-210.1 116.1 0 210.1 94.1 210.1 210.1 0 116-94.1 210.1-210.1 210.1"/><circle cx="466.08" cy="466.02" r="134.5"/></g></svg>
</div>
<div id="button-note-add" title="Add new note">
<svg class="button-svg" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 32 32" stroke="white" fill="white"><path d="m 12,12 -10,0 0,8 10,0 0,10 8,0 0,-10 10,0 0,-8 -10,0 0,-10 -8,0 z" /></svg>
</div>
<div id="button-note-pin" title="Pin note">
<svg class="button-svg" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="4 3 18 19" stroke="white" fill="white"><path d="M16.729,4.271c-0.389-0.391-1.021-0.393-1.414-0.004c-0.104,0.104-0.176,0.227-0.225,0.355 c-0.832,1.736-1.748,2.715-2.904,3.293C10.889,8.555,9.4,9,7,9C6.87,9,6.74,9.025,6.618,9.076C6.373,9.178,6.179,9.373,6.077,9.617 c-0.101,0.244-0.101,0.52,0,0.764c0.051,0.123,0.124,0.234,0.217,0.326l3.243,3.243L5,20l6.05-4.537l3.242,3.242 c0.092,0.094,0.203,0.166,0.326,0.217C14.74,18.973,14.87,19,15,19s0.26-0.027,0.382-0.078c0.245-0.102,0.44-0.295,0.541-0.541 C15.974,18.26,16,18.129,16,18c0-2.4,0.444-3.889,1.083-5.166c0.577-1.156,1.556-2.072,3.293-2.904 c0.129-0.049,0.251-0.121,0.354-0.225c0.389-0.393,0.387-1.025-0.004-1.414L16.729,4.271z"/></svg>
</div>
<div id="button-note-mail" title="Mail note">
<svg class="button-svg" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" fill="white"><path d="M8,10c-0.266,0-0.5-0.094-1-0.336L0,6v7c0,0.55,0.45,1,1,1h14c0.55,0,1-0.45,1-1V6L9,9.664C8.5,9.906,8.266,10,8,10z M15,2 H1C0.45,2,0,2.45,0,3v0.758l8,4.205l8-4.205V3C16,2.45,15.55,2,15,2z"/></svg>
<!-- Icon license: CC-SA 3.0 Unported / Created by Timothy Miller -->
</div>
<div id="button-note-del" title="Delete note">
<svg class="button-svg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="2 2 20 20" fill="white"><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/></svg>
<!-- Icon license: Apache License 2.0 / Created by Google -->
</div>
<!-- <div id="button-note-print" title="Print note"> -->
<!-- <svg class="button-svg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="2 2 20 20" fill="white"><path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"/><path d="M0 0h24v24H0z" fill="none"/></svg> -->
<!-- Icon license: Apache License 2.0 / Created by Google -->
<!-- </div> -->
<div id="button-fullscreen" title="Go fullscreen">
<svg class="button-svg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="3 3 18 18" fill="white"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg>
<!-- Icon license: Apache License 2.0 / Created by Google -->
</div>
<div id="button-popout" title="Popout note">
<svg class="button-svg" xmlns="http://www.w3.org/2000/svg" height="24px" width="24px" viewBox="0 0 24 24" fill="white"><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/></svg>
<!-- Icon license: Apache License 2.0 / Created by Google -->
</div>
<div id="button-help" title="Help">
<svg class="button-svg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 1000 1000" fill="white"><path d="M500,10C229.8,10,10,229.8,10,500s219.8,490,490,490c270.2,0,490-219.8,490-490C990,229.8,770.2,10,500,10z M540.9,813.6c-12.9,11.5-27.8,17.2-44.8,17.2c-17.5,0-32.8-5.7-45.8-17s-19.6-27.2-19.6-47.6c0-18.1,6.3-33.3,18.9-45.6c12.6-12.3,28.1-18.5,46.5-18.5c18.1,0,33.3,6.2,45.6,18.5c12.3,12.3,18.5,27.5,18.5,45.6C560.3,786.3,553.8,802.1,540.9,813.6z M701.7,415c-9.9,18.4-21.7,34.2-35.3,47.6c-13.6,13.3-38.1,35.8-73.4,67.4c-9.8,8.9-17.6,16.7-23.5,23.5c-5.9,6.7-10.3,12.9-13.1,18.5c-2.9,5.6-5.1,11.2-6.7,16.8c-1.6,5.6-3.9,15.4-7.1,29.5c-5.5,29.8-22.5,44.8-51.2,44.8c-14.9,0-27.5-4.9-37.7-14.6c-10.2-9.8-15.3-24.3-15.3-43.5c0-24.1,3.7-45,11.2-62.6c7.5-17.6,17.4-33.1,29.7-46.5c12.3-13.3,29-29.2,49.9-47.6c18.4-16.1,31.6-28.2,39.8-36.4s15.1-17.3,20.7-27.3c5.6-10,8.4-20.9,8.4-32.7c0-23-8.5-42.3-25.6-58.1c-17.1-15.8-39.1-23.7-66.1-23.7c-31.6,0-54.8,8-69.7,23.9c-14.9,15.9-27.5,39.4-37.9,70.4c-9.8,32.4-28.3,48.6-55.5,48.6c-16.1,0-29.6-5.7-40.7-17c-11-11.3-16.6-23.6-16.6-36.8c0-27.3,8.8-54.9,26.3-82.9c17.5-28,43-51.2,76.6-69.5c33.6-18.4,72.7-27.5,117.5-27.5c41.6,0,78.3,7.7,110.2,23c31.9,15.4,56.5,36.2,73.8,62.6c17.4,26.4,26,55.1,26,86.1C716.5,375.2,711.6,396.6,701.7,415z"/></svg>
</div>
<div id="button-settings" title="Settings">
<svg class="button-svg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="1 1 21 21" fill="white">
<path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"/>
</svg>
<!-- Icon license: Apache License 2.0 / Created by Google -->
</div>
</div>
<div id="panel-main">
<textarea id="input" autocomplete="off" spellcheck="false"></textarea>
<div id="tags" style="display: none;"></div>
<div id="render" style="display: none;"></div>
<div id="compare" style="display: none;">
<div id="compare-from"></div>
<div id="compare-to"></div>
</div>
<div id="stats" style="display: none;"></div>
<div id="link" style="display: none;"></div>
<div id="snap" style="display: none;">
<div>
<div>Showing snapshot from</div>
<div id="snapdate"></div>
</div>
<div>
<input id="button-snap-compare" class="modal-button-small" type="button" value="Compare">
<input id="button-snap-restore" class="modal-button-small" type="button" value="Restore">
<input id="button-snap-close" class="modal-button-small" type="button" value="Close">
</div>
</div>
</div>
<div id="buttons-right" class="panel-buttons">
<div id="button-panel-right-hide" title="Show right panel">
<svg class="button-svg" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 512 512" style="transform: scale(-1,1)"><rect y="0" x="0" height="512" width="512" stroke="white" fill="none" style="stroke-width: 100px;"/><rect y="0" x="0" height="512" width="200" stroke="white" fill="white"/></svg>
</div>
<div id="button-links" class="button-mode" title="Show links">
<svg class="button-svg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="white"><path d="M0 0h24v24H0z" fill="none"/><path d="M22 12l-4 4-1.41-1.41L18.17 13h-5.23c-.34 3.1-2.26 5.72-4.94 7.05C7.96 21.69 6.64 23 5 23c-1.66 0-3-1.34-3-3s1.34-3 3-3c.95 0 1.78.45 2.33 1.14 1.9-1.03 3.26-2.91 3.58-5.14h-3.1C7.4 14.16 6.3 15 5 15c-1.66 0-3-1.34-3-3s1.34-3 3-3c1.3 0 2.4.84 2.82 2h3.1c-.32-2.23-1.69-4.1-3.59-5.14C6.78 6.55 5.95 7 5 7 3.34 7 2 5.66 2 4s1.34-3 3-3c1.64 0 2.96 1.31 2.99 2.95 2.68 1.33 4.6 3.95 4.94 7.05h5.23l-1.58-1.59L18 8l4 4z"/></svg>
</div>
<div id="button-snaps" class="button-mode" title="Snapshots">
<svg class="button-svg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="2 2 20 20" fill="white"><path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/></svg>
<!-- Icon license: Apache License 2.0 / Created by Google -->
</div>
<div id="button-toc" class="button-mode" title="Table of contents">
<svg class="button-svg" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="white"><rect width="20" height="3" x="2" y="3" /><rect width="16" height="3" x="6" y="8" /><rect width="12" height="3" x="10" y="13" /><rect width="16" height="3" x="6" y="18" /></svg>
</div>
<div id="button-uploads" class="button-mode" title="File uploads">
<svg class="button-svg" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="1 1 22 22" fill="white"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11zM8 15.01l1.41 1.41L11 14.84V19h2v-4.16l1.59 1.59L16 15.01 12.01 11z"/></svg>
<!-- Icon license: Apache License 2.0 / Created by Google -->
</div>
<div id="button-export" title="Export functions">
<svg class="button-svg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="1 1 22 22" fill="white"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M22 12c0-5.52-4.48-10-10-10S2 6.48 2 12s4.48 10 10 10 10-4.48 10-10zm-7-5.5l3.5 3.5-3.5 3.5V11h-4V9h4V6.5zm-6 11L5.5 14 9 10.5V13h4v2H9v2.5z"/></svg>
<!-- Icon license: Apache License 2.0 / Created by Google -->
</div>
</div>
<div id="panel-right" class="sidepanel">
<div id="tab-right" class="tab scrolly"></div>
</div>
</div>
<div id="modal-overlay"></div>
<div id="update" style="display: none;">
<div>A new version of FlowNotes is available</div>
<div><input id="button-update-now" class="modal-button-small" type="button" value="Update now"></div>
</div>
<div id="status" class="nointeraction">Loading...</div>
<div id="copied" class="nointeraction">copied</div>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('sw.js').then(sw => {
if (sw.installing) console.log('Service worker is installing');
if (sw.active) console.log('Service worker is active');
if (sw.waiting) {
console.log('Updated service worker is waiting');
window.newsw = sw.waiting;
if (navigator.serviceWorker.controller) document.getElementById('update').style = '';
}
sw.addEventListener('updatefound', () => {
console.log('Updated service worker is available');
window.newsw = sw.installing;
newsw.addEventListener('statechange', () => {
console.log('Updated service worker has state: ' + newsw.state);
if (newsw.state == 'installed' && navigator.serviceWorker.controller) document.getElementById('update').style = '';
});
});
});
navigator.serviceWorker.addEventListener('controllerchange', () => {
console.log('New service worker is now controlling this tab');
if (!app.changed) window.location.reload();
});
navigator.serviceWorker.addEventListener('message', (evt) => {
console.log('Received message from service worker:', evt.data);
if (evt.data.action == 'reload') window.location.reload();
});
document.getElementById('button-update-now').addEventListener('click', () => {
newsw.postMessage({ action: 'skipWaiting' });
});
}
document.addEventListener('keydown', (evt) => {
if ((evt.key == 'F5') && navigator.serviceWorker.controller) {
navigator.serviceWorker.controller.postMessage({ action: 'refresh' });
evt.preventDefault();
}
});
</script>
</body>
</html>