Merge pull request #505 from chengzhongxue/main

移动端首页文章样式,文章元数据添加ai摘要控制,评论弹幕样式优化
This commit is contained in:
困困鱼 2023-09-23 20:34:22 +08:00 committed by GitHub
commit db11ad8f50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 7 deletions

View File

@ -7,6 +7,15 @@ spec:
group: content.halo.run group: content.halo.run
kind: Post kind: Post
formSchema: formSchema:
- $formkit: "radio"
name: "ai"
label: "AI 摘要"
help: "默认后台设置"
options:
- label: "启用"
value: "true"
- label: "禁用"
value: "false"
- $formkit: "radio" - $formkit: "radio"
name: "copyrightEnable" name: "copyrightEnable"
id: "copyrightEnable" id: "copyrightEnable"

View File

@ -37,9 +37,9 @@
border: var(--style-border); border: var(--style-border);
backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
-webkit-backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
transform: translateZ(0);
position: fixed; position: fixed;
box-shadow: var(--heo-shadow-border); box-shadow: var(--heo-shadow-border);
overflow: hidden;
} }
.comment-barrage-item:hover { .comment-barrage-item:hover {
@ -118,7 +118,6 @@
line-height: 1; line-height: 1;
padding: 4px; padding: 4px;
border-radius: 4px; border-radius: 4px;
white-space: nowrap;
} }
.comment-barrage-item .barrageHead .barrageTitle:hover { .comment-barrage-item .barrageHead .barrageTitle:hover {
@ -140,9 +139,8 @@
font-size: 14px !important; font-size: 14px !important;
font-weight: normal !important; font-weight: normal !important;
height: calc(100% - 30px); height: calc(100% - 30px);
overflow: hidden; overflow: scroll;
width: fit-content; cursor: pointer
max-height: 48px;
} }
.comment-barrage-item .barrageContent a { .comment-barrage-item .barrageContent a {

View File

@ -8642,6 +8642,7 @@ li {
.recent-post-item .recent-post-info .recent-post-info-top .content { .recent-post-item .recent-post-info .recent-post-info-top .content {
opacity: 1; opacity: 1;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
display: none;
} }
#recent-posts .recent-post-item .recent-post-info .article-title { #recent-posts .recent-post-item .recent-post-info .article-title {

View File

@ -136,7 +136,8 @@
<!-- 文章ai摘要 --> <!-- 文章ai摘要 -->
<div class="post-ai" th:if="${theme.config.post.aiDescription.aiDescriptionEnable}"> <div class="post-ai" th:if="${not #strings.isEmpty(#annotations.get(post, 'ai')) ?
#annotations.get(post, 'ai') == 'true' : theme.config.post.aiDescription.aiDescriptionEnable}">
<div class="ai-title"><i class="haofont hao-icon-bilibili"></i> <div class="ai-title"><i class="haofont hao-icon-bilibili"></i>
<div class="ai-title-text">AI-摘要</div> <div class="ai-title-text">AI-摘要</div>
<div th:if="${theme.config.post.aiDescription.switchBtn}" id="ai-Toggle">切换</div> <div th:if="${theme.config.post.aiDescription.switchBtn}" id="ai-Toggle">切换</div>
@ -159,7 +160,8 @@
</article> </article>
<!-- 文章ai摘要 --> <!-- 文章ai摘要 -->
<script data-pjax th:if="${theme.config.post.aiDescription.aiDescriptionEnable}" <script data-pjax th:if="${not #strings.isEmpty(#annotations.get(post, 'ai')) ?
#annotations.get(post, 'ai') == 'true' : theme.config.post.aiDescription.aiDescriptionEnable}"
th:src="${assets_link + '/libs/gpt/post-ai.js'}"></script> th:src="${assets_link + '/libs/gpt/post-ai.js'}"></script>
<!-- 版权声明 --> <!-- 版权声明 -->