Change home page layout

This commit is contained in:
LordMathis 2019-10-07 22:33:54 +02:00
parent ab6baca1f0
commit 2f23dd9a00
No known key found for this signature in database
GPG Key ID: 575849FD91CE470C
5 changed files with 18 additions and 3 deletions

View File

@ -1 +1,5 @@
@import "../static/stylesheets/variables.scss"; @import "../static/stylesheets/variables.scss";
#about {
background-color: #324263;
}

View File

@ -8,12 +8,17 @@ export default class Wrapper extends Component {
children: PropTypes.oneOfType([ children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node), PropTypes.arrayOf(PropTypes.node),
PropTypes.node PropTypes.node
]).isRequired ]).isRequired,
flex: PropTypes.bool
}
static defaultProps = {
flex: false
} }
render () { render () {
return ( return (
<div className={styles.centerContent}> <div className={` ${styles.centerContent} ${this.props.flex ? styles.flexWrap : ''}` }>
{this.props.children} {this.props.children}
</div> </div>
) )

View File

@ -3,3 +3,7 @@
.centerContent { .centerContent {
text-align: center; text-align: center;
} }
.flexWrap {
display: flex;
}

View File

@ -31,7 +31,7 @@ export default class MainContainer extends Component {
return ( return (
<div> <div>
<Home/> <Home/>
<Wrapper> <Wrapper flex={true}>
<About isLoading={this.state.isLoadingAbout} <About isLoading={this.state.isLoadingAbout}
about={this.state.about}/> about={this.state.about}/>
<Blog isLoading={this.state.isLoadingBlog} <Blog isLoading={this.state.isLoadingBlog}

View File

@ -12,6 +12,8 @@
@media (min-width: $break-large) { @media (min-width: $break-large) {
width: 960px; width: 960px;
} }
min-height: 100vh;
height: 100vh;
} }
.content { .content {