import { Components, getRawComponent, replaceComponent } from 'meteor/nova:lib'; import React, { PropTypes, Component } from 'react'; import { FormattedMessage, FormattedRelative } from 'react-intl'; import { Link } from 'react-router'; import Posts from "meteor/nova:posts"; class CustomPostsItem extends getRawComponent('PostsItem') { render() { const post = this.props.post; let postClass = "posts-item"; if (post.sticky) postClass += " posts-sticky"; // ⭐ custom code starts here ⭐ if (post.color) { postClass += " post-"+post.color; } // ⭐ custom code ends here ⭐ return (
{post.thumbnailUrl ? : null}

{post.title} {this.renderCategories()}

{post.user?
: null}
{this.props.currentUser && this.props.currentUser.isAdmin ? : null} {Posts.options.mutations.edit.check(this.props.currentUser, post) ? this.renderActions() : null}
{this.renderCommenters()}
) } } replaceComponent('PostsItem', CustomPostsItem);