Merge pull request #3 from zsjy/DEV

Dev
This commit is contained in:
mjking 2024-04-03 18:34:53 +08:00 committed by GitHub
commit be72942528
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 123 additions and 51 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "halo-theme-dream2.0-plus", "name": "halo-theme-dream2.0-plus",
"version": "1.0.3", "version": "1.0.4",
"description": "梦之城,童话梦境,动漫类型博客主题。", "description": "梦之城,童话梦境,动漫类型博客主题。",
"main": "index.js", "main": "index.js",
"author": "nineya", "author": "nineya",

View File

@ -78,6 +78,16 @@ spec:
value: false value: false
- label: 隐藏 - label: 隐藏
value: true value: true
- $formkit: radio
name: social_media
label: 社交媒体
value: true
help: 是否在HTML下添加社交媒体的META参数隐藏时可由相关插件添加。
options:
- label: 显示
value: true
- label: 隐藏
value: false
- group: basic_style - group: basic_style
label: '基础样式' label: '基础样式'
formSchema: formSchema:
@ -178,9 +188,9 @@ spec:
help: '主题风格效果,不改变主题整体框架。' help: '主题风格效果,不改变主题整体框架。'
options: options:
- value: 'default' - value: 'default'
label: 默认 label: 默认
- value: 'clean' - value: 'clean'
label: 清爽 label: 清爽
- value: 'celebration' - value: 'celebration'
label: 庆典 label: 庆典
- $formkit: select - $formkit: select
@ -221,21 +231,6 @@ spec:
label: 自定义博客字体 label: 自定义博客字体
placeholder: '请输入/选择字体路径' placeholder: '请输入/选择字体路径'
help: '自定义博客字体在博客字体选项为自定义时生效。支持woff2/woff/ttf/eot/svg格式的字体文件链接建议使用woff2格式。' help: '自定义博客字体在博客字体选项为自定义时生效。支持woff2/woff/ttf/eot/svg格式的字体文件链接建议使用woff2格式。'
- $formkit: select
name: sidebar_column
label: 博客布局方式
value: 'all'
options:
- value: 'all'
label: 三列布局
- value: 'only-left'
label: 仅显示左侧
- value: 'only-right'
label: 仅显示右侧
- value: 'module-left'
label: 模块化(左侧)
- value: 'module-right'
label: 模块化(右侧)
- $formkit: repeater - $formkit: repeater
name: carousel_options name: carousel_options
label: 首页大图轮播选项 label: 首页大图轮播选项
@ -251,13 +246,28 @@ spec:
label: 背景图 label: 背景图
- $formkit: radio - $formkit: radio
name: target name: target
label: 打开方式 label: 打开方式
value: '_blank' value: '_blank'
options: options:
- value: '_blank' - value: '_blank'
label: 新窗口 label: 新窗口
- value: '_self' - value: '_self'
label: 原窗口 label: 原窗口
- $formkit: select
name: sidebar_column
label: 博客布局方式
value: 'all'
options:
- value: 'all'
label: 三列布局
- value: 'only-left'
label: 仅显示左侧
- value: 'only-right'
label: 仅显示右侧
- value: 'module-left'
label: 模块化(左侧)
- value: 'module-right'
label: 模块化(右侧)
- $formkit: repeater - $formkit: repeater
name: module_options name: module_options
label: 模块化布局选项 label: 模块化布局选项
@ -801,10 +811,20 @@ spec:
name: wechat_img_face name: wechat_img_face
label: 公众号正面图 label: 公众号正面图
placeholder: '请输入/选择公众号正面图路径' placeholder: '请输入/选择公众号正面图路径'
- $formkit: color
name: wechat_img_face_color
label: 公众号正面图背景色
help: 用于填充图片无法铺满部分的颜色。
value: '#07c261'
- $formkit: attachment - $formkit: attachment
name: wechat_img_back name: wechat_img_back
label: 公众号背面图 label: 公众号背面图
placeholder: '请输入/选择公众号背面图路径' placeholder: '请输入/选择公众号背面图路径'
- $formkit: color
name: wechat_img_back_color
label: 公众号背面图背景色
help: 用于填充图片无法铺满部分的颜色。
value: '#ffffff'
- $formkit: attachment - $formkit: attachment
name: love_oneself_avatar name: love_oneself_avatar
label: 侧边栏恋爱墙-自己的头像 label: 侧边栏恋爱墙-自己的头像
@ -902,6 +922,16 @@ spec:
label: 侧边栏最近文章-展示文章数量 label: 侧边栏最近文章-展示文章数量
placeholder: 请输入数量数值 placeholder: 请输入数量数值
value: 5 value: 5
- $formkit: radio
name: recent_posts_more
label: 侧边栏最近文章-显示”更多”按钮
value: true
help: '侧边栏最近文章是否显示更多按钮。更多按钮跳转至文章归档页面。'
options:
- value: true
label: 显示
- value: false
label: 不显示
- $formkit: number - $formkit: number
name: recent_comments_num name: recent_comments_num
label: 侧边栏最近评论-展示评论数量 label: 侧边栏最近评论-展示评论数量

