Skip to content

Commit

Permalink
Merge pull request #25 from zsjy/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
mjsoftking authored Jul 29, 2024
2 parents bc96977 + cf078f8 commit a38efc5
Show file tree
Hide file tree
Showing 14 changed files with 154 additions and 16 deletions.
8 changes: 7 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
},
"dependencies": {
"html2canvas": "^1.4.1",
"qrcode": "^1.5.1"
"qrcode": "^1.5.1",
"remixicon": "^4.3.0"
}
}
1 change: 0 additions & 1 deletion templates/assets/lib/[email protected]/remixicon.min.css

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions templates/assets/lib/[email protected]/remixicon.min.css

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion templates/common/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<link rel="canonical" th:href="${#strings.isEmpty(canonical) ? '' : #strings.startsWith(canonical,'http') ? canonical : (#strings.endsWith(canonical,'/') ? #strings.substringBefore(site.url, '/') : site.url + canonical)}"/>

<link rel="preload stylesheet" as="style" th:href="@{/assets/css/theme.min.css(mew=${theme.spec.version})}">
<link rel="preload stylesheet" as="style" th:href="@{/assets/lib/remixicon@4.2.0/remixicon.min.css}">
<link rel="preload stylesheet" as="style" th:href="@{/assets/lib/remixicon@4.3.0/remixicon.min.css}">
<link rel="preload stylesheet" as="style" th:href="@{/assets/css/style.min.css(mew=${theme.spec.version})}">
<link th:if="${theme.config.basic_style.theme_style == 'celebration'}" rel="preload stylesheet" as="style" th:href="@{/assets/css/celebration.min.css(mew=${theme.spec.version})}">

Expand Down
11 changes: 8 additions & 3 deletions templates/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,23 @@
var searchInput = document.getElementById('halo-search-form-text-input')
var query = searchInput.value.trim()
if (!query || query.startsWith('*')) {
// 阻止表单提交
event.preventDefault()
// 显示错误信息
Qmsg.warning(!query ? '请输入内容' : '不能输入星号(*)作为内容开头')
return
}
if(DreamConfig.pjax_state) {
// 阻止表单提交
event.preventDefault()
searchForm.setAttribute('data-pjax', '')
}
})
document.addEventListener('keydown', function(event) {
if (event.key === 'Enter') {
if (!searchForm.contains(document.activeElement)) {
event.preventDefault(); // 阻止默认行为
searchForm.dispatchEvent(new Event('submit')); // 触发submit事件
}
}
});
})
</script>
<form id="halo-search-form" class="search-form-inner" method="get" action="/search" role="search">
Expand Down
2 changes: 1 addition & 1 deletion theme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
settingName: theme-dream2-plus-setting
configMapName: theme-dream2-plus-configMap
# 版本号
version: 1.2.7
version: 1.2.7.beta1.0
# 最低支持的 Halo 版本
require: ">=2.15.0"
# 许可
Expand Down

0 comments on commit a38efc5

Please sign in to comment.