10 Commits

93 changed files with 3528 additions and 1647 deletions
+35
View File
@@ -2,6 +2,41 @@
> 基于原作者v1.2.5代码修改
#### v1.2.5-8
1. 重写作文目录、置顶样式
2. 更换(通知书等)域名
3. 修复搜索结果无法PJAX跳转(依赖搜索插件v1.7.1-1
4. 修复日记过多时无法搜索(依赖瞬间插件v1.13.1-1,基于源仓库)
5. 朋友圈内容支持搜索与跳转;大幅优化性能(依赖朋友圈插件v1.4.3-6)
6. 压缩、更换图片
7. 模板端全面支持page与tag参数(常驻显示,同步新增向上翻阅功能)
8. 取消自动恢复源内容功能
9. 前台编辑、发布日记将采用PJAX更新
10. 手机端播放器新增进度条
11. 抽象重复代码至函数、清理无效代码
12. 当前激活的标签将在导航栏中居中显示
13. 优化不同宽度下的显示效果
14. 重构分享海报布局
#### v1.2.5-7
1. 适配新接口(基于新版API-Python)
2. 更新附录页面、通知书页面
3. 朋友圈将不再显示内容为空的条目
4. 修复图文片刻中媒体库及拖拽时的图片样式
5. 修改灯箱相关UI颜色
6. 重写课外书分类获取逻辑(依赖豆瓣插件v1.2.2-2)
#### v1.2.5-6
1. 重构课外书页面
2. 音乐、背景、侧边栏等适配新接口(基于API-Python)
3. 修复分享海报空白、模态框失效等异常
#### v1.2.5-5
1. 朋友圈支持图片显示(需同步更新插件)
2. 手机端底部导航栏新增公告未读提示
3. 更新通讯录、储物柜
4. 优化操作提示、图片排版
#### v1.2.5-4
1. 修复侧边栏测速异常、拖拽片刻图片异常、手机端文章目录异常、页面提示异常
2. 优化多种场景下的提示、衔接、样式
+8 -8
View File
@@ -299,7 +299,7 @@
<div class="people-grid">
<div class="person">
<div class="avatar">
<img src="/upload/8aea7800gy1i2vfbxoqhdj24w07c0b2p.jpg">
<img src="/upload/20260416214530_191_129.jpg">
</div>
<div class="info">
<p class="name">黄诗扶</p>
@@ -310,18 +310,18 @@
</div>
<div class="person">
<div class="avatar">
<img src="/upload/ec39c62fly1i3rextah4gj22dc35s1ky.jpg">&nbsp;
<img src="/upload/20260416213611_190_129.jpg">
</div>
<div class="info">
<p class="name">双笙</p>
<p class="bio">
什么?你问我为什么喜欢包包?可能因为是青春吧?
什么?你问我为什么喜欢包包?可能因为是青春吧?
</p>
</div>
</div>
<div class="person">
<div class="avatar">
<img src="/upload/005Jyswjgy1hywx7z7sb7j30zk1betbd.jpg">
<img src="/upload/005Jyswjgy1ic7xfxtlu8j33402c0npe.jpg">
</div>
<div class="info">
<p class="name">浅影阿</p>
@@ -332,12 +332,12 @@
</div>
<div class="person">
<div class="avatar">
<img src="/upload/ab0efe4ely1hnpfzqqw1oj23ls5eoqvg.jpg">
<img src="/upload/67f2efd2gy1i8iv8nkuqjj23344mokjp.jpg">
</div>
<div class="info">
<p class="name">平生不晚</p>
<p class="name">玄觞</p>
<p class="bio">
首先是戏腔好听,然后是妆造好看,最后就来到了这里
你们古风圈,怎么都喊女生王子,喊男生二婶呢?
</p>
</div>
</div>
@@ -367,7 +367,7 @@
<div class="person mystery-person">
<div class="avatar">
<img src="/upload/logo.png">
<img src="/themes/theme-pix/assets/img/logo.webp">
</div>
<div class="info">
<p class="name">敬请期待</p>
+39 -39
View File
@@ -14,11 +14,11 @@
<!-- 封面:像 2026 一样两个独立卡片 -->
<div class="yg-2025-hero-row">
<div class="yg-2025-hero">
<img src="/upload/2025-0-1.png">
<img src="/upload/2025-0-1.jpg">
</div>
<div class="yg-2025-hero">
<img src="/upload/2025-0-2.png">
<img src="/upload/2025-0-2.jpg">
</div>
</div>
@@ -27,63 +27,63 @@
<div class="yg-grid-2025-3col">
<div class="yg-card">
<img src="/upload/2025-1-1.png">
<img src="/upload/2025-1-2.png">
<img src="/upload/2025-1-1.jpg">
<img src="/upload/2025-1-2.jpg">
</div>
<div class="yg-card">
<img src="/upload/2025-2-1.png">
<img src="/upload/2025-2-2.png">
<img src="/upload/2025-2-1.jpg">
<img src="/upload/2025-2-2.jpg">
</div>
<div class="yg-card">
<img src="/upload/2025-3-1.png">
<img src="/upload/2025-3-2.png">
<img src="/upload/2025-3-1.jpg">
<img src="/upload/2025-3-2.jpg">
</div>
<div class="yg-card">
<img src="/upload/2025-4-1.png">
<img src="/upload/2025-4-2.png">
<img src="/upload/2025-4-1.jpg">
<img src="/upload/2025-4-2.jpg">
</div>
<div class="yg-card">
<img src="/upload/2025-5-1.png">
<img src="/upload/2025-5-2.png">
<img src="/upload/2025-5-1.jpg">
<img src="/upload/2025-5-2.jpg">
</div>
<div class="yg-card">
<img src="/upload/2025-6-1.png">
<img src="/upload/2025-6-2.png">
<img src="/upload/2025-6-1.jpg">
<img src="/upload/2025-6-2.jpg">
</div>
<div class="yg-card">
<img src="/upload/2025-7-1.png">
<img src="/upload/2025-7-2.png">
<img src="/upload/2025-7-1.jpg">
<img src="/upload/2025-7-2.jpg">
</div>
<div class="yg-card">
<img src="/upload/2025-8-1.png">
<img src="/upload/2025-8-2.png">
<img src="/upload/2025-8-1.jpg">
<img src="/upload/2025-8-2.jpg">
</div>
<div class="yg-card">
<img src="/upload/2025-9-1.png">
<img src="/upload/2025-9-2.png">
<img src="/upload/2025-9-1.jpg">
<img src="/upload/2025-9-2.jpg">
</div>
<div class="yg-card">
<img src="/upload/2025-10-1.png">
<img src="/upload/2025-10-2.png">
<img src="/upload/2025-10-1.jpg">
<img src="/upload/2025-10-2.jpg">
</div>
<div class="yg-card">
<img src="/upload/2025-11-1.png">
<img src="/upload/2025-11-2.png">
<img src="/upload/2025-11-1.jpg">
<img src="/upload/2025-11-2.jpg">
</div>
<div class="yg-card">
<img src="/upload/2025-12-1.png">
<img src="/upload/2025-12-2.png">
<img src="/upload/2025-12-1.jpg">
<img src="/upload/2025-12-2.jpg">
</div>
</div>
@@ -103,24 +103,24 @@
</div>
<div class="yg-hero">
<img src="/upload/2026-0.png">
<img src="/upload/2026-0.jpg">
</div>
</div>
<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-2.png"></div>
<div class="yg-2026-month"><img src="/upload/2026-3.png"></div>
<div class="yg-2026-month"><img src="/upload/2026-4.png"></div>
<div class="yg-2026-month"><img src="/upload/2026-5.png"></div>
<div class="yg-2026-month"><img src="/upload/2026-6.png"></div>
<div class="yg-2026-month"><img src="/upload/2026-7.png"></div>
<div class="yg-2026-month"><img src="/upload/2026-8.png"></div>
<div class="yg-2026-month"><img src="/upload/2026-9.png"></div>
<div class="yg-2026-month"><img src="/upload/2026-10.png"></div>
<div class="yg-2026-month"><img src="/upload/2026-11.png"></div>
<div class="yg-2026-month"><img src="/upload/2026-12.png"></div>
<div class="yg-2026-month"><img src="/upload/2026-1.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-2.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-3.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-4.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-5.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-6.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-7.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-8.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-9.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-10.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-11.jpg"></div>
<div class="yg-2026-month"><img src="/upload/2026-12.jpg"></div>
</div>
+22 -20
View File
@@ -104,6 +104,19 @@
</div>
</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">
<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>
@@ -112,12 +125,12 @@
<i class="ri-file-list-3-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>
<p style="color: #36A28E; font-size: 13px; margin: 0; opacity: 0.8;">决胜千里之外</p>
</div>
</div>
</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="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;">
@@ -130,7 +143,7 @@
</div>
</a>
<a href="#" target="_self">
<a href="books" 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;">
@@ -138,20 +151,7 @@
<i class="ri-door-open-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="#" 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>
<p style="color: #36A28E; font-size: 13px; margin: 0; opacity: 0.8;">记忆中的锚点</p>
</div>
</div>
</a>
@@ -199,14 +199,16 @@
if (isUnread) {
typeof initNoticeTip === 'function' && initNoticeTip();
noticeCard.querySelector('.notice-title').textContent = `通知书`;
noticeCard.querySelector('.notice-desc').textContent = `有新通知待查看`;
$('.footer_menu a[href="/navigator"]').css('color', '#ecc94b').find('i').css('color', '#ecc94b');
noticeCard.querySelector('.notice-title').textContent = '通知书';
noticeCard.querySelector('.notice-desc').textContent = '有新通知待查看';
noticeCard.classList.add('notice-unread');
if(decorCircle) decorCircle.style.background = '#fef3c7';
const noticeLink = noticeCard.closest('a');
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);
};
}
+4 -4
View File
@@ -16,8 +16,8 @@
<div id="calendar-2025-global-blur"></div>
<div id="calendar-2025-intro">
<div id="calendar-2025-intro-mask"></div>
<img id="calendar-2025-intro-img1" src="/upload/2025-0-1.png">
<img id="calendar-2025-intro-img2" src="/upload/2025-0-2.png">
<img id="calendar-2025-intro-img1" src="/upload/2025-0-1.jpg">
<img id="calendar-2025-intro-img2" src="/upload/2025-0-2.jpg">
</div>
<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;">
@@ -112,8 +112,8 @@
const monthImg2 = document.getElementById("calendar-2025-month-2");
const month = new Date().getMonth() + 1;
monthImg1.src = `/upload/2025-${month}-1.png`;
monthImg2.src = `/upload/2025-${month}-2.png`;
monthImg1.src = `/upload/2025-${month}-1.jpg`;
monthImg2.src = `/upload/2025-${month}-2.jpg`;
const waitImages = imgs => new Promise(res => {
let loaded = 0;
+2 -2
View File
@@ -15,7 +15,7 @@
<div id="calendar-2026-global-blur"></div>
<div id="calendar-2026-intro">
<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>
<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;">
@@ -94,7 +94,7 @@
const monthImg = document.getElementById('calendar-2026-month');
const month = new Date().getMonth() + 1;
monthImg.src = `/upload/2026-${month}.png`;
monthImg.src = `/upload/2026-${month}.jpg`;
container.style.height = "100vh";
+90 -12
View File
@@ -1,25 +1,98 @@
<div id="anian-update-wrapper-2026" class="anian-feed-root-container">
<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-loading">加载中...</div>
</div>
</div>
<div class="anian-feed-card" data-rss-url="https://git.anian.cc/anian/halo-plugin-friends/releases.rss">
<h3 class="anian-feed-caption">朋友圈插件更新</h3>
<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>
<div class="anian-feed-list-box">
<div class="anian-loading">加载中...</div>
</div>
</div>
<div class="anian-feed-card" data-rss-url="https://git.anian.cc/anian/halo-theme-pix/releases.rss">
<h3 class="anian-feed-caption">主题更新</h3>
<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>
<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-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>
@@ -41,9 +114,8 @@
}
.anian-feed-card {
flex: 1;
min-width: 320px;
/* 优化最小宽度 */
flex: 0 0 calc((100% - 24px) / 2);
max-width: calc((100% - 24px) / 2);
background: #ffffff;
border: 1px solid #e1f3d8;
border-radius: 12px;
@@ -55,6 +127,11 @@
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.anian-feed-card:first-child {
flex-basis: 100%;
max-width: 100%;
}
.anian-feed-caption {
margin: 0;
@@ -70,7 +147,7 @@
}
.anian-feed-list-box {
max-height: 380px;
max-height: 250px;
/* 优化高度 */
overflow-y: auto;
padding: 0;
@@ -197,7 +274,8 @@
}
.anian-feed-card {
min-width: 100%;
flex: 0 0 100%;
max-width: 100%;
}
.anian-feed-caption {
@@ -264,7 +342,7 @@
listBox.innerHTML = htmlContent || '<div style="color:#999;">暂无更新内容</div>';
} catch (error) {
listBox.innerHTML = `<div style="color:#f56c6c;font-size:14px;">请求失败: ${error.message}</div>`;
listBox.innerHTML = `<div style="color:#f56c6c;font-size:14px;">失败:超时或发生错误</div>`;
}
}
+113 -88
View File
@@ -3,7 +3,6 @@
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Inter", "Microsoft YaHei", Arial;
}
.store {
@@ -13,7 +12,7 @@
--danger: #E74C3C;
--bg: #F9FFFB;
--shadow: 0 12px 30px rgba(80, 200, 120, .12);
--radius: 18px;
--radius: 8px;
padding: 26px 14px;
background: var(--bg);
}
@@ -59,7 +58,7 @@
#tag-search {
width: 100%;
padding: 7px 12px 7px 34px;
border-radius: 10px;
border-radius: 8px;
border: 1px solid #c9efd6;
outline: none;
background: #fafffb;
@@ -79,7 +78,7 @@
flex-wrap: wrap;
gap: 8px;
padding: 8px;
border-radius: 12px;
border-radius: 8px;
border: 1px solid #c9efd6;
background: rgba(144, 238, 144, .08);
max-height: 100px;
@@ -89,7 +88,7 @@
.store .tag-item {
padding: 5px 7px;
border-radius: 9px;
border-radius: 8px;
border: 1px solid #90ee90;
font-size: 12px;
cursor: pointer;
@@ -107,31 +106,66 @@
.store .no-result {
width: 100%;
text-align: center;
align-items: center;
justify-content: center;
color: #7f8c8d;
font-size: 13px;
padding: 8px 0;
min-height: 100%;
padding: 0;
display: none;
}
/* 输入框 */
.store .input-group {
display: flex;
gap: 10px;
gap: 8px;
margin: 16px 0;
align-items: center;
}
.store .section-divider {
position: relative;
height: 18px;
margin: 6px 0 14px;
}
.store .section-divider::before {
content: "";
position: absolute;
top: 50%;
left: 0;
width: 100%;
height: 1px;
transform: translateY(-50%);
background: linear-gradient(90deg, rgba(80, 200, 120, 0), rgba(80, 200, 120, .55), rgba(80, 200, 120, 0));
box-shadow: 0 1px 0 rgba(80, 200, 120, .12);
}
.store .section-divider::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: 10px;
height: 10px;
transform: translate(-50%, -50%) rotate(45deg);
border-radius: 2px;
background: linear-gradient(135deg, #90ee90, #50c878);
box-shadow: -14px 0 0 -3px rgba(80, 200, 120, .5), 14px 0 0 -3px rgba(80, 200, 120, .5), 0 0 0 2px #ffffff;
}
#file-path {
flex: 1;
padding: 8px 14px;
border-radius: 12px;
border-radius: 8px;
border: 2px solid #e8f7ec;
font-size: 14px;
outline: none;
}
#submit-btn {
padding: 10px;
border-radius: 12px;
padding: 10px 20px;
border-radius: 8px;
border: none;
background: linear-gradient(135deg, #50c878, #3a9156);
color: #fff;
@@ -139,17 +173,6 @@
cursor: pointer;
}
/* 底部提示(改成浅黄色系) */
.store .tips {
font-size: 12px;
text-align: center;
color: #a97400;
padding: 8px;
border-radius: 8px;
background: rgba(255, 215, 0, .12);
border: 1px solid rgba(243, 156, 18, .25);
}
/* 手机端 */
@media(max-width:520px) {
.store {
@@ -166,7 +189,8 @@
}
.store .input-group {
flex-direction: column
flex-direction: column;
align-items: stretch;
}
#submit-btn {
@@ -176,34 +200,11 @@
.store .tag-list {
max-height: 120px
}
}
/* Toast */
.custom-toast {
position: fixed;
top: 26px;
left: 50%;
transform: translateX(-50%) translateY(-80px);
background: #2ECC71;
color: #fff;
padding: 12px 20px;
border-radius: 10px;
transition: .4s;
opacity: 0;
z-index: 9999;
#file-path {
width: 100%;
box-sizing: border-box;
}
.toast-show {
transform: translateX(-50%) translateY(0);
opacity: 1
}
.toast-error {
background: #E74C3C
}
.toast-warning {
background: #F39C12
}
</style>
@@ -211,58 +212,55 @@
<div class="container">
<div class="top-bar"></div>
<h1 class="title">Anian的储物柜</h1>
<h1 class="title">储物柜</h1>
<div class="input-group">
<input id="file-path" placeholder="请输入翻找目标..." autocomplete="off">
<button id="submit-btn">翻 找</button>
</div>
<div class="section-divider" aria-hidden="true"></div>
<div class="tag-container">
<div class="tag-search-wrapper">
<span class="search-icon">🔍</span>
<input id="tag-search" placeholder="搜索标签">
<span class="search-icon"><i class="ri-search-line"></i></span>
<input id="tag-search" placeholder="搜索标签..." autocomplete="off">
</div>
<div class="tag-list">
<div class="tag-item" data-value="test.zip">测试压缩包</div>
<div class="tag-item" data-value="docs/report.pdf">示例报告</div>
<div class="tag-item" data-value="images/banner.jpg">横幅图片</div>
<div class="tag-item" data-value="software/setup.exe">安装程序</div>
<div class="tag-item" data-value="/themes/theme-pix/assets/img/loading.webp">加载动画</div>
<div class="tag-item" data-value="/themes/theme-pix/assets/img/logo.webp">网站Logo</div>
<div class="tag-item" data-value="/themes/theme-pix/assets/img/banner-all.webp">全部横幅</div>
<div class="tag-item" data-value="/themes/theme-pix/assets/img/banner-dong.webp">冬季横幅</div>
<div class="tag-item" data-value="/themes/theme-pix/assets/img/cover-mei.webp">封面3</div>
<div class="tag-item" data-value="/themes/theme-pix/assets/img/banner-init.webp">初始横幅</div>
<div class="tag-item" data-value="/themes/theme-pix/assets/img/sidebar-notice.webp">侧边栏通知</div>
<div class="tag-item" data-value="/themes/theme-pix/assets/img/cover-song.webp">封面1</div>
<div class="tag-item" data-value="/themes/theme-pix/assets/img/sidebar-quote.webp">侧边栏引用</div>
<div class="tag-item" data-value="/themes/theme-pix/assets/img/cover-zhu.webp">封面2</div>
<div class="no-result" id="noResult">没有匹配的结果</div>
</div>
</div>
<div class="input-group">
<input id="file-path" placeholder="请输入路径" autocomplete="off">
<button id="submit-btn">访问 / 下载</button>
</div>
<p class="tips">⚠️ 错误过多将可能被封禁</p>
</div>
<div class="custom-toast" id="customToast"></div>
</div>
<script>
function initializeStoreEvents() {
let closeLoading = null;
const container = document.querySelector(".store");
if (!container || container.dataset.init === "1") return;
container.dataset.init = "1";
const input = document.getElementById('file-path');
const btn = document.getElementById('submit-btn');
const toast = document.getElementById('customToast');
const tagItems = document.querySelectorAll('.tag-item');
const tagSearch = document.getElementById('tag-search');
const noResult = document.getElementById('noResult');
function showToast(msg, type = 'warning') {
toast.textContent = msg;
toast.className = 'custom-toast toast-' + type + ' toast-show';
setTimeout(() => toast.classList.remove('toast-show'), 2600);
}
tagItems.forEach(t => {
t.onclick = () => {
input.value = t.dataset.value;
showToast('已填入 ' + t.dataset.value, 'success');
cocoMessage.success('已填入对应标签信息');
};
});
@@ -277,39 +275,66 @@
if (show) visible++;
});
noResult.style.display = visible === 0 ? 'block' : 'none';
noResult.style.display = visible === 0 ? 'flex' : 'none';
};
function check(url) {
return new Promise(r => {
const xhr = new XMLHttpRequest();
try {
xhr.open('HEAD', url, true);
} catch (e) {
r(0);
return;
}
xhr.timeout = 5000;
xhr.onload = () => r(xhr.status === 200);
xhr.onerror = () => r(false);
xhr.ontimeout = () => r(false);
xhr.onload = () => r(xhr.status);
xhr.onerror = () => r(0);
xhr.ontimeout = () => r(0);
xhr.send();
});
}
function normalizeDestination(value) {
const trimmed = value.trim();
if (!trimmed || /\\/.test(trimmed)) return null;
const url = trimmed.charAt(0) === '/' ? trimmed : '/' + trimmed;
if (/^\/\//.test(url)) return null;
return url;
}
async function go() {
const v = input.value.trim();
if (!v) return showToast('请输入路径');
const url = '/' + v;
btn.textContent = '检测中...';
if (!v) return cocoMessage.warning('请输入翻找目标');
const url = normalizeDestination(v);
if (!url) return cocoMessage.warning('翻找目标无效');
btn.textContent = '翻找中...';
closeLoading = cocoMessage.loading('正在翻找中,请稍候...');
btn.disabled = true;
const ok = await check(url);
if (ok) {
showToast('资源存在,跳转中', 'success');
setTimeout(() => location.href = url, 700);
} else showToast('资源不存在', 'error');
setTimeout(() => { btn.textContent = '访问 / 下载'; btn.disabled = false }, 700);
try {
const status = await check(url);
if (status === 200) {
cocoMessage.success('翻找成功,即将打开目标页面');
window.open(url, '_blank');
} else if (status === 404) {
cocoMessage.warning('翻找失败,失败过多将被封禁');
} else {
cocoMessage.error('翻找异常,请重试或刷新页面');
}
} finally {
closeLoading?.();
closeLoading = null;
btn.textContent = '翻 找';
btn.disabled = false;
}
}
btn.onclick = go;
input.onkeydown = e => { if (e.key === 'Enter') go(); };
}
document.addEventListener("DOMContentLoaded", initializeStoreEvents);
document.addEventListener("pjax:complete", initializeStoreEvents);
initializeStoreEvents();
</script>
+9 -9
View File
@@ -1,18 +1,18 @@
<div class="nav4lite-section">
<div class="nav4lite-grid">
<a href="/" class="nav4lite-item">
<span class="nav4lite-label">课外书</span>
<a href="/address" class="nav4lite-item">
<span class="nav4lite-label">通讯录</span>
</a>
<a href="/friends" class="nav4lite-item">
<span class="nav4lite-label">朋友圈</span>
</a>
<a href="/docs" class="nav4lite-item" target="_blank">
<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
<a href="/navigator" class="nav4lite-center-dot"><i
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>
+1 -1
View File
@@ -11,6 +11,6 @@
<div class="subscribe-divider"></div>
<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>
+1 -1
View File
@@ -1,5 +1,5 @@
<div class="anian-lunar-date-widget">
<div class="anian-lunar-date-text" id="anianLunarText">
一日不见如隔三秋
一日不见 · 如隔三秋
</div>
</div>
+3 -3
View File
@@ -1,8 +1,8 @@
<div class="anianx-wrap">
<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 anianx-right" data-anianx-type="sub" data-anianx-href="https://www.anian.cc">副线路</button>
<div class="anianx-bubble" id="anianxBubble"><span id="anianxBubbleText" class="anianx-loading">当前线路检测中</span></div>
<button class="anianx-btn anianx-right" data-anianx-type="sub">歇后语</button>
<div class="anianx-bubble" id="anianxBubble"><span id="anianxBubbleText">一日不见 · 如隔三秋</span></div>
</div>
</div>
+12 -12
View File
@@ -10,7 +10,7 @@ spec:
- $formkit: attachment
name: favicon
label: favicon
value: /themes/theme-pix/assets/img/favicon.ico
value: /themes/theme-pix/assets/img/logo.webp
help: 建议制作一张400x400的png图像, 然后等比缩小到你想转换的ico尺寸,最后通过网上的工具转换成ico图标格式.
- $formkit: menuRadio
name: left_nav
@@ -48,7 +48,7 @@ spec:
- $formkit: attachment
name: default_avatar
label: 博主头像
value: /themes/theme-pix/assets/img/avatar.png
value: /themes/theme-pix/assets/img/logo.webp
- group: base_top_set
label: 顶部设置
@@ -56,7 +56,7 @@ spec:
- $formkit: attachment
name: site_logo
label: 常规LOGO
value: /themes/theme-pix/assets/img/avatar.png
value: /themes/theme-pix/assets/img/logo.webp
- $formkit: number
name: logo_height
label: 常规LOGO高度尺寸
@@ -66,11 +66,11 @@ spec:
name: m_site_logo
label: 方形LOGO
help: 建议制作一张48*48的方形LOGO
value: /themes/theme-pix/assets/img/avatar.png
value: /themes/theme-pix/assets/img/logo.webp
- $formkit: attachment
name: mobile_logo
label: 移动端LOGO
value: /themes/theme-pix/assets/img/avatar.png
value: /themes/theme-pix/assets/img/logo.webp
- $formkit: checkbox
name: top_nav_on_web
id: top_nav_on_web
@@ -316,7 +316,7 @@ spec:
- $formkit: attachment
name: topbg_banner
label: 顶部封面图
value: /themes/theme-pix/assets/img/banner.jpg
value: /themes/theme-pix/assets/img/banner-all.webp
- $formkit: radio
name: home_post_type
label: 首页类型模式
@@ -425,7 +425,7 @@ spec:
if: $get(donate_on).value
name: donate_pic
label: 打赏二维码
value: /themes/theme-pix/assets/img/avatar.png
value: /themes/theme-pix/assets/img/logo.webp
- group: moments
label: 瞬间设置
@@ -451,7 +451,7 @@ spec:
- $formkit: attachment
name: banner
label: 瞬间分享背景
value: /themes/theme-pix/assets/img/banner.jpg
value: /themes/theme-pix/assets/img/banner-all.webp
- $formkit: attachmentPolicySelect
name: attachmentPolicy
label: 附件存储策略
@@ -763,7 +763,7 @@ spec:
label: 一言
value:
title: 一言
yiyan_bg: /themes/theme-pix/assets/img/banner.jpg
yiyan_bg: /themes/theme-pix/assets/img/banner-all.webp
children:
- $formkit: text
name: title
@@ -870,11 +870,11 @@ spec:
- $formkit: attachment
name: land_logo
label: LOGO或头像
value: /themes/theme-pix/assets/img/avatar.png
value: /themes/theme-pix/assets/img/logo.webp
- $formkit: attachment
name: land_feature
label: 封面头图
value: /themes/theme-pix/assets/img/landimg.jpg
value: /themes/theme-pix/assets/img/logo.webp
- $formkit: text
name: land_title
label: 标题或名称
@@ -938,7 +938,7 @@ spec:
- $formkit: attachment
name: custom_login_background
label: 背景图
value: /themes/theme-pix/assets/img/default-header.png
value: /themes/theme-pix/assets/img/banner-all.webp
accepts:
- "image/*"
+13 -2
View File
@@ -8,9 +8,20 @@
<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>
+251 -9
View File
@@ -45,13 +45,13 @@
@media (min-width: 960px) and (max-width: 1359.98px) {
.listree-box {
margin-left: calc((100vw - 860px) / 2 + 284px);
margin-left: calc((100vw - 860px) / 2 + 284px + 50px);
}
}
@media (min-width: 1360px) {
.listree-box {
margin-left: calc((100vw - 1400px) / 2 + 291px);
margin-left: calc((100vw - 1400px) / 2 + 291px + 50px);
}
}
@@ -405,7 +405,7 @@
.moments-title-text {
color: #111827;
font-size: 1.125rem;
font-size: 1.1rem;
font-weight: 600;
line-height: 1.5rem;
display: block;
@@ -415,7 +415,7 @@
margin-top: 0.5rem;
margin-bottom: 0;
color: #6b7280;
font-size: 0.875rem;
font-size: 0.9rem;
line-height: 1.25rem;
}
@@ -423,7 +423,7 @@
margin-top: 1rem;
display: flex;
gap: 0.75rem;
flex-direction: row-reverse;
flex-direction: row;
}
.moments-btn-confirm {
@@ -432,8 +432,8 @@
padding: 0.5rem 1rem;
background-color: #dc2626;
color: #ffffff;
font-size: 0.875rem;
line-height: 1.5rem;
font-size: 0.9rem;
line-height: 1.3rem;
font-weight: 500;
justify-content: center;
border-radius: 0.375rem;
@@ -455,8 +455,8 @@
padding: 0.5rem 1rem;
background-color: #ffffff;
color: #374151;
font-size: 0.875rem;
line-height: 1.5rem;
font-size: 0.9rem;
line-height: 1.3rem;
font-weight: 500;
justify-content: center;
border-radius: 0.375rem;
@@ -583,3 +583,245 @@
filter: blur(3px);
}
}
#douban_pagination {
display: none;
padding: 30px;
text-align: center;
align-items: center;
justify-content: center;
border-top: 1px solid var(--pix-background);
}
#douban_pagination .post-paging {
display: flex;
align-items: center;
justify-content: center;
min-height: 38px;
}
#douban_pagination a {
padding: 10px 15px;
background: var(--pix-theme);
color: #fff;
border-radius: 8px;
display: inline-flex;
align-items: center;
justify-content: center;
flex: none;
width: auto;
text-align: center;
}
#douban_pagination .douban-more-loading {
display: inline-flex;
align-items: center;
justify-content: center;
}
.douban_page #douban_item {
padding: 0;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
column-gap: 0;
row-gap: 0;
align-items: center;
}
.douban_page #douban_item .loading_box {
text-align: center;
grid-column: 1 / -1;
}
.douban_page #douban_item .douban_card_item {
width: 100%;
margin: 0;
padding: 0 40px;
border-right: 1px solid #e5e7eb;
display: flex;
align-items: flex-start;
}
.douban_page #douban_item .douban_card_item:nth-child(2n) {
border-right: none;
}
.douban_page #douban_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 #douban_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 #douban_item {
align-items: stretch !important;
}
.douban_page #douban_item .douban_poster_link,
.douban_page #douban_item .douban_poster_img {
width: 100px;
}
.douban_page #douban_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 #douban_item .douban_rating_wrap {
display: none;
}
.douban_page #douban_item .douban_text_col {
display: contents;
}
.douban_page #douban_item .douban_title_row {
grid-column: 1 / -1;
grid-row: 1;
margin-bottom: 6px;
text-align: left;
}
.douban_page #douban_item .douban_title_text {
color: var(--pix-theme);
font-size: 16px;
line-height: 1.35;
font-weight: 650;
text-decoration: none;
}
.douban_page #douban_item .douban_title_text:hover {
color: rgb(28, 156, 90);
}
.douban_page #douban_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 #douban_item .douban_time_text {
display: inline-block;
padding: 3px 8px;
border-radius: 6px;
background: rgba(168, 85, 247, 0.12);
color: #a855f7;
font-size: 12px;
line-height: 1.4;
font-weight: 500;
margin-right: 7px;
}
.douban_page #douban_item .douban_type_badge {
display: inline-block;
padding: 3px 8px;
border-radius: 6px;
background: rgba(56, 189, 248, 0.14);
color: #0369a1;
font-size: 12px;
line-height: 1.4;
vertical-align: middle;
font-weight: 500;
margin-right: 7px;
}
.douban_page #douban_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 #douban_item .douban_content_box {
color: #374151;
grid-column: 2;
grid-row: 3;
align-self: start;
}
.douban_page #douban_item .douban_content_main {
margin: 0;
font-size: 14px;
line-height: 1.6;
color: #1f2937;
display: block;
overflow: hidden;
max-height: 89.6px;
transition: max-height 0.35s ease;
will-change: max-height;
}
.douban_page #douban_item .douban_content_main.is-expanded {
max-height: 10000px;
}
.douban_page #douban_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 #douban_item .douban_content_meta {
margin: 8px 0 0;
font-size: 12px;
color: #6b7280;
line-height: 1.5;
}
@media only screen and (max-width:1359px) {
.douban_page #douban_item {
grid-template-columns: 1fr;
}
.douban_page #douban_item .douban_card_item {
border-right: none !important;
}
}
@media only screen and (max-width:540px) {
.douban_page #douban_item .douban_card_item {
padding: 0 15px;
}
.douban_page #douban_item .douban_card_inner {
column-gap: 11px;
row-gap: 0px;
}
}
+41
View File
@@ -129,6 +129,47 @@
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{
background: var(--dark-border);
color: #666;
+191 -62
View File
@@ -124,7 +124,7 @@ header#masthead {
}
.top_logo {
padding: 20px 40px;
padding: 0px;
text-align: center;
}
@@ -313,6 +313,40 @@ header#masthead {
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 {
bottom: 5%;
top: auto;
@@ -1334,6 +1368,7 @@ a.close_local {
.moment_cat_nav,
.posts_cat_nav,
.photos_cat_nav,
.douban_cat_nav,
.friends_cat_nav {
padding: 25px 40px;
border-bottom: 1px solid var(--pix-background);
@@ -1342,6 +1377,7 @@ a.close_local {
.moment_cat_nav ul,
.posts_cat_nav ul,
.photos_cat_nav ul,
.douban_cat_nav ul,
.friends_cat_nav ul {
display: flex;
align-items: center;
@@ -1356,6 +1392,7 @@ a.close_local {
.moment_cat_nav ul li,
.posts_cat_nav ul li,
.photos_cat_nav ul li,
.douban_cat_nav ul li,
.friends_cat_nav ul li {
list-style: none;
flex: none;
@@ -1364,6 +1401,7 @@ a.close_local {
.moment_cat_nav ul::-webkit-scrollbar,
.posts_cat_nav ul::-webkit-scrollbar,
.photos_cat_nav ul::-webkit-scrollbar,
.douban_cat_nav ul::-webkit-scrollbar,
.friends_cat_nav ul::-webkit-scrollbar {
display: none;
@@ -1374,6 +1412,7 @@ a.close_local {
.moment_cat_nav ul li a,
.posts_cat_nav ul li a,
.photos_cat_nav ul li a,
.douban_cat_nav ul li a,
.friends_cat_nav ul li a {
padding: 5px 10px;
background: #e1e9e5;
@@ -1388,6 +1427,7 @@ a.close_local {
.moment_cat_nav ul li a:hover,
.posts_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 {
background-color: var(--pix-theme);
color: #fff !important;
@@ -1396,6 +1436,7 @@ a.close_local {
.moment_cat_nav ul li a.active,
.posts_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 {
background: var(--pix-theme);
color: #fff !important;
@@ -1403,7 +1444,8 @@ a.close_local {
#t_pagination,
#pagination,
#p_pagination {
#p_pagination,
#prev_pagination {
padding: 30px;
text-align: center;
display: flex;
@@ -1413,7 +1455,8 @@ a.close_local {
#t_pagination a,
#pagination a,
#p_pagination a {
#p_pagination a,
#prev_pagination a {
padding: 10px 15px;
background: var(--pix-theme);
color: #fff;
@@ -1421,6 +1464,28 @@ a.close_local {
display: flex;
}
#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 {
padding: 40px 0;
border-bottom: 1px solid var(--pix-background);
@@ -2268,21 +2333,20 @@ a.go_top.show {
/* 手机端顶部导航栏回到顶部按钮 */
.tool_top {
position: fixed;
bottom: 10%;
opacity: 0;
transition: all 0.15s;
font-size: 26px;
transform: translateY(20px);
transform: translateY(8px);
transition: opacity 0.15s, transform 0.15s;
pointer-events: none;
color: #000000;
}
.tool_top.show {
opacity: 1;
transform: translateY(0px);
transform: translateY(0);
pointer-events: auto;
color: #000000;
}
.tool_top .tool_top_icon {
font-size: 25px;
}
.footer_nav_box .left_inner {
@@ -3797,7 +3861,7 @@ a.play_btn i {
}
.player_bar {
height: 3px;
height: 6px;
width: 100%;
background: #ddd;
position: relative;
@@ -3807,7 +3871,7 @@ a.play_btn i {
.player_bar .progress {
position: absolute;
height: 3px;
height: 6px;
background: linear-gradient(90deg, #00b34a, #00e0c7);
left: 0;
top: 0;
@@ -5229,7 +5293,7 @@ a.read-less-btn:hover {
}
a.m_play i {
font-size: 32px;
font-size: 28px;
color: var(--pix-theme);
}
@@ -5535,7 +5599,7 @@ a.m_loop {
width: 330px;
padding: 5px;
border-radius: 5px;
min-height: 550px;
min-height: 450px;
}
.poster_box .loading_box {
@@ -5653,7 +5717,7 @@ span.edit_post a {
.m_offcanvas .inner {
background:
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%;
padding: 30px;
}
@@ -5723,8 +5787,7 @@ span.edit_post a {
background: rgba(235, 242, 237, 0.8);
border-top: 1px solid #eaeaea;
align-items: center;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
border-radius: 0;
height: 50px;
}
@@ -5945,11 +6008,6 @@ a.change i.ri-refresh-line {
.not_mobile {
display: none;
}
.footer_nav_box {
border-radius: 50px;
}
}
.single_wrap .comments-area,
@@ -5974,76 +6032,147 @@ a.change i.ri-refresh-line {
/*toc*/
.listree-box {
display: none;
position: fixed;
z-index: 999;
top: 50%;
left: 0;
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;
top: 10px;
left: 15px;
display: block;
width: 22px;
text-align: center;
width: 290px;
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 {
max-height: 230px;
overflow: scroll;
display: block;
max-height: min(58vh, 420px);
overflow-y: auto;
overflow-x: hidden;
float: left;
height: 100%;
min-height: 100px;
line-height: 1.5;
margin: 20px 0px 20px -10px;
padding-right: 20px;
align-items: center;
border-right: 1px solid #eeeeef;
float: none;
height: auto;
min-height: 0;
line-height: 1.45;
margin: 0;
padding: 12px 10px 14px;
list-style: none;
border: 0;
}
#listree-ol li {
line-height: 1.8;
margin-bottom: 6px;
line-height: inherit;
margin: 2px 0;
list-style: none;
}
#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 {
margin-top: 0px;
margin: 3px 0 3px 12px;
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,
#listree-ol>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 {
background-color: #fff;
background-color: transparent;
}
#listree-ol::-webkit-scrollbar-thumb {
background: rgb(199, 201, 204);
background: rgb(34 187 109 / 26%);
border-radius: 999px;
}
#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 {
@@ -6281,7 +6410,7 @@ a#listree-click.current,
}
.notice-content {
background-image: url('/upload/yiyan.png');
background-image: url('/themes/theme-pix/assets/img/sidebar-notice.webp');
background-repeat: no-repeat;
background-size: cover;
background-position: center;
@@ -6630,7 +6759,7 @@ a#listree-click.current,
.anianx-bubble {
position: absolute;
bottom: -60px;
top: 50px;
left: 0;
width: 100%;
background: #F6FAF8;
+116 -18
View File
@@ -218,7 +218,7 @@
/**
* 小屏平板 (<= 960px)
* 保持原样
* 540-960px 增加手机端底部导航
*/
@media only screen and (max-width:960px) {
@@ -276,6 +276,35 @@
.top_menu_box {
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,
.posts_cat_nav,
.photos_cat_nav,
.douban_cat_nav,
.friends_cat_nav {
padding: 15px;
}
@@ -480,7 +510,7 @@
backdrop-filter: blur(0.5rem);
-webkit-backdrop-filter: blur(0.5rem);
background: rgb(235 242 237 / 80%);
border-radius: 0 0 20px 20px;
border-radius: 0;
height: 50px;
}
@@ -654,7 +684,6 @@
color: #fff;
}
.player_mod .tool,
a.m_prev,
a.m_next,
.timer,
@@ -663,6 +692,59 @@
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 {
width: 32px;
height: 32px;
@@ -703,7 +785,7 @@
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 100px;
max-width: 90px;
}
.single_music_header .mu_img {
@@ -742,30 +824,42 @@
}
/* 手机端文章目录调整 */
h3.listree-titles {
font-size: 0.8rem;
padding: 9px 0;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
.listree-box {
left: 40px;
right: 12px;
max-width: 85vw;
max-height: calc(100vh - 96px);
margin-left: 0;
border-radius: 12px;
transform: translate3d(0, -8px, 0) scale(.98);
transform-origin: top center;
}
#listree-ol li a {
font-size: 0.8rem;
.listree-box.is-open {
transform: translate3d(0, 0, 0) scale(1);
}
#listree-ol {
margin: 10px 0 15px -10px;
padding-right: 15px;
max-height: min(56vh, 420px);
margin: 0;
padding: 10px 8px 12px;
}
#listree-ol li {
line-height: 1.2;
margin-top: 6px;
line-height: inherit;
margin: 2px 0;
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 i,
@@ -773,7 +867,11 @@
color: #4CAF50;
}
/* 手机端顶部工具按钮 */
.top_tool a {
padding: 6px;
display: flex;
}
}
+2 -1
View File
@@ -504,11 +504,12 @@ a:visited {
color: #252525;
}
/* 侧边栏颜色异常
a:hover,
a:focus,
a:active {
color: #191970;
}
} */
a:focus {
outline: thin dotted;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

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

Before

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 383 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

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

Before

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

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

Before

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

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

Before

Width:  |  Height:  |  Size: 256 B

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

Before

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

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

Before

Width:  |  Height:  |  Size: 275 B

+474 -25
View File
@@ -9,27 +9,12 @@ function modify_m_bottom_music_button_link() {
});
}
// 视频默认正方形,播放恢复比例(接入灯箱后已无用)
// function modify_moment_video_size() {
// const videos = document.querySelectorAll('.pix_video');
// videos.forEach(video => {
// if (!video.hasAttribute('data-video-events-bound')) {
// video.addEventListener('play', () => {
// video.classList.add('is-playing');
// });
// video.addEventListener('ended', () => {
// video.classList.remove('is-playing');
// });
// video.setAttribute('data-video-events-bound', 'true');
// }
// });
// }
// 登录逻辑
let csrfToken = '';
let publicKey = '';
let loginTimer = null;
let countdownSeconds = 3;
let closeLoading = null;
const login_modal = document.getElementById('customLoginModal');
const login_closeBtn = document.getElementById('closeLoginModal');
const login_loginBtn = document.getElementById('customLoginBtn');
@@ -39,6 +24,7 @@ async function fetchCSRFToken() {
login_modal.classList.add('show');
login_loginBtn.disabled = true;
login_loginBtn.textContent = '加载中...';
closeLoading = cocoMessage.loading('正在加载署名信息...');
try {
const response = await fetch('/login', { credentials: 'include' });
@@ -62,19 +48,23 @@ async function fetchCSRFToken() {
publicKey = publicKeyMatch[1].replace(/\\\//g, '/');
return 'ok';
} catch (err) {
closeLoading?.()
cocoMessage.error('署名信息加载失败,请刷新');
if (loginTimer) { clearInterval(loginTimer) }
login_loginBtn.textContent = '错误!请刷新';
login_loginBtn.disabled = true;
return 'error';
}
}
// 打开弹窗逻辑
async function open_login_box() {
if (loginTimer) {
clearInterval(loginTimer);
}
if (loginTimer) { clearInterval(loginTimer) }
countdownSeconds = 3;
const success = await fetchCSRFToken();
if (success === 'logged') {
cocoMessage.success('您已经署名过了,请刷新');
closeLoading?.()
cocoMessage.success('您已署名成功,请刷新');
login_modal.classList.remove('show');
} else if (success === 'ok') {
loginTimer = setInterval(() => {
@@ -82,12 +72,15 @@ async function open_login_box() {
login_loginBtn.textContent = '请稍等...' + countdownSeconds;
} else {
clearInterval(loginTimer);
closeLoading?.()
cocoMessage.success('署名信息加载完成');
login_loginBtn.textContent = '署 名';
login_loginBtn.disabled = false;
}
countdownSeconds--;
}, 1000);
} else {
closeLoading?.()
cocoMessage.error('服务器错误,请刷新');
login_modal.classList.remove('show');
}
@@ -95,7 +88,9 @@ async function open_login_box() {
// 关闭弹窗
login_closeBtn.addEventListener('click', () => {
closeLoading?.()
login_modal.classList.remove('show');
if (loginTimer) { clearInterval(loginTimer) }
});
// 加密逻辑
@@ -111,6 +106,7 @@ function encryptPassword(password) {
// 提交登录
login_loginBtn.addEventListener('click', async () => {
let islogin = false;
const username = document.getElementById('customUsername').value.trim();
const password = document.getElementById('customPassword').value.trim();
if (!username || !password) {
@@ -119,7 +115,9 @@ login_loginBtn.addEventListener('click', async () => {
}
const encryptedPwd = encryptPassword(password);
login_loginBtn.disabled = true;
login_closeBtn.disabled = true;
login_loginBtn.textContent = '验证中...';
closeLoading = cocoMessage.loading('正在验证信息...');
try {
countdownSeconds = 3
const response = await fetch('/login', {
@@ -141,32 +139,41 @@ login_loginBtn.addEventListener('click', async () => {
clearInterval(loginTimer);
}
if (finalUrl.includes('/uc')) {
islogin = true;
closeLoading?.()
cocoMessage.success('署名成功,正在跳转...');
login_loginBtn.textContent = '跳转中...';
const currentScrollTop = window.scrollY || document.documentElement.scrollTop;
$.cookie('scrollParam', currentScrollTop, { path: '/', domain: 'anian.cc' });
$.cookie('load_type', 'login', { path: '/', domain: 'anian.cc' });
$.cookie('load_type', 'login', { path: '/' });
window.location.reload();
} else if (finalUrl.includes('error=invalid-credential')) {
closeLoading?.()
cocoMessage.warning('署名人与心上锁不匹配');
fetchCSRFToken();
} else {
closeLoading?.()
cocoMessage.error('速度过快,请稍后重试');
}
} catch (err) {
closeLoading?.()
cocoMessage.error('服务器连接失败');
} finally {
if (!islogin) {
fetchCSRFToken();
login_closeBtn.disabled = false;
loginTimer = setInterval(() => {
if (countdownSeconds > 0) {
login_loginBtn.textContent = '请稍等...' + countdownSeconds;
} else {
clearInterval(loginTimer);
closeLoading?.()
cocoMessage.success('请重新尝试署名');
login_loginBtn.textContent = '署 名';
login_loginBtn.disabled = false;
}
countdownSeconds--;
}, 1000);
}
}
});
// 回车登录
@@ -210,8 +217,7 @@ async function customLogout() {
closeLoading();
cocoMessage.success('您已成功退出登录');
const currentScrollTop = window.scrollY || document.documentElement.scrollTop;
$.cookie('scrollParam', currentScrollTop, { path: '/', domain: 'anian.cc' });
$.cookie('load_type', 'logout', { path: '/', domain: 'anian.cc' });
$.cookie('load_type', 'logout', { path: '/' });
window.location.reload();
} else {
closeLoading();
@@ -240,6 +246,446 @@ function confirmPixarAction() {
customLogout();
}
// 豆瓣页:分类筛选 + AJAX加载(不依赖 finder API
function init_douban_page() {
var $page = $('.douban_page');
if ($page.length === 0) {
return;
}
var $list = $('#douban_item');
var $pagination = $('#douban_pagination');
var $paginationBtn = $('#douban_pagination a');
if ($list.length === 0 || $paginationBtn.length === 0) {
return;
}
var state = {
page: 1,
size: 10,
type: '',
loading: false
};
function escapeHtml(input) {
if (input === null || input === undefined) {
return '';
}
return String(input)
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#039;');
}
function formatTime(isoTime) {
if (!isoTime) {
return '--';
}
var date = new Date(isoTime);
if (Number.isNaN(date.getTime())) {
return '--';
}
var year = date.getFullYear();
var month = String(date.getMonth() + 1).padStart(2, '0');
var day = String(date.getDate()).padStart(2, '0');
return year + '-' + month + '-' + day;
}
function buildRequestUrl(page, type) {
var query = new URLSearchParams({
page: String(page),
size: String(state.size)
});
if (type) {
query.append('type', type);
}
return '/apis/api.douban.moony.la/v1alpha1/doubanmovies?' + query.toString();
}
function renderEmpty() {
return '<div class="loading_box"><img src="/themes/theme-pix/assets/img/no-data.webp" alt="暂无内容" style="max-width: 280px; width: 100%; height: auto;"></div>';
}
function parseScoreValue(rawScore) {
if (rawScore === null || rawScore === undefined || rawScore === '') {
return null;
}
var scoreText = String(rawScore);
var matched = scoreText.match(/(\d+(?:\.\d+)?)/);
if (!matched || !matched[1]) {
return null;
}
var scoreNumber = parseFloat(matched[1]);
if (Number.isNaN(scoreNumber)) {
return null;
}
if (scoreNumber < 0) {
scoreNumber = 0;
}
if (scoreNumber > 5) {
scoreNumber = 5;
}
return scoreNumber;
}
function renderTypeNav(typeList) {
var $navList = $('.douban_cat_nav ul');
if ($navList.length === 0) {
return;
}
var navHtml = ['<li><a data-type="" class="cat-link active">全部<span></span></a></li>'];
var seen = {};
if (Array.isArray(typeList)) {
typeList.forEach(function (item) {
var key = item && item.key !== undefined && item.key !== null ? String(item.key).trim() : '';
if (!key || seen[key]) {
return;
}
seen[key] = true;
var safeKey = escapeHtml(key);
navHtml.push('<li><a data-type="' + safeKey + '" class="cat-link">' + safeKey + '<span></span></a></li>');
});
}
$navList.html(navHtml.join(''));
}
function renderScore(rawScore) {
var scoreValue = parseScoreValue(rawScore);
if (scoreValue === null) {
return '暂无评分';
}
var formatted = scoreValue.toFixed(1);
return formatted + ' / 5.0';
}
function renderItem(item) {
var spec = item && item.spec ? item.spec : {};
var faves = item && item.faves ? item.faves : {};
var name = escapeHtml(spec.name || '未命名条目');
var link = escapeHtml(spec.link || 'javascript:void(0);');
var poster = escapeHtml(spec.poster || '/themes/theme-pix/assets/img/theme/banner-all.webp');
var rawScore = faves.score || spec.score || '';
var createTime = escapeHtml(formatTime(faves.createTime));
var dataType = escapeHtml(spec.type || '--');
var contentText = escapeHtml(spec.cardSubtitle || '暂无内容简介');
var pid = escapeHtml((item.metadata && item.metadata.name) || ('douban-' + Date.now()));
var scoreText = renderScore(rawScore);
return '' +
'<div id="post-' + pid + '" 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 class="douban_title_text" target="_blank" rel="noopener" href="' + link + '">' +
' ' + name +
' </a>' +
' </div>' +
' <div class="douban_media_col">' +
' <img class="douban_poster_img" src="' + poster + '" alt="' + name + '">' +
' </div>' +
' <div class="douban_sub_meta">' +
' <time class="douban_time_text" datetime="' + createTime + '">' + createTime + '</time>' +
' <span class="douban_type_badge">' + dataType + '</span>' +
' <span class="douban_score_badge">' + escapeHtml(scoreText) + '</span>' +
' </div>' +
' <div class="douban_content_box">' +
' <p class="douban_content_main douban_content_collapsed" data-full="' + escapeHtml(contentText) + '">' + contentText + '</p>' +
' <a class="douban_expand_btn" style="display:none;">展开</a>' +
' </div>' +
' </div>' +
' </div>' +
'</div>';
}
function updatePagination(hasNext, nextPage) {
if (hasNext) {
$paginationBtn
.attr('data-next-page', String(nextPage))
.attr('data', String(nextPage))
.text((window.Theme && Theme.site_page) ? Theme.site_page : '翻阅更多')
.show();
$pagination.removeClass('u-hide').css('display', 'flex');
} else {
$paginationBtn.removeAttr('data-next-page').removeAttr('data');
$paginationBtn.hide();
$pagination.hide();
}
}
function renderList(data, isAppend) {
var items = (data && data.items) ? data.items : [];
if (!isAppend) {
$list.empty();
}
if (items.length === 0 && !isAppend) {
$list.html(renderEmpty());
updatePagination(false, 1);
return;
}
var html = items.map(renderItem).join('');
$list.append($(html).fadeIn(300));
if (typeof lazyLoadInstance !== 'undefined') {
lazyLoadInstance.update();
}
if (typeof initializeMomentFold === 'function') {
initializeMomentFold();
}
initializeDoubanExpand();
updatePagination(!!data.hasNext, (data.page || state.page) + 1);
}
function initializeDoubanExpand() {
var collapsedHeight = 89.6;
$(document).off('click.doubanExpand', '.douban_expand_btn').on('click.doubanExpand', '.douban_expand_btn', function (e) {
e.preventDefault();
var $btn = $(this);
var $content = $btn.prev('.douban_content_main');
if ($content.length === 0) {
return;
}
if ($content.hasClass('is-expanded')) {
$content.removeClass('is-expanded');
$content.css('max-height', collapsedHeight + 'px');
$btn.text('展开');
} else {
var contentEl = $content[0];
var fullHeight = $content.data('fullHeight') || (contentEl ? contentEl.scrollHeight : 0);
$content.addClass('is-expanded');
$content.css('max-height', fullHeight + 'px');
$btn.text('收起');
}
});
$('.douban_content_main').each(function () {
var $content = $(this);
var $btn = $content.next('.douban_expand_btn');
if ($btn.length === 0) {
return;
}
var scrollHeight = this.scrollHeight;
var clientHeight = this.clientHeight;
if (scrollHeight > clientHeight) {
$btn.show();
$content.data('fullHeight', scrollHeight);
$content.css('max-height', collapsedHeight + 'px');
}
});
}
function requestList(page, type, isAppend, hooks) {
hooks = hooks || {};
if (state.loading) {
return;
}
state.loading = true;
var appendStartIndex = isAppend ? $list.children('.p_item').length : 0;
var oldState = {
listHtml: $list.html(),
paginationVisible: $pagination.is(':visible'),
btnVisible: $paginationBtn.is(':visible'),
btnText: $paginationBtn.text(),
btnNextPage: $paginationBtn.attr('data-next-page')
};
var apiUrl = buildRequestUrl(page, type);
$.ajax({
type: 'GET',
url: apiUrl,
dataType: 'json',
beforeSend: function () {
if (!isAppend) {
$list.html('<div class="loading_box"><div uk-spinner></div></div>');
$pagination.hide();
} else {
$paginationBtn.hide();
if ($('#douban_pagination .douban-more-loading').length === 0) {
$('#douban_pagination .post-paging').append('<div class="douban-more-loading"><div uk-spinner></div></div>');
}
$pagination.css('display', 'flex');
}
},
success: function (data) {
state.page = page;
renderList(data || {}, !!isAppend);
if (typeof hooks.onSuccess === 'function') {
hooks.onSuccess(data || {});
}
if (isAppend) {
var $newItems = $list.children('.p_item').slice(appendStartIndex);
if ($newItems.length > 0) {
var $scrollBody = (typeof $body !== 'undefined') ? $body : $('html,body');
var targetTop = $newItems.first().offset().top - 58;
if (!window.scroll_param || (!window.loadMoreTimeout && window.scroll_param > targetTop)) {
$scrollBody.animate({ scrollTop: targetTop }, 500);
} else {
window.forceStopLoading = true;
}
}
}
},
error: function () {
cocoMessage.error('数据获取失败');
if (!isAppend) {
if ($.trim(oldState.listHtml || '') !== '') {
$list.html(oldState.listHtml);
} else {
$list.html(renderEmpty());
}
}
if (oldState.paginationVisible) {
$pagination.css('display', 'flex');
} else {
$pagination.hide();
}
if (oldState.btnVisible) {
$paginationBtn.show();
} else {
$paginationBtn.hide();
}
if (oldState.btnText) {
$paginationBtn.text(oldState.btnText);
}
if (oldState.btnNextPage) {
$paginationBtn.attr('data-next-page', oldState.btnNextPage);
$paginationBtn.attr('data', oldState.btnNextPage);
}
if (typeof hooks.onError === 'function') {
hooks.onError();
}
},
complete: function () {
state.loading = false;
$('#douban_pagination .douban-more-loading').remove();
$('.douban_cat_nav .cat-link').removeClass('disabled');
$paginationBtn.text((window.Theme && Theme.site_page) ? Theme.site_page : '翻阅更多');
}
});
}
$(document).off('click.doubanCat', '.douban_cat_nav .cat-link').on('click.doubanCat', '.douban_cat_nav .cat-link', function () {
var $this = $(this);
if ($this.hasClass('disabled')) {
return false;
}
if ($this.hasClass('active')) {
if (window._tagSwitchCallback) {
window._tagSwitchCallback.resolve();
window._tagSwitchCallback = null;
}
return false;
}
$('.douban_cat_nav .cat-link').addClass('disabled');
var $activeBefore = $('.douban_cat_nav .cat-link.active');
var oldType = state.type;
var targetType = $this.attr('data-type') || '';
var targetTag = $this.clone().find('span').remove().end().text().trim();
state.page = 1;
state.type = targetType;
requestList(1, state.type, false, {
onSuccess: function () {
$this.addClass('active').parent().siblings().children('.cat-link').removeClass('active');
if (window.pix && typeof pix.centerCategoryNavActive === 'function') {
pix.centerCategoryNavActive($this);
}
var currentUrl = new URL(window.location.href);
if (!targetTag || targetTag === '全部') {
currentUrl.searchParams.delete('tag');
} else {
currentUrl.searchParams.set('tag', targetTag);
}
history.pushState({ url: currentUrl.pathname + currentUrl.search }, '', currentUrl.pathname + currentUrl.search);
// 分类切换后重置分页记录,避免自动恢复加载旧分类页数
$.removeCookie('page', { path: '/' });
if (window._tagSwitchCallback) {
window._tagSwitchCallback.resolve();
window._tagSwitchCallback = null;
}
},
onError: function () {
state.type = oldType;
if ($activeBefore.length > 0) {
$activeBefore.addClass('active').parent().siblings().children('.cat-link').removeClass('active');
}
if (window._tagSwitchCallback) {
window._tagSwitchCallback.reject();
window._tagSwitchCallback = null;
}
}
});
return false;
});
$(document).off('click.doubanMore', '#douban_pagination a').on('click.doubanMore', '#douban_pagination a', function () {
if (state.loading) {
return false;
}
var pageAttr = $(this).attr('data-next-page') || $(this).attr('data');
var nextPage = parseInt(pageAttr, 10);
if (!nextPage || Number.isNaN(nextPage)) {
return false;
}
requestList(nextPage, state.type, true, {
onSuccess: function () {
// 与 app.js 现有逻辑保持一致:记录当前已加载到的页码
$.cookie('page', nextPage, { path: '/' });
}
});
return false;
});
function applyUrlTagState() {
var urlTag = new URLSearchParams(window.location.search).get('tag');
if (urlTag && urlTag.trim() !== '') {
var $matchedTag = $('.douban_cat_nav .cat-link').filter(function () {
var tagText = $(this).clone().find('span').remove().end().text().trim();
return tagText === urlTag;
}).first();
if ($matchedTag.length > 0) {
$matchedTag.addClass('active').parent().siblings().children('.cat-link').removeClass('active');
if (window.pix && typeof pix.centerCategoryNavActive === 'function') {
pix.centerCategoryNavActive($matchedTag);
}
state.type = $matchedTag.attr('data-type') || '';
} else {
state.type = $('.douban_cat_nav .cat-link.active').attr('data-type') || '';
}
} else {
state.type = $('.douban_cat_nav .cat-link.active').attr('data-type') || '';
if (window.pix && typeof pix.centerCategoryNavActive === 'function') {
pix.centerCategoryNavActive($('.douban_cat_nav .cat-link.active').first());
}
}
}
$.ajax({
type: 'GET',
url: '/apis/api.douban.moony.la/v1alpha1/doubanmovies/-/types',
dataType: 'json',
success: function (data) {
var typeList = Array.isArray(data) ? data : ((data && Array.isArray(data.items)) ? data.items : []);
renderTypeNav(typeList);
},
complete: function () {
applyUrlTagState();
requestList(1, state.type, false);
}
});
}
// 打开确认模态框
function openModal(title, msg, type) {
var modal = $('#momentsDeleteModal');
@@ -248,6 +694,8 @@ function openModal(title, msg, type) {
modal.find('.moments-message-text').text(msg);
card.removeClass('theme-red theme-yellow theme-green').addClass('theme-' + type);
$('.moments-btn-cancel, .moments-btn-confirm').prop('disabled', false);
$('body').off('click', '#momentsCancelBtn');
$('body').off('click', '#momentsConfirmBtn');
modal.fadeIn(200);
}
@@ -264,6 +712,7 @@ function openModal(title, msg, type) {
// 集合:PJAX(初始化执行+PJAX执行)
function init_anian_pjax() {
// modify_moment_video_size();
init_douban_page();
}
// 集合:初始化(仅初始化执行一次)
+952 -744
View File
File diff suppressed because it is too large Load Diff
+8 -8
View File
@@ -42,8 +42,8 @@ $('body').on('click', '.moment_card_type a', function () {
$('body').on('click', '.edit_content .push_card', function () {
var card_url = $('.edit_card_box .edit_content input').val();
var num = $('.card_sortble .moment_card_item').length;
if (num > 2) {
cocoMessage.error('最多插入3个卡片');
if (num > 4) {
cocoMessage.error('最多插入5个卡片');
$('.edit_card_box .edit_content input').val('');
return false;
}
@@ -204,7 +204,7 @@ $(document).on('change', '#moment_img_up', function () {
success: function (data) {
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').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('上传成功');
$('input#moment_video_url').val(thum)
}
@@ -280,17 +280,16 @@ window.currentDeletePid = null;
// 删除片刻文章 - 打开弹窗
$('body').on('click', '.control_delete_post', function () {
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);
window.currentDeletePid = null;
});
// 点击确认删除 - 执行 AJAX
$('body').on('click', '#momentsConfirmDeleteBtn', function () {
$('body').on('click', '#momentsConfirmBtn', function () {
var pid = window.currentDeletePid;
if (!pid) return;
let closeLoading = cocoMessage.loading('正在删除...');
@@ -323,6 +322,7 @@ $('body').on('click', '#momentsConfirmDeleteBtn', function () {
},
});
});
});
//置顶片刻
$('body').on('click', '.sticky_btn', function () {
@@ -539,7 +539,7 @@ function edit_video(data) {
$('input#moment_video_url').val(url);
if (url !== '') {
$('.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') {
+27 -2
View File
@@ -129,7 +129,7 @@ var pix = {
} else {
msg_modal_inner.html(`
<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>
`)
}
@@ -137,7 +137,7 @@ var pix = {
error: function () {
msg_modal_inner.html(`
<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>
`)
@@ -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 () {
if (document.getElementById("cat_nav_items")) {
let xscroll = document.getElementById("cat_nav_items");
+47 -16
View File
@@ -361,10 +361,9 @@ function mu_box_show() {
function mu_box_hide(time = 2000) {
clearTimeout(trigger);
trigger = setTimeout(function () {
// 获取屏幕宽度判断是否为手机端(与歌词容器响应式逻辑保持一致)
const isMobile = $(window).width() <= 767;
// 手机端隐藏时额外向下偏移50px(可根据需要调整数值),非手机端保持默认0px
const hideTop = isMobile ? "50px" : "0px";
const hasBottomMenu = $(window).width() <= 960;
// 底部导航可见时,播放器收起到导航栏后面。
const hideTop = hasBottomMenu ? "50px" : "0px";
// 执行隐藏动画
$('.footer_nav_box').animate({
@@ -384,20 +383,52 @@ $(document).on('mouseleave', '.footer_nav_box .right_inner', function (event) {
}, 2000);
});
//音乐进度条跳转
function getMousePosition(e) {
var e = e || window.event;
var x = e.pageX;
var y = e.pageY;
return { 'left': x, 'top': y }
//音乐进度条跳转/拖动
var draggingPlayerBar = null;
function getProgressPointerX(event) {
var originalEvent = event.originalEvent || event;
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 () {
var long = (getMousePosition().left) - ($('.progress').offset().left);
$('.progress').width(long);
allTime = parseInt(audiobox[0].duration);
var nowtime = (long / $('.player_bar').width()) * allTime;
audiobox[0].currentTime = nowtime;
function seekPlayerByEvent(event, playerBar) {
var duration = audiobox[0].duration;
if (!duration || !isFinite(duration)) return;
var $playerBar = $(playerBar);
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
+159 -55
View File
@@ -5,7 +5,7 @@ const poster = (function() {
const DEBUG = false
const WIDTH = 700
const HEIGHT = 1160
const HEIGHT = 850
/**
* 将图片URL加载为Image对象并返回Promise
@@ -27,7 +27,13 @@ const poster = (function() {
* @param {object} 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残余】 ------------------
// 在重新绘制前,确保清空容器,移除旧的 img 和 wrapper
$container.innerHTML = '';
@@ -41,9 +47,12 @@ const poster = (function() {
const $title = createDom('canvas', 'id', 'title')
const $content = createDom('canvas', 'id', 'content')
const $logo = createDom('canvas', 'id', 'logo')
const $siteName = createDom('canvas', 'id', 'siteName')
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)
const date = new Date()
@@ -77,6 +86,58 @@ const poster = (function() {
titleStyle.position = (config.titleStyle && config.titleStyle.position) || titleStyle.position
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
const contentStyle = {
font: '22px Helvetica',
@@ -90,15 +151,6 @@ const poster = (function() {
contentStyle.position = (config.contentStyle && config.contentStyle.position) || contentStyle.position
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 等待所有图片加载】 ------------------
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);
// 3. 绘制覆盖层
ctx.fillStyle="rgba(0, 0, 0, 0.3)";
ctx.fillRect(20, 20, $canvas.width - 40, $canvas.height / 1.2 - 40);        
ctx.fillStyle="rgba(0, 0, 0, 0.6)";
ctx.fillRect(20, 20, $canvas.width - 40, $canvas.height / 1.2 - 40);
// 4. 绘制时间 (使用预先绘制好的 Canvas)
ctx.drawImage($day, -20, 50)
ctx.drawImage($date, -21, 125)
// 5. 绘制 Logo
var logoh = 60;
var logoh = 140;
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. 绘制二维码
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)
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($description, 20, $canvas.height / 1.2 + 110)
ctx.strokeStyle = 'rgba(122, 122, 122, 0.5)';
// 8. 转换并显示最终图片
@@ -165,7 +220,9 @@ const poster = (function() {
}).catch(error => {
console.error('海报图片加载失败:', error);
// 可在此处添加错误处理,例如显示一个错误信息
if ($wrapper.parentNode === $container) {
$container.removeChild($wrapper);
}
if (config.callback) {
// 即使失败也调用回调,传入 null 或错误信息,以便上层逻辑处理
config.callback(null);
@@ -196,19 +253,14 @@ const poster = (function() {
}
}
// 覆盖函数(不变)
// 覆盖函数:按目标区域等比缩放并居中裁切,尽量不留白
function coverImg(box_w, box_h, source_w, source_h) {
var sx = 0,
sy = 0,
sWidth = source_w,
sHeight = source_h;
if (source_w > source_h || (source_w == source_h && box_w < box_h)) {
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;
}
const scale = Math.max(box_w / source_w, box_h / source_h);
const sWidth = box_w / scale;
const sHeight = box_h / scale;
const sx = (source_w - sWidth) / 2;
const sy = (source_h - sHeight) / 2;
return {
sx,
sy,
@@ -356,10 +408,26 @@ const poster = (function() {
// ajax生成文章海报
// 此处调用部分需要确保在 PJAX 环境下,该事件监听器能够重新绑定(如果使用传统的 document.ready,在 PJAX 中需要改为监听 pjax:success 等事件)
$('body').on('click', '.cr_poster', function () {
let closeLoading = null;
closeLoading = cocoMessage.loading('海报生成中...');
var $trigger = $(this);
var post_id = $(this).attr('poster-data');
var banner = $(this).attr('banner');
var single_content = $('.single-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 区域存在
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_length = content.length;
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 库可用
if (typeof QRious === 'undefined') {
@@ -392,53 +461,88 @@ $('body').on('click', '.cr_poster', function () {
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:清理容器】 ------------------
// 先移除旧的 poster_box
$('.poster_box').remove();
// 仅在当前弹窗作用域内移除旧容器,避免影响 PJAX 残留节点
$posterBoxAp.find('.poster_box').remove();
// 重新创建并插入新的 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) {
content = content.substring(0, 80) + '...'
content = content.substring(0, 82) + '...'
}
// Posterdown 函数中不再需要移除 loading_box,因为 init 会清空容器
// 海报生成回调
function Posterdown(e) {
var modal = '#share_modal_' + post_id;
// 检查海报是否成功生成
if (e && $(modal + ' .poster_box img').length > 0) {
var url = $(modal + ' .poster_box img').attr('src');
$(modal + ' .post_share_box').removeClass('hide');
$(modal + ' .poster_download').attr('href', url).attr('download', 'poster_' + post_id + '.png');
if (e && $posterBox.find('img').length > 0) {
closeLoading?.()
cocoMessage.success("海报生成成功!") // 图片加载完成后才触发
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 {
// 错误处理,如果海报生成失败
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({
banner: banner,
selector: poster_box_selector, // 传入完整的选择器
selector: modal + ' .poster_box',
container: $posterBox[0],
title: title,
siteName: siteName,
description: Theme.admin_des,
content: content,
logo: Theme.site_logo,
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
});
});
// 移除 loading 动画
$(poster_box_selector + ' .loading_box').remove();
$(document).on('pjax:success', function (event) {
// 清理 PJAX 残留的 modal:只删除那些在当前页面没有对应按钮的 modal
var allModals = $('[id^="share_modal_"]');
var currentPostIds = {};
// 收集当前页面所有的 post_id
$('.cr_poster').each(function() {
var pid = $(this).attr('poster-data');
if (pid) {
currentPostIds[pid] = true;
}
});
// 只删除残留的 modal(不在当前页面按钮列表中的)
allModals.each(function() {
var $m = $(this);
var modalId = $m.attr('id');
var postId = modalId ? modalId.replace('share_modal_', '') : null;
if (postId && !currentPostIds[postId]) {
$m.remove();
}
});
});
File diff suppressed because one or more lines are too long
@@ -57,7 +57,7 @@
#nprogress .spinner-icon {
width: 100%;
height: 100%;
background-image: url("/upload/jiazai.gif");
background-image: url("/themes/theme-pix/assets/img/loading.webp");
background-size: contain;
background-repeat: no-repeat;
background-position: center;
+1 -2
View File
@@ -2436,7 +2436,7 @@ select.uk-form-width-xsmall {
.uk-spinner {
width: 80px;
height: 80px;
background-image: url("/upload/jiazai.gif");
background-image: url("/themes/theme-pix/assets/img/loading.webp");
background-size: contain;
background-repeat: no-repeat;
background-position: center;
@@ -3541,7 +3541,6 @@ iframe[uk-cover] {
.uk-sortable-drag {
position: fixed !important;
z-index: 1050 !important;
width: auto !important;
pointer-events: none;
}
+18 -37
View File
@@ -10,46 +10,27 @@
<div id="pjax-container">
<main id="primary" class="site-main">
<div class="page_content" uk-height-viewport="offset-top: true">
<article class="post-276 page type-page status-publish hentry">
<header class="entry-header">
<div class="left">
<i class="ri-focus-2-line"></i>
<h1 class="entry-title" th:text="${title}"></h1>
</div>
</header>
<div class="entry-content single-content">
<section class="db--container">
<nav class="db--nav">
<div th:each="type : ${types}" class="db--navItem JiEun"
th:classappend="${type.key == 'movie' ? 'current' : ''}"
th:data-type="${type.key}" th:text="${type.key}"></div>
</nav>
<div class="db--genres"></div>
<div class="db--type">
<div class="db--typeItem" data-status="mark">想看</div>
<div class="db--typeItem" data-status="doing">在看</div>
<div class="db--typeItem is-active" data-status="done">看过</div>
</div>
<div class="db--list db--list__card" data-type="movie">
</div>
<div class="block-more block-more__centered">
<div class="lds-ripple u-hide">
</div>
</div>
</section>
</div>
</article>
<div class="blog_list douban_page">
<div class="blog_list_inner" uk-height-viewport="offset-top: true">
<div class="friends_cat_nav douban_cat_nav">
<ul>
<li><a data-type="" class="cat-link active">全部<span></span></a></li>
</ul>
</div>
</main>
<div id="douban_item" class="moment_list douban_list"></div>
<div id="douban_pagination" class="u-hide">
<div class="post-paging">
<a data-next-page="2" th:text="${theme.config.base_set.site_page}"></a>
</div>
</div>
<div id="comment_form_reset"></div>
</div>
</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/no-data.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>
+1 -1
View File
@@ -15,7 +15,7 @@
<div class="nodata_main" uk-height-viewport="offset-top: true" >
<section class="error-404 not-found">
<div class="page-content no_resault">
<img src="/upload/404.png">
<img src="/themes/theme-pix/assets/img/not-found.webp">
</div>
</section>
</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
+39 -15
View File
@@ -8,7 +8,10 @@
<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_inner" uk-height-viewport="offset-top: true">
@@ -19,16 +22,16 @@
<li>
<!-- 全部按钮 -->
<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>
</a>
</li>
<!-- 遍历所有作者 -->
<th:block th:each="author : ${authors}">
<th:block th:each="authorLink : ${authors}">
<li>
<a th:attr="data-href=@{|/friends?author=${author}|}"
th:classappend="${#strings.equals(param.author, author) ? 'active' : ''}"
th:text="${author}" class="cat-link">
<a th:attr="data-href=@{/friends(tag=${authorLink.spec.displayName})}"
th:classappend="${#strings.equals(selectedTag, authorLink.spec.displayName) ? 'active' : ''}"
th:text="${authorLink.spec.displayName}" class="cat-link">
<span></span>
</a>
</li>
@@ -38,9 +41,9 @@
<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"
th:if="${postInfo.spec != null and not #strings.isEmpty(postInfo.spec.description)}"
th:with="spec = ${postInfo.spec}">
<div class="p_item_inner">
@@ -72,26 +75,47 @@
<div th:utext="${spec.description}"></div>
</a>
</div>
<!-- 图片列表 -->
<div class="img_list img-dynamic-container">
<div class="list_inner"
th:with="imgRaw=${spec.imageFiles},isImgList=${not #strings.isEmpty(imgRaw)}"
th:attr="num=${isImgList ? #arrays.length(imgRaw.split(',')) : 0}">
<!-- 仅使用 imageFiles;字段缺失或为空时不显示图片 -->
<th:block th:if="${isImgList}">
<th:block th:with="imgArray=${imgRaw.split(',')}">
<th:block th:each="url : ${imgArray}"
th:with="cleanUrl=${#strings.trim(url)}">
<span class="fancybox mo_img"
th:if="${not #strings.isEmpty(cleanUrl)}"
th:href="|/upload/image-host/${cleanUrl}|"
th:data-fancybox="${'post-' + postInfo.metadata.name}">
<img class="lazy"
src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
th:data-src="|/upload/image-host/${cleanUrl}|"
alt="">
</span>
</th:block>
</th:block>
</th:block>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 空数据 -->
<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>
</div>
<!-- 分页:必须保持在 blog_list_inner 里面 -->
<th:block th:if="${friends.totalPages>1}">
<th:block th:if="${friendPage.totalPages>1}">
<div id="t_pagination">
<div class="post-paging"
th:if="${friends.hasNext()}">
<!-- 直接使用后端生成的完整 nextUrl -->
<a th:data="${friends.nextUrl}"
<div class="post-paging" th:if="${friendPage.hasNext()}">
<a th:data="${friendPage.nextUrl}"
th:text="${theme.config.base_set.site_page}">
</a>
</div>
+8 -4
View File
@@ -10,16 +10,20 @@
<div id="pjax-container" th:with="page = ${#strings.isEmpty(param.page) ? 1 : param.page}">
<div id="pjax-container" th:with="
page = ${#lists.isEmpty(param.page) ? 1 : param.page[0]},
tag = ${#lists.isEmpty(param.tag) ? null : param.tag[0]}
">
<th:block th:if="${theme.config.style.home_post_type=='moment' && pluginFinder.available('PluginMoments')}">
<th:block th:if="${theme.config.style.home_post_type=='moment' && pluginFinder.available('PluginMoments')}"
th:with="momentPage = ${#strings.isEmpty(tag) ? momentFinder.list(page, site.post.postPageSize) : momentFinder.listByTag(page, site.post.postPageSize, tag)}">
<th:block
th: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: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>
</div>
+21 -8
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_inner" uk-height-viewport="offset-top: true">
<div class="posts_cat_nav">
<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 th:if="${theme.config.post.post_nav == 'category'}" th:each="categoryItem,iStat : ${categoryFinder.listAll()}">
<a th:data="${categoryItem.status.permalink}"
class="">[[${categoryItem.spec.displayName}]]<span></span></a>
<a th:if="${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: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 th:if="${theme.config.post.post_nav == 'custom_category'}"
th:each="category : ${theme.config.post.nav_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}"
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>
</th:block>
</li>
@@ -26,13 +32,20 @@
<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: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>
<th:block th:if="${_posts.totalPages>1}">
<div id="pagination">
<div class="post-paging" th:if="${_posts.hasNext()}"
th:with="_page = ${_posts.page+1},_path = ${path == '/archives' ? path+'?page='+_page : path +'page/'+_page }">
<a th:data="${_path}" th:text="${theme.config.base_set.site_page}"></a>
th:with="_page = ${_posts.page+1},_path = ${path +'page/'+_page }">
<a th:if="${path == '/archives' and #strings.isEmpty(tag)}"
th:data="@{/archives(page=${_page})}" th:text="${theme.config.base_set.site_page}"></a>
<a th:if="${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="${path != '/archives'}" th:data="${_path}" th:text="${theme.config.base_set.site_page}"></a>
</div>
</div>
</th:block>
+10 -5
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_inner" uk-height-viewport="offset-top: true">
<div class="moment_cat_nav">
<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>
</li>
<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' : ''}"
><span>[[${tag.name}]]</span></a>
</li>
@@ -27,8 +27,13 @@
<th:block th:if="${_moments.totalPages>1}">
<div id="t_pagination">
<div class="post-paging" th:if="${_moments.hasNext()}"
th:with="tag = ${not #lists.isEmpty(param.tag) ? '?tag='+param.tag : ''},_page = ${_moments.page+1}">
<a th:data="${'/moments/page/'+_page+tag}" th:text="${theme.config.base_set.site_page}"></a>
th:with="tag = ${#lists.isEmpty(param.tag) ? null : param.tag[0]},_page = ${_moments.page+1}">
<a th:if="${#strings.isEmpty(tag)}"
th:data="@{${_path}(page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
<a th:unless="${#strings.isEmpty(tag)}"
th:data="@{${_path}(tag=${tag},page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
</div>
</div>
</th:block>
+87
View File
@@ -0,0 +1,87 @@
<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:if="${photoPage.hasNext()}"
th:with="_page = ${photoPage.page+1}">
<a th:if="${#strings.isEmpty(tag)}"
th:data="@{/photos(page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
<a th:unless="${#strings.isEmpty(tag)}"
th:data="@{/photos(tag=${tag},page=${_page})}"
th:text="${theme.config.base_set.site_page}"></a>
</div>
</div>
</th:block>
</div>
</div>
</th:block>
+1 -1
View File
@@ -51,7 +51,7 @@
<span th:text="${moment.stats.upvote}"></span>
</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'}">
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}"
th:banner="${_cover}" th:uk-toggle="|target: #share_modal_${moment.metadata.name}|"
uk-tooltip="title: 瞬间分享; pos: top;" tabindex="0" title=""
+1 -1
View File
@@ -1,5 +1,5 @@
<section class="no-results not-found">
<div class="page-content no_resault">
<img src="/upload/nodata.png">
<img src="/themes/theme-pix/assets/img/no-data.webp">
</div>
</section>
+1 -1
View File
@@ -5,7 +5,7 @@
<div class="blog_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">
<h2 class="entry-title" th:text="${post.spec.title}"></h2>
<div class="header_meta">
+1 -1
View File
@@ -29,7 +29,7 @@
<span th:if="${momentItem.type.name == 'PHOTO' && !isVideoExt}" class="fancybox mo_img"
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>
</th:block>
+13 -13
View File
@@ -1,5 +1,5 @@
<th:block th:fragment="footer">
<th:block th:with="customJsVersion='1.2.5-4'">
<th:block th:with="customJsVersion='1.2.5-8'">
<!-- 奇遇容器 -->
<div class="center-img-container" id="centerImgContainer">
@@ -41,25 +41,25 @@
<div class="pixar-notice-image-area">
<p class="pixar-notice-caption">
您确定要退出登录吗?<br>
请注意<br>
请注意<br>
未保存的内容将会被清空!
</p>
</div>
<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"
onclick="hidePixarCard()">
<i class="ri-close-line"></i>
</button>
<!-- 确认按钮 -->
<button class="pixar-notice-btn pixar-notice-btn-confirm" aria-label="Confirm"
onclick="confirmPixarAction()">
<i class="ri-check-line"></i>
</button>
</div>
</div>
@@ -85,15 +85,15 @@
</div>
</div>
<div class="moments-button-group">
<button class="moments-btn-confirm" type="button" id="momentsConfirmDeleteBtn">确认</button>
<button class="moments-btn-cancel" type="button" id="momentsCancelDeleteBtn">取消</button>
<button class="moments-btn-cancel" type="button" id="momentsCancelBtn">取消</button>
<button class="moments-btn-confirm" type="button" id="momentsConfirmBtn">确认</button>
</div>
</div>
</div>
</div>
<script th:if="${pluginFinder.available('plugin-douban')}"
th:src="@{/plugins/plugin-douban/assets/static/db.min.js(v=${customJsVersion})}" class="pjax"></script>
<!-- <script th:if="${pluginFinder.available('plugin-douban')}"
th:src="@{/plugins/plugin-douban/assets/static/db.min.js(v=${customJsVersion})}" class="pjax"></script> -->
<script th:src="@{/assets/libs/axios/axios.min.js(v=${customJsVersion})}" id="axios.min-js"></script>
<script th:src="@{/assets/libs/jsencrypt/jsencrypt.min.js(v=${customJsVersion})}"
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/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>
+3 -58
View File
@@ -1,4 +1,4 @@
<th:block th:fragment="head" th:with="customJsVersion=${'1.2.5-4'}">
<th:block th:fragment="head" th:with="customJsVersion=${'1.2.5-8'}">
<th:block th:replace="~{'modules/variables/msg'}" />
<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">
@@ -6,61 +6,6 @@
<link rel="shortcut icon" th:href="@{${theme.config.base_set.favicon}}" title="Favicon">
<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="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">
@@ -73,11 +18,11 @@
<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 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>: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>
<th:block th:replace="~{modules/variables/cst-script-parameter}" />
+14 -28
View File
@@ -20,19 +20,6 @@
</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="user_info">
<div class="top">
@@ -51,12 +38,12 @@
// --------------------------
const BANNER_CONFIG = {
seasonal: {
'春': '/upload/dingbu-chun.png', // 春季 Banner
'夏': '/upload/dingbu-xia.png', // 夏季 Banner
'秋': '/upload/dingbu-qiu.png', // 秋季 Banner
'冬': '/upload/dingbu-dong.png' // 冬季 Banner
'春': '/themes/theme-pix/assets/img/banner-chun.webp',
'夏': '/themes/theme-pix/assets/img/banner-xia.webp',
'秋': '/themes/theme-pix/assets/img/banner-qiu.webp',
'冬': '/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 china = new Date(now.getTime() + 8 * 3600 * 1000);
const expires = new Date(Date.UTC(china.getUTCFullYear(), china.getUTCMonth(), china.getUTCDate(), 15, 59, 59));
document.cookie = `${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) {
@@ -102,7 +89,7 @@ function setBanner(lunarInfo) {
// 初始化逻辑(优化版)
// --------------------------
(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';
// 1. 优先尝试从 Cookie 读取
@@ -118,16 +105,15 @@ function setBanner(lunarInfo) {
fetch(apiUrl)
.then(res => res.json())
.then(data => {
if (data.code !== 200) throw new Error('API Error');
// 组装农历信息(保留原有逻辑)
// 组装农历信息,保持 cookie 字段名不变
const lunarInfo = {
ganzhiYear: data.ganzhinian || '',
lunarMonth: data.nyue || '',
lunarDay: data.nri || '',
jieqi: (data.JIEQICN || '').includes('第1天') ? data.jieqi : '',
ganzhiYear: data.nian || '',
lunarMonth: data.yue || '',
lunarDay: data.ri || '',
jieqi: data.jieqi || '',
jijie: data.jijie || '',
traditionalFestival: data.YIFESTIVAL || ''
shengxiao: data.shengxiao || '',
traditionalFestival: data.jieri || ''
};
// 存 Cookie 并设置 Banner
+5 -63
View File
@@ -22,70 +22,12 @@
</div>
</div>
<!-- <div class="m_top_nav top_tool is_mobile">
<a class="top_nav_btn" uk-toggle="target: #m_offcanvas"><i class="ri-menu-2-line"></i></a>
<div id="m_offcanvas" class="m_offcanvas uk-animation-fast"
uk-offcanvas="overlay: true;mode: push;container:.main_wrap">
<div class="uk-offcanvas-bar inner"
th:with="topMenu = ${#strings.isEmpty(theme.config.base_set.left_nav) ? menuFinder.getPrimary() : menuFinder.getByName(theme.config.base_set.left_nav)}">
<div class="m_logo"><a href="/"><img th:src="${theme.config.base_top_set.mobile_logo}"></a></div>
<div class="menu-top-container" th:if="${not #lists.isEmpty(topMenu)}">
<ul id="top_menu" class="menu">
<th:block th:each="menuItem : ${topMenu.menuItems}">
<li th:unless="${not #lists.isEmpty(menuItem.children)}"
class="menu-item menu-item-type-post_type menu-item-object-page">
<a th:target="${menuItem.spec.target?.value}" th:href="@{${menuItem.status.href}}"
th:with="icon = ${#annotations.getOrDefault(menuItem, 'icon', '')}">
<th:block th:if="${not #strings.isEmpty(icon)}"
th:with="index = ${icon.lastIndexOf('.')}">
<i th:unless="${index!=-1}" th:class="${icon}"></i>
<img th:if="${index!=-1}" th:src="${icon}">
</th:block>
<span class="nav_title" th:text="${menuItem.status.displayName}"></span>
<div class="toc_nav top_tool icon_color" aria-hidden="true">
<a class="listree-btn" title="展开目录" aria-label="展开目录" aria-expanded="false">
<i class="ri-menu-line"></i>
</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 th:if="${pluginFinder.available('PluginSearchWidget')}" class="t_search_on top_tool icon_color">
@@ -94,8 +36,8 @@
</div>
<!-- 回到顶部 -->
<div class="is_mobile">
<div class="is_mobile top_tool">
<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>
+2 -3
View File
@@ -32,8 +32,7 @@
</div>
<div class="listree-box" style="display: none;">
<h3 class="listree-titles"></h3>
<div class="listree-box" aria-hidden="true">
<ul id="listree-ol" style="display:none;">
</ul>
</div>
@@ -48,7 +47,7 @@
<i class="ri-play-list-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 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>
<a class="go_top" href="#page" uk-scroll=""><i class="ri-arrow-up-s-line"></i></a>
</div>
+1 -1
View File
@@ -4,7 +4,7 @@
<button class="uk-modal-close-default uk-icon uk-close" type="button" uk-close=""></button>
<div class="msg_modal_inner">
<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 class="msg_limit">只显示最新10条未读和已读信息</p>
</div>
@@ -5,7 +5,7 @@
site_title: [[${site.title}]],
bgm_open: [[${theme.config.music.bgm_open}]],
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})]",
site_page: "[(${theme.config.base_set.site_page})]",
theme_set: "[(${theme.config.style.theme_set})]",
@@ -1,5 +1,4 @@
<style th:if="${theme.config.moments.img_style == 'one'}">
.img_list .list_inner {
display: flex;
flex-wrap: wrap;
@@ -48,14 +47,13 @@
width: 30%;
margin: 2px;
}
.img_list span:nth-child(1):nth-last-child(4),
.img_list span:nth-child(3):nth-last-child(2),
.img_list span:nth-child(4):nth-last-child(1) {
width: 30%;
}
}
</style>
<style th:if="${theme.config.moments.img_style == 'two'}">
.img_list span:nth-last-child(1):first-child {
@@ -137,7 +135,8 @@
grid-area: 5 / 4 / 7 / 7;
}
.img_list .list_inner[num='5'] span:nth-child(4) img,.img_list .list_inner[num='5'] span:nth-child(5) img {
.img_list .list_inner[num='5'] span:nth-child(4) img,
.img_list .list_inner[num='5'] span:nth-child(5) img {
height: 127.35px;
}
@@ -206,7 +205,8 @@
/* 容器设置:保持 6 列网格,用于计算 1/3 和 1/2 宽度 */
.img_list .list_inner[num='8'] {
display: grid;
grid-template-columns: repeat(6, 1fr); /* 6 列 */
grid-template-columns: repeat(6, 1fr);
/* 6 列 */
max-height: 100vw;
@@ -237,11 +237,291 @@
}
/* 确保第 1 行和第 3 行的宽度不被其他 CSS 规则干扰 */
.img_list .list_inner[num='8'] span:nth-child(-n+3), /* 第 1, 2, 3 个 */
.img_list .list_inner[num='8'] span:nth-child(n+6) { /* 第 6, 7, 8 个 */
.img_list .list_inner[num='8'] span:nth-child(-n+3),
/* 第 1, 2, 3 个 */
.img_list .list_inner[num='8'] span:nth-child(n+6) {
/* 第 6, 7, 8 个 */
grid-column: span 2;
}
/* 10 张:完整矩形(6 列,3+2+2+3 */
.img_list .list_inner[num='10'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='10'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='10'] span:nth-child(4),
.img_list .list_inner[num='10'] span:nth-child(5),
.img_list .list_inner[num='10'] span:nth-child(6),
.img_list .list_inner[num='10'] span:nth-child(7) {
grid-column: span 3;
}
/* 11 张:完整矩形(6 列,2+3+3+3 */
.img_list .list_inner[num='11'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='11'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='11'] span:nth-child(1),
.img_list .list_inner[num='11'] span:nth-child(2) {
grid-column: span 3;
}
/* 13 张:完整矩形(6 列,3+2+3+2+3 */
.img_list .list_inner[num='13'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='13'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='13'] span:nth-child(4),
.img_list .list_inner[num='13'] span:nth-child(5),
.img_list .list_inner[num='13'] span:nth-child(9),
.img_list .list_inner[num='13'] span:nth-child(10) {
grid-column: span 3;
}
/* 14 张:完整矩形(6 列,3+3+2+3+3 */
.img_list .list_inner[num='14'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='14'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='14'] span:nth-child(7),
.img_list .list_inner[num='14'] span:nth-child(8) {
grid-column: span 3;
}
/* 16 张:完整矩形(6 列,3+2+3+3+2+3 */
.img_list .list_inner[num='16'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='16'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='16'] span:nth-child(4),
.img_list .list_inner[num='16'] span:nth-child(5),
.img_list .list_inner[num='16'] span:nth-child(12),
.img_list .list_inner[num='16'] span:nth-child(13) {
grid-column: span 3;
}
/* 17 张:完整矩形(6 列,2+3+2+3+2+3+2 */
.img_list .list_inner[num='17'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='17'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='17'] span:nth-child(1),
.img_list .list_inner[num='17'] span:nth-child(2),
.img_list .list_inner[num='17'] span:nth-child(6),
.img_list .list_inner[num='17'] span:nth-child(7),
.img_list .list_inner[num='17'] span:nth-child(11),
.img_list .list_inner[num='17'] span:nth-child(12),
.img_list .list_inner[num='17'] span:nth-child(16),
.img_list .list_inner[num='17'] span:nth-child(17) {
grid-column: span 3;
}
/* 19 张:完整矩形(6 列,3+3+2+3+3+2+3 */
.img_list .list_inner[num='19'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='19'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='19'] span:nth-child(7),
.img_list .list_inner[num='19'] span:nth-child(8),
.img_list .list_inner[num='19'] span:nth-child(15),
.img_list .list_inner[num='19'] span:nth-child(16) {
grid-column: span 3;
}
/* 20 张:完整矩形(6 列,3+2+3+2+3+2+3+2 */
.img_list .list_inner[num='20'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='20'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='20'] span:nth-child(4),
.img_list .list_inner[num='20'] span:nth-child(5),
.img_list .list_inner[num='20'] span:nth-child(9),
.img_list .list_inner[num='20'] span:nth-child(10),
.img_list .list_inner[num='20'] span:nth-child(14),
.img_list .list_inner[num='20'] span:nth-child(15),
.img_list .list_inner[num='20'] span:nth-child(19),
.img_list .list_inner[num='20'] span:nth-child(20) {
grid-column: span 3;
}
/* 22 张:完整矩形(6 列,3+3+2+3+3+2+3+3 */
.img_list .list_inner[num='22'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='22'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='22'] span:nth-child(7),
.img_list .list_inner[num='22'] span:nth-child(8),
.img_list .list_inner[num='22'] span:nth-child(15),
.img_list .list_inner[num='22'] span:nth-child(16) {
grid-column: span 3;
}
/* 23 张:完整矩形(6 列,3+2+3+2+3+2+3+2+3 */
.img_list .list_inner[num='23'] {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 6px;
padding: 3px;
justify-content: unset;
align-content: unset;
align-items: unset;
}
.img_list .list_inner[num='23'] span {
margin: 0 !important;
padding: 0 !important;
width: auto;
height: auto;
grid-column: span 2;
}
.img_list .list_inner[num='23'] span:nth-child(4),
.img_list .list_inner[num='23'] span:nth-child(5),
.img_list .list_inner[num='23'] span:nth-child(9),
.img_list .list_inner[num='23'] span:nth-child(10),
.img_list .list_inner[num='23'] span:nth-child(14),
.img_list .list_inner[num='23'] span:nth-child(15),
.img_list .list_inner[num='23'] span:nth-child(19),
.img_list .list_inner[num='23'] span:nth-child(20) {
grid-column: span 3;
}
.img_list span img {
aspect-ratio: 1;
@@ -9,7 +9,7 @@
th:with="_cover = ${#strings.isEmpty(post.spec.cover) ? cover_img : thumbnail.gen(post.spec.cover, 's')}"
th:data-src="${_cover}" width="50"
height="50" alt="" uk-img="" loading="lazy"
th:src="@{/assets/img/lazyload.png}"></a>
th:src="@{/assets/img/logo.webp}"></a>
</div>
<div class="info nowrap">
<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="top">
<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_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>
+1 -1
View File
@@ -47,7 +47,7 @@
<i class="ri-heart-2-line"></i>
<span th:text="${moment.stats.upvote}"></span>
</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"
th:poster-data="${moment.metadata.name}"
th:banner = "${_cover}"
+6 -2
View File
@@ -8,9 +8,13 @@
<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>
+14 -75
View File
@@ -7,85 +7,24 @@
<div class="page_main uk-width-2-3@m">
<th:block th:replace="~{modules/header}" />
<div id="pjax-container">
<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="${#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')}
<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]},
groupParam = ${#lists.isEmpty(param.group) ? null : param.group[0]},
requestTag = ${not #strings.isEmpty(tag) ? tag : groupParam}
">
<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 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>
</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>
<th:block th:unless="${#strings.isEmpty(requestTag)}" th:each="photoGroup : ${groups}">
<th:block th:if="${#strings.equals(requestTag, photoGroup.spec.displayName) or #strings.equals(requestTag, photoGroup.metadata.name)}"
th:with="photoPage = ${photoFinder.list(page, photos.size, photoGroup.metadata.name)}">
<th:block th:replace="~{macro/home-photos :: home-photos(${photoPage},${groups},${photoGroup.spec.displayName},${photoGroup.metadata.name})}"></th:block>
</th:block>
</th:block>
</div>
<!-- 瀑布流自适应 -->
+2 -2
View File
@@ -12,12 +12,12 @@ spec:
name: 困困鱼 & Roozen
website: "https://www.halo.run/store/apps/app-TUSTB"
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"
issues: "https://github.com/chengzhongxue/halo-theme-pix/issues"
settingName: "theme-pix-setting"
configMapName: "theme-pix-configMap"
version: "1.2.5-4"
version: "1.2.5-8"
require: ">=2.20.0"
customTemplates:
page: