Skip to content

Commit

Permalink
docs: add voidzero logo to the sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-es committed Nov 26, 2024
1 parent 1180d4b commit 0b5e112
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 17 deletions.
11 changes: 6 additions & 5 deletions .vitepress/theme/components/AsideSponsors.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
<script setup lang="ts">
import { computed } from 'vue'
import { VPDocAsideSponsors } from 'vitepress/theme'
import { useSponsor } from '../composables/sponsor'
import { useSponsor, voidZero } from '../composables/sponsor'
const { data } = useSponsor()
const sponsors = computed(() => {
return (
data?.value.map((sponsor) => {
return [
{ size: 'small', items: [voidZero] },
...(data?.value.map((sponsor) => {
return {
size: sponsor.size === 'big' ? 'mini' : 'xmini',
items: sponsor.items,
}
}) ?? []
)
}) ?? []),
]
})
</script>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup>
import { useSponsor } from '../../../composables/sponsor'
import { useSponsor, voidZero } from '../../../composables/sponsor'
import { VPSponsors } from 'vitepress/theme'
const { data } = useSponsor()
Expand Down Expand Up @@ -54,8 +54,8 @@ const { data } = useSponsor()

<h4>提供</h4>
<div class="voidzero">
<a href="https://voidzero.dev" target="_blank">
<img src="./voidzero.svg" />
<a :href="voidZero.url" target="_blank">
<img :src="voidZero.img" />
</a>
</div>

Expand Down Expand Up @@ -121,6 +121,7 @@ const { data } = useSponsor()
position: relative;
display: inline-block;
max-width: 260px;
filter: grayscale(1) invert(1);
}
}
Expand Down
6 changes: 6 additions & 0 deletions .vitepress/theme/composables/sponsor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ const data = ref()
const dataHost = 'https://sponsors.vuejs.org'
const dataUrl = `${dataHost}/vite.json`

export const voidZero = {
name: 'VoidZero',
url: 'https://voidzero.dev',
img: '/voidzero.svg',
} satisfies Sponsor

const viteSponsors: Pick<Sponsors, 'special' | 'gold'> = {
special: [
// sponsors patak-dev
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0b5e112

Please sign in to comment.