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

refactor: refine menu #248

Merged
merged 53 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
9b9610e
chore: remove prev & next links
boxsnake Apr 25, 2024
662f0b0
fix: fix svg url resolve
boxsnake Apr 25, 2024
e48348a
chore: add removing trailing spaces in vscode
boxsnake Apr 25, 2024
6d9cea1
chore: remove deprecated files
boxsnake Apr 25, 2024
0b78701
chore: extract links, jump functions, styles for community
boxsnake Apr 25, 2024
a6141f1
chore: extract links, jump functions, styles for join
boxsnake Apr 25, 2024
9a86184
chore: add ts to script
boxsnake Apr 25, 2024
7706891
chore: extract links, jump functions, styles for download-client
boxsnake Apr 25, 2024
7a422c6
fix: fix i18n support for community link map
boxsnake Apr 25, 2024
8838dbc
fix: fix path resolve
boxsnake Apr 25, 2024
9b87587
fix: fix i18n support for client-download link map
boxsnake Apr 26, 2024
51a5155
refactor: refactor Card component to vue-style
boxsnake Apr 26, 2024
ef4044b
fix: fix font load resolution
boxsnake Apr 26, 2024
faa8dd1
chore: update Card vue by on to `@`
boxsnake Apr 26, 2024
3a47022
fix: fix un-rendered logos for UnoCSS
boxsnake Apr 26, 2024
957b85b
chore: update logo icon resolving
boxsnake Apr 26, 2024
49c5012
chore: fix typo
jiazengp Apr 26, 2024
7c2270c
fix: fix card icon no auto match
jiazengp Apr 26, 2024
812930a
chore: delete log
jiazengp Apr 26, 2024
dc89ee7
fix: fix Card link pointer
boxsnake Apr 26, 2024
caf1a1c
fix: update font url
boxsnake Apr 26, 2024
eb96131
refactor: tune Card component
boxsnake Apr 26, 2024
74ad140
chore: remove `.md` extension in sidebar link
boxsnake Apr 26, 2024
665c3c9
refactor: refactor top-nav bar structure
boxsnake Apr 26, 2024
a11da7e
chore: update links
boxsnake Apr 26, 2024
cf22eb2
refactor: update navbar (ja)
boxsnake Apr 26, 2024
848b6c9
chore: remove spaces before punctuation marks
boxsnake Apr 27, 2024
049de29
refactor: update navbar (fr)
boxsnake Apr 27, 2024
6e43c4f
fix: fix translation
boxsnake Apr 27, 2024
926b913
refactor: update navbar (en)
boxsnake Apr 29, 2024
c73166e
refactor: split nav, sidebar, footer, constants in locales
boxsnake Apr 29, 2024
c1d4bb1
refactor: split 404 (notFound) in locales
boxsnake Apr 29, 2024
991a2a5
refactor: split ui in locales
boxsnake Apr 29, 2024
6e29509
refactor: split aside-links in locales
boxsnake Apr 29, 2024
9fa2798
fix: fix error anchor point in nav link
jiazengp Apr 29, 2024
755b968
fix: fix typo
boxsnake Apr 29, 2024
1251b0a
refactor: split docs-feedback in locales
boxsnake Apr 29, 2024
0ecb6e4
refactor: move docFooter sort in locales
boxsnake Apr 29, 2024
1d5b3e8
refactor: split staff in locales
boxsnake Apr 29, 2024
5597ca0
refactor: split team in locales
boxsnake Apr 29, 2024
f2bdd9c
refactor: split social-links in locales
boxsnake Apr 29, 2024
f8e8ab5
fix: split footer for en
boxsnake Apr 29, 2024
d857963
refactor: split payment in locales
boxsnake Apr 29, 2024
24a77d1
fix: add missing keys to locale config
boxsnake Apr 29, 2024
cf3e84b
refactor: split head in locales
boxsnake Apr 29, 2024
ab970da
chore: add description to config
boxsnake Apr 29, 2024
f937232
chore: update navbar order
boxsnake Apr 29, 2024
41a7f57
chore: fix locale suffix
boxsnake Apr 29, 2024
83d3b6c
fix: fix wording for "Feature Requests"
boxsnake Apr 29, 2024
8b54f66
fix: resolve nav's activeMatch
boxsnake Apr 29, 2024
c238b83
chore: fix locale suffix (fr)
boxsnake Apr 29, 2024
381c56d
feat: add wip to support WIP banner
boxsnake Apr 29, 2024
0cf5cb4
docs: add wip to markdown enhancement guide
boxsnake Apr 29, 2024
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
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
Loading