mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-16 08:59:41 +08:00
fix(thumbnail): 修改文章封面图配置描述,修复文章内页不显示默认封面图问题
This commit is contained in:
parent
98ce353bb4
commit
4b29cf2994
@ -6,11 +6,11 @@
|
||||
"author": "nineya",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"release": "eslint **/*.js && gulp release",
|
||||
"push": "eslint **/*.js && gulp push",
|
||||
"release": "eslint src/**/*.js && gulp release",
|
||||
"push": "eslint src/**/*.js && gulp push",
|
||||
"zip": "gulp zip",
|
||||
"build": "eslint **/*.js && gulp",
|
||||
"lint": "eslint **/*.js"
|
||||
"build": "eslint src/**/*.js && gulp",
|
||||
"lint": "eslint src/**/*.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -267,14 +267,14 @@ spec:
|
||||
formSchema:
|
||||
- $formkit: attachment
|
||||
name: default_thumbnail
|
||||
label: 默认文章缩略图
|
||||
label: 默认文章封面图
|
||||
placeholder: '请输入/选择图片路径'
|
||||
help: "如果文章没有指定缩略图,则默认显示当前缩略图。"
|
||||
help: "如果文章没有指定封面图,则默认显示当前封面图。"
|
||||
- $formkit: select
|
||||
name: top_thumbnail_mode
|
||||
label: 置顶文章列表缩略图模式
|
||||
label: 置顶文章列表封面图模式
|
||||
value: back
|
||||
help: '置顶的文章在列表的缩略图模式,除网格布局外,如果文章元数据配置了thumbnail_mode项,则当前配置将被覆盖。注:设置网格布局后,非置顶文章也会变成网格布局。'
|
||||
help: '置顶的文章在列表的封面图模式,除网格布局外,如果文章元数据配置了thumbnail_mode项,则当前配置将被覆盖。注:设置网格布局后,非置顶文章也会变成网格布局。'
|
||||
options:
|
||||
- value: default
|
||||
label: 默认模式
|
||||
@ -292,9 +292,9 @@ spec:
|
||||
label: 网格模式(强优先)
|
||||
- $formkit: select
|
||||
name: thumbnail_mode
|
||||
label: 文章列表缩略图模式
|
||||
label: 文章列表封面图模式
|
||||
value: default
|
||||
help: '文章列表缩略图模式,除网格布局外,如果文章元数据配置了thumbnail_mode项,则当前配置将被覆盖。'
|
||||
help: '文章列表封面图模式,除网格布局外,如果文章元数据配置了thumbnail_mode项,则当前配置将被覆盖。'
|
||||
options:
|
||||
- value: default
|
||||
label: 默认模式
|
||||
@ -846,7 +846,7 @@ spec:
|
||||
formSchema:
|
||||
- $formkit: attachment
|
||||
name: links_thumbnail
|
||||
label: 友链页面-缩略图
|
||||
label: 友链页面-封面图
|
||||
placeholder: '请输入/选择图片路径'
|
||||
- $formkit: attachment
|
||||
name: links_default_avatar
|
||||
|
@ -1,9 +1,10 @@
|
||||
<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()}">
|
||||
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 : post.spec.cover}">
|
||||
|
||||
<div th:if="${!#strings.isEmpty(post.spec.cover)}" class="card widget">
|
||||
<div class="cover-image" th:style="'background-image: url(' + ${post.spec.cover} + ')'">
|
||||
<div th:if="${!#strings.isEmpty(thumbnail)}" class="card widget">
|
||||
<div class="cover-image" th:style="'background-image: url(' + ${thumbnail} + ')'">
|
||||
<div th:if="${type == 'Post' && !#lists.isEmpty(post.categories)}" class="category">
|
||||
<a th:each="cy : ${post.categories}" th:href="${cy.status.permalink}"
|
||||
th:text="${cy.spec.displayName}"></a>
|
||||
@ -34,7 +35,7 @@
|
||||
|
||||
<div class="card">
|
||||
<div class="card-content main">
|
||||
<th:block th:if="${#strings.isEmpty(post.spec.cover)}">
|
||||
<th:block th:if="${#strings.isEmpty(thumbnail)}">
|
||||
<h1 class="title" th:text="${post.spec.title}"></h1>
|
||||
<div class="meta">
|
||||
<ul class="breadcrumb">
|
||||
|
Loading…
x
Reference in New Issue
Block a user