discourse-header-submenus/javascripts/discourse/connectors/above-site-header/header-submenus.hbs

51 lines
1.5 KiB
Handlebars
Raw Permalink Normal View History

<div id="top-menu" class="top-menu">
<div class="menu-content wrap">
2020-05-14 02:23:49 -04:00
<div class="menu-placeholder">
<div class="menu-item-container">
<div class="menu-items">
{{#each menuItems as |item|}}
<a
class="menu-item {{item.view}} {{item.className}}"
title={{item.title}}
>
2020-05-14 02:23:49 -04:00
{{#if item.icon}}
{{d-icon item.icon}}
{{/if}}
2020-05-14 02:23:49 -04:00
{{item.text}}
2020-05-14 02:23:49 -04:00
{{#if showCaret}}
{{d-icon "caret-right"}}
{{/if}}
2020-05-14 02:23:49 -04:00
<div class="d-header-dropdown">
<ul class="d-dropdown-menu">
{{#each item.childItems as |child|}}
{{#if child.divider}}
<li class="divider"></li>
2020-05-14 02:23:49 -04:00
{{else}}
<li class="submenu-item {{child.className}}">
<a
target={{child.target}}
title={{child.title}}
class="submenu-link"
href={{child.href}}
>
2020-05-14 02:23:49 -04:00
{{#if child.icon}}
{{d-icon child.icon}}
{{/if}}
2020-05-14 02:23:49 -04:00
{{child.text}}
</a>
</li>
{{/if}}
{{/each}}
</ul>
</div>
</a>
{{/each}}
</div>
</div>
</div>
</div>
</div>