Skip to content

Commit

Permalink
Merge pull request #19 from toussam/product
Browse files Browse the repository at this point in the history
redesign product page
  • Loading branch information
Justkant committed Oct 25, 2015
2 parents 171bd66 + 8482bf0 commit 9d64ea0
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/components/ProductVignette/ProductVignette.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import React, { Component } from 'react';
import { Link } from 'react-router';

export default class ProductVignette extends Component {
render() {
const styles = require('./ProductVignette.styl');
return (
<div className={styles.productContainer}>
<img src="product.jpg"/>
<Link to="/product">
<img src="product.jpg"/>
</Link>
<div className={styles.productInfos}>
<p>Title</p>
</div>
Expand Down
45 changes: 45 additions & 0 deletions src/containers/Product/Product.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import React, { Component } from 'react';

export default class Product extends Component {
render() {
const styles = require('./Product.styl');
return (
<div className={styles.productContainer}>

<img src="product.jpg"/>

<div className={styles.mainInformations}>

<div className={styles.mainInformationsLeft}>
<h3>Brand</h3>
<h3>Price</h3>
</div>

<div className={styles.mainInformationsRight}>
<p>Nike</p>
<p>120$</p>
</div>

</div>

<div className={styles.additionalInformations}>
<p>Tempore quo primis auspiciis in mundanum fulgorem surgeret victura dum erunt homines Roma, ut augeretur sublimibus incrementis, foedere pacis aeternae Virtus convenit atque Fortuna plerumque dissidentes, quarum si altera defuisset, ad perfectam non venerat summitatem.</p>
</div>

</div>
);
}
}

/* OLD TEST
<div className={styles.productContainer}>
<img src="product.jpg"/>
<div className={styles.productInfos}>
<h1>Title</h1>
<h2>Price</h2>
<div className={styles.productDescription}>
<p>Description : Tempore quo primis auspiciis in mundanum fulgorem surgeret victura dum erunt homines Roma, ut augeretur sublimibus incrementis, foedere pacis aeternae Virtus convenit atque Fortuna plerumque dissidentes, quarum si altera defuisset, ad perfectam non venerat summitatem.</p>
</div>
</div>
</div>
*/
2 changes: 1 addition & 1 deletion src/containers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export App from './App/App';
export Market from './Market/Market';
export Signup from './Signup/Signup';
export Login from './Login/Login';
// export Product from './Product/Product';
export Product from './Product/Product';
export Profile from './Profile/Profile';
export Admin from './Admin/Admin';
export NotFound from './NotFound/NotFound';
Expand Down
2 changes: 2 additions & 0 deletions src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
Admin,
Panel,
Users,
Product,
Products,
NotFound
} from './containers';
Expand Down Expand Up @@ -72,6 +73,7 @@ export default function(store) {
<IndexRoute component={Profile}/>
<Route path="orders" component={Orders}/>
</Route>
<Route path="product" component={Product} onEnter={requireAuth}/>
<Route path="admin" component={Admin} onEnter={requireAdmin}>
<IndexRoute component={Panel}/>
<Route path="users" component={Users}/>
Expand Down

0 comments on commit 9d64ea0

Please sign in to comment.