site: add github button

This commit is contained in:
Benjy Cui 2016-03-14 15:00:11 +08:00
parent aa6326f1e1
commit 90a54507f5
3 changed files with 44 additions and 22 deletions

View File

@ -122,6 +122,7 @@
"react-addons-test-utils": "0.14.x",
"react-copy-to-clipboard": "^4.0.1",
"react-dom": "0.14.x",
"react-github-button": "^0.1.1",
"react-router": "^2.0.0",
"react-stateless-wrapper": "~1.0.2",
"recast": "^0.11.2",

View File

@ -2,6 +2,8 @@ import React from 'react';
import { Link } from 'react-router';
import ScrollElement from 'rc-scroll-anim/lib/ScrollElement';
import TweenOne from 'rc-tween-one';
import GitHubButton from 'react-github-button';
import 'react-github-button/assets/style.css';
import { QueueAnim, Icon } from '../../../';
export default class Banner extends React.Component {
@ -22,9 +24,13 @@ export default class Banner extends React.Component {
<h2 key="h2">ANT <p>DESIGN</p></h2>
<p key="content">一个 UI 设计语言</p>
<span className="line" key="line" />
<div className="start-button clearfix">
<Link key="button" to="/spec">
<Icon type="smile-circle" />开始探索
</Link>
</div>
<GitHubButton type="stargazers"
namespace="ant-design" repo="ant-design" />
</QueueAnim>
<TweenOne className="down" vars={[{ opacity: 1 }, { y: 10, duration: 800, yoyo: true, repeat: -1 }]}>
<Icon type="down" />

View File

@ -30,7 +30,7 @@
.banner-text-wrapper {
position: absolute;
left: 10%;
top: 58%;
top: 55%;
color: #fff;
text-align: right;
}
@ -56,10 +56,14 @@
right: -25px;
}
.banner-text-wrapper > p {
margin: 10px auto 30px;
margin: 10px auto 24px;
font-size: 16px;
}
.banner-text-wrapper a {
.banner-text-wrapper .start-button {
margin-bottom: 24px;
> a {
float: right;
width: 155px;
height: 45px;
@ -72,12 +76,23 @@
text-align: center;
line-height: 42px;
}
.banner-text-wrapper a:hover {
> a:hover {
box-shadow: 0 0 10px #00AAEE;
}
.banner-text-wrapper a span {
> a span {
margin-left: 15px;
}
}
.banner-text-wrapper .github-btn {
float: right;
line-height: 14px;
a:hover {
color: #333;
}
}
.down {
text-align: center;
position: absolute;