View File

@ -3545,7 +3545,6 @@ button.swiper-pagination-bullet {
line-height: 1.7em; line-height: 1.7em;
margin-bottom: 14px; margin-bottom: 14px;
padding: 8px 15px; padding: 8px 15px;
//color: var(--dark-b);
color: var(--dark-c); color: var(--dark-c);
background: var(--bg-h); background: var(--bg-h);
border-left: 5px solid var(--theme); border-left: 5px solid var(--theme);
@ -3586,16 +3585,6 @@ button.swiper-pagination-bullet {
} }
} }
//& ul {
// &:not(:last-child) {
// margin-bottom: 4px !important;
// }
//
// &:last-child {
// margin-bottom: 0px !important;
// }
//}
p:not(:last-child) { p:not(:last-child) {
margin-bottom: 4px !important; margin-bottom: 4px !important;
} }
@ -4819,9 +4808,39 @@ button.swiper-pagination-bullet {
} }
} }
/* 日志界面 */ /* 瞬间界面 */
.journal { .journal {
&-teams {
display: grid;
gap: 15px;
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
.item {
user-select: none;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
background: var(--bg-b);
height: 28px;
line-height: 28px;
border-radius: 14px;
cursor: pointer;
color: var(--main);
font-size: 12px;
padding: 0 15px;
text-align: center;
transition: color 0.35s, background 0.35s, box-shadow 0.35s, transform 0.35s;
&.active {
transform: translateY(-2px);
color: #fff;
background: var(--theme);
box-shadow: 0 5px 5px rgb(0 0 0 / 5%);
}
}
}
em { em {
font-style: normal; font-style: normal;
} }
@ -4856,6 +4875,14 @@ button.swiper-pagination-bullet {
&.unfold { &.unfold {
padding: 10px 12px 40px 12px; padding: 10px 12px 40px 12px;
} }
.tag {
color: var(--theme);
&:before {
content: "#";
}
}
} }
&-operation { &-operation {

File diff suppressed because one or more lines are too long

View File

@ -4,23 +4,26 @@ th:with="description=${isPost ? post != null ? post.status.excerpt : singlePage
<title th:text="${title + (#strings.isEmpty(site.subtitle) ? '' : '|' + site.subtitle)}"></title> <title th:text="${title + (#strings.isEmpty(site.subtitle) ? '' : '|' + site.subtitle)}"></title>
<script th:if="${theme.config.enhance.enable_sw}" th:src="${(theme.config.enhance.enable_sw == 'uninstall')? #theme.assets('/assets/js/sw.min.js?uninstall=true') + '&mew=1.2.1' : '/sw.min.js?mew=1.2.1' + theme.config.enhance.enable_sw + '&cdn=' + theme.config.enhance.sw_cdn_source.replaceAll('\n', ',')}"></script> <script th:if="${theme.config.enhance.enable_sw}" th:src="${(theme.config.enhance.enable_sw == 'uninstall')? #theme.assets('/assets/js/sw.min.js?uninstall=true') + '&mew=1.2.1' : '/sw.min.js?mew=1.2.1' + theme.config.enhance.enable_sw + '&cdn=' + theme.config.enhance.sw_cdn_source.replaceAll('\n', ',')}"></script>
<meta name="viewport" content="width=device-width, initial-scale=1"/> <meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta http-equiv="X-UA-Compatible" content="on"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" th:content="${site.seo.keywords}"/> <meta name="keywords" th:content="${site.seo.keywords}"/>
<meta name="description" th:content="${description}"> <meta name="description" th:content="${description}">
<meta name="author" th:content="${site.title}"> <meta name="author" th:content="${site.title}">
<meta name="site" th:content="${site.url}"> <meta name="site" th:content="${site.url}">
<meta property="og:type" content="website"> <th:block th:if="${theme.config.basic_info.social_media}">
<meta property="og:title" th:content="${site.title}"> <meta property="og:type" content="website">
<meta property="og:url" th:content="${canonical}"> <meta property="og:title" th:content="${site.title}">
<meta property="og:site_name" th:content="${title}"> <meta property="og:url" th:content="${#strings.startsWith(canonical,'http') ? canonical : (#strings.endsWith(site.url,'/') ? #strings.substringBefore(site.url, '/') : site.url + canonical)}">
<meta property="og:description" th:content="${description}"> <meta property="og:site_name" th:content="${title}">
<meta property="og:locale" content="zh"> <meta property="og:description" th:content="${description}">
<meta property="og:image" th:content="${site.logo}"> <meta property="og:locale" content="zh">
<meta name="twitter:card" content="summary"> <meta property="og:image" th:content="${#strings.startsWith(site.favicon,'http') ? site.favicon : (#strings.endsWith(site.url,'/') ? #strings.substringBefore(site.url, '/') : site.url + site.favicon)}">
<meta name="twitter:title" th:content="${title}"> <meta name="twitter:card" content="summary">
<meta name="twitter:description" th:content="${description}"> <meta name="twitter:title" th:content="${title}">
<meta name="twitter:image" th:content="${site.logo}"> <meta name="twitter:description" th:content="${description}">
<link rel="canonical" th:href="${canonical}"/> <meta name="twitter:image" th:content="${#strings.startsWith(site.favicon,'http') ? site.favicon : (#strings.endsWith(site.url,'/') ? #strings.substringBefore(site.url, '/') : site.url + site.favicon)}">
</th:block>
<link rel="canonical" th:href="${#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/css/theme.min.css(mew=${theme.spec.version})}">
<!-- <link rel="preload stylesheet" as="style" th:href="@{/assets/lib/remixicon@3.5.0/remixicon.min.css}">--> <!-- <link rel="preload stylesheet" as="style" th:href="@{/assets/lib/remixicon@3.5.0/remixicon.min.css}">-->

View File

@ -15,7 +15,6 @@
<script th:if="${isJournals}" data-pjax th:src="@{/assets/js/journals.min.js(mew=${theme.spec.version})}"></script> <script th:if="${isJournals}" data-pjax th:src="@{/assets/js/journals.min.js(mew=${theme.spec.version})}"></script>
</th:block> </th:block>
<script th:if="${isPhotos}" data-pjax th:src="@{/assets/lib/justifiedGallery@3.8.1/jquery.justifiedGallery.min.js}"></script> <script th:if="${isPhotos}" data-pjax th:src="@{/assets/lib/justifiedGallery@3.8.1/jquery.justifiedGallery.min.js}"></script>
<!-- <script th:if="${enableComment}" data-pjax src="/plugins/PluginCommentWidget/assets/static/comment-widget.iife.js"></script>-->
<script th:src="@{/assets/js/mew-custom.min.js(mew=${theme.spec.version})}"></script> <script th:src="@{/assets/js/mew-custom.min.js(mew=${theme.spec.version})}"></script>

View File

@ -4,6 +4,17 @@
th:with="isJournals = true, enableShare = ${theme.config.page_config.enable_journals_share}, baseEnableComment = ${theme.config.page_config.enable_journals_comment}" th:with="isJournals = true, enableShare = ${theme.config.page_config.enable_journals_share}, baseEnableComment = ${theme.config.page_config.enable_journals_comment}"
xmlns:th="https://www.thymeleaf.org"> xmlns:th="https://www.thymeleaf.org">
<th:block th:fragment="content"> <th:block th:fragment="content">
<div class="card card-content journal" th:if="${!#lists.isEmpty(tags)}">
<div class="card-tab">
<div>
[[${#strings.replace(title, ' - ' + site.title, '')}]]
</div>
</div>
<div class="journal-teams">
<a th:class="${#strings.isEmpty(param.tag)? 'item active' : 'item'}" th:href="@{/moments}">全部</a>
<a th:each="tag : ${tags}" th:class="${#strings.equals(param.tag, tag.name)? 'item active' : 'item'}" th:href="@{/moments(tag=${tag.name})}" th:text="${tag.name}"></a>
</div>
</div>
<div class="card card-content journal" th:each="moment : ${moments.items}"> <div class="card card-content journal" th:each="moment : ${moments.items}">
<p class="journal-date"> <p class="journal-date">
<i class="ri-send-plane-line"></i> <i class="ri-send-plane-line"></i>

View File

@ -4,6 +4,7 @@
th:with="num = ${#strings.isEmpty(theme.config.sidebar.recent_posts_num)? 5 : T(java.lang.Integer).parseInt(theme.config.sidebar.recent_posts_num)}, posts = ${postFinder.list(1,num)}, isEmpty = ${#lists.isEmpty(posts)}"> th:with="num = ${#strings.isEmpty(theme.config.sidebar.recent_posts_num)? 5 : T(java.lang.Integer).parseInt(theme.config.sidebar.recent_posts_num)}, posts = ${postFinder.list(1,num)}, isEmpty = ${#lists.isEmpty(posts)}">
<div class="card-title"> <div class="card-title">
<i class="ri-history-line card-title-label"></i><span>最新文章</span> <i class="ri-history-line card-title-label"></i><span>最新文章</span>
<a th:if="${theme.config.sidebar.recent_posts_more}" class="card-more" th:href="@{/archives}">更多<i class="ri-arrow-right-double-line"></i></a>
</div> </div>
<div th:if="${isEmpty}" class="card-empty">暂无文章</div> <div th:if="${isEmpty}" class="card-empty">暂无文章</div>
<div th:unless="${isEmpty}" class="card-content"> <div th:unless="${isEmpty}" class="card-content">

View File

@ -8,10 +8,11 @@
th:href="${!#strings.isEmpty(wechatUrl) ? wechatUrl : (!#strings.isEmpty(faceImg) ? faceImg : (!#strings.isEmpty(backImg) ? backImg : '#'))}" th:href="${!#strings.isEmpty(wechatUrl) ? wechatUrl : (!#strings.isEmpty(faceImg) ? faceImg : (!#strings.isEmpty(backImg) ? backImg : '#'))}"
th:onclick="${#strings.isEmpty(wechatUrl)} ? 'event.preventDefault();'" target="_blank"> th:onclick="${#strings.isEmpty(wechatUrl)} ? 'event.preventDefault();'" target="_blank">
<div th:class="${!#strings.isEmpty(faceImg) && !#strings.isEmpty(backImg) ? 'flip-content animation' : 'flip-content'}"> <div th:class="${!#strings.isEmpty(faceImg) && !#strings.isEmpty(backImg) ? 'flip-content animation' : 'flip-content'}">
<div class="wechatFace"> <div class="wechatFace" th:style="|background-color: ${theme.config.sidebar.wechat.wechat_img_face_color};|">
<img th:if="${!#strings.isEmpty(faceImg)}" height="auto" width="auto" th:src="${faceImg}" alt="微信公众号"/> <img th:if="${!#strings.isEmpty(faceImg)}" height="auto" width="auto" th:src="${faceImg}" alt="微信公众号"/>
</div> </div>
<div th:class="${!#strings.isEmpty(faceImg) && !#strings.isEmpty(backImg) ? 'wechatBack animation' : 'wechatBack'}" th:classappend="${#strings.isEmpty(faceImg)}? 'show'"> <div th:class="${!#strings.isEmpty(faceImg) && !#strings.isEmpty(backImg) ? 'wechatBack animation' : 'wechatBack'}" th:classappend="${#strings.isEmpty(faceImg)}? 'show'"
th:style="|background-color: ${theme.config.sidebar.wechat.wechat_img_back_color};|">
<img th:if="${!#strings.isEmpty(backImg)}" height="auto" width="auto" th:src="${backImg}" alt="微信公众号"/> <img th:if="${!#strings.isEmpty(backImg)}" height="auto" width="auto" th:src="${backImg}" alt="微信公众号"/>
</div> </div>
</div> </div>

View File

@ -22,6 +22,6 @@ spec:
settingName: theme-dream-setting settingName: theme-dream-setting
configMapName: theme-dream-configMap configMapName: theme-dream-configMap
# 版本号 # 版本号
version: 1.0.3 version: 1.0.4
# 最低支持的 Halo 版本 # 最低支持的 Halo 版本
require: ">=2.6.0" require: ">=2.6.0"