Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议合并并更新vitepress版本 #15

Merged
merged 6 commits into from
Jul 24, 2024
Merged
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
2 changes: 1 addition & 1 deletion .vitepress/navBar/zhCN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const nav: DefaultTheme.NavItem[] = [
{ text: '皮肤规范', link: '/zhCN/skin/' }
]
},
{ text: "我们的团队", link: '/zhCN/team' }
{ text: "我们的团队", link: '/zhCN/guide/team' }
];

export default nav;
92 changes: 58 additions & 34 deletions .vitepress/sideBar/zhCN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,30 @@ export const sidebar: DefaultTheme.SidebarItem[] = [
{text: "开始", link: "/zhCN/guide/"},
{text: "我们的团队", link: '/zhCN/guide/team'},
{text: "指路官方", link: '/zhCN/guide/contact'},
{text: "CSA账户", link: '/zhCN/guide/account'},
{text: "加入我们!", link: '/zhCN/guide/joinus'},
{text: "审核规则", link: '/zhCN/guide/code_of_joining_application'}, // 未就绪
{
text: '标准和规则(公开件)',
link: '/zhCN/guide/standard/',
collapsed: true,
items: [
{text: "LauncherX稳定版构建许可测试标准", link: '/zhCN/guide/standard/lx-stable-test-standard'},
{text: "CMFS测试标准", link: '/zhCN/guide/standard/cmfs-stable-test-general-standard'},
{text: "审核规则", link: '/zhCN/guide/code_of_joining_application'}, // 未就绪
{text: "CSA账户", link: '/zhCN/guide/account'},
{text: "通用隐私政策和最终用户许可协议", link: "/zhCN/geula"},

]
},
{
text: '综合操作指导',
link: '/zhCN/guide/general/',
collapsed: true,
items: [
{text: "提交翻译贡献", link: '/zhCN/guide/general/contribute-to-i18n'},
]
},
{text: "友情链接", link: '/zhCN/guide/links'},

]
},
{
Expand Down Expand Up @@ -88,6 +99,19 @@ export const sidebar: DefaultTheme.SidebarItem[] = [
}
]
},
{
text: "Minecraft",
collapsed: true,
items: [
{text: '启程Minecraft', link: '/zhCN/mc-starter/', collapsed: true, items: [
{text: "获取Minecraft", link: "/zhCN/mc-starter/get-minecraft"},
{text: "开始玩吧! (Java版)", link: "/zhCN/mc-starter/start-the-game-java"},
{text: "获取资源 (材质包、光影、地图...)", link: "/zhCN/mc-starter/assets-and-mods"},
{text: "要一起玩吗?", link: "/zhCN/mc-starter/play-together"},
]},
{text: "皮肤规范", link: "/zhCN/skin/"},
]
},
{
text: "LauncherX 启动器指南",
collapsed: true,
Expand All @@ -103,18 +127,18 @@ export const sidebar: DefaultTheme.SidebarItem[] = [
]
},
{text: "问题反馈?", link: "/zhCN/lxguide/report-issue"},
{
text: '使用LauncherX',
link: '/zhCN/lxguide/ui-guide/',
collapsed: true,
items: [
{text: "开始", link: "/zhCN/lxguide/ui-guide/"},
{text: "0: 主界面", link: "/zhCN/lxguide/ui-guide/0_interface"},
{text: "1: 游戏列表", link: "/zhCN/lxguide/ui-guide/1_gamelist"},
{text: "2: 下载", link: "/zhCN/lxguide/ui-guide/2_download"},
{text: "3: 设置和本地账户", link: "/zhCN/lxguide/ui-guide/3_settings_localAccounts"},
]
},
// {
// text: '使用LauncherX',
// link: '/zhCN/lxguide/ui-guide/',
// collapsed: true,
// items: [
// {text: "开始", link: "/zhCN/lxguide/ui-guide/"},
// {text: "0: 主界面", link: "/zhCN/lxguide/ui-guide/0_interface"},
// {text: "1: 游戏列表", link: "/zhCN/lxguide/ui-guide/1_gamelist"},
// {text: "2: 下载", link: "/zhCN/lxguide/ui-guide/2_download"},
// {text: "3: 设置和本地账户", link: "/zhCN/lxguide/ui-guide/3_settings_localAccounts"},
// ]
// },
{
text: "LauncherX设置",
link: "/zhCN/lxguide/settings/",
Expand All @@ -126,19 +150,12 @@ export const sidebar: DefaultTheme.SidebarItem[] = [
link: '/zhCN/lxguide/settings/special/',
collapsed: true,
items: [
{text: "初次设置:添加账户", link: "/zhCN/lxguide/settings/special/add-game-account"},
{text: "#帐户管理", link: "/zhCN/lxguide/settings/special/manage-accounts"},

{text: "Linux去除标题栏", link: "/zhCN/lxguide/settings/special/linux-as-others"},
{text: "帐户管理", link: "/zhCN/lxguide/settings/special/manage-accounts"},
{text: "检测网络", link: "/zhCN/lxguide/settings/special/check-network"},
{text: "#个性化", link: "/zhCN/lxguide/settings/special/customize-launcher"},
{text: "版本隔离与独立设置", link: "/zhCN/lxguide/settings/special/independent-config"},
// {
// text: "仪表盘",
// link: "/zhCN/lxguide/settings/special/dashboard/",
// collapsed: true,
// items: [
// // 这玩意有必要分成多个吗
// ]
// },
{text: "个性化Tips", link: "/zhCN/lxguide/settings/special/customize-launcher"},
{text: "版本隔离与独立设置", link: "/zhCN/lxguide/settings/special/independent-config"},
]
},
{
Expand All @@ -162,6 +179,19 @@ export const sidebar: DefaultTheme.SidebarItem[] = [
link: "/zhCN/lxguide/features/",
collapsed: true,
items: [
{
text: '奇技',
link: '/zhCN/lxguide/features/tricks/',
collapsed: true,
items: [
{text: "调试翻译文档", link: "/zhCN/lxguide/features/tricks/debug-lang-file"},
{text: "关闭动画", link: "/zhCN/lxguide/features/tricks/disable-animation"},
{text: "为什么不能同时跑四个游戏", link: "/zhCN/lxguide/features/tricks/set-task-queue"},
{text: "指定默认Java并生成完整包", link: "/zhCN/lxguide/features/tricks/default-jre-for-pack"},
{text: "更多图标下载", link: "/zhCN/lxguide/features/tricks/icons"},

]
},
{text: "仪表板", link: "/zhCN/lxguide/features/dashboard"},
{text: "整合包支持", link: "/zhCN/lxguide/features/modpack-support"},
{text: "#实时日志和错误分析器", link: "/zhCN/lxguide/features/log-window"},
Expand All @@ -185,6 +215,7 @@ export const sidebar: DefaultTheme.SidebarItem[] = [
}
],
},

{
text: "CMFS",
collapsed: true,
Expand All @@ -211,15 +242,8 @@ export const sidebar: DefaultTheme.SidebarItem[] = [

]
},
{
text: "Minecraft",
collapsed: true,
items: [
{text: "皮肤规范", link: "/zhCN/skin/"}
]
},

{text: "通用最终用户许可协议", link: "/zhCN/geula"}
{text: "通用隐私政策和最终用户协议", link: "/zhCN/geula"}
];

export default sidebar;
75 changes: 75 additions & 0 deletions .vitepress/theme/Layout.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<!-- .vitepress/theme/Layout.vue -->

<script setup lang="ts">
import { useData } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import { nextTick, provide } from 'vue'

const { isDark } = useData()

const enableTransitions = () =>
'startViewTransition' in document &&
window.matchMedia('(prefers-reduced-motion: no-preference)').matches

provide('toggle-appearance', async ({ clientX: x, clientY: y }: MouseEvent) => {
if (!enableTransitions()) {
isDark.value = !isDark.value
return
}

const clipPath = [
`circle(0px at ${x}px ${y}px)`,
`circle(${Math.hypot(
Math.max(x, innerWidth - x),
Math.max(y, innerHeight - y)
)}px at ${x}px ${y}px)`
]

await document.startViewTransition(async () => {
isDark.value = !isDark.value
await nextTick()
}).ready

document.documentElement.animate(
{ clipPath: isDark.value ? clipPath.reverse() : clipPath },
{
duration: 300,
easing: 'ease-in',
pseudoElement: `::view-transition-${isDark.value ? 'old' : 'new'}(root)`
}
)
})
</script>

<template>
<DefaultTheme.Layout />
<script>
console.log('insert')
</script>
</template>

<style>
::view-transition-old(root),
::view-transition-new(root) {
animation: none;
mix-blend-mode: normal;
}

::view-transition-old(root),
.dark::view-transition-new(root) {
z-index: 1;
}

::view-transition-new(root),
.dark::view-transition-old(root) {
z-index: 9999;
}

.VPSwitchAppearance {
width: 22px !important;
}

.VPSwitchAppearance .check {
transform: none !important;
}
</style>
Loading