diff --git a/app/assets/javascripts/discourse/components/category-title-link.js.es6 b/app/assets/javascripts/discourse/components/category-title-link.js.es6 index e00efa683..bc30157ca 100644 --- a/app/assets/javascripts/discourse/components/category-title-link.js.es6 +++ b/app/assets/javascripts/discourse/components/category-title-link.js.es6 @@ -1,19 +1,17 @@ +import { iconHTML } from 'discourse/helpers/fa-icon'; + export default Em.Component.extend({ tagName: 'h3', - render: function(buffer) { - var category = this.get('category'), - logoUrl = category.get('logo_url'), - categoryUrl = Discourse.getURL('/c/') + Discourse.Category.slugFor(category), - categoryName = Handlebars.Utils.escapeExpression(category.get('name')); + render(buffer) { + const category = this.get('category'); + const categoryUrl = Discourse.getURL('/c/') + Discourse.Category.slugFor(category); + const categoryName = Handlebars.Utils.escapeExpression(category.get('name')); - if (category.get('read_restricted')) { buffer.push(""); } + if (category.get('read_restricted')) { buffer.push(iconHTML('lock')); } - buffer.push(""); - buffer.push("" + categoryName + ""); - - if (!Em.isEmpty(logoUrl)) { buffer.push(""); } - - buffer.push(""); + buffer.push(``); + buffer.push(`${categoryName}`); + buffer.push(``); } }); diff --git a/app/assets/javascripts/discourse/templates/discovery/categories.hbs b/app/assets/javascripts/discourse/templates/discovery/categories.hbs index 0aa789da0..54545b2d0 100644 --- a/app/assets/javascripts/discourse/templates/discovery/categories.hbs +++ b/app/assets/javascripts/discourse/templates/discovery/categories.hbs @@ -13,34 +13,28 @@
-
- {{category-title-link category=c}} - {{#unless c.logo_url}} - {{category-unread category=c}} - {{/unless}} -
-
-
- {{#if c.description_excerpt}} + {{category-title-link category=c}} + {{category-unread category=c}} + {{#if c.logo_url}} + + {{/if}} +
{{{c.description_excerpt}}}
- - {{#if c.logo_url}} - {{category-unread category=c}} - {{/if}} - {{/if}} +
+ {{#if c.subcategories}}
- {{#each s in c.subcategories}} + {{#each c.subcategories as |s|}} {{category-link s hideParent="true"}} {{category-unread category=s}} {{/each}}
{{/if}} - - {{#each f in c.featuredTopics}} + + {{#each c.featuredTopics as |f|}} {{featured-topic topic=f latestTopicOnly=latestTopicOnly action="showTopicEntrance"}} {{/each}}