mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-23 03:11:25 +00:00
fix: Adjust sidebar banner to wrap bellow the title (#1819)
* fix: Adjust sidebar banner to wrap bellow the title * remove flex and add bottom border when uncollapsed * use classnames utility
This commit is contained in:
parent
02198f1076
commit
53a5bfe592
1 changed files with 4 additions and 6 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import classNames from "classnames";
|
||||||
import { Component, linkEvent } from "inferno";
|
import { Component, linkEvent } from "inferno";
|
||||||
import { PersonView, Site, SiteAggregates } from "lemmy-js-client";
|
import { PersonView, Site, SiteAggregates } from "lemmy-js-client";
|
||||||
import { mdToHtml } from "../../markdown";
|
import { mdToHtml } from "../../markdown";
|
||||||
|
@ -32,10 +33,7 @@ export class SiteSidebar extends Component<SiteSidebarProps, SiteSidebarState> {
|
||||||
return (
|
return (
|
||||||
<div className="site-sidebar accordion">
|
<div className="site-sidebar accordion">
|
||||||
<section id="sidebarInfo" className="card border-secondary mb-3">
|
<section id="sidebarInfo" className="card border-secondary mb-3">
|
||||||
<header
|
<header className="card-header" id="sidebarInfoHeader">
|
||||||
className="card-header d-flex align-items-center"
|
|
||||||
id="sidebarInfoHeader"
|
|
||||||
>
|
|
||||||
{this.siteName()}
|
{this.siteName()}
|
||||||
{!this.state.collapsed && (
|
{!this.state.collapsed && (
|
||||||
<BannerIconHeader banner={this.props.site.banner} />
|
<BannerIconHeader banner={this.props.site.banner} />
|
||||||
|
@ -54,7 +52,7 @@ export class SiteSidebar extends Component<SiteSidebarProps, SiteSidebarState> {
|
||||||
|
|
||||||
siteName() {
|
siteName() {
|
||||||
return (
|
return (
|
||||||
<>
|
<div className={classNames({ "mb-2": !this.state.collapsed })}>
|
||||||
<h5 className="mb-0 d-inline">{this.props.site.name}</h5>
|
<h5 className="mb-0 d-inline">{this.props.site.name}</h5>
|
||||||
{!this.props.isMobile && (
|
{!this.props.isMobile && (
|
||||||
<button
|
<button
|
||||||
|
@ -83,7 +81,7 @@ export class SiteSidebar extends Component<SiteSidebarProps, SiteSidebarState> {
|
||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue