From 34ae2080c6da012c099089b5ce683113d3ce55c5 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Tue, 2 Jan 2024 10:48:31 +0000 Subject: [PATCH] DEV: Merge mobile/desktop navigation-bar templates (#25017) Having separate mobile/desktop templates is something we're moving away from. This commit moves the mobile-specific logic into a conditional in the main colocated template. --- .../app/components/navigation-bar.hbs | 68 ++++++++++++++----- .../mobile/components/navigation-bar.hbs | 33 --------- 2 files changed, 52 insertions(+), 49 deletions(-) delete mode 100644 app/assets/javascripts/discourse/app/templates/mobile/components/navigation-bar.hbs diff --git a/app/assets/javascripts/discourse/app/components/navigation-bar.hbs b/app/assets/javascripts/discourse/app/components/navigation-bar.hbs index a83ac521427..ebfedc38466 100644 --- a/app/assets/javascripts/discourse/app/components/navigation-bar.hbs +++ b/app/assets/javascripts/discourse/app/components/navigation-bar.hbs @@ -1,17 +1,53 @@ -{{#each this.navItems as |navItem|}} - + + {{this.selectedNavItem.displayName}} + {{d-icon "caret-down"}} + + + {{#if this.expanded}} + + {{/if}} + + -{{/each}} - \ No newline at end of file +{{else}} + {{#each this.navItems as |navItem|}} + + {{/each}} + +{{/if}} \ No newline at end of file diff --git a/app/assets/javascripts/discourse/app/templates/mobile/components/navigation-bar.hbs b/app/assets/javascripts/discourse/app/templates/mobile/components/navigation-bar.hbs deleted file mode 100644 index 5fe0592f374..00000000000 --- a/app/assets/javascripts/discourse/app/templates/mobile/components/navigation-bar.hbs +++ /dev/null @@ -1,33 +0,0 @@ - -{{#if this.expanded}} -
    - {{#each this.navItems as |navItem|}} - - {{/each}} - -
-{{/if}} - - \ No newline at end of file