margins 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +225 -0
- package/bin/margins.js +107 -0
- package/lib/browser.js +44 -0
- package/lib/cli.js +86 -0
- package/lib/files.js +194 -0
- package/lib/links.js +314 -0
- package/lib/paths.js +159 -0
- package/lib/search.js +117 -0
- package/lib/security.js +89 -0
- package/lib/tree.js +126 -0
- package/package.json +51 -0
- package/public/app.js +1222 -0
- package/public/favicon.svg +1 -0
- package/public/index.html +119 -0
- package/public/style.css +781 -0
- package/server.js +325 -0
package/public/style.css
ADDED
|
@@ -0,0 +1,781 @@
|
|
|
1
|
+
/* margins -- a reading surface first, an editor second. */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--bg: #ffffff;
|
|
5
|
+
--bg-subtle: #f6f8fa;
|
|
6
|
+
--bg-hover: #eef1f4;
|
|
7
|
+
--bg-active: #ddf4ff;
|
|
8
|
+
--fg: #1f2328;
|
|
9
|
+
--fg-muted: #59636e;
|
|
10
|
+
--fg-faint: #818b98;
|
|
11
|
+
--border: #d1d9e0;
|
|
12
|
+
--border-muted: #e5e9ed;
|
|
13
|
+
--accent: #0969da;
|
|
14
|
+
--accent-fg: #ffffff;
|
|
15
|
+
--missing: #bc4c00;
|
|
16
|
+
--mark: #fff8c5;
|
|
17
|
+
--code-bg: #f6f8fa;
|
|
18
|
+
--shadow: 0 12px 32px rgba(31, 35, 40, 0.18);
|
|
19
|
+
--sidebar: 272px;
|
|
20
|
+
--context: 232px;
|
|
21
|
+
--topbar: 48px;
|
|
22
|
+
--font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
|
|
23
|
+
--mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
24
|
+
color-scheme: light;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@media (prefers-color-scheme: dark) {
|
|
28
|
+
:root {
|
|
29
|
+
--bg: #0d1117;
|
|
30
|
+
--bg-subtle: #151b23;
|
|
31
|
+
--bg-hover: #1f2630;
|
|
32
|
+
--bg-active: #122d4f;
|
|
33
|
+
--fg: #e6edf3;
|
|
34
|
+
--fg-muted: #9198a1;
|
|
35
|
+
--fg-faint: #6e7681;
|
|
36
|
+
--border: #3d444d;
|
|
37
|
+
--border-muted: #262c34;
|
|
38
|
+
--accent: #4493f8;
|
|
39
|
+
--accent-fg: #0d1117;
|
|
40
|
+
--missing: #f0883e;
|
|
41
|
+
--mark: #6c5a1a;
|
|
42
|
+
--code-bg: #151b23;
|
|
43
|
+
--shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
|
|
44
|
+
color-scheme: dark;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
* { box-sizing: border-box; }
|
|
49
|
+
|
|
50
|
+
html, body {
|
|
51
|
+
margin: 0;
|
|
52
|
+
height: 100%;
|
|
53
|
+
background: var(--bg);
|
|
54
|
+
color: var(--fg);
|
|
55
|
+
font: 14px/1.5 var(--font);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.hidden { display: none !important; }
|
|
59
|
+
|
|
60
|
+
button { font: inherit; color: inherit; }
|
|
61
|
+
|
|
62
|
+
kbd {
|
|
63
|
+
display: inline-block;
|
|
64
|
+
padding: 0 5px;
|
|
65
|
+
font: 11px/18px var(--mono);
|
|
66
|
+
color: var(--fg-muted);
|
|
67
|
+
background: var(--bg-subtle);
|
|
68
|
+
border: 1px solid var(--border);
|
|
69
|
+
border-bottom-width: 2px;
|
|
70
|
+
border-radius: 4px;
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:focus-visible {
|
|
75
|
+
outline: 2px solid var(--accent);
|
|
76
|
+
outline-offset: 1px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* --- the bar across the top ------------------------------------------------ */
|
|
80
|
+
|
|
81
|
+
.topbar {
|
|
82
|
+
position: fixed;
|
|
83
|
+
inset: 0 0 auto 0;
|
|
84
|
+
height: var(--topbar);
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: space-between;
|
|
88
|
+
gap: 12px;
|
|
89
|
+
padding: 0 12px;
|
|
90
|
+
background: var(--bg-subtle);
|
|
91
|
+
border-bottom: 1px solid var(--border);
|
|
92
|
+
z-index: 10;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.brand {
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
gap: 10px;
|
|
99
|
+
min-width: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.wordmark {
|
|
103
|
+
font-weight: 600;
|
|
104
|
+
letter-spacing: -0.01em;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.root-name {
|
|
108
|
+
color: var(--fg-muted);
|
|
109
|
+
font: 12px var(--mono);
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
text-overflow: ellipsis;
|
|
112
|
+
white-space: nowrap;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.top-actions {
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
gap: 8px;
|
|
119
|
+
flex-shrink: 0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.icon-button,
|
|
123
|
+
.pill,
|
|
124
|
+
.button,
|
|
125
|
+
.text-button {
|
|
126
|
+
cursor: pointer;
|
|
127
|
+
border-radius: 6px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.icon-button {
|
|
131
|
+
display: inline-flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
justify-content: center;
|
|
134
|
+
width: 30px;
|
|
135
|
+
height: 30px;
|
|
136
|
+
padding: 0;
|
|
137
|
+
background: transparent;
|
|
138
|
+
border: 1px solid transparent;
|
|
139
|
+
color: var(--fg-muted);
|
|
140
|
+
font-weight: 600;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.icon-button:hover { background: var(--bg-hover); color: var(--fg); }
|
|
144
|
+
|
|
145
|
+
.pill {
|
|
146
|
+
display: inline-flex;
|
|
147
|
+
align-items: center;
|
|
148
|
+
gap: 8px;
|
|
149
|
+
height: 30px;
|
|
150
|
+
padding: 0 8px 0 10px;
|
|
151
|
+
background: var(--bg);
|
|
152
|
+
border: 1px solid var(--border);
|
|
153
|
+
color: var(--fg-muted);
|
|
154
|
+
font-size: 13px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.pill:hover { color: var(--fg); border-color: var(--fg-faint); }
|
|
158
|
+
|
|
159
|
+
.button {
|
|
160
|
+
height: 28px;
|
|
161
|
+
padding: 0 12px;
|
|
162
|
+
background: var(--bg-subtle);
|
|
163
|
+
border: 1px solid var(--border);
|
|
164
|
+
font-size: 13px;
|
|
165
|
+
font-weight: 500;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.button:hover { background: var(--bg-hover); }
|
|
169
|
+
.button:disabled { opacity: 0.5; cursor: default; }
|
|
170
|
+
|
|
171
|
+
.button.primary {
|
|
172
|
+
background: var(--accent);
|
|
173
|
+
border-color: var(--accent);
|
|
174
|
+
color: var(--accent-fg);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.button.primary:hover { filter: brightness(1.08); background: var(--accent); }
|
|
178
|
+
|
|
179
|
+
.text-button {
|
|
180
|
+
padding: 2px 6px;
|
|
181
|
+
background: none;
|
|
182
|
+
border: 0;
|
|
183
|
+
color: var(--accent);
|
|
184
|
+
font-size: 12px;
|
|
185
|
+
font-weight: 600;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.text-button:hover { background: var(--bg-hover); }
|
|
189
|
+
|
|
190
|
+
/* --- layout ------------------------------------------------------------------ */
|
|
191
|
+
|
|
192
|
+
.layout {
|
|
193
|
+
position: fixed;
|
|
194
|
+
inset: var(--topbar) 0 0 0;
|
|
195
|
+
display: flex;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.sidebar {
|
|
199
|
+
width: var(--sidebar);
|
|
200
|
+
flex-shrink: 0;
|
|
201
|
+
display: flex;
|
|
202
|
+
flex-direction: column;
|
|
203
|
+
border-right: 1px solid var(--border);
|
|
204
|
+
background: var(--bg);
|
|
205
|
+
overflow: hidden;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.sidebar-hidden .sidebar { display: none; }
|
|
209
|
+
|
|
210
|
+
.sidebar-head {
|
|
211
|
+
display: flex;
|
|
212
|
+
align-items: center;
|
|
213
|
+
justify-content: space-between;
|
|
214
|
+
padding: 10px 12px 6px 16px;
|
|
215
|
+
font-size: 11px;
|
|
216
|
+
font-weight: 600;
|
|
217
|
+
letter-spacing: 0.05em;
|
|
218
|
+
text-transform: uppercase;
|
|
219
|
+
color: var(--fg-muted);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.main {
|
|
223
|
+
flex: 1;
|
|
224
|
+
min-width: 0;
|
|
225
|
+
overflow-y: auto;
|
|
226
|
+
display: flex;
|
|
227
|
+
flex-direction: column;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.context {
|
|
231
|
+
width: var(--context);
|
|
232
|
+
flex-shrink: 0;
|
|
233
|
+
overflow-y: auto;
|
|
234
|
+
padding: 20px 16px;
|
|
235
|
+
border-left: 1px solid var(--border-muted);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/* --- the tree ---------------------------------------------------------------- */
|
|
239
|
+
|
|
240
|
+
.tree {
|
|
241
|
+
list-style: none;
|
|
242
|
+
margin: 0;
|
|
243
|
+
padding: 0 8px 16px;
|
|
244
|
+
overflow-y: auto;
|
|
245
|
+
flex: 1;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.tree ul { list-style: none; margin: 0; padding: 0; }
|
|
249
|
+
|
|
250
|
+
.tree-row {
|
|
251
|
+
display: flex;
|
|
252
|
+
align-items: center;
|
|
253
|
+
gap: 6px;
|
|
254
|
+
width: 100%;
|
|
255
|
+
padding: 3px 8px 3px calc(8px + var(--depth, 0) * 14px);
|
|
256
|
+
border: 0;
|
|
257
|
+
border-radius: 6px;
|
|
258
|
+
background: none;
|
|
259
|
+
color: var(--fg);
|
|
260
|
+
font-size: 13px;
|
|
261
|
+
text-align: left;
|
|
262
|
+
text-decoration: none;
|
|
263
|
+
cursor: pointer;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.tree-row:hover { background: var(--bg-hover); }
|
|
267
|
+
|
|
268
|
+
.tree-active,
|
|
269
|
+
.tree-active:hover {
|
|
270
|
+
background: var(--bg-active);
|
|
271
|
+
font-weight: 600;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.tree-icon {
|
|
275
|
+
width: 12px;
|
|
276
|
+
flex-shrink: 0;
|
|
277
|
+
color: var(--fg-faint);
|
|
278
|
+
font-size: 11px;
|
|
279
|
+
text-align: center;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.tree-name {
|
|
283
|
+
overflow: hidden;
|
|
284
|
+
text-overflow: ellipsis;
|
|
285
|
+
white-space: nowrap;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/* Non-markdown files are there to be found, not to compete with the notes. */
|
|
289
|
+
.tree-file .tree-name { color: var(--fg-muted); }
|
|
290
|
+
|
|
291
|
+
.tree-note {
|
|
292
|
+
margin: 0;
|
|
293
|
+
padding: 8px 16px;
|
|
294
|
+
font-size: 12px;
|
|
295
|
+
color: var(--fg-muted);
|
|
296
|
+
border-top: 1px solid var(--border-muted);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/* --- the file bar ------------------------------------------------------------- */
|
|
300
|
+
|
|
301
|
+
.doc-bar {
|
|
302
|
+
position: sticky;
|
|
303
|
+
top: 0;
|
|
304
|
+
display: flex;
|
|
305
|
+
align-items: center;
|
|
306
|
+
justify-content: space-between;
|
|
307
|
+
gap: 12px;
|
|
308
|
+
padding: 8px 24px;
|
|
309
|
+
background: var(--bg);
|
|
310
|
+
border-bottom: 1px solid var(--border-muted);
|
|
311
|
+
z-index: 5;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.breadcrumbs {
|
|
315
|
+
display: flex;
|
|
316
|
+
align-items: center;
|
|
317
|
+
flex-wrap: wrap;
|
|
318
|
+
gap: 2px 6px;
|
|
319
|
+
min-width: 0;
|
|
320
|
+
font-size: 13px;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.breadcrumbs a { color: var(--accent); text-decoration: none; }
|
|
324
|
+
.breadcrumbs a:hover { text-decoration: underline; }
|
|
325
|
+
.crumb-sep { color: var(--fg-faint); }
|
|
326
|
+
.crumb-current { font-weight: 600; overflow-wrap: anywhere; }
|
|
327
|
+
|
|
328
|
+
.doc-actions {
|
|
329
|
+
display: flex;
|
|
330
|
+
align-items: center;
|
|
331
|
+
gap: 8px;
|
|
332
|
+
flex-shrink: 0;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.save-state {
|
|
336
|
+
font-size: 12px;
|
|
337
|
+
color: var(--fg-muted);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.banner {
|
|
341
|
+
display: flex;
|
|
342
|
+
align-items: center;
|
|
343
|
+
justify-content: space-between;
|
|
344
|
+
flex-wrap: wrap;
|
|
345
|
+
gap: 8px 16px;
|
|
346
|
+
margin: 12px 24px 0;
|
|
347
|
+
padding: 10px 14px;
|
|
348
|
+
border: 1px solid var(--missing);
|
|
349
|
+
border-radius: 6px;
|
|
350
|
+
background: var(--bg-subtle);
|
|
351
|
+
font-size: 13px;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.banner-actions { display: flex; gap: 8px; }
|
|
355
|
+
|
|
356
|
+
/* --- reading ------------------------------------------------------------------ */
|
|
357
|
+
|
|
358
|
+
.viewer {
|
|
359
|
+
flex: 1;
|
|
360
|
+
padding: 24px 32px 64px;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.markdown-body {
|
|
364
|
+
max-width: 820px;
|
|
365
|
+
margin: 0 auto;
|
|
366
|
+
font-size: 16px;
|
|
367
|
+
line-height: 1.6;
|
|
368
|
+
overflow-wrap: break-word;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.markdown-body > :first-child { margin-top: 0; }
|
|
372
|
+
|
|
373
|
+
.markdown-body h1,
|
|
374
|
+
.markdown-body h2,
|
|
375
|
+
.markdown-body h3,
|
|
376
|
+
.markdown-body h4,
|
|
377
|
+
.markdown-body h5,
|
|
378
|
+
.markdown-body h6 {
|
|
379
|
+
position: relative;
|
|
380
|
+
margin: 1.5em 0 0.6em;
|
|
381
|
+
font-weight: 600;
|
|
382
|
+
line-height: 1.25;
|
|
383
|
+
scroll-margin-top: 64px;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.markdown-body h1 { font-size: 2em; padding-bottom: 0.3em; border-bottom: 1px solid var(--border-muted); }
|
|
387
|
+
.markdown-body h2 { font-size: 1.5em; padding-bottom: 0.3em; border-bottom: 1px solid var(--border-muted); }
|
|
388
|
+
.markdown-body h3 { font-size: 1.25em; }
|
|
389
|
+
.markdown-body h4 { font-size: 1em; }
|
|
390
|
+
.markdown-body h5, .markdown-body h6 { font-size: 0.875em; color: var(--fg-muted); }
|
|
391
|
+
|
|
392
|
+
.heading-anchor {
|
|
393
|
+
margin-left: 8px;
|
|
394
|
+
color: var(--fg-faint);
|
|
395
|
+
font-weight: 400;
|
|
396
|
+
text-decoration: none;
|
|
397
|
+
opacity: 0;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.markdown-body :is(h1, h2, h3, h4, h5, h6):hover .heading-anchor { opacity: 1; }
|
|
401
|
+
|
|
402
|
+
.markdown-body p,
|
|
403
|
+
.markdown-body ul,
|
|
404
|
+
.markdown-body ol,
|
|
405
|
+
.markdown-body blockquote,
|
|
406
|
+
.markdown-body pre,
|
|
407
|
+
.markdown-body .table-wrap,
|
|
408
|
+
.markdown-body details { margin: 0 0 1em; }
|
|
409
|
+
|
|
410
|
+
.markdown-body a { color: var(--accent); text-decoration: none; }
|
|
411
|
+
.markdown-body a:hover { text-decoration: underline; }
|
|
412
|
+
|
|
413
|
+
.markdown-body .wikilink { border-bottom: 1px dashed currentColor; }
|
|
414
|
+
.markdown-body .wikilink:hover { text-decoration: none; border-bottom-style: solid; }
|
|
415
|
+
.markdown-body .wikilink-missing { color: var(--missing); }
|
|
416
|
+
.markdown-body .link-broken { color: var(--fg-muted); text-decoration: line-through; cursor: not-allowed; }
|
|
417
|
+
|
|
418
|
+
.markdown-body ul, .markdown-body ol { padding-left: 2em; }
|
|
419
|
+
.markdown-body li + li { margin-top: 0.25em; }
|
|
420
|
+
.markdown-body li > input[type="checkbox"] { margin: 0 0.4em 0.2em -1.4em; vertical-align: middle; }
|
|
421
|
+
|
|
422
|
+
.markdown-body blockquote {
|
|
423
|
+
padding: 0 1em;
|
|
424
|
+
color: var(--fg-muted);
|
|
425
|
+
border-left: 0.25em solid var(--border);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.markdown-body code {
|
|
429
|
+
padding: 0.2em 0.4em;
|
|
430
|
+
font: 85% var(--mono);
|
|
431
|
+
background: var(--code-bg);
|
|
432
|
+
border-radius: 6px;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.markdown-body pre {
|
|
436
|
+
padding: 16px;
|
|
437
|
+
overflow: auto;
|
|
438
|
+
font-size: 85%;
|
|
439
|
+
line-height: 1.45;
|
|
440
|
+
background: var(--code-bg);
|
|
441
|
+
border-radius: 6px;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.markdown-body pre code { padding: 0; font-size: 100%; background: none; }
|
|
445
|
+
|
|
446
|
+
.markdown-body img { max-width: 100%; }
|
|
447
|
+
|
|
448
|
+
.markdown-body hr {
|
|
449
|
+
height: 0.25em;
|
|
450
|
+
margin: 1.5em 0;
|
|
451
|
+
border: 0;
|
|
452
|
+
background: var(--border-muted);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.table-wrap { overflow-x: auto; }
|
|
456
|
+
|
|
457
|
+
.markdown-body table { border-collapse: collapse; }
|
|
458
|
+
.markdown-body th, .markdown-body td { padding: 6px 13px; border: 1px solid var(--border); }
|
|
459
|
+
.markdown-body th { font-weight: 600; background: var(--bg-subtle); }
|
|
460
|
+
.markdown-body tr:nth-child(2n) td { background: var(--bg-subtle); }
|
|
461
|
+
|
|
462
|
+
.markdown-body details summary { cursor: pointer; }
|
|
463
|
+
|
|
464
|
+
.empty-state {
|
|
465
|
+
max-width: 520px;
|
|
466
|
+
margin: 12vh auto 0;
|
|
467
|
+
text-align: center;
|
|
468
|
+
color: var(--fg-muted);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.empty-state h2 { color: var(--fg); font-size: 20px; }
|
|
472
|
+
|
|
473
|
+
.image-view { margin: 0; text-align: center; }
|
|
474
|
+
.image-view img { max-width: 100%; border: 1px solid var(--border-muted); border-radius: 6px; }
|
|
475
|
+
|
|
476
|
+
.source-view {
|
|
477
|
+
margin: 0;
|
|
478
|
+
font: 13px/1.55 var(--mono);
|
|
479
|
+
counter-reset: none;
|
|
480
|
+
white-space: pre-wrap;
|
|
481
|
+
overflow-wrap: anywhere;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.source-line { display: flex; }
|
|
485
|
+
|
|
486
|
+
.source-number {
|
|
487
|
+
flex-shrink: 0;
|
|
488
|
+
width: 4em;
|
|
489
|
+
padding-right: 1em;
|
|
490
|
+
color: var(--fg-faint);
|
|
491
|
+
text-align: right;
|
|
492
|
+
user-select: none;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.source-text { flex: 1; min-width: 0; }
|
|
496
|
+
|
|
497
|
+
.folder-list {
|
|
498
|
+
list-style: none;
|
|
499
|
+
margin: 0 0 24px;
|
|
500
|
+
padding: 0;
|
|
501
|
+
border: 1px solid var(--border);
|
|
502
|
+
border-radius: 6px;
|
|
503
|
+
font-size: 14px;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.folder-list li + li { border-top: 1px solid var(--border-muted); }
|
|
507
|
+
.folder-list a { display: block; padding: 8px 14px; color: var(--fg); text-decoration: none; }
|
|
508
|
+
.folder-list a:hover { background: var(--bg-subtle); }
|
|
509
|
+
.folder-dir { font-weight: 600; }
|
|
510
|
+
.folder-empty { padding: 8px 14px; color: var(--fg-muted); }
|
|
511
|
+
|
|
512
|
+
.folder-readme {
|
|
513
|
+
padding-top: 8px;
|
|
514
|
+
border-top: 1px solid var(--border-muted);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/* --- editing ------------------------------------------------------------------ */
|
|
518
|
+
|
|
519
|
+
.editor {
|
|
520
|
+
flex: 1;
|
|
521
|
+
display: grid;
|
|
522
|
+
grid-template-columns: 1fr 1fr;
|
|
523
|
+
min-height: 0;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.editor-text { grid-template-columns: 1fr; }
|
|
527
|
+
.editor-text .preview { display: none; }
|
|
528
|
+
|
|
529
|
+
.source {
|
|
530
|
+
width: 100%;
|
|
531
|
+
height: 100%;
|
|
532
|
+
min-height: 60vh;
|
|
533
|
+
padding: 20px 24px;
|
|
534
|
+
border: 0;
|
|
535
|
+
border-right: 1px solid var(--border-muted);
|
|
536
|
+
resize: none;
|
|
537
|
+
background: var(--bg);
|
|
538
|
+
color: var(--fg);
|
|
539
|
+
font: 14px/1.6 var(--mono);
|
|
540
|
+
tab-size: 2;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.source:focus { outline: none; }
|
|
544
|
+
|
|
545
|
+
.preview {
|
|
546
|
+
padding: 20px 28px 64px;
|
|
547
|
+
overflow-y: auto;
|
|
548
|
+
max-width: none;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/* --- the right-hand column ------------------------------------------------------ */
|
|
552
|
+
|
|
553
|
+
.context-section + .context-section { margin-top: 24px; }
|
|
554
|
+
|
|
555
|
+
.context h2 {
|
|
556
|
+
margin: 0 0 8px;
|
|
557
|
+
font-size: 11px;
|
|
558
|
+
font-weight: 600;
|
|
559
|
+
letter-spacing: 0.05em;
|
|
560
|
+
text-transform: uppercase;
|
|
561
|
+
color: var(--fg-muted);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.count {
|
|
565
|
+
margin-left: 4px;
|
|
566
|
+
padding: 0 6px;
|
|
567
|
+
border-radius: 10px;
|
|
568
|
+
background: var(--bg-hover);
|
|
569
|
+
letter-spacing: 0;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.outline, .backlinks { list-style: none; margin: 0; padding: 0; font-size: 13px; }
|
|
573
|
+
|
|
574
|
+
.outline a {
|
|
575
|
+
display: block;
|
|
576
|
+
padding: 3px 0;
|
|
577
|
+
color: var(--fg-muted);
|
|
578
|
+
text-decoration: none;
|
|
579
|
+
line-height: 1.35;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.outline a:hover { color: var(--accent); }
|
|
583
|
+
.outline-h2 a { padding-left: 10px; }
|
|
584
|
+
.outline-h3 a { padding-left: 20px; }
|
|
585
|
+
|
|
586
|
+
.backlinks li + li { margin-top: 8px; }
|
|
587
|
+
|
|
588
|
+
.backlinks a {
|
|
589
|
+
display: block;
|
|
590
|
+
padding: 6px 8px;
|
|
591
|
+
border: 1px solid var(--border-muted);
|
|
592
|
+
border-radius: 6px;
|
|
593
|
+
text-decoration: none;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.backlinks a:hover { border-color: var(--accent); }
|
|
597
|
+
|
|
598
|
+
.backlink-path {
|
|
599
|
+
display: block;
|
|
600
|
+
color: var(--accent);
|
|
601
|
+
font-weight: 600;
|
|
602
|
+
overflow-wrap: anywhere;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
.backlink-text {
|
|
606
|
+
display: block;
|
|
607
|
+
margin-top: 2px;
|
|
608
|
+
color: var(--fg-muted);
|
|
609
|
+
font-size: 12px;
|
|
610
|
+
overflow: hidden;
|
|
611
|
+
display: -webkit-box;
|
|
612
|
+
-webkit-line-clamp: 2;
|
|
613
|
+
-webkit-box-orient: vertical;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/* --- palettes: open, search, new file, keys -------------------------------------- */
|
|
617
|
+
|
|
618
|
+
dialog.palette {
|
|
619
|
+
width: min(560px, calc(100vw - 32px));
|
|
620
|
+
max-height: min(560px, calc(100vh - 96px));
|
|
621
|
+
margin: 12vh auto auto;
|
|
622
|
+
padding: 0;
|
|
623
|
+
border: 1px solid var(--border);
|
|
624
|
+
border-radius: 12px;
|
|
625
|
+
background: var(--bg);
|
|
626
|
+
color: var(--fg);
|
|
627
|
+
box-shadow: var(--shadow);
|
|
628
|
+
overflow: hidden;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
dialog.palette-wide { width: min(760px, calc(100vw - 32px)); }
|
|
632
|
+
|
|
633
|
+
dialog::backdrop { background: rgba(1, 4, 9, 0.35); }
|
|
634
|
+
|
|
635
|
+
.palette-input {
|
|
636
|
+
width: 100%;
|
|
637
|
+
padding: 14px 16px;
|
|
638
|
+
border: 0;
|
|
639
|
+
border-bottom: 1px solid var(--border-muted);
|
|
640
|
+
background: transparent;
|
|
641
|
+
color: var(--fg);
|
|
642
|
+
font: 15px var(--font);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
.palette-input:focus { outline: none; }
|
|
646
|
+
|
|
647
|
+
.palette-label {
|
|
648
|
+
display: block;
|
|
649
|
+
padding: 12px 16px 0;
|
|
650
|
+
font-size: 12px;
|
|
651
|
+
color: var(--fg-muted);
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
.palette-summary {
|
|
655
|
+
margin: 0;
|
|
656
|
+
padding: 8px 16px;
|
|
657
|
+
font-size: 12px;
|
|
658
|
+
color: var(--fg-muted);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
.palette-summary:empty { display: none; }
|
|
662
|
+
|
|
663
|
+
.palette-error {
|
|
664
|
+
margin: 0;
|
|
665
|
+
padding: 10px 16px;
|
|
666
|
+
color: var(--missing);
|
|
667
|
+
font-size: 13px;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.palette-results {
|
|
671
|
+
list-style: none;
|
|
672
|
+
margin: 0;
|
|
673
|
+
padding: 6px;
|
|
674
|
+
max-height: 420px;
|
|
675
|
+
overflow-y: auto;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
.palette-results > li[data-path] {
|
|
679
|
+
display: flex;
|
|
680
|
+
align-items: baseline;
|
|
681
|
+
gap: 10px;
|
|
682
|
+
padding: 7px 10px;
|
|
683
|
+
border-radius: 6px;
|
|
684
|
+
cursor: pointer;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
.palette-results > li.selected { background: var(--bg-active); }
|
|
688
|
+
|
|
689
|
+
.result-name { font-weight: 600; }
|
|
690
|
+
.result-where { color: var(--fg-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
691
|
+
.result-none { padding: 10px; color: var(--fg-muted); }
|
|
692
|
+
|
|
693
|
+
.search-file { padding: 4px 4px 8px; }
|
|
694
|
+
.search-file + .search-file { border-top: 1px solid var(--border-muted); }
|
|
695
|
+
|
|
696
|
+
.search-file-name {
|
|
697
|
+
display: block;
|
|
698
|
+
padding: 6px 6px 2px;
|
|
699
|
+
color: var(--accent);
|
|
700
|
+
font-weight: 600;
|
|
701
|
+
font-size: 13px;
|
|
702
|
+
text-decoration: none;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
.search-hit {
|
|
706
|
+
display: flex;
|
|
707
|
+
gap: 10px;
|
|
708
|
+
padding: 3px 6px;
|
|
709
|
+
border-radius: 4px;
|
|
710
|
+
color: var(--fg);
|
|
711
|
+
font: 12px/1.5 var(--mono);
|
|
712
|
+
text-decoration: none;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
.search-hit:hover { background: var(--bg-hover); }
|
|
716
|
+
.search-line { width: 3em; flex-shrink: 0; color: var(--fg-faint); text-align: right; }
|
|
717
|
+
.search-text { min-width: 0; overflow-wrap: anywhere; }
|
|
718
|
+
.search-text mark { background: var(--mark); color: inherit; border-radius: 2px; }
|
|
719
|
+
|
|
720
|
+
.help-title { margin: 0; padding: 16px 16px 4px; font-size: 16px; }
|
|
721
|
+
|
|
722
|
+
.help-keys {
|
|
723
|
+
display: grid;
|
|
724
|
+
grid-template-columns: max-content 1fr;
|
|
725
|
+
gap: 8px 16px;
|
|
726
|
+
margin: 12px 16px;
|
|
727
|
+
font-size: 14px;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
.help-keys dt { text-align: right; }
|
|
731
|
+
.help-keys dd { margin: 0; color: var(--fg-muted); }
|
|
732
|
+
|
|
733
|
+
.help-note {
|
|
734
|
+
margin: 0;
|
|
735
|
+
padding: 12px 16px 16px;
|
|
736
|
+
border-top: 1px solid var(--border-muted);
|
|
737
|
+
font-size: 13px;
|
|
738
|
+
color: var(--fg-muted);
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
.help-note code { font: 12px var(--mono); }
|
|
742
|
+
|
|
743
|
+
/* --- narrow screens -------------------------------------------------------------- */
|
|
744
|
+
|
|
745
|
+
@media (max-width: 1100px) {
|
|
746
|
+
.context { display: none !important; }
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
@media (max-width: 760px) {
|
|
750
|
+
:root { --sidebar: 100vw; }
|
|
751
|
+
.pill { font-size: 0; gap: 0; padding: 0 8px; }
|
|
752
|
+
.pill kbd { font-size: 11px; }
|
|
753
|
+
.pill::before { font-size: 13px; }
|
|
754
|
+
#quickOpenButton::before { content: "Open"; margin-right: 6px; }
|
|
755
|
+
#searchButton::before { content: "Search"; margin-right: 6px; }
|
|
756
|
+
.viewer { padding: 16px 16px 48px; }
|
|
757
|
+
.doc-bar { padding: 8px 16px; }
|
|
758
|
+
.editor { grid-template-columns: 1fr; }
|
|
759
|
+
.preview { display: none; }
|
|
760
|
+
/* On a phone the tree covers the page; opening a file hides it. */
|
|
761
|
+
body:not(.sidebar-hidden) .main { display: none; }
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
/* --- corrections found by looking at it ------------------------------------------ */
|
|
765
|
+
|
|
766
|
+
/* The markdown column's list and heading rules outrank these single-class
|
|
767
|
+
* ones, so they are restated at the same specificity. */
|
|
768
|
+
.markdown-body .folder-list { padding: 0; }
|
|
769
|
+
.markdown-body .folder-list li + li { margin-top: 0; }
|
|
770
|
+
|
|
771
|
+
/* Tables left-aligned unless the markdown asked otherwise, as GitHub does. */
|
|
772
|
+
.markdown-body th { text-align: left; }
|
|
773
|
+
|
|
774
|
+
/* Task-list checkboxes are shown, not clicked -- but disabled controls are
|
|
775
|
+
* drawn faded, and a checked box you cannot see is not a task list. */
|
|
776
|
+
.markdown-body li > input[type="checkbox"]:disabled {
|
|
777
|
+
opacity: 1;
|
|
778
|
+
accent-color: var(--accent);
|
|
779
|
+
width: 14px;
|
|
780
|
+
height: 14px;
|
|
781
|
+
}
|