Skip to content

Commit

Permalink
fix: Adjust sidebar banner to wrap bellow the title (#1819)
Browse files Browse the repository at this point in the history
* fix: Adjust sidebar banner to wrap bellow the title

* remove flex and add bottom border when uncollapsed

* use classnames utility
  • Loading branch information
oliverwhite19 authored Jul 7, 2023
1 parent 02198f1 commit 53a5bfe
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/shared/components/home/site-sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import classNames from "classnames";
import { Component, linkEvent } from "inferno";
import { PersonView, Site, SiteAggregates } from "lemmy-js-client";
import { mdToHtml } from "../../markdown";
Expand Down Expand Up @@ -32,10 +33,7 @@ export class SiteSidebar extends Component<SiteSidebarProps, SiteSidebarState> {
return (
<div className="site-sidebar accordion">
<section id="sidebarInfo" className="card border-secondary mb-3">
<header
className="card-header d-flex align-items-center"
id="sidebarInfoHeader"
>
<header className="card-header" id="sidebarInfoHeader">
{this.siteName()}
{!this.state.collapsed && (
<BannerIconHeader banner={this.props.site.banner} />
Expand All @@ -54,7 +52,7 @@ export class SiteSidebar extends Component<SiteSidebarProps, SiteSidebarState> {

siteName() {
return (
<>
<div className={classNames({ "mb-2": !this.state.collapsed })}>
<h5 className="mb-0 d-inline">{this.props.site.name}</h5>
{!this.props.isMobile && (
<button
Expand Down Expand Up @@ -83,7 +81,7 @@ export class SiteSidebar extends Component<SiteSidebarProps, SiteSidebarState> {
)}
</button>
)}
</>
</div>
);
}

Expand Down

0 comments on commit 53a5bfe

Please sign in to comment.