mirror of
https://github.com/flarum/framework.git
synced 2025-02-01 09:51: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',
|
'div',
|
||||||
{ className: 'TagTile-children' },
|
{ className: 'TagTile-children' },
|
||||||
children.map(function (child) {
|
children.map(function (child) {
|
||||||
return m(
|
return [m(
|
||||||
'a',
|
'a',
|
||||||
{ href: app.route.tag(child), config: function (element, isInitialized) {
|
{ href: app.route.tag(child), config: function (element, isInitialized) {
|
||||||
if (isInitialized) return;
|
if (isInitialized) return;
|
||||||
|
@ -1027,7 +1027,7 @@ System.register('flarum/tags/components/TagsPage', ['flarum/Component', 'flarum/
|
||||||
m.route.apply(this, arguments);
|
m.route.apply(this, arguments);
|
||||||
} },
|
} },
|
||||||
child.name()
|
child.name()
|
||||||
);
|
), ' '];
|
||||||
})
|
})
|
||||||
) : ''
|
) : ''
|
||||||
),
|
),
|
||||||
|
|
|
@ -44,15 +44,16 @@ export default class TagsPage extends Component {
|
||||||
{children
|
{children
|
||||||
? (
|
? (
|
||||||
<div className="TagTile-children">
|
<div className="TagTile-children">
|
||||||
{children.map(child =>
|
{children.map(child => [
|
||||||
<a href={app.route.tag(child)} config={function(element, isInitialized) {
|
<a href={app.route.tag(child)} config={function(element, isInitialized) {
|
||||||
if (isInitialized) return;
|
if (isInitialized) return;
|
||||||
$(element).on('click', e => e.stopPropagation());
|
$(element).on('click', e => e.stopPropagation());
|
||||||
m.route.apply(this, arguments);
|
m.route.apply(this, arguments);
|
||||||
}}>
|
}}>
|
||||||
{child.name()}
|
{child.name()}
|
||||||
</a>
|
</a>,
|
||||||
)}
|
' '
|
||||||
|
])}
|
||||||
</div>
|
</div>
|
||||||
) : ''}
|
) : ''}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -105,7 +105,7 @@
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
margin-right: 15px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.TagTile-lastDiscussion {
|
.TagTile-lastDiscussion {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user