2 次代码提交
修改 5 个文件,包含 24 行新增10 行删除
-1
查看文件
@@ -1,7 +1,6 @@
{ {
"name": "theme-terminal", "name": "theme-terminal",
"private": true, "private": true,
"version": "2.0.6",
"description": "A terminal like theme for Halo.", "description": "A terminal like theme for Halo.",
"scripts": { "scripts": {
"dev": "vite build --watch", "dev": "vite build --watch",
+2 -2
查看文件
@@ -71,7 +71,7 @@ spec:
position: up position: up
label: 归档 label: 归档
icon: archive icon: archive
url: /archives url: ""
external: false external: false
- enabled: true - enabled: true
type: categories type: categories
@@ -279,7 +279,7 @@ spec:
- $formkit: text - $formkit: text
name: url name: url
label: 链接地址 label: 链接地址
help: 搜索入口可留空;其他入口留空时不会跳转。 help: 内置入口可留空并自动使用 Halo 路由;自定义入口留空时不会跳转。
- $formkit: select - $formkit: select
name: position name: position
label: 所在位置 label: 所在位置
+13 -4
查看文件
@@ -14,7 +14,13 @@
<i class="i-pixelarticons-github"></i> <i class="i-pixelarticons-github"></i>
</span> </span>
<th:block th:with="items=${theme.config.activity.activity_items}"> <th:block
th:with="items=${theme.config.activity.activity_items},
primaryMenu=${menuFinder.getPrimary()},
archiveMenuItem=${primaryMenu != null and primaryMenu.menuItems != null and !#lists.isEmpty(primaryMenu.menuItems) ? primaryMenu.menuItems.^[status != null and !#strings.isEmpty(status.href) and ((spec != null and spec.href == '/archives') or status.href == '/archives' or status.displayName == 'Archives' or status.displayName == '归档')] : null},
archiveActivityItem=${items != null and !#lists.isEmpty(items) ? items.^[type == 'archive' or key == 'archive'] : null},
activityArchiveHref=${archiveMenuItem != null and archiveMenuItem.status != null and !#strings.isEmpty(archiveMenuItem.status.href) ? archiveMenuItem.status.href : (archiveActivityItem != null and !#strings.isEmpty(archiveActivityItem.url) ? archiveActivityItem.url : (archiveActivityItem != null and !#strings.isEmpty(archiveActivityItem.href) ? archiveActivityItem.href : '/archives'))}"
>
<div class="devcm-activity__group devcm-activity__group--up"> <div class="devcm-activity__group devcm-activity__group--up">
<th:block th:if="${items != null and !#lists.isEmpty(items)}"> <th:block th:if="${items != null and !#lists.isEmpty(items)}">
<th:block <th:block
@@ -22,7 +28,8 @@
th:with="placement=${#strings.isEmpty(item.position) ? 'up' : item.position}, th:with="placement=${#strings.isEmpty(item.position) ? 'up' : item.position},
itemType=${!#strings.isEmpty(item.type) ? item.type : (!#strings.isEmpty(item.key) ? item.key : 'custom')}, itemType=${!#strings.isEmpty(item.type) ? item.type : (!#strings.isEmpty(item.key) ? item.key : 'custom')},
entryAction=${itemType == 'search' or item.action == 'search' ? 'search' : 'link'}, entryAction=${itemType == 'search' or item.action == 'search' ? 'search' : 'link'},
entryHref=${entryAction == 'search' ? '#' : (!#strings.isEmpty(item.url) ? item.url : (!#strings.isEmpty(item.href) ? item.href : '#'))}, entryConfiguredHref=${!#strings.isEmpty(item.url) ? item.url : (!#strings.isEmpty(item.href) ? item.href : '#')},
entryHref=${entryAction == 'search' ? '#' : (itemType == 'archive' ? activityArchiveHref : entryConfiguredHref)},
entryLabel=${!#strings.isEmpty(item.label) ? item.label : (!#strings.isEmpty(item.labelKey) ? #messages.msg(item.labelKey) : #messages.msg('devcm.activity.link'))}" entryLabel=${!#strings.isEmpty(item.label) ? item.label : (!#strings.isEmpty(item.labelKey) ? #messages.msg(item.labelKey) : #messages.msg('devcm.activity.link'))}"
> >
<a <a
@@ -95,7 +102,8 @@
<a <a
class="devcm-activity__button" class="devcm-activity__button"
th:classappend="${pageType == 'archive' or pageType == 'post'} ? ' devcm-activity__button--active' : ''" th:classappend="${pageType == 'archive' or pageType == 'post'} ? ' devcm-activity__button--active' : ''"
href="/archives" href="#"
th:href="${activityArchiveHref}"
th:title="#{devcm.activity.archive}" th:title="#{devcm.activity.archive}"
th:attr="data-label=#{devcm.activity.archive},aria-label=#{devcm.activity.archive}" th:attr="data-label=#{devcm.activity.archive},aria-label=#{devcm.activity.archive}"
> >
@@ -129,7 +137,8 @@
th:with="placement=${#strings.isEmpty(item.position) ? 'up' : item.position}, th:with="placement=${#strings.isEmpty(item.position) ? 'up' : item.position},
itemType=${!#strings.isEmpty(item.type) ? item.type : (!#strings.isEmpty(item.key) ? item.key : 'custom')}, itemType=${!#strings.isEmpty(item.type) ? item.type : (!#strings.isEmpty(item.key) ? item.key : 'custom')},
entryAction=${itemType == 'search' or item.action == 'search' ? 'search' : 'link'}, entryAction=${itemType == 'search' or item.action == 'search' ? 'search' : 'link'},
entryHref=${entryAction == 'search' ? '#' : (!#strings.isEmpty(item.url) ? item.url : (!#strings.isEmpty(item.href) ? item.href : '#'))}, entryConfiguredHref=${!#strings.isEmpty(item.url) ? item.url : (!#strings.isEmpty(item.href) ? item.href : '#')},
entryHref=${entryAction == 'search' ? '#' : (itemType == 'archive' ? activityArchiveHref : entryConfiguredHref)},
entryLabel=${!#strings.isEmpty(item.label) ? item.label : (!#strings.isEmpty(item.labelKey) ? #messages.msg(item.labelKey) : #messages.msg('devcm.activity.link'))}" entryLabel=${!#strings.isEmpty(item.label) ? item.label : (!#strings.isEmpty(item.labelKey) ? #messages.msg(item.labelKey) : #messages.msg('devcm.activity.link'))}"
> >
<a <a
+8 -2
查看文件
@@ -8,12 +8,18 @@
<div class="devcm-editor-tabs"> <div class="devcm-editor-tabs">
<div <div
class="devcm-editor-tab devcm-editor-tab--active" class="devcm-editor-tab devcm-editor-tab--active"
th:with="postTabName=${!#strings.isEmpty(post.spec.slug) ? post.spec.slug : post.metadata.name}" th:with="postTabBaseName=${!#strings.isEmpty(post.spec.slug) ? post.spec.slug : post.metadata.name},
postTabName=${#strings.endsWith(postTabBaseName, '.md') ? postTabBaseName : postTabBaseName + '.md'},
primaryMenu=${menuFinder.getPrimary()},
archiveMenuItem=${primaryMenu != null and primaryMenu.menuItems != null and !#lists.isEmpty(primaryMenu.menuItems) ? primaryMenu.menuItems.^[status != null and !#strings.isEmpty(status.href) and ((spec != null and spec.href == '/archives') or status.href == '/archives' or status.displayName == 'Archives' or status.displayName == '归档')] : null},
archiveActivityItem=${theme.config.activity.activity_items != null and !#lists.isEmpty(theme.config.activity.activity_items) ? theme.config.activity.activity_items.^[type == 'archive' or key == 'archive'] : null},
postCloseHref=${archiveMenuItem != null and archiveMenuItem.status != null and !#strings.isEmpty(archiveMenuItem.status.href) ? archiveMenuItem.status.href : (archiveActivityItem != null and !#strings.isEmpty(archiveActivityItem.url) ? archiveActivityItem.url : (archiveActivityItem != null and !#strings.isEmpty(archiveActivityItem.href) ? archiveActivityItem.href : '/archives'))}"
> >
<span th:text="${postTabName}">post</span> <span th:text="${postTabName}">post</span>
<a <a
class="devcm-editor-tab__close" class="devcm-editor-tab__close"
href="/archives" href="#"
th:href="${postCloseHref}"
th:aria-label="#{devcm.action.closePostTab}" th:aria-label="#{devcm.action.closePostTab}"
th:title="#{devcm.action.closePostTab}" th:title="#{devcm.action.closePostTab}"
>×</a >×</a
+1 -1
查看文件
@@ -13,5 +13,5 @@ spec:
repo: https://git.dev.cm/theme-terminal repo: https://git.dev.cm/theme-terminal
settingName: "theme-terminal-setting" settingName: "theme-terminal-setting"
configMapName: "theme-terminal-configMap" configMapName: "theme-terminal-configMap"
version: 2.0.6 version: 2.0.7
require: ">=2.22.0" require: ">=2.22.0"