Skip to content

Commit

Permalink
Add cloud service in homepage.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Nov 2, 2023
1 parent 1c68de5 commit e3359e6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions i18n/en-us/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@
"homepage.getStarted": {
"message": "Get Started"
},
"homepage.cloudService": {
"message": "Cloud Service"
},
"homepage.easyToUseName": {
"message": "Easy to Use"
},
Expand Down
3 changes: 3 additions & 0 deletions i18n/zh-cn/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@
"homepage.getStarted": {
"message": "快速开始"
},
"homepage.cloudService": {
"message": "云服务"
},
"homepage.easyToUseName": {
"message": "简单"
},
Expand Down
9 changes: 7 additions & 2 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import hldHdImage from "../../static/img/SRS-SingleNode-4.0-hd.png";
import hldSdImage from "../../static/img/SRS-SingleNode-4.0-sd.png";

function HomepageHeader() {
const {siteConfig} = useDocusaurusContext();
const {siteConfig, i18n} = useDocusaurusContext();
return (<>
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
Expand All @@ -21,7 +21,12 @@ function HomepageHeader() {
<div className={styles.buttons}>
<Link className="button button--secondary button--lg" to="/docs/v5/doc/getting-started">
{translate({id: 'homepage.getStarted'})}
</Link>
</Link>&nbsp;
{i18n.currentLocale === 'en-us' &&
<Link className="button button--secondary button--lg" to="/docs/v5/doc/cloud">
{translate({id: 'homepage.cloudService'})}
</Link>
}
</div>
</div>
<div className={clsx('container', styles.imageHLD)}>
Expand Down

0 comments on commit e3359e6

Please sign in to comment.