18 Commits

Author SHA1 Message Date
anian 4b70da9ac3 优化界面;修复异常 2026-07-29 00:17:31 +08:00
anian d575d584cb 新增奇遇界面;修复异常 2026-07-26 21:52:40 +08:00
anian 03e5e2f529 重构课外书;修复异常;优化体验 2026-07-26 06:55:48 +08:00
anian 711cff953b 新增页码跳转;修复异常;优化效果 2026-07-25 15:34:40 +08:00
anian 7d56858616 优化导航栏、分享海报等显示效果;优化代码及性能 2026-07-25 13:33:51 +08:00
anian 32bf39f733 优化阅读体验、前台编辑、播放器等 2026-07-22 01:54:46 +08:00
anian 041fd0f7cf 更换系统图片 2026-07-20 01:13:14 +08:00
anian 6675e378d2 修复搜索相关 2026-07-19 01:51:01 +08:00
anian 1953fa86c8 重写目录样式;适配新域名 2026-07-18 00:48:46 +08:00
anian 048e4336d1 适配新接口、插件;更新附录、通知书、课外书;修复、优化部分功能 2026-06-15 20:32:43 +08:00
anian 92d591f70b 适配新接口 2026-05-09 09:45:17 +08:00
anian 061b00fc05 重构课外书;更新侧边栏;修复模态框、分享海报异常 2026-05-06 21:08:35 +08:00
anian 73dc2a1c1c 适配朋友圈插件v1.4.3-4 2026-04-21 16:06:28 +08:00
anian 565bf30ea5 朋友圈支持图片显示;手机端新增全局公告提示;更新部分页面;优化部分效果 2026-04-17 00:19:43 +08:00
anian 5a3544f8df 新增片刻删除提示框、动画;修复异常;深度优化 2026-03-20 00:15:04 +08:00
anian ee5c1a2b5b 优化文章目录位置、加载后滚动策略;修复页面恢复提示显示异常 2026-03-17 22:13:10 +08:00
anian 9c26bece1b 提前页面恢复提示;修改登出弹窗函数名 2026-03-17 00:57:07 +08:00
anian 101189a077 修复侧边栏测速组件表现异常 2026-03-15 19:07:11 +08:00
98 changed files with 4440 additions and 1890 deletions
+55 -2
View File
@@ -2,11 +2,64 @@
> 基于原作者v1.2.5代码修改 > 基于原作者v1.2.5代码修改
#### v1.2.5-9补丁
1. 优化附录、奇遇页面(依赖装备插件v1.0.2-1)
2. 修复音乐播放器无法调节音量
3. 优化奇遇相关函数效果
#### v1.2.5-9
1. 修复导航栏居中显示失效、分享海报高度、页码更新、加载动画异常
2. 优化上一页动画效果
3. 新增页面底部页码跳转功能
4. 重构课外书(依赖豆瓣插件v1.2.2-3,模板端处理,支持换行)
5. 新增奇遇页面(依赖装备插件,支持换行)
6. 新增网易云音乐播放JS函数`play_netease_music(2639350114)`
#### v1.2.5-8
1. 重写作文目录、置顶样式
2. 更换(通知书等)域名
3. 修复搜索结果无法PJAX跳转(依赖搜索插件v1.7.1-1
4. 修复日记过多时无法搜索(依赖瞬间插件v1.13.1-1,基于源仓库)
5. 朋友圈内容支持搜索与跳转;大幅优化性能(依赖朋友圈插件v1.4.3-6)
6. 压缩、更换图片
7. 模板端全面支持page与tag参数(常驻显示,同步新增向上翻阅功能)
8. 取消自动恢复源内容功能
9. 前台编辑、发布日记将采用PJAX更新
10. 手机端播放器新增进度条
11. 抽象重复代码至函数、清理无效代码
12. 当前激活的标签将在导航栏中居中显示
13. 优化不同宽度下的显示效果
14. 重构分享海报布局
#### v1.2.5-7
1. 适配新接口(基于新版API-Python)
2. 更新附录页面、通知书页面
3. 朋友圈将不再显示内容为空的条目
4. 修复图文片刻中媒体库及拖拽时的图片样式
5. 修改灯箱相关UI颜色
6. 重写课外书分类获取逻辑(依赖豆瓣插件v1.2.2-2)
#### v1.2.5-6
1. 重构课外书页面
2. 音乐、背景、侧边栏等适配新接口(基于API-Python)
3. 修复分享海报空白、模态框失效等异常
#### v1.2.5-5
1. 朋友圈支持图片显示(需同步更新插件)
2. 手机端底部导航栏新增公告未读提示
3. 更新通讯录、储物柜
4. 优化操作提示、图片排版
#### v1.2.5-4
1. 修复侧边栏测速异常、拖拽片刻图片异常、手机端文章目录异常、页面提示异常
2. 优化多种场景下的提示、衔接、样式
3. 新增片刻删除提示框及删除动画
#### v1.2.5-3 #### v1.2.5-3
1. 朋友圈支持根据作者筛选内容(需同步更新插件) 1. 朋友圈支持根据作者筛选内容(需同步更新插件)
2. 支持前台弹窗登入登出 2. 支持前台弹窗登入登出
2. 附录页面功能补全 3. 附录页面功能补全
3. 对线路切换、加载异常等情况进行了深度优化 4. 对线路切换、加载异常等情况进行了深度优化
#### v1.2.5-2 #### v1.2.5-2
1. 添加侧边栏、页面、文章等HTML内容块 1. 添加侧边栏、页面、文章等HTML内容块
+8 -8
View File
@@ -299,7 +299,7 @@
<div class="people-grid"> <div class="people-grid">
<div class="person"> <div class="person">
<div class="avatar"> <div class="avatar">
<img src="/upload/8aea7800gy1i2vfbxoqhdj24w07c0b2p.jpg"> <img src="/upload/20260416214530_191_129.jpg">
</div> </div>
<div class="info"> <div class="info">
<p class="name">黄诗扶</p> <p class="name">黄诗扶</p>
@@ -310,18 +310,18 @@
</div> </div>
<div class="person"> <div class="person">
<div class="avatar"> <div class="avatar">
<img src="/upload/ec39c62fly1i3rextah4gj22dc35s1ky.jpg">&nbsp; <img src="/upload/20260416213611_190_129.jpg">
</div> </div>
<div class="info"> <div class="info">
<p class="name">双笙</p> <p class="name">双笙</p>
<p class="bio"> <p class="bio">
什么?你问我为什么喜欢包包?可能因为是青春吧? 什么?你问我为什么喜欢包包?可能因为是青春吧?
</p> </p>
</div> </div>
</div> </div>
<div class="person"> <div class="person">
<div class="avatar"> <div class="avatar">
<img src="/upload/005Jyswjgy1hywx7z7sb7j30zk1betbd.jpg"> <img src="/upload/005Jyswjgy1ic7xfxtlu8j33402c0npe.jpg">
</div> </div>
<div class="info"> <div class="info">
<p class="name">浅影阿</p> <p class="name">浅影阿</p>
@@ -332,12 +332,12 @@
</div> </div>
<div class="person"> <div class="person">
<div class="avatar"> <div class="avatar">
<img src="/upload/ab0efe4ely1hnpfzqqw1oj23ls5eoqvg.jpg"> <img src="/upload/67f2efd2gy1i8iv8nkuqjj23344mokjp.jpg">
</div> </div>
<div class="info"> <div class="info">
<p class="name">平生不晚</p> <p class="name">玄觞</p>
<p class="bio"> <p class="bio">
首先是戏腔好听,然后是妆造好看,最后就来到了这里 你们古风圈,怎么都喊女生王子,喊男生二婶呢?
</p> </p>
</div> </div>
</div> </div>
@@ -367,7 +367,7 @@
<div class="person mystery-person"> <div class="person mystery-person">
<div class="avatar"> <div class="avatar">
<img src="/upload/logo.png"> <img src="/themes/theme-pix/assets/img/logo.webp">
</div> </div>
<div class="info"> <div class="info">
<p class="name">敬请期待</p> <p class="name">敬请期待</p>
+39 -39
View File
@@ -14,11 +14,11 @@
<!-- 封面:像 2026 一样两个独立卡片 --> <!-- 封面:像 2026 一样两个独立卡片 -->
<div class="yg-2025-hero-row"> <div class="yg-2025-hero-row">
<div class="yg-2025-hero"> <div class="yg-2025-hero">
<img src="/upload/2025-0-1.png"> <img src="/upload/2025-0-1.jpg">
</div> </div>
<div class="yg-2025-hero"> <div class="yg-2025-hero">
<img src="/upload/2025-0-2.png"> <img src="/upload/2025-0-2.jpg">
</div> </div>
</div> </div>
@@ -27,63 +27,63 @@
<div class="yg-grid-2025-3col"> <div class="yg-grid-2025-3col">
<div class="yg-card"> <div class="yg-card">
<img src="/upload/2025-1-1.png"> <img src="/upload/2025-1-1.jpg">
<img src="/upload/2025-1-2.png"> <img src="/upload/2025-1-2.jpg">
</div> </div>
<div class="yg-card"> <div class="yg-card">
<img src="/upload/2025-2-1.png"> <img src="/upload/2025-2-1.jpg">
<img src="/upload/2025-2-2.png"> <img src="/upload/2025-2-2.jpg">
</div> </div>
<div class="yg-card"> <div class="yg-card">
<img src="/upload/2025-3-1.png"> <img src="/upload/2025-3-1.jpg">
<img src="/upload/2025-3-2.png"> <img src="/upload/2025-3-2.jpg">
</div> </div>
<div class="yg-card"> <div class="yg-card">
<img src="/upload/2025-4-1.png"> <img src="/upload/2025-4-1.jpg">
<img src="/upload/2025-4-2.png"> <img src="/upload/2025-4-2.jpg">
</div> </div>
<div class="yg-card"> <div class="yg-card">
<img src="/upload/2025-5-1.png"> <img src="/upload/2025-5-1.jpg">
<img src="/upload/2025-5-2.png"> <img src="/upload/2025-5-2.jpg">
</div> </div>
<div class="yg-card"> <div class="yg-card">
<img src="/upload/2025-6-1.png"> <img src="/upload/2025-6-1.jpg">
<img src="/upload/2025-6-2.png"> <img src="/upload/2025-6-2.jpg">
</div> </div>
<div class="yg-card"> <div class="yg-card">
<img src="/upload/2025-7-1.png"> <img src="/upload/2025-7-1.jpg">
<img src="/upload/2025-7-2.png"> <img src="/upload/2025-7-2.jpg">
</div> </div>
<div class="yg-card"> <div class="yg-card">
<img src="/upload/2025-8-1.png"> <img src="/upload/2025-8-1.jpg">
<img src="/upload/2025-8-2.png"> <img src="/upload/2025-8-2.jpg">
</div> </div>
<div class="yg-card"> <div class="yg-card">
<img src="/upload/2025-9-1.png"> <img src="/upload/2025-9-1.jpg">
<img src="/upload/2025-9-2.png"> <img src="/upload/2025-9-2.jpg">
</div> </div>
<div class="yg-card"> <div class="yg-card">
<img src="/upload/2025-10-1.png"> <img src="/upload/2025-10-1.jpg">
<img src="/upload/2025-10-2.png"> <img src="/upload/2025-10-2.jpg">
</div> </div>
<div class="yg-card"> <div class="yg-card">
<img src="/upload/2025-11-1.png"> <img src="/upload/2025-11-1.jpg">
<img src="/upload/2025-11-2.png"> <img src="/upload/2025-11-2.jpg">
</div> </div>
<div class="yg-card"> <div class="yg-card">
<img src="/upload/2025-12-1.png"> <img src="/upload/2025-12-1.jpg">
<img src="/upload/2025-12-2.png"> <img src="/upload/2025-12-2.jpg">
</div> </div>
</div> </div>
@@ -103,24 +103,24 @@
</div> </div>
<div class="yg-hero"> <div class="yg-hero">
<img src="/upload/2026-0.png"> <img src="/upload/2026-0.jpg">
</div> </div>
</div> </div>
<div class="yg-grid-2026"> <div class="yg-grid-2026">
<div class="yg-2026-month"><img src="/upload/2026-1.png"></div> <div class="yg-2026-month"><img src="/upload/2026-1.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-2.png"></div> <div class="yg-2026-month"><img src="/upload/2026-2.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-3.png"></div> <div class="yg-2026-month"><img src="/upload/2026-3.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-4.png"></div> <div class="yg-2026-month"><img src="/upload/2026-4.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-5.png"></div> <div class="yg-2026-month"><img src="/upload/2026-5.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-6.png"></div> <div class="yg-2026-month"><img src="/upload/2026-6.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-7.png"></div> <div class="yg-2026-month"><img src="/upload/2026-7.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-8.png"></div> <div class="yg-2026-month"><img src="/upload/2026-8.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-9.png"></div> <div class="yg-2026-month"><img src="/upload/2026-9.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-10.png"></div> <div class="yg-2026-month"><img src="/upload/2026-10.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-11.png"></div> <div class="yg-2026-month"><img src="/upload/2026-11.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-12.png"></div> <div class="yg-2026-month"><img src="/upload/2026-12.jpg"></div>
</div> </div>
+23 -21
View File
@@ -104,6 +104,19 @@
</div> </div>
</a> </a>
<a href="https://api.anian.net" target="_blank">
<div class="link-card-default">
<div class="decor-circle" style="position: absolute; top: -20px; right: -20px; width: 80px; height: 80px; background: #d8f3dc; border-radius: 50%; opacity: 0.3; transition: all 0.5s ease;"></div>
<div style="position: relative; z-index: 1;">
<div style="width: 60px; height: 60px; background: #40916c; border-radius: 10px; margin: 0 auto 15px; display: flex; align-items: center; justify-content: center;">
<i class="ri-git-repository-line ri-icon" style="font-size: 30px;"></i>
</div>
<h4 style="color: #2d6a4f; margin: 0 0 5px; font-size: 18px; font-weight: 500;">接口箱</h4>
<p style="color: #36A28E; font-size: 13px; margin: 0; opacity: 0.8;">运筹帷幄之中</p>
</div>
</div>
</a>
<a href="/news-2026" target="_self"> <a href="/news-2026" target="_self">
<div class="link-card-default"> <div class="link-card-default">
<div class="decor-circle" style="position: absolute; top: -20px; right: -20px; width: 80px; height: 80px; background: #d8f3dc; border-radius: 50%; opacity: 0.3; transition: all 0.5s ease;"></div> <div class="decor-circle" style="position: absolute; top: -20px; right: -20px; width: 80px; height: 80px; background: #d8f3dc; border-radius: 50%; opacity: 0.3; transition: all 0.5s ease;"></div>
@@ -112,12 +125,12 @@
<i class="ri-file-list-3-line ri-icon" style="font-size: 30px;"></i> <i class="ri-file-list-3-line ri-icon" style="font-size: 30px;"></i>
</div> </div>
<h4 style="color: #2d6a4f; margin: 0 0 5px; font-size: 18px; font-weight: 500;">每日报</h4> <h4 style="color: #2d6a4f; margin: 0 0 5px; font-size: 18px; font-weight: 500;">每日报</h4>
<p style="color: #36A28E; font-size: 13px; margin: 0; opacity: 0.8;">运筹帷幄之中</p> <p style="color: #36A28E; font-size: 13px; margin: 0; opacity: 0.8;">决胜千里之外</p>
</div> </div>
</div> </div>
</a> </a>
<a href="https://git.anian.cc/explore/repos" target="_blank"> <a href="https://git.anian.net" target="_blank">
<div class="link-card-default"> <div class="link-card-default">
<div class="decor-circle" style="position: absolute; top: -20px; right: -20px; width: 80px; height: 80px; background: #d8f3dc; border-radius: 50%; opacity: 0.3; transition: all 0.5s ease;"></div> <div class="decor-circle" style="position: absolute; top: -20px; right: -20px; width: 80px; height: 80px; background: #d8f3dc; border-radius: 50%; opacity: 0.3; transition: all 0.5s ease;"></div>
<div style="position: relative; z-index: 1;"> <div style="position: relative; z-index: 1;">
@@ -130,7 +143,7 @@
</div> </div>
</a> </a>
<a href="#" target="_self"> <a href="books" target="_self">
<div class="link-card-default"> <div class="link-card-default">
<div class="decor-circle" style="position: absolute; top: -20px; right: -20px; width: 80px; height: 80px; background: #d8f3dc; border-radius: 50%; opacity: 0.3; transition: all 0.5s ease;"></div> <div class="decor-circle" style="position: absolute; top: -20px; right: -20px; width: 80px; height: 80px; background: #d8f3dc; border-radius: 50%; opacity: 0.3; transition: all 0.5s ease;"></div>
<div style="position: relative; z-index: 1;"> <div style="position: relative; z-index: 1;">
@@ -138,20 +151,7 @@
<i class="ri-door-open-line ri-icon" style="font-size: 30px;"></i> <i class="ri-door-open-line ri-icon" style="font-size: 30px;"></i>
</div> </div>
<h4 style="color: #2d6a4f; margin: 0 0 5px; font-size: 18px; font-weight: 500;">课外书</h4> <h4 style="color: #2d6a4f; margin: 0 0 5px; font-size: 18px; font-weight: 500;">课外书</h4>
<p style="color: #36A28E; font-size: 13px; margin: 0; opacity: 0.8;">敬请期待</p> <p style="color: #36A28E; font-size: 13px; margin: 0; opacity: 0.8;">记忆中的锚点</p>
</div>
</div>
</a>
<a href="#" target="_self">
<div class="link-card-default">
<div class="decor-circle" style="position: absolute; top: -20px; right: -20px; width: 80px; height: 80px; background: #d8f3dc; border-radius: 50%; opacity: 0.3; transition: all 0.5s ease;"></div>
<div style="position: relative; z-index: 1;">
<div style="width: 60px; height: 60px; background: #40916c; border-radius: 10px; margin: 0 auto 15px; display: flex; align-items: center; justify-content: center;">
<i class="ri-git-repository-line ri-icon" style="font-size: 30px;"></i>
</div>
<h4 style="color: #2d6a4f; margin: 0 0 5px; font-size: 18px; font-weight: 500;">笔记本</h4>
<p style="color: #36A28E; font-size: 13px; margin: 0; opacity: 0.8;">敬请期待</p>
</div> </div>
</div> </div>
</a> </a>
@@ -163,7 +163,7 @@
@media (max-width: 767px) { @media (max-width: 767px) {
#my-links-widget { margin-top: 40px !important; } #my-links-widget { margin-top: 40px !important; }
} }
@media (min-width: 768px) { @media (min-width: 1367px) {
.link-container { grid-template-columns: repeat(4, 1fr) !important; } .link-container { grid-template-columns: repeat(4, 1fr) !important; }
} }
.ri-icon { color: white !important; fill: white !important; } .ri-icon { color: white !important; fill: white !important; }
@@ -199,14 +199,16 @@
if (isUnread) { if (isUnread) {
typeof initNoticeTip === 'function' && initNoticeTip(); typeof initNoticeTip === 'function' && initNoticeTip();
noticeCard.querySelector('.notice-title').textContent = `通知书`; $('.footer_menu a[href="/navigator"]').css('color', '#ecc94b').find('i').css('color', '#ecc94b');
noticeCard.querySelector('.notice-desc').textContent = `有新通知待查看`; noticeCard.querySelector('.notice-title').textContent = '通知书';
noticeCard.querySelector('.notice-desc').textContent = '有新通知待查看';
noticeCard.classList.add('notice-unread'); noticeCard.classList.add('notice-unread');
if(decorCircle) decorCircle.style.background = '#fef3c7'; if(decorCircle) decorCircle.style.background = '#fef3c7';
const noticeLink = noticeCard.closest('a'); const noticeLink = noticeCard.closest('a');
noticeLink.onclick = function() { noticeLink.onclick = function() {
$.cookie('latest_notice_date', combinedDateStr, { path: '/', domain: 'anian.cc', expires: 365 }); // $.cookie('latest_notice_date', combinedDateStr, { path: '/', domain: 'anian.net', expires: 365 });
$.cookie('latest_notice_date', combinedDateStr, { path: '/', expires: 365 });
typeof markAsRead === 'function' && markAsRead(combinedDateStr); typeof markAsRead === 'function' && markAsRead(combinedDateStr);
}; };
} }
+4 -4
View File
@@ -16,8 +16,8 @@
<div id="calendar-2025-global-blur"></div> <div id="calendar-2025-global-blur"></div>
<div id="calendar-2025-intro"> <div id="calendar-2025-intro">
<div id="calendar-2025-intro-mask"></div> <div id="calendar-2025-intro-mask"></div>
<img id="calendar-2025-intro-img1" src="/upload/2025-0-1.png"> <img id="calendar-2025-intro-img1" src="/upload/2025-0-1.jpg">
<img id="calendar-2025-intro-img2" src="/upload/2025-0-2.png"> <img id="calendar-2025-intro-img2" src="/upload/2025-0-2.jpg">
</div> </div>
<div id="calendar-2025-month-group" <div id="calendar-2025-month-group"
style="width:100%;height:auto;position:absolute;top:0;left:0;opacity:0;transition:opacity 1s ease-in-out;z-index:1;"> style="width:100%;height:auto;position:absolute;top:0;left:0;opacity:0;transition:opacity 1s ease-in-out;z-index:1;">
@@ -112,8 +112,8 @@
const monthImg2 = document.getElementById("calendar-2025-month-2"); const monthImg2 = document.getElementById("calendar-2025-month-2");
const month = new Date().getMonth() + 1; const month = new Date().getMonth() + 1;
monthImg1.src = `/upload/2025-${month}-1.png`; monthImg1.src = `/upload/2025-${month}-1.jpg`;
monthImg2.src = `/upload/2025-${month}-2.png`; monthImg2.src = `/upload/2025-${month}-2.jpg`;
const waitImages = imgs => new Promise(res => { const waitImages = imgs => new Promise(res => {
let loaded = 0; let loaded = 0;
+2 -2
View File
@@ -15,7 +15,7 @@
<div id="calendar-2026-global-blur"></div> <div id="calendar-2026-global-blur"></div>
<div id="calendar-2026-intro"> <div id="calendar-2026-intro">
<div id="calendar-2026-intro-mask"></div> <div id="calendar-2026-intro-mask"></div>
<img id="calendar-2026-intro-img" src="/upload/2026-0.png"> <img id="calendar-2026-intro-img" src="/upload/2026-0.jpg">
</div> </div>
<img id="calendar-2026-month" <img id="calendar-2026-month"
style="width:100%;height:auto;position:absolute;top:0;left:0;object-fit:contain;opacity:0;transition:opacity 1s ease-in-out;z-index:1;pointer-events:none;"> style="width:100%;height:auto;position:absolute;top:0;left:0;object-fit:contain;opacity:0;transition:opacity 1s ease-in-out;z-index:1;pointer-events:none;">
@@ -94,7 +94,7 @@
const monthImg = document.getElementById('calendar-2026-month'); const monthImg = document.getElementById('calendar-2026-month');
const month = new Date().getMonth() + 1; const month = new Date().getMonth() + 1;
monthImg.src = `/upload/2026-${month}.png`; monthImg.src = `/upload/2026-${month}.jpg`;
container.style.height = "100vh"; container.style.height = "100vh";
+90 -12
View File
@@ -1,25 +1,98 @@
<div id="anian-update-wrapper-2026" class="anian-feed-root-container"> <div id="anian-update-wrapper-2026" class="anian-feed-root-container">
<div class="anian-feed-grid"> <div class="anian-feed-grid">
<div class="anian-feed-card" data-rss-url="https://git.anian.cc/anian/halo-plugin-photos/releases.rss">
<h3 class="anian-feed-caption">图库插件更新</h3>
<div class="anian-feed-card" data-rss-url="https://git.anian.net/anian/halo-theme-pix/rss/branch/master">
<h3 class="anian-feed-caption">日记簿更新</h3>
<div class="anian-feed-list-box"> <div class="anian-feed-list-box">
<div class="anian-loading">加载中...</div> <div class="anian-loading">加载中...</div>
</div> </div>
</div> </div>
<div class="anian-feed-card" data-rss-url="https://git.anian.cc/anian/halo-plugin-friends/releases.rss"> <div class="anian-feed-card" data-rss-url="https://git.anian.net/anian/halo-plugin-friends/rss/branch/master">
<h3 class="anian-feed-caption">朋友圈插件更新</h3> <h3 class="anian-feed-caption">朋友圈功能更新</h3>
<div class="anian-feed-list-box"> <div class="anian-feed-list-box">
<div class="anian-loading">加载中...</div> <div class="anian-loading">加载中...</div>
</div> </div>
</div> </div>
<div class="anian-feed-card" data-rss-url="https://git.anian.cc/anian/halo-theme-pix/releases.rss"> <div class="anian-feed-card" data-rss-url="https://git.anian.net/anian/halo-plugin-comment/rss/branch/master">
<h3 class="anian-feed-caption">主题更新</h3> <h3 class="anian-feed-caption">评论功能更新</h3>
<div class="anian-feed-list-box"> <div class="anian-feed-list-box">
<div class="anian-loading">加载中...</div> <div class="anian-loading">加载中...</div>
</div> </div>
</div> </div>
<div class="anian-feed-card" data-rss-url="https://git.anian.net/anian/halo-plugin-photos/rss/branch/master">
<h3 class="anian-feed-caption">图库功能更新</h3>
<div class="anian-feed-list-box">
<div class="anian-loading">加载中...</div>
</div>
</div>
<div class="anian-feed-card" data-rss-url="https://git.anian.net/anian/halo-plugin-douban/rss/branch/master">
<h3 class="anian-feed-caption">课外书功能更新</h3>
<div class="anian-feed-list-box">
<div class="anian-loading">加载中...</div>
</div>
</div>
<div class="anian-feed-card" data-rss-url="https://git.anian.net/anian/halo-plugin-dever/rss/branch/master">
<h3 class="anian-feed-caption">插件开发容器更新</h3>
<div class="anian-feed-list-box">
<div class="anian-loading">加载中...</div>
</div>
</div>
<div class="anian-feed-card" data-rss-url="https://git.anian.net/anian/api-python/rss/branch/master">
<h3 class="anian-feed-caption">应用接口更新</h3>
<div class="anian-feed-list-box">
<div class="anian-loading">加载中...</div>
</div>
</div>
<div class="anian-feed-card" data-rss-url="https://git.anian.net/anian/anian-tool/rss/branch/master">
<h3 class="anian-feed-caption">小工具更新</h3>
<div class="anian-feed-list-box">
<div class="anian-loading">加载中...</div>
</div>
</div>
<div class="anian-feed-card" data-rss-url="https://git.anian.net/anian/memos/rss/branch/master">
<h3 class="anian-feed-caption">备忘录更新</h3>
<div class="anian-feed-list-box">
<div class="anian-loading">加载中...</div>
</div>
</div>
<div class="anian-feed-card" data-rss-url="https://git.anian.net/anian/halo-plugin-moments/rss/branch/master">
<h3 class="anian-feed-caption">日记功能更新</h3>
<div class="anian-feed-list-box">
<div class="anian-loading">加载中...</div>
</div>
</div>
<div class="anian-feed-card" data-rss-url="https://git.anian.net/anian/halo-plugin-search/rss/branch/master">
<h3 class="anian-feed-caption">搜索功能更新</h3>
<div class="anian-feed-list-box">
<div class="anian-loading">加载中...</div>
</div>
</div>
<div class="anian-feed-card" data-rss-url="https://git.anian.net/anian/weibo-rss/rss/branch/master">
<h3 class="anian-feed-caption">RSS功能更新</h3>
<div class="anian-feed-list-box">
<div class="anian-loading">加载中...</div>
</div>
</div>
<div class="anian-feed-card" data-rss-url="https://git.anian.net/anian/halo-plugin-equipments/rss/branch/master">
<h3 class="anian-feed-caption">奇遇功能更新</h3>
<div class="anian-feed-list-box">
<div class="anian-loading">加载中...</div>
</div>
</div>
</div> </div>
</div> </div>
@@ -41,9 +114,8 @@
} }
.anian-feed-card { .anian-feed-card {
flex: 1; flex: 0 0 calc((100% - 24px) / 2);
min-width: 320px; max-width: calc((100% - 24px) / 2);
/* 优化最小宽度 */
background: #ffffff; background: #ffffff;
border: 1px solid #e1f3d8; border: 1px solid #e1f3d8;
border-radius: 12px; border-radius: 12px;
@@ -55,6 +127,11 @@
transition: transform 0.3s ease, box-shadow 0.3s ease; transition: transform 0.3s ease, box-shadow 0.3s ease;
} }
.anian-feed-card:first-child {
flex-basis: 100%;
max-width: 100%;
}
.anian-feed-caption { .anian-feed-caption {
margin: 0; margin: 0;
@@ -70,7 +147,7 @@
} }
.anian-feed-list-box { .anian-feed-list-box {
max-height: 380px; max-height: 250px;
/* 优化高度 */ /* 优化高度 */
overflow-y: auto; overflow-y: auto;
padding: 0; padding: 0;
@@ -197,7 +274,8 @@
} }
.anian-feed-card { .anian-feed-card {
min-width: 100%; flex: 0 0 100%;
max-width: 100%;
} }
.anian-feed-caption { .anian-feed-caption {
@@ -264,7 +342,7 @@
listBox.innerHTML = htmlContent || '<div style="color:#999;">暂无更新内容</div>'; listBox.innerHTML = htmlContent || '<div style="color:#999;">暂无更新内容</div>';
} catch (error) { } catch (error) {
listBox.innerHTML = `<div style="color:#f56c6c;font-size:14px;">请求失败: ${error.message}</div>`; listBox.innerHTML = `<div style="color:#f56c6c;font-size:14px;">失败:超时或发生错误</div>`;
} }
} }
+113 -88
View File
@@ -3,7 +3,6 @@
margin: 0; margin: 0;
padding: 0; padding: 0;
box-sizing: border-box; box-sizing: border-box;
font-family: "Inter", "Microsoft YaHei", Arial;
} }
.store { .store {
@@ -13,7 +12,7 @@
--danger: #E74C3C; --danger: #E74C3C;
--bg: #F9FFFB; --bg: #F9FFFB;
--shadow: 0 12px 30px rgba(80, 200, 120, .12); --shadow: 0 12px 30px rgba(80, 200, 120, .12);
--radius: 18px; --radius: 8px;
padding: 26px 14px; padding: 26px 14px;
background: var(--bg); background: var(--bg);
} }
@@ -59,7 +58,7 @@
#tag-search { #tag-search {
width: 100%; width: 100%;
padding: 7px 12px 7px 34px; padding: 7px 12px 7px 34px;
border-radius: 10px; border-radius: 8px;
border: 1px solid #c9efd6; border: 1px solid #c9efd6;
outline: none; outline: none;
background: #fafffb; background: #fafffb;
@@ -79,7 +78,7 @@
flex-wrap: wrap; flex-wrap: wrap;
gap: 8px; gap: 8px;
padding: 8px; padding: 8px;
border-radius: 12px; border-radius: 8px;
border: 1px solid #c9efd6; border: 1px solid #c9efd6;
background: rgba(144, 238, 144, .08); background: rgba(144, 238, 144, .08);
max-height: 100px; max-height: 100px;
@@ -89,7 +88,7 @@
.store .tag-item { .store .tag-item {
padding: 5px 7px; padding: 5px 7px;
border-radius: 9px; border-radius: 8px;
border: 1px solid #90ee90; border: 1px solid #90ee90;
font-size: 12px; font-size: 12px;
cursor: pointer; cursor: pointer;
@@ -107,31 +106,66 @@
.store .no-result { .store .no-result {
width: 100%; width: 100%;
text-align: center; text-align: center;
align-items: center;
justify-content: center;
color: #7f8c8d; color: #7f8c8d;
font-size: 13px; font-size: 13px;
padding: 8px 0; min-height: 100%;
padding: 0;
display: none; display: none;
} }
/* 输入框 */ /* 输入框 */
.store .input-group { .store .input-group {
display: flex; display: flex;
gap: 10px; gap: 8px;
margin: 16px 0; margin: 16px 0;
align-items: center;
}
.store .section-divider {
position: relative;
height: 18px;
margin: 6px 0 14px;
}
.store .section-divider::before {
content: "";
position: absolute;
top: 50%;
left: 0;
width: 100%;
height: 1px;
transform: translateY(-50%);
background: linear-gradient(90deg, rgba(80, 200, 120, 0), rgba(80, 200, 120, .55), rgba(80, 200, 120, 0));
box-shadow: 0 1px 0 rgba(80, 200, 120, .12);
}
.store .section-divider::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: 10px;
height: 10px;
transform: translate(-50%, -50%) rotate(45deg);
border-radius: 2px;
background: linear-gradient(135deg, #90ee90, #50c878);
box-shadow: -14px 0 0 -3px rgba(80, 200, 120, .5), 14px 0 0 -3px rgba(80, 200, 120, .5), 0 0 0 2px #ffffff;
} }
#file-path { #file-path {
flex: 1; flex: 1;
padding: 8px 14px; padding: 8px 14px;
border-radius: 12px; border-radius: 8px;
border: 2px solid #e8f7ec; border: 2px solid #e8f7ec;
font-size: 14px; font-size: 14px;
outline: none; outline: none;
} }
#submit-btn { #submit-btn {
padding: 10px; padding: 10px 20px;
border-radius: 12px; border-radius: 8px;
border: none; border: none;
background: linear-gradient(135deg, #50c878, #3a9156); background: linear-gradient(135deg, #50c878, #3a9156);
color: #fff; color: #fff;
@@ -139,17 +173,6 @@
cursor: pointer; cursor: pointer;
} }
/* 底部提示(改成浅黄色系) */
.store .tips {
font-size: 12px;
text-align: center;
color: #a97400;
padding: 8px;
border-radius: 8px;
background: rgba(255, 215, 0, .12);
border: 1px solid rgba(243, 156, 18, .25);
}
/* 手机端 */ /* 手机端 */
@media(max-width:520px) { @media(max-width:520px) {
.store { .store {
@@ -166,7 +189,8 @@
} }
.store .input-group { .store .input-group {
flex-direction: column flex-direction: column;
align-items: stretch;
} }
#submit-btn { #submit-btn {
@@ -176,34 +200,11 @@
.store .tag-list { .store .tag-list {
max-height: 120px max-height: 120px
} }
}
/* Toast */ #file-path {
.custom-toast { width: 100%;
position: fixed; box-sizing: border-box;
top: 26px;
left: 50%;
transform: translateX(-50%) translateY(-80px);
background: #2ECC71;
color: #fff;
padding: 12px 20px;
border-radius: 10px;
transition: .4s;
opacity: 0;
z-index: 9999;
} }
.toast-show {
transform: translateX(-50%) translateY(0);
opacity: 1
}
.toast-error {
background: #E74C3C
}
.toast-warning {
background: #F39C12
} }
</style> </style>
@@ -211,58 +212,55 @@
<div class="container"> <div class="container">
<div class="top-bar"></div> <div class="top-bar"></div>
<h1 class="title">Anian的储物柜</h1> <h1 class="title">储物柜</h1>
<div class="input-group">
<input id="file-path" placeholder="请输入翻找目标..." autocomplete="off">
<button id="submit-btn">翻 找</button>
</div>
<div class="section-divider" aria-hidden="true"></div>
<div class="tag-container"> <div class="tag-container">
<div class="tag-search-wrapper"> <div class="tag-search-wrapper">
<span class="search-icon">🔍</span> <span class="search-icon"><i class="ri-search-line"></i></span>
<input id="tag-search" placeholder="搜索标签"> <input id="tag-search" placeholder="搜索标签..." autocomplete="off">
</div> </div>
<div class="tag-list"> <div class="tag-list">
<div class="tag-item" data-value="test.zip">测试压缩包</div> <div class="tag-item" data-value="/themes/theme-pix/assets/img/loading.webp">加载动画</div>
<div class="tag-item" data-value="docs/report.pdf">示例报告</div> <div class="tag-item" data-value="/themes/theme-pix/assets/img/logo.webp">网站Logo</div>
<div class="tag-item" data-value="images/banner.jpg">横幅图片</div> <div class="tag-item" data-value="/themes/theme-pix/assets/img/banner-all.webp">全部横幅</div>
<div class="tag-item" data-value="software/setup.exe">安装程序</div> <div class="tag-item" data-value="/themes/theme-pix/assets/img/banner-dong.webp">冬季横幅</div>
<div class="tag-item" data-value="/themes/theme-pix/assets/img/cover-mei.webp">封面3</div>
<div class="tag-item" data-value="/themes/theme-pix/assets/img/banner-init.webp">初始横幅</div>
<div class="tag-item" data-value="/themes/theme-pix/assets/img/sidebar-notice.webp">侧边栏通知</div>
<div class="tag-item" data-value="/themes/theme-pix/assets/img/cover-song.webp">封面1</div>
<div class="tag-item" data-value="/themes/theme-pix/assets/img/sidebar-quote.webp">侧边栏引用</div>
<div class="tag-item" data-value="/themes/theme-pix/assets/img/cover-zhu.webp">封面2</div>
<div class="no-result" id="noResult">没有匹配的结果</div> <div class="no-result" id="noResult">没有匹配的结果</div>
</div> </div>
</div> </div>
<div class="input-group">
<input id="file-path" placeholder="请输入路径" autocomplete="off">
<button id="submit-btn">访问 / 下载</button>
</div> </div>
<p class="tips">⚠️ 错误过多将可能被封禁</p>
</div>
<div class="custom-toast" id="customToast"></div>
</div> </div>
<script> <script>
function initializeStoreEvents() { function initializeStoreEvents() {
let closeLoading = null;
const container = document.querySelector(".store"); const container = document.querySelector(".store");
if (!container || container.dataset.init === "1") return; if (!container || container.dataset.init === "1") return;
container.dataset.init = "1"; container.dataset.init = "1";
const input = document.getElementById('file-path'); const input = document.getElementById('file-path');
const btn = document.getElementById('submit-btn'); const btn = document.getElementById('submit-btn');
const toast = document.getElementById('customToast');
const tagItems = document.querySelectorAll('.tag-item'); const tagItems = document.querySelectorAll('.tag-item');
const tagSearch = document.getElementById('tag-search'); const tagSearch = document.getElementById('tag-search');
const noResult = document.getElementById('noResult'); const noResult = document.getElementById('noResult');
function showToast(msg, type = 'warning') {
toast.textContent = msg;
toast.className = 'custom-toast toast-' + type + ' toast-show';
setTimeout(() => toast.classList.remove('toast-show'), 2600);
}
tagItems.forEach(t => { tagItems.forEach(t => {
t.onclick = () => { t.onclick = () => {
input.value = t.dataset.value; input.value = t.dataset.value;
showToast('已填入 ' + t.dataset.value, 'success'); cocoMessage.success('已填入对应标签信息');
}; };
}); });
@@ -277,39 +275,66 @@
if (show) visible++; if (show) visible++;
}); });
noResult.style.display = visible === 0 ? 'block' : 'none'; noResult.style.display = visible === 0 ? 'flex' : 'none';
}; };
function check(url) { function check(url) {
return new Promise(r => { return new Promise(r => {
const xhr = new XMLHttpRequest(); const xhr = new XMLHttpRequest();
try {
xhr.open('HEAD', url, true); xhr.open('HEAD', url, true);
} catch (e) {
r(0);
return;
}
xhr.timeout = 5000; xhr.timeout = 5000;
xhr.onload = () => r(xhr.status === 200); xhr.onload = () => r(xhr.status);
xhr.onerror = () => r(false); xhr.onerror = () => r(0);
xhr.ontimeout = () => r(false); xhr.ontimeout = () => r(0);
xhr.send(); xhr.send();
}); });
} }
function normalizeDestination(value) {
const trimmed = value.trim();
if (!trimmed || /\\/.test(trimmed)) return null;
const url = trimmed.charAt(0) === '/' ? trimmed : '/' + trimmed;
if (/^\/\//.test(url)) return null;
return url;
}
async function go() { async function go() {
const v = input.value.trim(); const v = input.value.trim();
if (!v) return showToast('请输入路径'); if (!v) return cocoMessage.warning('请输入翻找目标');
const url = '/' + v; const url = normalizeDestination(v);
btn.textContent = '检测中...'; if (!url) return cocoMessage.warning('翻找目标无效');
btn.textContent = '翻找中...';
closeLoading = cocoMessage.loading('正在翻找中,请稍候...');
btn.disabled = true; btn.disabled = true;
const ok = await check(url); try {
if (ok) { const status = await check(url);
showToast('资源存在,跳转中', 'success'); if (status === 200) {
setTimeout(() => location.href = url, 700); cocoMessage.success('翻找成功,即将打开目标页面');
} else showToast('资源不存在', 'error'); window.open(url, '_blank');
setTimeout(() => { btn.textContent = '访问 / 下载'; btn.disabled = false }, 700); } else if (status === 404) {
cocoMessage.warning('翻找失败,失败过多将被封禁');
} else {
cocoMessage.error('翻找异常,请重试或刷新页面');
}
} finally {
closeLoading?.();
closeLoading = null;
btn.textContent = '翻 找';
btn.disabled = false;
}
} }
btn.onclick = go; btn.onclick = go;
input.onkeydown = e => { if (e.key === 'Enter') go(); }; input.onkeydown = e => { if (e.key === 'Enter') go(); };
} }
document.addEventListener("DOMContentLoaded", initializeStoreEvents); initializeStoreEvents();
document.addEventListener("pjax:complete", initializeStoreEvents);
</script> </script>
+9 -9
View File
@@ -1,18 +1,18 @@
<div class="nav4lite-section"> <div class="nav4lite-section">
<div class="nav4lite-grid"> <div class="nav4lite-grid">
<a href="/" class="nav4lite-item"> <a href="/address" class="nav4lite-item">
<span class="nav4lite-label">课外书</span> <span class="nav4lite-label">通讯录</span>
</a> </a>
<a href="/friends" class="nav4lite-item"> <a href="/friends" class="nav4lite-item">
<span class="nav4lite-label">朋友圈</span> <span class="nav4lite-label">朋友圈</span>
</a> </a>
<a href="/docs" class="nav4lite-item" target="_blank"> <a href="/navigator" class="nav4lite-center-dot"><i
<span class="nav4lite-label">笔记本</span>
</a>
<a href="/address" class="nav4lite-item">
<span class="nav4lite-label">通讯录</span>
</a>
<a href="/navigator" class="nav4lite-center-dot" aria-label="查看详情"><i
class="sidebar-more ri-arrow-right-s-line"></i></a> class="sidebar-more ri-arrow-right-s-line"></i></a>
<a href="/books" class="nav4lite-item">
<span class="nav4lite-label">课外书</span>
</a>
<a href="/store" class="nav4lite-item">
<span class="nav4lite-label">储物柜</span>
</a>
</div> </div>
</div> </div>
+1 -1
View File
@@ -11,6 +11,6 @@
<div class="subscribe-divider"></div> <div class="subscribe-divider"></div>
<div class="subscribe-feedback"> <div class="subscribe-feedback">
反馈邮箱:<a href="mailto:support@anian.cc" class="feedback-email">support@anian.cc</a> 反馈邮箱:<a href="mailto:support@anian.net" class="feedback-email">support@anian.net</a>
</div> </div>
</div> </div>
+1 -1
View File
@@ -1,5 +1,5 @@
<div class="anian-lunar-date-widget"> <div class="anian-lunar-date-widget">
<div class="anian-lunar-date-text" id="anianLunarText"> <div class="anian-lunar-date-text" id="anianLunarText">
一日不见如隔三秋 一日不见 · 如隔三秋
</div> </div>
</div> </div>
+3 -3
View File
@@ -1,8 +1,8 @@
<div class="anianx-wrap"> <div class="anianx-wrap">
<div class="anianx-group"> <div class="anianx-group">
<button class="anianx-btn anianx-left" data-anianx-type="main" data-anianx-href="https://anian.cc">主线路</button> <button class="anianx-btn anianx-left" data-anianx-type="main">观音签</button>
<button class="anianx-btn" data-anianx-type="test">测速</button> <button class="anianx-btn" data-anianx-type="test">测速</button>
<button class="anianx-btn anianx-right" data-anianx-type="sub" data-anianx-href="https://www.anian.cc">副线路</button> <button class="anianx-btn anianx-right" data-anianx-type="sub">歇后语</button>
<div class="anianx-bubble" id="anianxBubble"><span id="anianxBubbleText" class="anianx-loading">当前线路检测中</span></div> <div class="anianx-bubble" id="anianxBubble"><span id="anianxBubbleText">一日不见 · 如隔三秋</span></div>
</div> </div>
</div> </div>
+12 -12
View File
@@ -10,7 +10,7 @@ spec:
- $formkit: attachment - $formkit: attachment
name: favicon name: favicon
label: favicon label: favicon
value: /themes/theme-pix/assets/img/favicon.ico value: /themes/theme-pix/assets/img/logo.webp
help: 建议制作一张400x400的png图像, 然后等比缩小到你想转换的ico尺寸,最后通过网上的工具转换成ico图标格式. help: 建议制作一张400x400的png图像, 然后等比缩小到你想转换的ico尺寸,最后通过网上的工具转换成ico图标格式.
- $formkit: menuRadio - $formkit: menuRadio
name: left_nav name: left_nav
@@ -48,7 +48,7 @@ spec:
- $formkit: attachment - $formkit: attachment
name: default_avatar name: default_avatar
label: 博主头像 label: 博主头像
value: /themes/theme-pix/assets/img/avatar.png value: /themes/theme-pix/assets/img/logo.webp
- group: base_top_set - group: base_top_set
label: 顶部设置 label: 顶部设置
@@ -56,7 +56,7 @@ spec:
- $formkit: attachment - $formkit: attachment
name: site_logo name: site_logo
label: 常规LOGO label: 常规LOGO
value: /themes/theme-pix/assets/img/avatar.png value: /themes/theme-pix/assets/img/logo.webp
- $formkit: number - $formkit: number
name: logo_height name: logo_height
label: 常规LOGO高度尺寸 label: 常规LOGO高度尺寸
@@ -66,11 +66,11 @@ spec:
name: m_site_logo name: m_site_logo
label: 方形LOGO label: 方形LOGO
help: 建议制作一张48*48的方形LOGO help: 建议制作一张48*48的方形LOGO
value: /themes/theme-pix/assets/img/avatar.png value: /themes/theme-pix/assets/img/logo.webp
- $formkit: attachment - $formkit: attachment
name: mobile_logo name: mobile_logo
label: 移动端LOGO label: 移动端LOGO
value: /themes/theme-pix/assets/img/avatar.png value: /themes/theme-pix/assets/img/logo.webp
- $formkit: checkbox - $formkit: checkbox
name: top_nav_on_web name: top_nav_on_web
id: top_nav_on_web id: top_nav_on_web
@@ -316,7 +316,7 @@ spec:
- $formkit: attachment - $formkit: attachment
name: topbg_banner name: topbg_banner
label: 顶部封面图 label: 顶部封面图
value: /themes/theme-pix/assets/img/banner.jpg value: /themes/theme-pix/assets/img/banner-all.webp
- $formkit: radio - $formkit: radio
name: home_post_type name: home_post_type
label: 首页类型模式 label: 首页类型模式
@@ -425,7 +425,7 @@ spec:
if: $get(donate_on).value if: $get(donate_on).value
name: donate_pic name: donate_pic
label: 打赏二维码 label: 打赏二维码
value: /themes/theme-pix/assets/img/avatar.png value: /themes/theme-pix/assets/img/logo.webp
- group: moments - group: moments
label: 瞬间设置 label: 瞬间设置
@@ -451,7 +451,7 @@ spec:
- $formkit: attachment - $formkit: attachment
name: banner name: banner
label: 瞬间分享背景 label: 瞬间分享背景
value: /themes/theme-pix/assets/img/banner.jpg value: /themes/theme-pix/assets/img/banner-all.webp
- $formkit: attachmentPolicySelect - $formkit: attachmentPolicySelect
name: attachmentPolicy name: attachmentPolicy
label: 附件存储策略 label: 附件存储策略
@@ -763,7 +763,7 @@ spec:
label: 一言 label: 一言
value: value:
title: 一言 title: 一言
yiyan_bg: /themes/theme-pix/assets/img/banner.jpg yiyan_bg: /themes/theme-pix/assets/img/banner-all.webp
children: children:
- $formkit: text - $formkit: text
name: title name: title
@@ -870,11 +870,11 @@ spec:
- $formkit: attachment - $formkit: attachment
name: land_logo name: land_logo
label: LOGO或头像 label: LOGO或头像
value: /themes/theme-pix/assets/img/avatar.png value: /themes/theme-pix/assets/img/logo.webp
- $formkit: attachment - $formkit: attachment
name: land_feature name: land_feature
label: 封面头图 label: 封面头图
value: /themes/theme-pix/assets/img/landimg.jpg value: /themes/theme-pix/assets/img/logo.webp
- $formkit: text - $formkit: text
name: land_title name: land_title
label: 标题或名称 label: 标题或名称
@@ -938,7 +938,7 @@ spec:
- $formkit: attachment - $formkit: attachment
name: custom_login_background name: custom_login_background
label: 背景图 label: 背景图
value: /themes/theme-pix/assets/img/default-header.png value: /themes/theme-pix/assets/img/banner-all.webp
accepts: accepts:
- "image/*" - "image/*"
+13 -2
View File
@@ -8,9 +8,20 @@
<th:block th:replace="~{modules/header}"/> <th:block th:replace="~{modules/header}"/>
<div id="pjax-container" th:with="page = ${#strings.isEmpty(param.page) ? 1 : param.page}"> <div id="pjax-container" th:with="
page = ${#lists.isEmpty(param.page) or #strings.isEmpty(param.page[0]) ? 1 : param.page[0]},
tag = ${#lists.isEmpty(param.tag) ? null : param.tag[0]}
">
<th:block th:replace="~{macro/home-blog :: home-blog(${postFinder.list(page,site.post.postPageSize)},'/archives')}"></th:block> <th:block th:if="${#strings.isEmpty(tag)}">
<th:block th:replace="~{macro/home-blog :: home-blog(${postFinder.list(page,site.post.postPageSize)},'/archives',null,null)}"></th:block>
</th:block>
<th:block th:unless="${#strings.isEmpty(tag)}" th:each="categoryItem : ${categoryFinder.listAll()}">
<th:block th:if="${#strings.equals(tag, categoryItem.spec.displayName) or #strings.equals(tag, categoryItem.metadata.name)}">
<th:block th:replace="~{macro/home-blog :: home-blog(${postFinder.listByCategory(page,site.post.postPageSize,categoryItem.metadata.name)},'/archives',${categoryItem.spec.displayName},${categoryItem.metadata.name})}"></th:block>
</th:block>
</th:block>
</div> </div>
+673 -2
View File
@@ -45,13 +45,13 @@
@media (min-width: 960px) and (max-width: 1359.98px) { @media (min-width: 960px) and (max-width: 1359.98px) {
.listree-box { .listree-box {
margin-left: calc((100vw - 860px) / 2 + 284px); margin-left: calc((100vw - 860px) / 2 + 284px + 50px);
} }
} }
@media (min-width: 1360px) { @media (min-width: 1360px) {
.listree-box { .listree-box {
margin-left: calc((100vw - 1400px) / 2 + 291px); margin-left: calc((100vw - 1400px) / 2 + 291px + 50px);
} }
} }
@@ -304,6 +304,15 @@
0 var(--pixar-button-depth) 0 var(--pixar-ui-dark); 0 var(--pixar-button-depth) 0 var(--pixar-ui-dark);
} }
.pixar-notice-btn-close:disabled,
.pixar-notice-btn-confirm:disabled {
cursor: not-allowed;
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 { .pixar-notice-btn-close {
background: var(--pixar-ui-red); background: var(--pixar-ui-red);
box-shadow: box-shadow:
@@ -324,3 +333,665 @@
.pixar-notice-btn-close:hover { .pixar-notice-btn-close:hover {
border-color: var(--pixar-ui-red-border) !important; border-color: var(--pixar-ui-red-border) !important;
} }
/* 按钮禁用样式 */
.push_item:disabled {
background: #c7d4ce;
cursor: not-allowed;
color: #f0fdf4;
}
/* 删除确认弹窗样式 */
.moments-modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 1999;
padding: 20px;
box-sizing: border-box;
animation: momentsFadeIn 0.2s ease;
}
.moments-card-widget {
overflow: hidden;
position: relative;
background-color: #ffffff;
text-align: left;
border-radius: 0.5rem;
width: 100%;
max-width: 400px;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
animation: momentsSlideUp 0.3s ease;
}
.moments-card-header {
padding: 1.5rem;
background-color: #ffffff;
}
.moments-header-row {
display: flex;
align-items: center;
gap: 1rem;
}
.moments-icon-wrapper {
display: flex;
flex-shrink: 0;
justify-content: center;
align-items: center;
background-color: #fee2e2;
width: 3rem;
height: 3rem;
border-radius: 9999px;
}
.moments-icon-wrapper svg {
color: #dc2626;
width: 1.5rem;
height: 1.5rem;
}
.moments-text-content {
flex: 1;
text-align: left;
}
.moments-title-text {
color: #111827;
font-size: 1.1rem;
font-weight: 600;
line-height: 1.5rem;
display: block;
}
.moments-message-text {
margin-top: 0.5rem;
margin-bottom: 0;
color: #6b7280;
font-size: 0.9rem;
line-height: 1.25rem;
}
.moments-button-group {
margin-top: 1rem;
display: flex;
gap: 0.75rem;
flex-direction: row;
}
.moments-btn-confirm {
flex: 1;
display: inline-flex;
padding: 0.5rem 1rem;
background-color: #dc2626;
color: #ffffff;
font-size: 0.9rem;
line-height: 1.3rem;
font-weight: 500;
justify-content: center;
border-radius: 0.375rem;
border-width: 1px;
border-color: transparent;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
cursor: pointer;
transition: background-color 0.2s;
white-space: nowrap;
}
.moments-btn-confirm:hover {
background-color: #b91c1c;
}
.moments-btn-cancel {
flex: 1;
display: inline-flex;
padding: 0.5rem 1rem;
background-color: #ffffff;
color: #374151;
font-size: 0.9rem;
line-height: 1.3rem;
font-weight: 500;
justify-content: center;
border-radius: 0.375rem;
border: 1px solid #d1d5db;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
cursor: pointer;
transition: background-color 0.2s;
white-space: nowrap;
}
.moments-btn-cancel:hover {
background-color: #f3f4f6;
}
.moments-btn-confirm:disabled {
background-color: #fecaca;
cursor: not-allowed;
box-shadow: none;
opacity: 0.7;
}
.moments-btn-cancel:disabled,
.push_close:disabled {
background-color: #e7f0e5;
color: #9ca3af;
border-color: #e7f0e5;
cursor: not-allowed;
box-shadow: none;
opacity: 0.7;
}
/* --- 追加:黄色警告模式 --- */
.theme-yellow .moments-icon-wrapper {
background-color: #fef3c7;
}
.theme-yellow .moments-icon-wrapper svg {
color: #d97706;
}
.theme-yellow .moments-btn-confirm {
background-color: #d97706;
}
.theme-yellow .moments-btn-confirm:hover {
background-color: #b45309;
}
/* --- 追加:绿色确认模式 --- */
.theme-green .moments-icon-wrapper {
background-color: #d1fae5;
}
.theme-green .moments-icon-wrapper svg {
color: #059669;
}
.theme-green .moments-btn-confirm {
background-color: #059669;
}
.theme-green .moments-btn-confirm:hover {
background-color: #047857;
}
/* --- 追加:红色保持默认,这里只是为了统一命名,可不加 --- */
.theme-red .moments-icon-wrapper {
background-color: #fee2e2;
}
.theme-red .moments-icon-wrapper svg {
color: #dc2626;
}
.theme-red .moments-btn-confirm {
background-color: #dc2626;
}
@keyframes momentsFadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes momentsSlideUp {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* --- 删除动画 --- */
/* 飘散消失动画 (持续 0.8s) */
.moments-delete-disperse {
animation: momentsDeleteDisperse 0.8s ease-in forwards;
transform-origin: center bottom;
pointer-events: none;
}
@keyframes momentsDeleteDisperse {
0% {
opacity: 1;
transform: translateY(0) rotate(0deg) scale(1);
filter: blur(0);
}
20% {
opacity: 0.9;
transform: translateY(-10px) rotate(2deg) scale(1.02);
}
100% {
opacity: 0;
transform: translateY(-120px) rotate(-8deg) scale(0.6);
filter: blur(3px);
}
}
.douban_page #post_item {
padding: 0;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
column-gap: 0;
row-gap: 0;
align-items: center;
}
.douban_page #post_item .loading_box {
text-align: center;
grid-column: 1 / -1;
}
.douban_page #post_item > .no-results {
grid-column: 1 / -1;
width: 100%;
}
.douban_page #post_item > #prev_pagination {
grid-column: 1 / -1;
}
.douban_page #post_item .douban_card_item {
width: 100%;
margin: 0;
padding: 0 40px;
border-right: 1px solid #e5e7eb;
display: flex;
align-items: flex-start;
}
.douban_page #post_item .douban_card_item:nth-child(2n) {
border-right: none;
}
.douban_page #post_item .douban_card_inner {
display: grid !important;
grid-template-columns: 100px 1fr;
grid-template-rows: auto auto 1fr;
column-gap: 16px;
row-gap: 3px;
padding: 20px 0;
background: transparent;
width: 100%;
align-items: start;
}
.douban_page #post_item .douban_media_col {
width: 100px;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
grid-column: 1;
grid-row: 2 / 4;
}
.douban_page #post_item {
align-items: stretch !important;
}
.douban_page #post_item .douban_poster_link,
.douban_page #post_item .douban_poster_img {
width: 100px;
}
.douban_page #post_item .douban_poster_img {
display: block;
height: 140px;
object-fit: cover;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.douban_page #post_item .douban_rating_wrap {
display: none;
}
.douban_page #post_item .douban_text_col {
display: contents;
}
.douban_page #post_item .douban_title_row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
grid-column: 1 / -1;
grid-row: 1;
margin-bottom: 6px;
text-align: left;
}
.douban_page #post_item .douban_title_text {
min-width: 0;
overflow: hidden;
color: var(--pix-theme);
font-size: 16px;
line-height: 1.35;
font-weight: 650;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
}
.douban_page #post_item .douban_title_text:hover {
color: var(--hilight-color);
}
.douban_page #post_item .douban_title_text_plain,
.douban_page #post_item .douban_title_text_plain:hover {
color: #000;
}
.douban_page #post_item .douban_detail_link {
flex: 0 0 auto;
width: auto;
height: auto;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 3px 5px;
border-radius: 4px;
color: var(--pix-theme);
font-size: 13px;
line-height: 1.4;
text-decoration: none;
visibility: hidden;
pointer-events: none;
transition: color 0.2s ease, background-color 0.2s ease;
}
.douban_page #post_item .douban_detail_link.is-visible {
visibility: visible;
pointer-events: auto;
}
.douban_page #post_item .douban_detail_link:hover {
background: var(--pix-background);
color: var(--hilight-color);
}
.douban_page #post_item .douban_sub_meta {
display: flex;
align-items: center;
gap: 0px;
margin-bottom: 6px;
flex-wrap: wrap;
grid-column: 2;
grid-row: 2;
align-self: start;
}
.douban_page #post_item .douban_time_text {
display: inline-block;
padding: 3px 8px;
border-radius: 6px;
background: rgba(168, 85, 247, 0.12);
color: #8b5cf6;
font-size: 12px;
line-height: 1.4;
font-weight: 500;
margin-right: 7px;
}
.douban_page #post_item .douban_type_badge {
display: inline-block;
padding: 3px 8px;
border-radius: 6px;
background: rgba(14, 165, 233, 0.13);
color: #0284c7;
font-size: 12px;
line-height: 1.4;
vertical-align: middle;
font-weight: 500;
margin-right: 7px;
}
.douban_page #post_item .douban_score_badge {
display: inline-block;
padding: 3px 8px;
border-radius: 6px;
background: rgba(249, 115, 22, 0.14);
color: #ea580c;
font-size: 12px;
line-height: 1.4;
vertical-align: middle;
font-weight: 500;
}
.douban_page #post_item .douban_content_box {
color: #55716a;
grid-column: 2;
grid-row: 3;
align-self: start;
}
.douban_page #post_item .douban_content_main {
margin: 0;
font-size: 14px;
line-height: 1.6;
color: #43584d;
white-space: pre-wrap;
display: -webkit-box;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 5;
}
.douban_page #post_item .douban_expand_btn {
display: inline-block;
padding: 0;
color: var(--pix-theme);
font-size: 14px;
font-weight: 500;
background: transparent;
border: none;
cursor: pointer;
text-decoration: none;
line-height: 1.6;
}
.douban_page #post_item .douban_content_meta {
margin: 8px 0 0;
font-size: 12px;
color: #76937f;
line-height: 1.5;
}
.douban_detail_page #post_item {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.douban_detail_page #post_item .douban_card_item {
grid-column: 1 / -1;
border-right: none;
padding: 35px 58px;
}
.douban_detail_page #post_item .douban_detail_link {
display: none;
}
.douban_detail_page #post_item .douban_title_text {
overflow: visible;
text-overflow: clip;
white-space: normal;
overflow-wrap: anywhere;
}
.douban_detail_page #post_item .douban_content_main {
display: block;
overflow: visible;
overflow-wrap: anywhere;
-webkit-line-clamp: unset;
-webkit-box-orient: initial;
}
@media only screen and (max-width:1359px) {
.douban_page #post_item {
grid-template-columns: 1fr;
}
.douban_page #post_item .douban_card_item {
border-right: none !important;
}
}
@media only screen and (max-width:540px) {
.douban_page #post_item .douban_card_item {
padding: 0 20px;
}
.douban_page #post_item .douban_card_inner {
column-gap: 11px;
row-gap: 0px;
}
.douban_detail_page #post_item .douban_card_item {
padding: 0 20px;
}
}
.equipments_page #post_item {
padding: 0;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
column-gap: 0;
row-gap: 0;
align-items: stretch;
}
.equipments_page #post_item .loading_box,
.equipments_page #post_item > .no-results,
.equipments_page #post_item > #prev_pagination {
grid-column: 1 / -1;
}
.equipments_page #post_item .equipment_item {
width: 100%;
margin: 0;
padding: 10px 40px;
border: 0;
display: flex;
align-items: center;
}
.equipments_page #post_item .equipment_card_inner {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.equipments_page #post_item .equipment_visual {
position: relative;
display: block;
width: 100%;
aspect-ratio: 1;
padding: 0;
overflow: hidden;
border: 0;
border-radius: 50%;
background: transparent;
color: inherit;
cursor: pointer;
font: inherit;
line-height: 1;
}
.equipments_page #post_item .equipment_visual > img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 50%;
}
.equipments_page #post_item .equipment_overlay {
position: absolute;
inset: 0;
z-index: 1;
display: flex;
align-items: center;
justify-content: center;
padding: 30px;
overflow: auto;
border-radius: 50%;
background: radial-gradient(
circle closest-side at center,
rgba(0, 0, 0, 0.5) 0%,
rgba(0, 0, 0, 0.5) 70%,
rgba(0, 0, 0, 0.3) 85%,
rgba(0, 0, 0, 0) 100%
);
color: #fff;
text-align: center;
opacity: 0;
visibility: hidden;
pointer-events: none;
transition: opacity 0.2s ease, visibility 0.2s ease;
}
.equipments_page #post_item .equipment_visual:hover .equipment_overlay {
opacity: 1;
visibility: visible;
pointer-events: auto;
}
.equipments_page #post_item .equipment_description {
max-width: 100%;
max-height: 100%;
margin: 0;
overflow: auto;
color: #fff;
font-size: 14px;
line-height: 1.6;
white-space: pre-wrap;
overflow-wrap: anywhere;
font-size: 16px;
}
@media only screen and (max-width:1366px) {
.equipments_page #post_item {
grid-template-columns: 1fr;
}
.equipments_page #post_item .equipment_item {
width: 70%;
margin-left: auto;
margin-right: auto;
}
}
@media only screen and (max-width:540px) {
.equipments_page #post_item {
grid-template-columns: 1fr;
}
.equipments_page #post_item .equipment_item {
width: 100%;
padding: 10px 20px;
}
.equipments_page #post_item .equipment_overlay {
padding: 24px;
}
}
+41
View File
@@ -129,6 +129,47 @@
background-color: var(--dark-ac-btn); background-color: var(--dark-ac-btn);
} }
.dark .listree-box {
color: var(--light-color);
background: rgb(27 29 48 / 94%);
border-color: var(--dark-border);
box-shadow: 0 18px 48px rgb(0 0 0 / 28%);
}
.dark .toc_nav .listree-btn:hover,
.dark .toc_nav .listree-btn.is-active {
background: transparent;
box-shadow: none;
}
.dark .toc_nav .listree-btn.is-active i {
transform: rotate(90deg);
}
.dark #listree-ol ul {
border-left-color: var(--dark-border);
}
.dark #listree-ol li a {
color: var(--text-color);
}
.dark #listree-ol li a:hover {
color: var(--light-color);
background: rgb(255 255 255 / 7%);
}
.dark #listree-ol>li.current>a,
.dark #listree-ol>li ul li.current>a {
color: var(--dark-ac-btn);
border-left-color: var(--dark-ac-btn);
background: rgb(43 72 255 / 13%);
}
.dark #listree-ol::-webkit-scrollbar-thumb {
background: rgb(43 72 255 / 48%);
}
.dark .uk-dropdown{ .dark .uk-dropdown{
background: var(--dark-border); background: var(--dark-border);
color: #666; color: #666;
+354 -64
View File
@@ -124,7 +124,7 @@ header#masthead {
} }
.top_logo { .top_logo {
padding: 20px 40px; padding: 0px;
text-align: center; text-align: center;
} }
@@ -313,6 +313,40 @@ header#masthead {
display: flex; display: flex;
} }
.toc_nav {
display: none;
}
body.toc-ready .toc_nav[aria-hidden="false"] {
display: block;
}
.toc_nav .listree-btn {
border-radius: 8px;
background: transparent;
box-shadow: none;
transition: transform .22s ease;
}
.toc_nav .listree-btn:hover,
.toc_nav .listree-btn.is-active {
background: transparent;
box-shadow: none;
}
.toc_nav .listree-btn:active {
transform: scale(.94);
}
.toc_nav .listree-btn i {
font-size: 20px;
transition: transform .22s ease;
}
.toc_nav .listree-btn.is-active i {
transform: rotate(90deg);
}
.uk-modal-close-full.uk-close { .uk-modal-close-full.uk-close {
bottom: 5%; bottom: 5%;
top: auto; top: auto;
@@ -1334,6 +1368,7 @@ a.close_local {
.moment_cat_nav, .moment_cat_nav,
.posts_cat_nav, .posts_cat_nav,
.photos_cat_nav, .photos_cat_nav,
.douban_cat_nav,
.friends_cat_nav { .friends_cat_nav {
padding: 25px 40px; padding: 25px 40px;
border-bottom: 1px solid var(--pix-background); border-bottom: 1px solid var(--pix-background);
@@ -1342,6 +1377,7 @@ a.close_local {
.moment_cat_nav ul, .moment_cat_nav ul,
.posts_cat_nav ul, .posts_cat_nav ul,
.photos_cat_nav ul, .photos_cat_nav ul,
.douban_cat_nav ul,
.friends_cat_nav ul { .friends_cat_nav ul {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -1356,6 +1392,7 @@ a.close_local {
.moment_cat_nav ul li, .moment_cat_nav ul li,
.posts_cat_nav ul li, .posts_cat_nav ul li,
.photos_cat_nav ul li, .photos_cat_nav ul li,
.douban_cat_nav ul li,
.friends_cat_nav ul li { .friends_cat_nav ul li {
list-style: none; list-style: none;
flex: none; flex: none;
@@ -1364,6 +1401,7 @@ a.close_local {
.moment_cat_nav ul::-webkit-scrollbar, .moment_cat_nav ul::-webkit-scrollbar,
.posts_cat_nav ul::-webkit-scrollbar, .posts_cat_nav ul::-webkit-scrollbar,
.photos_cat_nav ul::-webkit-scrollbar, .photos_cat_nav ul::-webkit-scrollbar,
.douban_cat_nav ul::-webkit-scrollbar,
.friends_cat_nav ul::-webkit-scrollbar { .friends_cat_nav ul::-webkit-scrollbar {
display: none; display: none;
@@ -1374,6 +1412,7 @@ a.close_local {
.moment_cat_nav ul li a, .moment_cat_nav ul li a,
.posts_cat_nav ul li a, .posts_cat_nav ul li a,
.photos_cat_nav ul li a, .photos_cat_nav ul li a,
.douban_cat_nav ul li a,
.friends_cat_nav ul li a { .friends_cat_nav ul li a {
padding: 5px 10px; padding: 5px 10px;
background: #e1e9e5; background: #e1e9e5;
@@ -1388,6 +1427,7 @@ a.close_local {
.moment_cat_nav ul li a:hover, .moment_cat_nav ul li a:hover,
.posts_cat_nav ul li a:hover, .posts_cat_nav ul li a:hover,
.photos_cat_nav ul li a:hover, .photos_cat_nav ul li a:hover,
.douban_cat_nav ul li a:hover,
.friends_cat_nav ul li a:hover { .friends_cat_nav ul li a:hover {
background-color: var(--pix-theme); background-color: var(--pix-theme);
color: #fff !important; color: #fff !important;
@@ -1396,6 +1436,7 @@ a.close_local {
.moment_cat_nav ul li a.active, .moment_cat_nav ul li a.active,
.posts_cat_nav ul li a.active, .posts_cat_nav ul li a.active,
.photos_cat_nav ul li a.active, .photos_cat_nav ul li a.active,
.douban_cat_nav ul li a.active,
.friends_cat_nav ul li a.active { .friends_cat_nav ul li a.active {
background: var(--pix-theme); background: var(--pix-theme);
color: #fff !important; color: #fff !important;
@@ -1403,17 +1444,31 @@ a.close_local {
#t_pagination, #t_pagination,
#pagination, #pagination,
#p_pagination { #p_pagination,
padding: 30px; #prev_pagination {
padding: 18px 10px;
text-align: center; text-align: center;
display: flex; display: flex;
justify-content: center; justify-content: center;
border-top: 1px solid var(--pix-background); border-top: 1px solid var(--pix-background);
} }
#t_pagination .post-paging,
#pagination .post-paging,
#p_pagination .post-paging,
#prev_pagination .post-paging {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
gap: 15px;
width: 100%;
}
#t_pagination a, #t_pagination a,
#pagination a, #pagination a,
#p_pagination a { #p_pagination a,
#prev_pagination a {
padding: 10px 15px; padding: 10px 15px;
background: var(--pix-theme); background: var(--pix-theme);
color: #fff; color: #fff;
@@ -1421,6 +1476,159 @@ a.close_local {
display: flex; display: flex;
} }
#t_pagination .page-jump-form,
#pagination .page-jump-form,
#p_pagination .page-jump-form {
display: inline-flex;
align-items: center;
gap: 4px;
color: #7aa1a1;
font-size: 15px;
line-height: 1;
}
#t_pagination .page-jump-input,
#pagination .page-jump-input,
#p_pagination .page-jump-input {
width: 48px;
height: 30px;
padding: 0 4px;
border: 1px solid var(--pix-background);
border-radius: 0;
background: #fff;
color: #55716a;
font-size: 15px;
line-height: 30px;
text-align: center;
box-sizing: border-box;
-moz-appearance: textfield;
}
#t_pagination .page-jump-input-wrap,
#pagination .page-jump-input-wrap,
#p_pagination .page-jump-input-wrap {
display: inline-flex;
height: 30px;
align-items: stretch;
flex: 0 0 auto;
}
#t_pagination .page-jump-step,
#pagination .page-jump-step,
#p_pagination .page-jump-step {
width: 18px;
height: 30px;
flex: 0 0 18px;
padding: 0;
border: 1px solid var(--pix-background);
border-radius: 0;
background: #e8f5ed;
color: var(--pix-theme);
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
line-height: 1;
font-family: inherit;
transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}
#t_pagination .page-jump-step-down,
#pagination .page-jump-step-down,
#p_pagination .page-jump-step-down {
border-right: 0;
border-radius: 4px 0 0 4px;
}
#t_pagination .page-jump-step-up,
#pagination .page-jump-step-up,
#p_pagination .page-jump-step-up {
border-left: 0;
border-radius: 0 4px 4px 0;
}
#t_pagination .page-jump-step:hover:not(:disabled),
#pagination .page-jump-step:hover:not(:disabled),
#p_pagination .page-jump-step:hover:not(:disabled) {
background: var(--pix-theme);
color: #fff;
}
#t_pagination .page-jump-step:disabled,
#pagination .page-jump-step:disabled,
#p_pagination .page-jump-step:disabled {
opacity: .35;
cursor: not-allowed;
}
#t_pagination .page-jump-step i,
#pagination .page-jump-step i,
#p_pagination .page-jump-step i {
font-size: 12px;
}
#t_pagination .page-jump-input:focus,
#pagination .page-jump-input:focus,
#p_pagination .page-jump-input:focus {
border-color: var(--pix-theme);
}
#t_pagination .page-jump-input::-webkit-inner-spin-button,
#t_pagination .page-jump-input::-webkit-outer-spin-button,
#pagination .page-jump-input::-webkit-inner-spin-button,
#pagination .page-jump-input::-webkit-outer-spin-button,
#p_pagination .page-jump-input::-webkit-inner-spin-button,
#p_pagination .page-jump-input::-webkit-outer-spin-button {
margin: 0;
-webkit-appearance: none;
appearance: none;
}
#t_pagination .page-jump-submit,
#pagination .page-jump-submit,
#p_pagination .page-jump-submit {
width: 30px;
height: 30px;
padding: 0;
border: 0;
border-radius: 0;
background: transparent;
color: var(--pix-theme);
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-family: inherit;
}
#t_pagination .page-jump-submit i,
#pagination .page-jump-submit i,
#p_pagination .page-jump-submit i {
font-size: 20px;
}
#prev_pagination {
overflow: hidden;
max-height: 0;
opacity: 0;
transform: translateY(-12px);
padding-top: 0;
padding-bottom: 0;
border-top: 0;
border-bottom: 0;
pointer-events: none;
transition: max-height 0.35s ease, opacity 0.3s ease, transform 0.35s ease, padding 0.35s ease, border-color 0.35s ease;
}
#prev_pagination.is-visible {
max-height: 140px;
opacity: 1;
transform: translateY(0);
padding: 30px;
border-bottom: 1px solid var(--pix-background);
pointer-events: auto;
}
.p_item { .p_item {
padding: 40px 0; padding: 40px 0;
border-bottom: 1px solid var(--pix-background); border-bottom: 1px solid var(--pix-background);
@@ -2268,21 +2476,20 @@ a.go_top.show {
/* 手机端顶部导航栏回到顶部按钮 */ /* 手机端顶部导航栏回到顶部按钮 */
.tool_top { .tool_top {
position: fixed;
bottom: 10%;
opacity: 0; opacity: 0;
transition: all 0.15s; transform: translateY(8px);
font-size: 26px; transition: opacity 0.15s, transform 0.15s;
transform: translateY(20px);
pointer-events: none; pointer-events: none;
color: #000000;
} }
.tool_top.show { .tool_top.show {
opacity: 1; opacity: 1;
transform: translateY(0px); transform: translateY(0);
pointer-events: auto; pointer-events: auto;
color: #000000; }
.tool_top .tool_top_icon {
font-size: 25px;
} }
.footer_nav_box .left_inner { .footer_nav_box .left_inner {
@@ -3797,7 +4004,7 @@ a.play_btn i {
} }
.player_bar { .player_bar {
height: 3px; height: 6px;
width: 100%; width: 100%;
background: #ddd; background: #ddd;
position: relative; position: relative;
@@ -3807,7 +4014,7 @@ a.play_btn i {
.player_bar .progress { .player_bar .progress {
position: absolute; position: absolute;
height: 3px; height: 6px;
background: linear-gradient(90deg, #00b34a, #00e0c7); background: linear-gradient(90deg, #00b34a, #00e0c7);
left: 0; left: 0;
top: 0; top: 0;
@@ -5229,7 +5436,7 @@ a.read-less-btn:hover {
} }
a.m_play i { a.m_play i {
font-size: 32px; font-size: 28px;
color: var(--pix-theme); color: var(--pix-theme);
} }
@@ -5535,7 +5742,7 @@ a.m_loop {
width: 330px; width: 330px;
padding: 5px; padding: 5px;
border-radius: 5px; border-radius: 5px;
min-height: 550px; max-height: 450px;
} }
.poster_box .loading_box { .poster_box .loading_box {
@@ -5653,7 +5860,7 @@ span.edit_post a {
.m_offcanvas .inner { .m_offcanvas .inner {
background: background:
linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)),
url('/upload/celan.png') no-repeat center bottom; url('/themes/theme-pix/assets/img/logo.webp') no-repeat center bottom;
background-size: cover, 100%; background-size: cover, 100%;
padding: 30px; padding: 30px;
} }
@@ -5723,8 +5930,7 @@ span.edit_post a {
background: rgba(235, 242, 237, 0.8); background: rgba(235, 242, 237, 0.8);
border-top: 1px solid #eaeaea; border-top: 1px solid #eaeaea;
align-items: center; align-items: center;
border-top-left-radius: 20px; border-radius: 0;
border-top-right-radius: 20px;
height: 50px; height: 50px;
} }
@@ -5945,11 +6151,6 @@ a.change i.ri-refresh-line {
.not_mobile { .not_mobile {
display: none; display: none;
} }
.footer_nav_box {
border-radius: 50px;
}
} }
.single_wrap .comments-area, .single_wrap .comments-area,
@@ -5974,76 +6175,147 @@ a.change i.ri-refresh-line {
/*toc*/ /*toc*/
.listree-box { .listree-box {
display: none;
position: fixed; position: fixed;
z-index: 999; z-index: 999;
top: 485px; top: 10px;
left: 0; left: 15px;
background-color: var(--toc-color);
color: #fff;
border-radius: 0 10px 10px 0;
}
h3.listree-titles {
float: right;
cursor: default;
padding: 20px 8px 9px 6px;
font-size: 1.01rem;
}
h3.listree-titles a.listree-btn {
color: #fff;
display: block; display: block;
width: 22px; width: 290px;
text-align: center; max-width: calc(100vw - 32px);
max-height: calc(100vh - 124px);
overflow: hidden;
color: #29372f;
background: rgb(255 255 255 / 92%);
border: 1px solid rgb(34 187 109 / 16%);
border-radius: 12px;
box-shadow: 0 18px 48px rgb(23 45 31 / 16%);
backdrop-filter: blur(.7rem);
-webkit-backdrop-filter: blur(.7rem);
opacity: 0;
visibility: hidden;
pointer-events: none;
transform: translate3d(-12px, 8px, 0) scale(.98);
transform-origin: top left;
transition: opacity .24s ease, visibility .24s ease, transform .24s ease;
}
.listree-box.is-open {
opacity: 1;
visibility: visible;
pointer-events: auto;
transform: translate3d(0, 0, 0) scale(1);
} }
#listree-ol { #listree-ol {
max-height: 230px; display: block;
overflow: scroll; max-height: min(58vh, 420px);
overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
float: left; float: none;
height: 100%; height: auto;
min-height: 100px; min-height: 0;
line-height: 1.5; line-height: 1.45;
margin: 20px 0px 20px -10px; margin: 0;
padding-right: 20px; padding: 12px 10px 14px;
align-items: center; list-style: none;
border-right: 1px solid #eeeeef; border: 0;
} }
#listree-ol li { #listree-ol li {
line-height: 1.8; line-height: inherit;
margin-bottom: 6px; margin: 2px 0;
list-style: none; list-style: none;
} }
#listree-ol li a { #listree-ol li a {
color: #fff; display: block;
width: 100%;
box-sizing: border-box;
padding: 7px 10px 7px 12px;
color: #52685b;
border-left: 3px solid transparent;
border-radius: 8px;
font-size: 13px;
line-height: 1.45;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease;
}
#listree-ol li a:hover {
color: #15251c;
background: rgb(34 187 109 / 8%);
transform: translateX(2px);
} }
#listree-ol ul { #listree-ol ul {
margin-top: 0px; margin: 3px 0 3px 12px;
padding-left: 10px; padding-left: 10px;
border-left: 1px solid rgb(34 54 41 / 10%);
list-style: none;
}
#listree-ol a.node-name--H1,
#listree-ol a.node-name--H2 {
font-weight: 600;
}
#listree-ol a.node-name--H4,
#listree-ol a.node-name--H5,
#listree-ol a.node-name--H6 {
font-size: 12px;
} }
a#listree-click.current, a#listree-click.current,
#listree-ol>li.current>a, #listree-ol>li.current>a,
#listree-ol>li ul li.current>a { #listree-ol>li ul li.current>a {
color: #f2ff2c; color: var(--toc-color);
border-left-color: var(--toc-color);
background: rgb(34 187 109 / 10%);
font-weight: 700;
}
.listree-box.is-open #listree-ol li {
animation: listreeItemIn .26s ease both;
} }
#listree-ol::-webkit-scrollbar-track { #listree-ol::-webkit-scrollbar-track {
background-color: #fff; background-color: transparent;
} }
#listree-ol::-webkit-scrollbar-thumb { #listree-ol::-webkit-scrollbar-thumb {
background: rgb(199, 201, 204); background: rgb(34 187 109 / 26%);
border-radius: 999px;
} }
#listree-ol::-webkit-scrollbar { #listree-ol::-webkit-scrollbar {
width: 3px; width: 4px;
}
@keyframes listreeItemIn {
from {
opacity: 0;
transform: translateX(-6px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@media (prefers-reduced-motion: reduce) {
.toc_nav .listree-btn,
.toc_nav .listree-btn i,
.listree-box,
#listree-ol li a {
transition: none;
}
.listree-box.is-open #listree-ol li {
animation: none;
}
} }
.dark .db--container { .dark .db--container {
@@ -6213,7 +6485,7 @@ a#listree-click.current,
height: 100dvh; height: 100dvh;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background-color: rgba(0, 0, 0, 0.1); background-color: rgba(0, 0, 0, 0.5);
z-index: 9999; z-index: 9999;
box-sizing: border-box; box-sizing: border-box;
padding: 20px; padding: 20px;
@@ -6281,7 +6553,7 @@ a#listree-click.current,
} }
.notice-content { .notice-content {
background-image: url('/upload/yiyan.png'); background-image: url('/themes/theme-pix/assets/img/sidebar-notice.webp');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
background-position: center; background-position: center;
@@ -6630,7 +6902,7 @@ a#listree-click.current,
.anianx-bubble { .anianx-bubble {
position: absolute; position: absolute;
bottom: -60px; top: 50px;
left: 0; left: 0;
width: 100%; width: 100%;
background: #F6FAF8; background: #F6FAF8;
@@ -6713,6 +6985,8 @@ a#listree-click.current,
} }
.common-fixed-bg { .common-fixed-bg {
position: relative;
z-index: 0;
background-size: cover; background-size: cover;
background-attachment: fixed; background-attachment: fixed;
background-position: center center; background-position: center center;
@@ -6722,6 +6996,22 @@ a#listree-click.current,
padding: 0; padding: 0;
} }
.fixed-background-layer {
position: fixed;
z-index: -1;
inset: 0;
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
opacity: 0;
pointer-events: none;
transition: opacity .6s ease;
}
.fixed-background-layer.is-visible {
opacity: 1;
}
/* 侧边栏订阅 */ /* 侧边栏订阅 */
.subscribe-widget { .subscribe-widget {
padding: 16px; padding: 16px;
+116 -18
View File
@@ -218,7 +218,7 @@
/** /**
* 小屏平板 (<= 960px) * 小屏平板 (<= 960px)
* 保持原样 * 540-960px 增加手机端底部导航
*/ */
@media only screen and (max-width:960px) { @media only screen and (max-width:960px) {
@@ -276,6 +276,35 @@
.top_menu_box { .top_menu_box {
border-radius: 8px; border-radius: 8px;
} }
/* 540-960px 也显示手机端底部导航,但不显示发布按钮 */
.footer_menu {
display: block;
}
.footer_nav_box {
top: 56px;
z-index: -1;
}
.footer_nav_box .footer_player {
min-height: auto;
}
body.mod_third_s .footer_nav_box .right {
width: 100%;
}
.footer_main {
position: relative;
padding-bottom: 110px;
}
.footer_menu a.playing-music,
.footer_menu a.playing-music i,
.footer_menu a.playing-music .title {
color: #4CAF50;
}
} }
/** /**
@@ -303,6 +332,7 @@
.moment_cat_nav, .moment_cat_nav,
.posts_cat_nav, .posts_cat_nav,
.photos_cat_nav, .photos_cat_nav,
.douban_cat_nav,
.friends_cat_nav { .friends_cat_nav {
padding: 15px; padding: 15px;
} }
@@ -480,7 +510,7 @@
backdrop-filter: blur(0.5rem); backdrop-filter: blur(0.5rem);
-webkit-backdrop-filter: blur(0.5rem); -webkit-backdrop-filter: blur(0.5rem);
background: rgb(235 242 237 / 80%); background: rgb(235 242 237 / 80%);
border-radius: 0 0 20px 20px; border-radius: 0;
height: 50px; height: 50px;
} }
@@ -654,7 +684,6 @@
color: #fff; color: #fff;
} }
.player_mod .tool,
a.m_prev, a.m_prev,
a.m_next, a.m_next,
.timer, .timer,
@@ -663,6 +692,59 @@
display: none; display: none;
} }
.player_mod .tool {
display: block;
width: 100%;
margin: 4px 0;
position: relative;
z-index: 5;
}
.player_mod .top {
position: relative;
z-index: 1;
}
.player_mod .player_bar {
height: 20px;
background: transparent;
overflow: visible;
touch-action: none;
}
.player_mod .player_bar::before {
content: "";
position: absolute;
top: 50%;
left: 0;
right: 0;
height: 6px;
background: #ddd;
border-radius: 6px;
transform: translateY(-50%);
z-index: 1;
}
.dark .player_mod .player_bar::before {
background: #585858;
}
.player_mod .player_bar .progress {
height: 6px;
top: 50%;
z-index: 2;
transform: translateY(-50%);
}
.player_mod .player_dot {
display: block;
width: 13px;
height: 13px;
margin-right: -9px;
z-index: 9;
box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.player_mod .m_cover { .player_mod .m_cover {
width: 32px; width: 32px;
height: 32px; height: 32px;
@@ -703,7 +785,7 @@
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
max-width: 100px; max-width: 90px;
} }
.single_music_header .mu_img { .single_music_header .mu_img {
@@ -742,30 +824,42 @@
} }
/* 手机端文章目录调整 */ /* 手机端文章目录调整 */
h3.listree-titles { .listree-box {
font-size: 0.8rem; left: 40px;
padding: 9px 0; right: 12px;
margin: 0; max-width: 85vw;
display: flex; max-height: calc(100vh - 96px);
align-items: center; margin-left: 0;
justify-content: center; border-radius: 12px;
transform: translate3d(0, -8px, 0) scale(.98);
transform-origin: top center;
} }
#listree-ol li a { .listree-box.is-open {
font-size: 0.8rem; transform: translate3d(0, 0, 0) scale(1);
} }
#listree-ol { #listree-ol {
margin: 10px 0 15px -10px; max-height: min(56vh, 420px);
padding-right: 15px; margin: 0;
padding: 10px 8px 12px;
} }
#listree-ol li { #listree-ol li {
line-height: 1.2; line-height: inherit;
margin-top: 6px; margin: 2px 0;
list-style: none; list-style: none;
} }
#listree-ol li a {
font-size: 0.82rem;
padding: 7px 9px 7px 10px;
}
.toc_nav .listree-btn.is-active i {
transform: rotate(90deg);
}
/* 手机端底部音乐按钮颜色 */ /* 手机端底部音乐按钮颜色 */
.footer_menu a.playing-music, .footer_menu a.playing-music,
.footer_menu a.playing-music i, .footer_menu a.playing-music i,
@@ -773,7 +867,11 @@
color: #4CAF50; color: #4CAF50;
} }
/* 手机端顶部工具按钮 */
.top_tool a {
padding: 6px;
display: flex;
}
} }
+2 -1
View File
@@ -504,11 +504,12 @@ a:visited {
color: #252525; color: #252525;
} }
/* 侧边栏颜色异常
a:hover, a:hover,
a:focus, a:focus,
a:active { a:active {
color: #191970; color: #191970;
} } */
a:focus { a:focus {
outline: thin dotted; outline: thin dotted;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

-1
View File
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 1l8.217 1.826a1 1 0 0 1 .783.976v9.987a6 6 0 0 1-2.672 4.992L12 23l-6.328-4.219A6 6 0 0 1 3 13.79V3.802a1 1 0 0 1 .783-.976L12 1zm0 2.049L5 4.604v9.185a4 4 0 0 0 1.781 3.328L12 20.597l5.219-3.48A4 4 0 0 0 19 13.79V4.604L12 3.05zM12 7a2 2 0 0 1 1.001 3.732L13 15h-2v-4.268A2 2 0 0 1 12 7z" fill="rgba(255,255,255,1)"/></svg>

Before

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 383 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zM9 9v6h2V9H9zm4 0v6h2V9h-2z"/></svg>

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zM10.622 8.415a.4.4 0 0 0-.622.332v6.506a.4.4 0 0 0 .622.332l4.879-3.252a.4.4 0 0 0 0-.666l-4.88-3.252z"/></svg>

Before

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

-1
View File
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M8 11.333l10.223-6.815a.5.5 0 0 1 .777.416v14.132a.5.5 0 0 1-.777.416L8 12.667V19a1 1 0 0 1-2 0V5a1 1 0 1 1 2 0v6.333z"/></svg>

Before

Width:  |  Height:  |  Size: 256 B

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M16 12.667L5.777 19.482A.5.5 0 0 1 5 19.066V4.934a.5.5 0 0 1 .777-.416L16 11.333V5a1 1 0 0 1 2 0v14a1 1 0 0 1-2 0v-6.333z"/></svg>

Before

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

-1
View File
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18"><path fill="none" d="M0 0h24v24H0z"/><path d="M2 19h20v2H2v-2zM2 5l5 3.5L12 2l5 6.5L22 5v12H2V5zm2 3.841V15h16V8.841l-3.42 2.394L12 5.28l-4.58 5.955L4 8.84z" fill="rgba(255,193,116,1)"/></svg>

Before

Width:  |  Height:  |  Size: 275 B

+74 -52
View File
@@ -9,27 +9,12 @@ function modify_m_bottom_music_button_link() {
}); });
} }
// 视频默认正方形,播放恢复比例(接入灯箱后已无用)
// function modify_moment_video_size() {
// const videos = document.querySelectorAll('.pix_video');
// videos.forEach(video => {
// if (!video.hasAttribute('data-video-events-bound')) {
// video.addEventListener('play', () => {
// video.classList.add('is-playing');
// });
// video.addEventListener('ended', () => {
// video.classList.remove('is-playing');
// });
// video.setAttribute('data-video-events-bound', 'true');
// }
// });
// }
// 登录逻辑 // 登录逻辑
let csrfToken = ''; let csrfToken = '';
let publicKey = ''; let publicKey = '';
let loginTimer = null; let loginTimer = null;
let countdownSeconds = 3; let countdownSeconds = 3;
let closeLoading = null;
const login_modal = document.getElementById('customLoginModal'); const login_modal = document.getElementById('customLoginModal');
const login_closeBtn = document.getElementById('closeLoginModal'); const login_closeBtn = document.getElementById('closeLoginModal');
const login_loginBtn = document.getElementById('customLoginBtn'); const login_loginBtn = document.getElementById('customLoginBtn');
@@ -39,6 +24,7 @@ async function fetchCSRFToken() {
login_modal.classList.add('show'); login_modal.classList.add('show');
login_loginBtn.disabled = true; login_loginBtn.disabled = true;
login_loginBtn.textContent = '加载中...'; login_loginBtn.textContent = '加载中...';
closeLoading = cocoMessage.loading('正在加载署名信息...');
try { try {
const response = await fetch('/login', { credentials: 'include' }); const response = await fetch('/login', { credentials: 'include' });
@@ -62,19 +48,23 @@ async function fetchCSRFToken() {
publicKey = publicKeyMatch[1].replace(/\\\//g, '/'); publicKey = publicKeyMatch[1].replace(/\\\//g, '/');
return 'ok'; return 'ok';
} catch (err) { } catch (err) {
closeLoading?.()
cocoMessage.error('署名信息加载失败,请刷新');
if (loginTimer) { clearInterval(loginTimer) }
login_loginBtn.textContent = '错误!请刷新';
login_loginBtn.disabled = true;
return 'error'; return 'error';
} }
} }
// 打开弹窗逻辑 // 打开弹窗逻辑
async function open_login_box() { async function open_login_box() {
if (loginTimer) { if (loginTimer) { clearInterval(loginTimer) }
clearInterval(loginTimer);
}
countdownSeconds = 3; countdownSeconds = 3;
const success = await fetchCSRFToken(); const success = await fetchCSRFToken();
if (success === 'logged') { if (success === 'logged') {
cocoMessage.success('您已经署名过了,请刷新'); closeLoading?.()
cocoMessage.success('您已署名成功,请刷新');
login_modal.classList.remove('show'); login_modal.classList.remove('show');
} else if (success === 'ok') { } else if (success === 'ok') {
loginTimer = setInterval(() => { loginTimer = setInterval(() => {
@@ -82,12 +72,15 @@ async function open_login_box() {
login_loginBtn.textContent = '请稍等...' + countdownSeconds; login_loginBtn.textContent = '请稍等...' + countdownSeconds;
} else { } else {
clearInterval(loginTimer); clearInterval(loginTimer);
closeLoading?.()
cocoMessage.success('署名信息加载完成');
login_loginBtn.textContent = '署 名'; login_loginBtn.textContent = '署 名';
login_loginBtn.disabled = false; login_loginBtn.disabled = false;
} }
countdownSeconds--; countdownSeconds--;
}, 1000); }, 1000);
} else { } else {
closeLoading?.()
cocoMessage.error('服务器错误,请刷新'); cocoMessage.error('服务器错误,请刷新');
login_modal.classList.remove('show'); login_modal.classList.remove('show');
} }
@@ -95,7 +88,9 @@ async function open_login_box() {
// 关闭弹窗 // 关闭弹窗
login_closeBtn.addEventListener('click', () => { login_closeBtn.addEventListener('click', () => {
closeLoading?.()
login_modal.classList.remove('show'); login_modal.classList.remove('show');
if (loginTimer) { clearInterval(loginTimer) }
}); });
// 加密逻辑 // 加密逻辑
@@ -111,6 +106,7 @@ function encryptPassword(password) {
// 提交登录 // 提交登录
login_loginBtn.addEventListener('click', async () => { login_loginBtn.addEventListener('click', async () => {
let islogin = false;
const username = document.getElementById('customUsername').value.trim(); const username = document.getElementById('customUsername').value.trim();
const password = document.getElementById('customPassword').value.trim(); const password = document.getElementById('customPassword').value.trim();
if (!username || !password) { if (!username || !password) {
@@ -119,7 +115,9 @@ login_loginBtn.addEventListener('click', async () => {
} }
const encryptedPwd = encryptPassword(password); const encryptedPwd = encryptPassword(password);
login_loginBtn.disabled = true; login_loginBtn.disabled = true;
login_closeBtn.disabled = true;
login_loginBtn.textContent = '验证中...'; login_loginBtn.textContent = '验证中...';
closeLoading = cocoMessage.loading('正在验证信息...');
try { try {
countdownSeconds = 3 countdownSeconds = 3
const response = await fetch('/login', { const response = await fetch('/login', {
@@ -141,31 +139,41 @@ login_loginBtn.addEventListener('click', async () => {
clearInterval(loginTimer); clearInterval(loginTimer);
} }
if (finalUrl.includes('/uc')) { if (finalUrl.includes('/uc')) {
islogin = true;
closeLoading?.()
cocoMessage.success('署名成功,正在跳转...'); cocoMessage.success('署名成功,正在跳转...');
login_loginBtn.textContent = '跳转中...'; login_loginBtn.textContent = '跳转中...';
setTimeout(() => { const currentScrollTop = window.scrollY || document.documentElement.scrollTop;
$.cookie('load_type', 'login', { path: '/' });
window.location.reload(); window.location.reload();
}, 800);
} else if (finalUrl.includes('error=invalid-credential')) { } else if (finalUrl.includes('error=invalid-credential')) {
closeLoading?.()
cocoMessage.warning('署名人与心上锁不匹配'); cocoMessage.warning('署名人与心上锁不匹配');
fetchCSRFToken();
} else { } else {
closeLoading?.()
cocoMessage.error('速度过快,请稍后重试'); cocoMessage.error('速度过快,请稍后重试');
} }
} catch (err) { } catch (err) {
closeLoading?.()
cocoMessage.error('服务器连接失败'); cocoMessage.error('服务器连接失败');
} finally { } finally {
if (!islogin) {
fetchCSRFToken();
login_closeBtn.disabled = false;
loginTimer = setInterval(() => { loginTimer = setInterval(() => {
if (countdownSeconds > 0) { if (countdownSeconds > 0) {
login_loginBtn.textContent = '请稍等...' + countdownSeconds; login_loginBtn.textContent = '请稍等...' + countdownSeconds;
} else { } else {
clearInterval(loginTimer); clearInterval(loginTimer);
closeLoading?.()
cocoMessage.success('请重新尝试署名');
login_loginBtn.textContent = '署 名'; login_loginBtn.textContent = '署 名';
login_loginBtn.disabled = false; login_loginBtn.disabled = false;
} }
countdownSeconds--; countdownSeconds--;
}, 1000); }, 1000);
} }
}
}); });
// 回车登录 // 回车登录
@@ -181,6 +189,8 @@ document.addEventListener("keydown", function (e) {
// 退出登录 // 退出登录
async function customLogout() { async function customLogout() {
$('.pixar-notice-btn-confirm, .pixar-notice-btn-close').prop('disabled', true);
let closeLoading = cocoMessage.loading('退出登录中...');
try { try {
const getResponse = await fetch('/logout', { credentials: 'include' }); const getResponse = await fetch('/logout', { credentials: 'include' });
const htmlText = await getResponse.text(); const htmlText = await getResponse.text();
@@ -189,6 +199,8 @@ async function customLogout() {
const logoutCsrfToken = doc.querySelector('input[name="_csrf"]')?.value; const logoutCsrfToken = doc.querySelector('input[name="_csrf"]')?.value;
if (!logoutCsrfToken) { if (!logoutCsrfToken) {
cocoMessage.error('页面未找到 CSRF 令牌'); cocoMessage.error('页面未找到 CSRF 令牌');
$('.pixar-notice-btn-confirm, .pixar-notice-btn-close').prop('disabled', false);
closeLoading();
return; return;
} }
const postResponse = await fetch('/logout', { const postResponse = await fetch('/logout', {
@@ -202,20 +214,25 @@ async function customLogout() {
}) })
}); });
if (postResponse.ok) { if (postResponse.ok) {
closeLoading();
cocoMessage.success('您已成功退出登录'); cocoMessage.success('您已成功退出登录');
setTimeout(() => { const currentScrollTop = window.scrollY || document.documentElement.scrollTop;
$.cookie('load_type', 'logout', { path: '/' });
window.location.reload(); window.location.reload();
}, 800);
} else { } else {
closeLoading();
$('.pixar-notice-btn-confirm, .pixar-notice-btn-close').prop('disabled', false);
throw new Error('退出请求被拒绝'); throw new Error('退出请求被拒绝');
} }
} catch (err) { } catch (err) {
closeLoading();
$('.pixar-notice-btn-confirm, .pixar-notice-btn-close').prop('disabled', false);
console.error('Logout Error:', err); console.error('Logout Error:', err);
cocoMessage.error('退出失败,请手动刷新页面'); cocoMessage.error('退出失败,请手动刷新页面');
} }
} }
function showPixarCard() { function open_logout_box() {
const wrapper = document.getElementById("pixarNoticeWrapper"); const wrapper = document.getElementById("pixarNoticeWrapper");
wrapper.style.display = "flex"; wrapper.style.display = "flex";
} }
@@ -229,33 +246,38 @@ function confirmPixarAction() {
customLogout(); customLogout();
} }
function initDoubanDetailLinks() {
document.querySelectorAll('.douban_page:not(.douban_detail_page) .douban_card_item').forEach(function (card) {
var link = card.querySelector('.douban_detail_link');
var title = card.querySelector('.douban_title_text');
var content = card.querySelector('.douban_content_main');
if (!link || !title || !content) {
return;
// = = = = = = = = = = = = = = = = 触发器 = = = = = = = = = = = = = = = =
// 集合:PJAX(初始化执行+PJAX执行)
function init_anian_pjax() {
// modify_moment_video_size();
} }
// 集合:初始化(仅初始化执行一次) var titleOverflow = title.scrollWidth > title.clientWidth;
function init_anian_inport() { var contentOverflow = content.scrollHeight > content.clientHeight + 1;
init_anian_pjax(); link.classList.toggle('is-visible', titleOverflow || contentOverflow);
});
}
document.addEventListener('pjax:complete', initDoubanDetailLinks);
document.addEventListener('DOMContentLoaded', initDoubanDetailLinks);
window.addEventListener('resize', initDoubanDetailLinks);
// 打开确认模态框
function openModal(title, msg, type) {
var modal = $('#momentsDeleteModal');
var card = modal.find('.moments-card-widget');
modal.find('.moments-title-text').text(title);
modal.find('.moments-message-text').text(msg);
card.removeClass('theme-red theme-yellow theme-green').addClass('theme-' + type);
$('.moments-btn-cancel, .moments-btn-confirm').prop('disabled', false);
$('body').off('click', '#momentsCancelBtn');
$('body').off('click', '#momentsConfirmBtn');
modal.fadeIn(200);
}
// 主题通用交互初始化
modify_m_bottom_music_button_link(); modify_m_bottom_music_button_link();
}
// PJAX监听
document.addEventListener('pjax:complete', function () {
init_anian_pjax();
})
// 入口
init_anian_inport();
+1144 -826
View File
File diff suppressed because it is too large Load Diff
+47 -29
View File
@@ -42,8 +42,8 @@ $('body').on('click', '.moment_card_type a', function () {
$('body').on('click', '.edit_content .push_card', function () { $('body').on('click', '.edit_content .push_card', function () {
var card_url = $('.edit_card_box .edit_content input').val(); var card_url = $('.edit_card_box .edit_content input').val();
var num = $('.card_sortble .moment_card_item').length; var num = $('.card_sortble .moment_card_item').length;
if (num > 2) { if (num > 4) {
cocoMessage.error('最多插入3个卡片'); cocoMessage.error('最多插入5个卡片');
$('.edit_card_box .edit_content input').val(''); $('.edit_card_box .edit_content input').val('');
return false; return false;
} }
@@ -128,14 +128,8 @@ function getcard(name,cover,title,type){
} }
$(document).on('click', '.de_card', function () { $(document).on('click', '.de_card', function () {
var msg = "确认删除此卡片?";
var num = $('.moment_card_item').length; var num = $('.moment_card_item').length;
if (confirm(msg)==true){
$(this).parents('.moment_card_item').remove(); $(this).parents('.moment_card_item').remove();
} else {
return false;
}
if (num == 1) { if (num == 1) {
$(".show_card").hide(); $(".show_card").hide();
} }
@@ -210,7 +204,7 @@ $(document).on('change','#moment_img_up',function(){
success: function (data) { success: function (data) {
var thum = data.metadata.annotations["storage.halo.run/uri"] || data.metadata.annotations["storage.halo.run/external-link"] var thum = data.metadata.annotations["storage.halo.run/uri"] || data.metadata.annotations["storage.halo.run/external-link"]
$('.m_media_left .up_loading').remove(); $('.m_media_left .up_loading').remove();
$('.m_media_left').append('<img src="/themes/theme-pix/assets/img/video.png" data="'+thum+'">'); $('.m_media_left').append('<img src="/themes/theme-pix/assets/img/logo.webp" data="' + thum + '">');
cocoMessage.success('上传成功'); cocoMessage.success('上传成功');
$('input#moment_video_url').val(thum) $('input#moment_video_url').val(thum)
} }
@@ -279,39 +273,55 @@ $('body').on('click', '.video_choose a', function() {
//}); //});
//删除片刻文章 //删除片刻
$('body').on('click', '.control_delete_post', function() { // 全局变量暂存当前要删除的 ID
var pid = $(this).parent().attr('pid'); window.currentDeletePid = null;
var msg = "确定删除瞬间?"; // 删除片刻文章 - 打开弹窗
if (confirm(msg)==true){ $('body').on('click', '.control_delete_post', function () {
window.currentDeletePid = $(this).parent().attr('pid');
openModal('删除确认', '确定删除瞬间?该条数据将被永久移除!', 'red');
// 点击取消按钮 - 关闭弹窗
$('body').on('click', '#momentsCancelBtn', function (e) {
$('#momentsDeleteModal').fadeOut(200);
window.currentDeletePid = null;
});
// 点击确认删除 - 执行 AJAX
$('body').on('click', '#momentsConfirmBtn', function () {
var pid = window.currentDeletePid;
if (!pid) return;
let closeLoading = cocoMessage.loading('正在删除...');
$('.moments-btn-cancel, .moments-btn-confirm').prop('disabled', true);
$.ajax({ $.ajax({
type: 'DELETE', type: 'DELETE',
dataType: 'json', dataType: 'json',
url: `/apis/${Theme.moments.api}/v1alpha1/moments/` + pid, url: `/apis/${Theme.moments.api}/v1alpha1/moments/` + pid,
contentType: "application/json", contentType: "application/json",
beforeSend: function () {
cocoMessage.info('处理中..');
},
success: function (data) { success: function (data) {
$('#momentsDeleteModal').fadeOut(200);
closeLoading?.()
cocoMessage.success('删除成功'); cocoMessage.success('删除成功');
setTimeout(()=>{ window.currentDeletePid = null;
$(`#post-${pid}`)[0].remove() const $post = $(`#post-${pid}`);
},1000) if (!$post.length) return;
$post.addClass('moments-delete-disperse');
setTimeout(() => $post.remove(), 800);
}, },
error: function (request) { error: function (request) {
if (request.status) { if (request.status) {
closeLoading?.()
cocoMessage.error('瞬间不存在或已删除'); cocoMessage.error('瞬间不存在或已删除');
} else { } else {
closeLoading?.()
cocoMessage.error('删除失败'); cocoMessage.error('删除失败');
} }
console.log(request) console.log(request)
$('.moments-btn-cancel, .moments-btn-confirm').prop('disabled', false);
}, },
}); });
} else { });
return false;
}
}); });
//置顶片刻 //置顶片刻
@@ -363,6 +373,8 @@ $('body').on('click', '.sticky_btn', function() {
//编辑片刻 //编辑片刻
$('body').on('click', '.control_edit_post', function () { $('body').on('click', '.control_edit_post', function () {
$('.push_close, .push_item').prop('disabled', true);
let closeLoading = null;
$(".loca_text").empty().attr("state", '0'); $(".loca_text").empty().attr("state", '0');
$(".loca_text").attr("uk-tooltip", "title:获取位置; pos: top; offset:2;"); $(".loca_text").attr("uk-tooltip", "title:获取位置; pos: top; offset:2;");
$('.moment_image_type a').click(); $('.moment_image_type a').click();
@@ -378,7 +390,7 @@ $('body').on('click', '.control_edit_post', function() {
type: 'GET', type: 'GET',
url: `/apis/${Theme.moments.api}/v1alpha1/moments/` + pid, url: `/apis/${Theme.moments.api}/v1alpha1/moments/` + pid,
beforeSend: function () { beforeSend: function () {
cocoMessage.info('数据拉取中'); closeLoading = cocoMessage.loading('数据拉取中...');
//$('.t_form').before('<div class="edit_overlay"></div>'); //$('.t_form').before('<div class="edit_overlay"></div>');
}, },
success: function (data) { success: function (data) {
@@ -431,8 +443,7 @@ $('body').on('click', '.control_edit_post', function() {
$('.loca_text').text(data.metadata.annotations?.mylocal); $('.loca_text').text(data.metadata.annotations?.mylocal);
} }
switch(type) switch (type) {
{
case "PHOTO": case "PHOTO":
//if(data.moment_data.length > 0){ 文字片刻没有数据 //if(data.moment_data.length > 0){ 文字片刻没有数据
edit_image(data); edit_image(data);
@@ -448,7 +459,14 @@ $('body').on('click', '.control_edit_post', function() {
edit_video(data); edit_video(data);
break; break;
} }
cocoMessage.success('拉取完成'); closeLoading();
cocoMessage.success('数据拉取完成');
$('.push_close, .push_item').prop('disabled', false);
},
error: function () {
closeLoading();
cocoMessage.error('数据拉取失败');
$('.push_close').prop('disabled', false);
} }
}); });
}); });
@@ -521,7 +539,7 @@ function edit_video(data){
$('input#moment_video_url').val(url); $('input#moment_video_url').val(url);
if (url !== '') { if (url !== '') {
$('.m_media_left i').remove(); $('.m_media_left i').remove();
$('.m_media_left').append('<img src="/themes/theme-pix/assets/img/video.png" data="'+url+'">'); $('.m_media_left').append('<img src="/themes/theme-pix/assets/img/logo.webp" data="' + url + '">');
} }
} else if (type == 'video/bili') { } else if (type == 'video/bili') {
+27 -2
View File
@@ -129,7 +129,7 @@ var pix = {
} else { } else {
msg_modal_inner.html(` msg_modal_inner.html(`
<p class="no_posts"><small># 暂无消息 #</small><img class="s_nodata" <p class="no_posts"><small># 暂无消息 #</small><img class="s_nodata"
src="/upload/nodata.png"></p> src="/themes/theme-pix/assets/img/no-data.webp"></p>
<p class="msg_limit">只显示最新10条未读和已读信息</p> <p class="msg_limit">只显示最新10条未读和已读信息</p>
`) `)
} }
@@ -137,7 +137,7 @@ var pix = {
error: function () { error: function () {
msg_modal_inner.html(` msg_modal_inner.html(`
<p class="no_posts"><small># 暂无消息 #</small><img class="s_nodata" <p class="no_posts"><small># 暂无消息 #</small><img class="s_nodata"
src="/upload/nodata.png"></p> src="/themes/theme-pix/assets/img/no-data.webp"></p>
<p class="msg_limit">只显示最新10条未读和已读信息</p> <p class="msg_limit">只显示最新10条未读和已读信息</p>
`) `)
@@ -163,6 +163,31 @@ var pix = {
}, },
centerCategoryNavActive: function ($link) {
var $activeLink = $link && $link.length ? $link : $('.moment_cat_nav .active, .posts_cat_nav .active, .photos_cat_nav .active, .douban_cat_nav .active, .friends_cat_nav .active').first();
if (!$activeLink || !$activeLink.length) {
return;
}
var navEl = $activeLink.closest('.moment_cat_nav, .posts_cat_nav, .photos_cat_nav, .douban_cat_nav, .friends_cat_nav').find('ul').get(0);
if (!navEl) {
return;
}
var linkEl = $activeLink.get(0);
var maxScrollLeft = navEl.scrollWidth - navEl.clientWidth;
if (maxScrollLeft <= 0) {
return;
}
var navRect = navEl.getBoundingClientRect();
var linkRect = linkEl.getBoundingClientRect();
var targetScrollLeft = navEl.scrollLeft + (linkRect.left - navRect.left) - (navRect.width / 2 - linkRect.width / 2);
targetScrollLeft = Math.max(0, Math.min(maxScrollLeft, targetScrollLeft));
$(navEl).stop(true).animate({ scrollLeft: targetScrollLeft }, 220);
},
topCategoriesBarScroll: function () { topCategoriesBarScroll: function () {
if (document.getElementById("cat_nav_items")) { if (document.getElementById("cat_nav_items")) {
let xscroll = document.getElementById("cat_nav_items"); let xscroll = document.getElementById("cat_nav_items");
+145 -35
View File
@@ -41,37 +41,107 @@ var playlist = [];
var post_playlist = []; var post_playlist = [];
var Paused = true; var Paused = true;
var playLrc = ''; var playLrc = '';
var standaloneTrack = false;
var m_cover = $('.player_mod .m_cover img'); var m_cover = $('.player_mod .m_cover img');
var m_title = $('.player_mod .m_info h2'); var m_title = $('.player_mod .m_info h2');
var m_artist = $('.player_mod .m_info small'); var m_artist = $('.player_mod .m_info small');
// 将歌曲数据交给主题播放器。source 用于同步文章或片刻中的播放按钮状态。
function playPlayerTrack(data, options) {
options = options || {};
var source = options.source ? $(options.source) : $();
var player = source.closest('.pix_player');
var audio = audiobox[0];
var currentSource = audio.getAttribute('src') || '';
if (!data || !data.url) {
return false;
}
$(document).on('click', '.play_btn', function () {
$('.player_box').append(audiobox); $('.player_box').append(audiobox);
$('.pix_player').removeClass('playing'); $('.pix_player').removeClass('playing');
$(this).parents('.pix_player').addClass('playing'); if (player.length) {
var url = $(this).attr('data'); player.addClass('playing');
var lrc = $(this).attr('lrc'); }
var audio_s = $('#pix_player').attr('src');
var meta = $(this).siblings('.player_meta').find('.title'); playLrc = data.lrc || '';
playLrc = lrc; m_title.text(data.title || data.name || '未知歌曲');
m_title.text(meta.find('.name').text()); m_artist.text(data.author || data.artist || '未知歌手');
m_artist.text(meta.find('.author').text()); if (data.pic) {
m_cover.attr('src', $('.pix_player.playing .player_thum img').attr('src')); m_cover.attr('src', data.pic);
}
if (audio_s == '' || audio_s !== url) { standaloneTrack = options.standalone === true;
$('#pix_player').attr('src', url); initAudio();
audiobox[0].play(); if (options.toggle && currentSource === data.url) {
} else {
pasued(); pasued();
} else {
audio.setAttribute('src', data.url);
var playPromise = audio.play();
if (playPromise && typeof playPromise.catch === 'function') {
playPromise.catch(function () {
// 浏览器阻止自动播放时,保留播放器状态并等待用户点击播放。
});
}
} }
$(".play_btn").html("<i class='ri-play-line'></i>"); $(".play_btn").html("<i class='ri-play-line'></i>");
return true;
}
initAudio(); $(document).on('click', '.play_btn', function () {
var meta = $(this).siblings('.player_meta').find('.title');
playPlayerTrack({
url: $(this).attr('data'),
lrc: $(this).attr('lrc'),
title: meta.find('.name').text(),
author: meta.find('.author').text(),
pic: $(this).closest('.pix_player').find('.player_thum img').attr('src')
}, {
source: this,
toggle: true,
standalone: false
}); });
});
function musicApiUrl(server, type, id) {
var api = Theme.play.pix_mu_api || 'https://api.i-meto.com/meting/api';
var separator = api.indexOf('?') === -1 ? '?' : '&';
return api + separator + 'server=' + encodeURIComponent(server) +
'&type=' + encodeURIComponent(type) + '&id=' + encodeURIComponent(id) +
'&r=' + Math.random();
}
// 通过网易云歌曲 ID 获取歌曲数据,并使用主题播放器播放。
function play_netease_music(songId) {
var id = String(songId == null ? '' : songId).trim();
if (!id) {
if (typeof cocoMessage !== 'undefined') cocoMessage.error('网易云歌曲ID不能为空');
return false;
}
$.ajax({
type: 'get',
url: musicApiUrl('netease', 'song', id)
}).done(function (res) {
var data = Array.isArray(res) ? res[0] : res;
if (res && !Array.isArray(res) && Array.isArray(res.data)) {
data = res.data[0];
}
if (!data || !data.url) {
if (typeof cocoMessage !== 'undefined') cocoMessage.error('网易云歌曲无法播放');
return;
}
playPlayerTrack(data, { standalone: true });
}).fail(function () {
if (typeof cocoMessage !== 'undefined') cocoMessage.error('网易云歌曲加载失败');
});
}
function playNeteaseMusic(songId) {
play_netease_music(songId);
}
// 初始化函数 // 初始化函数
function initAudio() { function initAudio() {
@@ -85,6 +155,7 @@ function initAudio() {
//音乐结束触发 //音乐结束触发
function endplay() { function endplay() {
if (standaloneTrack || !playlist[0] || playlist[0].length === 0) return;
var index = $('.musci_list_box li.active').index() + 1; var index = $('.musci_list_box li.active').index() + 1;
var max = $('.musci_list_box li').length; var max = $('.musci_list_box li').length;
var new_mid = 0; var new_mid = 0;
@@ -223,6 +294,7 @@ function autoload_music() {
type: "get", type: "get",
url: url, url: url,
success: function (res) { success: function (res) {
if (standaloneTrack) return;
if (res.length > 0) { if (res.length > 0) {
var new_mid = 0; var new_mid = 0;
if (loop == "none") { if (loop == "none") {
@@ -255,6 +327,7 @@ function autoload_music() {
//播放选中音乐 //播放选中音乐
function mulist_play(index) { function mulist_play(index) {
standaloneTrack = false;
audiobox[0].removeEventListener("play", audioplay); audiobox[0].removeEventListener("play", audioplay);
audiobox[0].removeEventListener("pause", audiopause); audiobox[0].removeEventListener("pause", audiopause);
$(".pix_player.playing .play_btn").html("<i class='ri-play-line'></i>"); $(".pix_player.playing .play_btn").html("<i class='ri-play-line'></i>");
@@ -361,10 +434,9 @@ function mu_box_show() {
function mu_box_hide(time = 2000) { function mu_box_hide(time = 2000) {
clearTimeout(trigger); clearTimeout(trigger);
trigger = setTimeout(function () { trigger = setTimeout(function () {
// 获取屏幕宽度判断是否为手机端(与歌词容器响应式逻辑保持一致) const hasBottomMenu = $(window).width() <= 960;
const isMobile = $(window).width() <= 767; // 底部导航可见时,播放器收起到导航栏后面。
// 手机端隐藏时额外向下偏移50px(可根据需要调整数值),非手机端保持默认0px const hideTop = hasBottomMenu ? "50px" : "0px";
const hideTop = isMobile ? "50px" : "0px";
// 执行隐藏动画 // 执行隐藏动画
$('.footer_nav_box').animate({ $('.footer_nav_box').animate({
@@ -384,20 +456,52 @@ $(document).on('mouseleave', '.footer_nav_box .right_inner', function (event) {
}, 2000); }, 2000);
}); });
//音乐进度条跳转 //音乐进度条跳转/拖动
function getMousePosition(e) { var draggingPlayerBar = null;
var e = e || window.event;
var x = e.pageX; function getProgressPointerX(event) {
var y = e.pageY; var originalEvent = event.originalEvent || event;
return { 'left': x, 'top': y } if (originalEvent.touches && originalEvent.touches.length > 0) {
return originalEvent.touches[0].pageX;
}
if (originalEvent.changedTouches && originalEvent.changedTouches.length > 0) {
return originalEvent.changedTouches[0].pageX;
}
return event.pageX || originalEvent.pageX || 0;
} }
$(document).on('click', '.player_bar', function () { function seekPlayerByEvent(event, playerBar) {
var long = (getMousePosition().left) - ($('.progress').offset().left); var duration = audiobox[0].duration;
$('.progress').width(long); if (!duration || !isFinite(duration)) return;
allTime = parseInt(audiobox[0].duration);
var nowtime = (long / $('.player_bar').width()) * allTime; var $playerBar = $(playerBar);
audiobox[0].currentTime = nowtime; var barWidth = $playerBar.width();
if (!barWidth) return;
var long = getProgressPointerX(event) - $playerBar.offset().left;
long = Math.max(0, Math.min(long, barWidth));
$playerBar.find('.progress').width(long);
audiobox[0].currentTime = (long / barWidth) * duration;
}
$(document).on('mousedown touchstart', '.player_bar', function (event) {
event.preventDefault();
event.stopPropagation();
draggingPlayerBar = this;
seekPlayerByEvent(event, draggingPlayerBar);
});
$(document).on('mousemove touchmove', function (event) {
if (!draggingPlayerBar) return;
event.preventDefault();
seekPlayerByEvent(event, draggingPlayerBar);
});
$(document).on('mouseup touchend touchcancel', function (event) {
if (!draggingPlayerBar) return;
event.preventDefault();
draggingPlayerBar = null;
}); });
//音量调节 m_volume //音量调节 m_volume
@@ -413,12 +517,17 @@ $(document).on('click', '.m_volume', function () {
} }
}); });
$(document).on('click', '.vo_bar', function () { $(document).on('click', '.vo_bar', function (event) {
var long = (getMousePosition().top) - ($(this).offset().top) var originalEvent = event.originalEvent || event;
var meter = long / $(this).height(); var point = originalEvent.changedTouches && originalEvent.changedTouches.length
var finalLong = 1 - meter; ? originalEvent.changedTouches[0]
: originalEvent;
var offset = $(this).offset();
var meter = (point.pageY - offset.top) / $(this).height();
var finalLong = Math.max(0, Math.min(1, 1 - meter));
$('.vo_size').height(finalLong * $(this).height()); $('.vo_size').height(finalLong * $(this).height());
audiobox[0].volume = finalLong; audiobox[0].volume = finalLong;
audiobox[0].muted = finalLong === 0;
}); });
//文章歌曲 //文章歌曲
@@ -462,6 +571,7 @@ function autoload_posts_music() {
$(document).on('click', '.s_play_btn', function () { $(document).on('click', '.s_play_btn', function () {
mu_box_show(); mu_box_show();
// 1. 同步更新文章内播放列表选中状态 // 1. 同步更新文章内播放列表选中状态
standaloneTrack = false;
$('.posts_mu_list li').removeClass('active'); $('.posts_mu_list li').removeClass('active');
$(this).parent().addClass('active'); $(this).parent().addClass('active');
// 2. 同步更新全局播放列表选中状态(避免后续操作信息混乱) // 2. 同步更新全局播放列表选中状态(避免后续操作信息混乱)
+159 -55
View File
@@ -5,7 +5,7 @@ const poster = (function() {
const DEBUG = false const DEBUG = false
const WIDTH = 700 const WIDTH = 700
const HEIGHT = 1160 const HEIGHT = 850
/** /**
* 将图片URL加载为Image对象并返回Promise * 将图片URL加载为Image对象并返回Promise
@@ -27,7 +27,13 @@ const poster = (function() {
* @param {object} config - 配置对象 * @param {object} config - 配置对象
*/ */
function init(config) { function init(config) {
const $container = document.querySelector(config.selector) const $container = config.container || document.querySelector(config.selector)
if (!$container) {
if (config.callback) {
config.callback(null)
}
return
}
// ------------------ 【修复点 2:清理容器,避免PJAX残余】 ------------------ // ------------------ 【修复点 2:清理容器,避免PJAX残余】 ------------------
// 在重新绘制前,确保清空容器,移除旧的 img 和 wrapper // 在重新绘制前,确保清空容器,移除旧的 img 和 wrapper
$container.innerHTML = ''; $container.innerHTML = '';
@@ -41,9 +47,12 @@ const poster = (function() {
const $title = createDom('canvas', 'id', 'title') const $title = createDom('canvas', 'id', 'title')
const $content = createDom('canvas', 'id', 'content') const $content = createDom('canvas', 'id', 'content')
const $logo = createDom('canvas', 'id', 'logo') const $logo = createDom('canvas', 'id', 'logo')
const $siteName = createDom('canvas', 'id', 'siteName')
const $description = createDom('canvas', 'id', 'description') const $description = createDom('canvas', 'id', 'description')
const $customText1 = createDom('canvas', 'id', 'customText1')
const $customText2 = createDom('canvas', 'id', 'customText2')
appendChilds($wrapper, $canvas, $day, $date, $title, $content, $logo, $description) appendChilds($wrapper, $canvas, $day, $siteName, $date, $title, $content, $logo, $description, $customText1, $customText2)
$container.appendChild($wrapper) $container.appendChild($wrapper)
const date = new Date() const date = new Date()
@@ -77,6 +86,58 @@ const poster = (function() {
titleStyle.position = (config.titleStyle && config.titleStyle.position) || titleStyle.position titleStyle.position = (config.titleStyle && config.titleStyle.position) || titleStyle.position
drawMoreLines($title, titleStyle, config.title) drawMoreLines($title, titleStyle, config.title)
// site name canvas
const siteNameStyle = {
font: '40px Helvetica',
lineHeight: 1.3,
color: 'rgba(255, 255, 255, 0.95)',
position: 'left'
}
siteNameStyle.font = (config.siteNameStyle && config.siteNameStyle.font) || siteNameStyle.font
siteNameStyle.color = (config.siteNameStyle && config.siteNameStyle.color) || siteNameStyle.color
siteNameStyle.lineHeight = (config.siteNameStyle && config.siteNameStyle.lineHeight) || siteNameStyle.lineHeight
siteNameStyle.position = (config.siteNameStyle && config.siteNameStyle.position) || siteNameStyle.position
drawMoreLines($siteName, siteNameStyle, config.siteName)
// description canvas
const descriptionStyle = {
font: '25px Helvetica',
color: 'rgba(236, 241, 255, 1)',
lineHeight: 1.2,
position: 'left'
}
descriptionStyle.font = (config.descriptionStyle && config.descriptionStyle.font) || descriptionStyle.font
descriptionStyle.color = (config.descriptionStyle && config.descriptionStyle.color) || descriptionStyle.color
descriptionStyle.lineHeight = (config.descriptionStyle && config.descriptionStyle.lineHeight) || descriptionStyle.lineHeight
descriptionStyle.position = (config.descriptionStyle && config.descriptionStyle.position) || descriptionStyle.position
drawMoreLines($description, descriptionStyle, config.description)
// custom text 1 canvas
const customText1Style = {
font: '28px Helvetica',
lineHeight: 1.3,
position: 'left',
color: 'rgba(0, 0, 0, 1)'
}
customText1Style.font = (config.customText1Style && config.customText1Style.font) || customText1Style.font
customText1Style.color = (config.customText1Style && config.customText1Style.color) || customText1Style.color
customText1Style.lineHeight = (config.customText1Style && config.customText1Style.lineHeight) || customText1Style.lineHeight
customText1Style.position = (config.customText1Style && config.customText1Style.position) || customText1Style.position
drawMoreLines($customText1, customText1Style, config.customText1 || '')
// custom text 2 canvas
const customText2Style = {
font: '28px Helvetica',
lineHeight: 1.3,
position: 'left',
color: 'rgba(0, 0, 0, 1)'
}
customText2Style.font = (config.customText2Style && config.customText2Style.font) || customText2Style.font
customText2Style.color = (config.customText2Style && config.customText2Style.color) || customText2Style.color
customText2Style.lineHeight = (config.customText2Style && config.customText2Style.lineHeight) || customText2Style.lineHeight
customText2Style.position = (config.customText2Style && config.customText2Style.position) || customText2Style.position
drawMoreLines($customText2, customText2Style, config.customText2 || '')
// content canvas // content canvas
const contentStyle = { const contentStyle = {
font: '22px Helvetica', font: '22px Helvetica',
@@ -90,15 +151,6 @@ const poster = (function() {
contentStyle.position = (config.contentStyle && config.contentStyle.position) || contentStyle.position contentStyle.position = (config.contentStyle && config.contentStyle.position) || contentStyle.position
drawMoreLines($content, contentStyle, config.content); drawMoreLines($content, contentStyle, config.content);
// description canvas
const descriptionStyle = {
font: '24px Helvetica',
color: 'rgba(180, 180, 180, 1)',
lineHeight: 1.2,
position: 'left'
}
drawMoreLines($description, descriptionStyle, config.description)
// ------------------ 【修复点 1:使用 Promise.all 等待所有图片加载】 ------------------ // ------------------ 【修复点 1:使用 Promise.all 等待所有图片加载】 ------------------
Promise.all([ Promise.all([
@@ -120,25 +172,28 @@ const poster = (function() {
ctx.drawImage(image, imgRect.sx, imgRect.sy, imgRect.sWidth, imgRect.sHeight, 20, 20, $canvas.width - 40, $canvas.height / 1.2 - 40); ctx.drawImage(image, imgRect.sx, imgRect.sy, imgRect.sWidth, imgRect.sHeight, 20, 20, $canvas.width - 40, $canvas.height / 1.2 - 40);
// 3. 绘制覆盖层 // 3. 绘制覆盖层
ctx.fillStyle="rgba(0, 0, 0, 0.3)"; ctx.fillStyle="rgba(0, 0, 0, 0.6)";
ctx.fillRect(20, 20, $canvas.width - 40, $canvas.height / 1.2 - 40);         ctx.fillRect(20, 20, $canvas.width - 40, $canvas.height / 1.2 - 40);
// 4. 绘制时间 (使用预先绘制好的 Canvas) // 4. 绘制时间 (使用预先绘制好的 Canvas)
ctx.drawImage($day, -20, 50) ctx.drawImage($day, -20, 50)
ctx.drawImage($date, -21, 125) ctx.drawImage($date, -21, 125)
// 5. 绘制 Logo // 5. 绘制 Logo
var logoh = 60; var logoh = 140;
var cwidth = logoh * (logo.width / logo.height); var cwidth = logoh * (logo.width / logo.height);
ctx.drawImage(logo, 60, $canvas.height / 1.2 + 30, cwidth, logoh); ctx.drawImage(logo, 20, $canvas.height / 1.2 - 10, cwidth, logoh);
// 6. 绘制二维码 // 6. 绘制二维码
ctx.drawImage(qrcode, $canvas.width - 160, $canvas.height / 1.2 + 20, 120, 120); ctx.drawImage(qrcode, $canvas.width - 150, $canvas.height / 1.2 + 10, 120, 120);
// 7. 绘制文字 (使用预先绘制好的 Canvas) // 7. 绘制文字 (使用预先绘制好的 Canvas)
ctx.drawImage($title, 20, $canvas.height / 2 + 20) ctx.drawImage($siteName, 10, 60)
ctx.drawImage($description, 10, 120)
ctx.drawImage($customText1, 270, $canvas.height / 2 + 310)
ctx.drawImage($customText2, 215, $canvas.height / 2 + 360)
ctx.drawImage($title, 20, $canvas.height / 2 + 60)
ctx.drawImage($content, 20, $canvas.height / 2 + 120) ctx.drawImage($content, 20, $canvas.height / 2 + 120)
ctx.drawImage($description, 20, $canvas.height / 1.2 + 110)
ctx.strokeStyle = 'rgba(122, 122, 122, 0.5)'; ctx.strokeStyle = 'rgba(122, 122, 122, 0.5)';
// 8. 转换并显示最终图片 // 8. 转换并显示最终图片
@@ -165,7 +220,9 @@ const poster = (function() {
}).catch(error => { }).catch(error => {
console.error('海报图片加载失败:', error); console.error('海报图片加载失败:', error);
// 可在此处添加错误处理,例如显示一个错误信息 // 可在此处添加错误处理,例如显示一个错误信息
if ($wrapper.parentNode === $container) {
$container.removeChild($wrapper); $container.removeChild($wrapper);
}
if (config.callback) { if (config.callback) {
// 即使失败也调用回调,传入 null 或错误信息,以便上层逻辑处理 // 即使失败也调用回调,传入 null 或错误信息,以便上层逻辑处理
config.callback(null); config.callback(null);
@@ -196,19 +253,14 @@ const poster = (function() {
} }
} }
// 覆盖函数(不变) // 覆盖函数:按目标区域等比缩放并居中裁切,尽量不留白
function coverImg(box_w, box_h, source_w, source_h) { function coverImg(box_w, box_h, source_w, source_h) {
var sx = 0, const scale = Math.max(box_w / source_w, box_h / source_h);
sy = 0, const sWidth = box_w / scale;
sWidth = source_w, const sHeight = box_h / scale;
sHeight = source_h; const sx = (source_w - sWidth) / 2;
if (source_w > source_h || (source_w == source_h && box_w < box_h)) { const sy = (source_h - sHeight) / 2;
sWidth = box_w * sHeight / box_h;
sx = (source_w - sWidth) / 2;
} else if (source_w < source_h || (source_w == source_h && box_w > box_h)) {
sHeight = box_h * sWidth / box_w;
sY = (source_h - sHeight) / 2;
}
return { return {
sx, sx,
sy, sy,
@@ -356,10 +408,26 @@ const poster = (function() {
// ajax生成文章海报 // ajax生成文章海报
// 此处调用部分需要确保在 PJAX 环境下,该事件监听器能够重新绑定(如果使用传统的 document.ready,在 PJAX 中需要改为监听 pjax:success 等事件) // 此处调用部分需要确保在 PJAX 环境下,该事件监听器能够重新绑定(如果使用传统的 document.ready,在 PJAX 中需要改为监听 pjax:success 等事件)
$('body').on('click', '.cr_poster', function () { $('body').on('click', '.cr_poster', function () {
let closeLoading = null;
closeLoading = cocoMessage.loading('海报生成中...');
var $trigger = $(this);
var post_id = $(this).attr('poster-data'); var post_id = $(this).attr('poster-data');
var banner = $(this).attr('banner'); var banner = $(this).attr('banner');
var single_content = $('.single-content'); var single_content = $('.single-content');
var t_content = $('#post-'+post_id+' .t_content'); var t_content = $('#post-'+post_id+' .t_content');
var modal = '#share_modal_' + post_id;
var $modalList = $(modal);
var $modal = $trigger.closest(modal);
if ($modal.length === 0) {
$modal = $(modal + ':visible').first();
}
if ($modal.length === 0) {
$modal = $modalList.first();
}
if ($modal.length === 0) {
return;
}
// 确保 content 区域存在 // 确保 content 区域存在
var content_element = single_content.length > 0 ? single_content[0] : (t_content.length > 0 ? t_content[0] : null); var content_element = single_content.length > 0 ? single_content[0] : (t_content.length > 0 ? t_content[0] : null);
@@ -373,7 +441,8 @@ $('body').on('click', '.cr_poster', function () {
var content = content_element.innerText; var content = content_element.innerText;
var content_length = content.length; var content_length = content.length;
var permalink = t_content.length > 0 ? window.location.origin + '/moments/' + post_id : window.location.origin + window.location.pathname; var permalink = t_content.length > 0 ? window.location.origin + '/moments/' + post_id : window.location.origin + window.location.pathname;
var title = t_content.length > 0 ? Theme.site_title + '-瞬间' : document.title; var title = t_content.length > 0 ? '瞬间' : (document.title || '').split(' - ')[0];
var siteName = Theme.site_title;
// 确保 QRious 库可用 // 确保 QRious 库可用
if (typeof QRious === 'undefined') { if (typeof QRious === 'undefined') {
@@ -392,53 +461,88 @@ $('body').on('click', '.cr_poster', function () {
new QRious({ element: twoCodeCanvas, value: permalink, size: 260, }); new QRious({ element: twoCodeCanvas, value: permalink, size: 260, });
var poster_box_selector = '#share_modal_' + post_id + ' .poster_box'; var $posterBoxAp = $modal.find('.poster_box_ap').first();
if ($posterBoxAp.length === 0) {
return;
}
// ------------------ 【修复点 2:清理容器】 ------------------ // ------------------ 【修复点 2:清理容器】 ------------------
// 先移除旧的 poster_box // 仅在当前弹窗作用域内移除旧容器,避免影响 PJAX 残留节点
$('.poster_box').remove(); $posterBoxAp.find('.poster_box').remove();
// 重新创建并插入新的 poster_box // 重新创建并插入新的 poster_box
$('#share_modal_' + post_id + ' .poster_box_ap').append('<div class="poster_box"></div>'); var $posterBox = $('<div class="poster_box"></div>');
$posterBoxAp.append($posterBox);
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
if (content_length > 120) { if (content_length > 120) {
content = content.substring(0, 80) + '...' content = content.substring(0, 82) + '...'
} }
// Posterdown 函数中不再需要移除 loading_box,因为 init 会清空容器 // 海报生成回调
function Posterdown(e) { function Posterdown(e) {
var modal = '#share_modal_' + post_id;
// 检查海报是否成功生成 // 检查海报是否成功生成
if (e && $(modal + ' .poster_box img').length > 0) { if (e && $posterBox.find('img').length > 0) {
var url = $(modal + ' .poster_box img').attr('src'); closeLoading?.()
$(modal + ' .post_share_box').removeClass('hide'); cocoMessage.success("海报生成成功!") // 图片加载完成后才触发
$(modal + ' .poster_download').attr('href', url).attr('download', 'poster_' + post_id + '.png'); var url = $posterBox.find('img').attr('src');
var $shareBox = $modal.find('.post_share_box');
$shareBox.removeClass('hide');
$modal.find('.poster_download').attr('href', url).attr('download', 'poster_' + post_id + '.png');
} else { } else {
// 错误处理,如果海报生成失败 // 错误处理,如果海报生成失败
cocoMessage.error("海报生成失败,请检查图片链接!"); closeLoading?. ();
cocoMessage.error("海报生成失败,请重试!")
} }
} }
// 移除 loading box 的时机提前,或者在 init 开始前完成
// $('.loading_box').remove(); // 原始代码中这行在创建 loading_box 之后,但其作用是移除**所有** .loading_box,可能存在问题
// 重新添加 loading 状态,并在 init 中等待
$(poster_box_selector).append('<div class="loading_box"><div uk-spinner></div></div>');
poster.init({ poster.init({
banner: banner, banner: banner,
selector: poster_box_selector, // 传入完整的选择器 selector: modal + ' .poster_box',
container: $posterBox[0],
title: title, title: title,
siteName: siteName,
description: Theme.admin_des,
content: content, content: content,
logo: Theme.site_logo, logo: Theme.site_logo,
qrcode: $('#twoCode').attr('src'), qrcode: $('#twoCode').attr('src'),
description: Theme.admin_des, customText1: '扫描右侧二维码',
customText2: '或访问:https://anian.net',
customText1Style: {
font: '24px Helvetica',
color: 'rgba(0, 0, 0, 1)'
},
customText2Style: {
font: '24px Helvetica',
color: 'rgba(0, 0, 0, 1)'
},
callback: Posterdown callback: Posterdown
}); });
});
// 移除 loading 动画 $(document).on('pjax:success', function (event) {
$(poster_box_selector + ' .loading_box').remove(); // 清理 PJAX 残留的 modal:只删除那些在当前页面没有对应按钮的 modal
var allModals = $('[id^="share_modal_"]');
var currentPostIds = {};
// 收集当前页面所有的 post_id
$('.cr_poster').each(function() {
var pid = $(this).attr('poster-data');
if (pid) {
currentPostIds[pid] = true;
}
});
// 只删除残留的 modal(不在当前页面按钮列表中的)
allModals.each(function() {
var $m = $(this);
var modalId = $m.attr('id');
var postId = modalId ? modalId.replace('share_modal_', '') : null;
if (postId && !currentPostIds[postId]) {
$m.remove();
}
});
}); });
File diff suppressed because one or more lines are too long
@@ -57,7 +57,7 @@
#nprogress .spinner-icon { #nprogress .spinner-icon {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: url("/upload/jiazai.gif"); background-image: url("/themes/theme-pix/assets/img/loading.webp");
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
+2 -2
View File
@@ -2436,7 +2436,7 @@ select.uk-form-width-xsmall {
.uk-spinner { .uk-spinner {
width: 80px; width: 80px;
height: 80px; height: 80px;
background-image: url("/upload/jiazai.gif"); background-image: url("/themes/theme-pix/assets/img/loading.webp");
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
@@ -3541,7 +3541,7 @@ iframe[uk-cover] {
.uk-sortable-drag { .uk-sortable-drag {
position: fixed !important; position: fixed !important;
z-index: 1050 !important; z-index: 1050 !important;
pointer-events: none pointer-events: none;
} }
.uk-sortable-placeholder { .uk-sortable-placeholder {
+33
View File
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html xmlns:th="https://www.thymeleaf.org"
th:replace="~{modules/layouts/layout :: layout(_head = null,_content = ~{::content},_title = ${douban != null and douban.spec != null ? douban.spec.name + ' - ' + site.title : title + ' - ' + site.title})}">
<th:block th:fragment="content">
<div class="page_main uk-width-2-3@m">
<th:block th:replace="~{modules/header}" />
<div id="pjax-container">
<div class="blog_list douban_page douban_detail_page">
<div class="blog_list_inner" uk-height-viewport="offset-top: true">
<div id="post_item" class="moment_list douban_list">
<th:block th:replace="~{macro/douban-item :: douban-item(${douban})}"></th:block>
<th:block th:if="${douban == null or douban.spec == null}">
<th:block th:replace="~{macro/tpl/content-none}" />
</th:block>
</div>
<div id="comment_form_reset"></div>
</div>
</div>
</div>
<th:block th:replace="~{modules/footer-main}" />
</div>
</th:block>
</html>
+73 -35
View File
@@ -8,48 +8,86 @@
<th:block th:replace="~{modules/header}" /> <th:block th:replace="~{modules/header}" />
<div id="pjax-container"> <div id="pjax-container" th:with="
page = ${#lists.isEmpty(param.page) or #strings.isEmpty(param.page[0]) ? 1 : param.page[0]},
selectedTag = ${#lists.isEmpty(param.tag) ? null : param.tag[0]},
doubanPage = ${doubanFinder.list(page, 10, selectedTag, null)}
">
<main id="primary" class="site-main"> <div class="blog_list douban_page">
<div class="blog_list_inner" uk-height-viewport="offset-top: true">
<div class="page_content" uk-height-viewport="offset-top: true"> <div class="friends_cat_nav douban_cat_nav">
<ul id="cat_nav_items">
<li>
<a th:attr="data-href=@{/books}"
th:classappend="${#strings.isEmpty(selectedTag) ? 'active' : ''}"
class="cat-link">
全部<span></span>
</a>
</li>
<li th:each="type : ${types}">
<a th:attr="data-href=@{/books(tag=${type.key})}"
th:classappend="${#strings.equals(selectedTag, type.key) ? 'active' : ''}"
class="cat-link">
<span th:text="${#strings.isEmpty(type.name) ? type.key : type.name}">类型</span>
</a>
</li>
</ul>
</div>
<article class="post-276 page type-page status-publish hentry"> <div id="post_item" class="moment_list douban_list">
<header class="entry-header"> <th:block th:each="doubanItem : ${doubanPage.items}">
<div class="left"> <th:block th:replace="~{macro/douban-item :: douban-item(${doubanItem})}"></th:block>
<i class="ri-focus-2-line"></i> </th:block>
<h1 class="entry-title" th:text="${title}"></h1>
</div>
</header>
<th:block th:if="${#lists.isEmpty(doubanPage.items)}">
<div class="entry-content single-content"> <th:block th:replace="~{macro/tpl/content-none}" />
<section class="db--container"> </th:block>
<nav class="db--nav">
<div th:each="type : ${types}" class="db--navItem JiEun"
th:classappend="${type.key == 'movie' ? 'current' : ''}"
th:data-type="${type.key}" th:text="${type.key}"></div>
</nav>
<div class="db--genres"></div>
<div class="db--type">
<div class="db--typeItem" data-status="mark">想看</div>
<div class="db--typeItem" data-status="doing">在看</div>
<div class="db--typeItem is-active" data-status="done">看过</div>
</div>
<div class="db--list db--list__card" data-type="movie">
</div>
<div class="block-more block-more__centered">
<div class="lds-ripple u-hide">
</div>
</div>
</section>
</div>
</article>
</div> </div>
</main> <th:block th:if="${doubanPage.totalPages > 1}">
<div id="t_pagination">
<div class="post-paging" th:with="_page = ${doubanPage.page + 1}">
<a th:if="${doubanPage.hasNext() and #strings.isEmpty(selectedTag)}"
th:attr="data=@{/books(page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
<a th:if="${doubanPage.hasNext() and not #strings.isEmpty(selectedTag)}"
th:attr="data=@{/books(tag=${selectedTag},page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
<form class="page-jump-form" method="get" action="/books">
<span class="page-jump-label">转到</span>
<input th:if="${not #strings.isEmpty(selectedTag)}" type="hidden" name="tag"
th:value="${selectedTag}" />
<span class="page-jump-input-wrap">
<button class="page-jump-step page-jump-step-down" type="button"
title="减少页码" aria-label="减少页码">
<i class="ri-subtract-line" aria-hidden="true"></i>
</button>
<input class="page-jump-input" type="number" name="page" min="1"
th:max="${doubanPage.totalPages}" th:value="${doubanPage.page}"
inputmode="numeric" aria-label="页码" autocomplete="off" required />
<button class="page-jump-step page-jump-step-up" type="button"
title="增加页码" aria-label="增加页码">
<i class="ri-add-line" aria-hidden="true"></i>
</button>
</span>
<span class="page-jump-total">/ [[${doubanPage.totalPages}]]</span>
<button class="page-jump-submit" type="submit" title="跳转到指定页"
aria-label="跳转到指定页">
<i class="ri-arrow-right-line" aria-hidden="true"></i>
</button>
</form>
</div>
</div>
</th:block>
<div id="comment_form_reset"></div>
</div>
</div>
</div> </div>
+39
View File
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html xmlns:th="https://www.thymeleaf.org"
th:replace="~{modules/layouts/layout :: layout(_head = null,_content = ~{::content},_title = ${title + ' - ' + site.title})}">
<th:block th:fragment="content">
<div class="page_main uk-width-2-3@m">
<th:block th:replace="~{modules/header}" />
<div id="pjax-container" th:with="
page = ${#lists.isEmpty(param.page) or #strings.isEmpty(param.page[0]) ? 1 : param.page[0]},
selectedTag = ${#lists.isEmpty(param.tag) ? null : param.tag[0]},
equipmentGroups = ${groups},
pageSize = ${equipments.size}
">
<!-- 未筛选时直接查询全部装备。 -->
<th:block th:if="${#strings.isEmpty(selectedTag)}"
th:with="equipmentPage = ${equipmentFinder.list(page, pageSize)}">
<th:block th:replace="~{macro/equipment :: equipment-page(${equipmentPage},${equipmentGroups},${selectedTag})}"></th:block>
</th:block>
<!-- URL 中的 tag 使用分组 displayNameFinder 查询使用分组 metadata.name。 -->
<th:block th:unless="${#strings.isEmpty(selectedTag)}" th:each="group : ${equipmentGroups}">
<th:block th:if="${#strings.equals(selectedTag, group.spec.displayName) or #strings.equals(selectedTag, group.metadata.name)}"
th:with="equipmentPage = ${equipmentFinder.list(page, pageSize, group.metadata.name)}">
<th:block th:replace="~{macro/equipment :: equipment-page(${equipmentPage},${equipmentGroups},${selectedTag})}"></th:block>
</th:block>
</th:block>
</div>
<th:block th:replace="~{modules/footer-main}" />
</div>
</th:block>
</html>
+1 -1
View File
@@ -15,7 +15,7 @@
<div class="nodata_main" uk-height-viewport="offset-top: true" > <div class="nodata_main" uk-height-viewport="offset-top: true" >
<section class="error-404 not-found"> <section class="error-404 not-found">
<div class="page-content no_resault"> <div class="page-content no_resault">
<img src="/upload/404.png"> <img src="/themes/theme-pix/assets/img/not-found.webp">
</div> </div>
</section> </section>
</div> </div>
+100
View File
@@ -0,0 +1,100 @@
<!DOCTYPE html>
<html xmlns:th="https://www.thymeleaf.org"
th:replace="~{modules/layouts/layout :: layout(_head = null,_content = ~{::content},_title = ${title + ' - ' + site.title})}">
<th:block th:fragment="content">
<div class="page_main uk-width-2-3@m">
<th:block th:replace="~{modules/header}" />
<div id="pjax-container">
<div class="blog_list">
<div class="blog_list_inner" uk-height-viewport="offset-top: true">
<div id="post_item" class="moment_list">
<!-- 作者姓名不为空才渲染朋友圈动态 -->
<div th:id="${'post-'+friend.metadata.name}"
class="loop_content p_item moment_item uk-animation-slide-bottom-small"
th:if="${friend.spec != null and not #strings.isEmpty(friend.spec.author)}"
th:with="postInfo = ${friend}, spec = ${friend.spec}">
<div class="p_item_inner">
<div class="list_user_meta">
<div class="avatar">
<img th:src="@{${spec.logo}}">
</div>
<div class="name">
<div class="avatar_title">
<a target="_blank" th:href="${spec.authorUrl}">
[[${spec.author}]]
</a>
</div>
<time itemprop="datePublished"
th:datetime="${#dates.format(spec.pubDate, 'yyyy-MM-dd HH:mm')}">
<th:block th:replace="~{modules/widgets/time :: time(${spec.pubDate})}">
</th:block>
</time>
</div>
</div>
<div class="blog_content">
<div class="entry-content">
<div class="p_title moment-collapse-container">
<a th:if="${not #strings.isEmpty(spec.postLink)}"
target="_blank" th:href="${spec.postLink}">
<div th:utext="${spec.description ?: '无内容'}"></div>
</a>
<div th:unless="${not #strings.isEmpty(spec.postLink)}"
th:utext="${spec.description ?: '无内容'}"></div>
</div>
<div class="img_list img-dynamic-container">
<div class="list_inner"
th:with="imgRaw=${spec.imageFiles},isImgList=${not #strings.isEmpty(imgRaw)}"
th:attr="num=${isImgList ? #arrays.length(imgRaw.split(',')) : 0}">
<th:block th:if="${isImgList}">
<th:block th:with="imgArray=${imgRaw.split(',')}">
<th:block th:each="url : ${imgArray}"
th:with="cleanUrl=${#strings.trim(url)}">
<span class="fancybox mo_img"
th:if="${not #strings.isEmpty(cleanUrl)}"
th:href="|/upload/image-host/${cleanUrl}|"
th:data-fancybox="${'post-' + postInfo.metadata.name}">
<img class="lazy"
src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
th:data-src="|/upload/image-host/${cleanUrl}|"
alt="">
</span>
</th:block>
</th:block>
</th:block>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 作者姓名为空:只展示404图片 -->
<div th:if="${friend.spec == null or #strings.isEmpty(friend.spec.author)}" style="text-align:center;padding:80px 0;">
<img src="/themes/theme-pix/assets/img/not-found.webp"style="max-width:400px;width:100%;">
</div>
</div>
<div id="comment_form_reset"></div>
</div>
</div>
</div>
<th:block th:replace="~{modules/footer-main}" />
</div>
</th:block>
</html>
Regular → Executable
+59 -17
View File
@@ -8,7 +8,10 @@
<th:block th:replace="~{modules/header}" /> <th:block th:replace="~{modules/header}" />
<div id="pjax-container"> <div id="pjax-container" th:with="
selectedTag = ${#lists.isEmpty(param.tag) ? null : param.tag[0]},
friendPage = ${friends}
">
<div class="blog_list"> <div class="blog_list">
<div class="blog_list_inner" uk-height-viewport="offset-top: true"> <div class="blog_list_inner" uk-height-viewport="offset-top: true">
@@ -19,16 +22,16 @@
<li> <li>
<!-- 全部按钮 --> <!-- 全部按钮 -->
<a th:attr="data-href=@{/friends}" <a th:attr="data-href=@{/friends}"
th:classappend="${#lists.isEmpty(param.author) ? 'active' : ''}" class="cat-link"> th:classappend="${#strings.isEmpty(selectedTag) ? 'active' : ''}" class="cat-link">
全部<span></span> 全部<span></span>
</a> </a>
</li> </li>
<!-- 遍历所有作者 --> <!-- 遍历所有作者 -->
<th:block th:each="author : ${authors}"> <th:block th:each="authorLink : ${authors}">
<li> <li>
<a th:attr="data-href=@{|/friends?author=${author}|}" <a th:attr="data-href=@{/friends(tag=${authorLink.spec.displayName})}"
th:classappend="${#strings.equals(param.author, author) ? 'active' : ''}" th:classappend="${#strings.equals(selectedTag, authorLink.spec.displayName) ? 'active' : ''}"
th:text="${author}" class="cat-link"> th:text="${authorLink.spec.displayName}" class="cat-link">
<span></span> <span></span>
</a> </a>
</li> </li>
@@ -38,9 +41,9 @@
<div id="post_item" class="moment_list"> <div id="post_item" class="moment_list">
<div th:each="postInfo, iterstat: ${friends.items}" <div th:each="postInfo, iterstat: ${friendPage.items}" th:id="${'post-'+postInfo.metadata.name}"
th:id="${'post-'+postInfo.metadata.name}"
class="loop_content p_item moment_item uk-animation-slide-bottom-small" class="loop_content p_item moment_item uk-animation-slide-bottom-small"
th:if="${postInfo.spec != null and not #strings.isEmpty(postInfo.spec.description)}"
th:with="spec = ${postInfo.spec}"> th:with="spec = ${postInfo.spec}">
<div class="p_item_inner"> <div class="p_item_inner">
@@ -72,28 +75,67 @@
<div th:utext="${spec.description}"></div> <div th:utext="${spec.description}"></div>
</a> </a>
</div> </div>
<!-- 图片列表 -->
<div class="img_list img-dynamic-container">
<div class="list_inner"
th:with="imgRaw=${spec.imageFiles},isImgList=${not #strings.isEmpty(imgRaw)}"
th:attr="num=${isImgList ? #arrays.length(imgRaw.split(',')) : 0}">
<!-- 仅使用 imageFiles;字段缺失或为空时不显示图片 -->
<th:block th:if="${isImgList}">
<th:block th:with="imgArray=${imgRaw.split(',')}">
<th:block th:each="url : ${imgArray}"
th:with="cleanUrl=${#strings.trim(url)}">
<span class="fancybox mo_img"
th:if="${not #strings.isEmpty(cleanUrl)}"
th:href="|/upload/image-host/${cleanUrl}|"
th:data-fancybox="${'post-' + postInfo.metadata.name}">
<img class="lazy"
src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
th:data-src="|/upload/image-host/${cleanUrl}|"
alt="">
</span>
</th:block>
</th:block>
</th:block>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 空数据 --> <!-- 空数据 -->
<th:block th:if="${#lists.isEmpty(friends.items)}"> <th:block th:if="${#lists.isEmpty(friendPage.items)}">
<th:block th:replace="~{macro/tpl/content-none}" /> <th:block th:replace="~{macro/tpl/content-none}" />
</th:block> </th:block>
</div> </div>
<!-- 分页:必须保持在 blog_list_inner 里面 --> <!-- 分页:必须保持在 blog_list_inner 里面 -->
<th:block th:if="${friends.totalPages>1}"> <th:block th:if="${friendPage.totalPages>1}">
<div id="t_pagination"> <div id="t_pagination">
<div class="post-paging" <div class="post-paging">
th:if="${friends.hasNext()}"> <a th:if="${friendPage.hasNext()}" th:data="${friendPage.nextUrl}"
<!-- 直接使用后端生成的完整 nextUrl --> th:text="${theme.config.base_set.site_page}"></a>
<a th:data="${friends.nextUrl}" <form class="page-jump-form" method="get" action="/friends">
th:text="${theme.config.base_set.site_page}"> <span class="page-jump-label">转到</span>
</a> <input th:if="${not #strings.isEmpty(selectedTag)}" type="hidden" name="tag"
th:value="${selectedTag}" />
<span class="page-jump-input-wrap">
<button class="page-jump-step page-jump-step-down" type="button"
title="减少页码" aria-label="减少页码"><i class="ri-subtract-line"
aria-hidden="true"></i></button>
<input class="page-jump-input" type="number" name="page" min="1"
th:max="${friendPage.totalPages}" th:value="${friendPage.page}"
inputmode="numeric" aria-label="页码" autocomplete="off" required />
<button class="page-jump-step page-jump-step-up" type="button"
title="增加页码" aria-label="增加页码"><i class="ri-add-line"
aria-hidden="true"></i></button>
</span>
<span class="page-jump-total">/ [[${friendPage.totalPages}]]</span>
<button class="page-jump-submit" type="submit" title="跳转到指定页"
aria-label="跳转到指定页"><i class="ri-arrow-right-line"></i></button>
</form>
</div> </div>
</div> </div>
</th:block> </th:block>
+8 -4
View File
@@ -10,16 +10,20 @@
<div id="pjax-container" th:with="page = ${#strings.isEmpty(param.page) ? 1 : param.page}"> <div id="pjax-container" th:with="
page = ${#lists.isEmpty(param.page) ? 1 : param.page[0]},
tag = ${#lists.isEmpty(param.tag) ? null : param.tag[0]}
">
<th:block th:if="${theme.config.style.home_post_type=='moment' && pluginFinder.available('PluginMoments')}"> <th:block th:if="${theme.config.style.home_post_type=='moment' && pluginFinder.available('PluginMoments')}"
th:with="momentPage = ${#strings.isEmpty(tag) ? momentFinder.list(page, site.post.postPageSize) : momentFinder.listByTag(page, site.post.postPageSize, tag)}">
<th:block <th:block
th:replace="~{macro/home-moment :: home-moment(${momentFinder.list(page, site.post.postPageSize)},${momentFinder.listAllTags()})}"> th:replace="~{macro/home-moment :: home-moment(${momentPage},${momentFinder.listAllTags()},'/')}">
</th:block> </th:block>
</th:block> </th:block>
<th:block th:if="${theme.config.style.home_post_type=='post' || (not (theme.config.style.home_post_type=='moment' && pluginFinder.available('PluginMoments'))) }"> <th:block th:if="${theme.config.style.home_post_type=='post' || (not (theme.config.style.home_post_type=='moment' && pluginFinder.available('PluginMoments'))) }">
<th:block th:replace="~{macro/home-blog :: home-blog(${posts},'/')}"></th:block> <th:block th:replace="~{macro/home-blog :: home-blog(${posts},'/',null,null)}"></th:block>
</th:block> </th:block>
</div> </div>
+63
View File
@@ -0,0 +1,63 @@
<th:block th:fragment="douban-item(doubanItem)" th:if="${doubanItem != null and doubanItem.spec != null}"
th:with="spec = ${doubanItem.spec}, faves = ${doubanItem.faves}, score = ${faves == null ? spec.score : (not #strings.isEmpty(faves.score) ? faves.score : spec.score)}, isRead = ${faves != null and faves.status == 'done'}">
<div th:id="${'post-' + doubanItem.metadata.name}"
class="loop_content p_item moment_item douban_card_item uk-animation-slide-bottom-small">
<div class="p_item_inner douban_card_inner">
<div class="douban_text_col">
<div class="douban_title_row">
<a th:if="${isRead and not #strings.isEmpty(spec.link)}"
class="douban_title_text"
th:href="${spec.link}"
th:text="${spec.name}">
豆瓣条目
</a>
<span th:unless="${isRead and not #strings.isEmpty(spec.link)}"
class="douban_title_text douban_title_text_plain"
th:text="${spec.name}">
豆瓣条目
</span>
<a class="douban_detail_link"
th:href="${'/books/' + doubanItem.metadata.name}"
aria-label="查看详情" title="查看详情">
详情
</a>
</div>
<div class="douban_media_col">
<span class="fancybox"
th:href="${#strings.isEmpty(spec.poster) ? '/themes/theme-pix/assets/img/banner-all.webp' : spec.poster}"
th:data-fancybox="${'douban-' + doubanItem.metadata.name}">
<img class="douban_poster_img"
th:src="${#strings.isEmpty(spec.poster) ? '/themes/theme-pix/assets/img/banner-all.webp' : spec.poster}"
th:alt="${spec.name}">
</span>
</div>
<div class="douban_sub_meta">
<time class="douban_time_text"
th:if="${faves != null and faves.createTime != null}"
th:datetime="${#dates.format(faves.createTime, 'yyyy-MM-dd HH:mm')}">
<span th:text="${#dates.format(faves.createTime, 'yyyy-MM-dd')}">2025-01-01</span>
</time>
<span class="douban_type_badge" th:text="${spec.type}">类型</span>
<span class="douban_score_badge"
th:if="${not #strings.isEmpty(score)}"
th:text="|${score}分|">评分</span>
</div>
<div class="douban_content_box">
<p class="douban_content_main"
th:text="${#strings.isEmpty(spec.cardSubtitle) ? '暂无简介' : spec.cardSubtitle}">
暂无简介
</p>
<p class="douban_content_meta">
<span th:if="${not #strings.isEmpty(spec.year)}" th:text="${spec.year}"></span>
<span th:if="${not #strings.isEmpty(spec.pubdate)}" th:text="${spec.pubdate}"></span>
</p>
</div>
</div>
</div>
</div>
</th:block>
+87
View File
@@ -0,0 +1,87 @@
<th:block th:fragment="equipment-page(equipmentPage,equipmentGroups,selectedTag)">
<div class="blog_list equipments_page">
<div class="blog_list_inner" uk-height-viewport="offset-top: true">
<div class="friends_cat_nav equipments_cat_nav">
<ul id="cat_nav_items">
<li>
<a th:attr="data-href=@{/qiyu}"
th:classappend="${#strings.isEmpty(selectedTag) ? 'active' : ''}"
class="cat-link">
<span>全部</span>
</a>
</li>
<li th:each="group : ${equipmentGroups}">
<a th:attr="data-href=@{/qiyu(tag=${group.spec.displayName})}"
th:classappend="${#strings.equals(selectedTag, group.spec.displayName) or #strings.equals(selectedTag, group.metadata.name) ? 'active' : ''}"
class="cat-link">
<span th:text="${group.spec.displayName}">分组</span>
</a>
</li>
</ul>
</div>
<div id="post_item" class="moment_list equipment_list">
<article th:each="equipment : ${equipmentPage.items}"
class="loop_content p_item moment_item equipment_item uk-animation-slide-bottom-small"
th:if="${equipment.spec != null and not #strings.isEmpty(equipment.spec.cover)}">
<div class="p_item_inner equipment_card_inner">
<div class="equipment_visual">
<img loading="lazy" th:src="${equipment.spec.cover}"
th:alt="${equipment.spec.description}">
<span class="equipment_overlay"
th:if="${not #strings.isEmpty(equipment.spec.description)}">
<span class="equipment_description" th:text="${equipment.spec.description}">描述</span>
</span>
</div>
</div>
</article>
<th:block th:if="${#lists.isEmpty(equipmentPage.items)}">
<th:block th:replace="~{macro/tpl/content-none}" />
</th:block>
</div>
<th:block th:if="${equipmentPage.totalPages > 1}">
<div id="t_pagination">
<div class="post-paging" th:with="_page = ${equipmentPage.page + 1}">
<a th:if="${equipmentPage.hasNext() and #strings.isEmpty(selectedTag)}"
th:attr="data=@{/qiyu(page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
<a th:if="${equipmentPage.hasNext() and not #strings.isEmpty(selectedTag)}"
th:attr="data=@{/qiyu(tag=${selectedTag},page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
<form class="page-jump-form" method="get" action="/qiyu">
<span class="page-jump-label">转到</span>
<input th:if="${not #strings.isEmpty(selectedTag)}" type="hidden" name="tag"
th:value="${selectedTag}" />
<span class="page-jump-input-wrap">
<button class="page-jump-step page-jump-step-down" type="button"
title="减少页码" aria-label="减少页码">
<i class="ri-subtract-line" aria-hidden="true"></i>
</button>
<input class="page-jump-input" type="number" name="page" min="1"
th:max="${equipmentPage.totalPages}" th:value="${equipmentPage.page}"
inputmode="numeric" aria-label="页码" autocomplete="off" required />
<button class="page-jump-step page-jump-step-up" type="button"
title="增加页码" aria-label="增加页码">
<i class="ri-add-line" aria-hidden="true"></i>
</button>
</span>
<span class="page-jump-total">/ [[${equipmentPage.totalPages}]]</span>
<button class="page-jump-submit" type="submit" title="跳转到指定页"
aria-label="跳转到指定页">
<i class="ri-arrow-right-line" aria-hidden="true"></i>
</button>
</form>
</div>
</div>
</th:block>
<div id="comment_form_reset"></div>
</div>
</div>
</th:block>
+41 -9
View File
@@ -1,22 +1,28 @@
<th:block th:fragment="home-blog(_posts,path)"> <th:block th:fragment="home-blog(_posts,path,tag,selectedCategory)">
<div class="normal_list"> <div class="normal_list">
<div class="normal_list_inner" uk-height-viewport="offset-top: true"> <div class="normal_list_inner" uk-height-viewport="offset-top: true">
<div class="posts_cat_nav"> <div class="posts_cat_nav">
<ul id="cat_nav_items"> <ul id="cat_nav_items">
<li><a th:data="${path}" class="active">全部<span></span></a> <li><a th:data="${path}" th:classappend="${#strings.isEmpty(tag) ? 'active' : ''}">全部<span></span></a>
</li> </li>
<li th:if="${theme.config.post.post_nav == 'category'}" th:each="categoryItem,iStat : ${categoryFinder.listAll()}"> <li th:if="${theme.config.post.post_nav == 'category'}" th:each="categoryItem,iStat : ${categoryFinder.listAll()}">
<a th:data="${categoryItem.status.permalink}" <a th:if="${path == '/archives'}" th:data="@{/archives(tag=${categoryItem.spec.displayName})}"
class="">[[${categoryItem.spec.displayName}]]<span></span></a> th:classappend="${#strings.equals(tag, categoryItem.spec.displayName) or #strings.equals(selectedCategory, categoryItem.metadata.name) ? 'active' : ''}">[[${categoryItem.spec.displayName}]]<span></span></a>
<a th:unless="${path == '/archives'}" th:data="${categoryItem.status.permalink}"
th:classappend="${#strings.equals(tag, categoryItem.spec.displayName) or #strings.equals(selectedCategory, categoryItem.metadata.name) ? 'active' : ''}">[[${categoryItem.spec.displayName}]]<span></span></a>
</li> </li>
<li th:if="${theme.config.post.post_nav == 'custom_category'}" <li th:if="${theme.config.post.post_nav == 'custom_category'}"
th:each="category : ${theme.config.post.nav_category}"> th:each="category : ${theme.config.post.nav_category}">
<th:block th:with="categoryItem = ${categoryFinder.getByName(category)}"> <th:block th:with="categoryItem = ${categoryFinder.getByName(category)}">
<a th:if="${categoryItem!=null}" <a th:if="${categoryItem!=null and path == '/archives'}"
th:data="@{/archives(tag=${categoryItem.spec.displayName})}"
th:classappend="${#strings.equals(tag, categoryItem.spec.displayName) or #strings.equals(selectedCategory, categoryItem.metadata.name) ? 'active' : ''}">[[${categoryItem.spec.displayName}]]<span></span>
</a>
<a th:if="${categoryItem!=null and path != '/archives'}"
th:data="${categoryItem.status.permalink}" th:data="${categoryItem.status.permalink}"
class="">[[${categoryItem.spec.displayName}]]<span></span> th:classappend="${#strings.equals(tag, categoryItem.spec.displayName) or #strings.equals(selectedCategory, categoryItem.metadata.name) ? 'active' : ''}">[[${categoryItem.spec.displayName}]]<span></span>
</a> </a>
</th:block> </th:block>
</li> </li>
@@ -26,13 +32,39 @@
<div id="post_item" class="norpost_list " th:with='postItems=${_posts.items}' <div id="post_item" class="norpost_list " th:with='postItems=${_posts.items}'
th:classappend="${theme.config.post.post_list_type == 'grid' ? 'uk-grid-small uk-grid' : ''}"> th:classappend="${theme.config.post.post_list_type == 'grid' ? 'uk-grid-small uk-grid' : ''}">
<th:block th:replace="~{'macro/tpl/content-post'}"></th:block> <th:block th:replace="~{'macro/tpl/content-post'}"></th:block>
<th:block th:if="${#lists.isEmpty(postItems)}">
<th:block th:replace="~{macro/tpl/content-none}"/>
</th:block>
</div> </div>
<th:block th:if="${_posts.totalPages>1}"> <th:block th:if="${_posts.totalPages>1}">
<div id="pagination"> <div id="pagination">
<div class="post-paging" th:if="${_posts.hasNext()}" <div class="post-paging"
th:with="_page = ${_posts.page+1},_path = ${path == '/archives' ? path+'?page='+_page : path +'page/'+_page }"> th:with="_page = ${_posts.page+1},_path = ${path +'page/'+_page }">
<a th:data="${_path}" th:text="${theme.config.base_set.site_page}"></a> <a th:if="${_posts.hasNext() and path == '/archives' and #strings.isEmpty(tag)}"
th:data="@{/archives(page=${_page})}" th:text="${theme.config.base_set.site_page}"></a>
<a th:if="${_posts.hasNext() and path == '/archives' and not #strings.isEmpty(tag)}"
th:data="@{/archives(tag=${tag},page=${_page})}" th:text="${theme.config.base_set.site_page}"></a>
<a th:if="${_posts.hasNext() and path != '/archives'}" th:data="${_path}"
th:text="${theme.config.base_set.site_page}"></a>
<form class="page-jump-form" method="get" th:action="@{${path}}">
<span class="page-jump-label">转到</span>
<input th:if="${not #strings.isEmpty(tag)}" type="hidden" name="tag" th:value="${tag}" />
<span class="page-jump-input-wrap">
<button class="page-jump-step page-jump-step-down" type="button"
title="减少页码" aria-label="减少页码"><i class="ri-subtract-line"
aria-hidden="true"></i></button>
<input class="page-jump-input" type="number" name="page" min="1"
th:max="${_posts.totalPages}" th:value="${_posts.page}"
inputmode="numeric" aria-label="页码" autocomplete="off" required />
<button class="page-jump-step page-jump-step-up" type="button"
title="增加页码" aria-label="增加页码"><i class="ri-add-line"
aria-hidden="true"></i></button>
</span>
<span class="page-jump-total">/ [[${_posts.totalPages}]]</span>
<button class="page-jump-submit" type="submit" title="跳转到指定页"
aria-label="跳转到指定页"><i class="ri-arrow-right-line"></i></button>
</form>
</div> </div>
</div> </div>
</th:block> </th:block>
+29 -6
View File
@@ -1,14 +1,14 @@
<th:block th:fragment="home-moment(_moments,tags)"> <th:block th:fragment="home-moment(_moments,tags,path)" th:with="_path = ${#strings.isEmpty(path) ? '/moments' : path}">
<div class="blog_list"> <div class="blog_list">
<div class="blog_list_inner" uk-height-viewport="offset-top: true"> <div class="blog_list_inner" uk-height-viewport="offset-top: true">
<div class="moment_cat_nav"> <div class="moment_cat_nav">
<ul id="cat_nav_items"> <ul id="cat_nav_items">
<li><a data="/moments" class="" th:classappend="${#lists.isEmpty(param.tag) ? 'active' : ''}" <li><a th:data="@{${_path}}" class="" th:classappend="${#lists.isEmpty(param.tag) ? 'active' : ''}"
><span>全部</span></a> ><span>全部</span></a>
</li> </li>
<li th:each="tag,iStat : ${tags}"> <li th:each="tag,iStat : ${tags}">
<a th:data="|/moments?tag=${tag.name}|" class="" <a th:data="@{${_path}(tag=${tag.name})}" class=""
th:classappend="${#lists.contains(param.tag, tag.name) ? 'active' : ''}" th:classappend="${#lists.contains(param.tag, tag.name) ? 'active' : ''}"
><span>[[${tag.name}]]</span></a> ><span>[[${tag.name}]]</span></a>
</li> </li>
@@ -26,9 +26,32 @@
</div> </div>
<th:block th:if="${_moments.totalPages>1}"> <th:block th:if="${_moments.totalPages>1}">
<div id="t_pagination"> <div id="t_pagination">
<div class="post-paging" th:if="${_moments.hasNext()}" <div class="post-paging"
th:with="tag = ${not #lists.isEmpty(param.tag) ? '?tag='+param.tag : ''},_page = ${_moments.page+1}"> th:with="tag = ${#lists.isEmpty(param.tag) ? null : param.tag[0]},_page = ${_moments.page+1}">
<a th:data="${'/moments/page/'+_page+tag}" th:text="${theme.config.base_set.site_page}"></a> <a th:if="${_moments.hasNext() and #strings.isEmpty(tag)}"
th:data="@{${_path}(page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
<a th:if="${_moments.hasNext() and not #strings.isEmpty(tag)}"
th:data="@{${_path}(tag=${tag},page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
<form class="page-jump-form" method="get" th:action="@{${_path}}">
<span class="page-jump-label">转到</span>
<input th:if="${not #strings.isEmpty(tag)}" type="hidden" name="tag" th:value="${tag}" />
<span class="page-jump-input-wrap">
<button class="page-jump-step page-jump-step-down" type="button"
title="减少页码" aria-label="减少页码"><i class="ri-subtract-line"
aria-hidden="true"></i></button>
<input class="page-jump-input" type="number" name="page" min="1"
th:max="${_moments.totalPages}" th:value="${_moments.page}"
inputmode="numeric" aria-label="页码" autocomplete="off" required />
<button class="page-jump-step page-jump-step-up" type="button"
title="增加页码" aria-label="增加页码"><i class="ri-add-line"
aria-hidden="true"></i></button>
</span>
<span class="page-jump-total">/ [[${_moments.totalPages}]]</span>
<button class="page-jump-submit" type="submit" title="跳转到指定页"
aria-label="跳转到指定页"><i class="ri-arrow-right-line"></i></button>
</form>
</div> </div>
</div> </div>
</th:block> </th:block>
+105
View File
@@ -0,0 +1,105 @@
<th:block th:fragment="home-photos(photoPage,groups,tag,selectedGroup)">
<div class="normal_list">
<div class="normal_list_inner" uk-height-viewport="offset-top: true">
<!-- 分类导航 -->
<div class="photos_cat_nav">
<ul id="cat_nav_items">
<li>
<!-- 修改:href 改为 data-href,并添加一个通用 class 如 'cat-link' -->
<a th:attr="data-href=@{/photos}"
th:classappend="${#strings.isEmpty(tag) and #strings.isEmpty(selectedGroup) ? 'active' : ''}"
class="cat-link">
全部<span></span>
</a>
</li>
<th:block th:each="photoGroup : ${groups}">
<li>
<!-- 修改:这里也改为 data-href -->
<a th:attr="data-href=@{/photos(tag=${photoGroup.spec.displayName})}"
th:classappend="${#strings.equals(tag, photoGroup.spec.displayName) or #strings.equals(selectedGroup, photoGroup.metadata.name) ? 'active' : ''}"
th:text="${photoGroup.spec.displayName}" class="cat-link">
<span></span>
</a>
</li>
</th:block>
</ul>
</div>
<!-- 相册列表 -->
<div id="photos_item" class="norpost_list">
<div th:unless="${#lists.isEmpty(photoPage.items)}" class="gallery-photos page">
<div th:each="photo : ${photoPage.items}" class="gallery-photo">
<th:block th:with="
img = ${!#strings.isEmpty(photo.spec.cover) ? photo.spec.cover : photo.spec.url},
isVideo = ${#strings.endsWith(img, '.mp4') or #strings.endsWith(img, '.webm') or #strings.endsWith(img, '.ogg')}
">
<span th:if="${isVideo}" th:href="${img}" data-fancybox="gallery"
class="fancybox video-fancybox"
style="position: relative; display: block; cursor: pointer;">
<video class="photo-img" preload="metadata" muted playsinline>
<source th:src="${img}" th:type="${#strings.endsWith(img, '.mp4') ? 'video/mp4' :
(#strings.endsWith(img, '.webm') ? 'video/webm' : 'video/ogg')}" />
</video>
<div
style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none;">
<i class="ri-play-circle-line play-icon"
style="color: #41b87e; font-size: 40px; background-color: rgba(255, 255, 255, 0.8); border-radius: 50%;"></i>
</div>
</span>
<span th:unless="${isVideo}" th:href="${img}" data-fancybox="gallery"
class="fancybox" th:data-thumb="${img}"
style="position: relative; display: block;">
<img class="photo-img" loading="lazy" th:src="${img}" />
</span>
</th:block>
</div>
</div>
<!-- 空数据 -->
<th:block th:if="${#lists.isEmpty(photoPage.items)}">
<th:block th:replace="~{macro/tpl/content-none}" />
</th:block>
</div>
<!-- 分页 -->
<th:block th:if="${photoPage.hasPrevious()} or ${photoPage.hasNext()}">
<div id="p_pagination">
<div class="post-paging"
th:with="_page = ${photoPage.page+1}">
<a th:if="${photoPage.hasNext() and #strings.isEmpty(tag)}"
th:data="@{/photos(page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
<a th:if="${photoPage.hasNext() and not #strings.isEmpty(tag)}"
th:data="@{/photos(tag=${tag},page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
<form class="page-jump-form" method="get" action="/photos">
<span class="page-jump-label">转到</span>
<input th:if="${not #strings.isEmpty(tag)}" type="hidden" name="tag" th:value="${tag}" />
<span class="page-jump-input-wrap">
<button class="page-jump-step page-jump-step-down" type="button"
title="减少页码" aria-label="减少页码"><i class="ri-subtract-line"
aria-hidden="true"></i></button>
<input class="page-jump-input" type="number" name="page" min="1"
th:max="${photoPage.totalPages}" th:value="${photoPage.page}"
inputmode="numeric" aria-label="页码" autocomplete="off" required />
<button class="page-jump-step page-jump-step-up" type="button"
title="增加页码" aria-label="增加页码"><i class="ri-add-line"
aria-hidden="true"></i></button>
</span>
<span class="page-jump-total">/ [[${photoPage.totalPages}]]</span>
<button class="page-jump-submit" type="submit" title="跳转到指定页"
aria-label="跳转到指定页"><i class="ri-arrow-right-line"></i></button>
</form>
</div>
</div>
</th:block>
</div>
</div>
</th:block>
+1 -1
View File
@@ -51,7 +51,7 @@
<span th:text="${moment.stats.upvote}"></span> <span th:text="${moment.stats.upvote}"></span>
</a> </a>
<div class="pix_share_btn" <div class="pix_share_btn"
th:with="_cover = ${not #strings.isEmpty(theme.config.moments.banner) ? theme.config.moments.banner : '/themes/theme-pix/assets/img/banner.jpg'}"> th:with="_cover = ${not #strings.isEmpty(theme.config.moments.banner) ? theme.config.moments.banner : '/themes/theme-pix/assets/img/banner-all.webp'}">
<a class="pix_icon share_btn_icon cr_poster" th:poster-data="${moment.metadata.name}" <a class="pix_icon share_btn_icon cr_poster" th:poster-data="${moment.metadata.name}"
th:banner="${_cover}" th:uk-toggle="|target: #share_modal_${moment.metadata.name}|" th:banner="${_cover}" th:uk-toggle="|target: #share_modal_${moment.metadata.name}|"
uk-tooltip="title: 瞬间分享; pos: top;" tabindex="0" title="" uk-tooltip="title: 瞬间分享; pos: top;" tabindex="0" title=""
+1 -1
View File
@@ -1,5 +1,5 @@
<section class="no-results not-found"> <section class="no-results not-found">
<div class="page-content no_resault"> <div class="page-content no_resault">
<img src="/upload/nodata.png"> <img src="/themes/theme-pix/assets/img/no-data.webp">
</div> </div>
</section> </section>
+1 -1
View File
@@ -5,7 +5,7 @@
<div class="blog_header"> <div class="blog_header">
<div th:if="${mu_on == 'true' && not #strings.isEmpty(plays_id)}" class="single_music_header"> <div th:if="${mu_on == 'true' && not #strings.isEmpty(plays_id)}" class="single_music_header">
<div class="mu_img"><img class="round12 shadow lazy" src="/themes/theme-pix/assets/img/lazyload.png" th:data-src="${_cover}" ></div> <div class="mu_img"><img class="round12 shadow lazy" src="/themes/theme-pix/assets/img/logo.webp" th:data-src="${_cover}" ></div>
<div class="right_info"> <div class="right_info">
<h2 class="entry-title" th:text="${post.spec.title}"></h2> <h2 class="entry-title" th:text="${post.spec.title}"></h2>
<div class="header_meta"> <div class="header_meta">
+1 -1
View File
@@ -29,7 +29,7 @@
<span th:if="${momentItem.type.name == 'PHOTO' && !isVideoExt}" class="fancybox mo_img" <span th:if="${momentItem.type.name == 'PHOTO' && !isVideoExt}" class="fancybox mo_img"
th:href="${momentItem.url}" th:data-fancybox="${'post-images-' + moment.metadata.name}"> th:href="${momentItem.url}" th:data-fancybox="${'post-images-' + moment.metadata.name}">
<img class="lazy" th:src="@{/assets/img/lazyload.png}" th:data-src="${momentItem.url}"> <img class="lazy" th:src="@{/assets/img/logo.webp}" th:data-src="${momentItem.url}">
</span> </span>
</th:block> </th:block>
+39 -11
View File
@@ -1,5 +1,5 @@
<th:block th:fragment="footer"> <th:block th:fragment="footer">
<th:block th:with="customJsVersion='1.2.5-3'"> <th:block th:with="customJsVersion='1.2.5-9'">
<!-- 奇遇容器 --> <!-- 奇遇容器 -->
<div class="center-img-container" id="centerImgContainer"> <div class="center-img-container" id="centerImgContainer">
@@ -41,31 +41,59 @@
<div class="pixar-notice-image-area"> <div class="pixar-notice-image-area">
<p class="pixar-notice-caption"> <p class="pixar-notice-caption">
您确定要退出登录吗?<br> 您确定要退出登录吗?<br>
退出后您仍能以访客身份翻阅本日记簿... 请注意:<br>
未保存的内容将会被清空!
</p> </p>
</div> </div>
<div class="pixar-notice-actions"> <div class="pixar-notice-actions">
<!-- 确认按钮 -->
<button class="pixar-notice-btn pixar-notice-btn-confirm" aria-label="Confirm"
onclick="confirmPixarAction()">
<i class="ri-check-line"></i>
</button>
<!-- 关闭按钮 --> <!-- 关闭按钮 -->
<button class="pixar-notice-btn pixar-notice-btn-close" aria-label="Close" <button class="pixar-notice-btn pixar-notice-btn-close" aria-label="Close"
onclick="hidePixarCard()"> onclick="hidePixarCard()">
<i class="ri-close-line"></i> <i class="ri-close-line"></i>
</button> </button>
<!-- 确认按钮 -->
<button class="pixar-notice-btn pixar-notice-btn-confirm" aria-label="Confirm"
onclick="confirmPixarAction()">
<i class="ri-check-line"></i>
</button>
</div> </div>
</div> </div>
</div> </div>
<script th:if="${pluginFinder.available('plugin-douban')}" <!-- 删除确认弹窗 -->
th:src="@{/plugins/plugin-douban/assets/static/db.min.js(v=${customJsVersion})}" class="pjax"></script> <div class="moments-modal-overlay" id="momentsDeleteModal" style="display: none;">
<div class="moments-card-widget">
<div class="moments-card-header">
<!-- 新增这一层包裹 -->
<div class="moments-header-row">
<div class="moments-icon-wrapper">
<svg aria-hidden="true" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24"
fill="none">
<path
d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"
stroke-linejoin="round" stroke-linecap="round"></path>
</svg>
</div>
<div class="moments-text-content">
<span class="moments-title-text"></span>
<p class="moments-message-text"></p>
</div>
</div>
<div class="moments-button-group">
<button class="moments-btn-cancel" type="button" id="momentsCancelBtn">取消</button>
<button class="moments-btn-confirm" type="button" id="momentsConfirmBtn">确认</button>
</div>
</div>
</div>
</div>
<!-- <script th:if="${pluginFinder.available('plugin-douban')}"
th:src="@{/plugins/plugin-douban/assets/static/db.min.js(v=${customJsVersion})}" class="pjax"></script> -->
<script th:src="@{/assets/libs/axios/axios.min.js(v=${customJsVersion})}" id="axios.min-js"></script> <script th:src="@{/assets/libs/axios/axios.min.js(v=${customJsVersion})}" id="axios.min-js"></script>
<script th:src="@{/assets/libs/jsencrypt/jsencrypt.min.js(v=${customJsVersion})}" <script th:src="@{/assets/libs/jsencrypt/jsencrypt.min.js(v=${customJsVersion})}"
id="jsencrypt.min-js"></script> id="jsencrypt.min-js"></script>
@@ -91,7 +119,7 @@
<link rel="prefetch" href="/upload/ma-shan-zheng.woff2" crossorigin="anonymous"> <link rel="prefetch" href="/upload/ma-shan-zheng.woff2" crossorigin="anonymous">
<link rel="prefetch" href="/upload/mu-yao-sui-xin-shou-xie-ti.woff2" crossorigin="anonymous"> <link rel="prefetch" href="/upload/mu-yao-sui-xin-shou-xie-ti.woff2" crossorigin="anonymous">
<link rel="prefetch" href="/upload/jiazai.gif"> <link rel="prefetch" href="/themes/theme-pix/assets/img/loading.webp">
</th:block> </th:block>
+3 -58
View File
@@ -1,4 +1,4 @@
<th:block th:fragment="head" th:with="customJsVersion=${'1.2.5-3'}"> <th:block th:fragment="head" th:with="customJsVersion=${'1.2.5-9'}">
<th:block th:replace="~{'modules/variables/msg'}" /> <th:block th:replace="~{'modules/variables/msg'}" />
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no"> <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
@@ -6,61 +6,6 @@
<link rel="shortcut icon" th:href="@{${theme.config.base_set.favicon}}" title="Favicon"> <link rel="shortcut icon" th:href="@{${theme.config.base_set.favicon}}" title="Favicon">
<meta name="robots" content="max-image-preview:large"> <meta name="robots" content="max-image-preview:large">
<style>
.dl-warning-card { overflow: hidden; position: fixed; bottom: 1rem; left: 0; right: 0; margin: 0 auto; background-color: #ffffff; border-radius: 0.5rem; max-width: 720px; width: calc(100% - 2rem); box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 9999; display: none; opacity: 0; transform: translateY(20px); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-sizing: border-box; border-left: 4px solid #f59e0b; }
.dl-warning-header { display: flex; align-items: center; padding: 1rem; gap: 1rem; }
.dl-warning-image { flex-shrink: 0; background-color: #fef3c7; justify-content: center; align-items: center; width: 2.5rem; height: 2.5rem; border-radius: 9999px; display: flex; }
.dl-warning-image svg { color: #f59e0b; width: 1.25rem; height: 1.25rem; }
.dl-warning-content { flex: 1; text-align: left; word-wrap: break-word; word-break: break-all; min-width: 0; }
.dl-warning-title { color: #F59E0B; font-size: 0.95rem; font-weight: 600; line-height: 1.3rem; display: block; margin-bottom: 0.25rem; }
.dl-warning-message { color: #6b7280; font-size: 0.875rem; line-height: 1.25rem; margin: 0; }
.dl-warning-actions { display: flex; flex-direction: row; gap: 0.75rem; align-items: center; flex-shrink: 0; }
.dl-warning-desactivate { padding: 0.375rem 0.75rem; background-color: #f59e0b; color: #ffffff; font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; justify-content: center; align-items: center; display: inline-flex; border-radius: 0.375rem; border: none; box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); cursor: pointer; white-space: nowrap; }
.dl-warning-desactivate.loading { background-color: #d97706; cursor: not-allowed; opacity: 0.8; pointer-events: none; }
.dl-warning-desactivate.loading::after { content: ""; width: 0.75rem; height: 0.75rem; border: 2px solid rgba(255,255,255,0.5); border-top-color: #ffffff; border-radius: 50%; margin-left: 0.5rem; margin-right: 0.25rem; animation: spin 1s linear infinite; flex-shrink: 0; }
.dl-warning-desactivate:not(.loading):hover { background-color: #fbbf24; box-shadow: 0 2px 3px 0 rgba(0,0,0,0.06); transition: all 0.2s ease-in-out; }
.dl-warning-cancel { padding: 0.375rem 0.75rem; background-color: #ffffff; color: #374151; font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; justify-content: center; align-items: center; display: inline-flex; border-radius: 0.375rem; border: 1px solid #d1d5db; box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); cursor: pointer; white-space: nowrap; }
.dl-warning-cancel:hover { background-color: #ededed; border-color: #e5e7eb; box-shadow: 0 2px 3px 0 rgba(0,0,0,0.06); transition: all 0.2s ease-in-out; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@media (max-width: 480px) {
.dl-warning-card { bottom: 1rem; width: calc(100% - 1rem); max-width: 100%; }
.dl-warning-header { padding: 0.75rem; gap: 0.75rem; align-items: center; }
.dl-warning-image { width: 2rem; height: 2rem; }
.dl-warning-image svg { width: 1rem; height: 1rem; }
.dl-warning-title { font-size: 0.9rem; }
.dl-warning-message { font-size: 0.85rem; }
.dl-warning-actions { flex-direction: column; gap: 0.375rem; align-items: stretch; flex-shrink: 0; width: auto; margin-top: 0; }
.dl-warning-desactivate, .dl-warning-cancel { font-size: 0.75rem; padding: 0.25rem 0.5rem; width: 100%; }
.dl-warning-content { min-width: 0; word-wrap: break-word; word-break: break-all; }
}
</style>
<div class="dl-warning-card" id="lineCard">
<div class="dl-warning-header">
<div class="dl-warning-image"><svg aria-hidden="true" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" fill="none"><path d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" stroke-linejoin="round" stroke-linecap="round"></path></svg></div>
<div class="dl-warning-content"><span class="dl-warning-title" id="cardHeading"></span><p class="dl-warning-message" id="cardPara"></p></div>
<div class="dl-warning-actions"><button class="dl-warning-desactivate" id="switchBtn"></button><button class="dl-warning-cancel" id="cancelBtn">取消</button></div>
</div>
</div>
<script>
(function () {
const lineCardEl = document.getElementById('lineCard'), cardHeadingEl = document.getElementById('cardHeading'), cardParaEl = document.getElementById('cardPara'), switchLineBtn = document.getElementById('switchBtn'), cancelLineBtn = document.getElementById('cancelBtn');
const getCookie = (name) => document.cookie.split('; ').find(row => row.startsWith(`${name}=`))?.split('=')[1];
const setSessionCookie = (name, value, domain = 'anian.cc') => document.cookie = `${name}=${value}; path=/; domain=${domain}; SameSite=Lax`;
const showLineCard = () => { lineCardEl.style.display = 'block'; setTimeout(() => { lineCardEl.style.opacity = '1'; lineCardEl.style.transform = 'translateY(0)'; }, 10) };
const hideLineCard = (setNoPrompt = false, setNoSpeedTest = false) => { lineCardEl.style.opacity = '0'; lineCardEl.style.transform = 'translateY(20px)'; setTimeout(() => { lineCardEl.style.display = 'none'; if (setNoPrompt) setSessionCookie('noPrompt_anian_cc', 'true'); if (setNoSpeedTest) setSessionCookie('noSpeedTest_anian_cc', 'true'); }, 300) };
const handleLineSwitch = (baseUrl) => { switchLineBtn.classList.add('loading'); switchLineBtn.textContent = '切换中'; switchLineBtn.disabled = true; const currentScrollTop = window.scrollY || document.documentElement.scrollTop; document.cookie = `scrollParam=${currentScrollTop}; path=/; domain=anian.cc`; let finalUrl = baseUrl + location.pathname + location.search + location.hash; setTimeout(() => location.href = finalUrl, 500) };
let isResourceLoaded = false, pageLoadTimeoutTimer = null, isLoadTimeoutAborted = false;
const currentHost = location.hostname, isMainDomain = currentHost === 'anian.cc', isSubDomain = currentHost === 'www.anian.cc', isTestDomain = !isMainDomain && !isSubDomain;
const scrollParam = getCookie('scrollParam'), noPromptCookie = getCookie('noPrompt_anian_cc'), noSpeedTestCookie = getCookie('noSpeedTest_anian_cc');
cancelLineBtn.addEventListener('click', () => { hideLineCard(!isMainDomain, isMainDomain); });
if (isSubDomain) { if (!scrollParam && !noPromptCookie) { cardHeadingEl.textContent = '温馨提示'; cardParaEl.textContent = '当前为备用线路,若主线路正常,请优先选择主线路'; switchLineBtn.textContent = '切换主线路'; switchLineBtn.onclick = () => handleLineSwitch('https://anian.cc'); showLineCard(); } }
if (isMainDomain) { if (!noSpeedTestCookie) { pageLoadTimeoutTimer = setTimeout(() => { if (!isResourceLoaded) { isLoadTimeoutAborted = true; cardHeadingEl.textContent = '线路异常'; cardParaEl.textContent = '当前线路拥塞,若本地网络正常,可尝试切换至备用线路'; switchLineBtn.textContent = '切换副线路'; switchLineBtn.onclick = () => handleLineSwitch('https://www.anian.cc'); showLineCard(); } }, 15000); window.onload = () => { isResourceLoaded = true; clearTimeout(pageLoadTimeoutTimer); if (isLoadTimeoutAborted) return; const xhr = new XMLHttpRequest(); xhr.open('GET', `/upload/%E4%B8%8B%E8%BD%BD%20(9).mp4?_t=${Date.now()}`, true); let t = setTimeout(() => { xhr.abort(); cardHeadingEl.textContent = '线路异常'; cardParaEl.textContent = '当前线路拥塞,若本地网络正常,可尝试切换至备用线路'; switchLineBtn.textContent = '切换副线路'; switchLineBtn.onclick = () => handleLineSwitch('https://www.anian.cc'); showLineCard() }, 7500); xhr.onload = xhr.onerror = xhr.onabort = () => clearTimeout(t); xhr.send(); } } }
if (isTestDomain) { if (!noPromptCookie) { cardHeadingEl.textContent = '线路警告'; cardParaEl.textContent = '当前为测试线路,若非开发所需,请优先选择主线路'; switchLineBtn.textContent = '切换主线路'; switchLineBtn.onclick = () => handleLineSwitch('https://anian.cc'); showLineCard(); } }
})();
</script>
<link rel="stylesheet" id="wp-block-library-css" th:href="@{/assets/css/style.min.css(v=${customJsVersion})}" media="all"> <link rel="stylesheet" id="wp-block-library-css" th:href="@{/assets/css/style.min.css(v=${customJsVersion})}" media="all">
<link rel="stylesheet" id="pix-style-css" th:href="@{/assets/css/style.css(v=${customJsVersion})}" media="all"> <link rel="stylesheet" id="pix-style-css" th:href="@{/assets/css/style.css(v=${customJsVersion})}" media="all">
<link rel="stylesheet" id="fancybox.css-css" th:href="@{/assets/libs/fancybox/jquery.fancybox.min.css(v=${customJsVersion})}" media="all"> <link rel="stylesheet" id="fancybox.css-css" th:href="@{/assets/libs/fancybox/jquery.fancybox.min.css(v=${customJsVersion})}" media="all">
@@ -73,11 +18,11 @@
<link rel="stylesheet" id="album-css" th:href="@{/assets/css/album.css(v=${customJsVersion})}" media="all"> <link rel="stylesheet" id="album-css" th:href="@{/assets/css/album.css(v=${customJsVersion})}" media="all">
<link rel="stylesheet" id="anian-css" th:href="@{/assets/css/anian.css(v=${customJsVersion})}" media="all"> <link rel="stylesheet" id="anian-css" th:href="@{/assets/css/anian.css(v=${customJsVersion})}" media="all">
<link th:if="${theme.config.style.theme_set != 'green-normal' && theme.config.style.theme_set != 'dark-theme'}" rel="stylesheet" id="theme.color-css" th:href="@{/assets/css/{theme_set}.css(theme_set=${theme.config.style.theme_set},v=${customJsVersion})}" media="all"> <link th:if="${theme.config.style.theme_set != 'green-normal' && theme.config.style.theme_set != 'dark-theme'}" rel="stylesheet" id="theme.color-css" th:href="@{/assets/css/{theme_set}.css(theme_set=${theme.config.style.theme_set},v=${customJsVersion})}" media="all">
<link th:if="${pluginFinder.available('plugin-douban')}" rel="stylesheet" id="wpd-css-css" th:href="@{/plugins/plugin-douban/assets/static/db.min.css(v=${customJsVersion})}" type="text/css" media="screen"> <!-- <link th:if="${pluginFinder.available('plugin-douban')}" rel="stylesheet" id="wpd-css-css" th:href="@{/plugins/plugin-douban/assets/static/db.min.css(v=${customJsVersion})}" type="text/css" media="screen"> -->
<style th:if="${not #strings.isEmpty(theme.config.custom.code_css)}" th:utext="${theme.config.custom.code_css}"></style> <style th:if="${not #strings.isEmpty(theme.config.custom.code_css)}" th:utext="${theme.config.custom.code_css}"></style>
<style>:root { --toc-color: [(${theme.config.post.tocColor})]; } .wp-block-button__link { color: #fff; background-color: #32373c; border-radius: 9999px; text-decoration: none; padding: .6em 1.3em; } .wp-block-file__button { background: #32373c; color: #fff; text-decoration: none; }</style> <style>:root { --toc-color: [(${theme.config.post.tocColor})]; } .wp-block-button__link { color: #fff; background-color: #32373c; border-radius: 9999px; text-decoration: none; padding: .6em 1.3em; } .wp-block-file__button { background: #32373c; color: #fff; text-decoration: none; }</style>
<style th:if="${!theme.config.post.toc.mobile_open}">@media screen and (max-width: 768px) { .listree-box { display: none !important; } }</style> <style th:if="${!theme.config.post.toc.mobile_open}">@media screen and (max-width: 768px) { .listree-box, .toc_nav { display: none !important; } }</style>
<style th:if="${not #strings.isEmpty(theme.config.base_set.custom_fonts)}">@font-face { font-family: "HarmonyOS_M"; src: url("[(${theme.config.base_set.custom_fonts})]") format("truetype"); font-display: swap; }</style> <style th:if="${not #strings.isEmpty(theme.config.base_set.custom_fonts)}">@font-face { font-family: "HarmonyOS_M"; src: url("[(${theme.config.base_set.custom_fonts})]") format("truetype"); font-display: swap; }</style>
<th:block th:replace="~{modules/variables/cst-script-parameter}" /> <th:block th:replace="~{modules/variables/cst-script-parameter}" />
+14 -28
View File
@@ -20,19 +20,6 @@
</header><!-- #masthead --> </header><!-- #masthead -->
<!-- <div class="index_banner">
<div class="bg bg1"></div>
<div class="bg bg2"></div>
<div class="user_info">
<div class="top">
<div class="left">
<div class="name">[[${theme.config.base_set.nice_name}]]</div>
<div class="des">[[${theme.config.base_set.admin_des}]]</div>
</div>
<div class="avatar"><img th:src="${theme.config.base_set.default_avatar}"></div>
</div>
</div>
</div> -->
<div class="index_banner" id="banner" uk-img="loading: eager"> <div class="index_banner" id="banner" uk-img="loading: eager">
<div class="user_info"> <div class="user_info">
<div class="top"> <div class="top">
@@ -51,12 +38,12 @@
// -------------------------- // --------------------------
const BANNER_CONFIG = { const BANNER_CONFIG = {
seasonal: { seasonal: {
'春': '/upload/dingbu-chun.png', // 春季 Banner '春': '/themes/theme-pix/assets/img/banner-chun.webp',
'夏': '/upload/dingbu-xia.png', // 夏季 Banner '夏': '/themes/theme-pix/assets/img/banner-xia.webp',
'秋': '/upload/dingbu-qiu.png', // 秋季 Banner '秋': '/themes/theme-pix/assets/img/banner-qiu.webp',
'冬': '/upload/dingbu-dong.png' // 冬季 Banner '冬': '/themes/theme-pix/assets/img/banner-dong.webp'
}, },
fallback: '/upload/dingbu-siji.png' // 兜底图 fallback: '/themes/theme-pix/assets/img/banner-all.webp'
}; };
// -------------------------- // --------------------------
@@ -66,7 +53,7 @@ function anian_setDailyCookie(name, value) {
const now = new Date(); const now = new Date();
const china = new Date(now.getTime() + 8 * 3600 * 1000); const china = new Date(now.getTime() + 8 * 3600 * 1000);
const expires = new Date(Date.UTC(china.getUTCFullYear(), china.getUTCMonth(), china.getUTCDate(), 15, 59, 59)); const expires = new Date(Date.UTC(china.getUTCFullYear(), china.getUTCMonth(), china.getUTCDate(), 15, 59, 59));
document.cookie = `${encodeURIComponent(name)}=${encodeURIComponent(value)}; expires=${expires.toUTCString()}; path=/; domain=anian.cc`; document.cookie = `${encodeURIComponent(name)}=${encodeURIComponent(value)}; expires=${expires.toUTCString()}; path=/`;
} }
function anian_getCookie(name) { function anian_getCookie(name) {
@@ -102,7 +89,7 @@ function setBanner(lunarInfo) {
// 初始化逻辑(优化版) // 初始化逻辑(优化版)
// -------------------------- // --------------------------
(function() { (function() {
const apiUrl = 'https://cn.apihz.cn/api/time/getday.php?id=10011724&key=0bdd2d8b3d97c0d476c98a41f108a96f'; const apiUrl = 'https://api.anian.net/lunar/api';
const cookieName = 'anian_lunar_info'; const cookieName = 'anian_lunar_info';
// 1. 优先尝试从 Cookie 读取 // 1. 优先尝试从 Cookie 读取
@@ -118,16 +105,15 @@ function setBanner(lunarInfo) {
fetch(apiUrl) fetch(apiUrl)
.then(res => res.json()) .then(res => res.json())
.then(data => { .then(data => {
if (data.code !== 200) throw new Error('API Error'); // 组装农历信息,保持 cookie 字段名不变
// 组装农历信息(保留原有逻辑)
const lunarInfo = { const lunarInfo = {
ganzhiYear: data.ganzhinian || '', ganzhiYear: data.nian || '',
lunarMonth: data.nyue || '', lunarMonth: data.yue || '',
lunarDay: data.nri || '', lunarDay: data.ri || '',
jieqi: (data.JIEQICN || '').includes('第1天') ? data.jieqi : '', jieqi: data.jieqi || '',
jijie: data.jijie || '', jijie: data.jijie || '',
traditionalFestival: data.YIFESTIVAL || '' shengxiao: data.shengxiao || '',
traditionalFestival: data.jieri || ''
}; };
// 存 Cookie 并设置 Banner // 存 Cookie 并设置 Banner
+5 -63
View File
@@ -22,70 +22,12 @@
</div> </div>
</div> </div>
<!-- <div class="m_top_nav top_tool is_mobile"> <div class="toc_nav top_tool icon_color" aria-hidden="true">
<a class="top_nav_btn" uk-toggle="target: #m_offcanvas"><i class="ri-menu-2-line"></i></a> <a class="listree-btn" title="展开目录" aria-label="展开目录" aria-expanded="false">
<div id="m_offcanvas" class="m_offcanvas uk-animation-fast" <i class="ri-menu-line"></i>
uk-offcanvas="overlay: true;mode: push;container:.main_wrap">
<div class="uk-offcanvas-bar inner"
th:with="topMenu = ${#strings.isEmpty(theme.config.base_set.left_nav) ? menuFinder.getPrimary() : menuFinder.getByName(theme.config.base_set.left_nav)}">
<div class="m_logo"><a href="/"><img th:src="${theme.config.base_top_set.mobile_logo}"></a></div>
<div class="menu-top-container" th:if="${not #lists.isEmpty(topMenu)}">
<ul id="top_menu" class="menu">
<th:block th:each="menuItem : ${topMenu.menuItems}">
<li th:unless="${not #lists.isEmpty(menuItem.children)}"
class="menu-item menu-item-type-post_type menu-item-object-page">
<a th:target="${menuItem.spec.target?.value}" th:href="@{${menuItem.status.href}}"
th:with="icon = ${#annotations.getOrDefault(menuItem, 'icon', '')}">
<th:block th:if="${not #strings.isEmpty(icon)}"
th:with="index = ${icon.lastIndexOf('.')}">
<i th:unless="${index!=-1}" th:class="${icon}"></i>
<img th:if="${index!=-1}" th:src="${icon}">
</th:block>
<span class="nav_title" th:text="${menuItem.status.displayName}"></span>
</a> </a>
</li>
<li th:if="${not #lists.isEmpty(menuItem.children)}"
class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children has_children"
th:classappend="${'menu-item-'+iterStat.index}">
<a href="#" th:with="icon = ${#annotations.getOrDefault(menuItem, 'icon', '')}">
<th:block th:if="${not #strings.isEmpty(icon)}"
th:with="index = ${icon.lastIndexOf('.')}">
<i th:unless="${index!=-1}" th:class="${icon}"></i>
<img th:if="${index!=-1}" th:src="${icon}">
</th:block>
<span class="nav_title">[[${menuItem.status.displayName}]]</span>
<i class="ri-arrow-down-s-line drop_icon"></i>
</a>
<ul class="sub-menu">
<li th:each="childMenu,iterStat : ${menuItem.children}"
th:id="${'menu-item-'+iterStat.index}"
class="menu-item menu-item-type-custom menu-item-object-custom"
th:classappend="${'menu-item-'+iterStat.index}">
<a th:href="@{${childMenu.status.href}}"
th:with="icon = ${#annotations.getOrDefault(childMenu, 'icon', '')}"
th:target="${childMenu.spec.target?.value}">
<th:block th:if="${not #strings.isEmpty(icon)}"
th:with="index = ${icon.lastIndexOf('.')}">
<i th:unless="${index!=-1}" th:class="${icon}"></i>
<img th:if="${index!=-1}" th:src="${icon}">
</th:block>
<span class="nav_title">[[${childMenu.status.displayName}]]</span>
</a>
</li>
</ul>
</li>
</th:block>
</ul>
</div> </div>
<div th:unless="${not #lists.isEmpty(topMenu)}" class="nav_tips">请前往后台设置左侧菜单/移动端菜单</div>
</div>
</div>
</div> -->
<!-- 搜索区域 --> <!-- 搜索区域 -->
<div class="search_mod"> <div class="search_mod">
<div th:if="${pluginFinder.available('PluginSearchWidget')}" class="t_search_on top_tool icon_color"> <div th:if="${pluginFinder.available('PluginSearchWidget')}" class="t_search_on top_tool icon_color">
@@ -94,8 +36,8 @@
</div> </div>
<!-- 回到顶部 --> <!-- 回到顶部 -->
<div class="is_mobile"> <div class="is_mobile top_tool">
<a class="tool_top" href="#page" uk-scroll="" data-pjax-state=""> <a class="tool_top" href="#page" uk-scroll="" data-pjax-state="">
<i class="ri-skip-up-line"></i></a> <i class="ri-skip-up-line tool_top_icon"></i></a>
</div> </div>
</div> </div>
+2 -2
View File
@@ -16,7 +16,7 @@
<div class="user_pannel round12" uk-dropdown="mode: click;toggle:#top_ava;pos:bottom-right;animation:uk-animation-slide-top-small"> <div class="user_pannel round12" uk-dropdown="mode: click;toggle:#top_ava;pos:bottom-right;animation:uk-animation-slide-top-small">
<div class="inner"> <div class="inner">
<a href="/console" target="_blank" pjax="exclude"><i class="ri-function-line"></i>管理面板</a> <a href="/console" target="_blank" pjax="exclude"><i class="ri-function-line"></i>管理面板</a>
<a class="logout" href="javascript:void(0);" onclick="showPixarCard()"><i class="ri-logout-circle-r-line"></i>退出登录</a> <a class="logout" href="javascript:void(0);" onclick="open_logout_box()"><i class="ri-logout-circle-r-line"></i>退出登录</a>
</div> </div>
</div> </div>
@@ -47,7 +47,7 @@
<div class="user_pannel round12" uk-dropdown="mode: click;toggle:#top_ava2;pos:bottom-right;animation:uk-animation-slide-top-small"> <div class="user_pannel round12" uk-dropdown="mode: click;toggle:#top_ava2;pos:bottom-right;animation:uk-animation-slide-top-small">
<div class="inner"> <div class="inner">
<a href="/console" target="_blank" pjax="exclude"><i class="ri-function-line"></i>管理面板</a> <a href="/console" target="_blank" pjax="exclude"><i class="ri-function-line"></i>管理面板</a>
<a class="logout" href="javascript:void(0);" onclick="showPixarCard()"><i class="ri-logout-circle-r-line"></i>退出登录</a> <a class="logout" href="javascript:void(0);" onclick="open_logout_box()"><i class="ri-logout-circle-r-line"></i>退出登录</a>
</div> </div>
</div> </div>
+2 -3
View File
@@ -32,8 +32,7 @@
</div> </div>
<div class="listree-box" style="display: none;"> <div class="listree-box" aria-hidden="true">
<h3 class="listree-titles"></h3>
<ul id="listree-ol" style="display:none;"> <ul id="listree-ol" style="display:none;">
</ul> </ul>
</div> </div>
@@ -48,7 +47,7 @@
<i class="ri-play-list-line"></i> <i class="ri-play-list-line"></i>
</a> </a>
</div> </div>
<div th:if="${theme.config.style.theme_set != 'dark-theme'}" class="t_dark top_tool icon_color"><a><i class="ri-contrast-2-line"></i></a></div> <!-- <div th:if="${theme.config.style.theme_set != 'dark-theme'}" class="t_dark top_tool icon_color"><a><i class="ri-contrast-2-line"></i></a></div> -->
</div> </div>
<a class="go_top" href="#page" uk-scroll=""><i class="ri-arrow-up-s-line"></i></a> <a class="go_top" href="#page" uk-scroll=""><i class="ri-arrow-up-s-line"></i></a>
</div> </div>
+1 -1
View File
@@ -4,7 +4,7 @@
<button class="uk-modal-close-default uk-icon uk-close" type="button" uk-close=""></button> <button class="uk-modal-close-default uk-icon uk-close" type="button" uk-close=""></button>
<div class="msg_modal_inner"> <div class="msg_modal_inner">
<p class="no_posts"><small># 暂无消息 #</small> <p class="no_posts"><small># 暂无消息 #</small>
<img class="s_nodata" rc="/upload/nodata.png"> <img class="s_nodata" rc="/themes/theme-pix/assets/img/no-data.webp">
</p> </p>
<p class="msg_limit">只显示最新10条未读和已读信息</p> <p class="msg_limit">只显示最新10条未读和已读信息</p>
</div> </div>
+1 -1
View File
@@ -124,7 +124,7 @@
<div class="form_footer"> <div class="form_footer">
<div class="admin_tool"> <div class="admin_tool">
<a href="/console" target="_blank"><i class="ri-function-line"></i> 管理</a> <a href="/console" target="_blank"><i class="ri-function-line"></i> 管理</a>
<a class="logout" href="javascript:void(0);" onclick="showPixarCard()"><i class="ri-logout-circle-r-line"></i> 登出</a> <a class="logout" href="javascript:void(0);" onclick="open_logout_box()"><i class="ri-logout-circle-r-line"></i> 登出</a>
</div> </div>
<div class="moment_sure"> <div class="moment_sure">
<button class="uk-modal-close push_close">取消</button> <button class="uk-modal-close push_close">取消</button>
@@ -5,7 +5,7 @@
site_title: [[${site.title}]], site_title: [[${site.title}]],
bgm_open: [[${theme.config.music.bgm_open}]], bgm_open: [[${theme.config.music.bgm_open}]],
pjax: [[${theme.config.base_set.site_pjax}]], pjax: [[${theme.config.base_set.site_pjax}]],
site_logo : [[${ not #strings.isEmpty(theme.config.base_top_set.site_logo) ? theme.config.base_top_set.site_logo : '/themes/theme-pix/assets/img/avatar.png' }]], site_logo : [[${ not #strings.isEmpty(theme.config.base_top_set.site_logo) ? theme.config.base_top_set.site_logo : '/themes/theme-pix/assets/img/logo.webp' }]],
admin_des: "[(${theme.config.base_set.admin_des})]", admin_des: "[(${theme.config.base_set.admin_des})]",
site_page: "[(${theme.config.base_set.site_page})]", site_page: "[(${theme.config.base_set.site_page})]",
theme_set: "[(${theme.config.style.theme_set})]", theme_set: "[(${theme.config.style.theme_set})]",
@@ -1,5 +1,4 @@
<style th:if="${theme.config.moments.img_style == 'one'}"> <style th:if="${theme.config.moments.img_style == 'one'}">
.img_list .list_inner { .img_list .list_inner {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@@ -48,14 +47,13 @@
width: 30%; width: 30%;
margin: 2px; margin: 2px;
} }
.img_list span:nth-child(1):nth-last-child(4), .img_list span:nth-child(1):nth-last-child(4),
.img_list span:nth-child(3):nth-last-child(2), .img_list span:nth-child(3):nth-last-child(2),
.img_list span:nth-child(4):nth-last-child(1) { .img_list span:nth-child(4):nth-last-child(1) {
width: 30%; width: 30%;
} }
} }
</style> </style>
<style th:if="${theme.config.moments.img_style == 'two'}"> <style th:if="${theme.config.moments.img_style == 'two'}">
.img_list span:nth-last-child(1):first-child { .img_list span:nth-last-child(1):first-child {
@@ -137,7 +135,8 @@
grid-area: 5 / 4 / 7 / 7; grid-area: 5 / 4 / 7 / 7;
} }
.img_list .list_inner[num='5'] span:nth-child(4) img,.img_list .list_inner[num='5'] span:nth-child(5) img { .img_list .list_inner[num='5'] span:nth-child(4) img,
.img_list .list_inner[num='5'] span:nth-child(5) img {
height: 127.35px; height: 127.35px;
} }
@@ -206,7 +205,8 @@
/* 容器设置:保持 6 列网格,用于计算 1/3 和 1/2 宽度 */ /* 容器设置:保持 6 列网格,用于计算 1/3 和 1/2 宽度 */
.img_list .list_inner[num='8'] { .img_list .list_inner[num='8'] {
display: grid; display: grid;
grid-template-columns: repeat(6, 1fr); /* 6 列 */ grid-template-columns: repeat(6, 1fr);
/* 6 列 */
max-height: 100vw; max-height: 100vw;
@@ -237,11 +237,291 @@
} }
/* 确保第 1 行和第 3 行的宽度不被其他 CSS 规则干扰 */ /* 确保第 1 行和第 3 行的宽度不被其他 CSS 规则干扰 */
.img_list .list_inner[num='8'] span:nth-child(-n+3), /* 第 1, 2, 3 个 */ .img_list .list_inner[num='8'] span:nth-child(-n+3),
.img_list .list_inner[num='8'] span:nth-child(n+6) { /* 第 6, 7, 8 个 */ /* 第 1, 2, 3 个 */
.img_list .list_inner[num='8'] span:nth-child(n+6) {
/* 第 6, 7, 8 个 */
grid-column: span 2; grid-column: span 2;
} }
/* 10 张:完整矩形(6 列,3+2+2+3 */
.img_list .list_inner[num='10'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='10'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='10'] span:nth-child(4),
.img_list .list_inner[num='10'] span:nth-child(5),
.img_list .list_inner[num='10'] span:nth-child(6),
.img_list .list_inner[num='10'] span:nth-child(7) {
grid-column: span 3;
}
/* 11 张:完整矩形(6 列,2+3+3+3 */
.img_list .list_inner[num='11'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='11'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='11'] span:nth-child(1),
.img_list .list_inner[num='11'] span:nth-child(2) {
grid-column: span 3;
}
/* 13 张:完整矩形(6 列,3+2+3+2+3 */
.img_list .list_inner[num='13'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='13'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='13'] span:nth-child(4),
.img_list .list_inner[num='13'] span:nth-child(5),
.img_list .list_inner[num='13'] span:nth-child(9),
.img_list .list_inner[num='13'] span:nth-child(10) {
grid-column: span 3;
}
/* 14 张:完整矩形(6 列,3+3+2+3+3 */
.img_list .list_inner[num='14'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='14'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='14'] span:nth-child(7),
.img_list .list_inner[num='14'] span:nth-child(8) {
grid-column: span 3;
}
/* 16 张:完整矩形(6 列,3+2+3+3+2+3 */
.img_list .list_inner[num='16'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='16'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='16'] span:nth-child(4),
.img_list .list_inner[num='16'] span:nth-child(5),
.img_list .list_inner[num='16'] span:nth-child(12),
.img_list .list_inner[num='16'] span:nth-child(13) {
grid-column: span 3;
}
/* 17 张:完整矩形(6 列,2+3+2+3+2+3+2 */
.img_list .list_inner[num='17'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='17'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='17'] span:nth-child(1),
.img_list .list_inner[num='17'] span:nth-child(2),
.img_list .list_inner[num='17'] span:nth-child(6),
.img_list .list_inner[num='17'] span:nth-child(7),
.img_list .list_inner[num='17'] span:nth-child(11),
.img_list .list_inner[num='17'] span:nth-child(12),
.img_list .list_inner[num='17'] span:nth-child(16),
.img_list .list_inner[num='17'] span:nth-child(17) {
grid-column: span 3;
}
/* 19 张:完整矩形(6 列,3+3+2+3+3+2+3 */
.img_list .list_inner[num='19'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='19'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='19'] span:nth-child(7),
.img_list .list_inner[num='19'] span:nth-child(8),
.img_list .list_inner[num='19'] span:nth-child(15),
.img_list .list_inner[num='19'] span:nth-child(16) {
grid-column: span 3;
}
/* 20 张:完整矩形(6 列,3+2+3+2+3+2+3+2 */
.img_list .list_inner[num='20'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='20'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='20'] span:nth-child(4),
.img_list .list_inner[num='20'] span:nth-child(5),
.img_list .list_inner[num='20'] span:nth-child(9),
.img_list .list_inner[num='20'] span:nth-child(10),
.img_list .list_inner[num='20'] span:nth-child(14),
.img_list .list_inner[num='20'] span:nth-child(15),
.img_list .list_inner[num='20'] span:nth-child(19),
.img_list .list_inner[num='20'] span:nth-child(20) {
grid-column: span 3;
}
/* 22 张:完整矩形(6 列,3+3+2+3+3+2+3+3 */
.img_list .list_inner[num='22'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='22'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='22'] span:nth-child(7),
.img_list .list_inner[num='22'] span:nth-child(8),
.img_list .list_inner[num='22'] span:nth-child(15),
.img_list .list_inner[num='22'] span:nth-child(16) {
grid-column: span 3;
}
/* 23 张:完整矩形(6 列,3+2+3+2+3+2+3+2+3 */
.img_list .list_inner[num='23'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='23'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='23'] span:nth-child(4),
.img_list .list_inner[num='23'] span:nth-child(5),
.img_list .list_inner[num='23'] span:nth-child(9),
.img_list .list_inner[num='23'] span:nth-child(10),
.img_list .list_inner[num='23'] span:nth-child(14),
.img_list .list_inner[num='23'] span:nth-child(15),
.img_list .list_inner[num='23'] span:nth-child(19),
.img_list .list_inner[num='23'] span:nth-child(20) {
grid-column: span 3;
}
.img_list span img { .img_list span img {
aspect-ratio: 1; aspect-ratio: 1;
@@ -9,7 +9,7 @@
th:with="_cover = ${#strings.isEmpty(post.spec.cover) ? cover_img : thumbnail.gen(post.spec.cover, 's')}" th:with="_cover = ${#strings.isEmpty(post.spec.cover) ? cover_img : thumbnail.gen(post.spec.cover, 's')}"
th:data-src="${_cover}" width="50" th:data-src="${_cover}" width="50"
height="50" alt="" uk-img="" loading="lazy" height="50" alt="" uk-img="" loading="lazy"
th:src="@{/assets/img/lazyload.png}"></a> th:src="@{/assets/img/logo.webp}"></a>
</div> </div>
<div class="info nowrap"> <div class="info nowrap">
<h4 class="title nowrap"><a th:href="@{${post.status.permalink}}">[[${post.spec.title}]]</a></h4> <h4 class="title nowrap"><a th:href="@{${post.status.permalink}}">[[${post.spec.title}]]</a></h4>
+1 -1
View File
@@ -2,7 +2,7 @@
<div class="player_hand"></div> <div class="player_hand"></div>
<div class="top"> <div class="top">
<div class="left"> <div class="left">
<div class="m_cover"><img th:src="@{/assets/img/banner.jpg}"></div> <div class="m_cover"><img th:src="@{/assets/img/banner-all.webp}"></div>
<div class="m_info"> <div class="m_info">
<div class="m_tt"><h2>加载中..</h2><small>作者..</small></div> <div class="m_tt"><h2>加载中..</h2><small>作者..</small></div>
<div class="timer"><div class="current_time">00:00</div><span>/</span><div class="total_time">00:00</div></div> <div class="timer"><div class="current_time">00:00</div><span>/</span><div class="total_time">00:00</div></div>
+1 -1
View File
@@ -47,7 +47,7 @@
<i class="ri-heart-2-line"></i> <i class="ri-heart-2-line"></i>
<span th:text="${moment.stats.upvote}"></span> <span th:text="${moment.stats.upvote}"></span>
</a> </a>
<div class="pix_share_btn" th:with="_cover = ${not #strings.isEmpty(theme.config.moments.banner) ? theme.config.moments.banner : '/themes/theme-pix/assets/img/banner.jpg'}"> <div class="pix_share_btn" th:with="_cover = ${not #strings.isEmpty(theme.config.moments.banner) ? theme.config.moments.banner : '/themes/theme-pix/assets/img/banner-all.webp'}">
<a class="pix_icon share_btn_icon cr_poster" <a class="pix_icon share_btn_icon cr_poster"
th:poster-data="${moment.metadata.name}" th:poster-data="${moment.metadata.name}"
th:banner = "${_cover}" th:banner = "${_cover}"
+6 -2
View File
@@ -8,9 +8,13 @@
<th:block th:replace="~{modules/header}"/> <th:block th:replace="~{modules/header}"/>
<div id="pjax-container"> <div id="pjax-container" th:with="
page = ${#lists.isEmpty(param.page) ? 1 : param.page[0]},
tag = ${#lists.isEmpty(param.tag) ? null : param.tag[0]},
momentPage = ${#lists.isEmpty(param.page) ? moments : (#strings.isEmpty(tag) ? momentFinder.list(page, moments.size) : momentFinder.listByTag(page, moments.size, tag))}
">
<th:block th:replace="~{macro/home-moment :: home-moment(${moments},${tags})}"></th:block> <th:block th:replace="~{macro/home-moment :: home-moment(${momentPage},${tags},'/moments')}"></th:block>
</div> </div>
+14 -75
View File
@@ -7,85 +7,24 @@
<div class="page_main uk-width-2-3@m"> <div class="page_main uk-width-2-3@m">
<th:block th:replace="~{modules/header}" /> <th:block th:replace="~{modules/header}" />
<div id="pjax-container"> <div id="pjax-container" th:with="
<div class="normal_list"> page = ${#lists.isEmpty(param.page) or #strings.isEmpty(param.page[0]) ? 1 : param.page[0]},
<div class="normal_list_inner" uk-height-viewport="offset-top: true"> tag = ${#lists.isEmpty(param.tag) ? null : param.tag[0]},
groupParam = ${#lists.isEmpty(param.group) ? null : param.group[0]},
<!-- 分类导航 --> requestTag = ${not #strings.isEmpty(tag) ? tag : groupParam}
<div class="photos_cat_nav">
<ul id="cat_nav_items">
<li>
<!-- 修改:href 改为 data-href,并添加一个通用 class 如 'cat-link' -->
<a th:attr="data-href=@{/photos}"
th:classappend="${#lists.isEmpty(param.group) ? 'active' : ''}" class="cat-link">
全部<span></span>
</a>
</li>
<th:block th:each="group : ${groups}">
<li>
<!-- 修改:这里也改为 data-href -->
<a th:attr="data-href=@{|/photos?group=${group.metadata.name}|}"
th:classappend="${#lists.contains(param.group, group.metadata.name) ? 'active' : ''}"
th:text="${group.spec.displayName}" class="cat-link">
<span></span>
</a>
</li>
</th:block>
</ul>
</div>
<!-- 相册列表 -->
<div id="photos_item" class="norpost_list">
<div th:unless="${#lists.isEmpty(photos.items)}" class="gallery-photos page">
<div th:each="photo : ${photos.items}" class="gallery-photo">
<th:block th:with="
img = ${!#strings.isEmpty(photo.spec.cover) ? photo.spec.cover : photo.spec.url},
isVideo = ${#strings.endsWith(img, '.mp4') or #strings.endsWith(img, '.webm') or #strings.endsWith(img, '.ogg')}
"> ">
<th:block th:if="${#strings.isEmpty(requestTag)}">
<span th:if="${isVideo}" th:href="${img}" data-fancybox="gallery" <th:block th:with="photoPage = ${#lists.isEmpty(param.page) ? photos : photoFinder.list(page, photos.size)}">
class="fancybox video-fancybox" <th:block th:replace="~{macro/home-photos :: home-photos(${photoPage},${groups},null,null)}"></th:block>
style="position: relative; display: block; cursor: pointer;">
<video class="photo-img" preload="metadata" muted playsinline>
<source th:src="${img}" th:type="${#strings.endsWith(img, '.mp4') ? 'video/mp4' :
(#strings.endsWith(img, '.webm') ? 'video/webm' : 'video/ogg')}" />
</video>
<div
style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none;">
<i class="ri-play-circle-line play-icon"
style="color: #41b87e; font-size: 40px; background-color: rgba(255, 255, 255, 0.8); border-radius: 50%;"></i>
</div>
</span>
<span th:unless="${isVideo}" th:href="${img}" data-fancybox="gallery"
class="fancybox" th:data-thumb="${img}"
style="position: relative; display: block;">
<img class="photo-img" loading="lazy" th:src="${img}" />
</span>
</th:block> </th:block>
</div>
</div>
<!-- 空数据 -->
<th:block th:if="${#lists.isEmpty(photos.items)}">
<th:block th:replace="~{macro/tpl/content-none}" />
</th:block>
</div>
<!-- 分页 -->
<th:block th:if="${photos.hasPrevious()} or ${photos.hasNext()}">
<div id="p_pagination">
<div class="post-paging" th:if="${photos.hasNext()}">
<a th:data="@{${photos.nextUrl}}" th:text="${theme.config.base_set.site_page}"></a>
</div>
</div>
</th:block> </th:block>
</div> <th:block th:unless="${#strings.isEmpty(requestTag)}" th:each="photoGroup : ${groups}">
</div> <th:block th:if="${#strings.equals(requestTag, photoGroup.spec.displayName) or #strings.equals(requestTag, photoGroup.metadata.name)}"
th:with="photoPage = ${photoFinder.list(page, photos.size, photoGroup.metadata.name)}">
<th:block th:replace="~{macro/home-photos :: home-photos(${photoPage},${groups},${photoGroup.spec.displayName},${photoGroup.metadata.name})}"></th:block>
</th:block>
</th:block>
</div> </div>
<!-- 瀑布流自适应 --> <!-- 瀑布流自适应 -->
+2 -2
View File
@@ -12,12 +12,12 @@ spec:
name: 困困鱼 & Roozen name: 困困鱼 & Roozen
website: "https://www.halo.run/store/apps/app-TUSTB" website: "https://www.halo.run/store/apps/app-TUSTB"
description: Halo 2.x Theme PIX description: Halo 2.x Theme PIX
logo: "https://www.halo.run/upload/store-resources/theme-pix-logo.png" logo: "/themes/theme-pix/assets/img/logo.webp"
homepage: "https://www.halo.run/store/apps/app-TUSTB" homepage: "https://www.halo.run/store/apps/app-TUSTB"
issues: "https://github.com/chengzhongxue/halo-theme-pix/issues" issues: "https://github.com/chengzhongxue/halo-theme-pix/issues"
settingName: "theme-pix-setting" settingName: "theme-pix-setting"
configMapName: "theme-pix-configMap" configMapName: "theme-pix-configMap"
version: "1.2.5-3" version: "1.2.5-9"
require: ">=2.20.0" require: ">=2.20.0"
customTemplates: customTemplates:
page: page: