render() {
return (
<div class="container">
+ {this.selects()}
{this.state.loading ? (
<h5>
<svg class="icon icon-spinner spin">
</small>
)}
</h5>
- {this.selects()}
{this.listings()}
{this.paginator()}
</div>
onChange={this.handleDataTypeChange}
/>
- <span class="mx-2">
+ <span class="mx-3">
<SortSelect sort={this.state.sort} onChange={this.handleSortChange} />
</span>
<a
}`}
target="_blank"
>
- <svg class="icon mx-2 text-muted small">
+ <svg class="icon text-muted small">
<use xlinkHref="#icon-rss">#</use>
</svg>
</a>
posts() {
return (
<div class="main-content-wrapper">
+ {this.selects()}
{this.state.loading ? (
<h5>
<svg class="icon icon-spinner spin">
</h5>
) : (
<div>
- {this.selects()}
{this.listings()}
{this.paginator()}
</div>
type_={this.state.dataType}
onChange={this.handleDataTypeChange}
/>
- <span class="mx-2">
+ <span class="mx-3">
<ListingTypeSelect
type_={this.state.listingType}
onChange={this.handleListingTypeChange}
<div className="ml-4">
<div className="post-title">
<h5 className="mb-0 d-inline">
- <Link
- className="text-body"
- to={`/post/${post.id}`}
- title={i18n.t('comments')}
- >
- {post.name}
- </Link>
+ {this.props.showBody && post.url ? (
+ <a
+ className="text-body"
+ href={post.url}
+ target="_blank"
+ title={post.url}
+ >
+ {post.name}
+ </a>
+ ) : (
+ <Link
+ className="text-body"
+ to={`/post/${post.id}`}
+ title={i18n.t('comments')}
+ >
+ {post.name}
+ </Link>
+ )}
</h5>
{post.url && (
<small class="d-inline-block">