mirror of
https://github.com/flarum/framework.git
synced 2025-02-01 07:03:00 +08:00
Allow child tags in tile to wrap. fixes flarum/core#613
This commit is contained in:
parent
d240d4c0ff
commit
287bdf10dd
4
extensions/tags/js/forum/dist/extension.js
vendored
4
extensions/tags/js/forum/dist/extension.js
vendored
|
@ -1017,7 +1017,7 @@ System.register('flarum/tags/components/TagsPage', ['flarum/Component', 'flarum/
|
|||
'div',
|
||||
{ className: 'TagTile-children' },
|
||||
children.map(function (child) {
|
||||
return m(
|
||||
return [m(
|
||||
'a',
|
||||
{ href: app.route.tag(child), config: function (element, isInitialized) {
|
||||
if (isInitialized) return;
|
||||
|
@ -1027,7 +1027,7 @@ System.register('flarum/tags/components/TagsPage', ['flarum/Component', 'flarum/
|
|||
m.route.apply(this, arguments);
|
||||
} },
|
||||
child.name()
|
||||
);
|
||||
), ' '];
|
||||
})
|
||||
) : ''
|
||||
),
|
||||
|
|
|
@ -44,15 +44,16 @@ export default class TagsPage extends Component {
|
|||
{children
|
||||
? (
|
||||
<div className="TagTile-children">
|
||||
{children.map(child =>
|
||||
{children.map(child => [
|
||||
<a href={app.route.tag(child)} config={function(element, isInitialized) {
|
||||
if (isInitialized) return;
|
||||
$(element).on('click', e => e.stopPropagation());
|
||||
m.route.apply(this, arguments);
|
||||
}}>
|
||||
{child.name()}
|
||||
</a>
|
||||
)}
|
||||
</a>,
|
||||
' '
|
||||
])}
|
||||
</div>
|
||||
) : ''}
|
||||
</a>
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
font-size: 12px;
|
||||
|
||||
a {
|
||||
margin-right: 15px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.TagTile-lastDiscussion {
|
||||
|
|
Loading…
Reference in New Issue
Block a user