Skip to content

Commit d5952da

Browse files
committed
feat: component optimization
1 parent bd49c2f commit d5952da

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

theme/components/plugins/SakuraTwikoo.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
<script lang="ts" setup>
2-
import { useTwikooWithOptions } from 'valaxy-addon-twikoo'
3-
2+
import * as addonTwikoo from 'valaxy-addon-twikoo'
43
import 'valaxy-addon-twikoo/client/styles/index.scss'
4+
import { isEmptyAddon } from 'valaxy'
5+
6+
if (isEmptyAddon(addonTwikoo))
7+
throw new Error('Please install valaxy-addon-twikoo')
58
6-
useTwikooWithOptions()
9+
addonTwikoo.useTwikooWithOptions()
710
</script>
811

912
<template>

theme/components/themes/ArticleThemeCard.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ const isMounted = useMounted()
2323
<SakuraDate :date="post.date" />
2424
</div>
2525
<RouterLink :to="post.path || ''" :aria-label="`Read more about ${post.title}`">
26-
<div class="title my-2">
26+
<div class="title">
2727
{{ post.title }}
2828
</div>
29-
<div class="mb-3 text-[var(--st-c-text-secondary)] dark:text-[var(--st-c-text-secondary)]" v-html="post.excerpt" />
29+
<div class="mb-2.25 text-[var(--st-c-text-secondary)] dark:text-[var(--st-c-text-secondary)]" v-html="post.excerpt" />
3030
</RouterLink>
3131

3232
<div class="inline-flex">

0 commit comments

Comments
 (0)