添加空判断

This commit is contained in:
liuzhihang 2022-10-14 08:45:30 +08:00
parent 7678f18d2f
commit 48ec32d793
3 changed files with 11 additions and 4 deletions

View File

@ -39,7 +39,8 @@
<!-- 相关地址 --> <!-- 相关地址 -->
<th:block th:with="footMenu = ${theme.config.footer.menu}"> <th:block th:if="${not #strings.isEmpty(theme.config.footer.menu)}"
th:with="footMenu = ${theme.config.footer.menu}">
<div id="heo-footer" <div id="heo-footer"
th:if="${not #strings.isEmpty(footMenu)} and ${not #lists.isEmpty(menuFinder.getByName(footMenu))}"> th:if="${not #strings.isEmpty(footMenu)} and ${not #lists.isEmpty(menuFinder.getByName(footMenu))}">
<div class="footer-group" th:each="menuItem : ${menuFinder.getByName(footMenu).menuItems}"> <div class="footer-group" th:each="menuItem : ${menuFinder.getByName(footMenu).menuItems}">

View File

@ -5,8 +5,12 @@
<!-- banners --> <!-- banners -->
<div id="banners"> <div id="banners">
<div class="banners-title"> <div class="banners-title">
<div class="banners-title-big" th:utext="${theme.config.top.banners_title_big}"></div> <div class="banners-title-big"
<div class="banners-title-small" th:utext="${theme.config.top.banners_title_small}"></div> th:if="${not #strings.isEmpty(theme.config.top.banners_title_big)}"
th:utext="${theme.config.top.banners_title_big}"></div>
<div class="banners-title-small"
th:if="${not #strings.isEmpty(theme.config.top.banners_title_small)}"
th:utext="${theme.config.top.banners_title_small}"></div>
</div> </div>
<div class="tags-group-all"> <div class="tags-group-all">
<div class="tags-group-wrapper"> <div class="tags-group-wrapper">

View File

@ -2,7 +2,9 @@
<html lang="en" xmlns:th="http://www.thymeleaf.org"> <html lang="en" xmlns:th="http://www.thymeleaf.org">
<!-- 导航栏左侧 --> <!-- 导航栏左侧 -->
<div id="blog_name" th:fragment="nav-left" th:with="leftMenu = ${theme.config.nav.left_menu}"> <div id="blog_name" th:fragment="nav-left"
th:if="${not #strings.isEmpty(theme.config.nav.left_menu)}"
th:with="leftMenu = ${theme.config.nav.left_menu}">
<!-- 菜单栏左侧按钮,没有配置时,则不展示--> <!-- 菜单栏左侧按钮,没有配置时,则不展示-->
<div class="back-home-button" tabindex="-1" <div class="back-home-button" tabindex="-1"