mirror of
https://github.com/flarum/core.git
synced 2025-01-29 20:49:14 +01:00
Add styles for post footer/actions
Will be used by extensions
This commit is contained in:
parent
82b1107db6
commit
80cc910175
@ -9,8 +9,6 @@ import PostHeaderMeta from 'flarum/components/discussion/post-header/meta';
|
||||
import PostHeaderEdited from 'flarum/components/discussion/post-header/edited';
|
||||
import PostHeaderToggle from 'flarum/components/discussion/post-header/toggle';
|
||||
|
||||
var precompileTemplate = Ember.Handlebars.compile;
|
||||
|
||||
/**
|
||||
Component for a `comment`-typed post. Displays a number of item lists
|
||||
(controls, header, and footer) surrounding the post's HTML content. Allows
|
||||
@ -25,7 +23,7 @@ export default Ember.Component.extend(FadeIn, HasItemLists, UseComposer, {
|
||||
'post.isEdited:is-edited',
|
||||
'revealContent:reveal-content'
|
||||
],
|
||||
itemLists: ['controls', 'header', 'footer'],
|
||||
itemLists: ['controls', 'header', 'footer', 'actions'],
|
||||
|
||||
// The stream-content component instansiates this component and sets the
|
||||
// `content` property to the content of the item in the post-stream object.
|
||||
@ -88,7 +86,7 @@ export default Ember.Component.extend(FadeIn, HasItemLists, UseComposer, {
|
||||
var post = this.get('post');
|
||||
post.setProperties({
|
||||
isHidden: true,
|
||||
hideTime: new Date,
|
||||
hideTime: new Date(),
|
||||
hideUser: this.get('session.user')
|
||||
});
|
||||
post.save();
|
||||
|
@ -10,7 +10,7 @@ export default Ember.Component.extend({
|
||||
attributeBindings: ['href', 'title'],
|
||||
classNameBindings: ['className'],
|
||||
href: '#',
|
||||
layout: precompileTemplate('{{#if icon}}{{fa-icon icon class="fa-fw icon-glyph"}} {{/if}}<span>{{label}}</span>'),
|
||||
layout: precompileTemplate('{{#if icon}}{{fa-icon icon class="fa-fw icon-glyph"}} {{/if}}<span class="label">{{label}}</span>'),
|
||||
|
||||
label: '',
|
||||
icon: '',
|
||||
|
@ -212,6 +212,43 @@
|
||||
}
|
||||
}
|
||||
|
||||
.post-footer, .post-actions {
|
||||
& > ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
&, & a {
|
||||
color: @fl-body-muted-color;
|
||||
}
|
||||
}
|
||||
.post-footer {
|
||||
& > ul {
|
||||
& > li {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
& .fa {
|
||||
font-size: 14px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.post-actions {
|
||||
margin-top: 10px;
|
||||
opacity: 0;
|
||||
.transition(opacity 0.2s);
|
||||
|
||||
& > ul {
|
||||
& > li {
|
||||
margin-right: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
.post:hover & {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------
|
||||
// Scrubber
|
||||
|
||||
|
@ -11,3 +11,7 @@
|
||||
<aside class="post-footer">
|
||||
{{ui/item-list items=footer}}
|
||||
</aside>
|
||||
|
||||
<aside class="post-actions">
|
||||
{{ui/item-list items=actions}}
|
||||
</aside>
|
||||
|
Loading…
x
Reference in New Issue
Block a user