From 297755e7578356607616f58c49087298c38d561d Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 19 Aug 2019 19:37:32 -0700 Subject: [PATCH] Adding cards for sidebars in UI. --- ui/src/components/community.tsx | 4 +- ui/src/components/main.tsx | 93 ++++++++++--------- ui/src/components/navbar.tsx | 2 +- ui/src/components/sidebar.tsx | 157 ++++++++++++++++---------------- ui/src/components/user.tsx | 110 ++++++++++++---------- ui/src/css/main.css | 4 - ui/src/index.tsx | 2 +- 7 files changed, 197 insertions(+), 175 deletions(-) diff --git a/ui/src/components/community.tsx b/ui/src/components/community.tsx index b9f9c8b2f..0a982a847 100644 --- a/ui/src/components/community.tsx +++ b/ui/src/components/community.tsx @@ -6,7 +6,7 @@ import { WebSocketService } from '../services'; import { PostListings } from './post-listings'; import { Sidebar } from './sidebar'; import { msgOp, routeSortTypeToEnum, fetchLimit } from '../utils'; -import { T } from 'inferno-i18next'; +import { T, i18n } from 'inferno-i18next'; interface State { community: CommunityI; @@ -134,7 +134,7 @@ export class Community extends Component { - + diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx index a21be2504..326318116 100644 --- a/ui/src/components/main.tsx +++ b/ui/src/components/main.tsx @@ -134,25 +134,30 @@ export class Main extends Component {
{!this.state.loading &&
- {this.trendingCommunities()} - {UserService.Instance.user && this.state.subscribedCommunities.length > 0 && -
-
- ## -
-
    - {this.state.subscribedCommunities.map(community => -
  • {community.community_name}
  • - )} -
+
+
+ {this.trendingCommunities()} + {UserService.Instance.user && this.state.subscribedCommunities.length > 0 && +
+
+ ## +
+
    + {this.state.subscribedCommunities.map(community => +
  • {community.community_name}
  • + )} +
+
+ } + + # +
- } - - # - - {this.sidebar()}
+ {this.sidebar()} + {this.landing()} +
}
) @@ -175,15 +180,16 @@ export class Main extends Component { sidebar() { return ( -
- {!this.state.showEditSite ? - this.siteInfo() : - - } - {this.landing()} +
+
+ {!this.state.showEditSite ? + this.siteInfo() : + + } +
) } @@ -208,17 +214,17 @@ export class Main extends Component { }
    -
  • +
  • #
  • -
  • +
  • #
  • -
  • +
  • #
  • - + #
  • @@ -235,7 +241,6 @@ export class Main extends Component {

    -
    }
    @@ -244,17 +249,19 @@ export class Main extends Component { landing() { return ( -
    -
    - # - # - Lemmybeta -
    -

    - ###

    #

    #

    #

    #### -
    -

    +
    +
    +
    + # + # + Lemmybeta +
    +

    + ###

    #

    #

    #

    #### +
    +

    +
    ) } @@ -275,7 +282,7 @@ export class Main extends Component { selects() { return ( -
    +