Merge pull request #522 from chengzhongxue/main

优化标签,分类,首页 文章布局
This commit is contained in:
困困鱼 2023-10-18 00:14:01 +08:00 committed by GitHub
commit fd405f1209
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 530 additions and 308 deletions

View File

@ -100,6 +100,7 @@
- 追番插件 [plugin-bilibili-bangumi](https://githubfast.com/Roozenlz/plugin-bilibili-bangumi)
- 图库插件 [plugin-photos](https://githubfast.com/halo-sigs/plugin-photos)
- 主题标签 [plugin-haotag](https://githubfast.com/chengzhongxue/plugin-haotag)
- 我的装备 [plugin-equipments](https://githubfast.com/chengzhongxue/plugin-equipments)
> 更多插件请参见https://githubfast.com/halo-sigs/awesome-halo

View File

@ -1,6 +1,6 @@
{
"name": "halo-theme-hao",
"version": "1.3.9",
"version": "1.4.0",
"dependencies": {
}
}

View File

@ -17,7 +17,7 @@
<main class="layout" id="content-inner">
<!-- archive -->
<div id="archive">
<div class="article-sort-title">文章 - [[${siteStatsFinder.getStats().post}]]</div>
<div class="article-sort-title">文章<sup>[[${siteStatsFinder.getStats().post}]]</sup></div>
<div class="article-sort" th:each="archive : ${archives.items}"
th:with='postRandomImg=${#strings.contains(theme.config.layout.postRandomImg,"?") ? theme.config.layout.postRandomImg+"&" : theme.config.layout.postRandomImg+"?"}'>
<div class="article-sort-item year" th:text="${archive.year}"></div>

View File

@ -65,7 +65,7 @@
padding: 0 1rem;
width: 100%;
}
.is-center {
.relatedPosts>.relatedPosts-list .is-center {
text-align: center;
display: flex;
flex-wrap: wrap;

View File

@ -72,6 +72,36 @@ var heo = {
$("#cookies-window").hide())
},
tagPageActive: function() {
var e = window.location.pathname;
if (/\/tags\/.*?/.test(e = decodeURIComponent(e))) {
var t = e.split("/")[2];
if (document.querySelector("#tag-page-tags")) {
$("a").removeClass("select");
var o = document.getElementById(t);
o && (o.classList.add("select"),
o.style.order = "-1")
}
}
},
categoriesBarActive: function() {
document.querySelector("#category-bar") && $(".category-bar-item").removeClass("select");
var e = window.location.pathname;
if ("/" == (e = decodeURIComponent(e)))
document.querySelector("#category-bar") && document.getElementById("category-bar-home").classList.add("select");
else {
if (/\/categories\/.*?/.test(e)) {
var t = e.split("/")[2];
if (document.querySelector("#category-bar")) {
var o = document.getElementById(t);
o && (o.classList.add("select"),
o.style.order = "-1")
}
}
}
},
// 页脚友链
addFriendLinksInFooter: function () {
var footerRandomFriendsBtn = document.getElementById("footer-random-friends-btn");
@ -449,9 +479,15 @@ var heo = {
$htmlDom.contains("hide-aside") ? document.querySelector("#consoleHideAside").classList.add("on") : document.querySelector("#consoleHideAside").classList.remove("on")
},
toPage: function() {
var e, t = document.querySelectorAll(".page-number"), o = parseInt(t[t.length - 1].innerHTML), n = document.getElementById("toPageText"), a = parseInt(n.value);
!isNaN(a) && a > 0 && "0" !== ("" + a)[0] && a <= o && (e = 1 === a ? "/" : "/page/" + a,
document.getElementById("toPageButton").href = e)
var e = document.querySelectorAll(".page-number")
, t = parseInt(e[e.length - 1].innerHTML)
, o = document.getElementById("toPageText")
, n = parseInt(o.value);
if (!isNaN(n) && n > 0 && "0" !== ("" + n)[0] && n <= t) {
var a, l = window.location.href.replace(/\/page\/\d$/, "");
a = 1 === n ? l : l + (l.endsWith("/") ? "" : "/") + "page/" + n,
document.getElementById("toPageButton").href = a
}
},
changeSayHelloText: function() {
const greetings = GLOBAL_CONFIG.helloText.length == 0 ? ["🤖️ 数码科技爱好者", "🔍 分享与热心帮助", "🏠 智能家居小能手", "🔨 设计开发一条龙", "🤝 专修交互与设计", "🏃 脚踏实地行动派", "🧱 团队小组发动机", "💢 壮汉人狠话不多"] : GLOBAL_CONFIG.helloText

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -590,10 +590,12 @@ function initBlog() {
heo.initIndexEssay(),
heo.reflashEssayWaterFall(),
heo.darkModeStatus(),
heo.categoriesBarActive(),
heo.initThemeColor(),
heo.topCategoriesBarScroll(),
//隐藏加载动画
GLOBAL_CONFIG.loadingBox && heo.hideLoading(),
heo.tagPageActive(),
initObserver(),
checkUrlAndAddHideBanner()

View File

@ -64,13 +64,20 @@
}
.comment-barrage-item .comment-barrage-close:hover {
color: var(--heo-main);
color: var(--heo-lighttext);
}
.comment-barrage-item .comment-barrage-close .heofont {
.comment-barrage-item .comment-barrage-close .haofont {
color: var(--heo-fontcolor);
transition: all 0.3s ease 0s;
font-size: 18px !important;
}
.comment-barrage-item .comment-barrage-close:hover .haofont {
color: var(--heo-lighttext);
}
.comment-barrage-item pre {
display: none;
}

View File

@ -85,7 +85,6 @@ i.haofont.hao-icon-arrow-right.banner-righticon{
display: -moz-box;
display: -webkit-flex;
display: -ms-flexbox;
display: box;
display: flex;
-webkit-box-align: center;
-moz-box-align: center;
@ -98,7 +97,9 @@ i.haofont.hao-icon-arrow-right.banner-righticon{
-o-box-lines: single;
-webkit-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap
flex-wrap: nowrap;
border-radius: 12px;
}
.card-widget.card-friend-link a.card-friend-item:hover {
@ -157,6 +158,10 @@ i.haofont.hao-icon-arrow-right.banner-righticon{
align-items: flex-start
}
.card-widget.card-friend-link a.card-friend-item:hover .card-friend-name {
color: var(--heo-card-bg) !important;
}
.card-widget.card-friend-link .card-friend-name {
color: var(--card-friend-name-color)
}

View File

@ -1227,11 +1227,6 @@ blockquote footer cite::before {
-webkit-line-clamp: 2;
}
.article-sort-item-title:hover {
color: rgb(48, 122, 246);
transform: translateX(10px);
}
.article-sort-item-img {
overflow: hidden;
width: 80px;
@ -1604,10 +1599,6 @@ blockquote footer cite::before {
color: rgb(255, 87, 34);
}
#recent-posts > .recent-post-item:not(:first-child) {
margin-top: 1rem;
}
#recent-posts > .recent-post-item {
display: flex;
-webkit-box-orient: horizontal;
@ -1635,14 +1626,6 @@ blockquote footer cite::before {
transform: scale(1.1);
}
#recent-posts > .recent-post-item .left_radius {
border-radius: 5px 0px 0px 8px;
}
#recent-posts > .recent-post-item .right_radius {
border-radius: 5px 0px 0px 8px;
}
#recent-posts > .recent-post-item.ads-wrap {
display: block !important;
height: auto !important;
@ -1662,6 +1645,12 @@ blockquote footer cite::before {
object-fit: cover;
}
#recent-posts>.recent-post-item.col1.alternate .left_radius, #recent-posts>.recent-post-item.col1.alternate .right_radius {
width:75%;
display: flex;
height: 220px
}
#recent-posts > .recent-post-item .post_cover img.post_bg:hover {
transform: scale(1.1);
}
@ -2038,7 +2027,6 @@ blockquote footer cite::before {
background-color: rgb(255, 255, 255);
cursor: pointer;
border-radius: 5px;
transform: scale(1.1);
color: rgb(48, 122, 246) !important;
}
@ -2779,12 +2767,6 @@ blockquote footer cite::before {
text-shadow: none;
}
#page-header.nav-fixed #nav #site-name:hover,
#page-header.nav-fixed #nav #toggle-menu:hover,
#page-header.nav-fixed #nav a:hover {
color: rgb(48, 122, 246);
}
#page-header.nav-visible #nav {
transition: all 0.5s ease 0s;
transform: translate3d(0px, 100%, 0px);
@ -4792,6 +4774,10 @@ html {
padding: 0.3rem 0.5rem;
}
.page #nav .menus_items .menus_item .menus_item_child > .recursion_menus_item:hover > a{
color: var(--heo-card-bg) !important;
}
#nav .menus_items .menus_item .menus_item_child > .recursion_menus_item a i:not(.fa-brands) {
font-size: 1rem;
margin-right: 8px;
@ -5175,6 +5161,9 @@ html {
color: var(--heo-white);
transition: 0.3s;
}
.page #nav-totop:hover .totopbtn i {
color: var(--heo-card-bg);
}
#nav-totop #percent {
font-size: 12px;
@ -5373,13 +5362,19 @@ html {
color: var(--heo-fontcolor);
}
#page-header.not-top-img #nav .back-home-button {
color: var(--heo-fontcolor);
}
.back-home-button:hover {
background: var(--heo-main);
color: var(--heo-white) !important;
color: var(--heo-white);
}
.post .back-home-button:hover {
background: var(--heo-white-op);
color: var(--heo-white)
}
.nav-fixed .back-home-button:hover {
background: var(--heo-lighttext);
color: var(--heo-white)
}
.back-menu-list-groups .back-menu-list {
@ -5435,6 +5430,9 @@ html {
.back-menu-list-groups .back-menu-list .back-menu-item:hover .back-menu-item-text {
color: var(--heo-white);
}
.page .back-menu-list-groups .back-menu-list .back-menu-item:hover .back-menu-item-text{
color: var(--heo-card-bg);
}
.back-home-button .back-menu-list-group {
display: flex;
@ -5567,6 +5565,7 @@ html {
.nav-fixed #nav #site-name:hover {
background: var(--heo-main);
color: var(--heo-card-bg)
}
#nav #site-name:hover:after {
@ -5577,6 +5576,11 @@ html {
#nav .back-home-button:hover {
box-shadow: var(--heo-shadow-main);
color: var(--heo-white);
}
.page #nav .back-home-button:hover{
color: var(--heo-card-bg);
}
#nav #page-name-text {
@ -5617,6 +5621,10 @@ html {
line-height: 36px;
}
.page #page-header.nav-fixed #nav #page-name-text:hover:after {
color: var(--heo-card-bg);
}
#page-header.nav-fixed #nav div.menus_items {
transition: 0.15s;
position: relative;
@ -6098,13 +6106,13 @@ i.fab {
}
#nav a:hover {
color: var(--heo-white) !important;
color: var(--heo-white);
background: var(--heo-white-op);
transition: 0.3s;
}
.page #nav a:hover {
color: var(--heo-white) !important;
color: var(--heo-card-bg) !important;
background: var(--heo-main);
transition: 0.3s;
box-shadow: var(--heo-shadow-main);
@ -6124,7 +6132,7 @@ i.fab {
}
.page .menus_item:hover > a.site-page {
color: var(--heo-white) !important;
color: var(--heo-card-bg) !important;
background: var(--heo-main);
transition: 0.3s;
box-shadow: var(--heo-shadow-main);
@ -6162,7 +6170,7 @@ a {
}
a:hover {
color: var(--heo-hovertext);
color: var(--heo-lighttext);
}
/* 分割线 */
@ -6259,8 +6267,9 @@ a.deal_link {
}
a.deal_link:hover {
color: var(--heo-white);
color: var(--heo-card-bg);
background: var(--heo-main);
transform: scale(1.1)
}
img.footer_mini_logo {
@ -6337,6 +6346,10 @@ img.footer_mini_logo:hover {
border-radius: 40px;
}
.page #menus>div.menus_items>.menus_item:hover>a {
color: var(--heo-card-bg) !important;
}
#nav .menus_items .menus_item .menus_item_child > .recursion_menus_item > a {
letter-spacing: 0rem;
display: flex;
@ -6539,6 +6552,18 @@ a.console_switchbutton {
border-radius: 40px;
}
.page #nav #site-name {
color: var(--heo-white)
}
.page #nav #site-name span {
color: var(--heo-fontcolor)
}
.page #nav #site-name:hover {
color: var(--heo-card-bg)
}
/* 搜索 */
#search-button > a > span {
display: none;
@ -6933,9 +6958,6 @@ a.console_switchbutton {
}
@media screen and (min-width: 1300px) {
#aside-content .aside-list > .aside-list-item:hover {
transform: scale(1.03);
}
#aside-content .aside-list > .aside-list-item:active {
transform: scale(0.97);
@ -6964,7 +6986,7 @@ a.console_switchbutton {
}
#aside-content .aside-list > .aside-list-item:hover a {
color: var(--heo-white) !important;
color: var(--heo-card-bg) !important;
}
/* 文章顶部波浪效果 */
@ -8344,17 +8366,16 @@ a.categoryButton:hover {
@media screen and (max-width: 768px) {
#category-bar {
border-radius: 0;
border-radius:0;
background: var(--heo-background);
margin-bottom: 0rem;
margin-bottom: 0;
position: -webkit-sticky;
position: sticky;
top: 60px;
z-index: 1;
padding: 0rem 1rem 0rem 16px;
padding: 0;
height: 50px;
margin-top: 0;
align-items: center;
align-items: center
}
}
@ -8372,6 +8393,7 @@ a.categoryButton:hover {
display: flex;
white-space: nowrap;
align-items: center;
margin-bottom: 4px
}
.category-in-bar-tips {
@ -8381,7 +8403,11 @@ a.categoryButton:hover {
.category-bar-items {
white-space: nowrap;
overflow-x: scroll;
overflow-y: hidden;
display: flex;
border-radius: 8px;
align-items: center;
height: 30px
}
.category-in-bar .category-in-bar-tips {
@ -8399,19 +8425,22 @@ a.categoryButton:hover {
.category-bar-item a {
padding: 0.1rem 0.5rem;
margin: 0 4px;
font-weight: bold;
margin-right: 6px;
font-weight: 700;
border-radius: 8px;
display: flex;
align-items: center;
height: 30px
}
.category-bar-item:hover a {
background: var(--heo-theme);
color: var(--heo-white);
color: var(--heo-card-bg);
}
.category-bar-item.select a {
background: var(--heo-theme);
color: var(--heo-white);
color: var(--heo-card-bg);
border-radius: 8px;
}
@ -8656,10 +8685,6 @@ li {
@media screen and (min-width: 1300px) {
#recent-posts .recent-post-item.pinned-post-item .recent-post-info-top {
padding-top: 16px;
}
.recent-post-item .recent-post-info .recent-post-info-top .article-title {
font-size: 20px;
-webkit-line-clamp: 2;
@ -8890,6 +8915,7 @@ canvas#universe {
line-height: 1.3;
border: var(--style-border-always);
margin-top: 16px;
margin-bottom: 16px;
}
@media screen and (max-width: 768px) {
@ -9057,26 +9083,10 @@ ins.adsbygoogle {
box-shadow: var(--heo-shadow-main);
}
#recent-posts > .recent-post-item .right_radius {
border-top-left-radius: 12px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
border-bottom-left-radius: 12px;
}
@media screen and (min-width: 1300px) {
#recent-posts > .recent-post-item .right_radius {
border-top-left-radius: 12px;
border-top-right-radius: 12px;
border-bottom-right-radius: 0px;
border-bottom-left-radius: 0px;
}
}
@media screen and (max-width: 768px) {
#recent-posts .recent-post-item:hover {
border: none;
box-shadow: none;
border:var(--style-border-always);
box-shadow: none
}
}
@ -9085,20 +9095,15 @@ ins.adsbygoogle {
#recent-posts > .recent-post-item .right_radius,
#recent-posts > .recent-post-item .left_radius {
border-top-left-radius: 12px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
border-bottom-left-radius: 12px;
width: 75%;
width:75%;
display: flex;
height: 200px;
height: 220px
}
#recent-posts > .recent-post-item:hover .post_cover img.post_bg {
transform: scale(1.03);
transition: 0.3s ease-in-out;
filter: brightness(0.85);
border-radius: 12px 0 0 12px;
transition: .3s ease-in-out;
filter: brightness(.85)
}
#recent-posts > .recent-post-item.post-card-large:hover .post_cover img.post_bg {
@ -9109,8 +9114,9 @@ ins.adsbygoogle {
min-width: 100%;
-webkit-backface-visibility: hidden;
-webkit-transform-style: preserve-3d;
transition: 0.3s ease-in-out;
transition: .3s ease-in-out;
min-height: 100%;
user-select: none
}
#recent-posts > .recent-post-item:hover > .recent-post-info {
@ -9123,23 +9129,32 @@ ins.adsbygoogle {
}
}
@media screen and (max-width: 375px) {
#recent-posts>.recent-post-item .left_radius,#recent-posts>.recent-post-item .right_radius {
height:170px
}
}
#recent-posts > .recent-post-item:hover .post_cover img.post_bg {
transform: scale(1.03);
transition: 0.3s ease-in-out;
filter: brightness(0.85);
border-radius: 12px 0 0 12px;
transform: scale(1);
transition: 0s ease-in-out;
filter: brightness(1)
}
@media screen and (min-width: 1200px) {
#recent-posts>.recent-post-item:hover .post_cover img.post_bg {
transform:scale(1.03);
transition: .3s ease-in-out;
filter: brightness(.85)
}
}
@media screen and (min-width: 1300px) {
#recent-posts > .recent-post-item .right_radius,
#recent-posts > .recent-post-item .left_radius {
border-top-left-radius: 12px;
border-top-right-radius: 12px;
border-bottom-right-radius: 0px;
border-bottom-left-radius: 0px;
width: 100%;
display: flex;
width:100%;
display: flex
}
}
@ -9375,12 +9390,14 @@ span.recent-post-top-text {
transition: all 0.3s ease 0s;
}
#recent-posts > .recent-post-item:not(:first-child) {
margin-top: 0.5rem;
#recent-posts > .recent-post-item {
margin-top: .5rem;
margin-bottom: 1rem;
position: relative;
overflow: hidden;
margin-top: 1rem;
animation: slide-in .6s .4s backwards;
will-change: transform
}
/* 图片在左侧 */
@ -9408,40 +9425,45 @@ span.recent-post-top-text {
flex-direction: column;
}
#recent-posts > .recent-post-item:not(:first-child) {
/*width: calc(50% - 0.5rem);*/
#recent-posts > .recent-post-item {
width: calc(50% - 0.5rem);
margin-top: 0.25rem;
margin-bottom: 0.75rem;
box-shadow: var(--heo-shadow-border);
clip-path: inset(0 0 0 0 round 12px);
}
#recent-posts > .recent-post-item:not(:first-child):active {
transform: scale(0.97);
#category #recent-posts .recent-post-item,#tag #recent-posts .recent-post-item {
margin-top: .5rem;
margin-bottom: 1rem;
position: relative;
overflow: hidden;
margin-top: 1rem;
animation: slide-in .6s .4s backwards;
will-change: transform;
width: calc(100% / 2 - .5rem);
margin-top: .25rem;
margin-bottom: .75rem;
box-shadow: var(--heo-shadow-border)
}
/* 设置分列 */
/* 1 列:左右排列 */
#recent-posts > .recent-post-item.col1 {
#recent-posts > .recent-post-item.col1,#category #recent-posts .recent-post-item.col1,#tag #recent-posts .recent-post-item.col1 {
width: calc(100% - .5rem);
}
/* 2 列 */
#recent-posts > .recent-post-item.col2 {
#recent-posts > .recent-post-item.col2,#category #recent-posts .recent-post-item.col2,#tag #recent-posts .recent-post-item.col2 {
width: calc(100% / 2 - .5rem);
}
/* 3 列 */
#recent-posts > .recent-post-item.col3 {
#recent-posts > .recent-post-item.col3,#category #recent-posts .recent-post-item.col3,#tag #recent-posts .recent-post-item.col3 {
width: calc(100% / 3 - .5rem);
}
/* 4 列 */
#recent-posts > .recent-post-item.col4 {
width: calc(100% / 4 - .5rem);
}
#category-bar {
margin-bottom: .75rem;
box-shadow: var(--heo-shadow-border);
@ -9459,9 +9481,13 @@ span.recent-post-top-text {
justify-content: space-between;
align-items: flex-start;
align-content: flex-start;
-webkit-user-select: none
}
}
#recent-posts {
position: relative
}
/* 主页卡片手机端美化 */
@media screen and (max-width: 768px) {
@ -9469,15 +9495,23 @@ span.recent-post-top-text {
border-radius: 0;
}
#recent-posts > .recent-post-item:not(:first-child) {
margin: 1.5rem 1rem;
#recent-posts>.recent-post-item {
margin: 1.5rem 0;
border-radius: 12px;
margin-top: 0.5rem;
margin-top: .5rem;
border: var(--style-border-always);
box-shadow: var(--heo-shadow-border);
display: block;
position: relative;
clip-path: inset(0 0 0 0 round 12px);
clip-path: inset(0 0 0 0 round 12px)
}
#recent-posts {
padding: 0 1rem
}
#category #recent-posts,#tag #recent-posts {
padding: 0
}
#recent-posts .recent-post-item .post_cover {
@ -9492,6 +9526,14 @@ span.recent-post-top-text {
padding: 0.5rem 20px;
}
a.article-meta__categories {
left: 12px!important;
top: 12px!important;
border-radius: 4px!important;
padding: 2px 9px!important;
font-size: 12px
}
#bbTimeList {
margin-bottom: 0rem;
}
@ -9523,7 +9565,9 @@ span.recent-post-top-text {
right: 0;
}
#rightside {
display: none
}
/* 背景 */
#web_bg {
@ -9546,43 +9590,14 @@ span.recent-post-top-text {
transform: scale(1);
}
#recent-posts > .recent-post-item > .recent-post-info > .article-title,
#recent-posts > .recent-post-item > .recent-post-info > .content,
#recent-posts > .recent-post-item > .recent-post-info > .article-meta-wrap {
padding: 0 20px !important;
#recent-posts>.recent-post-item>.recent-post-info>.article-meta-wrap,
#recent-posts>.recent-post-item>.recent-post-info>.article-title,
#recent-posts>.recent-post-item>.recent-post-info>.content {
padding: 0 20px!important
}
}
/* 主页文章封面左侧显示 */
/* #recent-posts>.recent-post-item .right_radius{
order: 0;
border-radius: 8px 0 0 8px;
} */
/* 主页文章卡片尺寸变化 */
/* #recent-posts > div:nth-child(1){
height: 22em;
}
#recent-posts > div:nth-child(1) > div.recent-post-info > div.content{
height: 120px;
margin-top: 20px!important;
}
#recent-posts > div:nth-child(4){
height: 22em;
}
#recent-posts > div:nth-child(4) > div.recent-post-info > div.content{
height: 120px;
margin-top: 20px!important;
}
#recent-posts > div:nth-child(8){
height: 22em;
}
#recent-posts > div:nth-child(8) > div.recent-post-info > div.content{
height: 120px;
margin-top: 20px!important;
} */
/* 文章卡片标题 */
#recent-posts > .recent-post-item > .recent-post-info > .article-title {
line-height: 1.4;
@ -9725,12 +9740,14 @@ span.recent-post-top-text {
}
/* 文章标签置底 */
#recent-posts > .recent-post-item > .recent-post-info {
height: 174px;
width: 100%;
cursor: pointer;
position: relative;
padding: 0;
display: inline-block;
overflow: hidden
}
@media screen and (max-width: 768px) {
@ -9754,15 +9771,15 @@ span.recent-post-top-text {
}
@media screen and (min-width: 1300px) {
#recent-posts > .recent-post-item:hover > .recent-post-info > .article-meta-wrap {
#recent-posts > .recent-post-item.top:hover > .recent-post-info > .article-meta-wrap {
bottom: 30px;
}
#recent-posts > .recent-post-item.post-card-large:hover > .recent-post-info > .article-meta-wrap {
bottom: 30px;
#recent-posts > .recent-post-item.top.post-card-large:hover > .recent-post-info > .article-meta-wrap {
bottom: 20px;
}
#recent-posts > .recent-post-item > .recent-post-info > .article-meta-wrap {
#recent-posts > .recent-post-item.top > .recent-post-info > .article-meta-wrap {
bottom: 30px;
}
}
@ -9905,11 +9922,11 @@ div#author-info__sayhi {
}
div#author-info__sayhi:hover {
background: var(--heo-card-bg);
color: var(--heo-fontcolor);
background: var(--heo-white-op);
color: var(--heo-white);
transform: scale(1.1)
}
/* 作者卡片背景 */
#aside-content > .card-widget:first-child {
transition: 0.3s;
@ -10190,7 +10207,7 @@ div#author-info__sayhi:hover {
#aside-content .card-tag-cloud a:hover {
background: var(--heo-theme);
color: var(--heo-white) !important;
color: var(--heo-card-bg) !important;
box-shadow: var(--heo-shadow-theme);
}
@ -10205,9 +10222,6 @@ div#author-info__sayhi:hover {
@media screen and (min-width: 1300px) {
#aside-content .card-tag-cloud a:hover {
transform: scale(1.03);
}
#aside-content .card-tag-cloud a:active {
transform: scale(0.97);
@ -10217,7 +10231,7 @@ div#author-info__sayhi:hover {
/* 时间轴卡片 */
#aside-content .card-archives ul.card-archive-list > .card-archive-list-item a:hover,
#aside-content .card-categories ul.card-category-list > .card-category-list-item a:hover {
color: var(--heo-white);
color: var(--heo-card-bg);
background-color: var(--heo-theme);
box-shadow: var(--heo-shadow-theme);
border-radius: 8px;
@ -10228,11 +10242,6 @@ div#author-info__sayhi:hover {
@media screen and (min-width: 1300px) {
#aside-content .card-archives ul.card-archive-list > .card-archive-list-item a:hover,
#aside-content .card-categories ul.card-category-list > .card-category-list-item a:hover {
transform: scale(1.03);
}
#aside-content .card-archives ul.card-archive-list > .card-archive-list-item a:active,
#aside-content .card-categories ul.card-category-list > .card-category-list-item a:active {
transform: scale(0.97);
@ -10460,7 +10469,19 @@ a.extend.prev {
border: var(--style-border);
width: calc(100% - 300px);
align-self: flex-start;
animation: slide-in 0.6s 0.1s backwards;
animation: slide-in .6s .1s backwards;
position: relative;
overflow: hidden
}
#tag {
padding: 3rem 2rem 1rem 2rem
}
@media screen and (min-width: 1300px) {
#tag {
padding:4rem 2rem 1rem 2rem;
}
}
#page {
@ -10986,8 +11007,8 @@ span.post-meta-position {
/* 文章tab样式 */
#article-container ul > li:not(.tab):before {
border: 0.21em solid var(--heo-lighttext);
background: var(--heo-lighttext);
border: 0.21em solid var(--heo-main);
background: var(--heo-main);
}
#article-container ol,
@ -13272,7 +13293,7 @@ button.el-button.tk-cancel.el-button--default.el-button--small {
#page .tag-cloud-list a:hover {
background: var(--heo-theme) !important;
box-shadow: var(--heo-shadow-blue);
color: var(--heo-white) !important;
color: var(--heo-card-bg)!important;
border: var(--style-border-hover);
}
@ -13307,10 +13328,6 @@ span.tagsPageCount {
}
#post .tag_share .post-meta__tags:hover span.tagsPageCount {
color: var(--heo-lighttext);
}
#tag #tag-page-tags a.select .tagsPageCount {
background: var(--heo-card-bg);
color: var(--heo-lighttext);
@ -13410,8 +13427,31 @@ figure.gallery-group:hover .gallery-group-name::after {
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin: 0 -0.75rem;
margin-bottom: 0.5rem;
margin: 0 -.25rem;
margin-bottom: .5rem;
position: absolute;
z-index: 1;
width: 100%;
padding: 1rem 2rem;
left: 0;
top: 0;
max-height: 64px;
overflow: hidden;
background: var(--heo-card-bg);
backdrop-filter: saturate(180%) blur(20px);
transition: .1s ease-out
}
@media screen and (max-width: 768px) {
#tag #tag-page-tags {
display:none
}
}
#tag #tag-page-tags:hover {
max-height: 1000px;
transition: .3s ease-out;
background: var(--heo-maskbgdeep)
}
#tag #tag-page-tags a {
@ -13419,20 +13459,21 @@ figure.gallery-group:hover .gallery-group-name::after {
margin: 0.25rem 0.25rem;
line-height: 1.6;
border-radius: 8px;
color: var(--heo-fontcolor) !important;
color: var(--heo-fontcolor)!important;
border: var(--style-border-always);
display: flex;
align-items: center;
background: var(--heo-card-bg)
}
#tag #tag-page-tags a.select {
color: var(--heo-white) !important;
color: var(--heo-card-bg)!important;
background: var(--heo-theme);
box-shadow: var(--heo-shadow-theme);
}
#tag #tag-page-tags a:hover {
color: var(--heo-white) !important;
color: var(--heo-card-bg)!important;
background: var(--heo-theme);
box-shadow: var(--heo-shadow-theme);
}
@ -13465,6 +13506,14 @@ figure.gallery-group:hover .gallery-group-name::after {
padding-left: 0;
}
.article-sort-title sup {
margin-left: 4px;
font-size: 16px;
font-weight: 700;
opacity: .4;
top: -1em
}
.article-sort-item {
margin: 0 0 1rem 0rem;
overflow: hidden;
@ -13512,7 +13561,7 @@ figure.gallery-group:hover .gallery-group-name::after {
.article-sort-item-title:hover {
transform: translateX(0px);
color: var(--heo-hovertext);
color: var(--heo-lighttext);
}
/* 友情链接页面 */
@ -13581,7 +13630,7 @@ figure.gallery-group:hover .gallery-group-name::after {
}
.flink#article-container .flink-list > .flink-list-item:hover a .flink-item-desc {
color: var(--heo-white);
color: var(--heo-card-bg);
}
/* 友链标题 */
@ -13605,7 +13654,7 @@ figure.gallery-group:hover .gallery-group-name::after {
}
.flink#article-container .flink-list > .flink-list-item:hover a .flink-item-name {
color: var(--heo-white);
color: var(--heo-card-bg)!important;
}
.flink#article-container .flink-list > .flink-list-item a {
@ -13723,7 +13772,7 @@ figure.gallery-group:hover .gallery-group-name::after {
}
.flink#article-container .site-card:hover .info .title {
color: var(--heo-white);
color: var(--heo-card-bg);
}
.flink#article-container .site-card:hover .info {
@ -13746,11 +13795,6 @@ figure.gallery-group:hover .gallery-group-name::after {
text-align: left;
}
.flink#article-container .site-card:hover .info .desc {
color: var(--heo-white);
}
@media screen and (min-width: 768px) {
.flink#article-container .site-card:hover .info .desc {
-webkit-line-clamp: 4;
@ -13759,7 +13803,7 @@ figure.gallery-group:hover .gallery-group-name::after {
.flink#article-container .site-card:hover .info .desc {
transition: 0.3s;
color: var(--heo-white);
color: var(--heo-card-bg);
width: 100%
}
@ -14989,7 +15033,7 @@ span.hexo-douban-pagenum {
}
#heo-footer .footer-item:hover {
color: var(--heo-theme);
color: var(--heo-main);
}
#heo-footer .footer-group {
@ -16852,7 +16896,7 @@ span.hexo-douban-pagenum {
}
#console .aside-list-item:hover .content .comment {
color: var(--heo-white);
color: var(--heo-card-bg);
}
#console .aside-list-item .content time {
@ -16862,7 +16906,11 @@ span.hexo-douban-pagenum {
}
#console .aside-list-item:hover .content time {
color: var(--heo-white);
color: var(--heo-card-bg);
}
#card-newest-comments .aside-list-item:hover .name {
color: var(--heo-card-bg)
}
#console .aside-list {
@ -16940,7 +16988,7 @@ span.hexo-douban-pagenum {
.console-card.tags .card-tag-cloud a:hover {
background: var(--heo-main);
color: var(--heo-white) !important;
color: var(--heo-card-bg)!important;
}
.console-card.tags .card-tag-cloud a sup {
@ -17021,7 +17069,7 @@ span.hexo-douban-pagenum {
#console .console-card.history .card-archive-list .card-archive-list-link:hover {
background: var(--heo-main);
color: var(--heo-white);
color: var(--heo-card-bg);
}
#console #card-newest-comments {
@ -17427,7 +17475,7 @@ code:not([class]) {
-ms-transform: translateY(-50%);
transform: translateY(-50%);
margin: auto;
color: #fff !important;
color: #fff;
font-weight: 700;
line-height: 2;
font-size: 17px;

View File

@ -41,9 +41,9 @@
</a>
</div>
</div>
<div class="js-pjax">
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue/2.6.14/vue.min.js"></script>
<script th:src="${assets_link + '/libs/no3d/no3d.min.js'}"></script>
<div>
<script data-pjax src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue/2.6.14/vue.min.js"></script>
<script data-pjax th:src="${assets_link + '/libs/no3d/no3d.min.js'}"></script>
</div>
</th:block>
</div>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
th:replace="~{modules/layouts/layout :: layout(content = ~{::content}, htmlType = 'category',title = ${'分类' + ': ' + category.spec.displayName + ' | ' + site.title}, head = ~{::head})}" >
th:replace="~{modules/layouts/layout :: layout(content = ~{::content}, htmlType = 'category',title = ${'分类' + ': ' + category.spec.displayName + ' | ' + site.title}, head = ~{::head})}">
<th:block th:fragment="head">
<th:block th:replace="~{modules/common/open-graph :: open-graph(_title = '分类',
_permalink = ${category.status.permalink},
@ -16,60 +16,101 @@
</header>
<main class="layout" id="content-inner">
<div id="category">
<div class="category-in-bar">
<div class="category-in-bar-tips">分类</div>
<div id="category-bar">
<div class="category-bar-items" id="category-bar-items">
<div class="category-bar-item" id="category-bar-home">
<a href="/">首页</a>
</div>
<div class="category-bar-item"
th:classappend="${category.metadata.name == categoryItem.metadata.name} ? ' select'"
th:each="categoryItem : ${categoryFinder.listAll()}"
th:id="${categoryItem.spec.displayName}">
<a th:href="@{${categoryItem.status.permalink}}"
th:text="${categoryItem.spec.displayName}"></a>
<div id="category-bar">
<div class="category-bar-items" id="category-bar-items">
<div class="category-bar-item" id="category-bar-home">
<a href="/">首页</a>
</div>
<div class="category-bar-item"
th:classappend="${category.metadata.name == categoryItem.metadata.name} ? ' select'"
th:each="categoryItem : ${categoryFinder.listAll()}"
th:id="${categoryItem.spec.slug}">
<a th:href="@{${categoryItem.status.permalink}}"
th:text="${categoryItem.spec.displayName}"></a>
</div>
</div>
<!-- 跳转到分类页 -->
<a class="category-bar-more" href="/categories">更多</a>
</div>
<div class="recent-posts category_ui" id="recent-posts"
th:with='postItems=${posts.items},
postRandomImg=${#strings.contains(theme.config.layout.postRandomImg,"?") ? theme.config.layout.postRandomImg+"&" : theme.config.layout.postRandomImg+"?"}'>
<!-- card需要添加在没有图片时使用随机图片 -->
<div class="recent-post-item" th:classappend="${theme.config.layout.post.cols} + ' ' +
${theme.config.layout.post.postLocation} + ' ' +
(${iStat.even} ? 'even' : 'odd') + ' ' +
(${post.spec.pinned} ? 'pinned-post-item' : '')"
th:attr="onclick='pjax.loadUrl(\''+ @{${post.status.permalink}} +'\')'"
th:each="post,iStat : ${postItems}">
<div class="post_cover left_radius">
<a th:attr="title=${post.spec.title}" th:href="@{${post.status.permalink}}">
<img class="post_bg"
th:with='img = ${#strings.isEmpty(post.spec.cover) ? postRandomImg+post.spec.title : post.spec.cover}'
th:alt="${post.spec.title}" th:data-lazy-src="${ isLazyload ? img : ''}"
th:src="${isLazyload ? loadingImg : img}">
</a>
</div>
<div class="recent-post-info">
<div class="recent-post-info-top">
<div class="recent-post-info-top-tips">
<!-- 类别非空时 -->
<th:block th:if="${not #lists.isEmpty(post.categories)}">
<span th:each="category : ${post.categories}"
th:href="@{${category.status.permalink}}"
th:text="${category.spec.displayName}"
th:title="${category.spec.displayName}" class="original"></span>
</th:block>
<!-- <span class="lastestpost">最新</span>-->
<a class="unvisited-post" th:href="@{${post.status.permalink}}"
th:title="${post.spec.title}" data-pjax-state="">未读</a>
</div>
<a class="article-title" th:attr="title=${post.spec.title}"
th:href="@{${post.status.permalink}}" th:text="${post.spec.title}">
</a>
<div class="content" th:text="${post.status.excerpt}"></div>
</div>
</div>
<!-- 跳转到分类页 -->
<a class="category-bar-more" href="/categories">更多</a>
</div>
</div>
<div class="article-sort-title" th:text="${category.spec.displayName}"></div>
<div class="article-sort">
<!-- TODO 按照年份分组 需要 halo 提供归档数据-->
<!--<div class="article-sort-item year">2022</div>-->
<div class="article-sort-item" th:each="post : ${posts.items}"
th:with='postRandomImg=${#strings.contains(theme.config.layout.postRandomImg,"?") ? theme.config.layout.postRandomImg+"&" : theme.config.layout.postRandomImg+"?"}'>
<a class="article-sort-item-img" th:href="@{${post.status.permalink}}"
th:title="${post.spec.title}">
<img th:alt="${post.spec.title}"
th:src="${#strings.isEmpty(post.spec.cover) ? postRandomImg+post.spec.title : post.spec.cover}">
</a>
<div class="article-sort-item-info">
<div class="article-sort-item-time"><i class="far fa-calendar-alt"></i>
<time class="post-meta-date-created"
th:attr="datetime=${#dates.format(post.spec.publishTime,'yyyy-MM-dd HH:mm:ss')}"
th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}"
th:title="'创建于' + ${#dates.format(post.spec.publishTime,'yyyy-MM-dd HH:mm:ss')}">
</time>
</div>
<a class="article-sort-item-title" onclick="window.event.cancelBubble=!0"
th:href="@{${post.status.permalink}}" th:text="${post.spec.title}"
th:title="${post.spec.title}"></a>
<div class="article-sort-item-tags">
<a class="article-meta__tags"
th:each="tag : ${post.tags}" th:href="@{${tag.status.permalink}}">
<span class="tags-punctuation">[[${tag.spec.displayName}]]</span>
</a>
<span class="article-meta__link"></span>
<div class="article-meta-wrap">
<!-- tag -->
<th:block th:if="${not #lists.isEmpty(post.tags)}">
<span class="article-meta tags">
<a class="article-meta__tags" event.cancelbubble
onclick="window.event.cancelBubble=!0" th:each="tag : ${post.tags}"
th:href="@{${tag.status.permalink}}" th:title="${tag.spec.displayName}">
<span
class="tags-punctuation">[[${#strings.trim(tag.spec.displayName)}]]</span>
</a>
</span>
</th:block>
<!-- 创建时间 -->
<span class="post-meta-date"
th:with="days=${(new java.util.Date().getTime()-post.spec.publishTime.toEpochMilli())/86400000}">
<i class="far fa-calendar-alt"></i>
<time style="display: inline;" th:datetime="${post.spec.publishTime}"
th:if="${days > 30}"
th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}"
th:title="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}+创建">
</time>
<time style="display: inline;" th:datetime="${post.spec.publishTime}"
th:if="${days <= 30 && days > 0}" th:text="${days}+天前"
th:title="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}+创建">
</time>
<time style="display: inline;" th:datetime="${post.spec.publishTime}"
th:if="${days == 0}" th:text="最近"
th:title="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}+创建">
</time>
</span>
</div>
</div>
</div>
<!-- 分页 -->
<div
th:replace="~{modules/widgets/page :: page(${'/categories/'+category.spec.slug},${posts},false)}">
</div>
</div>
<!-- 分页 -->
<div th:replace="~{modules/widgets/page :: page(${'/categories/'+category.spec.slug},${posts},false)}"></div>
</div>
<!-- sidebar -->
<div th:replace="~{modules/aside :: aside(${theme.config.sidebar.widgetss.categoryWidgets})}"></div>

View File

@ -9,10 +9,10 @@
<div class="recent-post-item"
th:classappend="${theme.config.layout.post.cols} + ' ' +
${theme.config.layout.post.postLocation} + ' ' +
(${iStat.even} ? 'even' : 'odd') +
(${iStat.even} ? 'even' : 'odd') + ' ' +
(${post.spec.pinned} ? 'pinned-post-item' : '')"
th:attr="onclick='pjax.loadUrl(\''+ @{${post.status.permalink}} +'\')'"
th:each="post,iStat : ${postItems}">
<div class="post_cover left_radius">
<a th:attr="title=${post.spec.title}" th:href="@{${post.status.permalink}}">
<img class="post_bg"
@ -32,7 +32,7 @@
th:text="${category.spec.displayName}" th:title="${category.spec.displayName}"
class="original"></span>
</th:block>
<!-- <span class="lastestpost">最新</span>-->
<!-- <span class="lastestpost">最新</span>-->
<a class="unvisited-post" th:href="@{${post.status.permalink}}" th:title="${post.spec.title}"
data-pjax-state="">未读</a>
</div>

View File

@ -81,9 +81,9 @@
}
#aside-content .card-info .card-info-social-icons i:hover {
background: var(--heo-secondbg);
transform: scale(0.97);
color: var(--heo-main);
background: var(--heo-white-op);
transform: scale(1.1);
color: var(--heo-white);
box-shadow: none;
}
@ -194,7 +194,12 @@
position: absolute;
opacity: 1;
transition: .3s;
border: 5px solid var(--heo-white)
border: 5px solid var(--heo-white);
overflow: hidden
}
.page #aside-content .card-info img.avatar-img {
border-color: var(--heo-card-bg)
}
.author-info__top-group {
@ -269,12 +274,17 @@
}
#aside-content .card-info .card-info-social-icons i:hover {
background: var(--heo-secondbg);
background: var(--heo-white-op);
transform: scale(1.1);
color: var(--heo-main);
color: var(--heo-white);
box-shadow: none
}
[data-theme=dark] .page #aside-content .card-info .card-info-social-icons i {
background: var(--heo-black-op);
color: var(--heo-card-bg)
}
#aside-content .card-info .banner-button {
height: 40px;
width: 118px;
@ -336,11 +346,16 @@
}
div#author-info__sayhi:hover {
background: var(--heo-card-bg);
color: var(--heo-fontcolor);
background: var(--heo-white-op);
color: var(--heo-white);
transform: scale(1.1)
}
[data-theme=dark] .page div#author-info__sayhi {
background: var(--heo-black-op);
color: var(--heo-black)
}
#aside-content .card-info .author-info__name {
text-align: left;
font-weight: 700;
@ -350,6 +365,10 @@
margin-bottom: 5px
}
.page #aside-content .card-info .author-info__name,.page .author-info__desc {
color: var(--heo-card-bg)
}
.author-info__desc {
font-size: 12px;
color: var(--heo-white);
@ -361,7 +380,22 @@
line-height: 1.38;
margin: .3rem 0;
text-align: justify;
color: rgba(255, 255, 255, .8)
color: var(--heo-white);
opacity: 1
}
.page .author-info__description {
color: var(--heo-card-bg)
}
.author-info__description b {
color: var(--heo-white);
opacity: 1
}
.page .author-info__description b {
color: var(--heo-card-bg);
opacity: 1
}
.avatar-sticker {
@ -381,6 +415,10 @@
border-radius: 50%
}
.page .avatar-sticker {
background: var(--heo-card-bg)
}
.avatar-sticker img {
width: 26px;
height: 26px

View File

@ -49,7 +49,7 @@
<div class="pagination_tips_next">下页</div>
<i class="haofont hao-icon-chevron-right fa-fw"></i>
</a>
<div th:if="${pageInfo.totalPages > 1 && isIndex}" class="toPageGroup">
<div th:if="${pageInfo.totalPages > 1}" class="toPageGroup">
<input id="toPageText" maxlength="3" title="跳转到指定页面"
oninput="value=value.replace(/[^0-9]/g,'')"
onkeyup="if (this.value === '0') this.value = ''">
@ -57,21 +57,21 @@
</a>
</div>
<script th:if="${theme.config.top.above.enable_above}">
function scrollToPost() {
if (document.querySelector(".pl-container")) {
setTimeout(() => {
btf.scrollToDest(window.innerHeight, 500);
}, 1000)
}
}
</script>
<script th:unless="${theme.config.top.above.enable_above}">
function scrollToPost() {
}
</script>
</div>
<script th:if="${theme.config.top.above.enable_above}">
function scrollToPost(){
setTimeout(()=>{
btf.scrollToDest(window.innerHeight, 500);
},1000)
}
</script>
<script th:unless="${theme.config.top.above.enable_above}">
function scrollToPost(){
setTimeout(()=>{
btf.scrollToDest(0, 500);
},1000)
}
</script>
</nav>
</html>

View File

@ -21,43 +21,87 @@
th:classappend="${tag.metadata.name == tagItem.metadata.name} ? 'select'"
th:each="tagItem : ${tags}"
th:href="@{${tagItem.status.permalink}}"
th:id="${tagItem.spec.displayName}">
th:id="${tagItem.spec.slug}">
<span class="tags-punctuation">[[${tagItem.spec.displayName}]]</span>
<span class="tagsPageCount" th:text="${tagItem.status.visiblePostCount}"></span>
</a>
</div>
<div class="article-sort-title" th:text="${tag.spec.displayName}"></div>
<div class="article-sort" th:with="postItems=${posts.items}">
<!--<div class="article-sort-item year">2022</div>-->
<div class="article-sort-item" th:each="post : ${postItems}"
th:with='postRandomImg=${#strings.contains(theme.config.layout.postRandomImg,"?") ? theme.config.layout.postRandomImg+"&" : theme.config.layout.postRandomImg+"?"}'>
<a class="article-sort-item-img" th:href="@{${post.status.permalink}}"
th:title="${post.spec.title}">
<img loading="lazy" th:alt="${post.status.excerpt}"
th:src="${#strings.isEmpty(post.spec.cover) ? postRandomImg+post.spec.title : post.spec.cover}">
</a>
<div class="article-sort-item-info">
<div class="article-sort-item-time"><i class="far fa-calendar-alt"></i>
<time th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}"
th:title="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}">
</time>
</div>
<a class="article-sort-item-title" onclick="window.event.cancelBubble=!0"
th:href="@{${post.status.permalink}}"
th:text="${post.spec.title}" th:title="${post.spec.title}">
<div class="recent-posts" id="recent-posts"
th:with='postItems=${posts.items},
postRandomImg=${#strings.contains(theme.config.layout.postRandomImg,"?") ? theme.config.layout.postRandomImg+"&" : theme.config.layout.postRandomImg+"?"}'>
<!-- card需要添加在没有图片时使用随机图片 -->
<div class="recent-post-item" th:classappend="${theme.config.layout.post.cols} + ' ' +
${theme.config.layout.post.postLocation} + ' ' +
(${iStat.even} ? 'even' : 'odd') + ' ' +
(${post.spec.pinned} ? 'pinned-post-item' : '')"
th:attr="onclick='pjax.loadUrl(\''+ @{${post.status.permalink}} +'\')'"
th:each="post,iStat : ${postItems}">
<div class="post_cover left_radius">
<a th:attr="title=${post.spec.title}" th:href="@{${post.status.permalink}}">
<img class="post_bg"
th:with='img = ${#strings.isEmpty(post.spec.cover) ? postRandomImg+post.spec.title : post.spec.cover}'
th:alt="${post.spec.title}" th:data-lazy-src="${ isLazyload ? img : ''}"
th:src="${isLazyload ? loadingImg : img}">
</a>
<div class="article-sort-item-tags">
<a class="article-meta__tags" event.cancelbubble onclick="window.event.cancelBubble=!0"
th:each="tag : ${post.tags}" th:href="@{${tag.status.permalink}}">
<span class="tags-punctuation">[[${tag.spec.displayName}]]</span>
</div>
<div class="recent-post-info">
<div class="recent-post-info-top">
<div class="recent-post-info-top-tips">
<!-- 类别非空时 -->
<th:block th:if="${not #lists.isEmpty(post.categories)}">
<span th:each="category : ${post.categories}"
th:href="@{${category.status.permalink}}"
th:text="${category.spec.displayName}"
th:title="${category.spec.displayName}" class="original"></span>
</th:block>
<!-- <span class="lastestpost">最新</span>-->
<a class="unvisited-post" th:href="@{${post.status.permalink}}"
th:title="${post.spec.title}" data-pjax-state="">未读</a>
</div>
<a class="article-title" th:attr="title=${post.spec.title}"
th:href="@{${post.status.permalink}}" th:text="${post.spec.title}">
</a>
<span class="article-meta__link"></span>
<div class="content" th:text="${post.status.excerpt}"></div>
</div>
<div class="article-meta-wrap">
<!-- tag -->
<th:block th:if="${not #lists.isEmpty(post.tags)}">
<span class="article-meta tags">
<a class="article-meta__tags" event.cancelbubble
onclick="window.event.cancelBubble=!0" th:each="tag : ${post.tags}"
th:href="@{${tag.status.permalink}}" th:title="${tag.spec.displayName}">
<span
class="tags-punctuation">[[${#strings.trim(tag.spec.displayName)}]]</span>
</a>
</span>
</th:block>
<!-- 创建时间 -->
<span class="post-meta-date"
th:with="days=${(new java.util.Date().getTime()-post.spec.publishTime.toEpochMilli())/86400000}">
<i class="far fa-calendar-alt"></i>
<time style="display: inline;" th:datetime="${post.spec.publishTime}"
th:if="${days > 30}"
th:text="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}"
th:title="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}+创建">
</time>
<time style="display: inline;" th:datetime="${post.spec.publishTime}"
th:if="${days <= 30 && days > 0}" th:text="${days}+天前"
th:title="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}+创建">
</time>
<time style="display: inline;" th:datetime="${post.spec.publishTime}"
th:if="${days == 0}" th:text="最近"
th:title="${#dates.format(post.spec.publishTime,'yyyy-MM-dd')}+创建">
</time>
</span>
</div>
</div>
</div>
<!-- 分页 -->
<div th:replace="~{modules/widgets/page :: page(${'/tags/'+tag.spec.slug},${posts},false)}"></div>
</div>
<!-- 分页 -->
<div th:replace="~{modules/widgets/page :: page(${'/tags/'+tag.spec.slug},${posts},false)}"></div>
</div>
<!-- sidebar -->
<div th:replace="~{modules/aside :: aside(${theme.config.sidebar.widgetss.tagWidgets})}"></div>

View File

@ -51,5 +51,5 @@ spec:
repo: https://githubfast.com/liuzhihang/halo-theme-hao
settingName: "theme-hao-setting"
configMapName: "theme-hao-configMap"
version: "1.3.9"
version: "1.4.0"
require: ">=2.8.0"