Commit 29f661c9a8
Unsigned
Layout: unified · split
docs/.vitepress/theme/components/HomeFeatures.vue +2 −2
| @@ -1,6 +1,5 @@ | |||
| 1 | <script setup lang="ts"> | 1 | <script setup lang="ts"> |
| 2 | import { computed, ref, watch } from 'vue' | 2 | import { computed, ref, watch } from 'vue' |
| 3 | import { renderEmojiShortcodes } from '../../configs/markdown/emoji' | ||
| 4 | import type { HomeCard } from '../../configs/constants' | 3 | import type { HomeCard } from '../../configs/constants' |
| 5 | 4 | ||
| 6 | const props = defineProps<{ cards: HomeCard[] }>() | 5 | const props = defineProps<{ cards: HomeCard[] }>() |
| @@ -55,7 +54,8 @@ const grid = computed(() => { | |||
| 55 | }) | 54 | }) |
| 56 | 55 | ||
| 57 | function cardIcon(card: HomeCard) { | 56 | function cardIcon(card: HomeCard) { |
| 58 | return renderEmojiShortcodes(card.icon) | 57 | return card.icon.replace(/:([A-Za-z0-9_+-]+):/g, (_, markup) => |
| 58 | `<span class="i-${markup}"></span>`) | ||
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | /* ── Manager panel ── */ | 61 | /* ── Manager panel ── */ |