mordoc 1.0.2 → 1.0.3
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/package.json
CHANGED
|
@@ -234,32 +234,61 @@
|
|
|
234
234
|
|
|
235
235
|
.prose :global(ul),
|
|
236
236
|
.prose :global(ol) {
|
|
237
|
-
margin:
|
|
238
|
-
padding:
|
|
237
|
+
margin: 1rem 0;
|
|
238
|
+
padding-left: 1.5rem;
|
|
239
239
|
font-size: 16px;
|
|
240
240
|
line-height: 1.7;
|
|
241
241
|
color: var(--color-content-fg);
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
.prose :global(ul) {
|
|
245
|
-
list-style: disc
|
|
245
|
+
list-style: disc;
|
|
246
|
+
list-style-position: outside;
|
|
246
247
|
}
|
|
247
248
|
|
|
248
249
|
.prose :global(ol) {
|
|
249
|
-
list-style: decimal
|
|
250
|
+
list-style: decimal;
|
|
251
|
+
list-style-position: outside;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.prose :global(ul ul) {
|
|
255
|
+
list-style-type: circle;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.prose :global(ul ul ul) {
|
|
259
|
+
list-style-type: square;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.prose :global(ol ol) {
|
|
263
|
+
list-style-type: lower-alpha;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.prose :global(ol ol ol) {
|
|
267
|
+
list-style-type: lower-roman;
|
|
250
268
|
}
|
|
251
269
|
|
|
252
270
|
.prose :global(li) {
|
|
271
|
+
margin-bottom: 0.5rem;
|
|
272
|
+
line-height: 1.7;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.prose :global(li:last-child) {
|
|
253
276
|
margin-bottom: 0;
|
|
254
277
|
}
|
|
255
278
|
|
|
256
|
-
.prose
|
|
257
|
-
|
|
279
|
+
/* Markdoc loose lists wrap item text in <p> — override global .prose p margins */
|
|
280
|
+
.prose :global(li > p) {
|
|
281
|
+
margin-top: 0;
|
|
282
|
+
margin-bottom: 0.5rem;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.prose :global(li > p:last-child) {
|
|
286
|
+
margin-bottom: 0;
|
|
258
287
|
}
|
|
259
288
|
|
|
260
289
|
.prose :global(li > ul),
|
|
261
290
|
.prose :global(li > ol) {
|
|
262
|
-
margin-top:
|
|
291
|
+
margin-top: 0.5rem;
|
|
263
292
|
margin-bottom: 0;
|
|
264
293
|
}
|
|
265
294
|
|
|
@@ -316,7 +345,7 @@
|
|
|
316
345
|
border-radius: var(--radius-sm);
|
|
317
346
|
font-family: var(--font-mono);
|
|
318
347
|
font-size: 0.875em;
|
|
319
|
-
font-weight:
|
|
348
|
+
font-weight: 400;
|
|
320
349
|
}
|
|
321
350
|
|
|
322
351
|
/* Reset inline-code styles for code inside a pre — the CodeBlock component owns that styling */
|
|
@@ -334,14 +363,14 @@
|
|
|
334
363
|
width: 100%;
|
|
335
364
|
margin: 1.25rem 0;
|
|
336
365
|
border-collapse: collapse;
|
|
337
|
-
font-size:
|
|
366
|
+
font-size: 1rem;
|
|
338
367
|
}
|
|
339
368
|
|
|
340
369
|
.prose :global(th) {
|
|
341
370
|
padding: 0.625rem 0.875rem;
|
|
342
371
|
text-align: left;
|
|
343
372
|
font-weight: 600;
|
|
344
|
-
font-size:
|
|
373
|
+
font-size: 1rem;
|
|
345
374
|
color: var(--color-fg);
|
|
346
375
|
border-bottom: 1px solid var(--color-border);
|
|
347
376
|
}
|
|
@@ -169,10 +169,10 @@
|
|
|
169
169
|
align-items: center;
|
|
170
170
|
width: 100%;
|
|
171
171
|
min-height: var(--sidenav-item-h);
|
|
172
|
-
padding: var(--sidenav-item-pad-y) 8px var(--sidenav-item-pad-y)
|
|
172
|
+
padding: var(--sidenav-item-pad-y) 8px var(--sidenav-item-pad-y) 8px;
|
|
173
173
|
border-radius: var(--radius-md);
|
|
174
174
|
font-size: 14px;
|
|
175
|
-
font-weight:
|
|
175
|
+
font-weight: 500;
|
|
176
176
|
line-height: 1.4;
|
|
177
177
|
color: var(--sidenav-fg);
|
|
178
178
|
text-decoration: none;
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
.navLink.navLinkActive {
|
|
187
187
|
background: var(--accent-subtle);
|
|
188
188
|
color: var(--accent-emphasis);
|
|
189
|
-
font-weight:
|
|
189
|
+
font-weight: 600;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
/* ============================================================
|
|
@@ -195,6 +195,7 @@
|
|
|
195
195
|
|
|
196
196
|
.groupContent {
|
|
197
197
|
padding-top: 4px;
|
|
198
|
+
padding-left: 16px;
|
|
198
199
|
}
|
|
199
200
|
|
|
200
201
|
/* ============================================================
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { NavLink, useLocation, useNavigate } from 'react-router';
|
|
3
3
|
import { useMordocData } from '../data-context.js';
|
|
4
4
|
import { detectCurrentLang, buildLangPrefix, stripLangPrefix, resolveLabel } from '../lang-utils.js';
|
|
@@ -51,6 +51,10 @@ function SidenavNode({ item, depth }: { item: SidenavItem; depth: number }) {
|
|
|
51
51
|
const isLabelActive = item.path ? location.pathname === item.path : false;
|
|
52
52
|
const [open, setOpen] = useState(isGroupActive || isLabelActive);
|
|
53
53
|
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
if (isGroupActive || isLabelActive) setOpen(true);
|
|
56
|
+
}, [isGroupActive, isLabelActive]);
|
|
57
|
+
|
|
54
58
|
// Leaf item — path only, no children
|
|
55
59
|
if (item.path && !item.children) {
|
|
56
60
|
const isTop = depth === 0;
|