Skip to content

Commit

Permalink
docs: update page team, add template contribution
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegShchavelev committed Apr 18, 2024
1 parent 775fcf4 commit 9f8286c
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 28 deletions.
Binary file removed .trash/Screenshot_20240312_164956.png
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { defineConfig } from 'vitepress'
import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'
import markdownItKdb from 'markdown-it-kbd'

import { nav, sidebar } from '../_data/navigations'
import { telegram, gitflic, vk } from '../_data/icons'
import { nav, sidebar } from './_data/navigations'
import { telegram, gitflic, vk } from './_data/icons'
import { normalize } from './utils'

import * as config from './config.json'
Expand Down
39 changes: 39 additions & 0 deletions .vitepress/theme/components/AKWContribution.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<script setup lang="ts">
import { contributions } from '../../_data/team';
import { VPTeamPage, VPTeamPageTitle, VPTeamMembers } from 'vitepress/theme';
import { useData } from 'vitepress'
const { frontmatter } = useData();
const { members, size } = defineProps({
size: {
type: String,
default: 'medium',
},
members: {
type: Object,
default: () => {
return contributions ?? [];
},
},
});
</script>

<template>
<VPTeamPage>
<VPTeamPageTitle>
<template v-if="frontmatter.longtitle" #title>
{{ frontmatter.longtitle }}
</template>
</VPTeamPageTitle>
<VPTeamMembers :members="members" />
</VPTeamPage>
</template>

<style scoped>
.VPTeamPage {
margin-top: 0;
}
</style>
3 changes: 2 additions & 1 deletion .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { enhanceAppWithTabs } from 'vitepress-plugin-tabs/client'


import { lexiconEnhancedReadabilities } from './lexicon/enhanced-readabilities'
import AKWContribution from './components/AKWContribution.vue'

import './styles/style.css'
import './styles/custom.css'
Expand All @@ -25,13 +26,13 @@ export default {
return h(DefaultTheme.Layout, null, {
'nav-bar-content-after': () => h(NolebaseEnhancedReadabilitiesMenu),
'nav-screen-content-after': () => h(NolebaseEnhancedReadabilitiesScreenMenu),
'aside-outline-after': () => h(AKWDocsAsideMeta),
})
},
enhanceApp({ app, router, siteData }) {
app.provide(InjectionKey, {
locales: lexiconEnhancedReadabilities
} as Options)
enhanceAppWithTabs(app)
app.component('contribution', AKWContribution);
}
} satisfies Theme
28 changes: 3 additions & 25 deletions docs/project/contributions/index.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,4 @@
---
layout: page
title: Участники
---

<script setup>
import {
VPTeamPage,
VPTeamPageTitle,
VPTeamMembers
} from 'vitepress/theme'

import { contributions } from '../../../_data/team'

</script>

<VPTeamPage style="margin-top:0">
<VPTeamPageTitle>
<template #title>
{{ $frontmatter.title }}
</template>
</VPTeamPageTitle>
<VPTeamMembers
:members="contributions"
/>
</VPTeamPage>
layout: contribution
longtitle: Участники
---

0 comments on commit 9f8286c

Please sign in to comment.