mirror of
https://github.com/flarum/core.git
synced 2025-08-12 03:14:33 +02:00
Add icons to tag tiles (#104)
This commit is contained in:
2
extensions/tags/js/src/forum/components/TagsPage.js
Normal file → Executable file
2
extensions/tags/js/src/forum/components/TagsPage.js
Normal file → Executable file
@@ -4,6 +4,7 @@ import Link from 'flarum/components/Link';
|
||||
import listItems from 'flarum/helpers/listItems';
|
||||
import humanTime from 'flarum/helpers/humanTime';
|
||||
|
||||
import tagIcon from '../../common/helpers/tagIcon';
|
||||
import tagLabel from '../../common/helpers/tagLabel';
|
||||
import sortTags from '../../common/utils/sortTags';
|
||||
|
||||
@@ -38,6 +39,7 @@ export default class TagsPage extends Page {
|
||||
<li className={'TagTile ' + (tag.color() ? 'colored' : '')}
|
||||
style={{backgroundColor: tag.color()}}>
|
||||
<Link className="TagTile-info" href={app.route.tag(tag)}>
|
||||
{tag.icon() && tagIcon(tag, {}, { useColor: false })}
|
||||
<h3 className="TagTile-name">{tag.name()}</h3>
|
||||
<p className="TagTile-description">{tag.description()}</p>
|
||||
{children
|
||||
|
5
extensions/tags/less/forum/TagTiles.less
Normal file → Executable file
5
extensions/tags/less/forum/TagTiles.less
Normal file → Executable file
@@ -86,6 +86,11 @@
|
||||
&:hover {
|
||||
background: fade(#000, 5%);
|
||||
}
|
||||
.icon {
|
||||
font-size: 24px;
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.TagTile-name {
|
||||
font-size: 18px;
|
||||
|
Reference in New Issue
Block a user