Skip to content

Commit

Permalink
components: add AMWHomeSponsors
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegShchavelev committed Jul 11, 2024
1 parent 2282731 commit 5bb53dd
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .vitepress/data/sponsors.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export const sponsors = [
{
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'
}
]
}
]
26 changes: 26 additions & 0 deletions .vitepress/theme/components/AMWHomeSponsors.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<script setup lang="ts">
import { VPHomeSponsors } from 'vitepress/theme'
import { sponsors } from '../../data/sponsors'
const { message, data } = defineProps({
message: {
type: String,
default:
'Данный сервис является CПО-проектом и его поддержка и развитие зависит только от нашей совместной активности.'
},
data: {
type: Object,
default: () => {
return sponsors ?? []
}
}
})
</script>

<template>
<VPHomeSponsors
v-if="sponsors"
:message="message"
:data="sponsors"
/>
</template>
2 changes: 2 additions & 0 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import DefaultTheme from 'vitepress/theme'

import AMWContribution from './components/AMWContribution.vue'
import AMWDocsAsideMeta from './components/AMWDocsAsideMeta.vue'
import AMWHomeSponsors from './components/AMWHomeSponsors.vue'
import AMWVideo from './components/AMWVideo.vue'

import {
Expand All @@ -29,6 +30,7 @@ export default {
'nav-bar-content-after': () => h(NolebaseEnhancedReadabilitiesMenu),
'nav-screen-content-after': () => h(NolebaseEnhancedReadabilitiesScreenMenu),
'aside-outline-after': () => h(AMWDocsAsideMeta),
'home-features-after': () => h(AMWHomeSponsors)
})
},
enhanceApp({ app, router, siteData }) {
Expand Down
15 changes: 14 additions & 1 deletion .vitepress/theme/styles/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,17 @@

--vp-custom-block-details-border: var(--vp-c-divider);
--vp-custom-block-details-bg: var(--vp-c-bg-soft-up);
}
}

/**
* VPHomeSponsors
* -------------------------------------------------------------------------- */

.vp-sponsor-grid.big .vp-sponsor-grid-image {
max-width: 170px;
max-height: 120px;
}

.VPHomeSponsors .message {
max-width: 800px;
}
Binary file added docs/public/alt-linux-team.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/basealt.png
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 5bb53dd

Please sign in to comment.