公告、站点版权优化

This commit is contained in:
j m 2024-04-29 05:43:38 +08:00
parent 2cc26b98b0
commit 88b52b7b83
5 changed files with 15 additions and 10 deletions

View File

@ -424,11 +424,11 @@ const commonContext = {
const grt = new Date(DreamConfig.website_time) const grt = new Date(DreamConfig.website_time)
let getYear = grt.getFullYear() let getYear = grt.getFullYear()
if (nowYear === getYear) { if (nowYear === getYear) {
webCopyright.innerText = '© ' + nowYear + ' ' + DreamConfig.site_title webCopyright.innerText = '© ' + nowYear
return return
} }
webCopyright.innerText = '© ' + getYear + '-' + nowYear + ' ' + DreamConfig.site_title webCopyright.innerText = '© ' + getYear + '-' + nowYear
}, },
/* 激活侧边栏人生倒计时 */ /* 激活侧边栏人生倒计时 */
initTimeCount() { initTimeCount() {

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,9 @@
</li> </li>
<li> <li>
<p class="icon-spot"> <p class="icon-spot">
<span id="webCopyright" th:text="'&copy; '+${#dates.format(#dates.createNow(), 'yyyy')}+' '+ ${site.title}"></span><span th:unless="${theme.config.basic_info.footer_hide_theme_info}" class="footer-truncation">Powered by <span class="footer-copyright"><a class="powered footer-copyright-halo" href="https://halo.run/" target="_blank">Halo</a> & <a class="powered" href="https://github.com/zsjy/halo-theme-dream2.0-plus" target="_blank">Dream2.0 Plus</a></span></span></p> <span id="webCopyright" th:text="'&copy; '+${#dates.format(#dates.createNow(), 'yyyy')}+' '"></span><a class="record"
th:href="${site.url}" rel="noopener noreferrer nofollow"
th:text="${site.title}"></a><span th:unless="${theme.config.basic_info.footer_hide_theme_info}" class="footer-truncation">Powered by <span class="footer-copyright"><a class="powered footer-copyright-halo" href="https://halo.run/" target="_blank">Halo</a> & <a class="powered" href="https://github.com/zsjy/halo-theme-dream2.0-plus" target="_blank">Dream2.0 Plus</a></span></span></p>
<p class="icon-spot" th:if="${!#strings.isEmpty(theme.config.basic_info.record_number_ps) || !#strings.isEmpty(theme.config.basic_info.record_number)}"><a <p class="icon-spot" th:if="${!#strings.isEmpty(theme.config.basic_info.record_number_ps) || !#strings.isEmpty(theme.config.basic_info.record_number)}"><a
th:if="${!#strings.isEmpty(theme.config.basic_info.record_number)}" class="record" th:if="${!#strings.isEmpty(theme.config.basic_info.record_number)}" class="record"
href="http://beian.miit.gov.cn/publish/query/indexFirst.action" target="_blank" rel="noopener noreferrer nofollow" href="http://beian.miit.gov.cn/publish/query/indexFirst.action" target="_blank" rel="noopener noreferrer nofollow"

View File

@ -4,9 +4,12 @@
<div class="card-title"> <div class="card-title">
<i th:class="${#strings.defaultString(sidebar.icon, 'ri-volume-up-line') + ' card-title-label'}"></i><span th:text="${#strings.defaultString(sidebar.title, '公告')}"></span> <i th:class="${#strings.defaultString(sidebar.icon, 'ri-volume-up-line') + ' card-title-label'}"></i><span th:text="${#strings.defaultString(sidebar.title, '公告')}"></span>
</div> </div>
<div th:if="${#strings.isEmpty(sidebar.content)}" class="card-content"> <th:block th:if="${#strings.isEmpty(sidebar.content)}">
<div class="card-content">
<p>&emsp;&emsp;欢迎来访[[${site.title}]],博主还没有发布任何公告!</p> <p>&emsp;&emsp;欢迎来访[[${site.title}]],博主还没有发布任何公告!</p>
</div> </div>
<div th:if="${!#strings.isEmpty(sidebar.content)}" th:utext="${sidebar.content}"> </th:block>
</div> <th:block th:if="${!#strings.isEmpty(sidebar.content)}">
[(${sidebar.content})]
</th:block>
</div> </div>

View File

@ -28,6 +28,6 @@ spec:
settingName: theme-dream2-plus-setting settingName: theme-dream2-plus-setting
configMapName: theme-dream2-plus-configMap configMapName: theme-dream2-plus-configMap
# 版本号 # 版本号
version: 1.1.1 version: 1.1.1.23
# 最低支持的 Halo 版本 # 最低支持的 Halo 版本
require: ">=2.12.0" require: ">=2.12.0"