Skip to content

A platform for community discussion. Free, open, simple.

DEV: Colocate mobile-nav template (#25016)

David Taylore47ad13122da
diff --git a/app/assets/javascripts/discourse/app/components/mobile-nav.hbs b/app/assets/javascripts/discourse/app/components/mobile-nav.hbs
new file mode 100644
index 00000000000..1bcce4d2536
--- /dev/null
+++ b/app/assets/javascripts/discourse/app/components/mobile-nav.hbs
@@ -0,0 +1,15 @@
+{{#if this.site.mobileView}}
+ {{#if this.selectedHtml}}
+ <li>
+ <a href {{on "click" this.toggleExpanded}} class="expander">
+ <span class="selection">{{html-safe this.selectedHtml}}</span>
+ {{d-icon "caret-down"}}
+ </a>
+ </li>
+ {{/if}}
+ <ul class="drop {{if this.expanded 'expanded'}}">
+ {{yield}}
+ </ul>
+{{else}}
+ {{yield}}
+{{/if}}
\ No newline at end of file
diff --git a/app/assets/javascripts/discourse/app/templates/mobile/components/mobile-nav.hbs b/app/assets/javascripts/discourse/app/templates/mobile/components/mobile-nav.hbs
deleted file mode 100644
index 90c7541cb77..00000000000
--- a/app/assets/javascripts/discourse/app/templates/mobile/components/mobile-nav.hbs
+++ /dev/null
@@ -1,11 +0,0 @@
-{{#if this.selectedHtml}}
- <li>
- <a href {{on "click" this.toggleExpanded}} class="expander">
- <span class="selection">{{html-safe this.selectedHtml}}</span>
- {{d-icon "caret-down"}}
- </a>
- </li>
-{{/if}}
-<ul class="drop {{if this.expanded 'expanded'}}">
- {{yield}}
-</ul>
\ No newline at end of file