DEV: Remove mobile template for `subcategories-with-featured-topics` (#29513)
We are moving away from the mobile-specific template pattern in favor of logical `{{#if}}` statements. This brings us closer to a standard Ember app, makes testing easier, and reduces duplicate code.
This commit is contained in:
parent
8300380287
commit
210a295a87
|
@ -1,4 +1,22 @@
|
|||
{{#each this.categories as |category|}}
|
||||
{{#if this.site.mobileView}}
|
||||
<div class="category-list subcategory-list with-topics">
|
||||
<div class="parent-category">
|
||||
<CategoryTitleLink @category={{category}} />
|
||||
<span class="stat" title={{category.statTitle}}>{{html-safe
|
||||
category.stat
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="subcategories">
|
||||
{{#each category.serializedSubcategories as |subCategory|}}
|
||||
<ParentCategoryRow @category={{subCategory}} @showTopics={{true}} />
|
||||
{{else}}
|
||||
{{! No subcategories... so just show the parent to avoid confusion }}
|
||||
<ParentCategoryRow @category={{category}} @showTopics={{true}} />
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<table class="category-list subcategory-list with-topics">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -21,4 +39,5 @@
|
|||
{{/each}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{/if}}
|
||||
{{/each}}
|
|
@ -1,18 +0,0 @@
|
|||
{{#each this.categories as |category|}}
|
||||
<div class="category-list subcategory-list with-topics">
|
||||
<div class="parent-category">
|
||||
<CategoryTitleLink @category={{category}} />
|
||||
<span class="stat" title={{category.statTitle}}>{{html-safe
|
||||
category.stat
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="subcategories">
|
||||
{{#each category.serializedSubcategories as |subCategory|}}
|
||||
<ParentCategoryRow @category={{subCategory}} @showTopics={{true}} />
|
||||
{{else}}
|
||||
{{! No subcategories... so just show the parent to avoid confusion }}
|
||||
<ParentCategoryRow @category={{category}} @showTopics={{true}} />
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
Loading…
Reference in New Issue