mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-15 20:09:41 +08:00
commit
158cdef738
8
package-lock.json
generated
8
package-lock.json
generated
@ -11,7 +11,7 @@
|
||||
"dependencies": {
|
||||
"html2canvas": "^1.4.1",
|
||||
"qrcode": "^1.5.1",
|
||||
"remixicon": "^4.3.0"
|
||||
"remixicon": "^4.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.15.5",
|
||||
@ -7377,9 +7377,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/remixicon": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/remixicon/-/remixicon-4.3.0.tgz",
|
||||
"integrity": "sha512-jRYQ37dTFSkJtvcxwTUAkIiXkYRvA9EDvVuXPNrmt2xf/VS//CRgFtsX2TAFBoQOhh9SDh7l6La4Xu12snEyxg=="
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/remixicon/-/remixicon-4.5.0.tgz",
|
||||
"integrity": "sha512-IP/wNQGG3JCigaeFF3DERSTqMIZBlNu1yu8clNGB7wFe7ZN/ueKMplFHL5uEbnGpCzqfY6MlxIYn2vRzub+5cQ=="
|
||||
},
|
||||
"node_modules/remove-bom-buffer": {
|
||||
"version": "3.0.0",
|
||||
|
@ -54,6 +54,6 @@
|
||||
"dependencies": {
|
||||
"html2canvas": "^1.4.1",
|
||||
"qrcode": "^1.5.1",
|
||||
"remixicon": "^4.3.0"
|
||||
"remixicon": "^4.5.0"
|
||||
}
|
||||
}
|
||||
|
606
settings.yaml
606
settings.yaml
File diff suppressed because it is too large
Load Diff
@ -37,7 +37,7 @@ lit-toast-container, halo-contact-form-toast-container {
|
||||
}
|
||||
|
||||
.qmsg.qmsg-wrapper {
|
||||
color: #333 !important;
|
||||
color: #333 !important;
|
||||
top: 60px !important;
|
||||
}
|
||||
|
||||
@ -4136,17 +4136,11 @@ button.swiper-pagination-bullet {
|
||||
}
|
||||
|
||||
.navbar-console {
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
background: transparent !important;
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
& > i {
|
||||
font-size: 23px;
|
||||
color: var(--main);
|
||||
}
|
||||
.navbar-logon {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4183,9 +4177,6 @@ button.swiper-pagination-bullet {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.navbar-console {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.swiper-button-prev,
|
||||
@ -5316,3 +5307,85 @@ button.swiper-pagination-bullet {
|
||||
.search-page-title {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
//登录组件
|
||||
.navbar-logon {
|
||||
margin-left: 5px;
|
||||
|
||||
&-head {
|
||||
|
||||
& > img {
|
||||
border-radius: 50%;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
&-group {
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
width: auto;
|
||||
min-width: 8rem;
|
||||
right: -6.8rem;
|
||||
top: 60px;
|
||||
z-index: 5;
|
||||
opacity: 0;
|
||||
border-top: 3px solid var(--theme);
|
||||
transform-origin: top;
|
||||
background: var(--bg-d);
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, .15);
|
||||
border-radius: 0 0 var(--radius-inner) var(--radius-inner);
|
||||
padding: 10px 0;
|
||||
transform: translateX(-50%) perspective(600px) rotateX(-45deg);
|
||||
transition: opacity .35s, visibility .35s, transform .35s, -webkit-transform .35s;
|
||||
|
||||
&-menu {
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
line-height: 2rem;
|
||||
|
||||
& > a {
|
||||
color: var(--title);
|
||||
font-size: 15px;
|
||||
width: 100%;
|
||||
display: block;
|
||||
|
||||
i {
|
||||
color: var(--title);
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 7px solid transparent;
|
||||
border-right: 7px solid transparent;
|
||||
border-bottom: 7px solid var(--theme);
|
||||
}
|
||||
}
|
||||
|
||||
&.active {
|
||||
.navbar-logon-group {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
transform: translateX(-50%) perspective(600px) rotateX(0);
|
||||
}
|
||||
|
||||
.navbar-logon-group-menu:hover {
|
||||
background: var(--bg-a);
|
||||
|
||||
a, i {
|
||||
color: var(--theme);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -143,6 +143,25 @@ const commonContext = {
|
||||
}
|
||||
})
|
||||
},
|
||||
/* 激活登录窗口下拉框功能 */
|
||||
initLogonMenu() {
|
||||
$('.navbar-logon').each(function (index, item) {
|
||||
const trigger = $(item).attr('trigger') || 'click'
|
||||
if (trigger === 'hover') {
|
||||
$(this).hover(
|
||||
() => $(this).addClass('active'),
|
||||
() => $(this).removeClass('active')
|
||||
)
|
||||
} else {
|
||||
$(this).on('click', function (e) {
|
||||
e.stopPropagation()
|
||||
$(this).toggleClass('active')
|
||||
$(document).one('click', () => $(this).removeClass('active'))
|
||||
e.stopPropagation()
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/* 处理滚动 */
|
||||
initScroll() {
|
||||
window.initTop = 0
|
||||
|
2
templates/assets/css/style.min.css
vendored
2
templates/assets/css/style.min.css
vendored
File diff suppressed because one or more lines are too long
2
templates/assets/js/common.min.js
vendored
2
templates/assets/js/common.min.js
vendored
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 2.4 MiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
templates/assets/lib/remixicon@4.5.0/remixicon.eot
Normal file
BIN
templates/assets/lib/remixicon@4.5.0/remixicon.eot
Normal file
Binary file not shown.
1
templates/assets/lib/remixicon@4.5.0/remixicon.min.css
vendored
Normal file
1
templates/assets/lib/remixicon@4.5.0/remixicon.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
9082
templates/assets/lib/remixicon@4.5.0/remixicon.svg
Normal file
9082
templates/assets/lib/remixicon@4.5.0/remixicon.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 2.6 MiB |
BIN
templates/assets/lib/remixicon@4.5.0/remixicon.ttf
Normal file
BIN
templates/assets/lib/remixicon@4.5.0/remixicon.ttf
Normal file
Binary file not shown.
BIN
templates/assets/lib/remixicon@4.5.0/remixicon.woff
Normal file
BIN
templates/assets/lib/remixicon@4.5.0/remixicon.woff
Normal file
Binary file not shown.
BIN
templates/assets/lib/remixicon@4.5.0/remixicon.woff2
Normal file
BIN
templates/assets/lib/remixicon@4.5.0/remixicon.woff2
Normal file
Binary file not shown.
@ -21,7 +21,7 @@
|
||||
th:src="${#theme.assets('/img/ba.webp')}" height="auto" width="auto" alt="备案" style="vertical-align: text-top; width: 1.2em; margin-right: 4px;"/>[[${theme.config.basic_info.record_number}]]</a>
|
||||
<a th:if="${!#strings.isEmpty(theme.config.basic_info.record_number_ps)}" class="record footer-truncation" th:href="'https://beian.mps.gov.cn/#/query/webSearch?code=' + ${theme.config.basic_info.record_number_ps.replaceAll('[^\d]', '')}" target="_blank" rel="noopener noreferrer nofollow"><img
|
||||
th:src="${#theme.assets('/img/ga.webp')}" height="auto" width="auto" alt="公网安备" style="vertical-align: text-top; width: 1.2em; margin-right: 4px;"/>[[${theme.config.basic_info.record_number_ps}]]</a></p>
|
||||
<p th:if="${!#strings.isEmpty(theme.config.basic_info.custom_text)}">[[${theme.config.basic_info.custom_text}]]</p>
|
||||
<p th:if="${!#strings.isEmpty(theme.config.basic_info.custom_text)}" th:utext="${theme.config.basic_info.custom_text}"></p>
|
||||
<p class="icon-spot" th:if="${!#strings.isEmpty(theme.config.basic_info.website_time) || theme.config.enhance.enable_busuanzi == true}">
|
||||
<span th:if="${!#strings.isEmpty(theme.config.basic_info.website_time)}" id="websiteDate">建站<span class="stand">00</span>天<span class="stand">0</span>时<span class="stand">0</span>分<span class="stand">0</span>秒</span>
|
||||
<span th:if="${theme.config.enhance.busuanzi_group.enable_busuanzi == true}" class="icon-spot footer-truncation">
|
||||
|
@ -25,7 +25,7 @@ th:with="description=${isPost ? post != null ? post.status.excerpt : singlePage
|
||||
<link rel="canonical" th:href="${#strings.isEmpty(canonical) ? '' : #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/lib/remixicon@4.3.0/remixicon.min.css}">
|
||||
<link rel="preload stylesheet" as="style" th:href="@{/assets/lib/remixicon@4.5.0/remixicon.min.css}">
|
||||
<link rel="preload stylesheet" as="style" th:href="@{/assets/css/style.min.css(mew=${theme.spec.version})}">
|
||||
<link th:if="${theme.config.basic_style.theme_style == 'celebration'}" rel="preload stylesheet" as="style" th:href="@{/assets/css/celebration.min.css(mew=${theme.spec.version})}">
|
||||
|
||||
|
@ -2,7 +2,8 @@
|
||||
th:class="${theme.config.basic_style.theme_style}"
|
||||
th:fragment="layout (title, canonical, content, isPost)">
|
||||
<th:block th:with="contributor = ${contributorFinder.getContributor(theme.config.basic_info.metadata_name)},
|
||||
enableComment = ${baseEnableComment == true && site.comment.enable}">
|
||||
enableComment = ${baseEnableComment == true && site.comment.enable},
|
||||
logonUserName = ${#authentication.name != 'anonymousUser' ? #authentication.name : ''}">
|
||||
|
||||
<th:block th:with="stats = ${siteStatsFinder.getStats()}">
|
||||
<th:block th:replace="~{common/head :: head}"/>
|
||||
|
@ -1,4 +1,5 @@
|
||||
<header class="navbar" th:classappend="${!theme.config.basic_info.header_fixed}? 'animation' : 'fixed'" xmlns:th="https://www.thymeleaf.org">
|
||||
<header class="navbar" th:classappend="${!theme.config.basic_info.header_fixed}? 'animation' : 'fixed'"
|
||||
xmlns:th="https://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
|
||||
<div class="navbar-above" th:classappend="${!theme.config.basic_info.header_fixed}? 'animation'">
|
||||
<div th:class="${theme.config.basic_style.sidebar_column != 'all' ? 'container two-column' : 'container' }">
|
||||
<i class="ri-list-unordered navbar-slideicon"></i>
|
||||
@ -69,10 +70,32 @@
|
||||
</div>
|
||||
<i th:unless="${theme.config.page_config.search.search_enable}" class="ri-search-line navbar-searchicon" onclick="javascript:SearchWidget.open();"></i>
|
||||
<a th:if="${theme.config.page_config.search.search_enable}" class="navbar-searchicon" target="_self" href="/search"><i class="ri-search-line navbar-searchicon"></i></a>
|
||||
<a data-not-pjax th:if="${theme.config.basic_style.console.show_console}" class="navbar-console" th:href="@{${theme.config.basic_style.console.console_url}}" th:target="${theme.config.basic_style.console.console_target}"
|
||||
<a data-not-pjax th:if="${theme.config.basic_style.show_console == 'console'}" class="navbar-console" th:href="${!#strings.isEmpty(logonUserName) ? theme.config.basic_style.console.console_logon_url : theme.config.basic_style.console.console_url}"
|
||||
th:target="${!#strings.isEmpty(logonUserName) ? theme.config.basic_style.console.console_logon_target : theme.config.basic_style.console.console_target}"
|
||||
th:title="${theme.config.basic_style.console.console_title}">
|
||||
<i th:class="${#strings.defaultString(theme.config.basic_style.console.console_icon, 'ri-equalizer-line')}"></i>
|
||||
</a>
|
||||
<div th:if="${theme.config.basic_style.show_console == 'logon'}" class="navbar-logon" trigger="hover" th:with="currentUser = ${contributorFinder.getContributor(#authentication.name)}">
|
||||
<div class="navbar-logon-head">
|
||||
<img th:src="${currentUser.avatar ?: #theme.assets('/img/avatar.svg')}"
|
||||
th:alt="${currentUser.displayName}"
|
||||
/>
|
||||
</div>
|
||||
<ul class="navbar-logon-group">
|
||||
<li sec:authorize="isAuthenticated()" class="navbar-logon-group-menu">
|
||||
<a href="/uc" target="_blank"><i th:if="${!#strings.isEmpty(theme.config.basic_style.logon.console_person_class)}" th:class="${theme.config.basic_style.logon.console_person_class}"></i> 个人中心</a>
|
||||
</li>
|
||||
<li sec:authorize="isAuthenticated()" class="navbar-logon-group-menu">
|
||||
<a href="/console" target="_blank"><i th:if="${!#strings.isEmpty(theme.config.basic_style.logon.console_manage_class)}" th:class="${theme.config.basic_style.logon.console_manage_class}"></i> 后台管理</a>
|
||||
</li>
|
||||
<li sec:authorize="isAuthenticated()" class="navbar-logon-group-menu">
|
||||
<a href="/logout"><i th:if="${!#strings.isEmpty(theme.config.basic_style.logon.console_logout_class)}" th:class="${theme.config.basic_style.logon.console_logout_class}"></i> 退出登录</a>
|
||||
</li>
|
||||
<li sec:authorize="isAnonymous()" class="navbar-logon-group-menu">
|
||||
<a href="/login" onclick="this.href = '/login?redirect_uri=' + encodeURIComponent(window.location.href)"><i th:if="${!#strings.isEmpty(theme.config.basic_style.logon.console_login_class)}" th:class="${theme.config.basic_style.logon.console_login_class}"></i> 登录</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -18,27 +18,27 @@
|
||||
<nav class="level" th:if="${!#lists.isEmpty(theme.config.sidebar.custom_stats)}">
|
||||
<div th:each="item,sindex :${theme.config.sidebar.custom_stats}" class="level-item" th:switch="${item.type}">
|
||||
<div th:case="visit" th:with="visit = ${stats.visit}">
|
||||
<p class="heading" th:text="|访问${visit / 10000000 > 0 ? '(KW)' : (visit / 10000 > 0 ? '(W)' : '')}|"></p>
|
||||
<p class="heading" th:text="|访问${visit / 10000000 > 0 ? '(千万)' : (visit / 10000 > 0 ? '(万)' : '')}|"></p>
|
||||
<p class="value" th:title="${visit / 10000 > 0} ? ${visit}" th:text="${visit / 10000000 > 0} ? (${#numbers.formatDecimal(visit / 10000000.0,1,1)}) : (${visit / 10000 > 0} ? (${#numbers.formatDecimal(visit / 10000.0,1,1)}) : ${visit})"></p>
|
||||
</div>
|
||||
<div th:case="upvote" th:with="upvote = ${stats.upvote}">
|
||||
<p class="heading" th:text="|点赞${upvote / 10000000 > 0 ? '(KW)' : (upvote / 10000 > 0 ? '(W)' : '')}|"></p>
|
||||
<p class="heading" th:text="|点赞${upvote / 10000000 > 0 ? '(千万)' : (upvote / 10000 > 0 ? '(万)' : '')}|"></p>
|
||||
<p class="value" th:title="${upvote / 10000 > 0} ? ${upvote}" th:text="${upvote / 10000000 > 0} ? (${#numbers.formatDecimal(upvote / 10000000.0,1,1)}) : (${upvote / 10000 > 0} ? (${#numbers.formatDecimal(upvote / 10000.0,1,1)}) : ${upvote})"></p>
|
||||
</div>
|
||||
<div th:case="comment" th:with="comment = ${stats.comment}">
|
||||
<p class="heading" th:text="|评论${comment / 10000000 > 0 ? '(KW)' : (comment / 10000 > 0 ? '(W)' : '')}|"></p>
|
||||
<p class="heading" th:text="|评论${comment / 10000000 > 0 ? '(千万)' : (comment / 10000 > 0 ? '(万)' : '')}|"></p>
|
||||
<p class="value" th:title="${comment / 10000 > 0} ? ${comment}" th:text="${comment / 10000000 > 0} ? (${#numbers.formatDecimal(comment / 10000000.0,1,1)}) : (${comment / 10000 > 0} ? (${#numbers.formatDecimal(comment / 10000.0,1,1)}) : ${comment})"></p>
|
||||
</div>
|
||||
<div th:case="category" th:with="category = ${stats.category}">
|
||||
<p class="heading" th:text="|分类${category / 10000000 > 0 ? '(KW)' : (category / 10000 > 0 ? '(W)' : '')}|"></p>
|
||||
<p class="heading" th:text="|分类${category / 10000000 > 0 ? '(千万)' : (category / 10000 > 0 ? '(万)' : '')}|"></p>
|
||||
<p class="value" th:title="${category / 10000 > 0} ? ${category}" th:text="${category / 10000000 > 0} ? (${#numbers.formatDecimal(category / 10000000.0,1,1)}) : (${category / 10000 > 0} ? (${#numbers.formatDecimal(category / 10000.0,1,1)}) : ${category})"></p>
|
||||
</div>
|
||||
<div th:case="tag" th:with="tagsList = ${tagFinder.listAll()}, tags = ${#lists.size(tagsList)}">
|
||||
<p class="heading" th:text="|标签${tags / 10000000 > 0 ? '(KW)' : (tags / 10000 > 0 ? '(W)' : '')}|"></p>
|
||||
<p class="heading" th:text="|标签${tags / 10000000 > 0 ? '(千万)' : (tags / 10000 > 0 ? '(万)' : '')}|"></p>
|
||||
<p class="value" th:title="${tags / 10000 > 0} ? ${tags}" th:text="${tags / 10000000 > 0} ? (${#numbers.formatDecimal(tags / 10000000.0,1,1)}) : (${tags / 10000 > 0} ? (${#numbers.formatDecimal(tags / 10000.0,1,1)}) : ${tags})"></p>
|
||||
</div>
|
||||
<div th:case="post" th:with="post = ${stats.post}">
|
||||
<p class="heading" th:text="|文章${post / 10000000 > 0 ? '(KW)' : (post / 10000 > 0 ? '(W)' : '')}|"></p>
|
||||
<div th:case="*" th:with="post = ${stats.post}">
|
||||
<p class="heading" th:text="|文章${post / 10000000 > 0 ? '(千万)' : (post / 10000 > 0 ? '(万)' : '')}|"></p>
|
||||
<p class="value" th:title="${post / 10000 > 0} ? ${post}" th:text="${post / 10000000 > 0} ? (${#numbers.formatDecimal(post / 10000000.0,1,1)}) : (${post / 10000 > 0} ? (${#numbers.formatDecimal(post / 10000.0,1,1)}) : ${post})"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,7 +1,10 @@
|
||||
<div xmlns:th="https://www.thymeleaf.org"
|
||||
th:fragment="widget (sidebar)"
|
||||
th:class="'card widget recent-posts ' + ${sidebar.hide}"
|
||||
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)},
|
||||
sortCondition = ${theme.config.sidebar.recent_posts_pinned ? {'spec.pinned,desc', 'spec.publishTime,desc', 'metadata.creationTimestamp,desc'} : {'spec.publishTime,desc', 'metadata.creationTimestamp,desc'}},
|
||||
posts = ${postFinder.list({page: 1, size: num, sort: sortCondition})},
|
||||
isEmpty = ${#lists.isEmpty(posts)}">
|
||||
<div class="card-title">
|
||||
<i th:class="${#strings.defaultString(sidebar.icon, 'ri-history-line') + ' card-title-label'}"></i><span th:text="${#strings.defaultString(sidebar.title, '最新文章')}"></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>
|
||||
|
@ -30,7 +30,7 @@ spec:
|
||||
settingName: theme-dream2-plus-setting
|
||||
configMapName: theme-dream2-plus-configMap
|
||||
# 版本号
|
||||
version: 1.3.1
|
||||
version: 1.3.2.beta8
|
||||
# 最低支持的 Halo 版本
|
||||
require: ">=2.20.0"
|
||||
# 许可
|
||||
|
Loading…
x
Reference in New Issue
Block a user