Merge pull request #485 from chengzhongxue/main

登录按钮丶宠物挂件
This commit is contained in:
困困鱼 2023-09-14 17:10:05 +08:00 committed by GitHub
commit cfe89a55fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 193 additions and 20 deletions

View File

@ -49,6 +49,9 @@ spec:
travelling: true travelling: true
article: true article: true
darkMode: true darkMode: true
navLogin: false
console:
consoleEnable: true
children: children:
- $formkit: radio - $formkit: radio
name: travelling name: travelling
@ -78,15 +81,21 @@ spec:
value: true value: true
- label: 隐藏 - label: 隐藏
value: false value: false
- $formkit: radio
name: navLogin
label: 登入按钮
help: 右上角登入按钮
options:
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: group - $formkit: group
name: console name: console
label: 中控台 label: 中控台
value:
consoleLink: false
children: children:
- $formkit: radio - $formkit: radio
name: consoleLink name: consoleEnable
label: 前往控制台
options: options:
- label: 显示 - label: 显示
value: true value: true
@ -184,6 +193,28 @@ spec:
value: true value: true
- label: 隐藏 - label: 隐藏
value: false value: false
- $formkit: group
name: climb
label: 宠物挂件
help: 需要瞬间丶顶部 Banner显示
value:
climbEnable: true
climbImg: https://imgapi.yyds.pink/random?sort=animals
children:
- $formkit: radio
name: climbEnable
key: climbEnable
id: climbEnable
options:
- label: 显示
value: true
- label: 隐藏
value: false
- $formkit: url
name: climbImg
if: $get(climbEnable).value
label: 图片
help: 随机图地址https://imgapi.yyds.pink/random?sort=animals
- $formkit: radio - $formkit: radio
name: recentTop name: recentTop
id: recentTop id: recentTop
@ -718,7 +749,7 @@ spec:
- $formkit: group - $formkit: group
name: music name: music
label: 音乐卡片 label: 音乐卡片
help: 文档请看https://github.com/zonemeen/netease-recent-profile help: 文档请看https://githubfast.com/zonemeen/netease-recent-profile
value: value:
musicUrl: musicUrl:
lightMsimg: lightMsimg:
@ -753,7 +784,7 @@ spec:
- $formkit: group - $formkit: group
name: steam name: steam
label: Steam卡片 label: Steam卡片
help: 文档请看https://github.com/yuyinws/steam-card help: 文档请看https://githubfast.com/yuyinws/steam-card
value: value:
steamUrl: steamUrl:
cardSteam: cardSteam:
@ -1461,7 +1492,7 @@ spec:
- $formkit: url - $formkit: url
name: buttonUrl name: buttonUrl
validation: url validation: url
value: https://github.com/halo-sigs/plugin-moments value: https://githubfast.com/halo-sigs/plugin-moments
label: 按钮跳转连链接 label: 按钮跳转连链接
placeholder: 请输入跳转 url placeholder: 请输入跳转 url
@ -1526,7 +1557,7 @@ spec:
- $formkit: url - $formkit: url
name: buttonUrl name: buttonUrl
validation: url validation: url
value: https://github.com/Rock-Candy-Tea/hexo-circle-of-friends value: https://githubfast.com/Rock-Candy-Tea/hexo-circle-of-friends
label: 按钮跳转连链接 label: 按钮跳转连链接
placeholder: 请输入跳转 url placeholder: 请输入跳转 url
- $formkit: url - $formkit: url

View File

@ -586,9 +586,11 @@ function checkUrlAndAddHideBanner() {
var e = window.location.href; var e = window.location.href;
if (/\/page\//.test(e)) { if (/\/page\//.test(e)) {
var t = document.getElementById("recent-top-post-group") var t = document.getElementById("recent-top-post-group")
, o = document.getElementById("bbTimeList"); , o = document.getElementById("bbTimeList")
, c = document.getElementById("climb");
t && (t.classList.add("more-page"), t && (t.classList.add("more-page"),
o && o.classList.add("more-page")); o && o.classList.add("more-page"),
c && c.classList.add("more-page"));
} }
} }

View File

