From 05e7e87c3d2fd7e37228725c1715a2918778c6c6 Mon Sep 17 00:00:00 2001 From: zhujingyang <72259332+zjy365@users.noreply.github.com> Date: Fri, 3 Nov 2023 14:58:55 +0800 Subject: [PATCH] docs: modify doc path (#4241) --- docs/4.0/code.json | 4 ++-- docs/website/docusaurus.config.js | 4 ++-- .../docusaurus-theme-classic/navbar.json | 8 ++++---- docs/website/src/hooks/useWindow.ts | 7 +++++++ .../src/pages/components/Capability/index.tsx | 4 ++-- .../src/pages/components/Header/index.tsx | 6 +++--- .../advantage/index.tsx | 0 .../header/index.scss | 0 .../header/index.tsx | 6 +++--- .../{pricing => self-hosting}/index.scss | 0 .../pages/{pricing => self-hosting}/index.tsx | 2 +- .../overview/index.scss | 0 .../overview/index.tsx | 0 .../{pricing => self-hosting}/plan/index.tsx | 0 .../product/index.tsx | 0 .../src/pages/app/components/list.tsx | 20 +++++++------------ .../src/pages/deploy/components/ReadMe.tsx | 6 ++---- 17 files changed, 33 insertions(+), 34 deletions(-) rename docs/website/src/pages/{pricing => self-hosting}/advantage/index.tsx (100%) rename docs/website/src/pages/{pricing => self-hosting}/header/index.scss (100%) rename docs/website/src/pages/{pricing => self-hosting}/header/index.tsx (98%) rename docs/website/src/pages/{pricing => self-hosting}/index.scss (100%) rename docs/website/src/pages/{pricing => self-hosting}/index.tsx (93%) rename docs/website/src/pages/{pricing => self-hosting}/overview/index.scss (100%) rename docs/website/src/pages/{pricing => self-hosting}/overview/index.tsx (100%) rename docs/website/src/pages/{pricing => self-hosting}/plan/index.tsx (100%) rename docs/website/src/pages/{pricing => self-hosting}/product/index.tsx (100%) diff --git a/docs/4.0/code.json b/docs/4.0/code.json index 942ced85478..e1e56bf77f0 100644 --- a/docs/4.0/code.json +++ b/docs/4.0/code.json @@ -631,8 +631,8 @@ "Cloud Operating System": { "message": "云操作系统: Sealos" }, - "Pricing": { - "message": "价格" + "Hosting": { + "message": "私有云" }, "A cloud operating system based on the Kubernetes kernel": { "message": "以 Kubernetes 为内核的云操作系统" diff --git a/docs/website/docusaurus.config.js b/docs/website/docusaurus.config.js index cfb7b193682..c6f4d5bc161 100644 --- a/docs/website/docusaurus.config.js +++ b/docs/website/docusaurus.config.js @@ -104,8 +104,8 @@ const config = { }, { position: "left", - to: "/pricing", - label: "Pricing" + to: "/self-hosting", + label: "Hosting" }, { position: "left", diff --git a/docs/website/i18n/zh-Hans/docusaurus-theme-classic/navbar.json b/docs/website/i18n/zh-Hans/docusaurus-theme-classic/navbar.json index 5681635dbcc..ab40a24ee4c 100644 --- a/docs/website/i18n/zh-Hans/docusaurus-theme-classic/navbar.json +++ b/docs/website/i18n/zh-Hans/docusaurus-theme-classic/navbar.json @@ -7,9 +7,9 @@ "message": "商务合作", "description": "Navbar item with label Contact" }, - "item.label.Pricing": { - "message": "价格", - "description": "Navbar item with label Pricing" + "item.label.Hosting": { + "message": "私有云", + "description": "Navbar item with label Self Hosting" }, "logo.alt": { "message": "sealos", @@ -19,4 +19,4 @@ "message": "在线使用", "description": "Navbar item with label Start Now" } -} +} \ No newline at end of file diff --git a/docs/website/src/hooks/useWindow.ts b/docs/website/src/hooks/useWindow.ts index a96a7c5d05b..f2fe0e0fc1c 100644 --- a/docs/website/src/hooks/useWindow.ts +++ b/docs/website/src/hooks/useWindow.ts @@ -18,6 +18,13 @@ export default function () { window.addEventListener('resize', updateScreenWidth); // handle setCurrentLanguage(document.documentElement.lang); + + // console.log(document.documentElement.lang, window.location, navigator.language); + // if (navigator.language !== 'en' && !window.location.pathname.includes('zh-Hans')) { + // const newPath = window.location.pathname.endsWith('/') ? 'zh-Hans/' : '/zh-Hans/'; + // window.location.pathname += newPath; + // } + setCloudUrl( document.documentElement.lang === 'en' ? 'https://cloud.sealos.io' diff --git a/docs/website/src/pages/components/Capability/index.tsx b/docs/website/src/pages/components/Capability/index.tsx index 14c54f71c72..e496a1d218c 100644 --- a/docs/website/src/pages/components/Capability/index.tsx +++ b/docs/website/src/pages/components/Capability/index.tsx @@ -103,7 +103,7 @@ const Capability = ({ isPc }: { isPc: boolean }) => {
{i18nObj.serverless_introduce}
{i18nObj.Explore} {'>'} @@ -161,7 +161,7 @@ const Capability = ({ isPc }: { isPc: boolean }) => {
{i18nObj.serverless_introduce}
{i18nObj.Explore} {'>'} diff --git a/docs/website/src/pages/components/Header/index.tsx b/docs/website/src/pages/components/Header/index.tsx index 1d4bf4d8f78..9f5cc8142ef 100644 --- a/docs/website/src/pages/components/Header/index.tsx +++ b/docs/website/src/pages/components/Header/index.tsx @@ -23,9 +23,9 @@ const navbar = [ to: 'https://forum.laf.run/' }, { - key: 'pricing', - label: Pricing, - to: '/pricing' + key: 'hosting', + label: Hosting, + to: '/self-hosting ' }, { key: 'contact', diff --git a/docs/website/src/pages/pricing/advantage/index.tsx b/docs/website/src/pages/self-hosting/advantage/index.tsx similarity index 100% rename from docs/website/src/pages/pricing/advantage/index.tsx rename to docs/website/src/pages/self-hosting/advantage/index.tsx diff --git a/docs/website/src/pages/pricing/header/index.scss b/docs/website/src/pages/self-hosting/header/index.scss similarity index 100% rename from docs/website/src/pages/pricing/header/index.scss rename to docs/website/src/pages/self-hosting/header/index.scss diff --git a/docs/website/src/pages/pricing/header/index.tsx b/docs/website/src/pages/self-hosting/header/index.tsx similarity index 98% rename from docs/website/src/pages/pricing/header/index.tsx rename to docs/website/src/pages/self-hosting/header/index.tsx index 5cee27c75b5..67434125e90 100644 --- a/docs/website/src/pages/pricing/header/index.tsx +++ b/docs/website/src/pages/self-hosting/header/index.tsx @@ -21,9 +21,9 @@ const navbar = [ to: 'https://forum.laf.run/' }, { - key: 'pricing', - label: Pricing, - to: '/pricing' + key: 'hosting', + label: Hosting, + to: '/self-hosting ' }, { key: 'contact', diff --git a/docs/website/src/pages/pricing/index.scss b/docs/website/src/pages/self-hosting/index.scss similarity index 100% rename from docs/website/src/pages/pricing/index.scss rename to docs/website/src/pages/self-hosting/index.scss diff --git a/docs/website/src/pages/pricing/index.tsx b/docs/website/src/pages/self-hosting/index.tsx similarity index 93% rename from docs/website/src/pages/pricing/index.tsx rename to docs/website/src/pages/self-hosting/index.tsx index e7c54daf79f..95d8dee8fa0 100644 --- a/docs/website/src/pages/pricing/index.tsx +++ b/docs/website/src/pages/self-hosting/index.tsx @@ -21,7 +21,7 @@ export default function Pricing() {
-
+
diff --git a/docs/website/src/pages/pricing/overview/index.scss b/docs/website/src/pages/self-hosting/overview/index.scss similarity index 100% rename from docs/website/src/pages/pricing/overview/index.scss rename to docs/website/src/pages/self-hosting/overview/index.scss diff --git a/docs/website/src/pages/pricing/overview/index.tsx b/docs/website/src/pages/self-hosting/overview/index.tsx similarity index 100% rename from docs/website/src/pages/pricing/overview/index.tsx rename to docs/website/src/pages/self-hosting/overview/index.tsx diff --git a/docs/website/src/pages/pricing/plan/index.tsx b/docs/website/src/pages/self-hosting/plan/index.tsx similarity index 100% rename from docs/website/src/pages/pricing/plan/index.tsx rename to docs/website/src/pages/self-hosting/plan/index.tsx diff --git a/docs/website/src/pages/pricing/product/index.tsx b/docs/website/src/pages/self-hosting/product/index.tsx similarity index 100% rename from docs/website/src/pages/pricing/product/index.tsx rename to docs/website/src/pages/self-hosting/product/index.tsx diff --git a/frontend/providers/template/src/pages/app/components/list.tsx b/frontend/providers/template/src/pages/app/components/list.tsx index d50962f0407..694c7df7840 100644 --- a/frontend/providers/template/src/pages/app/components/list.tsx +++ b/frontend/providers/template/src/pages/app/components/list.tsx @@ -37,8 +37,7 @@ export default function InstanceList() { w={'48px'} h={'48px'} justifyContent="center" - alignItems={'center'} - > + alignItems={'center'}> @@ -58,12 +57,12 @@ export default function InstanceList() { pt="24px" pr="42px" pb="42px" - overflow={'auto'} - > + overflow={'auto'}> {data && data?.map((item) => { return ( goInstancePage(item.id)} position={'relative'} cursor={'pointer'} _hover={{ @@ -78,8 +77,7 @@ export default function InstanceList() { borderRadius={'8px'} backgroundColor={'#fff'} boxShadow={'0px 2px 4px 0px rgba(187, 196, 206, 0.25)'} - border={'1px solid #EAEBF0'} - > + border={'1px solid #EAEBF0'}> + border={' 1px solid rgba(255, 255, 255, 0.50)'}> @@ -100,21 +97,18 @@ export default function InstanceList() { fontSize={'12px'} color={'#5A646E'} fontWeight={400} - mt="auto" - > + mt="auto"> {t('Creation Time')}: {item?.createTime} goInstancePage(item.id)} w="100%" h="32px" justifyContent={'center'} alignItems={'center'} cursor={'pointer'} background={'#F4F6F8'} - borderRadius={'4px'} - > + borderRadius={'4px'}> { borderBottom={'1px solid #DEE0E2'} color={'#24282C'} fontSize={'18px'} - fontWeight={500} - > + fontWeight={500}> README.md @@ -70,8 +69,7 @@ const ReadMe = ({ templateDetail }: { templateDetail: TemplateType }) => { + remarkPlugins={[remarkGfm, remarkUnwrapImages]}> {templateReadMe}