-
+
告知信
@@ -122,160 +26,224 @@
-
-
+
\ No newline at end of file
diff --git a/embed-code/page/notice.html b/embed-code/page/notice.html
index a30e8ba..f0818a4 100644
--- a/embed-code/page/notice.html
+++ b/embed-code/page/notice.html
@@ -236,7 +236,6 @@
// 检查是否有解析错误
const parseError = xmlDoc.getElementsByTagName("parsererror");
if (parseError.length > 0) {
- console.error("[RSS Debug] XML 解析失败", parseError[0].textContent);
listBox.innerHTML = 'XML 解析错误
';
return;
}
@@ -265,7 +264,6 @@
listBox.innerHTML = htmlContent || '暂无更新内容
';
} catch (error) {
- console.error('[RSS Debug] 请求发生异常:', error);
listBox.innerHTML = `请求失败: ${error.message}
`;
}
}
diff --git a/templates/assets/css/anian.css b/templates/assets/css/anian.css
index 6ff6291..c9ebe79 100644
--- a/templates/assets/css/anian.css
+++ b/templates/assets/css/anian.css
@@ -1,36 +1,326 @@
/* 瞬间标签与评论间距 */
.moment_tag_gap {
- margin-right: 10px;
+ margin-right: 10px;
}
/* 灯箱视频格式 */
.fancybox-slide--video .fancybox-content {
- width: auto !important;
- height: auto !important;
- background: transparent;
+ width: auto !important;
+ height: auto !important;
+ background: transparent;
}
.fancybox-slide--video video.fancybox-video {
- width: auto !important;
- height: auto !important;
- max-height: 75dvh !important;
- max-width: 75dvw !important;
- object-fit: contain;
+ width: auto !important;
+ height: auto !important;
+ max-height: 75dvh !important;
+ max-width: 75dvw !important;
+ object-fit: contain;
}
+
/* 片刻视频容器鼠标样式 */
.fancybox.mo_img {
cursor: zoom-in;
}
+
/* 图库视频图标hover放大 */
.video-fancybox .play-icon {
transition: all 0.4s ease !important;
- display: inline-flex;
+ display: inline-flex;
align-items: center;
justify-content: center;
- width: 40px;
- height: 40px;
+ width: 40px;
+ height: 40px;
}
+
.video-fancybox:hover .play-icon {
transform: scale(1.3) !important;
opacity: 1;
+}
+
+/* 目录左边距:贴紧左侧边栏 */
+.listree-box {
+ margin-left: 0;
+}
+
+@media (min-width: 960px) and (max-width: 1359.98px) {
+ .listree-box {
+ margin-left: calc((100vw - 860px) / 2 + 284px);
+ }
+}
+
+@media (min-width: 1360px) {
+ .listree-box {
+ margin-left: calc((100vw - 1400px) / 2 + 291px);
+ }
+}
+
+/* 登录容器 */
+.custom-login-modal {
+ position: fixed;
+ inset: 0;
+ background: rgba(0, 0, 0, 0.55);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ z-index: 1999;
+ opacity: 0;
+ visibility: hidden;
+ transition: all .25s ease;
+}
+
+.custom-login-modal.show {
+ opacity: 1;
+ visibility: visible;
+}
+
+.login-modern-card {
+ width: 250px;
+ background: #ffffff;
+ padding: 30px 25px;
+ border-radius: 14px;
+ position: relative;
+ overflow: hidden;
+ box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
+}
+
+.login-modern-card::before {
+ position: absolute;
+ content: "";
+ width: 360px;
+ height: 360px;
+ background: #e6f9ee;
+ transform: rotate(45deg);
+ left: -230px;
+ bottom: 20px;
+ border-radius: 40px;
+ z-index: 0;
+}
+
+.login-modern-form {
+ display: flex;
+ flex-direction: column;
+ position: relative;
+ z-index: 2;
+}
+
+.login-modern-title {
+ text-align: center;
+ font-size: 1.3rem;
+ font-weight: 600;
+ color: #1f2937;
+ margin-bottom: 15px;
+}
+
+.login-modern-input-wrapper {
+ width: 100%;
+ position: relative;
+ display: flex;
+ align-items: center;
+ margin-bottom: 20px;
+}
+
+.login-modern-icon {
+ position: absolute;
+ left: 2px;
+ font-size: 18px;
+ color: #6b7280;
+}
+
+.custom-login-modal input.login-modern-input {
+ width: 100%;
+ height: 38px;
+ padding-left: 30px;
+ font-size: 0.9rem;
+ color: #1f2937;
+ background: transparent !important;
+ border: none !important;
+ border-radius: 0 !important;
+ outline: none !important;
+ box-shadow: none !important;
+ border-bottom: 2px solid #cbd5e1 !important;
+ transition: border-color .2s;
+}
+
+.custom-login-modal input.login-modern-input::placeholder {
+ color: #94a3b8;
+}
+
+.custom-login-modal input.login-modern-input:focus {
+ border-bottom: 2px solid #22c55e !important;
+}
+
+.login-modern-submit {
+ width: 100%;
+ height: 35px;
+ border: none;
+ border-radius: 6px;
+ background: #22c55e;
+ color: white;
+ font-size: 0.9rem;
+ letter-spacing: .5px;
+ cursor: pointer;
+ transition: background .2s;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 0 !important;
+}
+
+.login-modern-submit:hover {
+ background: #16a34a;
+}
+
+.login-modern-submit:disabled {
+ background: #a7d7bd;
+ cursor: not-allowed;
+ color: #f0fdf4;
+}
+
+.login-modern-submit:disabled:hover {
+ background: #a7d7bd;
+}
+
+.close-modal-btn {
+ position: absolute;
+ right: 5px;
+ top: 5px;
+ border: none;
+ background: transparent;
+ font-size: 22px;
+ color: #9ca3af;
+ cursor: pointer;
+ z-index: 3;
+}
+
+/* 退出登录 */
+.pixar-notice-wrapper {
+ display: none;
+ position: fixed;
+ inset: 0;
+ z-index: 1999;
+ justify-content: center;
+ align-items: center;
+ background: rgba(0, 0, 0, 0.35);
+ font-family: "Arial Rounded MT Bold", "Helvetica Rounded", Arial, sans-serif;
+}
+
+.pixar-notice-card {
+ --pixar-ui-blue: #5c99e2;
+ --pixar-ui-green: #61c470;
+ --pixar-ui-green-shadow: #45a253;
+ --pixar-ui-red: #e65e5e;
+ --pixar-ui-red-shadow: #c14242;
+ --pixar-ui-cream: #f5f1e8;
+ --pixar-ui-dark: #4d4c4a;
+ --pixar-ui-green-border: #2e7d32;
+ --pixar-ui-red-border: #8f2d2d;
+ --pixar-button-depth: 0.15em;
+ width: 19em;
+ max-width: 300px;
+ background: var(--pixar-ui-cream);
+ border-radius: 1.5em;
+ padding: 1.2em;
+ border: 0.2em solid var(--pixar-ui-dark);
+ box-shadow: 0.6em 0.6em 0 var(--pixar-ui-dark);
+ display: flex;
+ flex-direction: column;
+ transition: transform .2s cubic-bezier(.34, 1.56, .64, 1),
+ box-shadow .2s cubic-bezier(.34, 1.56, .64, 1);
+}
+
+.pixar-notice-card:hover {
+ transform: translateY(-.5em) rotate(-2deg);
+ box-shadow: .8em .8em 0 var(--pixar-ui-dark);
+}
+
+.pixar-notice-header {
+ display: flex;
+ align-items: center;
+ margin-bottom: 1em;
+}
+
+.pixar-notice-avatar {
+ width: 3.5em;
+ height: 3.5em;
+ border-radius: 50%;
+ background: linear-gradient(45deg, #f9a86d, #f48a58);
+ border: .2em solid var(--pixar-ui-dark);
+ box-shadow: .2em .2em 0 var(--pixar-ui-dark);
+ transition: transform .3s ease;
+}
+
+.pixar-notice-card:hover .pixar-notice-avatar {
+ transform: scale(1.05) rotate(5deg);
+}
+
+.pixar-notice-username {
+ margin-left: .8em;
+ font-size: 1.2em;
+ font-weight: 700;
+ color: var(--pixar-ui-dark);
+}
+
+.pixar-notice-image-area {
+ background: #d8d2c6;
+ border-radius: 1em;
+ padding: .8em;
+ border: .2em solid var(--pixar-ui-dark);
+ box-shadow: inset .2em .2em 0 #b3ac9f;
+}
+
+.pixar-notice-caption {
+ margin: 10px 5px !important;
+ font-size: .9em;
+ line-height: 1.4;
+ color: var(--pixar-ui-dark);
+ font-weight: 600;
+}
+
+.pixar-notice-actions {
+ display: flex;
+ justify-content: space-around;
+ margin-top: 1.5em;
+}
+
+.pixar-notice-btn {
+ border: .2em solid var(--pixar-ui-dark);
+ border-radius: 1em;
+ padding: .5em .8em;
+ font-size: 1.6em;
+ cursor: pointer;
+ background: var(--pixar-ui-green);
+ box-shadow:
+ 0 var(--pixar-button-depth) 0 var(--pixar-ui-green-shadow),
+ 0 .4em 0 var(--pixar-ui-dark);
+ transition: transform .1s ease,
+ box-shadow .1s ease;
+}
+
+.pixar-notice-btn:active {
+ transform: translateY(var(--pixar-button-depth));
+ box-shadow:
+ 0 0 0 var(--pixar-ui-green-shadow),
+ 0 var(--pixar-button-depth) 0 var(--pixar-ui-dark);
+}
+
+.pixar-notice-btn-close {
+ background: var(--pixar-ui-red);
+ box-shadow:
+ 0 var(--pixar-button-depth) 0 var(--pixar-ui-red-shadow),
+ 0 .4em 0 var(--pixar-ui-dark);
+}
+
+.pixar-notice-btn-close:active {
+ box-shadow:
+ 0 0 0 var(--pixar-ui-red-shadow),
+ 0 var(--pixar-button-depth) 0 var(--pixar-ui-dark);
+}
+
+.pixar-notice-btn-confirm:hover {
+ border-color: var(--pixar-ui-green-border) !important;
+}
+
+.pixar-notice-btn-close:hover {
+ border-color: var(--pixar-ui-red-border) !important;
}
\ No newline at end of file
diff --git a/templates/assets/css/main.css b/templates/assets/css/main.css
index fa511cf..56c8ee7 100644
--- a/templates/assets/css/main.css
+++ b/templates/assets/css/main.css
@@ -9,14 +9,19 @@
body {
background: var(--dark-body-bg);
font-family: var(--font-family);
- height:100%;
+ height: 100%;
}
html {
background: transparent;
-}
+}
-h1 , h2 , h3 , h4 , p ,input {
+h1,
+h2,
+h3,
+h4,
+p,
+input {
font-family: var(--font-family);
}
@@ -44,7 +49,9 @@ h1 , h2 , h3 , h4 , p ,input {
border-radius: 12px;
}
-.uk-link-toggle:hover .uk-link, .uk-link:hover, a:hover {
+.uk-link-toggle:hover .uk-link,
+.uk-link:hover,
+a:hover {
color: #16e186;
text-decoration: none;
}
@@ -58,7 +65,7 @@ h1 , h2 , h3 , h4 , p ,input {
.uk-lightbox-toolbar {
padding: 10px 10px;
background: rgb(75 95 73 / 43%);
- color: rgba(255,255,255,.7);
+ color: rgba(255, 255, 255, .7);
}
.uk-lightbox-button {
@@ -258,7 +265,7 @@ header#masthead {
background: rgb(215 226 219 / 55%);
padding-left: 52px;
border-radius: 20px;
- transition:none
+ transition: none
}
.top_set_box {
@@ -328,9 +335,12 @@ header#masthead {
position: relative;
overflow: hidden;
background-color: #f6faf8;
+ background-repeat: no-repeat;
+ background-position: center;
+ background-size: cover;
}
-.index_banner .bg {
+/* .index_banner .bg {
position: absolute;
inset: 0;
@@ -348,7 +358,7 @@ header#masthead {
.index_banner .bg2 {
opacity: 0;
-}
+} */
.index_banner img {
height: 100%;
@@ -360,7 +370,9 @@ header#masthead {
position: relative;
}
-.blog_list_inner , .normal_list_inner , .single_wrap {
+.blog_list_inner,
+.normal_list_inner,
+.single_wrap {
background: #f6faf8;
padding-bottom: 80px;
}
@@ -371,7 +383,7 @@ header#masthead {
background: rgb(235 242 237 / 80%);
border-radius: 0;
transition: 100ms;
-}
+}
/* .left_menu_box {
@@ -449,7 +461,8 @@ header#masthead {
background: #c6dbce;
}
-.left_menu_box li ul,.menu-top-container li ul {
+.left_menu_box li ul,
+.menu-top-container li ul {
margin: 0;
padding: 0;
font-size: 15px;
@@ -473,7 +486,7 @@ header#masthead {
bottom: 10%;
right: 8%;
border-radius: 8px;
- padding-left:5px;
+ padding-left: 5px;
display: none;
}
@@ -514,7 +527,8 @@ header#masthead {
font-weight: 600;
}
-#post_item,#photos_item {
+#post_item,
+#photos_item {
padding: 40px;
padding-top: 0;
}
@@ -601,19 +615,21 @@ header#masthead {
white-space: pre-wrap;
}
-.t_content>p:last-child, .t_content>p:first-child {
- margin-top: 0px!important;
+.t_content>p:last-child,
+.t_content>p:first-child {
+ margin-top: 0px !important;
}
.t_content li p {
margin: 0 0 0px;
}
-.t_content p a.tag{
+.t_content p a.tag {
display: none;
}
-.rm_hidden , .read-less-btn {
+.rm_hidden,
+.read-less-btn {
display: none;
}
@@ -669,8 +685,9 @@ header#masthead {
transition: all .2s;
}
-#topic_content::-webkit-input-placeholder , #topic-title::-webkit-input-placeholder {
- color:rgb(190, 190, 190);
+#topic_content::-webkit-input-placeholder,
+#topic-title::-webkit-input-placeholder {
+ color: rgb(190, 190, 190);
}
.topic_tool {
@@ -722,25 +739,29 @@ input#topic_img_up {
display: flex;
justify-content: space-between;
align-items: center;
-
+
}
.tool_box .left {
display: flex;
}
-.smile_box , .t_cat {
+.smile_box,
+.t_cat {
margin-right: 5px;
}
-.smile_box i , .simi i , .t_cat i , .loca i {
+.smile_box i,
+.simi i,
+.t_cat i,
+.loca i {
font-size: 16px;
color: #66c187;
padding: 5px;
border-radius: 3px;
}
-.moment_type_btn i{
+.moment_type_btn i {
font-size: 16px;
color: #66c187;
padding: 5px;
@@ -1025,7 +1046,8 @@ a.up_img_btn {
margin-bottom: 3px;
}
-.up_from_media a , .up_from_cdn a{
+.up_from_media a,
+.up_from_cdn a {
display: flex;
align-items: center;
font-size: 13px;
@@ -1036,11 +1058,13 @@ a.up_img_btn {
border-radius: 3px;
}
-.up_from_media a i , .up_from_cdn a i {
+.up_from_media a i,
+.up_from_cdn a i {
margin-right: 2px;
}
-.up_from_media , .up_from_cdn {
+.up_from_media,
+.up_from_cdn {
margin-right: 8px;
}
@@ -1077,7 +1101,8 @@ a.up_img_btn {
border-radius: 3px;
}
-.show_media_box , .show_cdn_media {
+.show_media_box,
+.show_cdn_media {
margin-top: 15px;
padding: 8px;
background: #eff2f0;
@@ -1096,19 +1121,20 @@ a.up_img_btn {
}
.wp_get_media_list li img {
- -moz-transition:all 0.25s ease;
- -webkit-transition:all 0.25s ease;
- -o-transition:all 0.25s ease;
- -ms-transition:all 0.25s ease;
- transition:all 0.25s ease;
+ -moz-transition: all 0.25s ease;
+ -webkit-transition: all 0.25s ease;
+ -o-transition: all 0.25s ease;
+ -ms-transition: all 0.25s ease;
+ transition: all 0.25s ease;
}
-.wp_get_media_list:hover li img:not(:hover){
- opacity:0.6;
- -moz-transform:scale(0.9);
- -ms-transform:scale(0.9);
- -webkit-transform:scale(0.9);
- -o-transform:scale(0.9);transform:scale(0.9);
+.wp_get_media_list:hover li img:not(:hover) {
+ opacity: 0.6;
+ -moz-transform: scale(0.9);
+ -ms-transform: scale(0.9);
+ -webkit-transform: scale(0.9);
+ -o-transform: scale(0.9);
+ transform: scale(0.9);
}
.show_media_box .nav_tool {
@@ -1176,7 +1202,7 @@ a.img_link_cancel {
color: #658d79;
}
-input#img_link_up:focus{
+input#img_link_up:focus {
border-color: var(--hilight-color);
}
@@ -1260,21 +1286,21 @@ a.close_local {
/* margin: 3px;*/
/*}*/
-.img_list span img {
+.img_list span img {
cursor: zoom-in;
}
-.img_list span:nth-last-child(1):first-child{
+.img_list span:nth-last-child(1):first-child {
width: 60%;
-}
+}
.img_list span:nth-last-child(1):first-child:before {
padding: 0;
-}
+}
.img_list span:nth-last-child(1):first-child img {
position: relative;
-}
+}
/*.img_list a:nth-child(1):nth-last-child(4),*/
/*.img_list a:nth-child(3):nth-last-child(2),*/
@@ -1305,12 +1331,18 @@ a.close_local {
/* padding-top: 100%;*/
/*}*/
-.moment_cat_nav , .posts_cat_nav,.photos_cat_nav {
+.moment_cat_nav,
+.posts_cat_nav,
+.photos_cat_nav,
+.friends_cat_nav {
padding: 25px 40px;
border-bottom: 1px solid var(--pix-background);
}
-.moment_cat_nav ul , .posts_cat_nav ul,.photos_cat_nav ul {
+.moment_cat_nav ul,
+.posts_cat_nav ul,
+.photos_cat_nav ul,
+.friends_cat_nav ul {
display: flex;
align-items: center;
flex-direction: row;
@@ -1321,18 +1353,28 @@ a.close_local {
scrollbar-width: none;
}
-.moment_cat_nav ul li , .posts_cat_nav ul li, .photos_cat_nav ul li {
+.moment_cat_nav ul li,
+.posts_cat_nav ul li,
+.photos_cat_nav ul li,
+.friends_cat_nav ul li {
list-style: none;
flex: none;
}
-.moment_cat_nav ul::-webkit-scrollbar , .posts_cat_nav ul::-webkit-scrollbar, .photos_cat_nav ul::-webkit-scrollbar {
+.moment_cat_nav ul::-webkit-scrollbar,
+.posts_cat_nav ul::-webkit-scrollbar,
+.photos_cat_nav ul::-webkit-scrollbar,
+.friends_cat_nav ul::-webkit-scrollbar {
- display: none; /* Chrome Safari */
-
- }
+ display: none;
+ /* Chrome Safari */
-.moment_cat_nav ul li a , .posts_cat_nav ul li a, .photos_cat_nav ul li a {
+}
+
+.moment_cat_nav ul li a,
+.posts_cat_nav ul li a,
+.photos_cat_nav ul li a,
+.friends_cat_nav ul li a {
padding: 5px 10px;
background: #e1e9e5;
margin: 0 4px;
@@ -1343,17 +1385,25 @@ a.close_local {
align-items: center;
}
-.moment_cat_nav ul li a:hover, .posts_cat_nav ul li a:hover, .photos_cat_nav ul li a:hover {
+.moment_cat_nav ul li a:hover,
+.posts_cat_nav ul li a:hover,
+.photos_cat_nav ul li a:hover,
+.friends_cat_nav ul li a:hover {
background-color: var(--pix-theme);
color: #fff !important;
}
-.moment_cat_nav ul li a.active , .posts_cat_nav ul li a.active, .photos_cat_nav ul li a.active {
+.moment_cat_nav ul li a.active,
+.posts_cat_nav ul li a.active,
+.photos_cat_nav ul li a.active,
+.friends_cat_nav ul li a.active {
background: var(--pix-theme);
color: #fff !important;
}
-#t_pagination , #pagination, #p_pagination {
+#t_pagination,
+#pagination,
+#p_pagination {
padding: 30px;
text-align: center;
display: flex;
@@ -1361,7 +1411,9 @@ a.close_local {
border-top: 1px solid var(--pix-background);
}
-#t_pagination a , #pagination a, #p_pagination a {
+#t_pagination a,
+#pagination a,
+#p_pagination a {
padding: 10px 15px;
background: var(--pix-theme);
color: #fff;
@@ -1384,13 +1436,14 @@ a.close_local {
align-items: center;
}
-.post_footer_meta .left , .post_footer_meta .right {
+.post_footer_meta .left,
+.post_footer_meta .right {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
flex-wrap: nowrap;
-}
+}
.post_footer_meta .right .control_edit_post {
font-size: 13px;
@@ -1436,7 +1489,7 @@ span.post_views i {
border-radius: 8px;
}
-.avatar_title{
+.avatar_title {
color: #41624b;
display: flex;
align-items: center;
@@ -1481,13 +1534,14 @@ span.post_views i {
margin-right: 3px;
}
-.t_content a::before{
+.t_content a::before {
content: "\eeb8";
font-family: 'remixicon' !important;
margin-right: 3px;
}
-a.mo_link,.t_content a {
+a.mo_link,
+.t_content a {
display: inline-flex;
align-items: center;
flex-direction: row;
@@ -1581,7 +1635,7 @@ textarea#comment {
margin: 15px 0 25px;
}
-#t_commentform:focus-within {
+#t_commentform:focus-within {
border: 1px solid var(--hilight-color);
}
@@ -1851,7 +1905,9 @@ a.parents_at {
color: var(--pix-theme);
}
-.single_content , .page_content , .page_wrap {
+.single_content,
+.page_content,
+.page_wrap {
background: #f6faf8;
padding: 0 40px;
padding-bottom: 100px;
@@ -1952,7 +2008,7 @@ a.com_smile_btn {
width: 240px;
}
-#comment-author-info p{
+#comment-author-info p {
font-size: 13px;
margin-bottom: 5px;
color: #516181;
@@ -1963,7 +2019,9 @@ a.com_smile_btn {
color: #516181;
}
-#comment-author-info input,.field input, .field textarea {
+#comment-author-info input,
+.field input,
+.field textarea {
outline: none;
font-size: 13px;
padding: 7px 5px;
@@ -1974,7 +2032,9 @@ a.com_smile_btn {
background: var(--pix-background);
}
-#comment-author-info input:focus ,.field input:focus, .field textarea:focus{
+#comment-author-info input:focus,
+.field input:focus,
+.field textarea:focus {
border-color: var(--hilight-color);
}
@@ -2029,7 +2089,7 @@ a.beian {
.footer_nav {
- position: fixed!important;
+ position: fixed !important;
bottom: 0;
max-width: 960px;
z-index: 898;
@@ -2080,6 +2140,7 @@ a.com_msg_btn {
font-size: 15px;
color: #3b4466;
}
+
.msg_title i {
margin-right: 5px;
}
@@ -2195,12 +2256,33 @@ a.go_top {
bottom: 20px;
opacity: 0;
transition: all .15s;
+ pointer-events: none;
}
a.go_top.show {
bottom: 40px;
opacity: 1;
transition: all .15s;
+ pointer-events: auto;
+}
+
+/* 手机端顶部导航栏回到顶部按钮 */
+.tool_top {
+ position: fixed;
+ bottom: 10%;
+ opacity: 0;
+ transition: all 0.15s;
+ font-size: 26px;
+ transform: translateY(20px);
+ pointer-events: none;
+ color: #000000;
+}
+
+.tool_top.show {
+ opacity: 1;
+ transform: translateY(0px);
+ pointer-events: auto;
+ color: #000000;
}
.footer_nav_box .left_inner {
@@ -2308,7 +2390,7 @@ a.go_top.show {
border-bottom: 1px solid #edf2ef;
}
-.link_group_content:last-child{
+.link_group_content:last-child {
border-bottom: none
}
@@ -2585,11 +2667,13 @@ p.msg_limit {
} */
-.normal_content .entry-content , .normal_grid_content .entry-content {
+.normal_content .entry-content,
+.normal_grid_content .entry-content {
margin: 0;
}
-.normal_content .entry-title , .normal_grid_content .entry-title {
+.normal_content .entry-title,
+.normal_grid_content .entry-title {
font-size: 18px;
margin-bottom: 5px;
text-overflow: ellipsis;
@@ -2598,16 +2682,20 @@ p.msg_limit {
width: 100%;
}
-.normal_content .entry-title a , .normal_grid_content .entry-title a {
+.normal_content .entry-title a,
+.normal_grid_content .entry-title a {
color: #32395c;
}
-.normal_content .entry_meta , .normal_card_content .entry_meta , .normal_grid_content .entry_meta {
+.normal_content .entry_meta,
+.normal_card_content .entry_meta,
+.normal_grid_content .entry_meta {
font-size: 13px;
color: #89a396;
}
-.normal_content .entry-content p , .normal_card_content .entry-content p {
+.normal_content .entry-content p,
+.normal_card_content .entry-content p {
margin: 8px 0;
margin-bottom: 12px;
color: #606268;
@@ -2628,16 +2716,22 @@ p.msg_limit {
object-fit: cover;
}
-.normal_content .post_footer_meta span.comnum , .normal_card_content .post_footer_meta span.comnum , .normal_grid_content .post_footer_meta span.comnum {
+.normal_content .post_footer_meta span.comnum,
+.normal_card_content .post_footer_meta span.comnum,
+.normal_grid_content .post_footer_meta span.comnum {
background: none;
color: #444444;
}
-.normal_content .post_footer_meta span.comnum i , .normal_card_content .post_footer_meta span.comnum i , .normal_grid_content .post_footer_meta span.comnum i {
+.normal_content .post_footer_meta span.comnum i,
+.normal_card_content .post_footer_meta span.comnum i,
+.normal_grid_content .post_footer_meta span.comnum i {
color: #819286;
}
-.normal_content a.up_like , .normal_card_content a.up_like , .normal_grid_content a.up_like {
+.normal_content a.up_like,
+.normal_card_content a.up_like,
+.normal_grid_content a.up_like {
margin-left: 5px;
}
@@ -2689,7 +2783,7 @@ p.msg_limit {
color: #32395c;
}
-.normal_card_content .entry-title a:hover{
+.normal_card_content .entry-title a:hover {
color: var(--hilight-color);
}
@@ -2784,7 +2878,7 @@ span.single_time i {
margin-left: 10px;
}
-.post-single .post_header ul.post-categories {
+.post-single .post_header ul.post-categories {
margin: 0;
}
@@ -2804,7 +2898,8 @@ span.single_time i {
color: var(--hilight-color);
}
-.single_wrap .comments-area , .page_content .comments-area {
+.single_wrap .comments-area,
+.page_content .comments-area {
background: var(--pix-background);
padding: 40px;
margin-top: 30px;
@@ -2847,7 +2942,7 @@ span.single_time i {
.column_inner .cat_img a:before {
content: "";
position: absolute;
- background: linear-gradient(0deg,#0011097a 5%,#0d0d0d00 50%);
+ background: linear-gradient(0deg, #0011097a 5%, #0d0d0d00 50%);
width: 100%;
height: 100%;
top: 0;
@@ -2970,7 +3065,8 @@ ul.column_lists li span {
border: none;
}
-.wid_title , h2.widget-title {
+.wid_title,
+h2.widget-title {
margin-bottom: 15px;
font-size: 14px;
color: #9098a7;
@@ -3187,7 +3283,7 @@ ul.column_lists li span {
color: #a1a1a1;
}
-.posts_show_widget .no_img li a:before{
+.posts_show_widget .no_img li a:before {
/*content: "#";*/
color: #23bb6e;
margin-right: 3px;
@@ -3299,7 +3395,7 @@ ul.column_lists li span {
overflow: hidden;
}
-.cst_widget_comment ul li .right a:hover{
+.cst_widget_comment ul li .right a:hover {
color: var(--hilight-color);
}
@@ -3332,7 +3428,7 @@ ul.column_lists li span {
flex-direction: column;
width: 48%;
align-items: flex-start;
- background: linear-gradient(90deg,#f6faf8,#816bff00);
+ background: linear-gradient(90deg, #f6faf8, #816bff00);
border-radius: 5px;
margin-bottom: 10px;
padding: 8px 12px 5px;
@@ -3421,7 +3517,8 @@ form#login label {
align-content: center;
}
-#login_form_box input#username , #login_form_box input#password {
+#login_form_box input#username,
+#login_form_box input#password {
width: 100%;
font-size: 13px;
padding: 8px 5px 8px 40px;
@@ -3431,7 +3528,8 @@ form#login label {
border-radius: 8px;
}
-#login_form_box input#username:focus , #login_form_box input#password:focus {
+#login_form_box input#username:focus,
+#login_form_box input#password:focus {
border-color: var(--hilight-color);
}
@@ -3488,7 +3586,7 @@ p.log_title {
border-radius: 50%;
}
-.admin_bottom_bar .left a {
+.admin_bottom_bar .left a {
width: 32px;
height: 32px;
display: flex;
@@ -3598,13 +3696,14 @@ span.menu_tips {
white-space: nowrap;
}
-.left_menu_box ul li a i.drop_icon{
+.left_menu_box ul li a i.drop_icon {
position: absolute;
right: 10px;
color: #83a897;
}
-.left_menu_box ul li a i.drop_icon.up,.menu-top-container ul li a i.drop_icon.up {
+.left_menu_box ul li a i.drop_icon.up,
+.menu-top-container ul li a i.drop_icon.up {
transform: rotate(180deg);
}
@@ -3648,7 +3747,7 @@ span.menu_tips {
color: #687c70;
}
-.pix_player.loacl_audio{
+.pix_player.loacl_audio {
background: rgb(241 243 244)
}
@@ -3709,7 +3808,7 @@ a.play_btn i {
.player_bar .progress {
position: absolute;
height: 3px;
- background: linear-gradient(90deg,#00b34a,#00e0c7);
+ background: linear-gradient(90deg, #00b34a, #00e0c7);
left: 0;
top: 0;
border-radius: 3px;
@@ -3738,7 +3837,7 @@ a.play_btn i {
color: #151515;
}
-.player_meta .title span.author{
+.player_meta .title span.author {
font-size: 12px;
color: #969696;
}
@@ -3992,7 +4091,7 @@ a.play_btn i {
background-image: linear-gradient(-180deg, #f8f9ff 8%, #eeeeff 97%);
border: 1px solid #e9eaec;
-webkit-box-shadow: 0 3px 4px 0 rgb(44 71 146 / 32%), inset 0 -2px 0 0 #e1e3e8;
- box-shadow: 0 3px 4px 0rgba(44,71,146,.32),inset 0 -2px 0 0 #e1e3e8;
+ box-shadow: 0 3px 4px 0rgba(44, 71, 146, .32), inset 0 -2px 0 0 #e1e3e8;
}
.sim .land_nav a:hover {
@@ -4020,11 +4119,13 @@ a.play_btn i {
margin-top: 40px;
}
-.land_page.sim.darkl , .land_page.darkl {
+.land_page.sim.darkl,
+.land_page.darkl {
background: #0a0c19;
}
-.sim.darkl .land_top , .darkl .land_content {
+.sim.darkl .land_top,
+.darkl .land_content {
box-shadow: 0px 4px 9px 3px rgb(2 5 23);
}
@@ -4044,7 +4145,7 @@ a.play_btn i {
background-image: linear-gradient(-180deg, #27293e 8%, #10121f 97%);
border: 1px solid #0e1123;
-webkit-box-shadow: 0 3px 4px 0 rgb(6 7 17), inset 0 -2px 0 0 #0b0d16;
- box-shadow: 0 3px 4px 0 rgb(6 7 17),inset 0 -2px 0 0 #0b0d16;
+ box-shadow: 0 3px 4px 0 rgb(6 7 17), inset 0 -2px 0 0 #0b0d16;
}
.sim.darkl .land_nav a:hover {
@@ -4091,39 +4192,43 @@ a.play_btn i {
}
/*—滚动条默认显示样式–*/
-::-webkit-scrollbar-thumb{
- background-color:var(--hilight-color);
- height:50px;
- outline-offset:-2px;
- outline:2px solid #fff;
-
+::-webkit-scrollbar-thumb {
+ background-color: var(--hilight-color);
+ height: 50px;
+ outline-offset: -2px;
+ outline: 2px solid #fff;
+
}
-
- /*—滚动条大小–*/
- ::-webkit-scrollbar{
- width:6px;
- height:6px;
+
+/*—滚动条大小–*/
+::-webkit-scrollbar {
+ width: 6px;
+ height: 6px;
}
-
- /*—滚动框背景样式–*/
- ::-webkit-scrollbar-track-piece{
- -webkit-border-radius:0;
+
+/*—滚动框背景样式–*/
+::-webkit-scrollbar-track-piece {
+ -webkit-border-radius: 0;
}
/* Keyword values */
* {
-scrollbar-width: auto; /* 系统默认的滚动条宽度 */
-scrollbar-width: thin; /* 系统提供的瘦滚动条宽度,或者比默认滚动条宽度更窄的宽度 */
-scrollbar-width: none; /* 不显示滚动条,但是该元素依然可以滚动 */
+ scrollbar-width: auto;
+ /* 系统默认的滚动条宽度 */
+ scrollbar-width: thin;
+ /* 系统提供的瘦滚动条宽度,或者比默认滚动条宽度更窄的宽度 */
+ scrollbar-width: none;
+ /* 不显示滚动条,但是该元素依然可以滚动 */
-/* Global values */
-scrollbar-width: inherit;
-scrollbar-width: initial;
-scrollbar-width: unset;
+ /* Global values */
+ scrollbar-width: inherit;
+ scrollbar-width: initial;
+ scrollbar-width: unset;
}
+
.coco-msg {
border-radius: 5px;
-}
+}
.compensate-for-scrollbar {
margin: 0 !important;
@@ -4160,11 +4265,13 @@ p.no_posts small {
display: none;
}
-.lbc .left_nav , .lbc .footer_nav_box .left {
+.lbc .left_nav,
+.lbc .footer_nav_box .left {
width: 12%;
}
-.lbc .page_main , .lbc .footer_nav_box .right {
+.lbc .page_main,
+.lbc .footer_nav_box .right {
width: 88%;
}
@@ -4188,7 +4295,8 @@ p.no_posts small {
padding: 12px;
}
-.lbc .left_menu_box ul li a img , .lbc .left_menu_box ul li a i {
+.lbc .left_menu_box ul li a img,
+.lbc .left_menu_box ul li a i {
margin: 0;
}
@@ -4213,7 +4321,9 @@ p.no_posts small {
display: none;
}
-.lbc .main_wrap , .lbc .top_bar , .lbc .footer_nav {
+.lbc .main_wrap,
+.lbc .top_bar,
+.lbc .footer_nav {
max-width: 720px;
}
@@ -4256,29 +4366,33 @@ a.mobile_edit {
display: flex;
}
-.single-content img , .entry-content img {
+.single-content img,
+.entry-content img {
border-radius: 8px !important;
}
-.single-content ul li , .entry-content ul li {
+.single-content ul li,
+.entry-content ul li {
list-style: circle;
padding-bottom: 12px;
margin-bottom: 8px;
border-bottom: 1px solid #e5f1ea;
}
-.single-content ol li , .entry-content ol li {
+.single-content ol li,
+.entry-content ol li {
padding-bottom: 12px;
margin-bottom: 8px;
border-bottom: 1px solid #e5f1ea;
padding-left: 10px;
}
-.single-content li p{
+.single-content li p {
margin: 0 0 0px;
}
-ul[data-type=taskList] li, ul .vditor-task {
+ul[data-type=taskList] li,
+ul .vditor-task {
display: flex;
}
@@ -4295,7 +4409,8 @@ ul[data-type=taskList] p {
margin-top: -0.08em;
}
-.single-content blockquote , .entry-content blockquote {
+.single-content blockquote,
+.entry-content blockquote {
font-size: 15px;
font-style: normal;
padding: 8px 12px;
@@ -4304,21 +4419,24 @@ ul[data-type=taskList] p {
border: 1px solid #eaf0ff;
}
-.single-content a , .page_content .entry-content a {
+.single-content a,
+.page_content .entry-content a {
color: #4f5e91;
text-decoration: underline;
word-wrap: break-word;
}
-.notification-content p a{
+.notification-content p a {
color: #4f5e91;
}
-.single-content a:hover,.notification-content p a:hover {
+.single-content a:hover,
+.notification-content p a:hover {
color: var(--hilight-color);
}
-.single-content .wp-block-table th , .single-content .wp-block-table td {
+.single-content .wp-block-table th,
+.single-content .wp-block-table td {
padding: 10px 5px !important;
}
@@ -4332,19 +4450,19 @@ pre:not(.content) {
*/
.comment-form-validate {
display: inline-block;
- position: relative;
- margin-right: 10px;
+ position: relative;
+ margin-right: 10px;
}
.comment-form-validate input {
- position: absolute;
+ position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 5;
opacity: 0;
- cursor: pointer;
+ cursor: pointer;
}
label.comment_check_style {
@@ -4356,7 +4474,7 @@ label.comment_check_style {
border-radius: 46px;
-webkit-transition: 0.2s;
transition: 0.2s;
- top: -4px;
+ top: -4px;
}
label.comment_check_style:after {
@@ -4374,12 +4492,13 @@ label.comment_check_style:after {
transition: 0.2s;
}
-.comment-form-validate input:hover + label:after {
- box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.2), 0 3px 8px 0 rgba(0, 0, 0, 0.15);
+.comment-form-validate input:hover+label:after {
+ box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.2), 0 3px 8px 0 rgba(0, 0, 0, 0.15);
}
-.comment-form-validate input:checked + label:after {
- left: 32px;
- background: #2942ff;
+
+.comment-form-validate input:checked+label:after {
+ left: 32px;
+ background: #2942ff;
}
/*
@@ -4429,7 +4548,7 @@ label.comment_check_style:after {
}
.edit_card_box .edit_content input:focus {
- border-color:#00b34a
+ border-color: #00b34a
}
.edit_card_box span {
@@ -4536,27 +4655,36 @@ span.de_card i {
margin-top: 5px;
}
-.edit_audio_box .tips , .edit_video_box .tips {
+.edit_audio_box .tips,
+.edit_video_box .tips {
font-size: 13px;
}
-.audio_choose , .video_choose, .card_choose {
+.audio_choose,
+.video_choose,
+.card_choose {
display: flex;
font-size: 14px;
margin-bottom: 15px;
}
-.audio_choose li , .video_choose li, .card_choose li{
+.audio_choose li,
+.video_choose li,
+.card_choose li {
list-style: none;
}
-.audio_choose a , .video_choose a , .card_choose a{
+.audio_choose a,
+.video_choose a,
+.card_choose a {
padding: 3px;
color: #4d4b85;
margin-right: 8px;
}
-.audio_choose li.uk-active a , .video_choose li.uk-active a , .card_choose li.uk-active a{
+.audio_choose li.uk-active a,
+.video_choose li.uk-active a,
+.card_choose li.uk-active a {
border-bottom: 2px solid var(--pix-theme);
color: var(--pix-theme);
}
@@ -4621,7 +4749,8 @@ span.de_card i {
justify-content: space-between;
}
-.loacl_audio input , .type_audio_text input {
+.loacl_audio input,
+.type_audio_text input {
font-size: 14px;
width: 100%;
border: none;
@@ -4646,7 +4775,8 @@ span.de_card i {
margin-top: 10px;
}
-input#moment_video_url , input#moment_video_bili {
+input#moment_video_url,
+input#moment_video_bili {
border: none;
background: #e5eae7;
padding: 6px 8px;
@@ -4769,7 +4899,8 @@ input#moment_video_bili {
border-radius: 5px;
}
-a.bg_music, a.bg_lrc {
+a.bg_music,
+a.bg_lrc {
padding: 7px;
display: flex;
line-height: 1;
@@ -4777,7 +4908,8 @@ a.bg_music, a.bg_lrc {
border-radius: 8px;
}
-a.bg_music i, a.bg_lrc i {
+a.bg_music i,
+a.bg_lrc i {
font-size: 16px;
color: #fff;
}
@@ -4790,7 +4922,8 @@ a.bg_music i, a.bg_lrc i {
flex-direction: column;
}
-.footer_tool .t_dark , .footer_tool .t_music {
+.footer_tool .t_dark,
+.footer_tool .t_music {
margin-bottom: 8px;
}
@@ -4800,7 +4933,8 @@ a.bg_music i, a.bg_lrc i {
display: none;
}
-body.mod_single .left_nav , body.mod_single .footer_nav_box .left {
+body.mod_single .left_nav,
+body.mod_single .footer_nav_box .left {
display: none;
}
@@ -4809,11 +4943,14 @@ body.mod_single .top_bar {
border-top-left-radius: 12px;
}
-body.mod_single .main_wrap , body.mod_single .footer_nav , body.mod_single .go_top_box {
+body.mod_single .main_wrap,
+body.mod_single .footer_nav,
+body.mod_single .go_top_box {
max-width: 680px;
}
-body.mod_single .page_main , body.mod_single .footer_nav_box .right {
+body.mod_single .page_main,
+body.mod_single .footer_nav_box .right {
width: 100%;
}
@@ -4892,7 +5029,7 @@ body.mod_double_r .main_sidebar {
display: block;
}
-body.mod_third_s .main_sidebar{
+body.mod_third_s .main_sidebar {
display: block;
width: 32%;
}
@@ -4901,7 +5038,8 @@ body.mod_third_s .left_nav {
width: 8%;
}
-body.mod_third_s .main_wrap , body.mod_third_s .go_top_box {
+body.mod_third_s .main_wrap,
+body.mod_third_s .go_top_box {
max-width: 1060px;
}
@@ -4953,7 +5091,8 @@ body.mod_third_s .left_menu_box ul li a {
padding: 12px;
}
-body.mod_third_s .left_menu_box ul li a img , body.mod_third_s .left_menu_box ul li a i {
+body.mod_third_s .left_menu_box ul li a img,
+body.mod_third_s .left_menu_box ul li a i {
margin: 0;
}
@@ -4980,13 +5119,14 @@ body.mod_third_s .top_bar {
}
-@font-face{
- font-style:normal;
- font-family:'eafont';
- src:url('../libs/fonts/eafont.ttf') format('truetype');
+@font-face {
+ font-style: normal;
+ font-family: 'eafont';
+ src: url('../libs/fonts/eafont.ttf') format('truetype');
}
-.show-more-btn , a.read-less-btn {
+.show-more-btn,
+a.read-less-btn {
margin: auto;
cursor: pointer;
color: #0ea755;
@@ -4997,13 +5137,14 @@ body.mod_third_s .top_bar {
background: transparent;
padding: 0;
margin-left: 5px;
- }
+}
- .show-more-btn:hover , a.read-less-btn:hover {
+.show-more-btn:hover,
+a.read-less-btn:hover {
opacity: .7;
- }
+}
- /*全局播放器*/
+/*全局播放器*/
.bgm_box {
width: 100%;
padding: 10px;
@@ -5025,7 +5166,7 @@ body.mod_third_s .top_bar {
.player_mod .m_cover {
width: 42px;
- height: 42px;
+ height: 42px;
min-width: 42px;
}
@@ -5074,7 +5215,7 @@ body.mod_third_s .top_bar {
width: 100%;
height: 2px;
background: #eceeff;
-
+
}
.pl_btn a i {
@@ -5126,7 +5267,8 @@ a.m_next {
border-radius: 3px;
}
-.musci_list_box li:hover , .musci_list_box li.active {
+.musci_list_box li:hover,
+.musci_list_box li.active {
background: #22bb6d;
color: #fff;
}
@@ -5190,11 +5332,13 @@ body.mod_single .footer_nav_box .bgm_box .left {
display: flex;
}
-.lbc .footer_nav_box .bgm_box .left , body.mod_third_s .footer_nav_box .bgm_box .left {
+.lbc .footer_nav_box .bgm_box .left,
+body.mod_third_s .footer_nav_box .bgm_box .left {
width: auto;
}
-a.m_list,a.m_loop {
+a.m_list,
+a.m_loop {
margin: 0 10px;
}
@@ -5222,7 +5366,7 @@ a.m_list,a.m_loop {
padding: 7px 12px;
}
-.posts_mu_list li:nth-of-type(odd){
+.posts_mu_list li:nth-of-type(odd) {
background: #f6faf8;
}
@@ -5250,7 +5394,10 @@ a.m_list,a.m_loop {
color: #a1a1a1;
}
-.posts_mu_list li:hover div , .posts_mu_list li:hover a , .posts_mu_list li.active , .posts_mu_list li.active .s_play_btn {
+.posts_mu_list li:hover div,
+.posts_mu_list li:hover a,
+.posts_mu_list li.active,
+.posts_mu_list li.active .s_play_btn {
color: #00b34a;
}
@@ -5371,7 +5518,8 @@ a.m_list,a.m_loop {
word-break: keep-all;
}
-.top_menu_box ul li a:hover , .top_menu_box ul li a:hover i {
+.top_menu_box ul li a:hover,
+.top_menu_box ul li a:hover i {
color: #069d53;
}
@@ -5432,19 +5580,23 @@ a.m_list,a.m_loop {
align-items: center;
padding: 20px 0;
margin: 30px 0 10px;
- background: linear-gradient(90deg,var(--pix-background),#816bff00);
+ background: linear-gradient(90deg, var(--pix-background), #816bff00);
border-radius: 8px;
}
-.single_footer_box .pix_icon , .single_footer_box a.up_like {
+.single_footer_box .pix_icon,
+.single_footer_box a.up_like {
margin: 0px;
}
-.single_footer_box i , .single_footer_box a.up_like i {
+.single_footer_box i,
+.single_footer_box a.up_like i {
font-size: 18px;
}
-.single_footer_box .pix_donate_btn , .single_footer_box .pix_share_btn , .single_footer_box .up_like {
+.single_footer_box .pix_donate_btn,
+.single_footer_box .pix_share_btn,
+.single_footer_box .up_like {
width: 72px;
display: flex;
justify-content: center;
@@ -5487,7 +5639,7 @@ span.edit_post a {
/*z-index: 988;*/
}
-.sf_item {
+.sf_item {
display: flex;
justify-content: center;
}
@@ -5499,8 +5651,8 @@ span.edit_post a {
}
.m_offcanvas .inner {
- background:
- linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)),
+ background:
+ linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)),
url('/upload/celan.png') no-repeat center bottom;
background-size: cover, 100%;
padding: 30px;
@@ -5513,7 +5665,7 @@ span.edit_post a {
.m_offcanvas ul li {
list-style: none;
- padding: 10px 0;
+ padding: 10px 0;
}
.m_offcanvas ul li a {
@@ -5533,7 +5685,7 @@ span.edit_post a {
color: #363636;
}
-.m_offcanvas ul li img {
+.m_offcanvas ul li img {
height: 15px;
margin-right: 5px;
}
@@ -5573,7 +5725,7 @@ span.edit_post a {
align-items: center;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
- height: 50px;
+ height: 50px;
}
.footer_menu li {
@@ -5615,7 +5767,7 @@ span.edit_post a {
.footer_menu .inner .t_dark a {
background: transparent;
padding: 0;
- line-height:normal
+ line-height: normal
}
.footer_menu .inner .center {
@@ -5770,7 +5922,7 @@ a.change {
}
a.change:hover {
- transform: scale(1.05) !important;
+ transform: scale(1.05) !important;
background: rgba(226, 230, 255, 0.3) !important;
color: #E2E6FF !important;
border-color: rgba(226, 230, 255, 0.5) !important;
@@ -5786,27 +5938,29 @@ a.change i.ri-refresh-line {
.is_mobile {
display: none;
}
-
+
}
@media screen and (max-width: 768px) {
.not_mobile {
display: none;
}
+
.footer_nav_box {
border-radius: 50px;
}
-
+
}
-.single_wrap .comments-area , .page_content .comments-area {
+.single_wrap .comments-area,
+.page_content .comments-area {
background: var(--pix-background);
padding: 40px;
margin-top: 30px;
border-radius: 8px;
}
-#top_third{
+#top_third {
display: none;
}
@@ -5823,7 +5977,7 @@ a.change i.ri-refresh-line {
display: none;
position: fixed;
z-index: 999;
- top: 45%;
+ top: 485px;
left: 0;
background-color: var(--toc-color);
color: #fff;
@@ -5870,11 +6024,13 @@ h3.listree-titles a.listree-btn {
}
#listree-ol ul {
- margin-top:0px;
+ margin-top: 0px;
padding-left: 10px;
}
-a#listree-click.current, #listree-ol > li.current > a, #listree-ol > li ul li.current > a {
+a#listree-click.current,
+#listree-ol>li.current>a,
+#listree-ol>li ul li.current>a {
color: #f2ff2c;
}
@@ -5883,7 +6039,7 @@ a#listree-click.current, #listree-ol > li.current > a, #listree-ol > li ul li.cu
}
#listree-ol::-webkit-scrollbar-thumb {
- background: rgb(199,201,204);
+ background: rgb(199, 201, 204);
}
#listree-ol::-webkit-scrollbar {
@@ -5891,30 +6047,36 @@ a#listree-click.current, #listree-ol > li.current > a, #listree-ol > li ul li.cu
}
.dark .db--container {
- --db-main-color:var(--dark-ac-btn);
- --db--background-gray:var(--normal-btn);
- --db--text-color-light:var(--text-light);
- --db--text-color:var(--light-color);
- --db--text-color-light:var(--light-color);
- --db-hover-color:var(--dark-ac-btn)
+ --db-main-color: var(--dark-ac-btn);
+ --db--background-gray: var(--normal-btn);
+ --db--text-color-light: var(--text-light);
+ --db--text-color: var(--light-color);
+ --db--text-color-light: var(--light-color);
+ --db-hover-color: var(--dark-ac-btn)
}
+
.db--container {
- --db-main-color:var(--hilight-color);
- --db-hover-color:var(--hilight-color);
+ --db-main-color: var(--hilight-color);
+ --db-hover-color: var(--hilight-color);
}
+
.page_content .entry-content .db--container a {
color: #32395c;
text-decoration: none;
}
-.dark .single-content .db--title a, .dark .page_content .entry-content .db--title a {
+
+.dark .single-content .db--title a,
+.dark .page_content .entry-content .db--title a {
color: var(--text-color);
text-decoration: none;
}
-.dark .single-content .db--title a:hover, .dark .page_content .entry-content .db--title a:hover {
+
+.dark .single-content .db--title a:hover,
+.dark .page_content .entry-content .db--title a:hover {
color: var(--db-hover-color);
}
-.page_content .entry-content .db--container a:hover{
+.page_content .entry-content .db--container a:hover {
color: var(--hilight-color);
}
@@ -5937,24 +6099,27 @@ a#listree-click.current, #listree-ol > li.current > a, #listree-ol > li ul li.cu
/* 移动端图片容器 (.mo_img) 样式调整 */
.mo_img {
- height: auto !important;
- aspect-ratio: 1 !important; /* 强制 1:1 比例 */
- display: block !important;
+ height: auto !important;
+ aspect-ratio: 1 !important;
+ /* 强制 1:1 比例 */
+ display: block !important;
}
.mo_img img {
- width: 100% !important;
- height: 100% !important;
- object-fit: cover !important; /* 填充并裁剪 */
- border-radius: 8px !important;
+ width: 100% !important;
+ height: 100% !important;
+ object-fit: cover !important;
+ /* 填充并裁剪 */
+ border-radius: 8px !important;
}
/* 视频播放器 (.pix_video) 样式调整 */
.pix_video {
- width: 100% !important;
- height: 100% !important;
- object-fit: cover !important; /* 默认填充并裁剪 */
- border-radius: 8px !important;
+ width: 100% !important;
+ height: 100% !important;
+ object-fit: cover !important;
+ /* 默认填充并裁剪 */
+ border-radius: 8px !important;
}
/* 播放中状态:切换为 'contain' 以显示完整视频内容 (与 JS 配合) */
@@ -5975,7 +6140,7 @@ a#listree-click.current, #listree-ol > li.current > a, #listree-ol > li ul li.cu
overflow: hidden;
transition: max-height 0.3s linear;
max-height: none;
- display: block !important;
+ display: block !important;
align-items: flex-start !important;
justify-content: flex-start !important;
padding-top: 0 !important;
@@ -6028,69 +6193,79 @@ a#listree-click.current, #listree-ol > li.current > a, #listree-ol > li ul li.cu
}
/* 展开按钮(折叠状态):位置微调 */
-.moment-collapse-container.collapsed + .moment-fold-btn {
+.moment-collapse-container.collapsed+.moment-fold-btn {
margin-top: 2px;
margin-bottom: 7px;
}
/* 收起按钮(非折叠状态):位置微调 */
-.moment-collapse-container:not(.collapsed) + .moment-fold-btn {
+.moment-collapse-container:not(.collapsed)+.moment-fold-btn {
margin-top: -2px;
margin-bottom: 7px;
}
/* 奇遇样式 */
.center-img-container {
- position: fixed;
- top: 0;
- left: 0;
- width: 100dvw;
- height: 100dvh;
- justify-content: center;
- align-items: center;
- background-color: rgba(0, 0, 0, 0.1);
- z-index: 9999;
- box-sizing: border-box;
- padding: 20px;
- opacity: 0;
- visibility: hidden;
- transition:
- opacity 0.5s ease-in-out,
- visibility 0s linear 0.5s;
- display: flex;
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100dvw;
+ height: 100dvh;
+ justify-content: center;
+ align-items: center;
+ background-color: rgba(0, 0, 0, 0.1);
+ z-index: 9999;
+ box-sizing: border-box;
+ padding: 20px;
+ opacity: 0;
+ visibility: hidden;
+ transition:
+ opacity 0.5s ease-in-out,
+ visibility 0s linear 0.5s;
+ display: flex;
}
.center-img {
- max-width: 100%;
- max-height: 100vh;
- object-fit: contain;
- opacity: 0;
+ max-width: 100%;
+ max-height: 100vh;
+ object-fit: contain;
+ opacity: 0;
}
@keyframes fadeIn {
- from { opacity: 0; }
- to { opacity: 1; }
+ from {
+ opacity: 0;
+ }
+
+ to {
+ opacity: 1;
+ }
}
@keyframes fadeOut {
- from { opacity: 1; }
- to { opacity: 0; }
+ from {
+ opacity: 1;
+ }
+
+ to {
+ opacity: 0;
+ }
}
.img-fade-in {
- animation: fadeIn 0.5s ease-in-out forwards;
+ animation: fadeIn 0.5s ease-in-out forwards;
}
.img-fade-out {
- animation: fadeOut 0.5s ease-in-out forwards;
+ animation: fadeOut 0.5s ease-in-out forwards;
}
.container-fade-active {
- opacity: 1;
- visibility: visible;
- transition:
- opacity 0.5s ease-in-out,
- visibility 0s;
+ opacity: 1;
+ visibility: visible;
+ transition:
+ opacity 0.5s ease-in-out,
+ visibility 0s;
}
/* 公告侧边栏样式 */
@@ -6155,11 +6330,15 @@ a#listree-click.current, #listree-ol > li.current > a, #listree-ol > li ul li.cu
transition: all 0.3s ease;
}
-.notice-content::-webkit-scrollbar { width: 6px; }
+.notice-content::-webkit-scrollbar {
+ width: 6px;
+}
+
.notice-content::-webkit-scrollbar-thumb {
background: #B8D8D2 !important;
border-radius: 10px;
}
+
.notice-content::-webkit-scrollbar-track {
background: #E8F0EE !important;
}
@@ -6171,6 +6350,7 @@ a#listree-click.current, #listree-ol > li.current > a, #listree-ol > li ul li.cu
padding: 0 1px;
transition: 0.25s;
}
+
.content-inner a:hover {
color: #FFFFFF !important;
background: rgba(224, 247, 244, 0.2) !important;
@@ -6220,17 +6400,17 @@ a#listree-click.current, #listree-ol > li.current > a, #listree-ol > li ul li.cu
/* 已读状态hover:浅紫青系渐变+轻微缩放 */
.notice-btn:hover:not(.has-notice) {
transform: scale(1.05) !important;
- background: rgba(226, 230, 255, 0.3) !important;
- color: #E2E6FF !important;
- border-color: rgba(226, 230, 255, 0.5) !important;
+ background: rgba(226, 230, 255, 0.3) !important;
+ color: #E2E6FF !important;
+ border-color: rgba(226, 230, 255, 0.5) !important;
}
/* 未读状态hover:浅青绿系加深+轻微缩放 */
.notice-btn.has-notice:hover {
transform: scale(1.05) !important;
background: rgba(224, 248, 245, 0.95) !important;
- color: #1e9e86 !important;
- border-color: rgba(39, 188, 159, 0.4) !important;
+ color: #1e9e86 !important;
+ border-color: rgba(39, 188, 159, 0.4) !important;
}
/* 对话气泡:淡青绿色系 */
@@ -6278,115 +6458,117 @@ a#listree-click.current, #listree-ol > li.current > a, #listree-ol > li ul li.cu
/* 强化气泡动画:更大的缩放+位移,更明显 */
@keyframes bubbleAnim {
- 0% {
- opacity: 1;
- transform: scale(1) translateX(0);
+ 0% {
+ opacity: 1;
+ transform: scale(1) translateX(0);
}
- 50% {
- opacity: 0.9;
- transform: scale(1.1) translateX(-3px);
+
+ 50% {
+ opacity: 0.9;
+ transform: scale(1.1) translateX(-3px);
}
- 100% {
- opacity: 1;
- transform: scale(1) translateX(0);
+
+ 100% {
+ opacity: 1;
+ transform: scale(1) translateX(0);
}
}
/* 4+1侧边导航栏 */
-.nav4lite-grid{
- display: grid;
- grid-template-columns: repeat(2, 1fr);
- gap: 10px;
- position: relative;
+.nav4lite-grid {
+ display: grid;
+ grid-template-columns: repeat(2, 1fr);
+ gap: 10px;
+ position: relative;
}
-.nav4lite-item{
- position: relative;
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 10px;
- color: #5e7b66;
- text-decoration: none;
- font-size: 14px;
- font-weight: 500;
- border-radius: 10px;
- box-shadow: 0 2px 6px rgba(202,223,208,0.25);
- background: #f6faf8;
- text-align: center;
- border: 2px solid transparent;
- transition: all 0.2s ease;
+.nav4lite-item {
+ position: relative;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 10px;
+ color: #5e7b66;
+ text-decoration: none;
+ font-size: 14px;
+ font-weight: 500;
+ border-radius: 10px;
+ box-shadow: 0 2px 6px rgba(202, 223, 208, 0.25);
+ background: #f6faf8;
+ text-align: center;
+ border: 2px solid transparent;
+ transition: all 0.2s ease;
}
-.nav4lite-item.nav4lite-detail{
- font-weight: 600;
+.nav4lite-item.nav4lite-detail {
+ font-weight: 600;
}
-.nav4lite-label{
- position: relative;
- z-index: 1;
- display: inline-flex;
- align-items: center;
- justify-content: center;
- gap: 4px;
- width: 100%;
- height: 100%;
+.nav4lite-label {
+ position: relative;
+ z-index: 1;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ gap: 4px;
+ width: 100%;
+ height: 100%;
}
-.nav4lite-center-dot{
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- width: 50px;
- height: 50px;
- border-radius: 50%;
- border: 8px solid #ebf2ed;
- background-color: #f6faf8;
- z-index: 2;
- box-shadow: 0 1px 3px rgba(202,223,208,0.3);
- text-decoration: none;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: all 0.2s ease;
+.nav4lite-center-dot {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ width: 50px;
+ height: 50px;
+ border-radius: 50%;
+ border: 8px solid #ebf2ed;
+ background-color: #f6faf8;
+ z-index: 2;
+ box-shadow: 0 1px 3px rgba(202, 223, 208, 0.3);
+ text-decoration: none;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ transition: all 0.2s ease;
}
-.nav4lite-center-dot i{
- color: #5e7b66;
- font-size: 20px;
- width: 100%;
- height: 100%;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: all 0.2s ease;
+.nav4lite-center-dot i {
+ color: #5e7b66;
+ font-size: 20px;
+ width: 100%;
+ height: 100%;
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ transition: all 0.2s ease;
}
.nav4lite-item:hover,
-.nav4lite-item:active{
- background: rgb(198, 219, 206);
- box-shadow: 0 2px 6px rgba(202,223,208,0.35);
- color: #5e7b66;
- border-color: transparent;
- text-decoration: none;
+.nav4lite-item:active {
+ background: rgb(198, 219, 206);
+ box-shadow: 0 2px 6px rgba(202, 223, 208, 0.35);
+ color: #5e7b66;
+ border-color: transparent;
+ text-decoration: none;
}
.nav4lite-center-dot:hover,
.nav4lite-center-dot:active,
.nav4lite-center-dot:hover i,
-.nav4lite-center-dot:active i{
- background-color: rgb(198, 219, 206);
- box-shadow: 0 2px 6px rgba(202,223,208,0.35);
- border-color: #DAEBE0;
- text-decoration: none;
+.nav4lite-center-dot:active i {
+ background-color: rgb(198, 219, 206);
+ box-shadow: 0 2px 6px rgba(202, 223, 208, 0.35);
+ border-color: #DAEBE0;
+ text-decoration: none;
}
/* 访问过的链接保持原样式 */
.nav4lite-item:visited,
-.nav4lite-center-dot:visited{
- color: #5e7b66;
+.nav4lite-center-dot:visited {
+ color: #5e7b66;
}
/* 测速侧边栏样式 */
@@ -6532,30 +6714,30 @@ a#listree-click.current, #listree-ol > li.current > a, #listree-ol > li ul li.cu
.common-fixed-bg {
background-size: cover;
- background-attachment: fixed;
+ background-attachment: fixed;
background-position: center center;
background-repeat: no-repeat;
- min-height: 100vh;
- margin: 0;
- padding: 0;
+ min-height: 100vh;
+ margin: 0;
+ padding: 0;
}
/* 侧边栏订阅 */
.subscribe-widget {
- padding: 16px;
- background: #daebe0;
- border: 1px solid rgba(0,0,0,0.08);
- border-radius: 10px;
- text-align: center;
- position: relative;
- overflow: hidden;
+ padding: 16px;
+ background: #daebe0;
+ border: 1px solid rgba(0, 0, 0, 0.08);
+ border-radius: 10px;
+ text-align: center;
+ position: relative;
+ overflow: hidden;
}
.subscribe-widget::before {
- content: "";
- position: absolute;
- inset: 0;
- background-image: url('data:image/svg+xml;utf8,\
+ content: "";
+ position: absolute;
+ inset: 0;
+ background-image: url('data:image/svg+xml;utf8,\
');
- background-repeat: no-repeat;
- background-size: 130%;
- background-position: 50% 60%;
- pointer-events: none;
- z-index: 0;
+ background-repeat: no-repeat;
+ background-size: 130%;
+ background-position: 50% 60%;
+ pointer-events: none;
+ z-index: 0;
}
.subscribe-message {
- font-size: 14px;
- font-weight: 500;
- margin-bottom: 10px;
- margin-top: -5px;
- color: rgb(94, 123, 102);
- position: relative;
- z-index: 1;
+ font-size: 14px;
+ font-weight: 500;
+ margin-bottom: 10px;
+ margin-top: -5px;
+ color: rgb(94, 123, 102);
+ position: relative;
+ z-index: 1;
}
.subscribe-form {
- display: flex;
- justify-content: center;
- align-items: center;
- gap: 6px;
- position: relative;
- z-index: 1;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ gap: 6px;
+ position: relative;
+ z-index: 1;
}
.subscribe-input {
- width: 100%;
- height: 38px;
- font-size: 14px;
- padding: 0 12px !important;
- border-radius: 12px !important;
- background: #EBF2ED;
- border: 1px solid rgba(0,0,0,.12);
- transition: all .22s ease;
+ width: 100%;
+ height: 38px;
+ font-size: 14px;
+ padding: 0 12px !important;
+ border-radius: 12px !important;
+ background: #EBF2ED;
+ border: 1px solid rgba(0, 0, 0, .12);
+ transition: all .22s ease;
}
+
.subscribe-input:focus {
- border-color: #c6dbce;
- box-shadow: 0 0 0 2px rgba(15,175,173,0.15);
- outline: none;
+ border-color: #c6dbce;
+ box-shadow: 0 0 0 2px rgba(15, 175, 173, 0.15);
+ outline: none;
}
.subscribe-btn {
- background: none;
- border: none;
- padding: 0;
- cursor: pointer;
- transition: transform .2s ease;
+ background: none;
+ border: none;
+ padding: 0;
+ cursor: pointer;
+ transition: transform .2s ease;
}
+
.subscribe-btn:hover {
- transform: translateX(2px);
+ transform: translateX(2px);
}
+
.subscribe-btn:disabled {
- opacity: .4;
- cursor: not-allowed;
+ opacity: .4;
+ cursor: not-allowed;
}
.subscribe-icon {
- font-size: 20px;
- color: #22bb9d;
+ font-size: 20px;
+ color: #22bb9d;
}
.subscribe-hint {
- margin-top: 8px;
- font-size: 12px;
- color: rgba(0,0,0,.45);
- position: relative;
- z-index: 1;
+ margin-top: 8px;
+ font-size: 12px;
+ color: rgba(0, 0, 0, .45);
+ position: relative;
+ z-index: 1;
}
.subscribe-divider {
- width: 100%;
- height: 1px;
- margin: 10px auto 8px;
- background-color: rgba(0,0,0,0.08);
- position: relative;
- z-index: 1;
+ width: 100%;
+ height: 1px;
+ margin: 10px auto 8px;
+ background-color: rgba(0, 0, 0, 0.08);
+ position: relative;
+ z-index: 1;
}
.subscribe-feedback {
- margin-top: 6px;
- font-size: 12px;
- color: rgb(94, 123, 102);
- position: relative;
- z-index: 1;
-}
-.feedback-email {
- color: #22bb9d;
- text-decoration: none;
- transition: color .2s ease;
-}
-.feedback-email:hover {
- color: #1a9680;
+ margin-top: 6px;
+ font-size: 12px;
+ color: rgb(94, 123, 102);
+ position: relative;
+ z-index: 1;
}
-.success { color: #0d9c54 !important; }
-.warning { color: #c28600 !important; }
-.error { color: #c83e4d !important; }
+.feedback-email {
+ color: #22bb9d;
+ text-decoration: none;
+ transition: color .2s ease;
+}
+
+.feedback-email:hover {
+ color: #1a9680;
+}
+
+.success {
+ color: #0d9c54 !important;
+}
+
+.warning {
+ color: #c28600 !important;
+}
+
+.error {
+ color: #c83e4d !important;
+}
/* 字体引入 */
@font-face {
- font-family: 'MaShanZheng';
- src: url('/upload/ma-shan-zheng.woff2') format('woff2');
- font-display: swap;
+ font-family: 'MaShanZheng';
+ src: url('/upload/ma-shan-zheng.woff2') format('woff2');
+ font-display: swap;
}
@font-face {
- font-family: 'MuYao';
- src: url('/upload/mu-yao-sui-xin-shou-xie-ti.woff2') format('woff2');
- font-display: swap;
-}
+ font-family: 'MuYao';
+ src: url('/upload/mu-yao-sui-xin-shou-xie-ti.woff2') format('woff2');
+ font-display: swap;
+}
\ No newline at end of file
diff --git a/templates/assets/css/mobile.css b/templates/assets/css/mobile.css
index 96d31b6..7bfd5fd 100644
--- a/templates/assets/css/mobile.css
+++ b/templates/assets/css/mobile.css
@@ -3,61 +3,67 @@
* 合并了原 1440px 和 1920px 的通用样式,并应用了你指定的 mod_third 布局
*/
@media only screen and (min-width: 1366px) {
- /* --- 你提供的统一布局样式 --- */
- body.mod_third .main_wrap,
- body.mod_third .go_top_box {
- max-width: 1400px;
- }
- /* 导航和侧边栏宽度分配 */
- body.mod_third .left_nav {
- width: 21%;
- }
- body.mod_third .main_sidebar {
- width: 21%;
- }
- body.mod_third .page_main {
- width: 58%; /* 主内容区 */
- }
+ /* --- 你提供的统一布局样式 --- */
+ body.mod_third .main_wrap,
+ body.mod_third .go_top_box {
+ max-width: 1400px;
+ }
- /* 底部导航栏和背景音乐盒定位 */
- body.mod_third .footer_nav {
- max-width: 1108px;
- }
- body.mod_third .bgm_box {
- margin-left: -75px;
- }
+ /* 导航和侧边栏宽度分配 */
+ body.mod_third .left_nav {
+ width: 21%;
+ }
- /* --- 桌面端通用的基础样式合并 (源自原1440/1920) --- */
- .footer_top, .footer_text {
- font-size: 12px;
- }
+ body.mod_third .main_sidebar {
+ width: 21%;
+ }
- .land_content {
- max-width: 1080px;
- height: 607px;
- }
+ body.mod_third .page_main {
+ width: 58%;
+ /* 主内容区 */
+ }
- .land_right {
- padding: 40px;
- padding-top: 60px;
- }
+ /* 底部导航栏和背景音乐盒定位 */
+ body.mod_third .footer_nav {
+ max-width: 1108px;
+ }
- .land_logo {
- margin-bottom: 30px;
- }
+ body.mod_third .bgm_box {
+ margin-left: -75px;
+ }
- .land_right .title {
- font-size: 32px;
- }
+ /* --- 桌面端通用的基础样式合并 (源自原1440/1920) --- */
+ .footer_top,
+ .footer_text {
+ font-size: 12px;
+ }
- .land_right .land_des {
- font-size: 14px;
- }
+ .land_content {
+ max-width: 1080px;
+ height: 607px;
+ }
- .land_right .footer {
- padding: 0 40px;
- }
+ .land_right {
+ padding: 40px;
+ padding-top: 60px;
+ }
+
+ .land_logo {
+ margin-bottom: 30px;
+ }
+
+ .land_right .title {
+ font-size: 32px;
+ }
+
+ .land_right .land_des {
+ font-size: 14px;
+ }
+
+ .land_right .footer {
+ padding: 0 40px;
+ }
}
/**
@@ -91,11 +97,14 @@
padding: 0 40px;
}
- .land_nav a span , .land_nav a i {
+ .land_nav a span,
+ .land_nav a i {
font-size: 14px;
}
- body.mod_third .main_wrap , body.mod_third .go_top_box , body.mod_third .footer_nav {
+ body.mod_third .main_wrap,
+ body.mod_third .go_top_box,
+ body.mod_third .footer_nav {
max-width: 860px;
}
@@ -103,7 +112,7 @@
display: none;
}
- body.mod_third #top_third{
+ body.mod_third #top_third {
display: flex;
}
@@ -118,7 +127,7 @@
body.mod_third .top_bar {
border-top-right-radius: 12px;
}
-}
+}
/**
* 平板端及以下 (<= 1200px)
@@ -201,17 +210,21 @@
margin: 0;
}
- .land_right .beian , .land_right .copyright {
+ .land_right .beian,
+ .land_right .copyright {
color: #293563;
}
-}
+}
/**
* 小屏平板 (<= 960px)
* 保持原样
*/
@media only screen and (max-width:960px) {
- .main_wrap , .top_bar , .footer_nav {
+
+ .main_wrap,
+ .top_bar,
+ .footer_nav {
max-width: 720px;
}
@@ -219,7 +232,8 @@
margin-top: 0;
}
- .lbc .page_main , .lbc .footer_nav_box .right {
+ .lbc .page_main,
+ .lbc .footer_nav_box .right {
width: 100%;
}
@@ -237,7 +251,9 @@
display: none;
}
- body.mod_third .main_wrap, body.mod_third .go_top_box, body.mod_third .footer_nav {
+ body.mod_third .main_wrap,
+ body.mod_third .go_top_box,
+ body.mod_third .footer_nav {
max-width: 720px;
}
@@ -249,7 +265,7 @@
display: none;
}
- body.mod_third_s #top_third{
+ body.mod_third_s #top_third {
display: block;
}
@@ -260,17 +276,19 @@
.top_menu_box {
border-radius: 8px;
}
-}
+}
/**
* 手机端 (<= 540px)
* 保持原样
*/
@media only screen and (max-width:540px) {
- body.mod_third_s #top_third,body.mod_third #top_third{
+
+ body.mod_third_s #top_third,
+ body.mod_third #top_third {
display: flex;
}
-
+
.top_right {
margin-right: 15px;
justify-content: flex-end;
@@ -282,11 +300,15 @@
height: 54px;
}
- .moment_cat_nav, .posts_cat_nav, .photos_cat_nav {
+ .moment_cat_nav,
+ .posts_cat_nav,
+ .photos_cat_nav,
+ .friends_cat_nav {
padding: 15px;
}
- #post_item,#photos_item {
+ #post_item,
+ #photos_item {
padding: 0 15px;
}
@@ -305,7 +327,8 @@
margin-right: 12px;
}
- .normal_content .entry-content p, .normal_card_content .entry-content p {
+ .normal_content .entry-content p,
+ .normal_card_content .entry-content p {
display: none;
}
@@ -337,7 +360,9 @@
padding-bottom: 100px;
}
- .single_wrap .comments-area, .page_content .comments-area , .single_content .comments-area {
+ .single_wrap .comments-area,
+ .page_content .comments-area,
+ .single_content .comments-area {
padding: 15px;
}
@@ -351,7 +376,8 @@
padding-left: 50px;
}
- .comments-area ul.comment-list li .profile , .comments-area ul.comment-list li .profile a {
+ .comments-area ul.comment-list li .profile,
+ .comments-area ul.comment-list li .profile a {
width: 35px;
height: 35px;
}
@@ -360,12 +386,15 @@
width: calc(83px*3);
}
- .t_media_item , a.up_img_btn{
+ .t_media_item,
+ a.up_img_btn {
width: 80px;
height: 80px;
}
- .single_content, .page_content, .page_wrap {
+ .single_content,
+ .page_content,
+ .page_wrap {
padding: 0 15px;
padding-bottom: 100px;
}
@@ -378,7 +407,12 @@
bottom: 18%;
}
- .blog_list_inner , .single_content, .page_content, .page_wrap , .normal_list_inner , .single_wrap {
+ .blog_list_inner,
+ .single_content,
+ .page_content,
+ .page_wrap,
+ .normal_list_inner,
+ .single_wrap {
border-radius: 12px;
position: relative;
z-index: 199;
@@ -388,13 +422,14 @@
.top_left {
margin-left: 8px;
}
-
+
.top_left .top_logo {
display: block;
margin-left: 0;
}
- .top_bar , .dark .top_bar {
+ .top_bar,
+ .dark .top_bar {
height: 64px;
width: 100% !important;
border-radius: 0;
@@ -434,7 +469,8 @@
height: 240px;
}
- .top_bar.uk-sticky-fixed.uk-active , .dark .top_bar.uk-sticky-fixed.uk-active {
+ .top_bar.uk-sticky-fixed.uk-active,
+ .dark .top_bar.uk-sticky-fixed.uk-active {
background: transparent;
backdrop-filter: none;
-webkit-backdrop-filter: none;
@@ -452,7 +488,11 @@
background: rgb(27 29 48 / 80%);
}
- .top_tool i , .dark .top_tool i , .dark .mobile_active .top_tool i , .t_dark a i , .dark .t_dark a i {
+ .top_tool i,
+ .dark .top_tool i,
+ .dark .mobile_active .top_tool i,
+ .t_dark a i,
+ .dark .t_dark a i {
color: #fff;
}
@@ -460,7 +500,7 @@
color: #000000;
}
- .top_tool input.s_input:focus ~ [class*=ri-] {
+ .top_tool input.s_input:focus~[class*=ri-] {
color: #4f4f4f;
}
@@ -539,7 +579,8 @@
margin: 0;
}
- .land_right .beian , .land_right .copyright {
+ .land_right .beian,
+ .land_right .copyright {
color: #293563;
}
@@ -601,7 +642,8 @@
display: none;
}
- a.bg_music , .dark a.bg_music {
+ a.bg_music,
+ .dark a.bg_music {
background: transparent;
width: auto;
height: auto;
@@ -612,7 +654,12 @@
color: #fff;
}
- .player_mod .tool , a.m_prev , a.m_next , .timer , a.m_volume , .player_hand {
+ .player_mod .tool,
+ a.m_prev,
+ a.m_next,
+ .timer,
+ a.m_volume,
+ .player_hand {
display: none;
}
@@ -691,25 +738,28 @@
}
body.mod_third_s .footer_nav_box .right {
- width:100%;
+ width: 100%;
}
/* 手机端文章目录调整 */
h3.listree-titles {
font-size: 0.8rem;
- padding: 9px 0;
- margin: 0;
- display: flex;
- align-items: center;
- justify-content: center;
+ padding: 9px 0;
+ margin: 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
}
+
#listree-ol li a {
font-size: 0.8rem;
}
+
#listree-ol {
margin: 10px 0 15px -10px;
padding-right: 15px;
}
+
#listree-ol li {
line-height: 1.2;
margin-top: 6px;
@@ -721,9 +771,9 @@
.footer_menu a.playing-music i,
.footer_menu a.playing-music .title {
color: #4CAF50;
-}
+ }
+
-
}
\ No newline at end of file
diff --git a/templates/assets/js/anian.js b/templates/assets/js/anian.js
index 4302fde..2126557 100644
--- a/templates/assets/js/anian.js
+++ b/templates/assets/js/anian.js
@@ -4,7 +4,8 @@ function modify_m_bottom_music_button_link() {
if (!music) return;
music.addEventListener('click', function (event) {
event.preventDefault();
- mu_box_show();
+ if (!box_up) mu_box_show();
+ else mu_box_hide(0);
});
}
@@ -24,13 +25,209 @@ function modify_m_bottom_music_button_link() {
// });
// }
+// 登录逻辑
+let csrfToken = '';
+let publicKey = '';
+let loginTimer = null;
+let countdownSeconds = 3;
+const login_modal = document.getElementById('customLoginModal');
+const login_closeBtn = document.getElementById('closeLoginModal');
+const login_loginBtn = document.getElementById('customLoginBtn');
+
+// 获取令牌及公钥
+async function fetchCSRFToken() {
+ login_modal.classList.add('show');
+ login_loginBtn.disabled = true;
+ login_loginBtn.textContent = '加载中...';
+
+ try {
+ const response = await fetch('/login', { credentials: 'include' });
+ if (response.url.includes('/uc')) {
+ return 'logged';
+ }
+ const htmlText = await response.text();
+ const parser = new DOMParser();
+ const doc = parser.parseFromString(htmlText, 'text/html');
+ // 获取 CSRF Token
+ const csrfInput = doc.querySelector('input[name="_csrf"]');
+ if (!csrfInput || !csrfInput.value) {
+ throw new Error('页面未找到 CSRF 令牌');
+ }
+ csrfToken = csrfInput.value;
+ // 获取 PublicKey
+ const publicKeyMatch = htmlText.match(/const publicKey = "([^"]+)";/);
+ if (!publicKeyMatch || !publicKeyMatch[1]) {
+ throw new Error('页面未找到 PublicKey');
+ }
+ publicKey = publicKeyMatch[1].replace(/\\\//g, '/');
+ return 'ok';
+ } catch (err) {
+ return 'error';
+ }
+}
+
+// 打开弹窗逻辑
+async function open_login_box() {
+ if (loginTimer) {
+ clearInterval(loginTimer);
+ }
+ countdownSeconds = 3;
+ const success = await fetchCSRFToken();
+ if (success === 'logged') {
+ cocoMessage.success('您已经署名过了,请刷新');
+ login_modal.classList.remove('show');
+ } else if (success === 'ok') {
+ loginTimer = setInterval(() => {
+ if (countdownSeconds > 0) {
+ login_loginBtn.textContent = '请稍等...' + countdownSeconds;
+ } else {
+ clearInterval(loginTimer);
+ login_loginBtn.textContent = '署 名';
+ login_loginBtn.disabled = false;
+ }
+ countdownSeconds--;
+ }, 1000);
+ } else {
+ cocoMessage.error('服务器错误,请刷新');
+ login_modal.classList.remove('show');
+ }
+}
+
+// 关闭弹窗
+login_closeBtn.addEventListener('click', () => {
+ login_modal.classList.remove('show');
+});
+
+// 加密逻辑
+function encryptPassword(password) {
+ try {
+ const encrypt = new JSEncrypt();
+ encrypt.setPublicKey(publicKey);
+ return encrypt.encrypt(password);
+ } catch (e) {
+ return null;
+ }
+}
+
+// 提交登录
+login_loginBtn.addEventListener('click', async () => {
+ const username = document.getElementById('customUsername').value.trim();
+ const password = document.getElementById('customPassword').value.trim();
+ if (!username || !password) {
+ cocoMessage.warning('请先填写信息');
+ return;
+ }
+ const encryptedPwd = encryptPassword(password);
+ login_loginBtn.disabled = true;
+ login_loginBtn.textContent = '验证中...';
+ try {
+ countdownSeconds = 3
+ const response = await fetch('/login', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/x-www-form-urlencoded',
+ },
+ credentials: 'include',
+ body: new URLSearchParams({
+ _csrf: csrfToken,
+ username: username,
+ password: encryptedPwd,
+ 'remember-me': 'true'
+ })
+ });
+ // 核心细节:判断最终落点 URL
+ const finalUrl = response.url;
+ if (loginTimer) {
+ clearInterval(loginTimer);
+ }
+ if (finalUrl.includes('/uc')) {
+ cocoMessage.success('署名成功,正在跳转...');
+ login_loginBtn.textContent = '跳转中...';
+ setTimeout(() => {
+ window.location.reload();
+ }, 800);
+ } else if (finalUrl.includes('error=invalid-credential')) {
+ cocoMessage.warning('署名人与心上锁不匹配');
+ fetchCSRFToken();
+ } else {
+ cocoMessage.error('速度过快,请稍后重试');
+ }
+ } catch (err) {
+ cocoMessage.error('服务器连接失败');
+ } finally {
+ loginTimer = setInterval(() => {
+ if (countdownSeconds > 0) {
+ login_loginBtn.textContent = '请稍等...' + countdownSeconds;
+ } else {
+ clearInterval(loginTimer);
+ login_loginBtn.textContent = '署 名';
+ login_loginBtn.disabled = false;
+ }
+ countdownSeconds--;
+ }, 1000);
+ }
+});
+
+// 回车登录
+document.addEventListener("keydown", function (e) {
+ if (e.key === "Enter") {
+ const modal = document.getElementById("customLoginModal");
+ if (modal.classList.contains("show")) {
+ document.getElementById("customLoginBtn").click();
+ }
+ }
+});
+// 退出登录
+async function customLogout() {
+ try {
+ const getResponse = await fetch('/logout', { credentials: 'include' });
+ const htmlText = await getResponse.text();
+ const parser = new DOMParser();
+ const doc = parser.parseFromString(htmlText, 'text/html');
+ const logoutCsrfToken = doc.querySelector('input[name="_csrf"]')?.value;
+ if (!logoutCsrfToken) {
+ cocoMessage.error('页面未找到 CSRF 令牌');
+ return;
+ }
+ const postResponse = await fetch('/logout', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/x-www-form-urlencoded',
+ },
+ credentials: 'include',
+ body: new URLSearchParams({
+ '_csrf': logoutCsrfToken
+ })
+ });
+ if (postResponse.ok) {
+ cocoMessage.success('您已成功退出登录');
+ setTimeout(() => {
+ window.location.reload();
+ }, 800);
+ } else {
+ throw new Error('退出请求被拒绝');
+ }
+ } catch (err) {
+ console.error('Logout Error:', err);
+ cocoMessage.error('退出失败,请手动刷新页面');
+ }
+}
+function showPixarCard() {
+ const wrapper = document.getElementById("pixarNoticeWrapper");
+ wrapper.style.display = "flex";
+}
+function hidePixarCard() {
+ const wrapper = document.getElementById("pixarNoticeWrapper");
+ wrapper.style.display = "none";
+}
-
-
+function confirmPixarAction() {
+ customLogout();
+}
diff --git a/templates/assets/js/app.js b/templates/assets/js/app.js
index 5d9eb21..f95ae6f 100644
--- a/templates/assets/js/app.js
+++ b/templates/assets/js/app.js
@@ -3,34 +3,70 @@ var storage = window.localStorage;
var lazyLoadInstance = new LazyLoad({});
-$(document).on('click', '.left_menu_box ul li a , .widget_nav_menu ul li a, .menu-top-container ul li a', function () {
- var t = $(this);
- t.siblings("ul").slideToggle(200);
- t.parent().siblings().find("ul").hide(200);
- if (t.parent().hasClass('has_children')) {
- t.find('.drop_icon').toggleClass('up');
- }
- $('.left_menu_box ul li').removeClass('current-pjax-item current-menu-item current-menu-parent current-menu-ancestor');
- t.parent().addClass('current-pjax-item');
-});
+// $(document).on('click', '.left_menu_box ul li a , .widget_nav_menu ul li a, .menu-top-container ul li a', function () {
+// var t = $(this);
+// t.siblings("ul").slideToggle(200);
+// t.parent().siblings().find("ul").hide(200);
+// if (t.parent().hasClass('has_children')) {
+// t.find('.drop_icon').toggleClass('up');
+// }
+// $('.left_menu_box ul li').removeClass('current-pjax-item current-menu-item current-menu-parent current-menu-ancestor');
+// t.parent().addClass('current-pjax-item');
+// });
-var route = location.href.substring(0, location.href.indexOf('?') === -1 ? (location.href.indexOf('#') === -1 ? location.href.length : location.href.indexOf('#')) : location.href.indexOf('?'))
+function highlightMenu() {
+ $('.left_menu_box ul li').removeClass('current-pjax-item')
+ // 路径映射表
+ const pathMap = {
+ '/moments': '/',
+ '/tags': '/content',
+ '/archives': '/archives',
+ '/categories': '/content'
+ }
-$('.left_menu_box ul li a').each((i, e) => {
- if (e.parentElement.childNodes.length > 3) {
- return
+ // 获取清洗后的 pathname(去掉 ? 和 #)
+ function getPathname(url) {
+ const cleanUrl = url.substring(0,
+ url.indexOf('?') === -1
+ ? (url.indexOf('#') === -1 ? url.length : url.indexOf('#'))
+ : url.indexOf('?')
+ )
+ return new URL(cleanUrl).pathname
}
- let href = e.href.substring(0, e.href.indexOf('?') === -1 ? (e.href.indexOf('#') === -1 ? e.href.length : e.href.indexOf('#')) : e.href.indexOf('?'))
- if (route === href) {
- e.parentElement.classList.add('current-pjax-item')
+
+ // 从长到短匹配路径映射(支持 /categories/shi 匹配 /categories)
+ function getTargetPathname(pathname) {
+ const segments = pathname.split('/').filter(Boolean)
+ for (let i = segments.length; i >= 0; i--) {
+ const currentPath = '/' + segments.slice(0, i).join('/')
+ if (pathMap[currentPath]) return pathMap[currentPath]
+ }
+ return pathname // 无映射则返回原路径
}
-})
-$('.left_menu_box ul li ul li a').each((i, e) => {
- let href = e.href.substring(0, e.href.indexOf('?') === -1 ? (e.href.indexOf('#') === -1 ? e.href.length : e.href.indexOf('#')) : e.href.indexOf('?'))
- if (route === href) {
- e.parentElement.parentElement.parentElement.classList.add('current-pjax-item')
+
+ const currentPathname = getPathname(location.href)
+ const targetPathname = getTargetPathname(currentPathname)
+ let hasMatched = false
+
+ // 遍历一级菜单匹配
+ $('.left_menu_box ul li a').each((i, e) => {
+ const menuPathname = getPathname(e.href)
+ if (targetPathname === menuPathname) {
+ e.parentElement.classList.add('current-pjax-item')
+ hasMatched = true
+ }
+ })
+
+ // 兜底匹配 /navigator
+ if (!hasMatched) {
+ $('.left_menu_box ul li a').each((i, e) => {
+ const menuPathname = getPathname(e.href)
+ if (menuPathname === '/navigator') {
+ e.parentElement.classList.add('current-pjax-item')
+ }
+ })
}
-})
+}
//全局loading
@@ -824,7 +860,7 @@ function get_moment_error(type) {
}
}
-// ajax 分类筛选 moment
+// ajax分类筛选 moment
$(document).on('click', '.moment_cat_nav ul li a', function () {
var $this = $(this);
if ($this.hasClass('disabled')) {
@@ -836,9 +872,13 @@ $(document).on('click', '.moment_cat_nav ul li a', function () {
var formHtml = $("#t_commentform").prop('outerHTML');
temp.html(formHtml);
+ // --- 1. 保存旧内容---
+ var $momentList = $(".moment_list");
+ var oldContent = $momentList.html();
+ var oldPagination = $('#t_pagination').prop('outerHTML');
+
$(".moment_list").empty();
$('#t_pagination a').hide();
- $this.addClass('active').parent().siblings().children().removeClass('active');
var cat = $this.attr('data');
@@ -849,6 +889,7 @@ $(document).on('click', '.moment_cat_nav ul li a', function () {
$('.moment_list').html('');
},
success: function (data) {
+ $this.addClass('active').parent().siblings().children().removeClass('active');
$('.moment_list .loading_box').remove();
var result = $(data).find(".moment_list .p_item");
$(".moment_list").append(result.fadeIn(300));
@@ -880,17 +921,140 @@ $(document).on('click', '.moment_cat_nav ul li a', function () {
} else {
history.pushState({ url: cat }, '', '/');
}
- document.cookie = "page=; path=/; domain=anian.cc; max-age=0";
+ if (!$.cookie('scrollParam')) {
+ $.removeCookie('page', { path: '/', domain: 'anian.cc' });
+ }
+ if (window._tagSwitchCallback) {
+ window._tagSwitchCallback.resolve(); // 标记成功
+ window._tagSwitchCallback = null; // 清理临时变量
+ }
+ },
+ error: function () {
+ $('.moment_cat_nav ul li a').removeClass('disabled');
+ cocoMessage.error('内容获取失败');
+ $('.moment_list .loading_box').remove();
+ // 恢复列表内容
+ $momentList.html(oldContent);
+ if ($('#t_pagination').length > 0) {
+ $('#t_pagination').replaceWith(oldPagination);
+ } else {
+ $momentList.after(oldPagination);
+ }
+ if (window._tagSwitchCallback) {
+ window._tagSwitchCallback.reject(); // 标记失败
+ window._tagSwitchCallback = null; // 清理临时变量
+ }
}
});
});
+// ajax分类筛选朋友圈
+$(document).on('click', '.friends_cat_nav .cat-link', function () {
+ var $this = $(this);
+ if ($this.hasClass('disabled')) {
+ return false;
+ }
+ $('.friends_cat_nav .cat-link').addClass('disabled');
+
+ // 保留原有的表单重置逻辑(如果不需要可删除)
+ var temp = $("#comment_form_reset");
+ var formHtml = $("#t_commentform").prop('outerHTML');
+ temp.html(formHtml);
+
+ // --- 1. 保存旧内容---
+ var $momentList = $(".moment_list");
+ var oldContent = $momentList.html();
+ var oldPagination = $('#t_pagination').prop('outerHTML');
+
+ // 清空列表并隐藏分页
+ $(".moment_list").empty();
+ $('#t_pagination a').hide();
+
+ // 获取目标 URL(注意这里用的是 data-href)
+ var url = $this.attr('data-href');
+
+ $.ajax({
+ type: "GET",
+ url: url,
+ beforeSend: function () {
+ // 显示加载动画
+ $('.moment_list').html('');
+ },
+ success: function (data) {
+ $this.addClass('active').parent().siblings().children().removeClass('active');
+ // 移除加载动画
+ $('.moment_list .loading_box').remove();
+
+ // 提取并插入新的列表项
+ var result = $(data).find(".moment_list .p_item");
+ $(".moment_list").append(result.fadeIn(300));
+
+ // 处理分页逻辑
+ var $newPagination = $(data).find("#t_pagination");
+ var newHref = $newPagination.find("a").attr("data");
+
+ // 检查当前页面是否有分页容器,如果没有则补齐
+ if ($('#t_pagination').length === 0 && $newPagination.length > 0) {
+ $(".moment_list").after($newPagination.prop('outerHTML'));
+ }
+
+ var $paginationBtn = $('#t_pagination a');
+
+ if (newHref === undefined) {
+ $paginationBtn.hide();
+ } else {
+ $paginationBtn.attr("data", newHref).text(Theme.site_page).show();
+ $('#t_pagination').show();
+ }
+
+ // --- 功能初始化区域(根据您的实际情况启用/禁用) ---
+ if (typeof lazyLoadInstance !== 'undefined') lazyLoadInstance.update();
+ $('.friends_cat_nav .cat-link').removeClass('disabled');
+ initializeMomentFold();
+
+ // 更新浏览器历史状态
+ url = url.replace('author', 'tag');
+ history.pushState({ url: url }, '', url);
+
+ // 清除分页 cookie(保持原样)
+ if (!$.cookie('scrollParam')) {
+ $.removeCookie('page', { path: '/', domain: 'anian.cc' });
+ }
+
+ if (window._tagSwitchCallback) {
+ window._tagSwitchCallback.resolve(); // 标记成功
+ window._tagSwitchCallback = null; // 清理临时变量
+ }
+ },
+ error: function () {
+ $('.friends_cat_nav .cat-link').removeClass('disabled');
+ if (window._tagSwitchCallback) {
+ window._tagSwitchCallback.reject(); // 标记失败
+ window._tagSwitchCallback = null; // 清理临时变量
+ }
+ cocoMessage.error('内容获取失败');
+ $('.moment_list .loading_box').remove();
+ // 恢复列表内容
+ $momentList.html(oldContent);
+ if ($('#t_pagination').length > 0) {
+ $('#t_pagination').replaceWith(oldPagination);
+ } else {
+ $momentList.after(oldPagination);
+ }
+ }
+ });
+});
//ajax加载片刻
$(document).on('click', '#t_pagination a', function () {
const postListElement = document.getElementById("post_item");
var href = $(this).attr('data');
const currentPage = parseInt(href.match(/\d+/)[0]);
+ const $pagingArea = $('#t_pagination .post-paging');
+ const originalPagingHtml = $pagingArea.html();
+ const isauto_loading = window.isAutoLoading
+ if (window.isAutoLoading) window.isAutoLoading = false;
+
$.ajax({
type: "GET",
url: href,
@@ -898,91 +1062,74 @@ $(document).on('click', '#t_pagination a', function () {
$('#t_pagination .post-paging').html('');
},
success: function (posts) {
-
if (posts) {
-
var result = $(posts).find(".moment_list .p_item");
$('#t_pagination .post-paging').html(`${Theme.site_page}`);
$(".moment_list").append(result.fadeIn(300));
window.pjax && window.pjax.refresh(postListElement)
- var newhref = $(posts).find("#t_pagination a").attr("data"); //找出新的下一页链接
+ var newhref = $(posts).find("#t_pagination a").attr("data");
if (newhref != undefined) {
$("#t_pagination a").attr("data", newhref);
$('#t_pagination a').show();
} else {
- $("#t_pagination a").hide(); //如果没有下一页了,隐藏
+ $("#t_pagination a").hide();
}
-
- $body.animate({ scrollTop: result.offset().top - 58 }, 500);
+ if (isauto_loading) {
+ if (window.scroll_param > result.offset().top - 58) {
+ $body.animate({ scrollTop: result.offset().top - 58 }, 500);
+ } else {
+ window.forceStopLoading = true;
+ }
+ } else $body.animate({ scrollTop: result.offset().top - 58 }, 500);
getMomentAudio();
initAgree();
-
lazyLoadInstance.update();
initializeMomentFold();
- // modify_moment_video_size();
- document.cookie = `page=${encodeURIComponent(currentPage)}; path=/; domain=anian.cc`;
+ $.cookie('page', currentPage, { path: '/', domain: 'anian.cc' });
} else {
$('#t_pagination a').hide();
}
-
-
+ },
+ error: function () {
+ $pagingArea.html(originalPagingHtml);
+ $('#t_pagination a').show();
+ cocoMessage.error('内容获取失败');
}
});
return false;
-
});
-
-// 图库分类切换 AJAX (完整版)
+// AJAX分类切换图库
$(document).ready(function () {
- // 1. 先解绑旧事件,防止重复绑定导致的冲突
- $(document).off('click', '#cat_nav_items a.cat-link');
-
- // 2. 绑定新的点击事件
- $(document).on('click', '#cat_nav_items a.cat-link', function (e) {
- // 阻止默认行为
- e.preventDefault();
- e.stopPropagation();
- e.stopImmediatePropagation();
-
+ $(document).on('click', '.photos_cat_nav ul li a', function (e) {
var $this = $(this);
- // 3. 状态检查
if ($this.hasClass('disabled') || $this.hasClass('active')) {
return false;
}
- // 获取 AJAX 请求地址 (用于后端获取数据)
var url = $this.data('href');
if (!url) {
- console.error('未找到分类链接地址');
return false;
}
- // --- 【新增逻辑 1】准备要显示在浏览器地址栏的 URL ---
- // 获取链接的纯文本内容(即中文分类名,如“苏州”)
- // clone() 后移除 span 再取 text,防止“全部”后面的空格干扰
var tagText = $this.clone().find('span').remove().end().text().trim();
var displayUrl;
if (tagText === '全部') {
displayUrl = '/photos';
} else {
- // 使用 encodeURIComponent 处理中文,防止 URL 乱码
displayUrl = '/photos?tag=' + encodeURIComponent(tagText);
}
- // ----------------------------------------------------
- // 4. UI 状态更新
- $('#cat_nav_items a').addClass('disabled');
- $this.addClass('active')
- .parent()
- .siblings()
- .children('a')
- .removeClass('active');
+ $('.posts_cat_nav ul li a').addClass('disabled');
+
+ // --- 1. 保存旧内容 (关键修改) ---
+ var $photosItem = $("#photos_item");
+ var oldPhotosContent = $photosItem.html(); // 保存图库列表内容
+ var oldPagination = $('#p_pagination').length > 0 ? $('#p_pagination').prop('outerHTML') : ''; // 保存分页结构
- // 5. 发起 AJAX 请求
$.ajax({
type: "GET",
url: url,
@@ -993,13 +1140,12 @@ $(document).ready(function () {
$('#p_pagination').hide();
},
success: function (data) {
+ $this.addClass('active').parent().siblings().children().removeClass('active');
var $data = $(data);
- // 6. 替换相册列表内容
var newContent = $data.find("#photos_item").html();
$("#photos_item").html(newContent);
- // 7. 同步更新分页区域
var $newPagination = $data.find("#p_pagination");
if ($newPagination.length > 0) {
var newHref = $newPagination.find("a").attr("data");
@@ -1017,7 +1163,6 @@ $(document).ready(function () {
$('#p_pagination').hide();
}
- // 8. 重新初始化插件
if (typeof pix !== 'undefined' && pix.initGalleryPhotos) {
pix.initGalleryPhotos();
}
@@ -1025,22 +1170,36 @@ $(document).ready(function () {
waterfall('.gallery-photos');
}
- // 9. 恢复点击状态
- $('#cat_nav_items a').removeClass('disabled');
+ $('.posts_cat_nav ul li a').removeClass('disabled');
- // --- 【新增逻辑 2】修改浏览器 URL ---
- // 使用 pushState 更新地址栏,不刷新页面
- // 参数:state对象, 标题, 新URL
history.pushState({ path: displayUrl }, '', displayUrl);
- // ----------------------------------
- // 10. 清理分页 Cookie
- document.cookie = "page=; path=/; domain=anian.cc; max-age=0";
+ if (!$.cookie('scrollParam')) {
+ $.removeCookie('page', { path: '/', domain: 'anian.cc' });
+ }
+ if (window._tagSwitchCallback) {
+ window._tagSwitchCallback.resolve(); // 标记成功
+ window._tagSwitchCallback = null; // 清理临时变量
+ }
},
error: function () {
- $('#cat_nav_items a').removeClass('disabled');
+ // --- 2. 还原旧内容 (关键修改) ---
+ $photosItem.html(oldPhotosContent); // 恢复图库列表内容
+
+ // 恢复分页结构
+ if (oldPagination) {
+ if ($('#p_pagination').length > 0) {
+ $('#p_pagination').replaceWith(oldPagination);
+ } else {
+ $photosItem.after(oldPagination);
+ }
+ }
+ $('.posts_cat_nav ul li a').removeClass('disabled');
cocoMessage.error('内容获取失败');
- $("#photos_item").empty();
+ if (window._tagSwitchCallback) {
+ window._tagSwitchCallback.reject(); // 标记失败
+ window._tagSwitchCallback = null; // 清理临时变量
+ }
}
});
@@ -1048,11 +1207,15 @@ $(document).ready(function () {
});
});
-
//ajax加载图库
$(document).on('click', '#p_pagination a', function () {
var href = $(this).attr('data');
const currentPage = parseInt(href.match(/\d+/)[0]);
+ const $pagingArea = $('#p_pagination .post-paging');
+ const originalPagingHtml = $pagingArea.html();
+ const targetOffsetTop = $('#p_pagination a').offset().top;
+ const isauto_loading = window.isAutoLoading
+ if (window.isAutoLoading) window.isAutoLoading = false;
$.ajax({
type: "GET",
url: href,
@@ -1064,24 +1227,33 @@ $(document).on('click', '#p_pagination a', function () {
var result = $(photos).find(".norpost_list .gallery-photo");
$('#p_pagination .post-paging').html(`
${Theme.site_page}`);
$(".gallery-photos").append(result.fadeIn(300));
-
var newhref = $(photos).find("#p_pagination a").attr("data"); //找出新的下一页链接
-
if (newhref != undefined) {
$("#p_pagination a").attr("data", newhref);
$('#p_pagination a').show();
} else {
$("#p_pagination a").hide(); //如果没有下一页了,隐藏
}
+ if (isauto_loading) {
+ if (window.scroll_param > targetOffsetTop - 358) {
+ $body.animate({ scrollTop: targetOffsetTop - 358 }, 500);
+ } else {
+ window.forceStopLoading = true;
+ }
+ } else $body.animate({ scrollTop: targetOffsetTop - 358 }, 500);
pix.initGalleryPhotos();
- document.cookie = `page=${encodeURIComponent(currentPage)}; path=/; domain=anian.cc`;
+ $.cookie('page', currentPage, { path: '/', domain: 'anian.cc' });
} else {
$('#p_pagination a').hide();
}
+ },
+ error: function () {
+ $pagingArea.html(originalPagingHtml);
+ $('#p_pagination a').show();
+ cocoMessage.error('内容获取失败');
}
});
return false;
-
});
//阅读更多按钮
@@ -1128,7 +1300,6 @@ $(document).on('click', '.up_like ', function () {
$(this).addClass('done');
var pid = $(this).data("id");
var key = $(this).data("key");
- // console.log(key)
let agreeArr = localStorage.getItem(`pix.upvoted.${key}.names`)
? JSON.parse(localStorage.getItem(`pix.upvoted.${key}.names`))
: [];
@@ -1225,52 +1396,10 @@ function getMomentAudio() {
}
}
-
-// 初始化:解析URL的tag参数,匹配对应分类(中文名称)并触发原有请求
-function initTagSwitch() {
- const pathname = window.location.pathname;
- const urlParams = new URLSearchParams(window.location.search);
- const activeTag = urlParams.get('tag');
-
- // 如果没有 tag 参数,直接退出
- if (!activeTag || activeTag.trim() === '') {
- return;
- }
-
- let targetLink = $(); // 初始化空 jQuery 对象
-
- // --- 1. 判断是否为 Posts (文章归档) 页面 ---
- if (pathname === '/archives') {
- targetLink = $('.posts_cat_nav ul li a').filter(function () {
- // 保持你原有的 Post 文本提取逻辑 (过滤文本节点)
- const linkText = $(this).contents().filter(function () {
- return this.nodeType === 3;
- }).text().trim();
- return linkText === activeTag;
- });
- }
-
- // --- 2. 判断是否为 Photos (相册) 页面 ---
- else if (pathname === '/photos') {
- targetLink = $('#cat_nav_items a.cat-link').filter(function () {
- // 使用针对相册 HTML 结构的文本提取逻辑 (移除 span 干扰)
- const linkText = $(this).clone().find('span').remove().end().text().trim();
- return linkText === activeTag;
- });
- }
-
- // --- 3. 如果找到了匹配的链接,触发点击 ---
- if (targetLink.length > 0) {
- // 确保 DOM 完全就绪后再点击,加个小延迟防止插件未绑定
- setTimeout(function () {
- targetLink.click();
- }, 50);
- }
-}
-
-// ajax分类筛选 posts(完全保留原有请求逻辑,仅新增tag参数URL同步)
+// ajax分类筛选 posts(首页片刻时改这个)
$(document).on('click', '.posts_cat_nav ul li a', function (e) {
e.preventDefault();
+ var $this = $(this);
const postListElement = document.getElementById("post_item");
var t = $('.posts_cat_nav ul li a');
@@ -1279,10 +1408,13 @@ $(document).on('click', '.posts_cat_nav ul li a', function (e) {
}
$('.posts_cat_nav ul li a').addClass('disabled');
+ // --- 1. 保存旧内容---
+ var $momentList = $(".norpost_list");
+ var oldContent = $momentList.html();
+ var oldPagination = $('#pagination').prop('outerHTML');
+
$(".norpost_list").empty();
$('#pagination a').hide();
- $(this).addClass('active');
- $(this).parent().siblings().children().removeClass('active');
var cat = $(this).attr('data');
// 替换:获取a标签内的中文文本并去除空格
@@ -1298,6 +1430,7 @@ $(document).on('click', '.posts_cat_nav ul li a', function (e) {
$('.norpost_list').html('
');
},
success: function (data) {
+ $this.addClass('active').parent().siblings().children().removeClass('active');
$('#pagination a').text(Theme.site_page);
var result = $(data).find(".norpost_list").children();
$(".norpost_list").append(result.fadeIn(300));
@@ -1325,19 +1458,42 @@ $(document).on('click', '.posts_cat_nav ul li a', function (e) {
newUrl = `${newUrl}?${urlParams.toString()}`;
}
history.pushState({ url: newUrl }, '', newUrl);
- document.cookie = "page=; path=/; domain=anian.cc; max-age=0";
+ if (!$.cookie('scrollParam')) {
+ $.removeCookie('page', { path: '/', domain: 'anian.cc' });
+ }
+ if (window._tagSwitchCallback) {
+ window._tagSwitchCallback.resolve(); // 标记成功
+ window._tagSwitchCallback = null; // 清理临时变量
+ }
},
error: function () {
$('.posts_cat_nav ul li a').removeClass('disabled');
+ cocoMessage.error('内容获取失败');
+ $('.norpost_list .loading_box').remove();
+ // 恢复列表内容
+ $momentList.html(oldContent);
+ if ($('#pagination').length > 0) {
+ $('#pagination').replaceWith(oldPagination);
+ } else {
+ $momentList.after(oldPagination);
+ }
+ if (window._tagSwitchCallback) {
+ window._tagSwitchCallback.reject(); // 标记失败
+ window._tagSwitchCallback = null; // 清理临时变量
+ }
}
});
});
-//首页ajax加载文章
+//ajax加载文章
$('body').on('click', '#pagination a', function () {
const postListElement = document.getElementById("post_item");
+ const $pagingArea = $('#pagination .post-paging');
+ const originalPagingHtml = $pagingArea.html();
var href = $(this).attr('data');
const currentPage = parseInt(href.match(/\d+/)[0]);
+ const isauto_loading = window.isAutoLoading
+ if (window.isAutoLoading) window.isAutoLoading = false;
$.ajax({
type: "GET",
url: href,
@@ -1363,20 +1519,40 @@ $('body').on('click', '#pagination a', function () {
} else {
$("#pagination a").hide(); //如果没有下一页了,隐藏
}
- $body.animate({ scrollTop: result.offset().top - 58 }, 500);
+ if (isauto_loading) {
+ if (window.scroll_param > result.offset().top - 58) {
+ $body.animate({ scrollTop: result.offset().top - 58 }, 500);
+ } else {
+ window.forceStopLoading = true;
+ }
+ } else $body.animate({ scrollTop: result.offset().top - 58 }, 500);
initAgree()
lazyLoadInstance.update();
- document.cookie = `page=${encodeURIComponent(currentPage)}; path=/; domain=anian.cc`;
+ $.cookie('page', currentPage, { path: '/', domain: 'anian.cc' });
+ } else {
+ $("#pagination a").hide();
}
-
+ },
+ error: function () {
+ $pagingArea.html(originalPagingHtml);
+ $('#pagination a').show();
+ cocoMessage.error('内容获取失败');
}
});
return false;
});
-//分类页面文章加载
+// ajax加载分类页面文章
$('body').on('click', '.arc_pagenav a', function () {
+ // 【新增】保存分页区域的原始HTML,用于失败时恢复
+ const $pagingArea = $('.arc_pagenav');
+ const originalPagingHtml = $pagingArea.html();
const postListElement = document.getElementById("post_item");
+ const isauto_loading = window.isAutoLoading
+ if (window.isAutoLoading) window.isAutoLoading = false;
+ var href = $(this).attr('data');
+ const currentPage = parseInt(href.match(/\d+/)[0]);
+
$(this).hide();
var content = $('.norpost_list');
var href = $(this).attr('data');
@@ -1405,10 +1581,20 @@ $('body').on('click', '.arc_pagenav a', function () {
}
$('.arc_pagenav .uk-spinner').remove();
-
- $body.animate({ scrollTop: post.offset().top - 58 }, 500);
+ if (isauto_loading) {
+ if (window.scroll_param > post.offset().top - 58) {
+ $body.animate({ scrollTop: post.offset().top - 58 }, 500);
+ } else {
+ window.forceStopLoading = true;
+ }
+ } else $body.animate({ scrollTop: post.offset().top - 58 }, 500);
initAgree()
lazyLoadInstance.update();
+ $.cookie('page', currentPage, { path: '/', domain: 'anian.cc' });
+ },
+ error: function () {
+ $pagingArea.html(originalPagingHtml);
+ cocoMessage.error('内容获取失败');
}
});
}
@@ -1445,10 +1631,12 @@ $(document).ready(function (e) {
$('.top_bar').removeClass('mobile_active');
}
- if (b > 200) {
+ if (b > 1500) {
$('a.go_top').addClass('show');
+ $('a.tool_top').addClass('show');
} else {
$('a.go_top').removeClass('show');
+ $('a.tool_top').removeClass('show');
}
});
@@ -1523,13 +1711,11 @@ $('body').on('click', '.top_s_box a', function () {
//黑暗模式
$('body').on('click', '.t_dark a', function () {
- var date = new Date();
- date.setTime(date.getTime() + (3 * 60 * 60 * 1000));
var t = $('html');
if (t.hasClass('dark')) {
- document.cookie = "dark=normal;path=/;domain=anian.cc;expires=" + date.toGMTString();
+ $.cookie('dark', 'normal', { path: '/', domain: 'anian.cc', expires: 30 });
} else {
- document.cookie = "dark=dark;path=/;domain=anian.cc;expires=" + date.toGMTString();
+ $.cookie('dark', 'dark', { path: '/', domain: 'anian.cc', expires: 30 });
}
t.toggleClass('dark');
@@ -1590,12 +1776,16 @@ $('body').on('click', '.yiyan_box .change', function () {
targetElement.setAttribute("uk-tooltip", data.from);
}
})
- .catch(console.error);
});
$('.yiyan_box .change').click();
//pjax
+
+$(document).on('pjax:error', function (event, xhr, textStatus, errorThrown, options) {
+ cocoMessage.error('加载失败!');
+});
+
if (Theme.pjax) {
let pjaxSelectors = ["head title", "#pjax-container", ".pjax"]
var pjax = new Pjax({
@@ -1617,7 +1807,7 @@ if (Theme.pjax) {
initBlog();
refreshCommentWidget();
NProgress.done();
- document.cookie = "page=; path=/; domain=anian.cc; max-age=0";
+ $.removeCookie('page', { path: '/', domain: 'anian.cc' });
})
}
@@ -1647,7 +1837,6 @@ function refreshCommentWidget() {
}
$('body').on('click', '.msg_modal_inner .unread_box .box .mark_read', function (e) {
- // console.log(e)
let msg_name = $(this).parent()[0].getAttribute('msg-name')
let username = Theme.username
$.ajax({
@@ -1872,37 +2061,54 @@ $(document).ready(function () {
})
})
-//菜单高亮
+// 手机端底部菜单高亮
function highlightActiveMenu() {
let currentPath = window.location.pathname.replace(/\/+$/, "");
- if (currentPath === "") currentPath = "/";
-
- const menuLinks = document.querySelectorAll('a[href]:not([href^="javascript"])');
-
- // 清除现有样式
- menuLinks.forEach(link => {
- link.style.color = "";
- const icon = link.querySelector("i");
- if (icon) icon.style.color = "";
- });
-
- // 高亮匹配项
- menuLinks.forEach(link => {
- let linkPath = link.getAttribute("href").replace(/\/+$/, "");
- if (linkPath === "") linkPath = "/";
-
- const isMatch =
- currentPath === linkPath ||
- (linkPath !== "/" && currentPath.startsWith(linkPath));
-
- if (isMatch) {
- link.style.color = "#4CAF50";
+ const pathParts = currentPath.split('/');
+ let firstLevelPath = '/' + (pathParts[1] || '');
+ if (firstLevelPath === '/') currentPath = '/';
+ const menuRules = {
+ diary: ['/', '/moments'],
+ composition: ['/content', '/categories', '/tags', '/archives'],
+ appendix: []
+ };
+ const footerMenu = document.querySelector('.footer_menu');
+ if (!footerMenu) return;
+ const diaryLi = footerMenu.querySelector('a[href="/"]').closest('li');
+ const compositionLi = footerMenu.querySelector('a[href="/archives"]').closest('li');
+ const appendixLi = footerMenu.querySelector('a[href="/navigator"]').closest('li');
+ const allMenuLis = footerMenu.querySelectorAll('.item li');
+ allMenuLis.forEach(li => {
+ li.classList.remove('active');
+ const link = li.querySelector('a');
+ if (link) {
+ link.classList.remove('active');
+ link.style.color = "";
const icon = link.querySelector("i");
- if (icon) icon.style.color = "#4CAF50";
+ if (icon) icon.style.color = "";
}
});
+ const highlightMenu = (menuLi) => {
+ if (!menuLi) return;
+ const link = menuLi.querySelector('a');
+ menuLi.classList.add('active');
+ link.classList.add('active');
+ link.style.color = "#4CAF50";
+ const icon = link.querySelector("i");
+ if (icon) icon.style.color = "#4CAF50";
+ };
+ if (menuRules.diary.includes(firstLevelPath)) {
+ highlightMenu(diaryLi);
+ }
+ else if (menuRules.composition.includes(firstLevelPath)) {
+ highlightMenu(compositionLi);
+ }
+ else {
+ highlightMenu(appendixLi);
+ }
}
+
// 指定日期黑白效果
function setPageGrayscale() {
const dateList = ['12-13'];
@@ -1958,6 +2164,67 @@ function initializeMomentFold() {
});
}
+
+// // 更换banner函数封装(PJAX触发)
+// const bg1 = document.querySelector('.bg1');
+// const bg2 = document.querySelector('.bg2');
+// let bannerIndex = 0;
+// let isBg1Active = true;
+// let hasSingleBannerShown = false;
+
+// let bannerImages = [];
+
+// function preloadImage(url) {
+// return new Promise((resolve, reject) => {
+// const img = new Image();
+// img.onload = () => resolve(url);
+// img.onerror = reject;
+// img.src = url;
+// });
+// }
+
+// function changeBanner(url) {
+// const show = isBg1Active ? bg2 : bg1;
+// const hide = isBg1Active ? bg1 : bg2;
+
+// show.style.backgroundImage = `url(${url})`;
+// show.style.opacity = 1;
+
+// hide.style.opacity = 0;
+
+// isBg1Active = !isBg1Active;
+// }
+
+// async function safeChangeBanner(url) {
+// await preloadImage(url);
+// changeBanner(url);
+// }
+
+// function nextBanner() {
+// if (bannerImages.length < 1) return;
+
+// if (bannerImages.length === 1) {
+// // 第一次调用:显示图片并标记为已显示
+// if (!hasSingleBannerShown) {
+// safeChangeBanner(bannerImages[bannerIndex]);
+// hasSingleBannerShown = true;
+// }
+// // 非第一次调用:直接返回,不触发切换
+// return;
+// }
+
+// safeChangeBanner(bannerImages[bannerIndex]);
+// bannerIndex = (bannerIndex + 1) % bannerImages.length;
+// }
+
+// // 重置状态函数
+// function resetBannerState() {
+// bannerIndex = 0;
+// isBg1Active = true;
+// hasSingleBannerShown = false;
+// }
+
+
// 更换背景函数封装
function setFixedBackground(bgImageUrl) {
const body = document.body;
@@ -1965,65 +2232,6 @@ function setFixedBackground(bgImageUrl) {
body.style.backgroundImage = `url('${bgImageUrl}')`;
}
-// 更换banner函数封装(PJAX触发)
-const bg1 = document.querySelector('.bg1');
-const bg2 = document.querySelector('.bg2');
-let bannerIndex = 0;
-let isBg1Active = true;
-let hasSingleBannerShown = false;
-
-let bannerImages = [];
-
-function preloadImage(url) {
- return new Promise((resolve, reject) => {
- const img = new Image();
- img.onload = () => resolve(url);
- img.onerror = reject;
- img.src = url;
- });
-}
-
-function changeBanner(url) {
- const show = isBg1Active ? bg2 : bg1;
- const hide = isBg1Active ? bg1 : bg2;
-
- show.style.backgroundImage = `url(${url})`;
- show.style.opacity = 1;
-
- hide.style.opacity = 0;
-
- isBg1Active = !isBg1Active;
-}
-
-async function safeChangeBanner(url) {
- await preloadImage(url);
- changeBanner(url);
-}
-
-function nextBanner() {
- if (bannerImages.length < 1) return;
-
- if (bannerImages.length === 1) {
- // 第一次调用:显示图片并标记为已显示
- if (!hasSingleBannerShown) {
- safeChangeBanner(bannerImages[bannerIndex]);
- hasSingleBannerShown = true;
- }
- // 非第一次调用:直接返回,不触发切换
- return;
- }
-
- safeChangeBanner(bannerImages[bannerIndex]);
- bannerIndex = (bannerIndex + 1) % bannerImages.length;
-}
-
-// 重置状态函数
-function resetBannerState() {
- bannerIndex = 0;
- isBg1Active = true;
- hasSingleBannerShown = false;
-}
-
// 奇遇显示函数封装
function showCenterImage(imageUrl) {
const container = document.getElementById('centerImgContainer');
@@ -2078,129 +2286,51 @@ function showCenterImage(imageUrl) {
}
// 侧边栏农历信息显示函数
-function anian_renderLunarUI(data) {
+function anian_renderLunarUI() {
const textEl = document.getElementById('anianLunarText');
+ const cookieName = 'anian_lunar_info';
const defaultText = '一日不见如隔三秋';
+ const maxRetries = 20;
if (!textEl) return;
- if (!data) {
- textEl.innerHTML = defaultText;
- return;
- }
- const {
- ganzhiYear = '',
- lunarMonth = '',
- lunarDay = '',
- jieqi = '',
- jijie = '',
- traditionalFestival = ''
- } = data;
-
- let text = `${ganzhiYear}年${lunarMonth}${lunarDay}`;
-
- const extra = [];
- if (jieqi) extra.push(jieqi);
- if (traditionalFestival) extra.push(traditionalFestival);
-
- if (extra.length) {
- text += `
${extra.join(' · ')}`;
- }
-
- textEl.innerHTML = text;
-
- // 奇遇弹窗+背景图片设置
- if (jieqi === '大寒') {
- showCenterImage('/upload/qiyu-jieqi-dahan.png');
- // setFixedBackground('/upload/2025-12-2.png');
- }
-
- switch (jijie) {
- case "春季":
- bannerImages.push('/upload/dingbu-chun.png');
- break;
- case "夏季":
- bannerImages.push('/upload/dingbu-xia.png');
- break;
- case "秋季":
- bannerImages.push('/upload/dingbu-qiu.png');
- break;
- case "冬季":
- bannerImages.push('/upload/dingbu-dong.png');
- break;
- default:
- bannerImages.push('/upload/dingbu-siji.png');
- break;
- }
-
-
-
-
-
-}
-
-// Cookie 是否存在
-function anian_checkCookieExists(name) {
- return document.cookie.includes(`${name}=`);
-}
-
-// 写入当日有效 Cookie(23:59 失效)
-function anian_setDailyCookie(name, value) {
- const now = new Date();
- const china = new Date(now.getTime() + 8 * 3600 * 1000);
- const expires = new Date(Date.UTC(
- china.getUTCFullYear(),
- china.getUTCMonth(),
- china.getUTCDate(),
- 15, 59, 59
- ));
-
- document.cookie = `${name}=${encodeURIComponent(value)};expires=${expires.toUTCString()};path=/;domain=anian.cc`;
-}
-
-// 读取 Cookie
-function anian_getCookieValue(name) {
- const m = document.cookie.match(new RegExp(`(^| )${name}=([^;]+)`));
- return m ? decodeURIComponent(m[2]) : null;
-}
-
-// 获取农历数据并触发渲染
-function anian_handleLunarCookie() {
- const apiUrl = 'https://cn.apihz.cn/api/time/getday.php?id=10011724&key=0bdd2d8b3d97c0d476c98a41f108a96f';
- const cookieName = 'anian_lunar_info';
-
- // 优先使用缓存
- if (anian_checkCookieExists(cookieName)) {
- try {
- const data = JSON.parse(anian_getCookieValue(cookieName));
- anian_renderLunarUI(data);
+ const doRender = (data) => {
+ if (!data) {
+ textEl.innerHTML = defaultText;
return;
- } catch (_) { }
- }
+ }
- // 无缓存则请求 API
- fetch(apiUrl)
- .then(r => r.ok ? r.json() : Promise.reject())
- .then(data => {
- if (data.code !== 200) throw new Error();
+ const { ganzhiYear = '', lunarMonth = '', lunarDay = '', jieqi = '', jijie = '', traditionalFestival = '' } = data;
- const jieqi = (data.JIEQICN || '').includes('第1天') ? data.jieqi : '';
+ let text = `${ganzhiYear}年${lunarMonth}${lunarDay}`;
+ const extra = [];
+ if (jieqi) extra.push(jieqi);
+ if (traditionalFestival) extra.push(traditionalFestival);
+ if (extra.length) text += `
${extra.join(' · ')}`;
- const lunarInfo = {
- ganzhiYear: data.ganzhinian || '',
- lunarMonth: data.nyue || '',
- lunarDay: data.nri || '',
- jieqi: jieqi || '',
- jijie: data.jijie || '',
- traditionalFestival: data.YIFESTIVAL || ''
- };
+ textEl.innerHTML = text;
- anian_setDailyCookie(cookieName, JSON.stringify(lunarInfo));
- anian_renderLunarUI(lunarInfo);
- })
- .catch(() => {
- anian_renderLunarUI(null);
- });
+ if (jieqi === '大寒') showCenterImage('/upload/qiyu-jieqi-dahan.png');
+ // setFixedBackground('/upload/JX3WJ.mp4_20260207_022345.027.jpg');
+ };
+
+ const tryRender = (attempt) => {
+ let data = null;
+ try {
+ const cookieVal = anian_getCookie(cookieName);
+ if (cookieVal) data = JSON.parse(cookieVal);
+ } catch (_) {}
+
+ if (data) {
+ doRender(data);
+ } else if (attempt < maxRetries) {
+ setTimeout(() => tryRender(attempt + 1), 500);
+ } else {
+ doRender(null);
+ }
+ };
+
+ tryRender(0);
}
// 绿色数字时钟粒子效果
@@ -2356,86 +2486,40 @@ function initGreenDigitalClock() {
// 侧边栏公告提醒 - 多RSS监控版(精准到秒+无兜底)
const COOKIE_EXPIRE_YEARS = 10;
const NOTICE_DETAIL_PATH = '/notice';
-// 配置多个需要监控的RSS链接(可自由添加/删除)
const RSS_URLS = [
'https://git.anian.cc/anian/halo-theme-pix/releases.rss',
];
-// 读取Cookie
-function getCookie(name) {
- const cookieArr = document.cookie.split('; ');
- for (let cookie of cookieArr) {
- const [cookieName, cookieValue] = cookie.split('=');
- if (cookieName === name) {
- return decodeURIComponent(cookieValue);
- }
- }
- return null;
-}
-
-// 设置Cookie
-function setLongCookie(name, value) {
- const date = new Date();
- date.setTime(date.getTime() + (COOKIE_EXPIRE_YEARS * 365 * 24 * 60 * 60 * 1000));
- const expires = "expires=" + date.toUTCString();
- document.cookie = `${name}=${encodeURIComponent(value)}; ${expires}; path=/; domain=anian.cc`;
-}
-
-function setSessionCookie(name, value) {
- document.cookie = `${name}=${encodeURIComponent(value)}; path=/; domain=anian.cc`;
-}
-
-// 【核心改造】批量获取所有RSS的最新发布时间,拼接成唯一字符串
async function getAllLatestNoticeDatesFromRSS() {
try {
- // 1. 批量请求所有RSS链接(并行请求)
const rssResponses = await Promise.all(
RSS_URLS.map(url => fetch(url))
);
-
- // 2. 检查所有请求是否成功,失败则直接抛出错误
for (let [index, response] of rssResponses.entries()) {
if (!response.ok) {
throw new Error(`RSS ${RSS_URLS[index]} 请求失败:${response.status}`);
}
}
-
- // 3. 解析所有RSS的XML内容
const allPubDates = [];
for (let response of rssResponses) {
const xmlText = await response.text();
const parser = new DOMParser();
const xmlDoc = parser.parseFromString(xmlText, 'text/xml');
-
- // 4. 获取当前RSS下所有item的pubDate(也可只取第一个即最新的)
const items = xmlDoc.querySelectorAll('item');
if (items.length === 0) continue;
-
- // 5. 提取每个item的pubDate并格式化为「YYYY-MM-DD HH:mm:ss」
const itemDates = Array.from(items).map(item => {
const pubDateStr = item.querySelector('pubDate').textContent;
const pubDate = new Date(pubDateStr);
- // 格式化:年-月-日 时:分:秒(精准到秒,避免同日多版本)
return `${pubDate.getFullYear()}-${String(pubDate.getMonth() + 1).padStart(2, '0')}-${String(pubDate.getDate()).padStart(2, '0')}-${String(pubDate.getHours()).padStart(2, '0')}-${String(pubDate.getMinutes()).padStart(2, '0')}-${String(pubDate.getSeconds()).padStart(2, '0')}`;
});
-
- // 6. 取当前RSS的最新时间(数组最后一个是最早,第一个是最新),加入总列表
allPubDates.push(itemDates[0]);
}
+ const sortedDates = allPubDates.sort((a, b) => new Date(b) - new Date(a));
+ const combinedDateStr = sortedDates.join('_'); // 用_分隔多个日期
- // 7. 去重+按时间降序排序,拼接成唯一字符串(确保顺序固定)
- const uniqueDates = [...new Set(allPubDates)].sort((a, b) => new Date(b) - new Date(a));
- const combinedDateStr = uniqueDates.join('_'); // 用_分隔多个日期
-
- if (!combinedDateStr) {
- console.warn('获取最新版本失败');
- }
-
return combinedDateStr;
} catch (error) {
- console.error('获取RSS日期失败:', error);
- // 【关键】失败时返回null,不兜底
return null;
}
}
@@ -2447,7 +2531,7 @@ function markAsRead(combinedDateStr) {
const noticeBtn = document.getElementById('noticeBtn');
if (!noticeBubble || !noticeBtn) return;
- setLongCookie('latest_notice_date', combinedDateStr);
+ $.cookie('latest_notice_date', combinedDateStr, { path: '/', domain: 'anian.cc', expires: 365 });
noticeBubble.classList.remove('show');
noticeBtn.classList.remove('has-notice');
}
@@ -2456,7 +2540,7 @@ function markAsRead(combinedDateStr) {
function checkNoticeDetailPage(combinedDateStr) {
if (!combinedDateStr) return; // 无有效日期则不检查
const currentPath = window.location.pathname.replace(/\/$/, '');
- const local_notice = getCookie('latest_notice_date');
+ const local_notice = $.cookie('latest_notice_date');
const hasUnread = !local_notice || local_notice !== combinedDateStr;
if (currentPath === NOTICE_DETAIL_PATH && hasUnread) {
@@ -2464,7 +2548,7 @@ function checkNoticeDetailPage(combinedDateStr) {
}
}
-// 全局事件委托(修改版:复用初始化时的LATEST_NOTICE_DATE,不重新请求RSS)
+// 通知按钮绑定
function bindGlobalNoticeEvents(combinedDateStr) {
if (document.body.dataset.noticeEventsBound) return;
@@ -2488,7 +2572,7 @@ async function initNoticeTip() {
const noticeBtn = document.getElementById('noticeBtn');
if (!noticeBubble || !noticeBtn) return;
- const local_notice = getCookie('latest_notice_date');
+ const local_notice = $.cookie('latest_notice_date');
const hasUnread = !local_notice || local_notice !== combinedDateStr;
// 2. 只有RSS获取成功,才判断并显示/隐藏提醒
@@ -2504,250 +2588,96 @@ async function initNoticeTip() {
}
// 测速侧边栏
-const bubble = document.getElementById("anianxBubble"),
- bubbleText = document.getElementById("anianxBubbleText"),
- group = document.querySelector(".anianx-group"),
- main = document.querySelector('[data-anianx-type="main"]'),
- test = document.querySelector('[data-anianx-type="test"]'),
- sub = document.querySelector('[data-anianx-type="sub"]');
-let speedLock = false;
-let xianlu = 0;
-const hostname = location.hostname;
+const anianxSpeedBubble = document.getElementById("anianxBubble"),
+ anianxSpeedBubbleText = document.getElementById("anianxBubbleText"),
+ anianxSpeedGroup = document.querySelector(".anianx-group"),
+ anianxSpeedMainLine = document.querySelector('[data-anianx-type="main"]'),
+ anianxSpeedTestLine = document.querySelector('[data-anianx-type="test"]'),
+ anianxSpeedSubLine = document.querySelector('[data-anianx-type="sub"]');
+let anianxSpeedGlobalLock = false;
-function moveArrow(btn) {
+function anianxSpeedMoveArrow(btn) {
+ if (anianxSpeedGlobalLock) return;
const btnRect = btn.getBoundingClientRect(),
- groupRect = group.getBoundingClientRect(),
+ groupRect = anianxSpeedGroup.getBoundingClientRect(),
center = (btnRect.left - groupRect.left) + (btnRect.width / 2);
- bubble.style.setProperty("--anianx-arrow", center + "px");
+ anianxSpeedBubble.style.setProperty("--anianx-arrow", center + "px");
}
-if (hostname === "anian.cc") {
- xianlu = 1;
- main.classList.add("anianx-fixed");
- bubbleText.classList.remove("anianx-loading");
- bubbleText.innerText = "当前为主线路";
- moveArrow(main);
-} else if (hostname === "www.anian.cc") {
- xianlu = 2;
- sub.classList.add("anianx-fixed");
- bubbleText.classList.remove("anianx-loading");
- bubbleText.innerText = "当前为副线路";
- moveArrow(sub);
+if (location.hostname === "anian.cc") {
+ anianxSpeedMainLine.classList.add("anianx-fixed");
+ anianxSpeedBubbleText.classList.remove("anianx-loading");
+ anianxSpeedBubbleText.innerText = "当前为主线路";
+ anianxSpeedMoveArrow(anianxSpeedMainLine);
+} else if (location.hostname === "www.anian.cc") {
+ anianxSpeedSubLine.classList.add("anianx-fixed");
+ anianxSpeedBubbleText.classList.remove("anianx-loading");
+ anianxSpeedBubbleText.innerText = "当前为副线路";
+ anianxSpeedMoveArrow(anianxSpeedSubLine);
} else {
- bubbleText.classList.remove("anianx-loading");
- bubbleText.innerText = "当前线路未知";
- moveArrow(test);
+ anianxSpeedBubbleText.classList.remove("anianx-loading");
+ anianxSpeedBubbleText.innerText = "当前为测试线路";
+ anianxSpeedMoveArrow(anianxSpeedTestLine);
}
-main.addEventListener("click", () => {
- if (main.classList.contains("anianx-fixed")) {
- bubbleText.classList.remove("anianx-loading");
- bubbleText.innerText = "当前为主线路";
+anianxSpeedMainLine.addEventListener("click", () => {
+ if (anianxSpeedGlobalLock) return;
+ anianxSpeedGlobalLock = true;
+ if (anianxSpeedMainLine.classList.contains("anianx-fixed")) {
+ anianxSpeedBubbleText.classList.remove("anianx-loading");
+ anianxSpeedBubbleText.innerText = "当前为主线路";
+ anianxSpeedMoveArrow(anianxSpeedMainLine);
+ anianxSpeedGlobalLock = false;
} else {
- bubbleText.classList.add("anianx-loading");
- bubbleText.innerText = "正在切换至主线路";
- // 1. 获取当前滚动位置
+ anianxSpeedBubbleText.classList.add("anianx-loading");
+ anianxSpeedBubbleText.innerText = "正在切换至主线路";
+ anianxSpeedMoveArrow(anianxSpeedMainLine);
const currentScrollTop = window.scrollY || document.documentElement.scrollTop;
- document.cookie = `scrollParam=${currentScrollTop}; path=/; domain=anian.cc`;
- const finalUrl = main.dataset.anianxHref + location.pathname +
+ $.cookie('scrollParam', currentScrollTop, { path: '/', domain: 'anian.cc' });
+ const finalUrl = anianxSpeedMainLine.dataset.anianxHref + location.pathname +
location.search + location.hash;
- // 3. 执行跳转
location.href = finalUrl;
}
- moveArrow(main);
});
-sub.addEventListener("click", () => {
- if (sub.classList.contains("anianx-fixed")) {
- bubbleText.classList.remove("anianx-loading");
- bubbleText.innerText = "当前为副线路";
+anianxSpeedSubLine.addEventListener("click", () => {
+ if (anianxSpeedGlobalLock) return;
+ anianxSpeedGlobalLock = true;
+ if (anianxSpeedSubLine.classList.contains("anianx-fixed")) {
+ anianxSpeedBubbleText.classList.remove("anianx-loading");
+ anianxSpeedBubbleText.innerText = "当前为副线路";
+ anianxSpeedMoveArrow(anianxSpeedSubLine);
+ anianxSpeedGlobalLock = false;
} else {
- bubbleText.classList.add("anianx-loading");
- bubbleText.innerText = "正在切换至副线路";
- // 1. 获取当前滚动位置
+ anianxSpeedBubbleText.classList.add("anianx-loading");
+ anianxSpeedBubbleText.innerText = "正在切换至副线路";
+ anianxSpeedMoveArrow(anianxSpeedSubLine);
const currentScrollTop = window.scrollY || document.documentElement.scrollTop;
- // 2. 拼接URL参数(保留原有逻辑 + 添加scrollTop参数)
- const baseUrl = sub.dataset.anianxHref + location.pathname + location.search;
- document.cookie = `scrollParam=${currentScrollTop}; path=/; domain=anian.cc`;
+ const baseUrl = anianxSpeedSubLine.dataset.anianxHref + location.pathname + location.search;
+ $.cookie('scrollParam', currentScrollTop, { path: '/', domain: 'anian.cc' });
const finalUrl = baseUrl + location.hash;
- // 3. 执行跳转
location.href = finalUrl;
}
- moveArrow(sub);
});
-function loadMultiplePages(pageCount, type = null, currentCount = 1) {
- return new Promise((resolve, reject) => {
- const configs = {
- moment: {
- paginator: "#t_pagination a",
- listContainer: ".moment_list",
- itemSelector: ".p_item",
- afterLoad: () => {
- typeof getMomentAudio === 'function' && getMomentAudio();
- typeof initAgree === 'function' && initAgree();
- window.lazyLoadInstance && lazyLoadInstance.update();
- typeof initializeMomentFold === 'function' && initializeMomentFold();
- // typeof modify_moment_video_size === 'function' && modify_moment_video_size();
- }
- },
- gallery: {
- paginator: "#p_pagination a",
- listContainer: ".gallery-photos",
- itemSelector: ".gallery-photo",
- afterLoad: () => {
- window.pix && typeof pix.initGalleryPhotos === 'function' && pix.initGalleryPhotos();
- }
- }
- };
-
- if (!type) {
- if ($("#t_pagination").length) type = 'moment';
- else if ($("#p_pagination").length) type = 'gallery';
- else {
- const errMsg = "[loadMultiplePages] 未找到分页器,无法识别加载类型";
- // console.error(errMsg);
- reject(errMsg);
- return;
- }
- }
-
- const config = configs[type];
- const $paginationBtn = $(config.paginator);
- const nextHref = $paginationBtn.attr('data');
-
- if (currentCount > pageCount) {
- // console.log(`[${type}] 批量加载完成,共${pageCount}页`);
- resolve();
- return;
- }
-
- if (!nextHref) {
- // console.log(`[${type}] 已无更多内容`);
- $paginationBtn.hide();
- resolve();
- return;
- }
- $paginationBtn.prop('disabled', true);
- const $pagingWrapper = $paginationBtn.closest('.post-paging');
- if (type === 'gallery' && $pagingWrapper.length) {
- $pagingWrapper.data('origin-html', $pagingWrapper.html());
- $pagingWrapper.html('
');
- }
- $.ajax({
- type: "GET",
- url: nextHref,
- success: function (html) {
- const $html = $(html);
- const items = $html.find(`${config.listContainer} ${config.itemSelector}`);
-
- if (items.length > 0) {
- $(config.listContainer).append(items.fadeIn(300));
- const newHref = $html.find(config.paginator).attr("data");
- if (type === 'gallery' && $pagingWrapper.length) {
- $pagingWrapper.html(`
${Theme.site_page}`);
- }
- const $newBtn = $(config.paginator);
- if (newHref) {
- $newBtn.attr("data", newHref).show().prop('disabled', false);
- $newBtn.html(`${Theme.site_page}`);
- } else {
- $newBtn.hide();
- }
- config.afterLoad();
- loadMultiplePages(pageCount, type, currentCount + 1)
- .then(resolve)
- .catch(reject);
- } else {
- $(config.paginator).hide();
- resolve();
- }
- },
- error: function () {
- const errMsg = `[${type}] 第${currentCount}页加载失败`;
- // console.log(errMsg);
- $(config.paginator).prop('disabled', false);
- reject(errMsg);
- }
- });
- });
-}
-
-function initjump() {
- const urlParams = new URLSearchParams(window.location.search);
- const page = document.cookie.split('; ').find(c => c.startsWith('page='))?.split('=')[1] ? decodeURIComponent(document.cookie.split('; ').find(c => c.startsWith('page='))?.split('=')[1]) : null;
- const scrollTop = document.cookie.split('; ').find(c => c.startsWith('scrollParam='))?.split('=')[1] ? decodeURIComponent(document.cookie.split('; ').find(c => c.startsWith('scrollParam='))?.split('=')[1]) : null;
- document.cookie = "scrollParam=; path=/; domain=anian.cc; expires=Thu, 01 Jan 1970 00:00:00 GMT";
- const loadPageTask = () => {
- return new Promise((resolve) => {
- const timeout = setTimeout(() => {
- // console.warn("页面加载超时,强制执行滚动");
- resolve();
- }, 3000);
-
- if (page && !isNaN(page)) {
- const targetPage = Number(page) - 1;
- loadMultiplePages(targetPage)
- .then(() => {
- clearTimeout(timeout);
- resolve();
- })
- .catch(() => {
- clearTimeout(timeout);
- resolve();
- });
- } else {
- clearTimeout(timeout);
- resolve();
- }
- });
- };
-
- if (scrollTop && !isNaN(scrollTop)) {
- loadPageTask().then(() => {
- if (xianlu === 1) cocoMessage.success('已成功切换到主线路');
- else if (xianlu === 2) cocoMessage.success('已成功切换到副线路');
-
- const recordScroll = Number(scrollTop);
- const maxScroll = document.documentElement.scrollHeight - window.innerHeight;
- const scrollDistance = Math.min(recordScroll, maxScroll);
- const scrollSpeed = 1;
- const minDuration = 100;
- const maxDuration = 1000;
- const dynamicDuration = Math.min(Math.max(scrollDistance / scrollSpeed, minDuration), maxDuration);
-
- if (recordScroll > maxScroll && (recordScroll - maxScroll) > 200) {
- cocoMessage.warning('请手动加载以恢复原线路内容');
- $('html, body').animate({ scrollTop: maxScroll }, dynamicDuration);
- } else {
- $('html, body').animate({ scrollTop: recordScroll }, dynamicDuration);
- }
-
- urlParams.delete('scrollTop');
- const newUrl = window.location.pathname + (urlParams.toString() ? `?${urlParams.toString()}` : '') + window.location.hash;
- window.history.replaceState({}, document.title, newUrl);
- });
- }
-}
-
-test.addEventListener("click", () => {
- if (speedLock) return;
- speedLock = true;
- bubbleText.classList.add("anianx-loading");
- bubbleText.innerText = "测速中";
- moveArrow(test);
- speedTestWithTimeout(7500).then(result => {
- bubbleText.classList.remove("anianx-loading");
- bubbleText.innerText = result;
+anianxSpeedTestLine.addEventListener("click", () => {
+ if (anianxSpeedGlobalLock) return;
+ anianxSpeedGlobalLock = true;
+ anianxSpeedBubbleText.classList.add("anianx-loading");
+ anianxSpeedBubbleText.innerText = "测速中";
+ anianxSpeedMoveArrow(anianxSpeedTestLine);
+ anianxSpeedTestWithTimeout(7500).then(result => {
+ anianxSpeedBubbleText.classList.remove("anianx-loading");
+ anianxSpeedBubbleText.innerText = result;
}).catch(() => {
- bubbleText.classList.remove("anianx-loading");
- bubbleText.innerText = "请检查网络或切换线路";
+ anianxSpeedBubbleText.classList.remove("anianx-loading");
+ anianxSpeedBubbleText.innerText = "请检查网络或切换线路";
}).finally(() => {
- speedLock = false;
+ anianxSpeedGlobalLock = false;
});
});
-function speedTestWithTimeout(timeout) {
+function anianxSpeedTestWithTimeout(timeout) {
const controller = new AbortController();
const timer = setTimeout(() => controller.abort(), timeout);
return new Promise(async (resolve, reject) => {
@@ -2769,6 +2699,159 @@ function speedTestWithTimeout(timeout) {
});
}
+
+function initTagSwitch() {
+ return new Promise((resolve, reject) => {
+ const pathname = window.location.pathname;
+ const urlParams = new URLSearchParams(window.location.search);
+ const activeTag = urlParams.get('tag');
+
+ if (!activeTag || activeTag.trim() === '') {
+ resolve();
+ return;
+ }
+
+ let targetLink = $();
+
+ if (pathname === '/archives') {
+ targetLink = $('.posts_cat_nav ul li a').filter(function () {
+ const linkText = $(this).contents().filter(function () {
+ return this.nodeType === 3;
+ }).text().trim();
+ return linkText === activeTag;
+ });
+ } else if (pathname === '/photos') {
+ targetLink = $('.photos_cat_nav ul li a').filter(function () {
+ const linkText = $(this).clone().find('span').remove().end().text().trim();
+
+ return linkText === activeTag;
+ });
+ } else if (pathname === '/friends') {
+ targetLink = $('.friends_cat_nav ul li a').filter(function () {
+ const linkText = $(this).clone().find('span').remove().end().text().trim();
+ return linkText === activeTag;
+ });
+ }
+
+ if (targetLink.length > 0) {
+ window._tagSwitchCallback = { resolve, reject };
+ targetLink.click();
+ } else {
+ resolve();
+ }
+ });
+}
+
+// 1. 定义一个全局标志位,用于外部强制终止
+window.forceStopLoading = false;
+window.isAutoLoading = false;
+function loadMultiplePages(pageCount) {
+ return new Promise((resolve) => {
+ let loadedCount = 0;
+ window.forceStopLoading = false; // 每次启动重置标志位
+
+ const getCurrentBtn = () => {
+ const $allBtns = $('.post-paging a:visible');
+ return $allBtns.filter(function () {
+ const dataAttr = $(this).attr('data');
+ return dataAttr !== undefined && dataAttr !== "" && dataAttr !== "无data属性";
+ }).first();
+ };
+
+ const loadNext = () => {
+ if (loadedCount >= pageCount || window.forceStopLoading) {
+ resolve();
+ return;
+ }
+
+ const $btn = getCurrentBtn();
+ if (!$btn || !$btn.length) {
+ resolve();
+ return;
+ }
+
+ const $pager = $btn.closest('.post-paging');
+ const oldHref = $btn.attr('data');
+
+ window.isAutoLoading = true;
+
+ const pageStartTime = Date.now();
+ $btn.trigger('click'); // 加载更多
+
+ const waitInterval = setInterval(() => {
+ const now = Date.now();
+
+ if (window.forceStopLoading) {
+ clearInterval(waitInterval);
+ resolve();
+ return;
+ }
+ if (now - pageStartTime > 2000) {
+ clearInterval(waitInterval);
+ resolve(); // 解决 Promise,触发后续滚动
+ return;
+ }
+
+ const isLoading = $pager.find('[uk-spinner]').length > 0;
+ if (isLoading) return; // 还在转圈,继续等待
+
+ clearInterval(waitInterval);
+
+ const $newBtn = getCurrentBtn();
+ const newHref = $newBtn.length ? $newBtn.attr('data') : null;
+
+ if (newHref && newHref !== oldHref) {
+ loadedCount++;
+ setTimeout(loadNext, 50);
+ } else {
+ resolve();
+ }
+ }, 50);
+ };
+ loadNext();
+ });
+}
+
+function initjump() {
+ initTagSwitch().then(() => {
+ const page = $.cookie('page');
+ const scrollParam = $.cookie('scrollParam');
+ $.removeCookie('scrollParam', { path: '/', domain: 'anian.cc' });
+ $.removeCookie('page', { path: '/', domain: 'anian.cc' });
+ window.scroll_param = scrollParam;
+
+ const loadPageTask = () => {
+ if (page && !isNaN(page)) {
+ const targetPage = Number(page) - 1;
+ return loadMultiplePages(targetPage);
+ }
+ return Promise.resolve();
+ };
+
+ if (scrollParam && !isNaN(scrollParam)) {
+ const closeLoading = cocoMessage.loading('自动恢复原线路内容中...');
+ loadPageTask().then(() => {
+ // 执行滚动逻辑
+ const recordScroll = Number(scrollParam);
+ const maxScroll = document.documentElement.scrollHeight - window.innerHeight;
+ const scrollDistance = Math.min(recordScroll, maxScroll);
+
+ $('html, body').animate({ scrollTop: scrollDistance }, 500);
+
+ if (recordScroll > maxScroll && (recordScroll - maxScroll) > 200) {
+ closeLoading();
+ cocoMessage.warning('请手动加载原线路内容');
+ } else {
+ const msg = location.hostname === "anian.cc" ? '主线路' : (location.hostname === "www.anian.cc" ? '副线路' : '测试线路');
+ closeLoading();
+ cocoMessage.success(`已成功切换至${msg}`);
+ }
+ });
+ }
+ });
+}
+
+
// 侧边栏订阅函数
async function handleSubscribe(event) {
event.preventDefault();
@@ -2841,21 +2924,24 @@ function initBlog() {
highlightActiveMenu(),
syncFooterWithAudioState(),
- initializeMomentFold(),
- nextBanner()
+ highlightMenu(),
+ initializeMomentFold()
+ // nextBanner()
}
-pix.roleMoments();
-initBlog();
-setPageGrayscale();
-anian_handleLunarCookie();
-updateMusicBtnColor('default');
-initGreenDigitalClock();
-initNoticeTip();
-initjump();
-initTagSwitch();
+$(document).ready(function () {
+ pix.roleMoments();
+ initBlog();
+
+ setPageGrayscale();
+ anian_renderLunarUI();
+ updateMusicBtnColor('default');
+ initGreenDigitalClock();
+ initNoticeTip();
+ initjump();
+});
diff --git a/templates/assets/js/pixplayer.js b/templates/assets/js/pixplayer.js
index 4e4eb16..ce0ebe9 100644
--- a/templates/assets/js/pixplayer.js
+++ b/templates/assets/js/pixplayer.js
@@ -4,33 +4,33 @@
function updateMusicBtnColor(state) {
- if (state === 'play') {
- // 播放
- $('.bg_music').css("background", "rgb(172, 202, 181)");
- $('.bg_music i').css("color", "white");
- } else if (state === 'pause') {
- // 暂停
- $('.bg_music').css("background", "#EBF2ED");
- $('.bg_music i').css("color", "rgb(174, 174, 174)");
- } else {
- // 默认
- $('.bg_music').css("background", "#EBF2ED");
- $('.bg_music i').css("color", "rgb(174, 174, 174)");
+ if (state === 'play') {
+ // 播放
+ $('.bg_music').css("background", "rgb(172, 202, 181)");
+ $('.bg_music i').css("color", "white");
+ } else if (state === 'pause') {
+ // 暂停
+ $('.bg_music').css("background", "#EBF2ED");
+ $('.bg_music i').css("color", "rgb(174, 174, 174)");
+ } else {
+ // 默认
+ $('.bg_music').css("background", "#EBF2ED");
+ $('.bg_music i').css("color", "rgb(174, 174, 174)");
- // ✅ 初始化:隐藏歌词容器(真正关闭歌词功能)
- if (Theme.play.lrc_open && typeof lyricsContainer !== 'undefined') {
- lyricsContainer.css('display', 'none');
- }
+ // ✅ 初始化:隐藏歌词容器(真正关闭歌词功能)
+ if (Theme.play.lrc_open && typeof lyricsContainer !== 'undefined') {
+ lyricsContainer.css('display', 'none');
+ }
- // ✅ 按钮样式置为关闭状态视觉
- $('a.bg_lrc i').css("color", "#aeaeae");
- $('a.bg_lrc').css("background", "#EBF2ED");
+ // ✅ 按钮样式置为关闭状态视觉
+ $('a.bg_lrc i').css("color", "#aeaeae");
+ $('a.bg_lrc').css("background", "#EBF2ED");
- $('.t_dark.top_tool.icon_color').hide();
- }
+ $('.t_dark.top_tool.icon_color').hide();
+ }
}
-var rem=[];
+var rem = [];
rem.audio = $('
');
var audiobox = $('
+
diff --git a/templates/friends.html b/templates/friends.html
index 2161949..a07baaf 100644
--- a/templates/friends.html
+++ b/templates/friends.html
@@ -13,6 +13,29 @@