mirror of
https://github.com/flarum/framework.git
synced 2024-12-05 00:43:39 +08:00
Use flexbox for sideNav. fixes #1408
This commit is contained in:
parent
fbfe0c1e6f
commit
72778ddb8c
|
@ -71,6 +71,7 @@ export default class IndexPage extends Page {
|
||||||
<div className="IndexPage">
|
<div className="IndexPage">
|
||||||
{this.hero()}
|
{this.hero()}
|
||||||
<div className="container">
|
<div className="container">
|
||||||
|
<div className="sideNavContainer">
|
||||||
<nav className="IndexPage-nav sideNav">
|
<nav className="IndexPage-nav sideNav">
|
||||||
<ul>{listItems(this.sidebarItems().toArray())}</ul>
|
<ul>{listItems(this.sidebarItems().toArray())}</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -83,6 +84,7 @@ export default class IndexPage extends Page {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ export default class UserPage extends Page {
|
||||||
controlsButtonClassName: 'Button'
|
controlsButtonClassName: 'Button'
|
||||||
}),
|
}),
|
||||||
<div className="container">
|
<div className="container">
|
||||||
|
<div className="sideNavContainer">
|
||||||
<nav className="sideNav UserPage-nav" config={affixSidebar}>
|
<nav className="sideNav UserPage-nav" config={affixSidebar}>
|
||||||
<ul>{listItems(this.sidebarItems().toArray())}</ul>
|
<ul>{listItems(this.sidebarItems().toArray())}</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -47,6 +48,7 @@ export default class UserPage extends Page {
|
||||||
{this.content()}
|
{this.content()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
] : [
|
] : [
|
||||||
LoadingIndicator.component({className: 'LoadingIndicator--block'})
|
LoadingIndicator.component({className: 'LoadingIndicator--block'})
|
||||||
]}
|
]}
|
||||||
|
|
|
@ -54,8 +54,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@media @desktop-up {
|
@media @desktop-up {
|
||||||
|
.sideNavContainer {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
.sideNav {
|
.sideNav {
|
||||||
float: left;
|
flex-shrink: 0;
|
||||||
|
margin-right: 50px;
|
||||||
|
|
||||||
&, > ul {
|
&, > ul {
|
||||||
width: 190px;
|
width: 190px;
|
||||||
|
@ -119,6 +123,6 @@
|
||||||
@media @desktop-up {
|
@media @desktop-up {
|
||||||
.sideNavOffset {
|
.sideNavOffset {
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
margin-left: 240px;
|
flex: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
> li {
|
> li {
|
||||||
border-bottom: 1px solid @control-bg;
|
border-bottom: 1px solid @control-bg;
|
||||||
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Post {
|
.Post {
|
||||||
|
@ -20,7 +21,6 @@
|
||||||
}
|
}
|
||||||
.PostsUserPage-discussion {
|
.PostsUserPage-discussion {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-top: 15px;
|
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user