Compare commits

...

4 Commits
v1.0.1 ... main

Author SHA1 Message Date
66417cb511 适配链接管理插件1.4.0版本
detailed:
1.适配链接管理插件1.4.0版本,解决前台索引查询链接报错问题。
2.当爱发电接口超时未返回内容时,显示默认数据。
2024-06-17 09:38:08 +08:00
236e0d6547 修复关于页面中赞赏名单在移动端下头像错位的问题 2024-06-01 14:49:11 +08:00
45e93608ab 修改侧栏爱发电图片样式和文章页面标题最大长度限制 2024-05-29 17:34:04 +08:00
371b605268 更新配置文件 2024-05-21 13:07:30 +08:00
7 changed files with 320 additions and 292 deletions

View File

@ -379,10 +379,24 @@ let halo = {
function getPower() {
const url = GLOBAL_CONFIG.source.power.url;
let powerStar = document.getElementById("power-star")
powerStar.href = GLOBAL_CONFIG.source.power.powerLink
fetch(url)
.then(res => res.json())
.then(response => {
// 检查响应状态码
if (!response.ok) {
// 如果响应状态码不是 200抛出一个错误
powerStar.innerHTML = `
<div id="power-star-image" style="background-image: url('/themes/theme-hao/assets/images/afadian/afadian.webp')">
</div>
<div class="power-star-body">
<div id="power-star-title">还没有人赞助</div>
<div id="power-star-desc">为爱发电点击赞助</div>
</div>`;
}
return response.json(); // 只有在状态码为 200 时才解析 JSON
})
.then(data => {
console.log(data)
if (200 === data["ec"]) {
const values = data["data"]["list"];
saveToLocal.set('power-data', JSON.stringify(values), 10 / (60 * 24))
@ -390,8 +404,6 @@ let halo = {
}
})
.catch(error => {
let powerStar = document.getElementById("power-star")
powerStar.href = GLOBAL_CONFIG.source.power.powerLink
powerStar.innerHTML = `
<div id="power-star-image" style="background-image: url('/themes/theme-hao/assets/images/afadian/afadian.webp')">
</div>

View File

@ -115,7 +115,7 @@ var heo = {
function getLinks() {
const fetchUrl =
"/apis/api.plugin.halo.run/v1alpha1/plugins/PluginLinks/links?keyword=&sort=priority,asc"
"/apis/api.plugin.halo.run/v1alpha1/plugins/PluginLinks/links?keyword="
fetch(fetchUrl)
.then(res => res.json())
.then(json => {

View File

@ -7477,7 +7477,7 @@ span.fund_name {
height: 60px;
border-radius: 50%;
background-size: cover;
margin-right: 12px;
/* margin-right: 12px; */
border: var(--style-border-always);
transition: .3s ease-out
}
@ -7533,7 +7533,8 @@ div#power-star-title {
flex-wrap: wrap;
position: relative;
width: calc(100% - 68px);
justify-content: center
justify-content: center;
padding-left: 12px;
}
/* 商务广告-设计周刊 */
@ -10015,7 +10016,7 @@ span.recent-post-top-text {
}
/* 作者打招呼 */
div#author-info__sayhi {
/* div#author-info__sayhi {
text-align: left;
color: var(--heo-white);
background: var(--heo-white-op);
@ -10027,7 +10028,7 @@ div#author-info__sayhi {
cursor: pointer;
-webkit-user-select: none;
transition: 0.3s;
}
} */
div#author-info__sayhi:hover {
background: var(--heo-white-op);
@ -10439,7 +10440,7 @@ a.extend.prev {
}
#post-info .post-title {
width: 1100px;
width: 1200px;
font-size: 2.6rem !important;
}
}
@ -16336,7 +16337,7 @@ span.hexo-douban-pagenum {
padding: 1rem;
border-radius: 12px;
border: var(--style-border-always);
width: calc((100% / 6) - 0.5rem);
width: calc((100% / 4) - 0.5rem);
margin: 0rem 0.25rem 0.5rem 0.25rem;
box-shadow: var(--heo-shadow-border);
}
@ -16348,11 +16349,12 @@ span.hexo-douban-pagenum {
@media screen and (max-width: 1200px) {
.author-content-item.single.reward .reward-list-all .reward-list-item {
width: calc((100% / 4) - 0.5rem);
width: calc((100% / 3) - 0.5rem);
}
.author-content-item.single.reward .reward-list-all .reward-list-item .reward-list-item-avatar {
width: 32%;
/* display: none; */
/* width: 32%; */
}
}
@ -16361,19 +16363,19 @@ span.hexo-douban-pagenum {
width: calc((100% / 2) - 0.5rem);
}
.author-content-item.single.reward .reward-list-all .reward-list-item .reward-list-item-avatar {
/* .author-content-item.single.reward .reward-list-all .reward-list-item .reward-list-item-avatar {
width: 20%;
}
} */
}
@media screen and (max-width: 768px) {
.author-content-item.single.reward .reward-list-all .reward-list-item {
width: 100%;
width: calc((100% / 2) - 0.5rem);
}
.author-content-item.single.reward .reward-list-all .reward-list-item .reward-list-item-avatar {
/* .author-content-item.single.reward .reward-list-all .reward-list-item .reward-list-item-avatar {
width: 9%;
}
} */
}
@media screen and (max-width: 520px) {
@ -16381,9 +16383,9 @@ span.hexo-douban-pagenum {
width: 100%;
}
.author-content-item.single.reward .reward-list-all .reward-list-item .reward-list-item-avatar {
/* .author-content-item.single.reward .reward-list-all .reward-list-item .reward-list-item-avatar {
width: 20%;
}
} */
}
.author-content-item.single.reward .author-content-item-description {
@ -16406,19 +16408,34 @@ span.hexo-douban-pagenum {
width: 100%;
}
.author-content-item.single.reward .reward-list-all .reward-list-item .reward-list-item-container {
display: flex;
justify-content: flex-start;
justify-content: space-between;
height: auto;
}
.author-content-item.single.reward .reward-list-all .reward-list-item .reward-list-item-container .reward-list-item-content {
flex: 2;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-left: 15px;
}
.author-content-item.single.reward .reward-list-all .reward-list-item .reward-list-item-avatar {
width: 32%;
width: 80px;
float: left;
z-index: 10;
position: static;
height: 40px;
transform: translateY(-40%);
height: 80px;
/* transform: translateY(-40%); */
}
.author-content-item.single.reward .reward-list-all .reward-list-item .reward-list-item-avatar img {
border-radius: 50%;
width: 80%;
margin-top: 0.2rem;
width: 80px;
/* margin-top: 0.4rem; */
}
.author-content-item.single.reward .reward-list-all .reward-list-item .reward-list-item-avatar-group {

View File

@ -61,14 +61,17 @@
<div class="reward-list-item" th:each="authorReward : ${authorRewardList}">
<div th:if="${not #strings.isEmpty(authorReward.avatar)}">
<div>
<div class="reward-list-item-container">
<!-- 头像 -->
<div class="reward-list-item-avatar">
<img th:src="${authorReward.avatar}" th:alt="${authorReward.name}">
</div>
<div class="reward-list-item-content">
<!-- 名称 -->
<div style="z-index:20;float: left;" class="reward-list-item-avatar-group">
<div class="reward-list-item-name">[[${authorReward.name}]]</div>
</div>
</div>
<!-- 金额及时间 -->
<div class="reward-list-bottom-group">
<div th:if="${#conversions.convert(authorReward.amount, 'java.math.BigDecimal') < #conversions.convert(theme.config.aboutReward.rewardNumber, 'java.math.BigDecimal')}" class="reward-list-item-money">¥
[[${authorReward.amount}]]
@ -79,6 +82,9 @@
<time class="datatime reward-list-item-time">[[${authorReward.datatime}]]</time>
</div>
</div>
</div>
</div>
<div th:if="${#strings.isEmpty(authorReward.avatar)}">
<div class="reward-list-item-name">[[${authorReward.name}]]</div>
<div class="reward-list-bottom-group">

View File

@ -6,8 +6,7 @@
<div class="author-content-item-tips">数据</div>
<span class="author-content-item-title">访问统计</span>
<div id="statistic"></div>
<div class="post-tips">统计信息来自 <a href="https://invite.51.la/1NzKqTeb?target=V6"
rel="noopener nofollow"
<div class="post-tips">统计信息来自 <a href="https://v6.51.la/" rel="noopener nofollow"
target="_blank">51la网站统计</a></div>
<div class="banner-button-group">
<a class="banner-button" onclick="pjax.loadUrl('/archives')" data-pjax-state="">
@ -29,24 +28,19 @@
th:if="${not #lists.isEmpty(theme.config.about.map.authorInfo)}"
th:with="texts = ${theme.config.about.map.authorInfo}">
<div th:if="${theme.config.about.map.authorInfo.size()}>'0'">
<span class="selfInfo-title"
th:text="${texts[0].authorInfoTitle}">生于</span><span
class="selfInfo-content"
id="selfInfo-content-year" th:style="'color:' + ${texts[0].authorInfoColor}"
<span class="selfInfo-title" th:text="${texts[0].authorInfoTitle}">生于</span><span
class="selfInfo-content" id="selfInfo-content-year"
th:style="'color:' + ${texts[0].authorInfoColor}"
th:text="${texts[0].authorInfoContent}">2000</span>
</div>
<div th:if="${theme.config.about.map.authorInfo.size()}>'1'">
<span class="selfInfo-title"
th:text="${texts[1].authorInfoTitle}">太原理工大学</span><span
class="selfInfo-content"
th:style="'color:' + ${texts[1].authorInfoColor}"
<span class="selfInfo-title" th:text="${texts[1].authorInfoTitle}">太原理工大学</span><span
class="selfInfo-content" th:style="'color:' + ${texts[1].authorInfoColor}"
th:text="${texts[1].authorInfoContent}">计算机科学</span>
</div>
<div th:if="${theme.config.about.map.authorInfo.size()}>'2'">
<span class="selfInfo-title"
th:text="${texts[2].authorInfoTitle}">现在职业</span><span
class="selfInfo-content"
th:style="'color:' + ${texts[2].authorInfoColor}"
<span class="selfInfo-title" th:text="${texts[2].authorInfoTitle}">现在职业</span><span
class="selfInfo-content" th:style="'color:' + ${texts[2].authorInfoColor}"
th:text="${texts[2].authorInfoContent}">BI工程师</span>
</div>
</div>
@ -182,6 +176,5 @@
}
initAboutPage();
</script>
</div>

View File

@ -51,5 +51,5 @@ spec:
repo: https://gitea.uptoz.cn/UPToZ/halo-theme-hao
settingName: "theme-hao-setting"
configMapName: "theme-hao-configMap"
version: "1.0.1-ce"
version: "1.0.2-ce"
require: ">=2.10.0"