@commonpub/layer 0.7.2 → 0.7.4
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/components/CommentSection.vue +4 -4
- package/components/ContentAttachments.vue +4 -4
- package/components/DiscussionItem.vue +1 -1
- package/components/FeedItem.vue +1 -1
- package/components/MessageThread.vue +1 -1
- package/components/NotificationItem.vue +1 -1
- package/components/editors/ArticleEditor.vue +11 -12
- package/components/editors/BlogEditor.vue +17 -18
- package/components/editors/ExplainerEditor.vue +13 -14
- package/components/editors/ProjectEditor.vue +17 -18
- package/components/hub/HubHero.vue +2 -2
- package/components/hub/HubLayout.vue +1 -1
- package/components/hub/HubProducts.vue +2 -2
- package/components/hub/HubSidebarCard.vue +2 -2
- package/components/views/ArticleView.vue +15 -15
- package/components/views/BlogView.vue +14 -14
- package/components/views/ExplainerView.vue +11 -11
- package/components/views/ProjectView.vue +36 -36
- package/composables/useMarkdownImport.ts +1 -1
- package/package.json +9 -9
- package/pages/admin/theme.vue +1 -1
- package/pages/authorize_interaction.vue +1 -1
- package/pages/docs/[siteSlug]/edit.vue +4 -4
- package/pages/federated-hubs/[id]/index.vue +6 -6
- package/pages/federated-hubs/[id]/posts/[postId].vue +5 -5
- package/pages/hubs/[slug]/index.vue +6 -6
- package/pages/hubs/[slug]/posts/[postId].vue +6 -6
- package/pages/hubs/index.vue +2 -2
- package/pages/mirror/[id].vue +2 -2
- package/pages/u/[username]/[type]/[slug]/edit.vue +2 -1
- package/server/api/docs/[siteSlug]/search.get.ts +2 -1
- package/theme/components.css +2 -2
- package/theme/layouts.css +2 -2
- package/theme/prose.css +4 -4
- package/components/editors/BlockCanvas.vue +0 -487
- package/components/editors/BlockInsertZone.vue +0 -84
- package/components/editors/BlockPicker.vue +0 -285
- package/components/editors/BlockWrapper.vue +0 -192
- package/components/editors/EditorBlocks.vue +0 -248
- package/components/editors/EditorSection.vue +0 -81
- package/components/editors/EditorShell.vue +0 -196
- package/components/editors/EditorTagInput.vue +0 -114
- package/components/editors/EditorVisibility.vue +0 -110
- package/components/editors/blocks/BuildStepBlock.vue +0 -102
- package/components/editors/blocks/CalloutBlock.vue +0 -122
- package/components/editors/blocks/CheckpointBlock.vue +0 -27
- package/components/editors/blocks/CodeBlock.vue +0 -177
- package/components/editors/blocks/DividerBlock.vue +0 -22
- package/components/editors/blocks/DownloadsBlock.vue +0 -41
- package/components/editors/blocks/EmbedBlock.vue +0 -20
- package/components/editors/blocks/GalleryBlock.vue +0 -236
- package/components/editors/blocks/HeadingBlock.vue +0 -96
- package/components/editors/blocks/ImageBlock.vue +0 -271
- package/components/editors/blocks/MarkdownBlock.vue +0 -258
- package/components/editors/blocks/MathBlock.vue +0 -37
- package/components/editors/blocks/PartsListBlock.vue +0 -358
- package/components/editors/blocks/QuizBlock.vue +0 -47
- package/components/editors/blocks/QuoteBlock.vue +0 -101
- package/components/editors/blocks/SectionHeaderBlock.vue +0 -130
- package/components/editors/blocks/SliderBlock.vue +0 -318
- package/components/editors/blocks/TextBlock.vue +0 -201
- package/components/editors/blocks/ToolListBlock.vue +0 -70
- package/components/editors/blocks/VideoBlock.vue +0 -22
- package/composables/useBlockEditor.ts +0 -187
|
@@ -174,7 +174,7 @@ useSeoMeta({
|
|
|
174
174
|
margin-bottom: 20px;
|
|
175
175
|
padding: 8px;
|
|
176
176
|
background: var(--surface2);
|
|
177
|
-
border:
|
|
177
|
+
border: var(--border-width-default) solid var(--border);
|
|
178
178
|
}
|
|
179
179
|
.cpub-authorize-success {
|
|
180
180
|
color: var(--green, #22c55e);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { BlockTuple } from '@commonpub/editor';
|
|
3
|
-
import type
|
|
3
|
+
import { BlockCanvas, EditorShell, useBlockEditor, type BlockTypeGroup } from '@commonpub/editor/vue';
|
|
4
4
|
import type { PageTreeItem } from '../../../components/editors/DocsPageTree.vue';
|
|
5
5
|
|
|
6
6
|
definePageMeta({ layout: false, middleware: 'auth' });
|
|
@@ -489,7 +489,7 @@ async function createVersion(): Promise<void> {
|
|
|
489
489
|
</div>
|
|
490
490
|
|
|
491
491
|
<!-- 3-panel editor -->
|
|
492
|
-
<
|
|
492
|
+
<EditorShell :show-left-sidebar="true" :show-right-sidebar="!!selectedPageId">
|
|
493
493
|
<!-- LEFT: Page tree -->
|
|
494
494
|
<template #left>
|
|
495
495
|
<div class="cpub-docs-left-header">
|
|
@@ -543,7 +543,7 @@ async function createVersion(): Promise<void> {
|
|
|
543
543
|
</div>
|
|
544
544
|
|
|
545
545
|
<!-- Block canvas -->
|
|
546
|
-
<
|
|
546
|
+
<BlockCanvas
|
|
547
547
|
:block-editor="blockEditor"
|
|
548
548
|
:block-types="blockTypes"
|
|
549
549
|
/>
|
|
@@ -649,7 +649,7 @@ async function createVersion(): Promise<void> {
|
|
|
649
649
|
</span>
|
|
650
650
|
</span>
|
|
651
651
|
</template>
|
|
652
|
-
</
|
|
652
|
+
</EditorShell>
|
|
653
653
|
|
|
654
654
|
<!-- Markdown import dialog -->
|
|
655
655
|
<EditorsMarkdownImportDialog
|
|
@@ -506,7 +506,7 @@ async function handlePostVote(postId: string): Promise<void> {
|
|
|
506
506
|
|
|
507
507
|
<style scoped>
|
|
508
508
|
/* Federation indicator (inside hero banner) */
|
|
509
|
-
.cpub-fed-indicator { background: var(--accent-bg); border-bottom:
|
|
509
|
+
.cpub-fed-indicator { background: var(--accent-bg); border-bottom: var(--border-width-default) solid var(--accent-border); }
|
|
510
510
|
.cpub-fed-indicator {
|
|
511
511
|
padding: 6px 24px;
|
|
512
512
|
display: flex; align-items: center; gap: 8px;
|
|
@@ -531,7 +531,7 @@ async function handlePostVote(postId: string): Promise<void> {
|
|
|
531
531
|
}
|
|
532
532
|
.cpub-compose-type-btn {
|
|
533
533
|
font-size: 11px; font-weight: 600; padding: 4px 10px;
|
|
534
|
-
border:
|
|
534
|
+
border: var(--border-width-default) solid var(--border); background: var(--surface2);
|
|
535
535
|
color: var(--text-dim); cursor: pointer;
|
|
536
536
|
display: flex; align-items: center; gap: 4px;
|
|
537
537
|
}
|
|
@@ -540,7 +540,7 @@ async function handlePostVote(postId: string): Promise<void> {
|
|
|
540
540
|
}
|
|
541
541
|
.cpub-compose-row { display: flex; gap: 8px; align-items: center; }
|
|
542
542
|
.cpub-compose-input {
|
|
543
|
-
flex: 1; background: var(--surface2); border:
|
|
543
|
+
flex: 1; background: var(--surface2); border: var(--border-width-default) solid var(--border);
|
|
544
544
|
padding: 10px 14px; font-size: 0.8125rem;
|
|
545
545
|
color: var(--text); font-family: inherit;
|
|
546
546
|
}
|
|
@@ -574,7 +574,7 @@ async function handlePostVote(postId: string): Promise<void> {
|
|
|
574
574
|
.cpub-shared-card-type {
|
|
575
575
|
font-size: 9px; font-family: var(--font-mono); text-transform: uppercase;
|
|
576
576
|
letter-spacing: 0.08em; color: var(--accent); background: var(--accent-bg);
|
|
577
|
-
border:
|
|
577
|
+
border: var(--border-width-default) solid var(--accent-border); padding: 2px 6px;
|
|
578
578
|
display: inline-block; margin-bottom: 6px;
|
|
579
579
|
}
|
|
580
580
|
.cpub-shared-card-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
|
|
@@ -623,7 +623,7 @@ async function handlePostVote(postId: string): Promise<void> {
|
|
|
623
623
|
display: inline-flex; align-items: center; gap: 4px;
|
|
624
624
|
font-size: 0.6875rem; font-weight: 600;
|
|
625
625
|
color: var(--accent); background: var(--accent-bg);
|
|
626
|
-
padding: 4px 12px; border:
|
|
626
|
+
padding: 4px 12px; border: var(--border-width-default) solid var(--accent-border);
|
|
627
627
|
}
|
|
628
628
|
|
|
629
629
|
/* Sidebar */
|
|
@@ -646,7 +646,7 @@ async function handlePostVote(postId: string): Promise<void> {
|
|
|
646
646
|
font-size: 12px; color: var(--text-dim); line-height: 1.5;
|
|
647
647
|
padding: 6px 0;
|
|
648
648
|
}
|
|
649
|
-
.cpub-rule-item + .cpub-rule-item { border-top:
|
|
649
|
+
.cpub-rule-item + .cpub-rule-item { border-top: var(--border-width-default) solid var(--border2); }
|
|
650
650
|
.cpub-rule-num {
|
|
651
651
|
font-family: var(--font-mono); font-size: 10px; font-weight: 700;
|
|
652
652
|
color: var(--accent); flex-shrink: 0; width: 18px; text-align: center;
|
|
@@ -243,7 +243,7 @@ useHead({
|
|
|
243
243
|
<style scoped>
|
|
244
244
|
.cpub-post-page { max-width: 800px; margin: 0 auto; padding: 0 16px 40px; }
|
|
245
245
|
|
|
246
|
-
.cpub-fed-banner { background: var(--accent-bg); border-bottom:
|
|
246
|
+
.cpub-fed-banner { background: var(--accent-bg); border-bottom: var(--border-width-default) solid var(--accent-border); margin: 0 -16px 16px; }
|
|
247
247
|
.cpub-fed-banner-inner {
|
|
248
248
|
max-width: 800px; margin: 0 auto; padding: 8px 16px;
|
|
249
249
|
display: flex; align-items: center; gap: 8px;
|
|
@@ -280,7 +280,7 @@ useHead({
|
|
|
280
280
|
display: inline-block; padding: 2px 8px; font-family: var(--font-mono);
|
|
281
281
|
font-size: 10px; font-weight: 600; text-transform: uppercase;
|
|
282
282
|
letter-spacing: 0.05em; color: var(--accent); background: var(--accent-bg);
|
|
283
|
-
border:
|
|
283
|
+
border: var(--border-width-default) solid var(--accent-border);
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
.cpub-post-content {
|
|
@@ -297,7 +297,7 @@ useHead({
|
|
|
297
297
|
|
|
298
298
|
.cpub-post-avatar {
|
|
299
299
|
width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
|
|
300
|
-
background: var(--surface2); border:
|
|
300
|
+
background: var(--surface2); border: var(--border-width-default) solid var(--border);
|
|
301
301
|
font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--text-dim);
|
|
302
302
|
overflow: hidden;
|
|
303
303
|
}
|
|
@@ -313,7 +313,7 @@ useHead({
|
|
|
313
313
|
.cpub-post-action-btn {
|
|
314
314
|
display: inline-flex; align-items: center; gap: 4px;
|
|
315
315
|
font-size: 12px; color: var(--text-faint); background: none; border: none; cursor: pointer;
|
|
316
|
-
padding: 4px 8px; border:
|
|
316
|
+
padding: 4px 8px; border: var(--border-width-default) solid var(--border); transition: all 0.1s;
|
|
317
317
|
}
|
|
318
318
|
.cpub-post-action-btn:hover:not(:disabled) { color: var(--accent); border-color: var(--accent-border); }
|
|
319
319
|
.cpub-post-action-btn.active { color: var(--red); border-color: var(--red); }
|
|
@@ -354,7 +354,7 @@ useHead({
|
|
|
354
354
|
|
|
355
355
|
.cpub-reply-avatar {
|
|
356
356
|
width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
|
|
357
|
-
background: var(--surface2); border:
|
|
357
|
+
background: var(--surface2); border: var(--border-width-default) solid var(--border);
|
|
358
358
|
font-family: var(--font-mono); font-size: 9px; font-weight: 700; color: var(--text-dim);
|
|
359
359
|
overflow: hidden;
|
|
360
360
|
}
|
|
@@ -422,7 +422,7 @@ async function onRefreshGallery(): Promise<void> {
|
|
|
422
422
|
/* Compose bar */
|
|
423
423
|
.cpub-compose-bar {
|
|
424
424
|
background: var(--surface);
|
|
425
|
-
border:
|
|
425
|
+
border: var(--border-width-default) solid var(--border);
|
|
426
426
|
border-radius: 12px;
|
|
427
427
|
padding: 12px 14px;
|
|
428
428
|
margin-bottom: 16px;
|
|
@@ -441,7 +441,7 @@ async function onRefreshGallery(): Promise<void> {
|
|
|
441
441
|
letter-spacing: 0.04em;
|
|
442
442
|
padding: 4px 10px;
|
|
443
443
|
background: none;
|
|
444
|
-
border:
|
|
444
|
+
border: var(--border-width-default) solid var(--border);
|
|
445
445
|
border-radius: 6px;
|
|
446
446
|
color: var(--text-faint);
|
|
447
447
|
cursor: pointer;
|
|
@@ -458,7 +458,7 @@ async function onRefreshGallery(): Promise<void> {
|
|
|
458
458
|
.cpub-compose-input {
|
|
459
459
|
flex: 1;
|
|
460
460
|
background: var(--surface2);
|
|
461
|
-
border:
|
|
461
|
+
border: var(--border-width-default) solid var(--border);
|
|
462
462
|
border-radius: 8px;
|
|
463
463
|
padding: 10px 14px;
|
|
464
464
|
font-size: 0.8125rem;
|
|
@@ -466,7 +466,7 @@ async function onRefreshGallery(): Promise<void> {
|
|
|
466
466
|
cursor: pointer;
|
|
467
467
|
}
|
|
468
468
|
|
|
469
|
-
.cpub-post-error { font-size: 0.75rem; color: var(--red); background: var(--red-bg); border:
|
|
469
|
+
.cpub-post-error { font-size: 0.75rem; color: var(--red); background: var(--red-bg); border: var(--border-width-default) solid var(--red-border); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
|
|
470
470
|
|
|
471
471
|
/* Member badge */
|
|
472
472
|
.cpub-member-badge {
|
|
@@ -478,7 +478,7 @@ async function onRefreshGallery(): Promise<void> {
|
|
|
478
478
|
color: var(--green);
|
|
479
479
|
background: var(--green-bg);
|
|
480
480
|
padding: 4px 12px;
|
|
481
|
-
border:
|
|
481
|
+
border: var(--border-width-default) solid var(--green-border);
|
|
482
482
|
border-radius: 20px;
|
|
483
483
|
}
|
|
484
484
|
|
|
@@ -488,7 +488,7 @@ async function onRefreshGallery(): Promise<void> {
|
|
|
488
488
|
|
|
489
489
|
.cpub-mod-avatar {
|
|
490
490
|
width: 32px; height: 32px; border-radius: 50%;
|
|
491
|
-
background: var(--accent-bg); border:
|
|
491
|
+
background: var(--accent-bg); border: var(--border-width-default) solid var(--accent-border);
|
|
492
492
|
display: flex; align-items: center; justify-content: center;
|
|
493
493
|
font-size: 11px; font-weight: 600; color: var(--accent); flex-shrink: 0;
|
|
494
494
|
overflow: hidden;
|
|
@@ -320,7 +320,7 @@ useSeoMeta({
|
|
|
320
320
|
display: inline-block; padding: 2px 8px; font-family: var(--font-mono);
|
|
321
321
|
font-size: 10px; font-weight: 600; text-transform: uppercase;
|
|
322
322
|
letter-spacing: 0.05em; color: var(--accent); background: var(--accent-bg);
|
|
323
|
-
border:
|
|
323
|
+
border: var(--border-width-default) solid var(--accent-border);
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
.cpub-post-locked { font-size: 11px; color: var(--text-faint); }
|
|
@@ -352,7 +352,7 @@ useSeoMeta({
|
|
|
352
352
|
|
|
353
353
|
.cpub-post-avatar {
|
|
354
354
|
width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
|
|
355
|
-
background: var(--surface2); border:
|
|
355
|
+
background: var(--surface2); border: var(--border-width-default) solid var(--border);
|
|
356
356
|
font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--text-dim);
|
|
357
357
|
overflow: hidden;
|
|
358
358
|
}
|
|
@@ -368,14 +368,14 @@ useSeoMeta({
|
|
|
368
368
|
.cpub-post-action-btn {
|
|
369
369
|
display: inline-flex; align-items: center; gap: 4px;
|
|
370
370
|
font-size: 12px; color: var(--text-faint); background: none; border: none; cursor: pointer;
|
|
371
|
-
padding: 4px 8px; border:
|
|
371
|
+
padding: 4px 8px; border: var(--border-width-default) solid var(--border); transition: all 0.1s;
|
|
372
372
|
}
|
|
373
373
|
.cpub-post-action-btn:hover:not(:disabled) { color: var(--accent); border-color: var(--accent-border); }
|
|
374
374
|
.cpub-post-action-btn.active { color: var(--red); border-color: var(--red); }
|
|
375
375
|
.cpub-post-action-btn:disabled { opacity: 0.5; cursor: default; }
|
|
376
376
|
|
|
377
377
|
.cpub-post-mod-bar {
|
|
378
|
-
margin-top: 12px; padding-top: 12px; border-top:
|
|
378
|
+
margin-top: 12px; padding-top: 12px; border-top: var(--border-width-default) solid var(--border);
|
|
379
379
|
display: flex; gap: 6px;
|
|
380
380
|
}
|
|
381
381
|
|
|
@@ -400,7 +400,7 @@ useSeoMeta({
|
|
|
400
400
|
.cpub-reply-input:focus { outline: none; border-color: var(--accent); }
|
|
401
401
|
|
|
402
402
|
.cpub-post-locked-notice {
|
|
403
|
-
padding: 12px 16px; background: var(--surface2); border:
|
|
403
|
+
padding: 12px 16px; background: var(--surface2); border: var(--border-width-default) solid var(--border);
|
|
404
404
|
font-size: 12px; color: var(--text-faint); margin-bottom: 16px; text-align: center;
|
|
405
405
|
}
|
|
406
406
|
|
|
@@ -420,7 +420,7 @@ useSeoMeta({
|
|
|
420
420
|
|
|
421
421
|
.cpub-reply-avatar {
|
|
422
422
|
width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
|
|
423
|
-
background: var(--surface2); border:
|
|
423
|
+
background: var(--surface2); border: var(--border-width-default) solid var(--border);
|
|
424
424
|
font-family: var(--font-mono); font-size: 9px; font-weight: 700; color: var(--text-dim);
|
|
425
425
|
overflow: hidden;
|
|
426
426
|
}
|
package/pages/hubs/index.vue
CHANGED
|
@@ -170,7 +170,7 @@ function hubLink(hub: Record<string, unknown>): string {
|
|
|
170
170
|
align-items: center;
|
|
171
171
|
gap: 14px;
|
|
172
172
|
padding-top: 10px;
|
|
173
|
-
border-top:
|
|
173
|
+
border-top: var(--border-width-default) solid var(--border2);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
.cpub-hub-card-stat {
|
|
@@ -190,7 +190,7 @@ function hubLink(hub: Record<string, unknown>): string {
|
|
|
190
190
|
letter-spacing: 0.08em;
|
|
191
191
|
color: var(--accent);
|
|
192
192
|
background: var(--accent-bg);
|
|
193
|
-
border:
|
|
193
|
+
border: var(--border-width-default) solid var(--accent-border);
|
|
194
194
|
padding: 2px 6px;
|
|
195
195
|
}
|
|
196
196
|
|
package/pages/mirror/[id].vue
CHANGED
|
@@ -132,7 +132,7 @@ useSeoMeta({
|
|
|
132
132
|
|
|
133
133
|
<style scoped>
|
|
134
134
|
.cpub-fed-banner {
|
|
135
|
-
background: var(--accent-bg); border-bottom:
|
|
135
|
+
background: var(--accent-bg); border-bottom: var(--border-width-default) solid var(--accent-border);
|
|
136
136
|
}
|
|
137
137
|
.cpub-fed-banner-inner {
|
|
138
138
|
max-width: 1200px; margin: 0 auto; padding: 8px 24px;
|
|
@@ -161,7 +161,7 @@ useSeoMeta({
|
|
|
161
161
|
.cpub-mirror-cover { width: 100%; max-height: 400px; object-fit: cover; margin-bottom: 20px; }
|
|
162
162
|
.cpub-mirror-title { font-size: 2rem; font-weight: 800; line-height: 1.2; margin-bottom: 12px; }
|
|
163
163
|
.cpub-mirror-desc { font-size: 1.0625rem; color: var(--text-dim); line-height: 1.6; margin-bottom: 16px; }
|
|
164
|
-
.cpub-mirror-author { font-size: 0.875rem; color: var(--text-dim); margin-bottom: 24px; padding-bottom: 16px; border-bottom:
|
|
164
|
+
.cpub-mirror-author { font-size: 0.875rem; color: var(--text-dim); margin-bottom: 24px; padding-bottom: 16px; border-bottom: var(--border-width-default) solid var(--border); display: flex; align-items: flex-start; gap: 12px; }
|
|
165
165
|
.cpub-mirror-author-avatar { width: 40px; height: 40px; object-fit: cover; border: var(--border-width-default) solid var(--border); flex-shrink: 0; }
|
|
166
166
|
.cpub-mirror-bio { font-size: 0.8125rem; color: var(--text-faint); line-height: 1.5; margin-top: 4px; }
|
|
167
167
|
.cpub-mirror-bio :deep(a) { color: var(--accent); }
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { Component } from 'vue';
|
|
3
3
|
import type { BlockTuple } from '@commonpub/editor';
|
|
4
|
+
import { BlockCanvas, useBlockEditor } from '@commonpub/editor/vue';
|
|
4
5
|
import { isExplainerDocument, createEmptyDocument } from '@commonpub/explainer';
|
|
5
6
|
import type { ExplainerDocument } from '@commonpub/explainer';
|
|
6
7
|
import { ExplainerSectionEditor } from '@commonpub/explainer/vue';
|
|
@@ -434,7 +435,7 @@ async function handleUrlImport(result: ImportedContent): Promise<void> {
|
|
|
434
435
|
<!-- Write mode — fallback generic editor -->
|
|
435
436
|
<div v-else-if="mode === 'write'" class="cpub-editor-shell">
|
|
436
437
|
<div class="cpub-editor-canvas">
|
|
437
|
-
<
|
|
438
|
+
<BlockCanvas :block-editor="blockEditor" :block-types="[]" />
|
|
438
439
|
</div>
|
|
439
440
|
</div>
|
|
440
441
|
|
|
@@ -7,6 +7,7 @@ const searchQuerySchema = z.object({
|
|
|
7
7
|
|
|
8
8
|
export default defineEventHandler(async (event) => {
|
|
9
9
|
const db = useDB();
|
|
10
|
+
const config = useConfig();
|
|
10
11
|
const { siteSlug } = parseParams(event, { siteSlug: 'string' });
|
|
11
12
|
const query = parseQueryParams(event, searchQuerySchema);
|
|
12
13
|
|
|
@@ -16,5 +17,5 @@ export default defineEventHandler(async (event) => {
|
|
|
16
17
|
const version = result.versions?.find((v) => v.isDefault) ?? result.versions?.[0];
|
|
17
18
|
if (!version) return [];
|
|
18
19
|
|
|
19
|
-
return searchDocsPages(db, result.site.id, version.id, query.q ?? '');
|
|
20
|
+
return searchDocsPages(db, result.site.id, version.id, query.q ?? '', config.docs.searchLanguage);
|
|
20
21
|
});
|
package/theme/components.css
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
font-size: var(--text-xs, 12px);
|
|
55
55
|
font-family: var(--font-mono);
|
|
56
56
|
padding: 2px 8px;
|
|
57
|
-
border:
|
|
57
|
+
border: var(--border-width-default) solid var(--border2);
|
|
58
58
|
color: var(--text-dim);
|
|
59
59
|
background: var(--surface2);
|
|
60
60
|
}
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
font-family: var(--font-mono);
|
|
93
93
|
margin-bottom: 12px;
|
|
94
94
|
padding-bottom: 8px;
|
|
95
|
-
border-bottom:
|
|
95
|
+
border-bottom: var(--border-width-thin) solid var(--border2);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
/* ─── SECTION HEADERS ─── */
|
package/theme/layouts.css
CHANGED
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
.cpub-sidebar-section {
|
|
146
146
|
margin-bottom: var(--space-6);
|
|
147
147
|
padding-bottom: var(--space-6);
|
|
148
|
-
border-bottom:
|
|
148
|
+
border-bottom: var(--border-width-thin) solid var(--border2);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
.cpub-sidebar-section:last-child {
|
|
@@ -261,7 +261,7 @@
|
|
|
261
261
|
padding: 2px 8px;
|
|
262
262
|
font-size: var(--text-xs);
|
|
263
263
|
font-weight: var(--font-weight-medium);
|
|
264
|
-
border:
|
|
264
|
+
border: var(--border-width-default) solid var(--border2);
|
|
265
265
|
background: var(--surface2);
|
|
266
266
|
color: var(--text-dim);
|
|
267
267
|
font-family: var(--font-mono);
|
package/theme/prose.css
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
.cpub-prose a {
|
|
55
55
|
color: var(--accent);
|
|
56
56
|
text-decoration: none;
|
|
57
|
-
border-bottom:
|
|
57
|
+
border-bottom: var(--border-width-thin) solid var(--accent-border);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.cpub-prose a:hover {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
color: var(--teal);
|
|
69
69
|
background: var(--surface2);
|
|
70
70
|
padding: 2px 6px;
|
|
71
|
-
border:
|
|
71
|
+
border: var(--border-width-thin) solid var(--border2);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
/* Code blocks */
|
|
@@ -308,7 +308,7 @@
|
|
|
308
308
|
text-align: center;
|
|
309
309
|
padding: var(--space-4);
|
|
310
310
|
background: var(--surface2);
|
|
311
|
-
border:
|
|
311
|
+
border: var(--border-width-thin) solid var(--border2);
|
|
312
312
|
font-size: var(--text-lg);
|
|
313
313
|
}
|
|
314
314
|
|
|
@@ -327,7 +327,7 @@
|
|
|
327
327
|
.cpub-prose th,
|
|
328
328
|
.cpub-prose td {
|
|
329
329
|
padding: var(--space-2) var(--space-3);
|
|
330
|
-
border:
|
|
330
|
+
border: var(--border-width-thin) solid var(--border2);
|
|
331
331
|
text-align: left;
|
|
332
332
|
}
|
|
333
333
|
|