Skip to content

Commit

Permalink
docs: modify doc path (#4241)
Browse files Browse the repository at this point in the history
  • Loading branch information
zjy365 authored Nov 3, 2023
1 parent c26318e commit 05e7e87
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 34 deletions.
4 changes: 2 additions & 2 deletions docs/4.0/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,8 @@
"Cloud Operating System": {
"message": "云操作系统: Sealos"
},
"Pricing": {
"message": "价格"
"Hosting": {
"message": "私有云"
},
"A cloud operating system based on the Kubernetes kernel": {
"message": "以 Kubernetes 为内核的云操作系统"
Expand Down
4 changes: 2 additions & 2 deletions docs/website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ const config = {
},
{
position: "left",
to: "/pricing",
label: "Pricing"
to: "/self-hosting",
label: "Hosting"
},
{
position: "left",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -19,4 +19,4 @@
"message": "在线使用",
"description": "Navbar item with label Start Now"
}
}
}
7 changes: 7 additions & 0 deletions docs/website/src/hooks/useWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions docs/website/src/pages/components/Capability/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const Capability = ({ isPc }: { isPc: boolean }) => {
<div className="application-text">{i18nObj.serverless_introduce}</div>
<a
className="application-link"
href={currentLanguage === 'en' ? '/pricing' : '/zh-Hans/pricing'}
href={currentLanguage === 'en' ? '/self-hosting ' : '/zh-Hans/self-hosting '}
>
{i18nObj.Explore} {'>'}
</a>
Expand Down Expand Up @@ -161,7 +161,7 @@ const Capability = ({ isPc }: { isPc: boolean }) => {
<div className="application-text">{i18nObj.serverless_introduce}</div>
<a
className="application-link"
href={currentLanguage === 'en' ? '/pricing' : '/zh-Hans/pricing'}
href={currentLanguage === 'en' ? '/self-hosting ' : '/zh-Hans/self-hosting '}
>
{i18nObj.Explore} {'>'}
</a>
Expand Down
6 changes: 3 additions & 3 deletions docs/website/src/pages/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ const navbar = [
to: 'https://forum.laf.run/'
},
{
key: 'pricing',
label: <Translate>Pricing</Translate>,
to: '/pricing'
key: 'hosting',
label: <Translate>Hosting</Translate>,
to: '/self-hosting '
},
{
key: 'contact',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ const navbar = [
to: 'https://forum.laf.run/'
},
{
key: 'pricing',
label: <Translate>Pricing</Translate>,
to: '/pricing'
key: 'hosting',
label: <Translate>Hosting</Translate>,
to: '/self-hosting '
},
{
key: 'contact',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function Pricing() {
<div className="sealos_price_page">
<div className="sealo_price_header_bg"></div>
<Banner />
<div className="px-10 w-full flex justify-center">
<div className="px-10 w-full flex justify-center lg:px-0">
<Header isPc={isPc} />
</div>
<Product />
Expand Down
20 changes: 7 additions & 13 deletions frontend/providers/template/src/pages/app/components/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ export default function InstanceList() {
w={'48px'}
h={'48px'}
justifyContent="center"
alignItems={'center'}
>
alignItems={'center'}>
<MyIcon color={'#7B838B'} name="empty"></MyIcon>
</Flex>
<Text mt={'12px'} fontSize={14} color={'#5A646E'}>
Expand All @@ -58,12 +57,12 @@ export default function InstanceList() {
pt="24px"
pr="42px"
pb="42px"
overflow={'auto'}
>
overflow={'auto'}>
{data &&
data?.map((item) => {
return (
<Flex
onClick={() => goInstancePage(item.id)}
position={'relative'}
cursor={'pointer'}
_hover={{
Expand All @@ -78,17 +77,15 @@ 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'}>
<Box
p={'6px'}
w={'48px'}
h={'48px'}
boxShadow={'0px 1px 2px 0.5px rgba(84, 96, 107, 0.20)'}
borderRadius={'4px'}
backgroundColor={'#fff'}
border={' 1px solid rgba(255, 255, 255, 0.50)'}
>
border={' 1px solid rgba(255, 255, 255, 0.50)'}>
<Image src={item?.icon} alt="" width={'36px'} height={'36px'} />
</Box>
<Text fontSize="24px" fontWeight={600} color="#24282C">
Expand All @@ -100,21 +97,18 @@ export default function InstanceList() {
fontSize={'12px'}
color={'#5A646E'}
fontWeight={400}
mt="auto"
>
mt="auto">
{t('Creation Time')}: {item?.createTime}
</Text>
<Flex justifyContent={'space-between'} alignItems={'center'} gap={'20px'}>
<Flex
onClick={() => goInstancePage(item.id)}
w="100%"
h="32px"
justifyContent={'center'}
alignItems={'center'}
cursor={'pointer'}
background={'#F4F6F8'}
borderRadius={'4px'}
>
borderRadius={'4px'}>
<Icon width="16px" height="17px" viewBox="0 0 16 17" fill="#363C42">
<g mask="url(#mask0_821_49862)">
<path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,15 @@ const ReadMe = ({ templateDetail }: { templateDetail: TemplateType }) => {
borderBottom={'1px solid #DEE0E2'}
color={'#24282C'}
fontSize={'18px'}
fontWeight={500}
>
fontWeight={500}>
<MyIcon name={'markdown'} mr={5} w={'24px'} h={'24px'} ml={'42px'} color={'myGray.500'} />
README.md
</Box>
<Box p={'24px'} className={`markdown-body ${styles.customMarkDownBody}`}>
<ReactMarkdown
linkTarget={'_blank'}
rehypePlugins={[rehypeRaw, [rehypeRewrite, { rewrite: myRewrite }]]}
remarkPlugins={[remarkGfm, remarkUnwrapImages]}
>
remarkPlugins={[remarkGfm, remarkUnwrapImages]}>
{templateReadMe}
</ReactMarkdown>
</Box>
Expand Down

0 comments on commit 05e7e87

Please sign in to comment.