Some front end fixes.

This commit is contained in:
Dessalines 2020-02-15 20:29:57 -05:00
parent 83d17b2643
commit 4b0a55144f
3 changed files with 23 additions and 12 deletions

View file

@ -136,6 +136,7 @@ export class Community extends Component<any, State> {
render() { render() {
return ( return (
<div class="container"> <div class="container">
{this.selects()}
{this.state.loading ? ( {this.state.loading ? (
<h5> <h5>
<svg class="icon icon-spinner spin"> <svg class="icon icon-spinner spin">
@ -158,7 +159,6 @@ export class Community extends Component<any, State> {
</small> </small>
)} )}
</h5> </h5>
{this.selects()}
{this.listings()} {this.listings()}
{this.paginator()} {this.paginator()}
</div> </div>
@ -200,7 +200,7 @@ export class Community extends Component<any, State> {
onChange={this.handleDataTypeChange} onChange={this.handleDataTypeChange}
/> />
<span class="mx-2"> <span class="mx-3">
<SortSelect sort={this.state.sort} onChange={this.handleSortChange} /> <SortSelect sort={this.state.sort} onChange={this.handleSortChange} />
</span> </span>
<a <a
@ -209,7 +209,7 @@ export class Community extends Component<any, State> {
}`} }`}
target="_blank" target="_blank"
> >
<svg class="icon mx-2 text-muted small"> <svg class="icon text-muted small">
<use xlinkHref="#icon-rss">#</use> <use xlinkHref="#icon-rss">#</use>
</svg> </svg>
</a> </a>

View file

@ -386,6 +386,7 @@ export class Main extends Component<any, MainState> {
posts() { posts() {
return ( return (
<div class="main-content-wrapper"> <div class="main-content-wrapper">
{this.selects()}
{this.state.loading ? ( {this.state.loading ? (
<h5> <h5>
<svg class="icon icon-spinner spin"> <svg class="icon icon-spinner spin">
@ -394,7 +395,6 @@ export class Main extends Component<any, MainState> {
</h5> </h5>
) : ( ) : (
<div> <div>
{this.selects()}
{this.listings()} {this.listings()}
{this.paginator()} {this.paginator()}
</div> </div>
@ -428,7 +428,7 @@ export class Main extends Component<any, MainState> {
type_={this.state.dataType} type_={this.state.dataType}
onChange={this.handleDataTypeChange} onChange={this.handleDataTypeChange}
/> />
<span class="mx-2"> <span class="mx-3">
<ListingTypeSelect <ListingTypeSelect
type_={this.state.listingType} type_={this.state.listingType}
onChange={this.handleListingTypeChange} onChange={this.handleListingTypeChange}

View file

@ -171,6 +171,16 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
<div className="ml-4"> <div className="ml-4">
<div className="post-title"> <div className="post-title">
<h5 className="mb-0 d-inline"> <h5 className="mb-0 d-inline">
{this.props.showBody && post.url ? (
<a
className="text-body"
href={post.url}
target="_blank"
title={post.url}
>
{post.name}
</a>
) : (
<Link <Link
className="text-body" className="text-body"
to={`/post/${post.id}`} to={`/post/${post.id}`}
@ -178,6 +188,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
> >
{post.name} {post.name}
</Link> </Link>
)}
</h5> </h5>
{post.url && ( {post.url && (
<small class="d-inline-block"> <small class="d-inline-block">