mirror of
https://github.com/flarum/framework.git
synced 2025-05-23 15:19:56 +08:00
Unify icon class name, change the way icons are floated in menus
This commit is contained in:
@ -14,7 +14,7 @@ export default class ActionButton extends Component {
|
||||
|
||||
attrs.href = attrs.href || 'javascript:;';
|
||||
return m('a', attrs, [
|
||||
iconName ? icon(iconName+' icon-glyph') : '',
|
||||
iconName ? icon(iconName+' icon') : '',
|
||||
m('span.label', label)
|
||||
]);
|
||||
}
|
||||
|
@ -15,10 +15,10 @@ export default class BackButton extends Component {
|
||||
onmouseleave: pane && pane.onmouseleave.bind(pane),
|
||||
config: this.onload.bind(this)
|
||||
}, history.canGoBack() ? m('div.btn-group', [
|
||||
m('button.btn.btn-default.btn-icon.back', {onclick: history.back.bind(history)}, icon('chevron-left icon-glyph')),
|
||||
pane && pane.active ? m('button.btn.btn-default.btn-icon.pin'+(pane.pinned ? '.active' : ''), {onclick: pane.togglePinned.bind(pane)}, icon('thumb-tack icon-glyph')) : '',
|
||||
m('button.btn.btn-default.btn-icon.back', {onclick: history.back.bind(history)}, icon('chevron-left icon')),
|
||||
pane && pane.active ? m('button.btn.btn-default.btn-icon.pin'+(pane.pinned ? '.active' : ''), {onclick: pane.togglePinned.bind(pane)}, icon('thumb-tack icon')) : '',
|
||||
]) : (this.props.drawer ? [
|
||||
m('button.btn.btn-default.btn-icon.drawer-toggle', {onclick: this.toggleDrawer.bind(this)}, icon('reorder icon-glyph'))
|
||||
m('button.btn.btn-default.btn-icon.drawer-toggle', {onclick: this.toggleDrawer.bind(this)}, icon('reorder icon'))
|
||||
] : ''));
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ export default class DropdownSplit extends Component {
|
||||
ActionButton.component(buttonProps),
|
||||
m('a[href=javascript:;]', {className: 'dropdown-toggle '+this.props.buttonClass, 'data-toggle': 'dropdown'}, [
|
||||
icon('caret-down icon-caret'),
|
||||
icon((this.props.icon || 'ellipsis-v')+' icon-glyph'),
|
||||
icon((this.props.icon || 'ellipsis-v')+' icon'),
|
||||
]),
|
||||
m('ul', {className: 'dropdown-menu '+(this.props.menuClass || 'pull-right')}, items)
|
||||
])
|
||||
|
@ -5,7 +5,7 @@ export default class NavItem extends Component {
|
||||
view() {
|
||||
var active = NavItem.active(this.props);
|
||||
return m('li'+(active ? '.active' : ''), m('a', {href: this.props.href, config: m.route}, [
|
||||
icon(this.props.icon),
|
||||
icon(this.props.icon+' icon'),
|
||||
this.props.label, ' ',
|
||||
m('span.count', this.props.badge)
|
||||
]))
|
||||
|
Reference in New Issue
Block a user