使用 menuRadio 代替之前的 metadata 获取方式
This commit is contained in:
parent
7d902edb41
commit
d22c9f0e62
|
@ -7,11 +7,9 @@ spec:
|
|||
- group: nav
|
||||
label: 导航栏
|
||||
formSchema:
|
||||
- $formkit: text
|
||||
- $formkit: menuRadio
|
||||
name: left_menu
|
||||
label: 导航栏左侧相关链接
|
||||
placeholder: 请填写 metadata name
|
||||
help: "需要通过开发者模式获取菜单对应的 metadata name"
|
||||
- $formkit: radio
|
||||
name: right_menu
|
||||
label: 右侧四个按钮
|
||||
|
@ -153,11 +151,9 @@ spec:
|
|||
label: 社交链接(无效)
|
||||
placeholder: 暂时不支持配置
|
||||
help: "当前版本不支持配置"
|
||||
- $formkit: text
|
||||
- $formkit: menuRadio
|
||||
name: menu
|
||||
label: 底部相关链接
|
||||
placeholder: 请填写 metadata name
|
||||
help: "需要通过开发者模式获取菜单对应的 metadata name"
|
||||
- $formkit: text
|
||||
name: copyright_start
|
||||
label: 开始时间
|
||||
|
|
|
@ -13,14 +13,15 @@
|
|||
|
||||
<!-- 相关地址 -->
|
||||
<th:block th:if="${not #strings.isEmpty(theme.config.footer.menu)}"
|
||||
th:with="footMenu = ${theme.config.footer.menu}">
|
||||
<div id="heo-footer"
|
||||
th:if="${not #strings.isEmpty(footMenu)} and ${not #lists.isEmpty(menuFinder.getByName(footMenu))}">
|
||||
<div class="footer-group" th:each="menuItem : ${menuFinder.getByName(footMenu).menuItems}">
|
||||
<h3 class="footer-title" th:text="${menuItem.status.displayName}">软件</h3>
|
||||
th:with="footMenu = ${menuFinder.getByName(theme.config.footer.menu)}">
|
||||
<div id="heo-footer" th:if="${not #lists.isEmpty(footMenu)}">
|
||||
<div class="footer-group" th:each="menuItem : ${footMenu.menuItems}">
|
||||
<h3 class="footer-title" th:text="${menuItem.status.displayName}"></h3>
|
||||
<div class="footer-links">
|
||||
<a class="footer-item" th:each="childMenu : ${menuItem.children}" th:href="${childMenu.status.href}"
|
||||
th:text="${childMenu.status.displayName}"></a>
|
||||
<a class="footer-item" th:each="childMenu : ${menuItem.children}"
|
||||
th:href="${childMenu.status.href}"
|
||||
th:text="${childMenu.status.displayName}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
<div id="blog_name" th:fragment="nav-left">
|
||||
|
||||
<th:block th:if="${not #strings.isEmpty(theme.config.nav.left_menu)}"
|
||||
th:with="leftMenu = ${theme.config.nav.left_menu}">
|
||||
th:with="leftMenu = ${menuFinder.getByName(theme.config.nav.left_menu)}">
|
||||
<!-- 菜单栏左侧按钮,没有配置时,则不展示-->
|
||||
<div class="back-home-button" tabindex="-1"
|
||||
th:if="${not #strings.isEmpty(leftMenu)} and ${not #lists.isEmpty(menuFinder.getByName(leftMenu))}">
|
||||
th:if="${not #lists.isEmpty(leftMenu)}">
|
||||
|
||||
<i class="back-home-button-icon fas fa-grip-vertical"></i>
|
||||
<div class="back-menu-list-groups">
|
||||
<div class="back-menu-list-group" th:each="menuItem : ${menuFinder.getByName(leftMenu).menuItems}">
|
||||
<div class="back-menu-list-group" th:each="menuItem : ${leftMenu.menuItems}">
|
||||
<!-- 菜单必须有子项才会展示 -->
|
||||
<th:block th:if="${not #lists.isEmpty(menuItem.children)}">
|
||||
<div class="back-menu-list-title" th:text="${menuItem.status.displayName}"></div>
|
||||
|
|
Loading…
Reference in New Issue