Skip to content

Commit

Permalink
site: update home (ant-design#3939)
Browse files Browse the repository at this point in the history
  • Loading branch information
jljsj33 authored and benjycui committed Nov 21, 2016
1 parent c306494 commit ca88182
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
5 changes: 2 additions & 3 deletions site/theme/static/home.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
opacity: 1;
}

#banner {
.banner-wrapper {
position: relative;
height: 100%;
width: 100%;
overflow: hidden;
background: url("https://os.alipayobjects.com/rmsportal/GhjqstwSgxBXrZS.png") no-repeat center / cover;
Expand Down Expand Up @@ -107,11 +106,11 @@

.page {
min-height: 700px;
height: 100vh;
}

.content-wrapper {
width: 100%;
height: 100%;
max-width: 1500px;
margin: auto;
overflow: hidden;
Expand Down
2 changes: 1 addition & 1 deletion site/theme/template/Home/Banner.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function typeFunc(a) {
export default function Banner({ location, onEnterChange }) {
const query = location.query;
return (
<section id="banner" className="page">
<section className="page banner-wrapper">
<ScrollElement id="banner" onChange={({ mode }) => onEnterChange(mode)}>
<QueueAnim className="banner-text-wrapper" type={typeFunc} delay={300} key="banner">
<h2 key="h2">ANT <p>DESIGN</p></h2>
Expand Down
2 changes: 1 addition & 1 deletion site/theme/template/Home/Link.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import scrollScreen from 'rc-scroll-anim/lib/ScrollScreen';

export default class Link extends React.Component {
componentDidMount() {
scrollScreen.init({ docHeight: 4746 });
scrollScreen.init();
}

render() {
Expand Down
12 changes: 2 additions & 10 deletions site/theme/template/Home/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,15 @@ import Page4 from './Page4';
// To store style which is only for Home and has conflicts with others.
function getStyle() {
return `
#react-content,
#react-content > div {
height: 100%;
html, body{
height: auto;
}
.main-wrapper {
background: transparent;
width: auto;
margin: 0;
border-radius: 0;
padding: 0;
overflow: unset;
display: inline;
min-height: 600px;
}
#header {
Expand Down Expand Up @@ -66,11 +63,6 @@ function getStyle() {
border-left-color: rgba(235, 237, 238, .5);
transition: border 0.5s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}
section {
height: 100%;
width: 100%;
background: #fff;
}
#footer {
background: #000;
}
Expand Down

0 comments on commit ca88182

Please sign in to comment.