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.
This commit is contained in:
parent
fb95ab8e00
commit
34ae2080c6
|
@ -1,17 +1,53 @@
|
|||
{{#each this.navItems as |navItem|}}
|
||||
<NavigationItem
|
||||
@content={{navItem}}
|
||||
@filterMode={{this.filterMode}}
|
||||
@category={{this.category}}
|
||||
class={{concat "nav-item_" navItem.name}}
|
||||
{{#if this.site.mobileView}}
|
||||
<li class="navigation-toggle">
|
||||
<a href {{on "click" this.toggleDrop}} class="toggle-link">
|
||||
{{this.selectedNavItem.displayName}}
|
||||
{{d-icon "caret-down"}}
|
||||
</a>
|
||||
</li>
|
||||
{{#if this.expanded}}
|
||||
<ul class="drop">
|
||||
{{#each this.navItems as |navItem|}}
|
||||
<NavigationItem
|
||||
@content={{navItem}}
|
||||
@filterMode={{this.filterMode}}
|
||||
@category={{this.category}}
|
||||
class={{concat "nav-item_" navItem.name}}
|
||||
/>
|
||||
{{/each}}
|
||||
<PluginOutlet
|
||||
@name="extra-nav-item"
|
||||
@connectorTagName="li"
|
||||
@outletArgs={{hash
|
||||
category=this.category
|
||||
tag=this.tag
|
||||
filterMode=this.filterMode
|
||||
}}
|
||||
/>
|
||||
</ul>
|
||||
{{/if}}
|
||||
|
||||
<PluginOutlet
|
||||
@name="inline-extra-nav-item"
|
||||
@connectorTagName="li"
|
||||
@outletArgs={{hash category=this.category filterMode=this.filterMode}}
|
||||
/>
|
||||
{{/each}}
|
||||
<PluginOutlet
|
||||
@name="extra-nav-item"
|
||||
@connectorTagName="li"
|
||||
@outletArgs={{hash
|
||||
category=this.category
|
||||
tag=this.tag
|
||||
filterMode=this.filterMode
|
||||
}}
|
||||
/>
|
||||
{{else}}
|
||||
{{#each this.navItems as |navItem|}}
|
||||
<NavigationItem
|
||||
@content={{navItem}}
|
||||
@filterMode={{this.filterMode}}
|
||||
@category={{this.category}}
|
||||
class={{concat "nav-item_" navItem.name}}
|
||||
/>
|
||||
{{/each}}
|
||||
<PluginOutlet
|
||||
@name="extra-nav-item"
|
||||
@connectorTagName="li"
|
||||
@outletArgs={{hash
|
||||
category=this.category
|
||||
tag=this.tag
|
||||
filterMode=this.filterMode
|
||||
}}
|
||||
/>
|
||||
{{/if}}
|
|
@ -1,33 +0,0 @@
|
|||
<li class="navigation-toggle">
|
||||
<a href {{on "click" this.toggleDrop}} class="toggle-link">
|
||||
{{this.selectedNavItem.displayName}}
|
||||
{{d-icon "caret-down"}}
|
||||
</a>
|
||||
</li>
|
||||
{{#if this.expanded}}
|
||||
<ul class="drop">
|
||||
{{#each this.navItems as |navItem|}}
|
||||
<NavigationItem
|
||||
@content={{navItem}}
|
||||
@filterMode={{this.filterMode}}
|
||||
@category={{this.category}}
|
||||
class={{concat "nav-item_" navItem.name}}
|
||||
/>
|
||||
{{/each}}
|
||||
<PluginOutlet
|
||||
@name="extra-nav-item"
|
||||
@connectorTagName="li"
|
||||
@outletArgs={{hash
|
||||
category=this.category
|
||||
tag=this.tag
|
||||
filterMode=this.filterMode
|
||||
}}
|
||||
/>
|
||||
</ul>
|
||||
{{/if}}
|
||||
|
||||
<PluginOutlet
|
||||
@name="inline-extra-nav-item"
|
||||
@connectorTagName="li"
|
||||
@outletArgs={{hash category=this.category filterMode=this.filterMode}}
|
||||
/>
|
Loading…
Reference in New Issue