FMHYedit/.vitepress/theme/components/Announcement.vue

16 lines
380 B
Vue
Raw Normal View History

2023-11-12 16:42:57 +00:00
<script setup lang="ts">
2024-01-25 16:32:45 +00:00
import { useData } from 'vitepress'
2023-11-12 16:42:57 +00:00
2024-01-25 16:32:45 +00:00
const { frontmatter } = useData()
2023-11-12 16:42:57 +00:00
</script>
<template>
<a
v-if="frontmatter.hero.prelink"
:href="frontmatter.hero.prelink.link"
2024-01-25 16:32:45 +00:00
class="inline-flex items-center rounded-lg bg-[var(--vp-c-default-soft)] px-4 py-1 text-sm font-semibold mb-3"
>
2023-11-12 16:42:57 +00:00
{{ frontmatter.hero.prelink.title }}
</a>
</template>