From e1abcabd0d5b8401014a6fb73a6a9f62a08bc071 Mon Sep 17 00:00:00 2001 From: fishcpy Date: Sat, 21 Mar 2026 22:47:11 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=E9=A1=B5=E8=84=9A=E5=9C=A8=E6=89=80?= =?UTF-8?q?=E6=9C=89=E9=A1=B5=E9=9D=A2=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vitepress/data/locales/en.ts | 2 +- .vitepress/data/locales/index.ts | 11 +- .vitepress/theme/components/SiteFooter.vue | 216 +++++++++++++++++++++ .vitepress/theme/index.ts | 5 +- 4 files changed, 230 insertions(+), 4 deletions(-) create mode 100644 .vitepress/theme/components/SiteFooter.vue diff --git a/.vitepress/data/locales/en.ts b/.vitepress/data/locales/en.ts index 9dca682..22150bf 100644 --- a/.vitepress/data/locales/en.ts +++ b/.vitepress/data/locales/en.ts @@ -33,7 +33,7 @@ export const en: LocaleMessages = { community: 'Community', feedback: 'Issues', discussions: 'Discussions', - beian: '', + beian: '京ICP备2025138063号', copyright: 'MIT License.', }, diff --git a/.vitepress/data/locales/index.ts b/.vitepress/data/locales/index.ts index c04c109..30c7f7b 100644 --- a/.vitepress/data/locales/index.ts +++ b/.vitepress/data/locales/index.ts @@ -152,6 +152,7 @@ export const themeConfigTranslations: Record = { // Footer 数据 export const getFooterData = (lang: Lang): FooterData => { const msgs = getMessages(lang); + const beianNumber = msgs.footer.beian || zh.footer.beian; const footerData: Record = { 'zh-CN': { @@ -196,7 +197,7 @@ export const getFooterData = (lang: Lang): FooterData => { beian: { showIcon: true, icp: { - number: msgs.footer.beian, + number: beianNumber, link: 'https://beian.miit.gov.cn/', rel: 'nofollow', }, @@ -247,6 +248,14 @@ export const getFooterData = (lang: Lang): FooterData => { ], }, ], + beian: { + showIcon: true, + icp: { + number: beianNumber, + link: 'https://beian.miit.gov.cn/', + rel: 'nofollow', + }, + }, author: { name: 'PCL Community', link: 'https://github.com/PCL-Community', diff --git a/.vitepress/theme/components/SiteFooter.vue b/.vitepress/theme/components/SiteFooter.vue new file mode 100644 index 0000000..9397fcf --- /dev/null +++ b/.vitepress/theme/components/SiteFooter.vue @@ -0,0 +1,216 @@ + + + + + diff --git a/.vitepress/theme/index.ts b/.vitepress/theme/index.ts index fce2efd..73d63fa 100644 --- a/.vitepress/theme/index.ts +++ b/.vitepress/theme/index.ts @@ -4,11 +4,12 @@ import { useData } from 'vitepress'; import DefaultTheme from 'vitepress/theme'; import { h } from 'vue'; import '@theojs/lumen/style'; -import { BoxCube, Card, CopyText, Footer, Links, Pill } from '@theojs/lumen'; +import { BoxCube, Card, CopyText, Links, Pill } from '@theojs/lumen'; import { getFooterData, getMessages, type Lang } from '../data/i18n'; import './style.css'; import AboutPage from './components/AboutPage.vue'; import MirrorGrid from './components/MirrorGrid.vue'; +import SiteFooter from './components/SiteFooter.vue'; import VideoSection from './components/VideoSection.vue'; export default { @@ -19,7 +20,7 @@ export default { const { lang } = useData(); const currentLang = (lang.value || 'zh-CN') as Lang; const footerData = getFooterData(currentLang); - return h(Footer, { Footer_Data: footerData }); + return h(SiteFooter, { Footer_Data: footerData }); }, }); }, From 6442e75addc9d294629f6008c3e6b1fb44bb0c7c Mon Sep 17 00:00:00 2001 From: fishcpy Date: Sat, 21 Mar 2026 23:00:34 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=E4=BF=AE=E6=94=B9=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=92=8C=E5=85=B3=E4=BA=8E=E9=A1=B5=E9=9D=A2=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vitepress/theme/components/AboutPage.vue | 3 +-- .vitepress/theme/components/MirrorGrid.vue | 5 ++--- .vitepress/theme/style.css | 15 ++++----------- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.vitepress/theme/components/AboutPage.vue b/.vitepress/theme/components/AboutPage.vue index d8ac1fa..b0cbea5 100644 --- a/.vitepress/theme/components/AboutPage.vue +++ b/.vitepress/theme/components/AboutPage.vue @@ -82,7 +82,6 @@ const _props = defineProps<{ .about-card-link:hover { border-color: var(--vp-c-brand-1); box-shadow: 0 4px 16px rgba(2, 102, 193, 0.12); - transform: translateX(4px); } .about-card-icon { @@ -150,4 +149,4 @@ const _props = defineProps<{ width: 100%; } } - \ No newline at end of file + diff --git a/.vitepress/theme/components/MirrorGrid.vue b/.vitepress/theme/components/MirrorGrid.vue index a680e52..9b7c691 100644 --- a/.vitepress/theme/components/MirrorGrid.vue +++ b/.vitepress/theme/components/MirrorGrid.vue @@ -39,14 +39,13 @@ defineProps<{ text-align: center; text-decoration: none; color: var(--vp-c-text-1); - transition: transform 0.3s; + transition: color 0.2s, background 0.2s, border-color 0.2s; } .mirror-btn:hover { background: var(--vp-c-brand-soft); border-color: var(--vp-c-brand-1); color: var(--vp-c-brand-1); - transform: translateY(-5px); } @media (max-width: 768px) { @@ -54,4 +53,4 @@ defineProps<{ grid-template-columns: 1fr; } } - \ No newline at end of file + diff --git a/.vitepress/theme/style.css b/.vitepress/theme/style.css index 87194f8..811ba2e 100644 --- a/.vitepress/theme/style.css +++ b/.vitepress/theme/style.css @@ -127,18 +127,17 @@ a:focus-visible { /* Feature 卡片样式 */ .VPFeature { - border: none; + border: 1px solid var(--vp-c-divider); box-shadow: 0 10px 30px 0 rgb(0 0 0 / 15%); background-color: transparent; - transition: transform 0.3s ease, box-shadow 0.3s ease; + transition: border-color 0.2s; } .VPFeatures .items .item { - transition: transform 0.3s; } -.VPFeatures .items .item:hover { - transform: translateY(-5px); +.VPFeatures .items .item:hover .VPFeature { + border-color: var(--vp-c-brand-1); } /* 导航栏样式 */ @@ -181,10 +180,4 @@ a:focus-visible { border-radius: 8px; text-decoration: none; font-weight: 600; - transition: transform 0.2s, box-shadow 0.2s; } - -.download-btn:hover { - transform: translateY(-2px); - box-shadow: 0 8px 24px rgba(2, 102, 193, 0.3); -} \ No newline at end of file From 6c4ba7f75a28fa09af1fce93bac1b72d6fe86891 Mon Sep 17 00:00:00 2001 From: fishcpy Date: Sat, 21 Mar 2026 23:41:03 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vitepress/data/locales/en.ts | 17 + .vitepress/data/locales/index.ts | 17 + .vitepress/data/locales/zh.ts | 17 + .../theme/components/HistoryReleases.vue | 623 ++++++++++++++++++ .vitepress/theme/index.ts | 2 + package.json | 1 + pnpm-lock.yaml | 56 +- src/download.md | 2 +- src/en/download.md | 2 +- src/en/history.md | 7 + src/history.md | 7 + 11 files changed, 747 insertions(+), 4 deletions(-) create mode 100644 .vitepress/theme/components/HistoryReleases.vue create mode 100644 src/en/history.md create mode 100644 src/history.md diff --git a/.vitepress/data/locales/en.ts b/.vitepress/data/locales/en.ts index 22150bf..fa73581 100644 --- a/.vitepress/data/locales/en.ts +++ b/.vitepress/data/locales/en.ts @@ -8,6 +8,8 @@ export const en: LocaleMessages = { 'Download', about: 'About', + history: + 'History', }, // Theme config @@ -66,6 +68,21 @@ export const en: LocaleMessages = { alsoDownload: 'Or download directly from:', }, + history: { + title: 'Historical Releases', + subtitle: 'Fetch historical releases and download links from GitHub.', + selectLabel: 'Select a release', + loading: 'Loading releases…', + error: 'Failed to load releases.', + retry: 'Retry', + empty: 'No historical releases found.', + noAssets: 'No downloadable assets for this release.', + noChangelog: 'No release notes available for this release.', + viewOnGithub: 'View on GitHub', + x64Label: 'Download X64', + arm64Label: 'Download ARM64', + }, + // About page about: { title: 'PCL Community', diff --git a/.vitepress/data/locales/index.ts b/.vitepress/data/locales/index.ts index 30c7f7b..388e28e 100644 --- a/.vitepress/data/locales/index.ts +++ b/.vitepress/data/locales/index.ts @@ -10,6 +10,7 @@ export interface LocaleMessages { home: string; download: string; about: string; + history: string; }; theme: { prevPage: string; @@ -61,6 +62,20 @@ export interface LocaleMessages { historicalBtn: string; alsoDownload: string; }; + history: { + title: string; + subtitle: string; + selectLabel: string; + loading: string; + error: string; + retry: string; + empty: string; + noAssets: string; + noChangelog: string; + viewOnGithub: string; + x64Label: string; + arm64Label: string; + }; about: { title: string; subtitle: string; @@ -92,11 +107,13 @@ export const navTranslations: Record< 'zh-CN': [ { text: zh.nav.home, link: '/' }, { text: zh.nav.download, link: '/download' }, + { text: zh.nav.history, link: '/history' }, { text: zh.nav.about, link: '/about' }, ], en: [ { text: en.nav.home, link: '/en/' }, { text: en.nav.download, link: '/en/download' }, + { text: en.nav.history, link: '/en/history' }, { text: en.nav.about, link: '/en/about' }, ], }; diff --git a/.vitepress/data/locales/zh.ts b/.vitepress/data/locales/zh.ts index 4006ee5..190b333 100644 --- a/.vitepress/data/locales/zh.ts +++ b/.vitepress/data/locales/zh.ts @@ -8,6 +8,8 @@ export const zh: LocaleMessages = { '下载', about: '关于', + history: + '历史版本', }, // 主题配置 @@ -67,6 +69,21 @@ export const zh: LocaleMessages = { alsoDownload: '你也可以直接在下方的链接中下载', }, + history: { + title: '历史版本下载', + subtitle: '选择版本查看更新日志并下载对应安装包。', + selectLabel: '选择版本', + loading: '正在获取版本列表…', + error: '获取失败,请稍后再试。', + retry: '重试', + empty: '暂无可用的历史版本。', + noAssets: '该版本暂无可用下载资源。', + noChangelog: '该版本没有更新日志描述。', + viewOnGithub: '在 GitHub 查看详情', + x64Label: '下载 X64', + arm64Label: '下载 ARM64', + }, + // 关于页面 about: { title: 'PCL Community', diff --git a/.vitepress/theme/components/HistoryReleases.vue b/.vitepress/theme/components/HistoryReleases.vue new file mode 100644 index 0000000..c5f8e9a --- /dev/null +++ b/.vitepress/theme/components/HistoryReleases.vue @@ -0,0 +1,623 @@ + + + + + diff --git a/.vitepress/theme/index.ts b/.vitepress/theme/index.ts index 73d63fa..1cadd4e 100644 --- a/.vitepress/theme/index.ts +++ b/.vitepress/theme/index.ts @@ -8,6 +8,7 @@ import { BoxCube, Card, CopyText, Links, Pill } from '@theojs/lumen'; import { getFooterData, getMessages, type Lang } from '../data/i18n'; import './style.css'; import AboutPage from './components/AboutPage.vue'; +import HistoryReleases from './components/HistoryReleases.vue'; import MirrorGrid from './components/MirrorGrid.vue'; import SiteFooter from './components/SiteFooter.vue'; import VideoSection from './components/VideoSection.vue'; @@ -34,6 +35,7 @@ export default { // 注册自定义组件 app.component('MirrorGrid', MirrorGrid); app.component('AboutPage', AboutPage); + app.component('HistoryReleases', HistoryReleases); app.component('VideoSection', VideoSection); }, } satisfies Theme; diff --git a/package.json b/package.json index ba1b925..e6a09ad 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ ] }, "dependencies": { + "markdown-it": "^14.1.1", "vue": "^3.5.30" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8a1ada2..79ac855 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: dependencies: + markdown-it: + specifier: ^14.1.1 + version: 14.1.1 vue: specifier: ^3.5.30 version: 3.5.30(typescript@5.9.3) @@ -17,7 +20,7 @@ importers: version: 2.4.8 '@mdit/plugin-figure': specifier: ^0.23.1 - version: 0.23.1 + version: 0.23.1(markdown-it@14.1.1) '@theojs/lumen': specifier: ^6.4.5 version: 6.4.5(vue@3.5.30(typescript@5.9.3)) @@ -781,6 +784,9 @@ packages: resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} engines: {node: '>=12'} + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + autosize@6.0.1: resolution: {integrity: sha512-f86EjiUKE6Xvczc4ioP1JBlWG7FKrE13qe/DxBCpe8GCipCq2nFw73aO8QEBKHfSbYGDN5eB9jXWKen7tspDqQ==} @@ -840,6 +846,10 @@ packages: emoji-regex@10.6.0: resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==} + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + entities@7.0.1: resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==} engines: {node: '>=0.12'} @@ -904,6 +914,9 @@ packages: resolution: {integrity: sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==} engines: {node: '>=18'} + linkify-it@5.0.0: + resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + lint-staged@16.4.0: resolution: {integrity: sha512-lBWt8hujh/Cjysw5GYVmZpFHXDCgZzhrOm8vbcUdobADZNOK/bRshr2kM3DfgrrtR1DQhfupW9gnIXOfiFi+bw==} engines: {node: '>=20.17'} @@ -923,6 +936,10 @@ packages: mark.js@8.11.1: resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==} + markdown-it@14.1.1: + resolution: {integrity: sha512-BuU2qnTti9YKgK5N+IeMubp14ZUKUUw7yeJbkjtosvHiP0AZ5c8IAgEMk79D0eC8F23r4Ac/q8cAIFdm2FtyoA==} + hasBin: true + marked-highlight@2.2.3: resolution: {integrity: sha512-FCfZRxW/msZAiasCML4isYpxyQWKEEx44vOgdn5Kloae+Qc3q4XR7WjpKKf8oMLk7JP9ZCRd2vhtclJFdwxlWQ==} peerDependencies: @@ -936,6 +953,9 @@ packages: mdast-util-to-hast@13.2.1: resolution: {integrity: sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==} + mdurl@2.0.0: + resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + micromark-util-character@2.1.1: resolution: {integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==} @@ -990,6 +1010,10 @@ packages: property-information@7.1.0: resolution: {integrity: sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==} + punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + recaptcha-v3@1.11.3: resolution: {integrity: sha512-sEE6J0RzUkS+sKEBpgCD/AqCU0ffrAVOADGjvAx9vcttN+VLK42SWMkj/J/I6vHu3Kew+xcfbBqDVb65N0QGDw==} @@ -1086,6 +1110,9 @@ packages: engines: {node: '>=14.17'} hasBin: true + uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + undici-types@7.18.2: resolution: {integrity: sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==} @@ -1433,9 +1460,11 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.5': {} - '@mdit/plugin-figure@0.23.1': + '@mdit/plugin-figure@0.23.1(markdown-it@14.1.1)': dependencies: '@types/markdown-it': 14.1.2 + optionalDependencies: + markdown-it: 14.1.1 '@rolldown/pluginutils@1.0.0-rc.2': {} @@ -1706,6 +1735,8 @@ snapshots: ansi-styles@6.2.3: {} + argparse@2.0.1: {} + autosize@6.0.1: {} birpc@2.9.0: {} @@ -1747,6 +1778,8 @@ snapshots: emoji-regex@10.6.0: {} + entities@4.5.0: {} + entities@7.0.1: {} environment@1.1.0: {} @@ -1829,6 +1862,10 @@ snapshots: dependencies: get-east-asian-width: 1.5.0 + linkify-it@5.0.0: + dependencies: + uc.micro: 2.1.0 + lint-staged@16.4.0: dependencies: commander: 14.0.3 @@ -1861,6 +1898,15 @@ snapshots: mark.js@8.11.1: {} + markdown-it@14.1.1: + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.0 + mdurl: 2.0.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 + marked-highlight@2.2.3(marked@17.0.4): dependencies: marked: 17.0.4 @@ -1879,6 +1925,8 @@ snapshots: unist-util-visit: 5.1.0 vfile: 6.0.3 + mdurl@2.0.0: {} + micromark-util-character@2.1.1: dependencies: micromark-util-symbol: 2.0.1 @@ -1928,6 +1976,8 @@ snapshots: property-information@7.1.0: {} + punycode.js@2.3.1: {} + recaptcha-v3@1.11.3: {} regex-recursion@6.0.2: @@ -2076,6 +2126,8 @@ snapshots: typescript@5.9.3: {} + uc.micro@2.1.0: {} + undici-types@7.18.2: {} unist-util-is@6.0.1: diff --git a/src/download.md b/src/download.md index 390f830..b27cefb 100644 --- a/src/download.md +++ b/src/download.md @@ -66,4 +66,4 @@ keywords: PCL下载,Minecraft启动器下载,PCL社区版下载,启动器下载 如果您需要旧版本的 PCL CE,可以从以下链接下载: -[历史版本](https://github.com/PCL-Community/PCL2-CE/releases){.mirror-btn} \ No newline at end of file +[历史版本](/history){.mirror-btn} diff --git a/src/en/download.md b/src/en/download.md index d6d4a3d..ce02e5f 100644 --- a/src/en/download.md +++ b/src/en/download.md @@ -66,4 +66,4 @@ For ARM-based Windows PCs If you need an older version of PCL CE, you can download from the following link: -[Historical Versions](https://github.com/PCL-Community/PCL2-CE/releases){.mirror-btn} \ No newline at end of file +[Historical Versions](/en/history){.mirror-btn} \ No newline at end of file diff --git a/src/en/history.md b/src/en/history.md new file mode 100644 index 0000000..1a269f2 --- /dev/null +++ b/src/en/history.md @@ -0,0 +1,7 @@ +--- +title: Historical Releases +description: Get historical releases and download links for PCL CE +keywords: PCL history,PCL2-CE releases,launcher downloads +--- + + diff --git a/src/history.md b/src/history.md new file mode 100644 index 0000000..eb1ddb8 --- /dev/null +++ b/src/history.md @@ -0,0 +1,7 @@ +--- +title: 历史版本下载 +description: 获取 PCL CE 历史版本下载链接 +keywords: PCL历史版本,PCL2-CE历史版本,启动器历史下载 +--- + +