Skip to content

Commit

Permalink
adding header component and links to home, shop page and contact
Browse files Browse the repository at this point in the history
  • Loading branch information
Vittorio Pinti committed Aug 6, 2021
1 parent 0a18420 commit 44fd8e0
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
body {
font-family: 'Open Sans Condensed', sans-serif;
padding: 20px 60px;
}

a {
text-decoration: none;
color: black;
}
2 changes: 2 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import './App.css';

import HomePage from './pages/homepage/homepage.component';
import ShopPage from './pages/shop/shop.component';
import Header from './components/header/header-component';

function App() {
return (
<div>
<Header />
<Switch>
<Route exact path='/' component={HomePage}/>
<Route path='/shop' component={ShopPage}/>
Expand Down
17 changes: 17 additions & 0 deletions src/assets/crown.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions src/components/header/header-component.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react';
import { Link } from 'react-router-dom';

import { ReactComponent as Logo } from '../../assets/crown.svg';

import './header-styles.scss';

const Header = () => {
return (
<div className='header'>
<Link to='/' className='logo-container'>
<Logo className='logo' />
</Link>
<div className="options">
<Link className='option' to='/shop'>SHOP</Link>
<Link className='option' to='/shop'>CONTACT</Link>
</div>
</div>
)
}

export default Header
25 changes: 25 additions & 0 deletions src/components/header/header-styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.header {
height: 70px;
width: 100%;
display: flex;
justify-content: space-between;
margin-bottom: 25px;

.logo-container {
height: 100%;
width: 70px;
padding: 25px;
}

.options {
width: 50%;
height: 100%;
display: flex;
align-items: center;
justify-content: flex-end;

.option {
padding: 10px 15px;
}
}
}

0 comments on commit 44fd8e0

Please sign in to comment.