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
Jay Jung committed Dec 19, 2019
1 parent 1a22d03 commit 2e82c60
Show file tree
Hide file tree
Showing 5 changed files with 846 additions and 265 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.0",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-scripts": "3.3.0"
Expand Down
33 changes: 12 additions & 21 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
import React from 'react';
import logo from './logo.svg';

import HomePage from './homepage.component';

import './App.css';

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>
);
class App extends React.Component {
render() {
return (
<div className='App'>
<HomePage />
</div>
);
}
}

export default App;
export default App;
43 changes: 43 additions & 0 deletions src/homepage.component.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import React from 'react';

import './homepage.styles.scss';

const HomePage = () => (
<div className='homepage'>
<h1>Welcome to my Homepage</h1>
<div className='directory-menu'>
<div className='menu-item'>
<div className='content'>
<div className='title'>HATS</div>
<span className='subtitle'>SHOP NOW</span>
</div>
</div>
<div className='menu-item'>
<div className='content'>
<div className='title'>JACKETS</div>
<span className='subtitle'>SHOP NOW</span>
</div>
</div>
<div className='menu-item'>
<div className='content'>
<div className='title'>SHOES</div>
<span className='subtitle'>SHOP NOW</span>
</div>
</div>
<div className='menu-item'>
<div className='content'>
<div className='title'>WOMENS</div>
<span className='subtitle'>SHOP NOW</span>
</div>
</div>
<div className='menu-item'>
<div className='content'>
<div className='title'>MENS</div>
<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;
}
}
}
Loading

0 comments on commit 2e82c60

Please sign in to comment.