mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-15 17:49:40 +08:00
搜索调整
This commit is contained in:
parent
277014185d
commit
6ce6e17faa
@ -1197,15 +1197,13 @@ spec:
|
||||
help: 使用新版搜索需要 halo >= 2.17.0 & 搜索插件 >= 1.5.0。
|
||||
value:
|
||||
search_style: 'box'
|
||||
search_title: '搜索'
|
||||
search_placeholder: '搜索内容...'
|
||||
search_btn_title: '搜索'
|
||||
search_target: '_self'
|
||||
children:
|
||||
- $formkit: radio
|
||||
id: search_style
|
||||
name: search_style
|
||||
label: 搜索按钮-搜索风格
|
||||
help: '仅PC客户端有效,其余客户端均显示为经典。'
|
||||
options:
|
||||
- value: 'box'
|
||||
label: 热门文章
|
||||
@ -1213,26 +1211,6 @@ spec:
|
||||
label: 搜索表单
|
||||
- value: 'basic'
|
||||
label: 经典
|
||||
- $formkit: text
|
||||
if: $get(search_style).value != 'basic'
|
||||
name: search_title
|
||||
validation: required
|
||||
label: 搜索页面-标题
|
||||
placeholder: '输入页面标题,搜索表单、热门文章风格有效'
|
||||
- $formkit: text
|
||||
if: $get(search_style).value != 'basic'
|
||||
name: search_placeholder
|
||||
validation: required
|
||||
label: 搜索页面-输入框提示语
|
||||
placeholder: '输入搜索页面输入框提示语'
|
||||
help: '输入搜索页面输入框提示语,搜索表单、热门文章风格有效。'
|
||||
- $formkit: text
|
||||
if: $get(search_style).value != 'basic'
|
||||
name: search_btn_title
|
||||
validation: required
|
||||
placeholder: '输入搜索页面搜索按钮提示语'
|
||||
label: 搜索页面-搜索按钮提示语
|
||||
help: '输入搜索页面搜索按钮提示语,支持 HTML 格式,搜索表单、热门文章风格有效。'
|
||||
- $formkit: radio
|
||||
if: $get(search_style).value != 'basic'
|
||||
name: search_target
|
||||
|
2
templates/assets/css/style.min.css
vendored
2
templates/assets/css/style.min.css
vendored
File diff suppressed because one or more lines are too long
@ -68,9 +68,9 @@
|
||||
<button th:if="${theme.config.page_config.search.search_style == 'basic'}" onclick="javascript:SearchWidget.open();" class="submit" aria-label="搜索按钮" style="border-radius: 17px;"><i class="ri-search-line"></i></button>
|
||||
<a th:if="${theme.config.page_config.search.search_style == 'form'}" target="_self" href="/search" class="submit" aria-label="搜索按钮" style="border-radius: 17px;display: flex;align-items: center;justify-content: center;"><i class="ri-search-line"></i></a>
|
||||
<form data-pjax class="navbar-search" method="get" action="/search" th:if="${theme.config.page_config.search.search_style == 'box'}">
|
||||
<input autocomplete="off" th:placeholder="${theme.config.page_config.search.search_placeholder}" name="keyword" value="" class="input" type="text"/>
|
||||
<input autocomplete="off" placeholder="搜索内容..." name="keyword" value="" class="input" type="text"/>
|
||||
<input type="hidden" name="limit" th:value="${theme.config.page_config.search.search_limit}"/>
|
||||
<button type="submit" class="submit" th:title="${theme.config.page_config.search.search_btn_title}" aria-label="搜索按钮"><i class="ri-search-line"></i></button>
|
||||
<button type="submit" class="submit" title="搜索" aria-label="搜索按钮"><i class="ri-search-line"></i></button>
|
||||
<span class="icon"></span>
|
||||
<nav class="result" th:with="searchPosts = ${postFinder.list({page: 1,size: 5,sort: {'stats.visit,desc'}})}">
|
||||
<a th:each="postData,pIndex : ${searchPosts}" th:href="@{${postData.status.permalink}}"
|
||||
@ -82,8 +82,7 @@
|
||||
</nav>
|
||||
</form>
|
||||
</div>
|
||||
<i th:unless="${theme.config.page_config.search.search_enable}" class="ri-search-line navbar-searchicon" onclick="javascript:SearchWidget.open();"></i>
|
||||
<a th:if="${theme.config.page_config.search.search_enable}" class="navbar-searchicon" target="_self" href="/search"><i class="ri-search-line navbar-searchicon"></i></a>
|
||||
<i class="ri-search-line navbar-searchicon" onclick="javascript:SearchWidget.open();"></i>
|
||||
<a data-not-pjax th:if="${theme.config.basic_style.show_console == 'console'}" class="navbar-console" th:href="${!#strings.isEmpty(logonUserName) ? theme.config.basic_style.console.console_logon_url : theme.config.basic_style.console.console_url}"
|
||||
th:target="${!#strings.isEmpty(logonUserName) ? theme.config.basic_style.console.console_logon_target : theme.config.basic_style.console.console_target}"
|
||||
th:title="${theme.config.basic_style.console.console_title}">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<th:block
|
||||
th:insert="~{common/layout :: layout (title = ${theme.config.page_config.search.search_title} + ' - ' + ${site.title}, canonical = @{/search}, content = ~{::content}, isPost = true)}"
|
||||
th:insert="~{common/layout :: layout (title = '搜索' + ' - ' + ${site.title}, canonical = @{/search}, content = ~{::content}, isPost = true)}"
|
||||
th:with="isJournals = true, enableShare = false, baseEnableComment = false"
|
||||
xmlns:th="https://www.thymeleaf.org">
|
||||
<th:block th:fragment="content">
|
||||
@ -124,11 +124,10 @@
|
||||
class="text-input"
|
||||
type="search"
|
||||
name="keyword"
|
||||
th:title="${theme.config.page_config.search.search_placeholder}"
|
||||
th:placeholder="${theme.config.page_config.search.search_placeholder}"
|
||||
placeholder="搜索内容..."
|
||||
th:value="${searchResult.keyword}"
|
||||
/>
|
||||
<button class="search-form-btn" th:title="${theme.config.page_config.search.search_btn_title}"
|
||||
<button class="search-form-btn" title="搜索"
|
||||
type="submit">
|
||||
<i class="ri-search-line"></i>
|
||||
</button>
|
||||
|
@ -30,7 +30,7 @@ spec:
|
||||
settingName: theme-dream2-plus-setting
|
||||
configMapName: theme-dream2-plus-configMap
|
||||
# 版本号
|
||||
version: 1.3.4.beta2
|
||||
version: 1.3.4.beta3
|
||||
# 最低支持的 Halo 版本
|
||||
require: ">=2.20.0"
|
||||
# 许可
|
||||
|
Loading…
x
Reference in New Issue
Block a user