mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 05:43:16 +08:00
Show sidebar items at top of embed
This commit is contained in:
parent
5e734ca5c9
commit
40c32e1b3a
122
extensions/embed/js/forum/dist/extension.js
vendored
122
extensions/embed/js/forum/dist/extension.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,6 @@
|
|||
import BaseDiscussionPage from 'flarum/components/DiscussionPage';
|
||||
import PostStream from 'flarum/components/PostStream';
|
||||
import listItems from 'flarum/helpers/listItems';
|
||||
|
||||
export default class DiscussionPage extends BaseDiscussionPage {
|
||||
init() {
|
||||
|
@ -13,6 +14,9 @@ export default class DiscussionPage extends BaseDiscussionPage {
|
|||
<div className="DiscussionPage">
|
||||
<div class="container">
|
||||
<div className="DiscussionPage-discussion">
|
||||
<nav className="DiscussionPage-nav--embed">
|
||||
<ul>{listItems(this.sidebarItems().toArray())}</ul>
|
||||
</nav>
|
||||
<div className="DiscussionPage-stream">
|
||||
{this.stream ? this.stream.render() : ''}
|
||||
</div>
|
||||
|
@ -21,4 +25,12 @@ export default class DiscussionPage extends BaseDiscussionPage {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
sidebarItems() {
|
||||
const items = super.sidebarItems();
|
||||
|
||||
delete items.scrubber;
|
||||
|
||||
return items;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,24 @@
|
|||
.App-content {
|
||||
border-top: 0;
|
||||
}
|
||||
.DiscussionPage-nav--embed {
|
||||
> ul {
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
border-bottom: 1px solid @control-bg;
|
||||
|
||||
> li {
|
||||
margin: 15px 15px 15px 0;
|
||||
display: inline-block;
|
||||
|
||||
.Dropdown-menu {
|
||||
left: 0;
|
||||
right: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.DiscussionPage-stream {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user