-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from MisledWater79/main
Update Raknet start.md
- Loading branch information
Showing
12 changed files
with
180 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<script setup lang="ts"> | ||
import DefaultTheme from 'vitepress/theme'; | ||
import { useData } from "vitepress"; | ||
import { ref, watch, onMounted } from "vue"; | ||
const { Layout } = DefaultTheme; | ||
const { frontmatter } = useData(); | ||
const contributors = ref([]); | ||
async function getGitHubAuthor(login) { | ||
const headers = { | ||
...(!!import.meta.env.GITHUB_TOKEN && { | ||
Authorization: `Bearer ${import.meta.env.GITHUB_TOKEN}`, | ||
}), | ||
}; | ||
try { | ||
const res = await fetch(`https://api.github.com/users/${login}`, { headers }); | ||
if (res.ok) { | ||
return await res.json(); | ||
} else { | ||
console.error(`Failed to fetch GitHub user: ${login}`); | ||
return null; | ||
} | ||
} catch (e) { | ||
console.error(e); | ||
return null; | ||
} | ||
} | ||
async function getContributors() { | ||
if (!Array.isArray(frontmatter.value.mentions)) return []; | ||
const contributorsList = []; | ||
for (const login of frontmatter.value.mentions) { | ||
const user = await getGitHubAuthor(login); | ||
if (user) contributorsList.push(user); | ||
} | ||
return contributorsList; | ||
}; | ||
watch(frontmatter, async () => { | ||
contributors.value = await getContributors(); | ||
}); | ||
onMounted(async () => { | ||
contributors.value = await getContributors(); | ||
}); | ||
</script> | ||
|
||
<template> | ||
<Suspense> | ||
<Layout> | ||
<template v-if="frontmatter.Layout != 'home'" #doc-footer-before> | ||
<hr style="margin: 16px 0; border: none; border-top: 1px solid var(--vp-c-divider);"> | ||
<h2 class="contributors" style="font-size: large; font-weight: 600;">Contributors</h2> | ||
<div v-if="contributors.length > 0" class="contributors"> | ||
<a | ||
v-for="contributor in contributors" | ||
:key="contributor.login" | ||
:href="contributor.html_url" | ||
:alt="contributor.login" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<img :src="contributor.avatar_url" :alt="contributor.login" :title="contributor.login" /> | ||
</a> | ||
</div> | ||
<div v-else>No contributors found.</div> | ||
</template> | ||
</Layout> | ||
</Suspense> | ||
</template> | ||
|
||
<style lang="css"> | ||
.contributors { | ||
a { | ||
display: inline-block; | ||
background-color: var(--bg-color); | ||
border: var(--border); | ||
border-radius: 50%; | ||
overflow: hidden; | ||
line-height: 1; | ||
margin-inline: 0.2em -0.6em; | ||
transition-delay: 0.1s; | ||
transition: | ||
margin 0.2s, | ||
transform 0.2s; | ||
img { | ||
width: 2em; | ||
height: 2em; | ||
vertical-align: middle; | ||
} | ||
&:hover { | ||
transform: translateY(-0.3em); | ||
} | ||
} | ||
&:hover, | ||
&:focus-within { | ||
a { | ||
margin-right: 0.2em; | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
--- | ||
mentions: | ||
- akashic-records-of-the-abyss | ||
- theaddonn | ||
--- | ||
|
||
# Codec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
mentions: | ||
- akashic-records-of-the-abyss | ||
- theaddonn | ||
--- | ||
|
||
# Login |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# NBTs | ||
--- | ||
mentions: | ||
- akashic-records-of-the-abyss | ||
- theaddonn | ||
--- | ||
|
||
NBTs in the Bedrock Protocol. | ||
# NBTs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
--- | ||
mentions: | ||
- akashic-records-of-the-abyss | ||
- theaddonn | ||
--- | ||
|
||
# Bedrock Protocol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
--- | ||
mentions: | ||
- MisledWater79 | ||
--- | ||
|
||
# Contribute Guide | ||
|
||
Welcome to the community! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
--- | ||
mentions: | ||
- akashic-records-of-the-abyss | ||
- theaddonn | ||
--- | ||
|
||
# NetherNet Protocol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
# Data Types | ||
--- | ||
mentions: | ||
- akashic-records-of-the-abyss | ||
- theaddonn | ||
--- | ||
|
||
# Data Types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
mentions: | ||
- akashic-records-of-the-abyss | ||
- theaddonn | ||
--- | ||
|
||
# Frames |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters