Display subcategory icons in /c/{slug}/{id}/and /categories views. (#6)
See https://meta.discourse.org/t/category-icons-component/104683/50?u=md-misko
This commit is contained in:
parent
f9b432ea79
commit
38781436cb
|
@ -21,3 +21,7 @@ span.category-badge-icon {
|
|||
.categories-list .category-box-heading h3 div {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.subcategory .category-icon-widget {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ export default {
|
|||
tagName: "div.category-icon-widget",
|
||||
html(attrs) {
|
||||
let iconItem = getIconItem(attrs.category.slug);
|
||||
if (iconItem && !attrs.category.parent_category_id) {
|
||||
if (iconItem) {
|
||||
let itemColor = iconItem[2] ? `color: ${iconItem[2]}` : "";
|
||||
let itemIcon = iconItem[1] != "" ? iconNode(iconItem[1]) : "";
|
||||
return h("span.category-icon", { style: itemColor }, itemIcon);
|
||||
|
|
Loading…
Reference in New Issue