Skip to content

Commit

Permalink
Setup-grid-system#76; sidebar styling
Browse files Browse the repository at this point in the history
  • Loading branch information
nickllerandi committed May 3, 2019
1 parent 120d243 commit efbe5ba
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 9 deletions.
Binary file modified .DS_Store
Binary file not shown.
8 changes: 4 additions & 4 deletions client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {black, white} from './utils'
// Components
// Layout
import Navbar from "./components/layout/Navbar";
import Sidebar from './components/layout/Sidebar'
import Homepage from "./components/homepage/Homepage";
import Footer from "./components/layout/Footer";

Expand Down Expand Up @@ -48,7 +49,7 @@ class App extends Component {
<Navbar/>
<ContentWrapper>
<SidebarWrapper>
Navigation
<Sidebar/>
</SidebarWrapper>
<MainbarWrapper>
<Route exact path="/" component={Homepage}/>
Expand Down Expand Up @@ -78,12 +79,11 @@ const AppWrapper = styled.div`

const ContentWrapper = styled.div`
display: flex;
margin-top: 30rem;
`;

const SidebarWrapper = styled.div`
const SidebarWrapper = styled.nav`
background-color: ${black};
flex: 0 0 18%;
flex: 0 0 15%;
color: ${white};
`;

Expand Down
6 changes: 3 additions & 3 deletions client/src/components/layout/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, {Component} from "react";
import {Link} from "react-router-dom";
import {connect} from "react-redux";
import styled from 'styled-components'
import {darken, lighten} from 'polished'
import {darken} from 'polished'

// REDUX ACTIONS
import {logoutUser} from "../../actions/authActions";
Expand Down Expand Up @@ -143,9 +143,9 @@ const NavbarStyled = styled.header`
}
}
&__input:focus + &__button {
/* &__input:focus + &__button {
background-color: red;
}
} */
&__button {
border: none;
Expand Down
38 changes: 38 additions & 0 deletions client/src/components/layout/Sidebar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import React from 'react';
import {Link} from 'react-router-dom'

// ASSETS
import sprites from '../../img/sprite.svg'

const Sidebar = () => {
return (
<ul className='side-nav'>
<li className='side-nav__item'>
<Link to='/'>
<svg className='side-nav__icon'>
<use xlinkHref={`${sprites}#icon-home`} />
</svg>
<span>Home</span>
</Link>
</li>
<li className='side-nav__item'>
<Link to='/'>
<svg className='side-nav__icon'>
<use xlinkHref={`${sprites}#icon-price-tag`} />
</svg>
<span>Tags</span>
</Link>
</li>
<li className='side-nav__item'>
<Link to='/'>
<svg className='side-nav__icon'>
<use xlinkHref={`${sprites}#icon-slideshare`} />
</svg>
<span>Users</span>
</Link>
</li>
</ul>
);
}

export default Sidebar;
2 changes: 1 addition & 1 deletion client/src/elements/Buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const Button = styled.button`
`;

const SignUpButton = styled(Button)`
background: ${secondary};
background: ${primary};
&:hover {
background: ${darken(0.2, primary)};
Expand Down
28 changes: 28 additions & 0 deletions client/src/img/sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion client/src/utils/Colors.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const primary = '#5EC5B6'
export const secondary = '#85DAEF'
export const secondary = '#54C0E4'
export const secondary_light = '#8EEEEF'

export const black = '#242729'
Expand Down

0 comments on commit efbe5ba

Please sign in to comment.