2019-12-26 15:27:52 +08:00
|
|
|
import * as React from 'react';
|
2022-01-18 12:11:14 +08:00
|
|
|
import { Button } from 'antd';
|
2019-12-26 15:27:52 +08:00
|
|
|
import { Link } from 'bisheng/router';
|
|
|
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
|
|
import Background from './Background';
|
|
|
|
import { getLocalizedPathname } from '../../utils';
|
|
|
|
import Logo from './Logo';
|
|
|
|
|
|
|
|
import './index.less';
|
|
|
|
|
2020-09-14 10:48:08 +08:00
|
|
|
const Banner = (props: { location: any }) => {
|
|
|
|
const { location } = props;
|
2019-12-26 15:27:52 +08:00
|
|
|
const { locale } = useIntl();
|
|
|
|
const isZhCN = locale === 'zh-CN';
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="home-banner">
|
|
|
|
<Background />
|
|
|
|
|
|
|
|
<div className="home-banner-holder">
|
|
|
|
<div className="home-banner-content">
|
|
|
|
<div>
|
|
|
|
<Logo />
|
|
|
|
</div>
|
|
|
|
<p>
|
|
|
|
<FormattedMessage id="app.home.introduce" />
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<div className="home-banner-content-operations">
|
2020-09-14 10:48:08 +08:00
|
|
|
<Link to={getLocalizedPathname('/docs/react/introduce', isZhCN, location.query)}>
|
2019-12-26 15:27:52 +08:00
|
|
|
<Button type="primary" shape="round">
|
|
|
|
<FormattedMessage id="app.home.getting-started" />
|
|
|
|
</Button>
|
|
|
|
</Link>
|
2020-09-14 10:48:08 +08:00
|
|
|
<Link to={getLocalizedPathname('/docs/spec/introduce', isZhCN, location.query)}>
|
2019-12-26 15:27:52 +08:00
|
|
|
<Button shape="round" ghost>
|
|
|
|
<FormattedMessage id="app.home.design-language" />
|
|
|
|
</Button>
|
|
|
|
</Link>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
2020-09-14 10:48:08 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
export default Banner;
|