-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
domingo, 14 de febrero de 2016, 02:12:39 CET
- Loading branch information
1 parent
025ba78
commit 539e298
Showing
11 changed files
with
129 additions
and
32 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
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,21 @@ | ||
import React from 'react' | ||
import OffertContent from '../offert/content' | ||
import OffertForm from '../offert/form' | ||
|
||
const ContentAd = ({text, offerts, url}) => ( | ||
<div className='singleAddContainer '> | ||
<img src={url} alt={text} /> | ||
<h2 className='header'>Descripción del producto</h2> | ||
<p className='description'>{text}</p> | ||
<div className='divider'></div> | ||
<div id='offerts'> | ||
<div className='ui comments'> | ||
{offerts.map((offert, key) => <OffertContent key={key} {...offert} />) } | ||
<OffertForm /> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
|
||
export default ContentAd | ||
|
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,8 @@ | ||
import React from 'react' | ||
|
||
const PreviewAd = ({text, offerts, url}) => ( | ||
<figure><img src={url} alt={text} /></figure> | ||
) | ||
|
||
export default PreviewAd | ||
|
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,24 +1,38 @@ | ||
import React from 'react' | ||
import Ad from '../ad' | ||
import ReactDOM from 'react-dom' | ||
import PreviewAd from '../ad/preview' | ||
import ContentAd from '../ad/content' | ||
|
||
const Ads = ({grid}) => { | ||
return ( | ||
const Grid3D = window.grid3D | ||
|
||
export default class Ads extends React.Component { | ||
|
||
static get propTypes () { | ||
return { | ||
grid: React.PropTypes.array | ||
} | ||
} | ||
|
||
componentDidMount () { | ||
this.grid3DComponent = new Grid3D(ReactDOM.findDOMNode(this)) | ||
} | ||
|
||
render () { | ||
const {grid} = this.props | ||
return ( | ||
<section className='grid3d vertical container' id='grid3d'> | ||
<div className='grid-wrap ui container'> | ||
<div className='grid'> | ||
{ | ||
grid.map((ad) => { | ||
return ( | ||
<figure> | ||
<Ad {...ad}/> | ||
</figure> | ||
) | ||
}) | ||
} | ||
{grid.map((ad, key) => (<PreviewAd key={key} {...ad}/>))} | ||
</div> | ||
</div> | ||
</section> | ||
) | ||
<div className='content'> | ||
{grid.map((ad, key) => (<ContentAd key={key} {...ad}/>))} | ||
<span className='loading'></span> | ||
<span className='icon3d close-content'></span> | ||
</div> | ||
</section> | ||
) | ||
} | ||
} | ||
|
||
export default Ads |
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,31 @@ | ||
import React from 'react' | ||
import cx from 'classnames' | ||
|
||
const OffertContent = ({text, name, url, author}) => { | ||
const offertClass = cx('comment', { | ||
author: author | ||
}) | ||
|
||
return ( | ||
<div className={offertClass}> | ||
<span className='author'>{name}</span> | ||
<div className='metadata'> | ||
<span className='date'>Hoy a las 5:42PM</span> | ||
</div> | ||
<div className='imageComment'> | ||
<img src='http://placehold.it/600x600' alt='lorem' className='ui fluid image' /> | ||
</div> | ||
<div className='text'>{text}</div> | ||
</div> | ||
) | ||
} | ||
|
||
OffertContent.defaultProps = { | ||
text: 'Este anuncio no tiene texto', | ||
name: 'Anónimo', | ||
url: 'http://placehold.it/200x200', | ||
author: false | ||
} | ||
|
||
export default OffertContent | ||
|
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,26 @@ | ||
import React from 'react' | ||
|
||
const OffertForm = ({}) => ( | ||
<form className='ui reply form'> | ||
<h2 className='header'>Ofertar</h2> | ||
<div className='field'> | ||
<input type='text' name='name' placeholder='Nombre' /> | ||
</div> | ||
<div className='field'> | ||
<textarea></textarea> | ||
<div className='countCharacters'> | ||
123 | ||
</div> | ||
</div> | ||
<input type='file' name='addPhoto' id='addPhoto' value='' /> | ||
<label htmlFor='addPhoto'>Arrastra una foto o haz click aquí</label> | ||
|
||
<div className='ui blue labeled submit icon button'> | ||
<i className='icon send'></i> Enviar | ||
</div> | ||
</form> | ||
) | ||
|
||
export default OffertForm | ||
|
||
|
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,2 @@ | ||
@import '3dgrid'; | ||
@import 'style'; |
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