Skip to content

Commit

Permalink
Merge pull request #52 from liuzhihang/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
liuzhihang authored Jan 4, 2023
2 parents 3deca69 + 50f3381 commit 937de21
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 47 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "halo-theme-hao",
"version": "1.0.4",
"version": "1.0.5",
"dependencies": {
}
}
2 changes: 1 addition & 1 deletion settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ spec:
- $formkit: group
if: "$get(todayRecommend).value"
name: todayRecommendContent
label: 公众号
label: 今日推荐
value:
todayRecommendUrl:
todayRecommendTitle:
Expand Down
40 changes: 0 additions & 40 deletions templates/links.html
Original file line number Diff line number Diff line change
@@ -1,46 +1,6 @@
<!DOCTYPE html>
<html lang="en" th:replace="modules/layouts/layout :: layout(content = ~{::content}, htmlType = 'links')"
xmlns:th="http://www.thymeleaf.org">

<style type="text/css">#loading-box .loading-bg {
display: flex;
width: 100%;
height: 100%;
position: fixed;
background: var(--heo-maskbgdeep);
z-index: 1999;
opacity: 1;
transition: 0.3s;
pointer-events: all;
backdrop-filter: saturate(180%) blur(20px);
-webkit-backdrop-filter: blur(20px);
}

#loading-box.loaded .loading-bg {
opacity: 0;
pointer-events: none;
}

#loading-box .loading-img {
width: 100px;
margin: auto;
animation-duration: 0.3s;
animation-name: loadingAction;
animation-iteration-count: infinite;
animation-direction: alternate;
}

@keyframes loadingAction {
from {
opacity: 1;
}
to {
opacity: 0.6;
}
}
</style>


<th:block th:fragment="content">

<div class="page" id="body-wrap">
Expand Down
2 changes: 1 addition & 1 deletion templates/modules/layouts/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
coverColor();
}

if ([[${theme.config.other.loadingBox} and not ${#strings.isEmpty(theme.config.other.loadingBoxImg)}]]) {
if ([[${theme.config.other.loadingBox}]]) {
// 移除加载动画
removeLoading();
}
Expand Down
41 changes: 41 additions & 0 deletions templates/modules/loading-box.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,47 @@
<div id="loading-box" onclick="heo.hideLoading()"
th:fragment="loading-box"
th:if="${theme.config.other.loadingBox} and not ${#strings.isEmpty(theme.config.other.loadingBoxImg)}">


<style type="text/css">
#loading-box .loading-bg {
display: flex;
width: 100%;
height: 100%;
position: fixed;
background: var(--heo-maskbgdeep);
z-index: 1999;
opacity: 1;
transition: 0.3s;
pointer-events: all;
backdrop-filter: saturate(180%) blur(20px);
-webkit-backdrop-filter: blur(20px);
}

#loading-box.loaded .loading-bg {
opacity: 0;
pointer-events: none;
}

#loading-box .loading-img {
width: 100px;
margin: auto;
animation-duration: 0.3s;
animation-name: loadingAction;
animation-iteration-count: infinite;
animation-direction: alternate;
}

@keyframes loadingAction {
from {
opacity: 1;
}
to {
opacity: 0.6;
}
}
</style>

<div class="loading-bg">
<img class="loading-img" th:src="${theme.config.other.loadingBoxImg}">
</div>
Expand Down
5 changes: 2 additions & 3 deletions templates/modules/widgets/top-group.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@
</div>
</div>


<!-- 今日推荐 -->
<div class="todayCard" id="todayCard"
th:if="${theme.config.top.todayRecommendSwitch}"
th:onclick="'window.open('+ ${theme.config.top.todayRecommendContent.todayRecommendUrl} +')'">
th:if="${theme.config.top.todayRecommend}"
th:attr="onclick='javascript:window.open(\''+ ${theme.config.top.todayRecommendContent.todayRecommendUrl} +'\')'">
<div class="todayCard-info">
<div class="todayCard-tips">今日推荐</div>
<div class="todayCard-title" th:text="${theme.config.top.todayRecommendContent.todayRecommendTitle}"></div>
Expand Down
17 changes: 17 additions & 0 deletions templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,23 @@
<main class="layout hide-aside" id="content-inner">
<div id="page">
<div id="article-container line-numbers" th:utext="${singlePage.content.content}"></div>


<hr>
<!-- 评论模块 -->
<div id="post-comment"
th:if="${pluginFinder.available('PluginCommentWidget') and singlePage.spec.allowComment}">
<div class="comment-head">
<div class="comment-headline"><i class="iconfont icon-comment-alt"></i> <span>评论</span></div>
<div class="comment-privacy"><a href="#">隐私政策</a></div>
<div class="comment-tips" id="comment-tips">
<span>你无需删除空行,直接评论以获取最佳展示效果</span>
</div>
</div>
<halo:comment group="content.halo.run" kind="SinglePage"
th:attr="name=${singlePage.metadata.name}"/>
</div>

</div>

<!-- 侧栏 -->
Expand Down
2 changes: 1 addition & 1 deletion theme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ spec:
repo: 'https://github.com/liuzhihang/halo-theme-hao'
settingName: "theme-hao-setting"
configMapName: "theme-hao-configMap"
version: 1.0.4
version: 1.0.5
require: 2.0.0

0 comments on commit 937de21

Please sign in to comment.