Skip to content

Commit

Permalink
built out layout grid and header navbar components
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxnelson997 committed Jul 10, 2018
1 parent 142c7b3 commit 9c4b3fc
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ import reducers from './reducers';

const createStoreWithMiddleware = applyMiddleware()(createStore);

import 'bootstrap/dist/css/bootstrap.css';
import './style/main.scss';

import Layout from './components/layout';


function main() {
ReactDOM.render(
<Provider store={createStoreWithMiddleware(reducers)}>
Expand Down
13 changes: 13 additions & 0 deletions src/components/headernavbar/header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React, { Component } from 'react';

class Header extends Component {
render() {
return (
<div className='header'>
<img src='http://via.placeholder.com/50x50'/>
</div>
)
}
}

export default Header;
13 changes: 13 additions & 0 deletions src/components/headernavbar/navbar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React, { Component } from 'react';

class Navbar extends Component {
render() {
return (
<div className='navbar'>

</div>
)
}
}

export default Navbar;
7 changes: 6 additions & 1 deletion src/components/layout.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import React, { Component } from 'react';

import Header from './headernavbar/header';
import Navbar from './headernavbar/navbar';

class Layout extends Component {
render() {
return (
<div>
<div className='layout'>
{this.props.children}
<Header/>
<Navbar/>
</div>
);
}
Expand Down
9 changes: 9 additions & 0 deletions src/style/headernavbar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.header {
display: grid;
justify-content: center;
}

.navbar {
background-color: #333;
box-shadow: 0 2px 6px 0 rgba(0,0,0,0.2);
}
5 changes: 5 additions & 0 deletions src/style/layout.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.layout {
display: grid;
grid-template-rows: [header-s] 50px [header-e nav-s] 50px [nav-e content-s] 1fr [content-e];
grid-template-columns: [s] 1fr [e];
}
17 changes: 17 additions & 0 deletions src/style/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@


html {
font-size: 62.5%;
}

*,
*::after,
*::before {
margin: 0;
padding: 0;
box-sizing: inherit;
}


@import 'layout';
@import 'headernavbar';

0 comments on commit 9c4b3fc

Please sign in to comment.