sdocs-dev 1.0.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/bin/sdocs-dev.js +443 -0
- package/package.json +40 -0
- package/public/css/layout.css +237 -0
- package/public/css/mobile.css +189 -0
- package/public/css/panel.css +348 -0
- package/public/css/rendered.css +278 -0
- package/public/css/tokens.css +112 -0
- package/public/css/write.css +128 -0
- package/public/default.md +129 -0
- package/public/index.html +533 -0
- package/public/sdocs-app.js +595 -0
- package/public/sdocs-controls.js +221 -0
- package/public/sdocs-export.js +193 -0
- package/public/sdocs-state.js +43 -0
- package/public/sdocs-styles.js +285 -0
- package/public/sdocs-theme.js +168 -0
- package/public/sdocs-write.js +737 -0
- package/public/sdocs-yaml.js +78 -0
- package/server.js +65 -0
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
/* ═══════════════════════════════════════════════════
|
|
2
|
+
RIGHT PANEL
|
|
3
|
+
═══════════════════════════════════════════════════ */
|
|
4
|
+
#right {
|
|
5
|
+
width: 0;
|
|
6
|
+
opacity: 0;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
flex-shrink: 0;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
background: var(--bg-panel);
|
|
12
|
+
scrollbar-width: thin;
|
|
13
|
+
scrollbar-color: var(--border) transparent;
|
|
14
|
+
transition: width .32s cubic-bezier(.4,0,.2,1),
|
|
15
|
+
opacity .25s ease;
|
|
16
|
+
}
|
|
17
|
+
body.style-mode #right {
|
|
18
|
+
width: 335px;
|
|
19
|
+
opacity: 1;
|
|
20
|
+
overflow-y: auto;
|
|
21
|
+
overflow-x: hidden;
|
|
22
|
+
}
|
|
23
|
+
#right::-webkit-scrollbar { width: 5px; }
|
|
24
|
+
#right::-webkit-scrollbar-track { background: transparent; }
|
|
25
|
+
#right::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
|
|
26
|
+
|
|
27
|
+
#right-header {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
min-height: 40px;
|
|
31
|
+
padding: 0 12px;
|
|
32
|
+
font-size: 12px;
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
letter-spacing: -0.005em;
|
|
35
|
+
color: var(--text-2);
|
|
36
|
+
border-bottom: 1px solid var(--border);
|
|
37
|
+
background: var(--bg-panel);
|
|
38
|
+
flex-shrink: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* ── Panel sections ── */
|
|
42
|
+
.panel-section { border-bottom: 1px solid var(--border-subtle); }
|
|
43
|
+
|
|
44
|
+
.panel-header {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
gap: 7px;
|
|
48
|
+
padding: 9px 12px;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
user-select: none;
|
|
51
|
+
font-size: 12px;
|
|
52
|
+
font-weight: 600;
|
|
53
|
+
color: var(--text-2);
|
|
54
|
+
transition: background .1s;
|
|
55
|
+
}
|
|
56
|
+
.panel-header:hover { background: var(--bg-hover); }
|
|
57
|
+
.panel-header .arrow {
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
width: 14px;
|
|
62
|
+
height: 14px;
|
|
63
|
+
color: var(--text-3);
|
|
64
|
+
transition: transform .18s cubic-bezier(.4,0,.2,1);
|
|
65
|
+
flex-shrink: 0;
|
|
66
|
+
}
|
|
67
|
+
.panel-header.open .arrow { transform: rotate(90deg); }
|
|
68
|
+
.panel-header .section-icon {
|
|
69
|
+
width: 16px;
|
|
70
|
+
height: 16px;
|
|
71
|
+
border-radius: 3px;
|
|
72
|
+
display: inline-flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
flex-shrink: 0;
|
|
76
|
+
font-size: 9px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.panel-body { display: none; padding: 10px 12px 12px; }
|
|
80
|
+
.panel-body.open { display: block; }
|
|
81
|
+
|
|
82
|
+
/* Sub-sections */
|
|
83
|
+
.sub-section { margin-top: 6px; }
|
|
84
|
+
.sub-header {
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
gap: 5px;
|
|
88
|
+
padding: 5px 8px;
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
font-size: 11px;
|
|
91
|
+
font-weight: 600;
|
|
92
|
+
color: var(--text-2);
|
|
93
|
+
background: var(--bg-surface);
|
|
94
|
+
border: 1px solid var(--border-subtle);
|
|
95
|
+
border-radius: var(--radius);
|
|
96
|
+
user-select: none;
|
|
97
|
+
transition: background .1s, border-color .1s;
|
|
98
|
+
}
|
|
99
|
+
.sub-header:hover { background: var(--bg-hover); border-color: var(--border); }
|
|
100
|
+
.sub-header .arrow {
|
|
101
|
+
font-size: 9px;
|
|
102
|
+
color: var(--text-3);
|
|
103
|
+
transition: transform .18s cubic-bezier(.4,0,.2,1);
|
|
104
|
+
}
|
|
105
|
+
.sub-header.open .arrow { transform: rotate(90deg); }
|
|
106
|
+
.sub-header .tag {
|
|
107
|
+
margin-left: auto;
|
|
108
|
+
font-size: 9.5px;
|
|
109
|
+
font-weight: 500;
|
|
110
|
+
color: var(--text-3);
|
|
111
|
+
background: var(--bg-panel-deep);
|
|
112
|
+
border: 1px solid var(--border);
|
|
113
|
+
border-radius: 3px;
|
|
114
|
+
padding: 1px 5px;
|
|
115
|
+
font-family: 'JetBrains Mono', monospace;
|
|
116
|
+
}
|
|
117
|
+
.sub-body { display: none; padding: 8px 2px 2px; }
|
|
118
|
+
.sub-body.open { display: block; }
|
|
119
|
+
|
|
120
|
+
/* ── Controls ── */
|
|
121
|
+
.control-row {
|
|
122
|
+
display: flex;
|
|
123
|
+
align-items: center;
|
|
124
|
+
justify-content: space-between;
|
|
125
|
+
margin-bottom: 7px;
|
|
126
|
+
gap: 6px;
|
|
127
|
+
min-height: 26px;
|
|
128
|
+
}
|
|
129
|
+
.control-row label {
|
|
130
|
+
font-size: 11.5px;
|
|
131
|
+
color: var(--text-2);
|
|
132
|
+
flex-shrink: 0;
|
|
133
|
+
min-width: 80px;
|
|
134
|
+
font-weight: 400;
|
|
135
|
+
}
|
|
136
|
+
.control-row input[type=range] {
|
|
137
|
+
flex: 1;
|
|
138
|
+
height: 4px;
|
|
139
|
+
accent-color: var(--accent);
|
|
140
|
+
cursor: pointer;
|
|
141
|
+
}
|
|
142
|
+
.control-row input[type=number] {
|
|
143
|
+
width: 48px;
|
|
144
|
+
flex-shrink: 0;
|
|
145
|
+
padding: 3px 5px;
|
|
146
|
+
background: var(--bg-input);
|
|
147
|
+
border: 1px solid var(--border);
|
|
148
|
+
border-radius: var(--radius-sm);
|
|
149
|
+
color: var(--text);
|
|
150
|
+
font-size: 11.5px;
|
|
151
|
+
font-family: var(--font-ui);
|
|
152
|
+
text-align: right;
|
|
153
|
+
transition: border-color .12s;
|
|
154
|
+
}
|
|
155
|
+
.control-row input[type=number]:focus {
|
|
156
|
+
outline: none;
|
|
157
|
+
border-color: var(--accent);
|
|
158
|
+
box-shadow: 0 0 0 2px rgba(37,99,235,.12);
|
|
159
|
+
}
|
|
160
|
+
.control-row input[type=color] {
|
|
161
|
+
width: 28px;
|
|
162
|
+
height: 22px;
|
|
163
|
+
border: 1px solid var(--border);
|
|
164
|
+
border-radius: var(--radius-sm);
|
|
165
|
+
background: var(--bg-input);
|
|
166
|
+
cursor: pointer;
|
|
167
|
+
padding: 1px;
|
|
168
|
+
box-shadow: var(--shadow-sm);
|
|
169
|
+
}
|
|
170
|
+
.control-row select {
|
|
171
|
+
flex: 1;
|
|
172
|
+
padding: 4px 7px;
|
|
173
|
+
background: var(--bg-input);
|
|
174
|
+
border: 1px solid var(--border);
|
|
175
|
+
border-radius: var(--radius-sm);
|
|
176
|
+
color: var(--text);
|
|
177
|
+
font-size: 11.5px;
|
|
178
|
+
font-family: var(--font-ui);
|
|
179
|
+
cursor: pointer;
|
|
180
|
+
transition: border-color .12s;
|
|
181
|
+
-webkit-appearance: none;
|
|
182
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23A8A29E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
183
|
+
background-repeat: no-repeat;
|
|
184
|
+
background-position: right 8px center;
|
|
185
|
+
padding-right: 24px;
|
|
186
|
+
}
|
|
187
|
+
.control-row select:focus {
|
|
188
|
+
outline: none;
|
|
189
|
+
border-color: var(--accent);
|
|
190
|
+
box-shadow: 0 0 0 2px rgba(37,99,235,.12);
|
|
191
|
+
}
|
|
192
|
+
.unit {
|
|
193
|
+
font-size: 10.5px;
|
|
194
|
+
color: var(--text-3);
|
|
195
|
+
flex-shrink: 0;
|
|
196
|
+
min-width: 14px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.reset-btn {
|
|
200
|
+
display: inline-flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
justify-content: center;
|
|
203
|
+
width: 20px;
|
|
204
|
+
height: 20px;
|
|
205
|
+
flex-shrink: 0;
|
|
206
|
+
border: none;
|
|
207
|
+
background: none;
|
|
208
|
+
color: var(--text-3);
|
|
209
|
+
cursor: pointer;
|
|
210
|
+
border-radius: var(--radius-sm);
|
|
211
|
+
font-size: 13px;
|
|
212
|
+
line-height: 1;
|
|
213
|
+
transition: color .12s, background .12s;
|
|
214
|
+
padding: 0;
|
|
215
|
+
}
|
|
216
|
+
.reset-btn:hover {
|
|
217
|
+
color: var(--text-2);
|
|
218
|
+
background: var(--bg-hover);
|
|
219
|
+
}
|
|
220
|
+
.reset-btn title { display: none; }
|
|
221
|
+
|
|
222
|
+
.color-pair {
|
|
223
|
+
display: flex;
|
|
224
|
+
align-items: center;
|
|
225
|
+
gap: 4px;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.factory-reset-btn {
|
|
229
|
+
display: block;
|
|
230
|
+
width: 100%;
|
|
231
|
+
margin-top: 8px;
|
|
232
|
+
padding: 5px 0;
|
|
233
|
+
border: 1px solid var(--border);
|
|
234
|
+
border-radius: var(--radius-sm);
|
|
235
|
+
background: none;
|
|
236
|
+
color: var(--text-3);
|
|
237
|
+
font-size: 11px;
|
|
238
|
+
cursor: pointer;
|
|
239
|
+
transition: color .12s, background .12s, border-color .12s;
|
|
240
|
+
}
|
|
241
|
+
.factory-reset-btn:hover {
|
|
242
|
+
color: var(--text-1);
|
|
243
|
+
background: var(--bg-hover);
|
|
244
|
+
border-color: var(--text-3);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/* Color row: swatch + label combo */
|
|
248
|
+
.color-preview {
|
|
249
|
+
width: 14px;
|
|
250
|
+
height: 14px;
|
|
251
|
+
border-radius: 3px;
|
|
252
|
+
border: 1px solid var(--border);
|
|
253
|
+
flex-shrink: 0;
|
|
254
|
+
pointer-events: none;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/* ═══════════════════════════════════════════════════
|
|
258
|
+
EXPORT PANEL
|
|
259
|
+
═══════════════════════════════════════════════════ */
|
|
260
|
+
#export-panel {
|
|
261
|
+
width: 0;
|
|
262
|
+
opacity: 0;
|
|
263
|
+
overflow: hidden;
|
|
264
|
+
flex-shrink: 0;
|
|
265
|
+
display: flex;
|
|
266
|
+
flex-direction: column;
|
|
267
|
+
background: var(--bg-panel);
|
|
268
|
+
transition: width .32s cubic-bezier(.4,0,.2,1),
|
|
269
|
+
opacity .25s ease;
|
|
270
|
+
}
|
|
271
|
+
body.export-mode #export-panel {
|
|
272
|
+
width: 335px;
|
|
273
|
+
opacity: 1;
|
|
274
|
+
overflow-y: auto;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
#export-panel-header {
|
|
278
|
+
display: flex;
|
|
279
|
+
align-items: center;
|
|
280
|
+
min-height: 40px;
|
|
281
|
+
padding: 0 12px;
|
|
282
|
+
font-size: 12px;
|
|
283
|
+
font-weight: 600;
|
|
284
|
+
letter-spacing: -0.005em;
|
|
285
|
+
color: var(--text-2);
|
|
286
|
+
border-bottom: 1px solid var(--border);
|
|
287
|
+
background: var(--bg-panel);
|
|
288
|
+
flex-shrink: 0;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.export-option {
|
|
292
|
+
display: flex;
|
|
293
|
+
align-items: center;
|
|
294
|
+
gap: 12px;
|
|
295
|
+
width: 100%;
|
|
296
|
+
padding: 14px 16px;
|
|
297
|
+
background: none;
|
|
298
|
+
border: none;
|
|
299
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
300
|
+
font-family: var(--font-ui);
|
|
301
|
+
color: var(--text);
|
|
302
|
+
text-align: left;
|
|
303
|
+
cursor: pointer;
|
|
304
|
+
transition: background .12s;
|
|
305
|
+
}
|
|
306
|
+
.export-option:hover { background: var(--bg-hover); }
|
|
307
|
+
.export-option:active { background: var(--bg-active); }
|
|
308
|
+
.export-option svg {
|
|
309
|
+
flex-shrink: 0;
|
|
310
|
+
color: var(--text-2);
|
|
311
|
+
}
|
|
312
|
+
.export-option-text {
|
|
313
|
+
display: flex;
|
|
314
|
+
flex-direction: column;
|
|
315
|
+
gap: 2px;
|
|
316
|
+
}
|
|
317
|
+
.export-option-title {
|
|
318
|
+
font-size: 13px;
|
|
319
|
+
font-weight: 500;
|
|
320
|
+
}
|
|
321
|
+
.export-option-desc {
|
|
322
|
+
font-size: 11px;
|
|
323
|
+
color: var(--text-3);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/* ═══════════════════════════════════════════════════
|
|
327
|
+
FOOTER / STATUS
|
|
328
|
+
═══════════════════════════════════════════════════ */
|
|
329
|
+
#statusbar {
|
|
330
|
+
height: 24px;
|
|
331
|
+
display: flex;
|
|
332
|
+
align-items: center;
|
|
333
|
+
gap: 12px;
|
|
334
|
+
padding: 0 14px;
|
|
335
|
+
background: var(--bg);
|
|
336
|
+
border-top: 1px solid var(--border-subtle);
|
|
337
|
+
flex-shrink: 0;
|
|
338
|
+
}
|
|
339
|
+
#statusbar span {
|
|
340
|
+
font-size: 11px;
|
|
341
|
+
color: var(--text-3);
|
|
342
|
+
}
|
|
343
|
+
#statusbar .dot {
|
|
344
|
+
width: 6px; height: 6px;
|
|
345
|
+
border-radius: 50%;
|
|
346
|
+
background: #22C55E;
|
|
347
|
+
flex-shrink: 0;
|
|
348
|
+
}
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
/* ═══════════════════════════════════════════════════
|
|
2
|
+
RENDERED MARKDOWN
|
|
3
|
+
═══════════════════════════════════════════════════ */
|
|
4
|
+
:is(#rendered, #write) {
|
|
5
|
+
padding: 40px 48px 60px;
|
|
6
|
+
max-width: 760px;
|
|
7
|
+
margin: 0 auto;
|
|
8
|
+
|
|
9
|
+
--md-font-family: 'Inter', system-ui, sans-serif;
|
|
10
|
+
--md-base-size: 16px;
|
|
11
|
+
--md-line-height: 1.75;
|
|
12
|
+
--md-color: #1C1917;
|
|
13
|
+
--md-h-font-family: inherit;
|
|
14
|
+
--md-h-scale: 1;
|
|
15
|
+
--md-h-margin-bottom: 0.4em;
|
|
16
|
+
--md-h-color: var(--md-color);
|
|
17
|
+
--md-h1-size: 2.1em;
|
|
18
|
+
--md-h1-color: var(--md-h-color);
|
|
19
|
+
--md-h1-margin: 0 0 0.3em;
|
|
20
|
+
--md-h1-weight: 700;
|
|
21
|
+
--md-h2-size: 1.55em;
|
|
22
|
+
--md-h2-color: var(--md-h-color);
|
|
23
|
+
--md-h2-margin: 1.4em 0 0.3em;
|
|
24
|
+
--md-h2-weight: 600;
|
|
25
|
+
--md-h3-size: 1.2em;
|
|
26
|
+
--md-h3-color: var(--md-h-color);
|
|
27
|
+
--md-h3-margin: 1.2em 0 0.3em;
|
|
28
|
+
--md-h3-weight: 600;
|
|
29
|
+
--md-h4-size: 1.0em;
|
|
30
|
+
--md-h4-color: var(--md-h-color);
|
|
31
|
+
--md-h4-margin: 1.0em 0 0.25em;
|
|
32
|
+
--md-h4-weight: 600;
|
|
33
|
+
--md-p-color: var(--md-color);
|
|
34
|
+
--md-list-color: var(--md-p-color);
|
|
35
|
+
--md-list-spacing: 0.3em;
|
|
36
|
+
--md-list-indent: 1.6em;
|
|
37
|
+
--md-p-line-height: var(--md-line-height);
|
|
38
|
+
--md-p-margin: 0 0 1.1em;
|
|
39
|
+
--md-link-color: #2563EB;
|
|
40
|
+
--md-link-decoration: underline;
|
|
41
|
+
--md-code-bg: #F4F1ED;
|
|
42
|
+
--md-code-color: #6B21A8;
|
|
43
|
+
--md-code-padding: 0.15em 0.45em;
|
|
44
|
+
--md-code-radius: 4px;
|
|
45
|
+
--md-code-font: 'JetBrains Mono', 'Fira Mono', monospace;
|
|
46
|
+
--md-pre-bg: #F4F1ED;
|
|
47
|
+
--md-pre-padding: 1.1em 1.25em;
|
|
48
|
+
--md-bq-border: 3px solid #2563EB;
|
|
49
|
+
--md-bq-size: 1em;
|
|
50
|
+
--md-bq-color: #6B6560;
|
|
51
|
+
--md-bq-padding: 0.5em 1em;
|
|
52
|
+
--md-bq-margin: 1.2em 0;
|
|
53
|
+
|
|
54
|
+
font-family: var(--md-font-family);
|
|
55
|
+
font-size: var(--md-base-size);
|
|
56
|
+
color: var(--md-color);
|
|
57
|
+
line-height: var(--md-line-height);
|
|
58
|
+
}
|
|
59
|
+
:is(#rendered, #write) h1 {
|
|
60
|
+
font-family: var(--md-h-font-family);
|
|
61
|
+
font-size: calc(var(--md-h1-size) * var(--md-h-scale));
|
|
62
|
+
color: var(--md-h1-color);
|
|
63
|
+
margin: var(--md-h1-margin);
|
|
64
|
+
font-weight: var(--md-h1-weight);
|
|
65
|
+
letter-spacing: -0.02em;
|
|
66
|
+
line-height: 1.2;
|
|
67
|
+
}
|
|
68
|
+
:is(#rendered, #write) h2 {
|
|
69
|
+
font-family: var(--md-h-font-family);
|
|
70
|
+
font-size: calc(var(--md-h2-size) * var(--md-h-scale));
|
|
71
|
+
color: var(--md-h2-color);
|
|
72
|
+
margin: var(--md-h2-margin);
|
|
73
|
+
font-weight: var(--md-h2-weight);
|
|
74
|
+
letter-spacing: -0.015em;
|
|
75
|
+
line-height: 1.3;
|
|
76
|
+
padding-bottom: 0.3em;
|
|
77
|
+
border-bottom: 1px solid var(--md-h2-border);
|
|
78
|
+
}
|
|
79
|
+
:is(#rendered, #write) h3 {
|
|
80
|
+
font-family: var(--md-h-font-family);
|
|
81
|
+
font-size: calc(var(--md-h3-size) * var(--md-h-scale));
|
|
82
|
+
color: var(--md-h3-color);
|
|
83
|
+
margin: var(--md-h3-margin);
|
|
84
|
+
font-weight: var(--md-h3-weight);
|
|
85
|
+
letter-spacing: -0.01em;
|
|
86
|
+
line-height: 1.4;
|
|
87
|
+
}
|
|
88
|
+
:is(#rendered, #write) h4 {
|
|
89
|
+
font-family: var(--md-h-font-family);
|
|
90
|
+
font-size: calc(var(--md-h4-size) * var(--md-h-scale));
|
|
91
|
+
color: var(--md-h4-color);
|
|
92
|
+
margin: var(--md-h4-margin);
|
|
93
|
+
font-weight: var(--md-h4-weight);
|
|
94
|
+
line-height: 1.5;
|
|
95
|
+
}
|
|
96
|
+
:is(#rendered, #write) p {
|
|
97
|
+
color: var(--md-p-color);
|
|
98
|
+
line-height: var(--md-p-line-height);
|
|
99
|
+
margin: var(--md-p-margin);
|
|
100
|
+
}
|
|
101
|
+
:is(#rendered, #write) a {
|
|
102
|
+
color: var(--md-link-color);
|
|
103
|
+
text-decoration: var(--md-link-decoration);
|
|
104
|
+
text-underline-offset: 2px;
|
|
105
|
+
}
|
|
106
|
+
:is(#rendered, #write) a:hover { opacity: .8; }
|
|
107
|
+
|
|
108
|
+
/* ── Collapsible heading sections ── */
|
|
109
|
+
#rendered .md-section > h2,
|
|
110
|
+
#rendered .md-section > h3,
|
|
111
|
+
#rendered .md-section > h4 {
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
}
|
|
114
|
+
#rendered .section-toggle {
|
|
115
|
+
display: inline-flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
justify-content: center;
|
|
118
|
+
width: 16px;
|
|
119
|
+
height: 16px;
|
|
120
|
+
color: var(--text-3);
|
|
121
|
+
cursor: pointer;
|
|
122
|
+
margin-right: 4px;
|
|
123
|
+
vertical-align: middle;
|
|
124
|
+
transition: transform .18s cubic-bezier(.4,0,.2,1), color .12s;
|
|
125
|
+
transform: rotate(0deg);
|
|
126
|
+
}
|
|
127
|
+
#rendered .section-toggle.open {
|
|
128
|
+
transform: rotate(90deg);
|
|
129
|
+
}
|
|
130
|
+
#rendered .section-toggle:hover {
|
|
131
|
+
color: var(--text-2);
|
|
132
|
+
}
|
|
133
|
+
#rendered .md-section-body:not(.open) > :not(.md-section) {
|
|
134
|
+
display: none;
|
|
135
|
+
}
|
|
136
|
+
#rendered .md-section-body:not(.open) > .md-section:not(:has(> .md-section-body.open)) {
|
|
137
|
+
padding-left: 1.2em;
|
|
138
|
+
}
|
|
139
|
+
#rendered .md-section-body:not(.open) > .md-section:not(:has(> .md-section-body.open)) > h2,
|
|
140
|
+
#rendered .md-section-body:not(.open) > .md-section:not(:has(> .md-section-body.open)) > h3,
|
|
141
|
+
#rendered .md-section-body:not(.open) > .md-section:not(:has(> .md-section-body.open)) > h4 {
|
|
142
|
+
margin-top: 0.15em;
|
|
143
|
+
margin-bottom: 0.1em;
|
|
144
|
+
padding-bottom: 0;
|
|
145
|
+
border-bottom: none;
|
|
146
|
+
opacity: 0.55;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* ── Header anchor links ── */
|
|
150
|
+
#rendered h1, #rendered h2, #rendered h3, #rendered h4 { position: relative; }
|
|
151
|
+
#rendered .header-anchor {
|
|
152
|
+
display: inline-flex;
|
|
153
|
+
align-items: center;
|
|
154
|
+
margin-left: 6px;
|
|
155
|
+
opacity: 0.5;
|
|
156
|
+
transition: opacity 0.15s;
|
|
157
|
+
color: var(--md-link-color, #2563eb);
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
vertical-align: middle;
|
|
160
|
+
}
|
|
161
|
+
#rendered .header-anchor:hover { opacity: 1; }
|
|
162
|
+
#rendered .header-copy-btn {
|
|
163
|
+
display: inline-flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
margin-left: 4px;
|
|
166
|
+
opacity: 0.5;
|
|
167
|
+
transition: opacity 0.15s;
|
|
168
|
+
color: var(--md-link-color, #2563eb);
|
|
169
|
+
cursor: pointer;
|
|
170
|
+
vertical-align: middle;
|
|
171
|
+
background: none;
|
|
172
|
+
border: none;
|
|
173
|
+
padding: 0;
|
|
174
|
+
font: inherit;
|
|
175
|
+
line-height: 1;
|
|
176
|
+
}
|
|
177
|
+
#rendered .header-copy-btn:hover { opacity: 1; }
|
|
178
|
+
|
|
179
|
+
/* ── Scroll padding for anchor jumps ── */
|
|
180
|
+
#content-area { scroll-padding-top: 24px; }
|
|
181
|
+
|
|
182
|
+
:is(#rendered, #write) code {
|
|
183
|
+
background: var(--md-code-bg);
|
|
184
|
+
color: var(--md-code-color);
|
|
185
|
+
padding: var(--md-code-padding);
|
|
186
|
+
border-radius: var(--md-code-radius);
|
|
187
|
+
font-family: var(--md-code-font);
|
|
188
|
+
font-size: 0.85em;
|
|
189
|
+
overflow-wrap: anywhere;
|
|
190
|
+
}
|
|
191
|
+
#rendered .pre-wrapper {
|
|
192
|
+
position: relative;
|
|
193
|
+
margin: 1.2em 0;
|
|
194
|
+
}
|
|
195
|
+
:is(#rendered, #write) pre {
|
|
196
|
+
background: var(--md-pre-bg);
|
|
197
|
+
padding: var(--md-pre-padding);
|
|
198
|
+
border-radius: var(--radius-md);
|
|
199
|
+
overflow-x: auto;
|
|
200
|
+
overscroll-behavior-x: contain;
|
|
201
|
+
white-space: pre;
|
|
202
|
+
word-wrap: normal;
|
|
203
|
+
margin: 1.2em 0;
|
|
204
|
+
border: 1px solid var(--md-pre-border);
|
|
205
|
+
}
|
|
206
|
+
#rendered pre {
|
|
207
|
+
padding-top: 26px;
|
|
208
|
+
margin: 0;
|
|
209
|
+
}
|
|
210
|
+
#rendered .pre-wrapper .copy-btn {
|
|
211
|
+
position: absolute;
|
|
212
|
+
top: 6px;
|
|
213
|
+
right: 6px;
|
|
214
|
+
background: var(--md-pre-bg);
|
|
215
|
+
border: 1px solid var(--md-copy-btn-border);
|
|
216
|
+
border-radius: 4px;
|
|
217
|
+
padding: 3px 5px;
|
|
218
|
+
cursor: pointer;
|
|
219
|
+
opacity: 0.7;
|
|
220
|
+
transition: opacity 0.15s;
|
|
221
|
+
color: var(--md-code-color, #6B21A8);
|
|
222
|
+
font-size: 12px;
|
|
223
|
+
line-height: 1;
|
|
224
|
+
display: flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
gap: 3px;
|
|
227
|
+
z-index: 1;
|
|
228
|
+
}
|
|
229
|
+
#rendered .pre-wrapper .copy-btn:hover { opacity: 1; background: var(--md-copy-btn-hover); }
|
|
230
|
+
:is(#rendered, #write) pre code {
|
|
231
|
+
background: none;
|
|
232
|
+
padding: 0;
|
|
233
|
+
color: var(--md-code-color);
|
|
234
|
+
font-family: var(--md-code-font);
|
|
235
|
+
font-size: 0.88em;
|
|
236
|
+
overflow: visible;
|
|
237
|
+
white-space: pre;
|
|
238
|
+
word-break: normal;
|
|
239
|
+
}
|
|
240
|
+
:is(#rendered, #write) blockquote {
|
|
241
|
+
border-left: var(--md-bq-border);
|
|
242
|
+
font-size: var(--md-bq-size);
|
|
243
|
+
color: var(--md-bq-color);
|
|
244
|
+
padding: var(--md-bq-padding);
|
|
245
|
+
margin: var(--md-bq-margin);
|
|
246
|
+
background: var(--md-bq-bg);
|
|
247
|
+
border-radius: 0 var(--radius) var(--radius) 0;
|
|
248
|
+
}
|
|
249
|
+
:is(#rendered, #write) blockquote p { margin: 0; color: inherit; }
|
|
250
|
+
:is(#rendered, #write) ul, :is(#rendered, #write) ol {
|
|
251
|
+
padding-left: var(--md-list-indent);
|
|
252
|
+
margin: 0.5em 0 1.1em;
|
|
253
|
+
}
|
|
254
|
+
:is(#rendered, #write) li { margin-bottom: var(--md-list-spacing); color: var(--md-list-color); }
|
|
255
|
+
:is(#rendered, #write) li::marker { color: var(--md-list-color); }
|
|
256
|
+
:is(#rendered, #write) hr {
|
|
257
|
+
border: none;
|
|
258
|
+
border-top: 1px solid var(--md-hr-border);
|
|
259
|
+
margin: 2em 0;
|
|
260
|
+
}
|
|
261
|
+
:is(#rendered, #write) table {
|
|
262
|
+
border-collapse: collapse;
|
|
263
|
+
width: 100%;
|
|
264
|
+
margin: 1.2em 0;
|
|
265
|
+
font-size: 0.92em;
|
|
266
|
+
}
|
|
267
|
+
:is(#rendered, #write) th, :is(#rendered, #write) td {
|
|
268
|
+
border: 1px solid var(--md-table-border);
|
|
269
|
+
padding: 7px 12px;
|
|
270
|
+
text-align: left;
|
|
271
|
+
}
|
|
272
|
+
:is(#rendered, #write) th {
|
|
273
|
+
background: var(--md-table-header-bg);
|
|
274
|
+
font-weight: 600;
|
|
275
|
+
color: var(--text);
|
|
276
|
+
}
|
|
277
|
+
:is(#rendered, #write) tr:nth-child(even) td { background: var(--md-table-even-bg); }
|
|
278
|
+
:is(#rendered, #write) img { max-width: 100%; border-radius: var(--radius-md); }
|