42 lines
1.7 KiB
HTML
42 lines
1.7 KiB
HTML
<nav class="navbar" th:with="menu = ${menuFinder?.getPrimary()}">
|
|
<ul class="navbar-nav d-flex flex-row"
|
|
th:if="${menu} and ${not menu.menuItems.empty}"
|
|
th:with="menuItems = ${menu.menuItems}">
|
|
|
|
<li class="nav-item dropdown" th:each="menuItem : ${menuItems}">
|
|
<a class="nav-link dropdown-toggle"
|
|
th:text="${menuItem.status?.displayName}"
|
|
th:href="${menuItem.status?.href}"
|
|
th:target="${menuItem.spec?.target?.value}"
|
|
th:attr="data-bs-toggle=${not menuItem.children?.empty} ? 'dropdown' : null">
|
|
</a>
|
|
|
|
<!-- 二级下拉菜单 -->
|
|
<div class="dropdown-menu" th:if="${not menuItem.children?.empty}">
|
|
<ul>
|
|
<li class="dropdown-submenu" th:each="child : ${menuItem.children}">
|
|
<a class="dropdown-item"
|
|
th:text="${child.status?.displayName}"
|
|
th:href="${child.status?.href}"
|
|
th:target="${child.spec?.target?.value}"
|
|
th:attr="data-bs-toggle=${not child.children?.empty} ? 'dropdown' : null">
|
|
</a>
|
|
|
|
<!-- 三级下拉菜单 - 现在将显示在二级菜单框内 -->
|
|
<div class="third-level" th:if="${not child.children?.empty}">
|
|
<ul>
|
|
<li th:each="grandchild : ${child.children}">
|
|
<a class="dropdown-item"
|
|
th:text="${grandchild.status?.displayName}"
|
|
th:href="${grandchild.status?.href}"
|
|
th:target="${grandchild.spec?.target?.value}">
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</nav> |