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

f9802be7b3c6b9d4db936a80bff2e59d061d45c4
wotaku/docs/.vitepress/theme/components/AnnouncementPill.vue
taskylizard hello world, again319b2575cd 1 year ago

30 lines · 976 bytes

 1<!--
 2  Copyright (c) 2024 taskylizard
 3
 4  Licensed under the Apache License, Version 2.0 (the "License");
 5  you may not use this file except in compliance with the License.
 6  You may obtain a copy of the License at
 7
 8  http://www.apache.org/licenses/LICENSE-2.0
 9
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15-->
16<script setup lang="ts">
17import { useData } from 'vitepress'
18
19const { frontmatter } = useData()
20</script>
21
22<template>
23  <a
24    v-if="frontmatter.hero.announcement"
25    :href="frontmatter.hero.announcement.link"
26    class="mb-3 inline-flex items-center rounded-lg bg-[var(--vp-c-default-soft)] px-4 py-1 text-sm font-semibold"
27  >
28    {{ frontmatter.hero.announcement.title }}
29  </a>
30</template>
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form