13 Commits

94 changed files with 3461 additions and 1588 deletions
+42
View File
@@ -2,6 +2,48 @@
> 基于原作者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 #### v1.2.5-5
1. 朋友圈支持图片显示(需同步更新插件) 1. 朋友圈支持图片显示(需同步更新插件)
2. 手机端底部导航栏新增公告未读提示 2. 手机端底部导航栏新增公告未读提示
+1 -1
View File
@@ -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>
+21 -20
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; }
@@ -207,7 +207,8 @@
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);
}; };
} }
@@ -247,4 +248,4 @@
} }
})(); })();
</script> </script>
</div> </div>
+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>`;
} }
} }
+10 -10
View File
@@ -226,17 +226,17 @@
<span class="search-icon"><i class="ri-search-line"></i></span> <span class="search-icon"><i class="ri-search-line"></i></span>
<input id="tag-search" placeholder="搜索标签..." autocomplete="off"> <input id="tag-search" placeholder="搜索标签..." autocomplete="off">
</div> </div>
<div class="tag-list"> <div class="tag-list">
<div class="tag-item" data-value="/upload/jiazai.gif">加载动画</div> <div class="tag-item" data-value="/themes/theme-pix/assets/img/loading.webp">加载动画</div>
<div class="tag-item" data-value="/upload/logo.png">网站Logo</div> <div class="tag-item" data-value="/themes/theme-pix/assets/img/logo.webp">网站Logo</div>
<div class="tag-item" data-value="/upload/jiazai.gif">加载动画</div> <div class="tag-item" data-value="/themes/theme-pix/assets/img/banner-all.webp">全部横幅</div>
<div class="tag-item" data-value="/upload/logo.png">网站Logo</div> <div class="tag-item" data-value="/upload/jiazai.gif">加载动画</div> <div class="tag-item" data-value="/themes/theme-pix/assets/img/banner-dong.webp">冬季横幅</div>
<div class="tag-item" data-value="/upload/logo.png">网站Logo</div> <div class="tag-item" data-value="/upload/jiazai.gif">加载动画</div> <div class="tag-item" data-value="/themes/theme-pix/assets/img/cover-mei.webp">封面3</div>
<div class="tag-item" data-value="/upload/logo.png">网站Logo</div> <div class="tag-item" data-value="/upload/jiazai.gif">加载动画</div> <div class="tag-item" data-value="/themes/theme-pix/assets/img/banner-init.webp">初始横幅</div>
<div class="tag-item" data-value="/upload/logo.png">网站Logo</div> <div class="tag-item" data-value="/upload/jiazai.gif">加载动画</div> <div class="tag-item" data-value="/themes/theme-pix/assets/img/sidebar-notice.webp">侧边栏通知</div>
<div class="tag-item" data-value="/upload/logo.png">网站Logo</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>
+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/*"
+14 -3
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>
@@ -19,4 +30,4 @@
</div> </div>
</th:block> </th:block>
</html> </html>
+422 -10
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);
} }
} }
@@ -405,7 +405,7 @@
.moments-title-text { .moments-title-text {
color: #111827; color: #111827;
font-size: 1.125rem; font-size: 1.1rem;
font-weight: 600; font-weight: 600;
line-height: 1.5rem; line-height: 1.5rem;
display: block; display: block;
@@ -415,7 +415,7 @@
margin-top: 0.5rem; margin-top: 0.5rem;
margin-bottom: 0; margin-bottom: 0;
color: #6b7280; color: #6b7280;
font-size: 0.875rem; font-size: 0.9rem;
line-height: 1.25rem; line-height: 1.25rem;
} }
@@ -423,7 +423,7 @@
margin-top: 1rem; margin-top: 1rem;
display: flex; display: flex;
gap: 0.75rem; gap: 0.75rem;
flex-direction: row-reverse; flex-direction: row;
} }
.moments-btn-confirm { .moments-btn-confirm {
@@ -432,8 +432,8 @@
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
background-color: #dc2626; background-color: #dc2626;
color: #ffffff; color: #ffffff;
font-size: 0.875rem; font-size: 0.9rem;
line-height: 1.5rem; line-height: 1.3rem;
font-weight: 500; font-weight: 500;
justify-content: center; justify-content: center;
border-radius: 0.375rem; border-radius: 0.375rem;
@@ -455,8 +455,8 @@
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
background-color: #ffffff; background-color: #ffffff;
color: #374151; color: #374151;
font-size: 0.875rem; font-size: 0.9rem;
line-height: 1.5rem; line-height: 1.3rem;
font-weight: 500; font-weight: 500;
justify-content: center; justify-content: center;
border-radius: 0.375rem; border-radius: 0.375rem;
@@ -582,4 +582,416 @@
transform: translateY(-120px) rotate(-8deg) scale(0.6); transform: translateY(-120px) rotate(-8deg) scale(0.6);
filter: blur(3px); 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;
+355 -65
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: 50%; 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;
@@ -6872,4 +7162,4 @@ a#listree-click.current,
font-family: 'MuYao'; font-family: 'MuYao';
src: url('/upload/mu-yao-sui-xin-shou-xie-ti.woff2') format('woff2'); src: url('/upload/mu-yao-sui-xin-shou-xie-ti.woff2') format('woff2');
font-display: swap; font-display: swap;
} }
+117 -19
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;
}
}
}
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

+27 -48
View File
@@ -9,22 +9,6 @@ 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 = '';
@@ -106,6 +90,7 @@ async function open_login_box() {
login_closeBtn.addEventListener('click', () => { login_closeBtn.addEventListener('click', () => {
closeLoading?.() closeLoading?.()
login_modal.classList.remove('show'); login_modal.classList.remove('show');
if (loginTimer) { clearInterval(loginTimer) }
}); });
// 加密逻辑 // 加密逻辑
@@ -159,8 +144,7 @@ login_loginBtn.addEventListener('click', async () => {
cocoMessage.success('署名成功,正在跳转...'); cocoMessage.success('署名成功,正在跳转...');
login_loginBtn.textContent = '跳转中...'; login_loginBtn.textContent = '跳转中...';
const currentScrollTop = window.scrollY || document.documentElement.scrollTop; const currentScrollTop = window.scrollY || document.documentElement.scrollTop;
$.cookie('scrollParam', currentScrollTop, { path: '/', domain: 'anian.cc' }); $.cookie('load_type', 'login', { path: '/' });
$.cookie('load_type', 'login', { path: '/', domain: 'anian.cc' });
window.location.reload(); window.location.reload();
} else if (finalUrl.includes('error=invalid-credential')) { } else if (finalUrl.includes('error=invalid-credential')) {
closeLoading?.() closeLoading?.()
@@ -233,8 +217,7 @@ async function customLogout() {
closeLoading(); closeLoading();
cocoMessage.success('您已成功退出登录'); cocoMessage.success('您已成功退出登录');
const currentScrollTop = window.scrollY || document.documentElement.scrollTop; const currentScrollTop = window.scrollY || document.documentElement.scrollTop;
$.cookie('scrollParam', currentScrollTop, { path: '/', domain: 'anian.cc' }); $.cookie('load_type', 'logout', { path: '/' });
$.cookie('load_type', 'logout', { path: '/', domain: 'anian.cc' });
window.location.reload(); window.location.reload();
} else { } else {
closeLoading(); closeLoading();
@@ -263,6 +246,26 @@ 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;
}
var titleOverflow = title.scrollWidth > title.clientWidth;
var contentOverflow = content.scrollHeight > content.clientHeight + 1;
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) { function openModal(title, msg, type) {
var modal = $('#momentsDeleteModal'); var modal = $('#momentsDeleteModal');
@@ -271,34 +274,10 @@ function openModal(title, msg, type) {
modal.find('.moments-message-text').text(msg); modal.find('.moments-message-text').text(msg);
card.removeClass('theme-red theme-yellow theme-green').addClass('theme-' + type); card.removeClass('theme-red theme-yellow theme-green').addClass('theme-' + type);
$('.moments-btn-cancel, .moments-btn-confirm').prop('disabled', false); $('.moments-btn-cancel, .moments-btn-confirm').prop('disabled', false);
$('body').off('click', '#momentsCancelBtn');
$('body').off('click', '#momentsConfirmBtn');
modal.fadeIn(200); modal.fadeIn(200);
} }
// 主题通用交互初始化
modify_m_bottom_music_button_link();
// = = = = = = = = = = = = = = = = 触发器 = = = = = = = = = = = = = = = =
// 集合:PJAX(初始化执行+PJAX执行)
function init_anian_pjax() {
// modify_moment_video_size();
}
// 集合:初始化(仅初始化执行一次)
function init_anian_inport() {
init_anian_pjax();
modify_m_bottom_music_button_link();
}
// PJAX监听
document.addEventListener('pjax:complete', function () {
init_anian_pjax();
})
// 入口
init_anian_inport();
+1144 -814
View File
File diff suppressed because it is too large Load Diff
+42 -42
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;
} }
@@ -204,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)
} }
@@ -280,47 +280,47 @@ window.currentDeletePid = null;
// 删除片刻文章 - 打开弹窗 // 删除片刻文章 - 打开弹窗
$('body').on('click', '.control_delete_post', function () { $('body').on('click', '.control_delete_post', function () {
window.currentDeletePid = $(this).parent().attr('pid'); window.currentDeletePid = $(this).parent().attr('pid');
openModal('删除确认', '确定删除瞬间?该条数据将被永久移除', 'red'); openModal('删除确认', '确定删除瞬间?该条数据将被永久移除', 'red');
});
// 点击取消按钮 - 关闭弹窗 // 点击取消按钮 - 关闭弹窗
$('body').on('click', '#momentsCancelDeleteBtn', function (e) { $('body').on('click', '#momentsCancelBtn', function (e) {
$('#momentsDeleteModal').fadeOut(200); $('#momentsDeleteModal').fadeOut(200);
window.currentDeletePid = null; window.currentDeletePid = null;
}); });
// 点击确认删除 - 执行 AJAX // 点击确认删除 - 执行 AJAX
$('body').on('click', '#momentsConfirmDeleteBtn', function () { $('body').on('click', '#momentsConfirmBtn', function () {
var pid = window.currentDeletePid; var pid = window.currentDeletePid;
if (!pid) return; if (!pid) return;
let closeLoading = cocoMessage.loading('正在删除...'); let closeLoading = cocoMessage.loading('正在删除...');
$('.moments-btn-cancel, .moments-btn-confirm').prop('disabled', true); $('.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",
success: function (data) { success: function (data) {
$('#momentsDeleteModal').fadeOut(200); $('#momentsDeleteModal').fadeOut(200);
closeLoading?.()
cocoMessage.success('删除成功');
window.currentDeletePid = null;
const $post = $(`#post-${pid}`);
if (!$post.length) return;
$post.addClass('moments-delete-disperse');
setTimeout(() => $post.remove(), 800);
},
error: function (request) {
if (request.status) {
closeLoading?.() closeLoading?.()
cocoMessage.error('瞬间不存在或已删除'); cocoMessage.success('删除成功');
} else { window.currentDeletePid = null;
closeLoading?.() const $post = $(`#post-${pid}`);
cocoMessage.error('删除失败'); if (!$post.length) return;
} $post.addClass('moments-delete-disperse');
console.log(request) setTimeout(() => $post.remove(), 800);
$('.moments-btn-cancel, .moments-btn-confirm').prop('disabled', false); },
}, error: function (request) {
if (request.status) {
closeLoading?.()
cocoMessage.error('瞬间不存在或已删除');
} else {
closeLoading?.()
cocoMessage.error('删除失败');
}
console.log(request)
$('.moments-btn-cancel, .moments-btn-confirm').prop('disabled', false);
},
});
}); });
}); });
@@ -539,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");
+146 -36
View File
@@ -41,38 +41,108 @@ 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() {
audiobox[0].addEventListener("play", audioplay); audiobox[0].addEventListener("play", audioplay);
@@ -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. 同步更新全局播放列表选中状态(避免后续操作信息混乱)
@@ -695,4 +805,4 @@ audiobox[0].addEventListener("pause", function () {
function syncFooterWithAudioState() { function syncFooterWithAudioState() {
var isPlaying = !!(audiobox && audiobox[0] && !audiobox[0].paused && !audiobox[0].ended); var isPlaying = !!(audiobox && audiobox[0] && !audiobox[0].paused && !audiobox[0].ended);
updateFooterMusicIcon(isPlaying); updateFooterMusicIcon(isPlaying);
} }
+162 -58
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. 转换并显示最终图片
@@ -157,7 +212,7 @@ const poster = (function() {
// 移除旧的 wrapper 并添加最终海报图 // 移除旧的 wrapper 并添加最终海报图
$container.appendChild(img); $container.appendChild(img);
// 必须先移除再调用 callback,以确保 DOM 结构干净 // 必须先移除再调用 callback,以确保 DOM 结构干净
$container.removeChild($wrapper) $container.removeChild($wrapper)
if (config.callback) { if (config.callback) {
config.callback($container) config.callback($container)
@@ -165,7 +220,9 @@ const poster = (function() {
}).catch(error => { }).catch(error => {
console.error('海报图片加载失败:', error); console.error('海报图片加载失败:', error);
// 可在此处添加错误处理,例如显示一个错误信息 // 可在此处添加错误处理,例如显示一个错误信息
$container.removeChild($wrapper); if ($wrapper.parentNode === $container) {
$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
}); });
});
$(document).on('pjax:success', function (event) {
// 清理 PJAX 残留的 modal:只删除那些在当前页面没有对应按钮的 modal
var allModals = $('[id^="share_modal_"]');
var currentPostIds = {};
// 移除 loading 动画 // 收集当前页面所有的 post_id
$(poster_box_selector + ' .loading_box').remove(); $('.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();
}
});
}); });
@@ -517,4 +621,4 @@ function handleShare(e, pic, title, pathname) {
break break
} }
} }
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;
+1 -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,6 @@ iframe[uk-cover] {
.uk-sortable-drag { .uk-sortable-drag {
position: fixed !important; position: fixed !important;
z-index: 1050 !important; z-index: 1050 !important;
width: auto !important;
pointer-events: none; pointer-events: none;
} }
+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>
+99 -61
View File
@@ -1,61 +1,99 @@
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns:th="https://www.thymeleaf.org" <html xmlns:th="https://www.thymeleaf.org"
th:replace="~{modules/layouts/layout :: layout(_head = null,_content = ~{::content},_title = ${title + ' - ' + site.title})}"> th:replace="~{modules/layouts/layout :: layout(_head = null,_content = ~{::content},_title = ${title + ' - ' + site.title})}">
<th:block th:fragment="content"> <th:block th:fragment="content">
<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="
page = ${#lists.isEmpty(param.page) or #strings.isEmpty(param.page[0]) ? 1 : param.page[0]},
<main id="primary" class="site-main"> selectedTag = ${#lists.isEmpty(param.tag) ? null : param.tag[0]},
doubanPage = ${doubanFinder.list(page, 10, selectedTag, null)}
<div class="page_content" uk-height-viewport="offset-top: true"> ">
<article class="post-276 page type-page status-publish hentry"> <div class="blog_list douban_page">
<header class="entry-header"> <div class="blog_list_inner" uk-height-viewport="offset-top: true">
<div class="left">
<i class="ri-focus-2-line"></i> <div class="friends_cat_nav douban_cat_nav">
<h1 class="entry-title" th:text="${title}"></h1> <ul id="cat_nav_items">
</div> <li>
</header> <a th:attr="data-href=@{/books}"
th:classappend="${#strings.isEmpty(selectedTag) ? 'active' : ''}"
class="cat-link">
<div class="entry-content single-content"> 全部<span></span>
<section class="db--container"> </a>
<nav class="db--nav"> </li>
<div th:each="type : ${types}" class="db--navItem JiEun" <li th:each="type : ${types}">
th:classappend="${type.key == 'movie' ? 'current' : ''}" <a th:attr="data-href=@{/books(tag=${type.key})}"
th:data-type="${type.key}" th:text="${type.key}"></div> th:classappend="${#strings.equals(selectedTag, type.key) ? 'active' : ''}"
</nav> class="cat-link">
<div class="db--genres"></div> <span th:text="${#strings.isEmpty(type.name) ? type.key : type.name}">类型</span>
<div class="db--type"> </a>
<div class="db--typeItem" data-status="mark">想看</div> </li>
<div class="db--typeItem" data-status="doing">在看</div> </ul>
<div class="db--typeItem is-active" data-status="done">看过</div> </div>
</div>
<div class="db--list db--list__card" data-type="movie"> <div id="post_item" class="moment_list douban_list">
<th:block th:each="doubanItem : ${doubanPage.items}">
</div> <th:block th:replace="~{macro/douban-item :: douban-item(${doubanItem})}"></th:block>
<div class="block-more block-more__centered"> </th:block>
<div class="lds-ripple u-hide">
</div> <th:block th:if="${#lists.isEmpty(doubanPage.items)}">
</div> <th:block th:replace="~{macro/tpl/content-none}" />
</section> </th:block>
</div>
</article> </div>
</div> <th:block th:if="${doubanPage.totalPages > 1}">
<div id="t_pagination">
</main> <div class="post-paging" th:with="_page = ${doubanPage.page + 1}">
<a th:if="${doubanPage.hasNext() and #strings.isEmpty(selectedTag)}"
</div> th:attr="data=@{/books(page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
<th:block th:replace="~{modules/footer-main}" /> <a th:if="${doubanPage.hasNext() and not #strings.isEmpty(selectedTag)}"
th:attr="data=@{/books(tag=${selectedTag},page=${_page})}"
</div> th:text="${theme.config.base_set.site_page}"></a>
</th:block> <form class="page-jump-form" method="get" action="/books">
<span class="page-jump-label">转到</span>
</html> <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>
<th:block th:replace="~{modules/footer-main}" />
</div>
</th:block>
</html>
+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
+40 -20
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,8 +41,9 @@
<div id="post_item" class="moment_list"> <div id="post_item" class="moment_list">
<div th:each="postInfo, iterstat: ${friends.items}" th:id="${'post-'+postInfo.metadata.name}" <div th:each="postInfo, iterstat: ${friendPage.items}" 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">
@@ -74,13 +78,11 @@
<!-- 图片列表 --> <!-- 图片列表 -->
<div class="img_list img-dynamic-container"> <div class="img_list img-dynamic-container">
<div class="list_inner" <div class="list_inner"
th:with="isImgList=${#strings.startsWith(spec.title, 'img:::')}" th:with="imgRaw=${spec.imageFiles},isImgList=${not #strings.isEmpty(imgRaw)}"
th:attr="num=${isImgList ? #arrays.length(#strings.substringAfter(spec.title, 'img:::').split(',')) : 0}"> th:attr="num=${isImgList ? #arrays.length(imgRaw.split(',')) : 0}">
<!-- 只有识别为图片列表时才渲染 --> <!-- 仅使用 imageFiles;字段缺失或为空时不显示图片 -->
<th:block th:if="${isImgList}"> <th:block th:if="${isImgList}">
<!-- 去掉前缀,分割数组 --> <th:block th:with="imgArray=${imgRaw.split(',')}">
<th:block
th:with="imgArray=${#strings.substringAfter(spec.title, 'img:::').split(',')}">
<th:block th:each="url : ${imgArray}" <th:block th:each="url : ${imgArray}"
th:with="cleanUrl=${#strings.trim(url)}"> th:with="cleanUrl=${#strings.trim(url)}">
<span class="fancybox mo_img" <span class="fancybox mo_img"
@@ -103,19 +105,37 @@
</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" th:if="${friends.hasNext()}"> <div class="post-paging">
<!-- 直接使用后端生成的完整 nextUrl --> <a th:if="${friendPage.hasNext()}" th:data="${friendPage.nextUrl}"
<a th:data="${friends.nextUrl}" th:text="${theme.config.base_set.site_page}"> th:text="${theme.config.base_set.site_page}"></a>
</a> <form class="page-jump-form" method="get" action="/friends">
<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="${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>
@@ -132,4 +152,4 @@
</div> </div>
</th:block> </th:block>
</html> </html>
+9 -5
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>
@@ -30,4 +34,4 @@
</div> </div>
</th:block> </th:block>
</html> </html>
+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>
+43 -11
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>
@@ -41,4 +73,4 @@
</div> </div>
</div> </div>
</div> </div>
</th:block> </th:block>
+30 -7
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>
@@ -36,4 +59,4 @@
<div id="comment_form_reset"></div> <div id="comment_form_reset"></div>
</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>
+13 -13
View File
@@ -1,5 +1,5 @@
<th:block th:fragment="footer"> <th:block th:fragment="footer">
<th:block th:with="customJsVersion='1.2.5-5'"> <th:block th:with="customJsVersion='1.2.5-9'">
<!-- 奇遇容器 --> <!-- 奇遇容器 -->
<div class="center-img-container" id="centerImgContainer"> <div class="center-img-container" id="centerImgContainer">
@@ -41,25 +41,25 @@
<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> 请注意<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>
@@ -85,15 +85,15 @@
</div> </div>
</div> </div>
<div class="moments-button-group"> <div class="moments-button-group">
<button class="moments-btn-confirm" type="button" id="momentsConfirmDeleteBtn">确认</button> <button class="moments-btn-cancel" type="button" id="momentsCancelBtn">取消</button>
<button class="moments-btn-cancel" type="button" id="momentsCancelDeleteBtn">取消</button> <button class="moments-btn-confirm" type="button" id="momentsConfirmBtn">确认</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script th:if="${pluginFinder.available('plugin-douban')}" <!-- <script th:if="${pluginFinder.available('plugin-douban')}"
th:src="@{/plugins/plugin-douban/assets/static/db.min.js(v=${customJsVersion})}" class="pjax"></script> 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>
@@ -119,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-5'}"> <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
+8 -66
View File
@@ -22,69 +22,11 @@
</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"> </a>
<div class="uk-offcanvas-bar inner" </div>
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>
</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 th:unless="${not #lists.isEmpty(topMenu)}" class="nav_tips">请前往后台设置左侧菜单/移动端菜单</div>
</div>
</div>
</div> -->
<!-- 搜索区域 --> <!-- 搜索区域 -->
<div class="search_mod"> <div class="search_mod">
@@ -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>
+3 -4
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>
@@ -68,4 +67,4 @@
</body> </body>
</html> </html>
+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>
@@ -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})]",
@@ -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}"
+7 -3
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>
@@ -19,4 +23,4 @@
</div> </div>
</th:block> </th:block>
</html> </html>
+18 -79
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}
">
<th:block th:if="${#strings.isEmpty(requestTag)}">
<th:block th:with="photoPage = ${#lists.isEmpty(param.page) ? photos : photoFinder.list(page, photos.size)}">
<th:block th:replace="~{macro/home-photos :: home-photos(${photoPage},${groups},null,null)}"></th:block>
</th:block>
</th:block>
<!-- 分类导航 --> <th:block th:unless="${#strings.isEmpty(requestTag)}" th:each="photoGroup : ${groups}">
<div class="photos_cat_nav"> <th:block th:if="${#strings.equals(requestTag, photoGroup.spec.displayName) or #strings.equals(requestTag, photoGroup.metadata.name)}"
<ul id="cat_nav_items"> th:with="photoPage = ${photoFinder.list(page, photos.size, photoGroup.metadata.name)}">
<li> <th:block th:replace="~{macro/home-photos :: home-photos(${photoPage},${groups},${photoGroup.spec.displayName},${photoGroup.metadata.name})}"></th:block>
<!-- 修改:href 改为 data-href,并添加一个通用 class 如 'cat-link' --> </th:block>
<a th:attr="data-href=@{/photos}" </th:block>
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')}
">
<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(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>
</div>
</div>
</div> </div>
<!-- 瀑布流自适应 --> <!-- 瀑布流自适应 -->
@@ -103,4 +42,4 @@
</th:block> </th:block>
</html> </html>
+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-4" version: "1.2.5-9"
require: ">=2.20.0" require: ">=2.20.0"
customTemplates: customTemplates:
page: page: