mirror of
https://github.com/flarum/framework.git
synced 2025-02-22 22:07:57 +08: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 PostHeaderEdited from 'flarum/components/discussion/post-header/edited';
|
||||||
import PostHeaderToggle from 'flarum/components/discussion/post-header/toggle';
|
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
|
Component for a `comment`-typed post. Displays a number of item lists
|
||||||
(controls, header, and footer) surrounding the post's HTML content. Allows
|
(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',
|
'post.isEdited:is-edited',
|
||||||
'revealContent:reveal-content'
|
'revealContent:reveal-content'
|
||||||
],
|
],
|
||||||
itemLists: ['controls', 'header', 'footer'],
|
itemLists: ['controls', 'header', 'footer', 'actions'],
|
||||||
|
|
||||||
// The stream-content component instansiates this component and sets the
|
// The stream-content component instansiates this component and sets the
|
||||||
// `content` property to the content of the item in the post-stream object.
|
// `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');
|
var post = this.get('post');
|
||||||
post.setProperties({
|
post.setProperties({
|
||||||
isHidden: true,
|
isHidden: true,
|
||||||
hideTime: new Date,
|
hideTime: new Date(),
|
||||||
hideUser: this.get('session.user')
|
hideUser: this.get('session.user')
|
||||||
});
|
});
|
||||||
post.save();
|
post.save();
|
||||||
|
@ -10,7 +10,7 @@ export default Ember.Component.extend({
|
|||||||
attributeBindings: ['href', 'title'],
|
attributeBindings: ['href', 'title'],
|
||||||
classNameBindings: ['className'],
|
classNameBindings: ['className'],
|
||||||
href: '#',
|
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: '',
|
label: '',
|
||||||
icon: '',
|
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
|
// Scrubber
|
||||||
|
|
||||||
|
@ -11,3 +11,7 @@
|
|||||||
<aside class="post-footer">
|
<aside class="post-footer">
|
||||||
{{ui/item-list items=footer}}
|
{{ui/item-list items=footer}}
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
|
<aside class="post-actions">
|
||||||
|
{{ui/item-list items=actions}}
|
||||||
|
</aside>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user