Commit 29f661c9a8
Unsigned
Layout: unified · split
docs/.vitepress/theme/components/HomeFeatures.vue +2 −2
| @@ -1,6 +1,5 @@ | ||
| 1 | 1 | <script setup lang="ts"> |
| 2 | 2 | import { computed, ref, watch } from 'vue' |
| 3 | import { renderEmojiShortcodes } from '../../configs/markdown/emoji' | |
| 4 | 3 | import type { HomeCard } from '../../configs/constants' |
| 5 | 4 | |
| 6 | 5 | const props = defineProps<{ cards: HomeCard[] }>() |
| @@ -55,7 +54,8 @@ const grid = computed(() => { | ||
| 55 | 54 | }) |
| 56 | 55 | |
| 57 | 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 | 61 | /* ── Manager panel ── */ |