Display subcategory icons in /c/{slug}/{id}/and /categories views. (#6)

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

diff --git a/common/common.scss b/common/common.scss
index 4bc373f..9702319 100644
--- a/common/common.scss
+++ b/common/common.scss
@@ -21,3 +21,7 @@ span.category-badge-icon {
 .categories-list .category-box-heading h3 div {
   display: inline;
 }
+
+.subcategory .category-icon-widget {
+  display: none;
+}
diff --git a/javascripts/discourse/initializers/category-icons.js b/javascripts/discourse/initializers/category-icons.js
index 845ceb3..a32c5ce 100644
--- a/javascripts/discourse/initializers/category-icons.js
+++ b/javascripts/discourse/initializers/category-icons.js
@@ -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);

GitHub sha: 38781436

This commit appears in #6 which was merged by pmusaraj.