Switch to en-US
This commit is contained in:
parent
e9d08bd263
commit
13c88b784a
@ -6,11 +6,11 @@ import mdshowSidebarJson from './i18n/sidebars/mdshow.json'
|
||||
import vitepressConfigJson from './i18n/vitepress-config.json'
|
||||
import themeConfigJson from './i18n/theme-config.json'
|
||||
|
||||
type langType = 'zh-CN' | 'en-US'
|
||||
type langType = 'en-US'
|
||||
|
||||
const getVitepressConfigLocales = (lang: langType = 'zh-CN') => (vitepressConfigJson[lang])
|
||||
const getVitepressConfigLocales = (lang: langType = 'en-US') => (vitepressConfigJson[lang])
|
||||
|
||||
const getThemeConfigLocales = (lang: langType = 'zh-CN') => {
|
||||
const getThemeConfigLocales = (lang: langType = 'en-US') => {
|
||||
const sidebar = {}
|
||||
sidebar[`/${lang}/guide/`] = guideSidebarJson[lang]
|
||||
sidebar[`/${lang}/mdshow/`] = mdshowSidebarJson[lang]
|
||||
@ -33,9 +33,9 @@ const getLocales = (langs: langType[] = []) => {
|
||||
return config
|
||||
}
|
||||
|
||||
const getNav = (lang: 'zh-CN' | 'en-US' = 'zh-CN') => (navJson[lang])
|
||||
const getNav = (lang: 'en-US' = 'en-US') => (navJson[lang])
|
||||
|
||||
const getSidebar = (lang: 'zh-CN' | 'en-US' = 'zh-CN') => ({
|
||||
const getSidebar = (lang: 'en-US' = 'en-US') => ({
|
||||
'/guide/': guideSidebarJson[lang],
|
||||
'/mdshow/': mdshowSidebarJson[lang]
|
||||
})
|
||||
|
@ -11,7 +11,7 @@ export const useLang = () => {
|
||||
if (path?.includes('/')) {
|
||||
lang = path.split('/').shift()
|
||||
} else {
|
||||
lang = 'zh-CN'
|
||||
lang = 'en-US'
|
||||
}
|
||||
return lang
|
||||
})
|
||||
|
@ -18,15 +18,15 @@ hero:
|
||||
|
||||
features:
|
||||
- title: 📦 Software Developer
|
||||
details: I have developed several libraries and tools used across many projects.
|
||||
details: I have developed several libraries and tools used across many projects on Github.
|
||||
- title: 🔩 Focused on Interconnectivity
|
||||
details: I have a passion for applications that explore ways to spread information across the internet.
|
||||
- title: 🔑 Keybase Verification
|
||||
details: You can find my Keybase verification [here](https://keybase.io/cclick).
|
||||
details: You can find my Keybase verification at <a>https://keybase.io/cclick<a/>.
|
||||
---
|
||||
|
||||
<div class="frontpage sponsors">
|
||||
<h2>感 谢</h2>
|
||||
<h2>Projects Used</h2>
|
||||
<div class="platinum-sponsors">
|
||||
<a v-for="{ href, src, name, id } of sponsors.filter(s => s.tier === 'platinum')" :href="href" target="_blank" rel="noopener" aria-label="sponsor-img">
|
||||
<img :src="src" :alt="name" :id="`sponsor-${id}`">
|
||||
@ -64,39 +64,15 @@ const sponsors = [
|
||||
"name": "Vitepress",
|
||||
"href": "https://vitepress.dev/",
|
||||
"src": "https://vitepress.dev/vitepress-logo-mini.svg"
|
||||
},
|
||||
{
|
||||
"id": "vuetom",
|
||||
"name": "Vitepress Vuetom Theme",
|
||||
"href": "https://github.com/vuetom/vitepress-theme-vuetom",
|
||||
"src": "https://raw.githubusercontent.com/vuetom/vitepress-theme-vuetom/refs/heads/main/packages/docs/public/logo/vuetom-logo-s.png"
|
||||
}
|
||||
]
|
||||
|
||||
function fetchReleaseTag() {
|
||||
onMounted(() => {
|
||||
const dom = document.getElementsByClassName('name')
|
||||
const mainTitle = dom[0]
|
||||
const docsReleaseTag = document.createElement('span')
|
||||
docsReleaseTag.classList.add('release-tag')
|
||||
const releaseTagName = `v${pk.version}`
|
||||
docsReleaseTag.innerText = releaseTagName
|
||||
if (releaseTagName !== undefined) {
|
||||
mainTitle.appendChild(docsReleaseTag)
|
||||
}
|
||||
// fetch('https://api.github.com/repos/vitejs/docs-cn/releases/latest')
|
||||
// .then((res) => res.json())
|
||||
// .then((json) => {
|
||||
// const mainTitle = document.getElementById('main-title')
|
||||
// mainTitle.style.position = 'relative'
|
||||
|
||||
// const docsReleaseTag = document.createElement('span')
|
||||
// docsReleaseTag.classList.add('release-tag')
|
||||
// const releaseTagName = json.tag_name
|
||||
// docsReleaseTag.innerText = releaseTagName
|
||||
|
||||
// if (releaseTagName !== undefined) {
|
||||
// mainTitle.appendChild(docsReleaseTag)
|
||||
// }
|
||||
// })
|
||||
})
|
||||
}
|
||||
|
||||
fetchReleaseTag()
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user