2016-02-29 14:08:40 +08:00
|
|
|
import React from 'react';
|
2016-10-14 09:55:12 +08:00
|
|
|
import { injectIntl } from 'react-intl';
|
2016-05-27 11:48:08 +08:00
|
|
|
import DocumentTitle from 'react-document-title';
|
2016-03-03 17:23:08 +08:00
|
|
|
import Banner from './Banner';
|
|
|
|
import Page1 from './Page1';
|
|
|
|
import Page2 from './Page2';
|
|
|
|
import Page3 from './Page3';
|
|
|
|
import Page4 from './Page4';
|
2016-09-27 10:06:34 +08:00
|
|
|
// To store style which is only for Home and has conflicts with others.
|
|
|
|
function getStyle() {
|
|
|
|
return `
|
2016-11-21 17:48:39 +08:00
|
|
|
html, body{
|
|
|
|
height: auto;
|
2016-09-27 10:06:34 +08:00
|
|
|
}
|
2016-12-12 13:43:31 +08:00
|
|
|
.page-wrapper {
|
|
|
|
background: #fff;
|
|
|
|
}
|
2016-09-27 10:06:34 +08:00
|
|
|
.main-wrapper {
|
|
|
|
background: transparent;
|
|
|
|
width: auto;
|
|
|
|
margin: 0;
|
|
|
|
border-radius: 0;
|
|
|
|
padding: 0;
|
|
|
|
min-height: 600px;
|
|
|
|
}
|
|
|
|
#header {
|
|
|
|
position: fixed;
|
|
|
|
z-index: 999;
|
|
|
|
background: rgba(0, 0, 0, 0.25);
|
|
|
|
border-bottom: 1px solid transparent;
|
|
|
|
transition: border .5s cubic-bezier(0.455, 0.03, 0.515, 0.955), background .5s cubic-bezier(0.455, 0.03, 0.515, 0.955);
|
|
|
|
}
|
|
|
|
#header .ant-select-selection,
|
|
|
|
#header .ant-menu {
|
|
|
|
background: transparent;
|
|
|
|
}
|
2017-01-05 20:35:56 +08:00
|
|
|
#header .ant-select-search__field {
|
|
|
|
color: #eee;
|
|
|
|
}
|
2017-01-03 00:17:23 +08:00
|
|
|
#header .ant-select-selection__placeholder {
|
|
|
|
color: rgba(255,255,255,0.57);
|
|
|
|
}
|
2017-01-05 20:35:56 +08:00
|
|
|
#header.home-nav-white .ant-select-search__field {
|
|
|
|
color: rgba(0, 0, 0, 0.65);
|
|
|
|
}
|
|
|
|
#header.home-nav-white .ant-select-selection__placeholder {
|
|
|
|
color: rgb(204, 204, 204);
|
|
|
|
}
|
2016-09-27 10:06:34 +08:00
|
|
|
#header.home-nav-white {
|
2017-01-03 00:17:23 +08:00
|
|
|
background: rgba(255, 255, 255, 0.91);
|
2017-02-26 15:41:50 +08:00
|
|
|
border-bottom-color: #ebedee;
|
2016-09-27 10:06:34 +08:00
|
|
|
}
|
|
|
|
.home-nav-white #search-box {
|
2017-02-26 15:41:50 +08:00
|
|
|
border-left-color: #ebedee;
|
2016-09-27 10:06:34 +08:00
|
|
|
}
|
|
|
|
.home-nav-white #nav a {
|
2017-01-05 20:35:56 +08:00
|
|
|
color: rgba(0, 0, 0, 0.65);
|
2016-09-27 10:06:34 +08:00
|
|
|
}
|
2016-10-07 14:33:08 +08:00
|
|
|
.home-nav-white .lang:not(:hover) {
|
2017-01-05 20:35:56 +08:00
|
|
|
color: rgba(0, 0, 0, 0.65);
|
|
|
|
border-color: rgba(0, 0, 0, 0.65);
|
2016-09-27 10:06:34 +08:00
|
|
|
}
|
2017-02-09 19:46:23 +08:00
|
|
|
.home-nav-white .version > .ant-select-selection {
|
|
|
|
color: rgba(0, 0, 0, 0.65);
|
|
|
|
}
|
|
|
|
.home-nav-white .version > .ant-select-selection:not(:hover) {
|
|
|
|
border-color: rgba(0, 0, 0, 0.65);
|
|
|
|
}
|
2016-09-27 10:06:34 +08:00
|
|
|
.nav-phone-icon:before {
|
|
|
|
background: #eee;
|
|
|
|
box-shadow: 0 7px 0 0 #eee, 0 14px 0 0 #eee;
|
|
|
|
}
|
|
|
|
.home-nav-white .nav-phone-icon:before {
|
|
|
|
background: #777;
|
|
|
|
box-shadow: 0 7px 0 0 #777, 0 14px 0 0 #777;
|
|
|
|
}
|
2016-10-07 14:33:08 +08:00
|
|
|
.lang,
|
2017-02-09 19:46:23 +08:00
|
|
|
.version > .ant-select-selection,
|
2016-09-27 10:06:34 +08:00
|
|
|
#nav a {
|
|
|
|
color: #eee;
|
2017-02-09 19:46:23 +08:00
|
|
|
transition: all 0.5s cubic-bezier(0.455, 0.03, 0.515, 0.955);
|
2016-09-27 10:06:34 +08:00
|
|
|
}
|
2017-10-31 17:51:35 +08:00
|
|
|
#nav a.header-link {
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
.home-nav-white #nav a.header-link {
|
|
|
|
color: rgba(0, 0, 0, .65);
|
2017-10-31 17:44:44 +08:00
|
|
|
}
|
2016-09-27 10:06:34 +08:00
|
|
|
#search-box {
|
|
|
|
border-left-color: rgba(235, 237, 238, .5);
|
|
|
|
transition: border 0.5s cubic-bezier(0.455, 0.03, 0.515, 0.955);
|
|
|
|
}
|
|
|
|
#footer {
|
|
|
|
background: #000;
|
|
|
|
}
|
|
|
|
#footer,
|
|
|
|
#footer h2 {
|
|
|
|
color: #999;
|
|
|
|
}
|
|
|
|
#footer a {
|
|
|
|
color: #eee;
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
}
|
2016-03-23 14:15:00 +08:00
|
|
|
|
2016-10-14 09:55:12 +08:00
|
|
|
function Home(props) {
|
2016-09-27 10:06:34 +08:00
|
|
|
return (
|
2016-10-14 09:55:12 +08:00
|
|
|
<DocumentTitle title={`Ant Design - ${props.intl.formatMessage({ id: 'app.home.slogan' })}`}>
|
2016-09-27 10:06:34 +08:00
|
|
|
<div className="main-wrapper">
|
2016-10-18 12:04:09 +08:00
|
|
|
<Banner {...props} />
|
|
|
|
<Page1 {...props} />
|
|
|
|
<Page2 {...props} />
|
|
|
|
<Page3 {...props} />
|
|
|
|
<Page4 {...props} />
|
2016-09-27 10:06:34 +08:00
|
|
|
<style dangerouslySetInnerHTML={{ __html: getStyle() }} />
|
|
|
|
</div>
|
|
|
|
</DocumentTitle>
|
|
|
|
);
|
2016-02-29 14:08:40 +08:00
|
|
|
}
|
2016-10-14 09:55:12 +08:00
|
|
|
|
|
|
|
export default injectIntl(Home);
|