mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 08:43:25 +08:00
DEV: Colocate mobile-nav template (#25016)
Previously it was relying on the `templates/mobile` logic to make this a simple div wrapper on mobile, and a more complex implementation on mobile. This commit colocates the template so it's active on mobile and desktop, but adds an `{{#if` block to explicitly change the behavior.
This commit is contained in:
parent
236f3cc6eb
commit
e47ad13122
|
@ -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}}
|
|
@ -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>
|
Loading…
Reference in New Issue
Block a user