@ -5023,7 +5023,7 @@ html {
height: 100%; height: 100%;
align-items: center; align-items: center;
margin-right: 1.5rem; margin-right: 1.5rem;
overflow: hidden; /*overflow: hidden;*/
} }
#page-header #nav #nav-left { #page-header #nav #nav-left {
@ -5065,6 +5065,7 @@ html {
#page-header #nav #nav-left div { #page-header #nav #nav-left div {
margin-left: 0.5rem; margin-left: 0.5rem;
padding: 0; padding: 0;
position: relative;
} }
@ -5271,6 +5272,106 @@ html {
right: 0; right: 0;
} }
/* 登入按钮 */
#page-header #nav #nav-right div .back-menu-list-groups{
position: absolute;
right: 0;
left: auto;
top: 34px;
}
#page-header #nav #nav-right .console-button .nav-login{
width: 35px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 40px;
margin-top: 4.8px;
}
#page-header.not-top-img #nav .nav-login {
color: var(--heo-fontcolor);
text-shadow: none;
}
.console-button{
cursor: pointer;
}
.console-button .back-menu-list-groups .back-menu-list {
display: flex;
flex-direction: row;
flex-wrap: wrap;
width: 140px;
justify-content: space-between;
}
.console-button .back-menu-list-group {
display: flex;
flex-direction: column;
}
.console-button .back-menu-list-groups {
position: absolute;
top: 45px;
transform: scale(.8);
transform-origin: top left;
left: 1.8rem;
background-color: var(--heo-maskbgdeep);
border-radius: 7.8px;
/* border: var(--style-border); */
flex-direction: column;
font-size: 12px;
color: var(--heo-secondtext);
box-shadow: var(--heo-shadow-border);
transition: .1s;
opacity: 0;
pointer-events: none;
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px)
}
.console-button .back-menu-list-groups:hover {
/* border: var(--style-border-hover); */
}
.console-button .back-menu-list-group .back-menu-list-title {
margin: 8px 0 0 16px;
transition: 0.3s;
}
.console-button .back-menu-list-group:hover .back-menu-list-title {
color: var(--heo-main);
}
.console-button:hover .back-menu-list-groups {
display: flex;
opacity: 1;
transition: 0.3s;
top: 50px;
pointer-events: auto;
left: 1.8rem;
transform: scale(1);
}
.console-button .back-menu-list .back-menu-item {
width: 140px;
}
@media screen and (max-width: 768px) {
.console-button .back-menu-list-groups {
left: 0;
}
.console-button:hover .back-menu-list-groups {
padding-bottom: 8px;
box-shadow: var(--heo-shadow-border);
left: 0;
}
}
/* 导航栏图标 */ /* 导航栏图标 */
#nav #site-name i { #nav #site-name i {
font-size: 50px; font-size: 50px;
@ -8374,6 +8475,23 @@ li {
color: var(--heo-theme); color: var(--heo-theme);
} }
/*宠物挂件*/
.climb {
display: block;
position: absolute;
max-width: 270px;
z-index: 1;
margin-top: -26.6px;
margin-left: 5px;
cursor: pointer
}
@media screen and (max-width: 1200px) {
.climb {
display:none!important
}
}
/* 文章卡片相关 */ /* 文章卡片相关 */
#recent-posts > .recent-post-item > .recent-post-info { #recent-posts > .recent-post-item > .recent-post-info {
padding: 0; padding: 0;
@ -8918,7 +9036,7 @@ ins.adsbygoogle {
margin-bottom: 0rem; margin-bottom: 0rem;
} }
.recent-top-post-group.more-page { .recent-top-post-group.more-page,.climb.more-page {
display: none; display: none;
} }

View File

@ -31,6 +31,9 @@
</div> </div>
<i class="bber-gotobb haofont hao-icon-circle-arrow-right" onclick="location.href='/moments'" title="查看全文"></i> <i class="bber-gotobb haofont hao-icon-circle-arrow-right" onclick="location.href='/moments'" title="查看全文"></i>
</th:block> </th:block>
<img th:if="${theme.config.top.climb.climbEnable && theme.config.top.recentTop} " class="climb" id="climb"
th:src="${isLazyload ? loadingImg : theme.config.top.climb.climbImg}"
th:data-lazy-src="${ isLazyload ? theme.config.top.climb.climbImg : ''}">
</div> </div>
</html> </html>

View File

@ -134,11 +134,6 @@
<i class="haofont hao-icon-music"></i> <i class="haofont hao-icon-music"></i>
</a> </a>
</div> </div>
<div th:if="${theme.config.nav.right.console.consoleLink}" class="console-btn-item" id="consoleLink2Console" title="前往控制台">
<a class="console-link" data-pjax-state="" href="/console">
<i class="haofont hao-icon-dashboard"></i>
</a>
</div>
</div> </div>
<div class="console-mask" href="javascript:void(0);" onclick="heo.hideConsole()" rel="external nofollow"> <div class="console-mask" href="javascript:void(0);" onclick="heo.hideConsole()" rel="external nofollow">
</div> </div>

View File

@ -36,9 +36,33 @@
</a> </a>
</div> </div>
<div class="nav-button" id="nav-console"> <div th:if="${theme.config.nav.right.navLogin}" class="console-button" tabindex="-1"
<a class="console_switchbutton" href="javascript:void(0);" th:with="currentUser = ${contributorFinder.getContributor(#authentication.name)}">
onclick="heo.showConsole()" rel="external nofollow" title="显示中控台"> <span class="site-page nav-login">
<i sec:authorize="isAnonymous()" class="haofont hao-icon-zhanghao1 " style="font-size: 1rem;font-weight: 700;"></i>
<img sec:authorize="isAuthenticated()" th:src="${currentUser.avatar ?: #theme.assets('/images/none.png')}"
th:alt="${currentUser.displayName}"
style=" width: 24px; height: 24px; border-radius: 9999px" />
</span>
<div class="back-menu-list-groups">
<div class="back-menu-list-group" style="margin: -4px -9px -4px -18px">
<div class="back-menu-list">
<a sec:authorize="isAuthenticated()" class="back-menu-item" rel="external nofollow" target="_blank" href="/console">
<span class="back-menu-item-text">控制台</span>
</a>
<!-- <a sec:authorize="isAuthenticated()" class="back-menu-item" rel="external nofollow" href="/logout">
<span class="back-menu-item-text">退出登录</span>
</a> -->
<a sec:authorize="isAnonymous()" class="back-menu-item" rel="external nofollow" target="_blank" href="/console/login">
<span class="back-menu-item-text">登录</span>
</a>
</div>
</div>
</div>
</div>
<div th:if="${theme.config.nav.right.console.consoleEnable}" class="nav-button" id="nav-console">
<a class="console_switchbutton" href="javascript:void(0);" onclick="heo.showConsole()" rel="external nofollow"
title="显示中控台">
<i class="haofont hao-icon-dashboard" style="font-size: 1.12rem;"></i> <i class="haofont hao-icon-dashboard" style="font-size: 1.12rem;"></i>
</a> </a>
</div> </div>