Skip to content

Commit

Permalink
refactor: refine menu (#248)
Browse files Browse the repository at this point in the history
About #244
  • Loading branch information
jiazengp authored Apr 30, 2024
2 parents eb66660 + 0cf5cb4 commit 0ef5487
Show file tree
Hide file tree
Showing 192 changed files with 3,011 additions and 3,207 deletions.
446 changes: 0 additions & 446 deletions .vitepress/locales/en.ts

This file was deleted.

10 changes: 10 additions & 0 deletions .vitepress/locales/en/404.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { DefaultTheme } from 'vitepress'

const notFound: DefaultTheme.NotFoundOptions = {
title: 'PAGE NOT FOUND',
quote:
"But if you don't change your direction, and if you keep looking, you may end up where you are heading.",
linkLabel: 'Take me home',
}

export default notFound
12 changes: 12 additions & 0 deletions .vitepress/locales/en/aside-links.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { CustomConfig } from '../types'

const asideLinks: CustomConfig['asideLinks'] = {
title: 'Links',
starOnGitHub: 'Star on GitHub',
contactUsText: 'Chat on Discord',
contactUsLink: 'https://discord.gg/SWz6RTWNkm',
sponsor: 'Become a Sponsor',
editLink: 'Edit this page',
}

export default asideLinks
15 changes: 15 additions & 0 deletions .vitepress/locales/en/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { CustomConstant } from '../types'

const constants: CustomConstant = {
META_URL: 'https://yuanshen.site/docs/en/',
META_TITLE: 'Genshin Interactive Map',
META_KEYWORDS:
'Genshin Interactive Map, Genshin Map, Kongying Tavern, yuanshenmap, Genshin Impact Map, Kongying Map',
META_DESCRIPTION:
'A Genshin interactive map by Kongying Tavern for completionists',
META_IMAGE: 'https://yuanshen.site/docs/imgs/common/cover.jpg',
LOCAL_CODE: 'en-US',
LOCAL_BASE: 'en',
}

export default constants
29 changes: 29 additions & 0 deletions .vitepress/locales/en/docs-feedback.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import type { CustomConfig } from '../types'

const docsFeedback: CustomConfig['docsFeedback'] = {
feedbackMsg: 'Was this document helpful?',
good: 'Yes',
bad: 'No',
feedbackFailMsg:
'Feedback failed, please retry or contact admin (QQ: 1961266616)!',
feedbackSuccessMsg: 'Feedback submitted successfully, thank you!',
badFeedbackSuccessMsg: 'Please specify any issues below~',
form: {
chooseIssues: 'Did you encounter these issues?',
translationIssue: 'Translation',
typosIssue: 'Typos/Punctuation',
ContentImgLinkIssue: 'Inaccurate Content, Image or Link',
feedbackDetail: 'Details/Suggestions',
feedbackTip: 'Describe issues or suggestions here',
otherIssue: 'Other (specify below)',
contactWay: 'Contact (optional)',
issueOptions: [
{ label: 'Page Display Error', value: 'pagedisplay-issue' },
{ label: 'Typos, Punctuation', value: 'typos-issue' },
{ label: 'Content, Image, Link Error', value: 'content-issue' },
{ label: 'Other Issues', value: 'other-issue' },
],
},
}

export default docsFeedback
62 changes: 62 additions & 0 deletions .vitepress/locales/en/footer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import type { CustomConfig } from '../types'

const footer: CustomConfig['footer'] = {
qrcodeTitle: 'Discord Server',
qrcodeMessage: 'Contact us on discord',
qrcodeLink: 'https://discord.gg/aFe57AKZUF',
navigation: [
{
title: 'About',
items: [
{
text: 'Join Us',
link: '/join',
},
{
text: 'Our team',
link: '/team',
},
{
text: 'Sponsors',
link: '/support-us',
},
],
},
{
title: 'Legal (Chinese)',
items: [
{
text: 'Disclaimer',
link: '/disclaimer',
},
{
text: 'Privacy',
link: '/privacy',
},
{
text: 'Agreement',
link: '/agreement',
},
],
},
{
title: 'Support',
items: [
{
text: 'Client User Manual',
link: '/manual/client-user-manual',
},
{
text: 'Feedback',
link: 'https://support.qq.com/products/321980',
},
{
text: 'New Features',
link: 'https://support.qq.com/products/321980/topic-detail/2016/',
},
],
},
],
}

export default footer
9 changes: 9 additions & 0 deletions .vitepress/locales/en/head.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { LocaleSpecificConfig } from 'vitepress'
import C from './constants'

const head: LocaleSpecificConfig['head'] = [
['meta', { property: 'og:site_name', content: C.META_TITLE }],
['meta', { property: 'og:locale', content: 'en-US' }],
]

export default head
56 changes: 56 additions & 0 deletions .vitepress/locales/en/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { baseHelper } from '../../theme/utils'

import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress'
import type { CustomConfig } from '../types'

import C from './constants'
import Head from './head'
import Nav from './nav'
import Sidebar from './sidebar'
import Footer from './footer'
import _404 from './404'
import UI from './ui'
import SocialLinks from './social-links'
import AsideLinks from './aside-links'
import DocsFeedback from './docs-feedback'

import Staff from './staff'
import Team from './team'
import Payment from './payment'

export const enConfig: LocaleSpecificConfig<
DefaultTheme.Config & CustomConfig
> = {
titleTemplate: 'Kongying Tavern',
description: C.META_DESCRIPTION,
head: Head,
themeConfig: {
siteTitle: C.META_TITLE,
keyword: C.META_KEYWORDS,
description: C.META_DESCRIPTION,
image: C.META_IMAGE,
logo: '/imgs/common/logo/logo_256.png',

outlineTitle: 'On This Page',
lastUpdatedText: 'Update Date',
returnToTopLabel: '回到顶部',
langMenuLabel: '更改语言',
notFound: _404,
ui: UI,
socialLinks: SocialLinks,
asideLinks: AsideLinks,
docsFeedback: DocsFeedback,
docFooter: {
prev: 'Previous page',
next: 'Next page',
},

staff: Staff,
team: Team,
payment: Payment,

nav: baseHelper(Nav, C.LOCAL_BASE),
sidebar: baseHelper(Sidebar, C.LOCAL_BASE),
footer: baseHelper(Footer, C.LOCAL_BASE),
},
}
144 changes: 144 additions & 0 deletions .vitepress/locales/en/nav.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
import type { DefaultTheme } from 'vitepress'

const nav: DefaultTheme.NavItem[] = [
{
text: 'Community',
link: '/community',
activeMatch: '^/en/community',
},
{
text: 'Support us',
link: '/support-us',
activeMatch: '^/en/support-us',
},
{
text: 'Map Utilities',
activeMatch: '^/en/(download-client|manual/)',
items: [
{
text: 'Download',
link: '/download-client',
activeMatch: '^/en/download-client',
},
{
text: 'Windows Client',
items: [
{
text: 'Manual',
link: '/manual/client-user-manual',
activeMatch: '^/en/manual/',
},
{
text: 'Release Notes',
link: 'https://support.qq.com/products/321980/blog/505884',
},
],
},
{
text: 'Web Version',
items: [
{
text: 'Try Now',
link: 'https://v3.yuanshen.site',
},
{
text: 'Release Notes',
link: 'https://support.qq.com/products/321980/blog/505810',
},
],
},
],
},
{
text: 'Support',
items: [
{
text: 'Feedback',
link: 'https://support.qq.com/products/321980',
},
{
text: 'Feature Requests',
link: 'https://support.qq.com/products/321980/topic-detail/2016/',
},
],
},
{
text: 'About',
activeMatch:
'^/en/(join|team|staff|support-us|credits|disclaimer|privacy|agreement|translations|friends-links)',
items: [
{
text: 'About Us',
items: [
{
text: 'Join Us',
link: '/join',
activeMatch: '^/en/join',
},
{
text: 'Our Team',
link: '/team',
activeMatch: '^/en/team',
},
],
},
{
text: 'Acknowledgements',
items: [
{
text: 'Contributors',
link: '/staff',
activeMatch: '^/en/staff',
},
{
text: 'Sponsors',
link: '/support-us#sponsor-acknowledgement',
activeMatch: '^/en/support-us',
},
{
text: 'Credits',
link: '/credits',
activeMatch: '^/en/credits',
},
],
},
{
text: 'Legal (Chinese)',
items: [
{
text: 'Disclaimer',
link: '/disclaimer',
activeMatch: '^/en/disclaimer',
},
{
text: 'Privacy',
link: '/privacy',
activeMatch: '^/en/privacy',
},
{
text: 'Agreement',
link: '/agreement',
activeMatch: '^/en/agreement',
},
],
},
{
text: 'Other',
items: [
{
text: 'Translate for Us',
link: '/translations',
activeMatch: '^/en/translations',
},
{
text: 'Friend-links',
link: '/friends-links',
activeMatch: '^/en/friends-links',
},
],
},
],
},
]

export default nav
27 changes: 27 additions & 0 deletions .vitepress/locales/en/payment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import type { CustomConfig } from '../types'

const payment: CustomConfig['payment'] = {
wechatpay: {
name: 'WeChat Pay',
address: 'wxp://f2f0dd1rszrnqJc_gnlwV_lRX5dlZ1Dtn9rp',
},
alipay: {
name: 'Alipay',
address: 'https://qr.alipay.com/tsx11609thmpw9odmvdlxd6',
},
qqpay: {
name: 'QQ Pay',
address:
'https://i.qianbao.qq.com/wallet/sqrcode.htm?m=tenpay&a=1&u=790489566&ac=CAEQ3tP3-AIY0v2k_AU%3D_xxx_sign&n=AAAAAAAA&f=wallet',
},
paypal: {
name: 'PayPal',
address: 'https://www.paypal.com/paypalme/yuanshenditu',
},
bilibili: {
name: 'bilibili',
address: 'https://space.bilibili.com/518076785',
},
}

export default payment
Loading

0 comments on commit 0ef5487

Please sign in to comment.