fix: modify background of header

This commit is contained in:
yhui.yang 2017-07-27 10:59:24 +08:00
parent 50ac111567
commit 9856f9f07d
2 changed files with 7 additions and 15 deletions

View File

@ -146,15 +146,16 @@ export default class HeaderCom extends Component {
}
render () {
const { login, user, msg, uid, curKey } = this.props;
const headerStyle = {
const headerImgStyle = login?{}:{
'background': 'url(./image/header-bg-img.jpg) no-repeat',
'backgroundSize':'100% 100%'
}
};
const headerShadeStyle = login?{}:{
'background': 'linear-gradient(to bottom,rgba(0,0,0,0.6),rgba(0,0,0,0.5))'
};
return (
<acticle className={`header-box`} style={headerStyle}>
<Header style={{
background: "linear-gradient(to bottom,rgba(0,0,0,0.6),rgba(0,0,0,0.5))"
}}>
<acticle className={`header-box`} style={headerImgStyle}>
<Header style={headerShadeStyle}>
<div className="content">
<div className="logo">
<Link to="/" onClick={this.relieveLink}>YAPI</Link>

View File

@ -7,15 +7,6 @@ $color-blue-deeper: #34495E;
$color-grey-deep : #929aac;
$color-black-light : #404040;
/* .header-box.css */
//.light{
// background-color: #f7fafc;
// color: $color-blue;
//}
//.dark {
// background-color: $color-black-light;
// color: $color-white;
//}
.header-box {
display: block;
font-size: 0.14rem;