From 13b9493bf00b2f101e6ceff9b1f5255f7f11b1b4 Mon Sep 17 00:00:00 2001 From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com> Date: Fri, 3 Jan 2025 08:18:57 -0500 Subject: [PATCH] DEV: Add subcategories with featured topics list plugin outlet (#30538) This adds plugin outlets for mobile and desktop views of the subcategories with featured topics list. --- .../subcategories-with-featured-topics.hbs | 84 +++++++++++-------- 1 file changed, 47 insertions(+), 37 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/subcategories-with-featured-topics.hbs b/app/assets/javascripts/discourse/app/components/subcategories-with-featured-topics.hbs index 4d2688a3f12..b8ef0f7917c 100644 --- a/app/assets/javascripts/discourse/app/components/subcategories-with-featured-topics.hbs +++ b/app/assets/javascripts/discourse/app/components/subcategories-with-featured-topics.hbs @@ -1,43 +1,53 @@ {{#each this.categories as |category|}} {{#if this.site.mobileView}} -
-
- - {{html-safe - category.stat - }} + +
+
+ + {{html-safe + category.stat + }} +
+
+ {{#each category.serializedSubcategories as |subCategory|}} + + {{else}} + {{! No subcategories... so just show the parent to avoid confusion }} + + {{/each}} +
-
- {{#each category.serializedSubcategories as |subCategory|}} - - {{else}} - {{! No subcategories... so just show the parent to avoid confusion }} - - {{/each}} -
-
+ {{else}} - - - - - - - - - - {{#each category.serializedSubcategories as |subCategory|}} - - {{else}} - {{! No subcategories... so just show the parent to avoid confusion }} - - {{/each}} - -
- - {{html-safe - category.stat - }} - {{i18n "categories.topics"}}{{i18n "categories.latest"}}
+ + + + + + + + + + + {{#each category.serializedSubcategories as |subCategory|}} + + {{else}} + {{! No subcategories... so just show the parent to avoid confusion }} + + {{/each}} + +
+ + {{html-safe + category.stat + }} + {{i18n "categories.topics"}}{{i18n "categories.latest"}}
+
{{/if}} {{/each}} \ No newline at end of file