mirror of
https://github.com/flarum/framework.git
synced 2025-01-31 15:58:47 +08:00
Make the toolbar fixed to the top; tweak contents
Add a comment count (which links to the full discussion) and show the reply button normally on mobile.
This commit is contained in:
parent
b21374e520
commit
5041428b8c
|
@ -31,6 +31,17 @@ export default class DiscussionPage extends BaseDiscussionPage {
|
|||
|
||||
items.remove('scrubber');
|
||||
|
||||
const count = this.discussion.repliesCount();
|
||||
|
||||
items.add('replies', <h3>
|
||||
<a href={app.route.discussion(this.discussion).replace('/embed', '/d')} config={m.route}>
|
||||
{count} comment{count == 1 ? '' : 's'}
|
||||
</a>
|
||||
</h3>, 100);
|
||||
|
||||
const props = items.get('controls').props;
|
||||
props.className = props.className.replace('App-primaryControl', '');
|
||||
|
||||
return items;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,12 +14,24 @@
|
|||
border-top: 0;
|
||||
}
|
||||
.DiscussionPage-nav--embed {
|
||||
height: 70px;
|
||||
|
||||
> ul {
|
||||
padding: 0;
|
||||
z-index: 100;
|
||||
background: @body-bg;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border-bottom: 1px solid @control-bg;
|
||||
|
||||
@media @tablet-up {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
> li {
|
||||
margin: 15px 15px 15px 0;
|
||||
display: inline-block;
|
||||
|
@ -29,6 +41,14 @@
|
|||
right: auto;
|
||||
}
|
||||
}
|
||||
.item-replies h3 {
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
|
||||
&, a {
|
||||
color: @muted-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.DiscussionPage-stream {
|
||||
|
|
Loading…
Reference in New Issue
Block a user