mirror of
https://github.com/flarum/core.git
synced 2025-07-30 21:20:24 +02:00
Excerpt added to core
This commit is contained in:
@@ -11,11 +11,11 @@ export default function addStickyControl() {
|
||||
extend(DiscussionListItem.prototype, 'infoItems', function(items) {
|
||||
const discussion = this.props.discussion;
|
||||
|
||||
if (discussion.isSticky()) {
|
||||
if (discussion.isSticky() && !this.props.params.q) {
|
||||
const startPost = discussion.startPost();
|
||||
|
||||
if (startPost) {
|
||||
const excerpt = <span>{truncate(startPost.contentPlain(), 200)}</span>;
|
||||
const excerpt = truncate(startPost.contentPlain(), 175);
|
||||
|
||||
items.add('excerpt', excerpt, -100);
|
||||
}
|
||||
|
@@ -8,19 +8,3 @@
|
||||
color: #d13e32;
|
||||
}
|
||||
}
|
||||
.DiscussionListItem-info .item-excerpt {
|
||||
margin-top: 8px;
|
||||
margin-right: 20px;
|
||||
white-space: normal;
|
||||
font-size: 12px;
|
||||
line-height: 1.5em;
|
||||
color: @muted-more-color;
|
||||
display: block;
|
||||
|
||||
.DiscussionPage-list & {
|
||||
display: none;
|
||||
}
|
||||
@media @phone {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user