@farming-labs/nuxt-theme 0.0.2-beta.24 → 0.0.2-beta.26
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 +2 -2
- package/src/components/DocsLayout.vue +111 -109
- package/styles/docs.css +8 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/nuxt-theme",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.26",
|
|
4
4
|
"description": "Nuxt/Vue UI components for @farming-labs/docs — layout, sidebar, TOC, search, and theme toggle",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"sugar-high": "^0.9.5",
|
|
56
|
-
"@farming-labs/docs": "0.0.2-beta.
|
|
56
|
+
"@farming-labs/docs": "0.0.2-beta.26"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"nuxt": ">=3.0.0",
|
|
@@ -304,122 +304,124 @@ const showFloatingAI = computed(
|
|
|
304
304
|
</div>
|
|
305
305
|
|
|
306
306
|
<nav class="fd-sidebar-nav">
|
|
307
|
-
<
|
|
308
|
-
<template v-
|
|
309
|
-
<
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
<
|
|
334
|
-
<span
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
<
|
|
355
|
-
v-if="node.index"
|
|
356
|
-
:to="node.index.url"
|
|
357
|
-
class="fd-sidebar-link fd-sidebar-child-link"
|
|
358
|
-
:class="{ 'fd-sidebar-link-active': isActive(node.index.url) }"
|
|
359
|
-
@click="closeSidebar"
|
|
360
|
-
>
|
|
361
|
-
{{ node.index.name }}
|
|
362
|
-
</NuxtLink>
|
|
363
|
-
<template
|
|
364
|
-
v-for="child in node.children"
|
|
365
|
-
:key="child.name + ((child as any).url ?? '')"
|
|
366
|
-
>
|
|
307
|
+
<slot name="sidebar" :tree="tree" :is-active="isActive">
|
|
308
|
+
<template v-if="tree?.children">
|
|
309
|
+
<template v-for="(node, i) in tree.children" :key="node.name + (node.url ?? '')">
|
|
310
|
+
<NuxtLink
|
|
311
|
+
v-if="node.type === 'page'"
|
|
312
|
+
:to="node.url!"
|
|
313
|
+
class="fd-sidebar-link fd-sidebar-top-link"
|
|
314
|
+
:class="{
|
|
315
|
+
'fd-sidebar-link-active': isActive(node.url ?? ''),
|
|
316
|
+
'fd-sidebar-first-item': i === 0,
|
|
317
|
+
}"
|
|
318
|
+
@click="closeSidebar"
|
|
319
|
+
>
|
|
320
|
+
<span
|
|
321
|
+
v-if="getIcon(node.icon)"
|
|
322
|
+
class="fd-sidebar-icon"
|
|
323
|
+
v-html="getIcon(node.icon)"
|
|
324
|
+
/>
|
|
325
|
+
{{ node.name }}
|
|
326
|
+
</NuxtLink>
|
|
327
|
+
<details
|
|
328
|
+
v-else-if="node.type === 'folder'"
|
|
329
|
+
class="fd-sidebar-folder"
|
|
330
|
+
:class="{ 'fd-sidebar-first-item': i === 0 }"
|
|
331
|
+
open
|
|
332
|
+
>
|
|
333
|
+
<summary class="fd-sidebar-folder-trigger">
|
|
334
|
+
<span class="fd-sidebar-folder-label">
|
|
335
|
+
<span
|
|
336
|
+
v-if="getIcon(node.icon)"
|
|
337
|
+
class="fd-sidebar-icon"
|
|
338
|
+
v-html="getIcon(node.icon)"
|
|
339
|
+
/>
|
|
340
|
+
{{ node.name }}
|
|
341
|
+
</span>
|
|
342
|
+
<svg
|
|
343
|
+
class="fd-sidebar-chevron"
|
|
344
|
+
width="14"
|
|
345
|
+
height="14"
|
|
346
|
+
viewBox="0 0 24 24"
|
|
347
|
+
fill="none"
|
|
348
|
+
stroke="currentColor"
|
|
349
|
+
stroke-width="2"
|
|
350
|
+
>
|
|
351
|
+
<polyline points="6 9 12 15 18 9" />
|
|
352
|
+
</svg>
|
|
353
|
+
</summary>
|
|
354
|
+
<div class="fd-sidebar-folder-content">
|
|
367
355
|
<NuxtLink
|
|
368
|
-
v-if="
|
|
369
|
-
:to="
|
|
356
|
+
v-if="node.index"
|
|
357
|
+
:to="node.index.url"
|
|
370
358
|
class="fd-sidebar-link fd-sidebar-child-link"
|
|
371
|
-
:class="{ 'fd-sidebar-link-active': isActive(
|
|
359
|
+
:class="{ 'fd-sidebar-link-active': isActive(node.index.url) }"
|
|
372
360
|
@click="closeSidebar"
|
|
373
361
|
>
|
|
374
|
-
{{
|
|
362
|
+
{{ node.index.name }}
|
|
375
363
|
</NuxtLink>
|
|
376
|
-
<
|
|
377
|
-
v-
|
|
378
|
-
|
|
379
|
-
open
|
|
364
|
+
<template
|
|
365
|
+
v-for="child in node.children"
|
|
366
|
+
:key="child.name + ((child as any).url ?? '')"
|
|
380
367
|
>
|
|
381
|
-
<
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
368
|
+
<NuxtLink
|
|
369
|
+
v-if="child.type === 'page'"
|
|
370
|
+
:to="(child as any).url"
|
|
371
|
+
class="fd-sidebar-link fd-sidebar-child-link"
|
|
372
|
+
:class="{ 'fd-sidebar-link-active': isActive((child as any).url) }"
|
|
373
|
+
@click="closeSidebar"
|
|
374
|
+
>
|
|
375
|
+
{{ child.name }}
|
|
376
|
+
</NuxtLink>
|
|
377
|
+
<details
|
|
378
|
+
v-else-if="child.type === 'folder'"
|
|
379
|
+
class="fd-sidebar-folder fd-sidebar-nested-folder"
|
|
380
|
+
open
|
|
381
|
+
>
|
|
382
|
+
<summary class="fd-sidebar-folder-trigger">
|
|
383
|
+
<span class="fd-sidebar-folder-label">{{ child.name }}</span>
|
|
384
|
+
<svg
|
|
385
|
+
class="fd-sidebar-chevron"
|
|
386
|
+
width="14"
|
|
387
|
+
height="14"
|
|
388
|
+
viewBox="0 0 24 24"
|
|
389
|
+
fill="none"
|
|
390
|
+
stroke="currentColor"
|
|
391
|
+
stroke-width="2"
|
|
392
|
+
>
|
|
393
|
+
<polyline points="6 9 12 15 18 9" />
|
|
394
|
+
</svg>
|
|
395
|
+
</summary>
|
|
396
|
+
<div class="fd-sidebar-folder-content">
|
|
397
|
+
<NuxtLink
|
|
398
|
+
v-if="(child as any).index"
|
|
399
|
+
:to="(child as any).index.url"
|
|
400
|
+
class="fd-sidebar-link fd-sidebar-child-link"
|
|
401
|
+
:class="{ 'fd-sidebar-link-active': isActive((child as any).index.url) }"
|
|
402
|
+
@click="closeSidebar"
|
|
403
|
+
>
|
|
404
|
+
{{ (child as any).index.name }}
|
|
405
|
+
</NuxtLink>
|
|
406
|
+
<NuxtLink
|
|
407
|
+
v-for="grandchild in (child as any).children"
|
|
408
|
+
v-if="grandchild.type === 'page'"
|
|
409
|
+
:key="grandchild.url"
|
|
410
|
+
:to="grandchild.url"
|
|
411
|
+
class="fd-sidebar-link fd-sidebar-child-link"
|
|
412
|
+
:class="{ 'fd-sidebar-link-active': isActive(grandchild.url) }"
|
|
413
|
+
@click="closeSidebar"
|
|
414
|
+
>
|
|
415
|
+
{{ grandchild.name }}
|
|
416
|
+
</NuxtLink>
|
|
417
|
+
</div>
|
|
418
|
+
</details>
|
|
419
|
+
</template>
|
|
420
|
+
</div>
|
|
421
|
+
</details>
|
|
422
|
+
</template>
|
|
421
423
|
</template>
|
|
422
|
-
</
|
|
424
|
+
</slot>
|
|
423
425
|
</nav>
|
|
424
426
|
|
|
425
427
|
<div v-if="showThemeToggle" class="fd-sidebar-footer">
|
package/styles/docs.css
CHANGED
|
@@ -1211,8 +1211,9 @@ html.dark pre.shiki {
|
|
|
1211
1211
|
|
|
1212
1212
|
.fd-edit-on-github {
|
|
1213
1213
|
display: flex;
|
|
1214
|
+
flex-wrap: wrap;
|
|
1214
1215
|
align-items: center;
|
|
1215
|
-
gap: 16px;
|
|
1216
|
+
gap: 10px 16px;
|
|
1216
1217
|
margin-top: 32px;
|
|
1217
1218
|
padding-top: 16px;
|
|
1218
1219
|
border-top: 1px solid var(--color-fd-border);
|
|
@@ -1237,6 +1238,12 @@ html.dark pre.shiki {
|
|
|
1237
1238
|
font-size: 12px;
|
|
1238
1239
|
}
|
|
1239
1240
|
|
|
1241
|
+
@media (max-width: 640px) {
|
|
1242
|
+
.fd-last-modified {
|
|
1243
|
+
width: 100%;
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1240
1247
|
.fd-llms-txt-links {
|
|
1241
1248
|
display: inline-flex;
|
|
1242
1249
|
align-items: center;
|