-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
151 additions
and
41 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
import React from 'react'; | ||
import clsx from 'clsx'; | ||
import Link from '@docusaurus/Link'; | ||
import Translate, {translate} from '@docusaurus/Translate'; | ||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; | ||
import Layout from '@theme/Layout'; | ||
import HomepageFeatures from '@site/src/components/HomepageFeatures'; | ||
import useBaseUrl, {useBaseUrlUtils} from '@docusaurus/useBaseUrl'; | ||
import Heading from '@theme/Heading'; | ||
import styles from './styles.module.css'; | ||
|
||
function HomepageHeader() { | ||
const {siteConfig} = useDocusaurusContext(); | ||
return ( | ||
<header className={clsx('hero hero--primary', styles.heroBanner)}> | ||
<div className="container"> | ||
<h1 className="hero__title">{siteConfig.title}</h1> | ||
<p className="hero__subtitle">{siteConfig.tagline}</p> | ||
<div className={styles.buttons}> | ||
<Link | ||
className="button button--secondary button--lg" | ||
to="/docs/intro"> | ||
Docusaurus Tutorial - 5min ⏱️ | ||
</Link> | ||
</div> | ||
</div> | ||
</header> | ||
); | ||
} | ||
|
||
function TopBanner() { | ||
return ( | ||
<div className={styles.topBanner}> | ||
<div className={styles.topBannerTitle}> | ||
{'🎉\xa0'} | ||
<Link | ||
to="https://realityworld.com" | ||
className={styles.topBannerTitleText}> | ||
<Translate id="homepage.banner.launch.2.0"> | ||
{'我们即将开源!️'} | ||
</Translate> | ||
</Link> | ||
{'\xa0🥳'} | ||
</div> | ||
<div style={{display: 'flex', alignItems: 'center', flexWrap: 'wrap'}}> | ||
<div style={{flex: 1, whiteSpace: 'nowrap'}}> | ||
<div className={styles.topBannerDescription}> | ||
包括框架代码、以及十万字以上的技术文档 | ||
</div> | ||
</div> | ||
<div | ||
style={{ | ||
flexGrow: 1, | ||
flexShrink: 0, | ||
padding: '0.5rem', | ||
display: 'flex', | ||
justifyContent: 'center', | ||
}}> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
function HeroBanner() { | ||
return ( | ||
<div className={styles.hero} data-theme="dark"> | ||
<div className={styles.heroInner}> | ||
<Heading as="h1" className={styles.heroProjectTagline}> | ||
<img | ||
alt={translate({message: 'Docusaurus with Keytar'})} | ||
className={styles.heroLogo} | ||
src={useBaseUrl('/img/reality_world_logo.jpg')} | ||
width="300" | ||
height="300" | ||
/> | ||
<span | ||
className={styles.heroTitleTextHtml} | ||
// eslint-disable-next-line react/no-danger | ||
dangerouslySetInnerHTML={{ | ||
__html: translate({ | ||
id: 'homepage.hero.title', | ||
message: | ||
'A <b>self-evolving</b> and <b>interoperable</b> system for future digital world', | ||
description: | ||
'Home page hero title, can contain simple html tags', | ||
}), | ||
}} | ||
/> | ||
</Heading> | ||
<div className={styles.indexCtas}> | ||
<Link className="button button--primary"> | ||
<Translate>Whitepaper</Translate> | ||
</Link> | ||
<Link className="button button--primary"> | ||
<Translate>Documentation</Translate> | ||
</Link> | ||
<span className={styles.indexCtasGitHubButtonWrapper}> | ||
<iframe | ||
className={styles.indexCtasGitHubButton} | ||
src="https://ghbtns.com/github-btn.html?user=cogine&repo=realityworld&type=star&count=true&size=large" | ||
width={160} | ||
height={30} | ||
title="电子版下载" | ||
/> | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default function Home(): JSX.Element { | ||
const {siteConfig} = useDocusaurusContext(); | ||
return ( | ||
<Layout | ||
title={`A self-evolving and interoperable system for future digital world`} | ||
description="Description will go into a meta tag in <head />"> | ||
<main> | ||
<TopBanner/> | ||
<HeroBanner /> | ||
<HomepageFeatures /> | ||
</main> | ||
</Layout> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters