-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
broken homepage into smaller components and finishing styling our men…
…u-item
- Loading branch information
Showing
11 changed files
with
165 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,3 @@ | ||
.App { | ||
text-align: center; | ||
} | ||
|
||
.App-logo { | ||
height: 40vmin; | ||
pointer-events: none; | ||
} | ||
|
||
@media (prefers-reduced-motion: no-preference) { | ||
.App-logo { | ||
animation: App-logo-spin infinite 20s linear; | ||
} | ||
} | ||
|
||
.App-header { | ||
background-color: #282c34; | ||
min-height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: calc(10px + 2vmin); | ||
color: white; | ||
} | ||
|
||
.App-link { | ||
color: #61dafb; | ||
} | ||
|
||
@keyframes App-logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
body{ | ||
font-family: 'Open Sans Condensed'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import React from 'react'; | ||
import MenuItem from '../menu-item/menu-items.component'; | ||
import './directory.styles.scss'; | ||
|
||
class Directory extends React.Component { | ||
constructor(){ | ||
super(); | ||
this.state = { | ||
sections : [ | ||
{ | ||
title: 'hats', | ||
imageUrl: 'https://i.ibb.co/cvpntL1/hats.png', | ||
id: 1, | ||
linkUrl: 'shop/hats' | ||
}, | ||
{ | ||
title: 'jackets', | ||
imageUrl: 'https://i.ibb.co/px2tCc3/jackets.png', | ||
id: 2, | ||
linkUrl: 'shop/jackets' | ||
}, | ||
{ | ||
title: 'sneakers', | ||
imageUrl: 'https://i.ibb.co/0jqHpnp/sneakers.png', | ||
id: 3, | ||
linkUrl: 'shop/sneakers' | ||
}, | ||
{ | ||
title: 'womens', | ||
imageUrl: 'https://i.ibb.co/GCCdy8t/womens.png', | ||
size: 'large', | ||
id: 4, | ||
linkUrl: 'shop/womens' | ||
}, | ||
{ | ||
title: 'mens', | ||
imageUrl: 'https://i.ibb.co/R70vBrQ/men.png', | ||
size: 'large', | ||
id: 5, | ||
linkUrl: 'shop/mens' | ||
} | ||
] | ||
} | ||
} | ||
render(){ | ||
return( | ||
<div className='directory-menu'> | ||
{ | ||
this.state.sections.map(({title,imageUrl,size,id,linkUrl})=>( | ||
<MenuItem key={id} title={title} imageUrl={imageUrl} size={size} /> | ||
)) | ||
} | ||
|
||
</div> | ||
) | ||
} | ||
|
||
} | ||
|
||
export default Directory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.directory-menu { | ||
width: 100%; | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: space-between; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import './menu-items.styles.scss'; | ||
|
||
const MenuItem = ({title,imageUrl, size}) => ( | ||
<div className={`${size} menu-item`}> | ||
<div className='background-image' style={{backgroundImage:`url(${imageUrl})`}}></div> | ||
<div className='content'> | ||
<h1 className='title'>{title.toUpperCase()}</h1> | ||
<span className='subtitle'>SHOP NOW</span> | ||
</div> | ||
</div> | ||
|
||
); | ||
|
||
export default MenuItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
.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; | ||
overflow: hidden; | ||
&:hover{ | ||
cursor: pointer; | ||
& .background-image{ | ||
transform: scale(1.1); | ||
transition:transform 6s cubic-bezier(0.25, 0.45, 0.45, 0.95); | ||
} | ||
} | ||
&.large{ | ||
height: 380px; | ||
} | ||
|
||
&:first-child { | ||
margin-right: 7.5px; | ||
} | ||
|
||
&:last-child { | ||
margin-left: 7.5px; | ||
} | ||
.background-image{ | ||
width: 100%; | ||
height: 100%; | ||
background-position: center; | ||
background-size: cover; | ||
|
||
} | ||
.content { | ||
height: 90px; | ||
padding: 0 25px; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
border: 1px solid black; | ||
background-color: white; | ||
opacity: 0.7; | ||
position: absolute; | ||
|
||
.title { | ||
font-weight: bold; | ||
margin-bottom: 6px; | ||
font-size: 22px; | ||
color: #4a4a4a; | ||
} | ||
|
||
.subtitle { | ||
font-weight: lighter; | ||
font-size: 16px; | ||
} | ||
} | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
import Directory from '../../components/directory/directory.component'; | ||
import './homepage.styles.scss'; | ||
|
||
const HomePage = () => ( | ||
<div className='homepage'> | ||
<Directory/> | ||
</div> | ||
) | ||
export default HomePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.homepage { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
padding: 20px 80px; | ||
} |