Merge pull request #290 from chengzhongxue/main

菜单跳转优化
This commit is contained in:
困困鱼 2023-07-15 14:08:13 +08:00 committed by GitHub
commit e4fc3c4fc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 19 deletions

View File

@ -1303,6 +1303,7 @@ spec:
game_title:
game_uid:
game_bg:
loading_bar:
children:
- $formkit: text
name: game_tips
@ -1324,6 +1325,11 @@ spec:
label: 爱好游戏背景
placeholder: 请输入内容
value: https://img.zhheo.com/i/2022/08/31/630efa7ae39fe.webp
- $formkit: attachment
name: loading_bar
label: 爱好游戏logo
placeholder: 请输入内容
value: https://img.cdn.yzczi.com/img/64795eaece0fc.png
- $formkit: group
name: game2
label: 爱好游戏 2

View File

@ -17030,19 +17030,6 @@ span.hexo-douban-pagenum {
overflow: hidden;
}
.loading-bar::after {
content: "";
position: absolute;
top: 500px;
left: 0;
filter: drop-shadow(0 -500px 0 #ece5d8);
width: 500px;
height: 62.5px;
background: url("https://img.cdn.yzczi.com/img/64795eaece0fc.png") no-repeat left 100%;
background-size: 500px 62.5px;
background-position-x: 0;
}
.author-content-item.game-lol:hover .loading-bar::after {
animation: loading-bar 3.5s cubic-bezier(0.28, 0.11, 0.32, 1) infinite forwards;
}

View File

@ -30,7 +30,9 @@
<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}">
th:href="@{${childMenu.status.href}}"
th:target="${childMenu.spec.target?.value}"
th:text="${childMenu.status.displayName}">
</a>
</div>
</div>

View File

@ -29,6 +29,20 @@
</div>
</div>
</div>
<style>
.loading-bar::after {
content: "";
position: absolute;
top: 500px;
left: 0;
filter: drop-shadow(0 -500px 0 #ece5d8);
width: 500px;
height: 62.5px;
background: url([[${theme.config.about.game.loading_bar}]]) no-repeat left 100%;
background-size: 500px 62.5px;
background-position-x: 0;
}
</style>
</div>
</html>

View File

@ -19,7 +19,7 @@
<div class="back-menu-list">
<th:block th:each="childMenu : ${menuItem.children}">
<a class="back-menu-item" rel="external nofollow"
target="_blank" th:href="@{${childMenu.status.href}}">
th:target="${childMenu.spec.target?.value}" th:href="@{${childMenu.status.href}}">
<!-- icon 预留 -->
<img th:if="${!#strings.isEmpty(#annotations.getOrDefault(childMenu, 'icon', ''))}"
class="back-menu-item-icon"

View File

@ -9,7 +9,9 @@
<div class="menus_item" th:each="menuItem : ${menuFinder.getPrimary().menuItems}">
<!-- javascript:void(0);" -->
<a th:if="${#lists.isEmpty(menuItem.children)}" class="site-page" rel="external nofollow"
<a class="site-page" rel="external nofollow"
th:if="${#lists.isEmpty(menuItem.children)}"
th:target="${menuItem.spec.target?.value}"
th:href="@{${menuItem.status.href}}">
<span th:text="${menuItem.status.displayName}"></span>
</a>
@ -23,9 +25,7 @@
<!-- 子菜单 -->
<ul class="menus_item_child">
<li th:each="childMenu : ${menuItem.children}">
<a class="site-page child" th:href="@{${childMenu.status.href}}">
<!-- 这里应该有一个 icon 暂时还不支持 -->
<!--<i class="fa-fw fa-duotone fa-list-timeline"></i>-->
<a class="site-page child" th:target="${childMenu.spec.target?.value}" th:href="@{${childMenu.status.href}}">
<i th:if="${!#strings.isEmpty(#annotations.getOrDefault(childMenu, 'icon', ''))}"
th:class="${#annotations.getOrDefault(childMenu, 'icon', '')}"
style="font-size:.9em"></i>