Skip to content

Commit 2f86fa9

Browse files
add the title description
1 parent 6c93eac commit 2f86fa9

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

src/components/misc/ElementCard.vue

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
</h6>
88
<ChevronRight />
99
</div>
10+
<div v-if="title">
11+
<slot name="markdown" :content="title.replace(/ *:(?![ /])/g, ': ')" />
12+
</div>
1013
<div class="plugin-info">
1114
<code class="plugin-class">{{ pluginClass }}</code>
1215
</div>
@@ -25,6 +28,7 @@
2528
pluginClass: string
2629
href?: string | undefined
2730
isActive?: boolean
31+
title?: string
2832
}>();
2933
3034
const hrefWithDefault = computed(() => props.href === undefined
@@ -111,5 +115,18 @@
111115
display: block;
112116
}
113117
}
118+
119+
:deep(p) {
120+
color: var(--ks-content-secondary);
121+
font-size: 12px !important;
122+
line-height: 1rem;
123+
margin: 0;
124+
margin-top: 0.5rem;
125+
overflow: hidden;
126+
display: -webkit-box;
127+
-webkit-line-clamp: 2;
128+
line-clamp: 2;
129+
-webkit-box-orient: vertical;
130+
}
114131
}
115132
</style>

src/components/plugins/PluginIndex.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,14 @@
3838
:href="elementHref(element)"
3939
:route-path="routePath"
4040
:is-active="activeId === slugify(element)"
41+
:title="schemas?.[element]?.title"
4142
class="h-100"
4243
@click="$emit('goTo', {element})"
43-
/>
44+
>
45+
<template #markdown="{content}">
46+
<slot name="markdown" :content="content" />
47+
</template>
48+
</ElementCard>
4449
</div>
4550
</div>
4651
</div>
@@ -90,7 +95,8 @@
9095
subGroup?: string | undefined,
9196
activeId?: string | undefined
9297
subgroupBlueprintCounts?: Record<string, number>,
93-
metadataMap?: Record<string, PluginMetadata>
98+
metadataMap?: Record<string, PluginMetadata>,
99+
schemas?: Record<string, {title?: string}>
94100
}>();
95101
96102
const getSubgroupMetadata = (subGroupWrapper: Plugin) => {

0 commit comments

Comments
 (0)