mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-15 11:59:40 +08:00
适配缩略图
This commit is contained in:
parent
61e3eea1cd
commit
00e0ae896b
@ -695,7 +695,7 @@ spec:
|
||||
- $formkit: code
|
||||
name: content
|
||||
language: html
|
||||
height: 160px
|
||||
height: 45px
|
||||
label: 侧边栏内容
|
||||
placeholder: 请输入 HTML 内容
|
||||
help: '非必填,仅在侧边栏类型为公告、广告、自定义时生效。'
|
||||
@ -1023,7 +1023,7 @@ spec:
|
||||
label: "友链页面-补充信息"
|
||||
placeholder: '请输入补充信息'
|
||||
language: html
|
||||
height: 240px
|
||||
height: 45px
|
||||
help: '友链页面最低部的补充说明信息,支持 HTML 格式。'
|
||||
- $formkit: radio
|
||||
name: link_enable_comment
|
||||
@ -1154,7 +1154,7 @@ spec:
|
||||
label: "搜索页面-无搜索结果提示语"
|
||||
language: html
|
||||
value: '没有搜索结果'
|
||||
height: 240px
|
||||
height: 45px
|
||||
help: '搜索页面-无搜索结果提示语,支持 HTML 格式。'
|
||||
- $formkit: number
|
||||
if: $get(search_enable).value
|
||||
@ -1162,7 +1162,7 @@ spec:
|
||||
validation: required
|
||||
label: "搜索页面-搜索结果最大显示数量"
|
||||
value: 10
|
||||
height: 240px
|
||||
height: 45px
|
||||
help: '搜索页面-搜索结果最大显示数量。'
|
||||
- group: enhance
|
||||
label: '增强功能'
|
||||
@ -1494,7 +1494,7 @@ spec:
|
||||
validation: required
|
||||
label: 安全链接页面-跳转提示区域文本描述
|
||||
language: html
|
||||
height: 240px
|
||||
height: 45px
|
||||
value: '您即将离开<span>{title}</span>,去往:<span>{url}</span>'
|
||||
placeholder: '请输入安全链接页面跳转提示区域的文本描述'
|
||||
help: '"<span></span>"包裹时字体颜色为主题色,“ {title} ”表示站点主标题,“ {url} ”表示跳转URL,区分大小写。默认值:“您即将离开<span>{title}</span>,去往:<span>{url}</span>”'
|
||||
@ -1510,34 +1510,34 @@ spec:
|
||||
- $formkit: code
|
||||
name: inline_css
|
||||
language: css
|
||||
height: 240px
|
||||
height: 45px
|
||||
label: "内嵌 CSS"
|
||||
placeholder: 请输入 CSS 样式内容
|
||||
help: '填入CSS代码,无需style标签,将插入head标签尾部。'
|
||||
- $formkit: code
|
||||
name: external_js_head
|
||||
language: javascript
|
||||
height: 240px
|
||||
height: 45px
|
||||
label: "外部 JS 链接(head)"
|
||||
placeholder: 请输入 script 标签
|
||||
help: '填入外部JS链接,需要script标签,可按情况指定async和defer属性,将插入head标签尾部。'
|
||||
- $formkit: code
|
||||
name: inline_js_head
|
||||
language: javascript
|
||||
height: 240px
|
||||
height: 45px
|
||||
label: "内嵌 JS(head)"
|
||||
placeholder: 请输入 JS 代码内容
|
||||
help: '填入JS代码,无需script标签,将插入head标签尾部。'
|
||||
- $formkit: code
|
||||
name: external_js_body
|
||||
language: javascript
|
||||
height: 240px
|
||||
height: 45px
|
||||
label: "外部 JS 链接(body)"
|
||||
placeholder: 请输入 script 标签
|
||||
help: '填入外部JS链接,需要script标签,可按情况指定async和defer属性,将插入body标签尾部。'
|
||||
- $formkit: code
|
||||
language: javascript
|
||||
height: 240px
|
||||
height: 45px
|
||||
name: inline_js_body
|
||||
label: "内嵌JS(body)"
|
||||
placeholder: 请输入 JS 代码内容
|
||||
|
@ -13,7 +13,7 @@
|
||||
<div class="timeline">
|
||||
<th:block th:each="months : ${archive.months}">
|
||||
<article th:each="post : ${months.posts}" class="media"
|
||||
th:with="thumbnail = ${#strings.isEmpty(post.spec.cover) ? #strings.isEmpty(theme.config.post.default_thumbnail) ? '' : theme.config.post.default_thumbnail + (#strings.contains(theme.config.post.default_thumbnail, '?') ? '&' : '?') + 'id=' + post.metadata.name : post.spec.cover}">
|
||||
th:with="thumbnail = ${#strings.isEmpty(post.spec.cover) ? #strings.isEmpty(theme.config.post.default_thumbnail) ? '' : theme.config.post.default_thumbnail + (#strings.contains(theme.config.post.default_thumbnail, '?') ? '&' : '?') + 'id=' + post.metadata.name : thumbnail.gen(post.spec.cover, 's')}">
|
||||
<a th:if="${!#strings.isEmpty(thumbnail)}" th:href="${post.status.permalink}" class="media-left">
|
||||
<img class="not-gallery" th:src="${thumbnail}" th:alt="${post.spec.title}">
|
||||
</a>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<th:block xmlns:th="https://www.thymeleaf.org"
|
||||
th:fragment="article (post, type)"
|
||||
th:with="updateInterval = ${T(java.lang.Math).floor((#dates.createNow().getTime()/1000.0 - post.status.lastModifyTime.getEpochSecond())/86400.0).intValue()},
|
||||
thumbnail = ${#strings.isEmpty(post.spec.cover) ? #strings.isEmpty(theme.config.post.default_thumbnail) ? '' : theme.config.post.default_thumbnail + (#strings.contains(theme.config.post.default_thumbnail, '?') ? '&' : '?') + 'id=' + post.metadata.name : post.spec.cover}">
|
||||
thumbnail = ${#strings.isEmpty(post.spec.cover) ? #strings.isEmpty(theme.config.post.default_thumbnail) ? '' : theme.config.post.default_thumbnail + (#strings.contains(theme.config.post.default_thumbnail, '?') ? '&' : '?') + 'id=' + post.metadata.name : thumbnail.gen(post.spec.cover, 'm')}">
|
||||
|
||||
<div th:if="${!#strings.isEmpty(thumbnail)}" class="card widget">
|
||||
<div class="cover-image" th:style="'background-image: url(' + ${thumbnail} + ')'">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<th:block xmlns:th="https://www.thymeleaf.org"
|
||||
th:fragment="articleList (posts)">
|
||||
<th:block th:each="post : ${posts}"
|
||||
th:with="thumbnail = ${#strings.isEmpty(post.spec.cover) ? #strings.isEmpty(theme.config.post.default_thumbnail) ? '' : theme.config.post.default_thumbnail + (#strings.contains(theme.config.post.default_thumbnail, '?') ? '&' : '?') + 'id=' + post.metadata.name : post.spec.cover},
|
||||
th:with="thumbnail = ${#strings.isEmpty(post.spec.cover) ? #strings.isEmpty(theme.config.post.default_thumbnail) ? '' : theme.config.post.default_thumbnail + (#strings.contains(theme.config.post.default_thumbnail, '?') ? '&' : '?') + 'id=' + post.metadata.name : thumbnail.gen(post.spec.cover, 's')},
|
||||
thumbnail_mode = ${(theme.config.post.top_thumbnail_mode == 'grid' || (!post.spec.pinned && theme.config.post.thumbnail_mode == 'grid'))? 'grid' : !#strings.isEmpty(post.metadata.annotations.get('thumbnail_mode'))? post.metadata.annotations.get('thumbnail_mode') : post.spec.pinned ? theme.config.post.top_thumbnail_mode : theme.config.post.thumbnail_mode}">
|
||||
<div th:if="${!#strings.isEmpty(thumbnail) && thumbnail_mode == 'back'}" class="card widget card-cover">
|
||||
<a th:href="${post.status.permalink}">
|
||||
|
@ -30,9 +30,9 @@ spec:
|
||||
settingName: theme-dream2-plus-setting
|
||||
configMapName: theme-dream2-plus-configMap
|
||||
# 版本号
|
||||
version: 1.2.8
|
||||
version: 1.2.9
|
||||
# 最低支持的 Halo 版本
|
||||
require: ">=2.15.0"
|
||||
require: ">=2.19.0"
|
||||
# 许可
|
||||
license:
|
||||
- name: "MIT"
|
||||
|
Loading…
x
Reference in New Issue
Block a user