Add character cutoff on descriptions for featured and community content
This commit is contained in:
parent
aa968e2b13
commit
aff6308846
1 changed files with 4 additions and 1 deletions
|
@ -150,6 +150,8 @@ var featuredContentItemStyle = {
|
||||||
};
|
};
|
||||||
|
|
||||||
var FeaturedContentItem = React.createClass({
|
var FeaturedContentItem = React.createClass({
|
||||||
|
_maxDescriptionLength: 250,
|
||||||
|
|
||||||
propTypes: {
|
propTypes: {
|
||||||
name: React.PropTypes.string,
|
name: React.PropTypes.string,
|
||||||
},
|
},
|
||||||
|
@ -207,7 +209,8 @@ var FeaturedContentItem = React.createClass({
|
||||||
|
|
||||||
<DownloadLink streamName={this.props.name} />
|
<DownloadLink streamName={this.props.name} />
|
||||||
</div>
|
</div>
|
||||||
<p style={featuredContentItemDescriptionStyle}>{metadata.description}</p>
|
<p style={featuredContentItemDescriptionStyle}>{metadata.description.slice(0, this._maxDescriptionLength) +
|
||||||
|
(metadata.description.length > this._maxDescriptionLength ? ' ...' : '')}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>);
|
</div>);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue