Skip to content

Commit

Permalink
feat: add Team view
Browse files Browse the repository at this point in the history
  • Loading branch information
MC-XiaoHei committed Nov 28, 2024
1 parent 72328b1 commit 1ac01f9
Show file tree
Hide file tree
Showing 7 changed files with 145 additions and 28 deletions.
112 changes: 112 additions & 0 deletions docs/.vitepress/theme/components/ProjectTeam.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<script setup lang="ts">
import {VPTeamMembers} from 'vitepress/theme';
const coreMembers = [
{
avatar: avatar('JorelAli'),
name: 'JorelAli',
title: 'Creator',
links: [
githubSocialLink('JorelAli')
]
}, {
avatar: avatar('willkroboth'),
name: 'Will Kroboth',
title: '✨ Special Contributors ✨',
links: [
githubSocialLink('willkroboth')
]
}, {
avatar: avatar('DerEchtePilz'),
name: 'DerEchtePilz',
title: '✨ Special Contributors ✨',
links: [
githubSocialLink('DerEchtePilz')
]
}
]
const otherContributorsList = [
"469512345",
"Sytm",
"MC-XiaoHei",
"Timongcraft",
"Strokkur424",
"AkaGiant",
"Osiris-Team",
"Combustible",
"SB2DD",
"Euphillya",
"CJCrafter",
"Gregzeee",
"powercasgamer",
"agonkolgeci",
"Xemii16",
"Abelkrijgtalles",
"dkim19375",
"misode",
"booky10",
"NextdoorPsycho",
"RedstoneWizard08",
"Kadeluxe",
"EnragedRabisu",
"MatrixTunnel",
"HielkeMinecraft",
"Draycia",
"Minenash",
"Michael-Ziluck",
"portlek"
]
const earlyContributors = [
"Combustible",
"Draycia",
"HielkeMinecraft",
"Minenash",
"Michael-Ziluck",
"portlek",
"469512345"
]
const otherContributors = otherContributorsList.map(name => {
if (earlyContributors.includes(name)) {
return buildContributor(name, "Early Contributor")
} else {
return buildContributor(name)
}
})
function avatar(name: string) {
return `https://wsrv.nl/?url=https://www.github.com/${name}.png`
}
function githubSocialLink(name: string) {
return {icon: 'github', link: `https://github.com/${name}`}
}
function buildContributor(name: string, title: string = "Contributor") {
return {
avatar: avatar(name),
name: name,
title: title,
links: [
githubSocialLink(name)
]
}
}
</script>

<template>
<div>
<br/>
<h1>Brought to you by</h1>
<VPTeamMembers size="medium" :members="coreMembers"/>
<h3>Other Contributors</h3>
<VPTeamMembers size="small" :members="otherContributors"/>
</div>
</template>

<style scoped>
</style>
8 changes: 4 additions & 4 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type {Theme} from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import PluginTabs from './components/PluginTabs.vue'
import PluginTabsTab from './components/PluginTabsTab.vue'
import PluginTabs from './tabs/PluginTabs.vue'
import PluginTabsTab from './tabs/PluginTabsTab.vue'
import {provideTabsSharedState} from './tabs/useTabsSelectedState'
import PreferenceSwitch from './components/PreferenceSwitch.vue';
import PreferenceSwitch from './prefer/PreferenceSwitch.vue';
import mediumZoom from "medium-zoom";
import {onMounted, watch, nextTick, h} from 'vue'
import {useData, useRoute} from 'vitepress'
import AuthorsComponent from "./components/Authors.vue";
import AuthorsComponent from "./components/PageAuthors.vue";
import {NolebaseEnhancedReadabilitiesMenu, NolebaseEnhancedReadabilitiesScreenMenu} from "@nolebase/vitepress-plugin-enhanced-readabilities";

import './style/global.css'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
preferMavenKey,
preferMojmap,
preferMojmapKey,
} from "../prefer/prefer";
} from "./prefer";

const {frontmatter} = useData();
let preferencesToDisplay: Ref<string[]> = ref();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

<script setup lang="ts">
import { ref, toRef } from 'vue'
import { useStabilizeScrollPosition } from '../tabs/useStabilizeScrollPosition'
import { useTabsSelectedState } from '../tabs/useTabsSelectedState'
import { useUid } from '../tabs/useUid'
import { useTabLabels } from '../tabs/useTabLabels'
import { provideTabsSingleState } from '../tabs/useTabsSingleState'
import { useStabilizeScrollPosition } from './useStabilizeScrollPosition'
import { useTabsSelectedState } from './useTabsSelectedState'
import { useUid } from './useUid'
import { useTabLabels } from './useTabLabels'
import { provideTabsSingleState } from './useTabsSingleState'

const props = defineProps<{ sharedStateKey?: string }>()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--copy from https://github.com/sapphi-red/vitepress-plugins , original license is MIT-->

<script setup lang="ts">
import { useTabsSingleState } from '../tabs/useTabsSingleState'
import { useTabsSingleState } from './useTabsSingleState'

defineProps<{ label: string }>()

Expand Down
39 changes: 22 additions & 17 deletions docs/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,29 @@
layout: home

hero:
name: "Command API"
tagline: An API for the command UI introduced in Minecraft 1.13
actions:
- theme: brand
text: Introduction
link: /intro
- theme: alt
text: Download
link: https://github.com/CommandAPI/CommandAPI/releases/latest
name: "Command API"
tagline: An API for the command UI introduced in Minecraft 1.13
actions:
- theme: brand
text: Introduction
link: /intro
- theme: alt
text: Download
link: https://github.com/CommandAPI/CommandAPI/releases/latest

features:
- title: Better Commands & Arguments
details: Prevent invalid commands and support over 50 arguments with built-in error checking, suggestions, tooltips, and precise permission.
- title: Just Like Vanilla Commands
details: Let your command to be executed by the built in <code>/execute</code> command, commandblocks, functions and tags.
- title: Easy to Register
details: No need to edit <code>plugin.yml</code>, supports Kotlin DSL, and Brigadier-like <code>CommandTree</code>. And provide detailed documentation.

- title: Better Commands & Arguments
details: Prevent invalid commands and support over 50 arguments with built-in error checking, suggestions, tooltips, and precise permission.
- title: Just Like Vanilla Commands
details: Let your command to be executed by the built in <code>/execute</code> command, commandblocks, functions and tags.
- title: Easy to Register
details: No need to edit <code>plugin.yml</code>, supports Kotlin DSL, and Brigadier-like <code>CommandTree</code>. And provide detailed documentation.
---

<br/>
<script setup>

import ProjectTeam from '../.vitepress/theme/components/ProjectTeam.vue';

</script>

<ProjectTeam></ProjectTeam>

0 comments on commit 1ac01f9

Please sign in to comment.