Skip to content

Commit

Permalink
Merge pull request #6 from FoxComm/feaure/collapse-categories-on-mobile
Browse files Browse the repository at this point in the history
Collapse categories into hamburger menu
  • Loading branch information
anru committed Mar 3, 2016
2 parents 4026aec + 529c637 commit 2d0127a
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/categories/categories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ class Categories extends React.Component {
}
}

export default connect(getState, {...actions})(cssModules(Categories, styles));
export default connect(getState, actions)(cssModules(Categories, styles));
39 changes: 38 additions & 1 deletion src/components/layout/storefront.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,74 @@

.head {
display: flex;
align-items: center;
}

.search {
flex-grow: 1;
}

.logo {
.hamburger {
flex-grow: 1;
display: none;
}

.search, .hamburger, .cart, .head-icon {
width: 20px;
height: 20px;
}

.tools {
flex-grow: 1;
text-align: right;
display: flex;
}

.login {
flex-grow: 1;
}

.footer {
}

.logo {
width: 40px;
height: 40px;
}

.categories {
margin-top: 40px;
}

@media (--medium-viewport) {
.storefront {
lost-column: 1/1;
lost-offset: 0;
margin: 10px 0;
}
}


@media (--small-viewport) {
.storefront {
lost-column: 1/1;
lost-offset: 0;
margin: 10px 0;
}

.login-link {
display: none;
}

.categories {
display: none;
}

.search {
display: none;
}

.hamburger {
display: block;
}
}
13 changes: 10 additions & 3 deletions src/components/layout/storefront.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,19 @@ const StoreFront = props => {
<div styleName="storefront">
<div styleName="head">
<div styleName="search">
<Icon name="fc-magnifying-glass" />
<Icon name="fc-magnifying-glass" styleName="head-icon"/>
</div>
<div styleName="hamburger">
<Icon name="fc-hamburger" styleName="head-icon"/>
</div>
<Icon styleName="logo" name="fc-some_brand_logo" />
<div styleName="tools">
<Link to="/login">LOG IN</Link>
<Icon name="fc-cart" />
<div styleName="login">
<Link to="/login" styleName="login-link">LOG IN</Link>
</div>
<div styleName="cart">
<Icon name="fc-cart" styleName="head-icon"/>
</div>
</div>
</div>
<div styleName="categories">
Expand Down
18 changes: 18 additions & 0 deletions src/images/svg/Hamburger.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2d0127a

Please sign in to comment.