docs/.vitepress/theme/components/AnnouncementPill.vue

a77bb2b846ea6560da7fbade83f5f330a7920c62
wotaku/docs/.vitepress/theme/components/AnnouncementPill.vue

22 lines · 676 bytes

 1<!--
 2  All Rights Reserved
 3
 4  Copyright (c) 2025 taskylizard
 5
 6  All rights reserved. This code and its associated files may not be copied, modified, distributed, sublicensed, or used in any form, in whole or in part, without prior written permission from the copyright holder.
 7-->
 8<script setup lang="ts">
 9import { useData } from 'vitepress'
10
11const { frontmatter } = useData()
12</script>
13
14<template>
15  <a
16    v-if="frontmatter.hero.announcement"
17    :href="frontmatter.hero.announcement.link"
18    class="mb-3 inline-flex items-center rounded-lg bg-[var(--vp-c-default-soft)] px-4 py-1 text-sm font-semibold"
19  >
20    {{ frontmatter.hero.announcement.title }}
21  </a>
22</template>