Skip to content

Commit

Permalink
created project with create react app and added files for homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
sergegl committed Mar 10, 2020
1 parent 71a2f92 commit 4957b4d
Show file tree
Hide file tree
Showing 9 changed files with 606 additions and 80 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"node-sass": "^4.13.1",
"react": "^16.13.0",
"react-dom": "^16.13.0",
"react-scripts": "3.4.0"
Expand Down
38 changes: 0 additions & 38 deletions src/App.css

This file was deleted.

21 changes: 3 additions & 18 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
import React from 'react';
import logo from './logo.svg';
import './App.css';
import './App.scss';
import HomePage from './homepage.component';

function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
<HomePage />
);
}

Expand Down
Empty file added src/App.scss
Empty file.
51 changes: 51 additions & 0 deletions src/homepage.component.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import React from 'react';
import './homepage.styles.scss';

const HomePage = () => (
<div className='homepage'>
<div className='directory-menu'>
<div className='menu-item'>
<div className='content'>
<h1 className='title'>
HATS
</h1>
<span className='subtitle'>SHOP NOW</span>
</div>
</div>
<div className='menu-item'>
<div className='content'>
<h1 className='title'>
JACKETS
</h1>
<span className='subtitle'>SHOP NOW</span>
</div>
</div>
<div className='menu-item'>
<div className='content'>
<h1 className='title'>
SNEAKERS
</h1>
<span className='subtitle'>SHOP NOW</span>
</div>
</div>
<div className='menu-item'>
<div className='content'>
<h1 className='title'>
WOMEN
</h1>
<span className='subtitle'>SHOP NOW</span>
</div>
</div>
<div className='menu-item'>
<div className='content'>
<h1 className='title'>
MEN
</h1>
<span className='subtitle'>SHOP NOW</span>
</div>
</div>
</div>
</div>
)

export default HomePage;
54 changes: 54 additions & 0 deletions src/homepage.styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.homepage {
display: flex;
flex-direction: column;
align-items: center;
padding: 20px 80px;
}

.directory-menu {
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}

.menu-item {
min-width: 30%;
height: 240px;
flex: 1 1 auto;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid black;
margin: 0 7.5px 15px;

&:first-child {
margin-right: 7.5px;
}

&:last-child {
margin-left: 7.5px;
}

.content {
height: 90px;
padding: 0 25px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border: 1px solid black;

.title {
font-weight: bold;
margin-bottom: 6px;
font-size: 22px;
color: #4a4a4a;
}

.subtitle {
font-weight: lighter;
font-size: 16px;
}
}
}
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import './index.scss';
import App from './App';
import * as serviceWorker from './serviceWorker';

Expand Down
File renamed without changes.
Loading

0 comments on commit 4957b4d

Please sign in to comment.