docs: PCL Intelligence 主页说明书

1. 删除了 Background 背景图
2. 使用内置 Banner 功能
3. 优化文档内容描述
4. 修改一言的地址,并加上内置的一条一言,用于 429
This commit is contained in:
Ad-closeNN
2025-08-10 15:57:09 +08:00
parent fcbbff2fa4
commit 1e836a0856
20 changed files with 210 additions and 54 deletions
+3 -32
View File
@@ -555,27 +555,6 @@ window.onresize = () => {
offset = offset - offset % 4;
document.documentElement.style.setProperty('--banner-height-extend', `${offset}px`);
}
// Background image loading detection https://github.com/afoim/fuwari/commit/aad0a7734be5f6e96a54a3aed51e49760ab3162a
const bgUrl = getComputedStyle(document.documentElement).getPropertyValue('--bg-url').trim();
const bgEnable = getComputedStyle(document.documentElement).getPropertyValue('--bg-enable').trim();
if (bgUrl && bgUrl !== 'none' && bgEnable === '1') {
const img = new Image();
const urlMatch = bgUrl.match(/url\(["']?([^"')]+)["']?\)/);
if (urlMatch) {
img.onload = function() {
// 背景图片完全加载后,显示背景并启用卡片透明效果
document.body.classList.add('bg-loaded');
document.documentElement.style.setProperty('--card-bg', 'var(--card-bg-transparent)');
document.documentElement.style.setProperty('--float-panel-bg', 'var(--float-panel-bg-transparent)');
};
img.onerror = function() {
// Keep cards opaque if background image fails to load
console.warn('Background image failed to load, keeping cards opaque');
};
img.src = urlMatch[1];
}
}
</script>
<script>
@@ -617,20 +596,12 @@ function createPhotoSwipe() {
}
const setup = () => {
if (!lightbox) {
createPhotoSwipe()
}
window.swup.hooks.on("page:view", () => {
if (lightbox) {
lightbox.destroy()
}
createPhotoSwipe()
})
window.swup.hooks.on(
"content:replace",
() => {
lightbox?.destroy?.()
},
{ before: true },
)
}
if (window.swup) {