Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .vitepress/friendLinks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export class RelatedLinkObject {
title: string;
link: string;
desc: string;

constructor(title: string, link: string, desc: string) {
this.title = title;
this.link = link;
this.desc = desc;
}
}

export const FriendLinks: RelatedLinkObject[] = [
new RelatedLinkObject('Microsoft Learn*', 'https://learn.microsoft.com/', '微软官方文档'),
new RelatedLinkObject('Skript Hub*', 'https://skripthub.net/', '第三方Skript文档'),
new RelatedLinkObject('【续】维基档案馆', 'https://continue-project.netlify.app/', 'SnowCutie的插件文档汉化合集Continue Project'),
new RelatedLinkObject('LeafMC Docs', 'https://www.leafmc.one/zh/docs/getting-started', '高性能优化服务端Leaf的官方文档'),
new RelatedLinkObject('Natsurainko\'s blog', 'https://natsurainko.github.io/', '开发者Natsurainko的博客,积累了一些相关教程。'),
new RelatedLinkObject('NitWikit^?', 'https://nitwikit.8aka.org', '十分详尽的第三方 MC 开服教程'),
];

export const Sponsors: RelatedLinkObject[] = [
new RelatedLinkObject('云联小白/集云社', 'https://idc.mcmc.run/', '专注游戏服务器租赁的服务商【云联小白】,其长期为CMFS提供免费服务器。联系QQ:395426'),
]
20 changes: 20 additions & 0 deletions .vitepress/theme/RelatedLink.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<script setup lang="ts">
import { defineProps } from 'vue';
import { RelatedLinkObject } from '../friendLinks';

const props = defineProps<
{
link: RelatedLinkObject,
isSponsor?: boolean,
}
>();
</script>
<template>
<a :class="`bitter exlink ${isSponsor ? 'card-like' : ''}`"
target="_blank"
:href="props.link!.link"
:title="props.link!.desc">
<span :style="`font-weight: ${isSponsor ? 'bold' : 'normal'}; font-size: ${isSponsor ? 'x-large' : 'medium'};`">{{ props.link!.title }}</span>
<p class="smaller" v-if="isSponsor">{{ link.desc }}</p>
</a>
</template>
Loading