Skip to content

Commit

Permalink
.vitepress: update data on frontmatter
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegShchavelev committed Jul 11, 2024
1 parent defdf0e commit 8b2218c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 35 deletions.
18 changes: 0 additions & 18 deletions .vitepress/data/sponsors.ts

This file was deleted.

2 changes: 1 addition & 1 deletion .vitepress/theme/components/AMWDocsAsideMeta.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { type Ref, computed } from 'vue'
import { computed } from 'vue'
import { useData } from 'vitepress'
import VPImage from 'vitepress/dist/client/theme-default/components/VPImage.vue';
Expand Down
23 changes: 7 additions & 16 deletions .vitepress/theme/components/AMWHomeSponsors.vue
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
<script setup lang="ts">
import { useData } from 'vitepress'
import { VPHomeSponsors } from 'vitepress/theme'
import { sponsors } from '../../data/sponsors'
const { message } = defineProps({
message: {
type: String,
default:
'Данный сервис является CПО-проектом и его поддержка и развитие зависит только от нашей совместной активности.'
},
data: {
type: Object,
default: () => {
return sponsors ?? []
}
}
})
const { frontmatter } = useData()
const message = frontmatter.value.sponsors.introtext ?? null
const data = frontmatter.value.sponsors.collections ?? {}
</script>

<template>
<VPHomeSponsors
v-if="sponsors"
v-if="data"
:message="message"
:data="sponsors"
:data="data"
/>
</template>
12 changes: 12 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,16 @@ features:
details: Всё знакомо&#58; от сообщества до приложений в операционной системе.
- title: Свобода выбора и открытого ПО
details: Единая инфраструктура для сборки программного обеспечения в общем репозитории «Сизиф»
sponsors:
introtext: Данный сервис является CПО-проектом и его поддержка и развитие зависит только от нашей совместной активности.
collections:
- tier: Организационная структура
size: big
items:
- name: ALT Linux Team
img: ./alt-linux-team.png
url: https://packages.altlinux.org/ru/sisyphus
- name: BaseALT
img: ./basealt.png
url: https://www.basealt.ru
---

0 comments on commit 8b2218c

Please sign in to comment.