mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-15 14:19:52 +08:00
commit
730e0e16f3
@ -951,6 +951,11 @@ spec:
|
|||||||
label: 友链页面-RSS订阅地址
|
label: 友链页面-RSS订阅地址
|
||||||
placeholder: '请输入RSS订阅地址'
|
placeholder: '请输入RSS订阅地址'
|
||||||
help: '用于交换友链时添加朋友圈的RSS订阅地址。'
|
help: '用于交换友链时添加朋友圈的RSS订阅地址。'
|
||||||
|
- $formkit: text
|
||||||
|
name: links_descriptive
|
||||||
|
label: 友链页面-自定义描述
|
||||||
|
placeholder: '请输入描述'
|
||||||
|
help: '用于交换友链时添加的描述(留空使用用户信息)。'
|
||||||
- $formkit: code
|
- $formkit: code
|
||||||
name: links_info
|
name: links_info
|
||||||
label: "友链页面-补充信息"
|
label: "友链页面-补充信息"
|
||||||
@ -1213,6 +1218,8 @@ spec:
|
|||||||
label: 小火车
|
label: 小火车
|
||||||
- value: 'error/common/error_concise'
|
- value: 'error/common/error_concise'
|
||||||
label: 简洁
|
label: 简洁
|
||||||
|
- value: 'error/common/error_travellings'
|
||||||
|
label: 智能归航
|
||||||
- value: 'error/common/error_default'
|
- value: 'error/common/error_default'
|
||||||
label: 默认
|
label: 默认
|
||||||
- value: 'error/common/error_custom'
|
- value: 'error/common/error_custom'
|
||||||
@ -1239,6 +1246,8 @@ spec:
|
|||||||
label: 小火车
|
label: 小火车
|
||||||
- value: 'error/common/error_concise'
|
- value: 'error/common/error_concise'
|
||||||
label: 简洁
|
label: 简洁
|
||||||
|
- value: 'error/common/error_travellings'
|
||||||
|
label: 智能归航
|
||||||
- value: 'error/common/error_default'
|
- value: 'error/common/error_default'
|
||||||
label: 默认
|
label: 默认
|
||||||
- value: 'error/common/error_custom'
|
- value: 'error/common/error_custom'
|
||||||
|
0
templates/assets/js/dshare.min.js.LICENSE.txt
Normal file
0
templates/assets/js/dshare.min.js.LICENSE.txt
Normal file
168
templates/error/common/error_travellings.html
Normal file
168
templates/error/common/error_travellings.html
Normal file
@ -0,0 +1,168 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN" xmlns:th="https://www.thymeleaf.org"
|
||||||
|
th:fragment="error_fragment">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>[[${error.status + ' - ' + #strings.defaultString(error.title, 'Internal server error')}]]</title>
|
||||||
|
<link rel="icon" th:href="${site.favicon}">
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
color: #111827;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
transition: background-color 0.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
* {
|
||||||
|
color: #f9fafb;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
background: #111111;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.blink {
|
||||||
|
position: fixed;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
display: flex;
|
||||||
|
display: -webkit-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
animation: blink 4s linear infinite;
|
||||||
|
-webkit-animation: blink 4s linear infinite;
|
||||||
|
-moz-animation: blink 4s linear infinite;
|
||||||
|
-ms-animation: blink 4s linear infinite;
|
||||||
|
-o-animation: blink 4s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes blink {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
40% {
|
||||||
|
opacity: 0.3;
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
80% {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale(0.98);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
opacity: 0.2;
|
||||||
|
transform: scale(1.2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.botCenter {
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
height: 50px;
|
||||||
|
bottom: 10px;
|
||||||
|
line-height: 20px;
|
||||||
|
font-size: 12px;
|
||||||
|
text-align: center;
|
||||||
|
animation: botCenter 3s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes botCenter {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.links {
|
||||||
|
--link-color: #5372b4;
|
||||||
|
color: var(--link-color);
|
||||||
|
}
|
||||||
|
.links:hover {
|
||||||
|
border-bottom: 2px solid var(--link-color);
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.links {
|
||||||
|
--link-color: #9ca3af;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-bar {
|
||||||
|
width: 200px;
|
||||||
|
height: 10px;
|
||||||
|
background-color: #ddd;
|
||||||
|
margin: 20px auto;
|
||||||
|
border-radius: 5px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-bar-inner {
|
||||||
|
width: 0;
|
||||||
|
height: 100%;
|
||||||
|
background-color: #007bff;
|
||||||
|
border-radius: 5px;
|
||||||
|
animation: fillBar 2s ease-in-out forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fillBar {
|
||||||
|
0% {
|
||||||
|
width: 0;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="blink">
|
||||||
|
<div>
|
||||||
|
<h1>[[${error.status + ' ' + #strings.defaultString(error.title, 'Internal server error')}]]</h1>
|
||||||
|
<p th:if="${error.status >= 500 && error.status < 600}">围观群众太过热情,服务器繁忙,请稍后访问。</p>
|
||||||
|
<p th:if="${error.status >= 400 && error.status < 500}">抱歉,您请求的页面不存在。</p>
|
||||||
|
<p th:if="${error.status >= 400 && error.status < 500}">可能是输入的网址有误,或者该页面已被移动或删除。</p>
|
||||||
|
<a th:if="${error.status >= 400 && error.status < 500}" href="/" class="back-link">手动返回首页</a></p>
|
||||||
|
<div th:if="${error.status >= 400 && error.status < 500}" class="loading-bar">
|
||||||
|
<div class="loading-bar-inner"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script th:inline="javascript">
|
||||||
|
const websites = [
|
||||||
|
"/"
|
||||||
|
];
|
||||||
|
|
||||||
|
function redirectToRandomWebsite() {
|
||||||
|
// 获取错误状态码(通过解析标题文本)
|
||||||
|
const errorCode = [[${error.status}]];
|
||||||
|
|
||||||
|
// 仅当 400 <= 错误码 < 500 时执行跳转
|
||||||
|
if (errorCode >= 400 && errorCode < 500) {
|
||||||
|
const randomIndex = Math.floor(Math.random() * websites.length);
|
||||||
|
const randomWebsite = websites[randomIndex];
|
||||||
|
setTimeout(() => {
|
||||||
|
window.location.href = randomWebsite;
|
||||||
|
}, 4000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onload = redirectToRandomWebsite;
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -33,13 +33,14 @@
|
|||||||
</th:block>
|
</th:block>
|
||||||
<hr th:if="${theme.config.page_config.show_exchange_info || !#strings.isEmpty(theme.config.page_config.links_info)}"/>
|
<hr th:if="${theme.config.page_config.show_exchange_info || !#strings.isEmpty(theme.config.page_config.links_info)}"/>
|
||||||
<th:block th:if="${theme.config.page_config.show_exchange_info}"
|
<th:block th:if="${theme.config.page_config.show_exchange_info}"
|
||||||
th:with="bloggerAvatar= ${#strings.defaultString(theme.config.page_config.links_blogger_avatar, contributor.avatar)}">
|
th:with="bloggerAvatar= ${#strings.defaultString(theme.config.page_config.links_blogger_avatar, contributor.avatar)},
|
||||||
|
descriptive= ${#strings.defaultString(theme.config.page_config.links_descriptive, contributor.bio)}">
|
||||||
<p style="margin-bottom: 4px">申请友链的方法:</p>
|
<p style="margin-bottom: 4px">申请友链的方法:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>名称:[[${site.title}]]</li>
|
<li>名称:[[${site.title}]]</li>
|
||||||
<li>地址:<a th:href="${site.url}" target="_blank" th:text="${site.url}"></a></li>
|
<li>地址:<a th:href="${site.url}" target="_blank" th:text="${site.url}"></a></li>
|
||||||
<li>图标:<a th:href="${bloggerAvatar}" target="_blank" th:text="${bloggerAvatar}"></a></li>
|
<li>图标:<a th:href="${bloggerAvatar}" target="_blank" th:text="${bloggerAvatar}"></a></li>
|
||||||
<li>描述:[[${contributor.bio}]]</li>
|
<li>描述:[[${descriptive}]]</li>
|
||||||
<li th:if="${!#strings.isEmpty(theme.config.page_config.links_rss_address)}">订阅:<a th:href="${theme.config.page_config.links_rss_address}" target="_blank" th:text="${theme.config.page_config.links_rss_address}"></a></li>
|
<li th:if="${!#strings.isEmpty(theme.config.page_config.links_rss_address)}">订阅:<a th:href="${theme.config.page_config.links_rss_address}" target="_blank" th:text="${theme.config.page_config.links_rss_address}"></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user