diff --git a/themes/Ying/assets/css/main.css b/themes/Ying/assets/css/main.css index 6c21abaa..a5bf9705 100644 --- a/themes/Ying/assets/css/main.css +++ b/themes/Ying/assets/css/main.css @@ -4309,19 +4309,6 @@ input[type=submit] { -/* About Page Card Style */ -.about-card { - background-color: transparent; - border-radius: 0; - padding: 0; - box-shadow: none !important; - margin-bottom: 30px; -} -[data-theme="dark"] .about-card { - background-color: transparent; - box-shadow: none !important; -} - /* ══════════════════════════════════════════════════════════════════════════ 关于页 · B+C 方案(时间线 + 数据一览) ────────────────────────────────────────────────────────────────────────── @@ -4482,6 +4469,10 @@ input[type=submit] { font-size: var(--ab-fs-micro); letter-spacing: 0.1em; color: var(--sanji-color); } +/* 数据卡悬停:极轻的边框加深,与主题其他卡片观感一致(不加阴影跳变) */ +.ab-stat { transition: border-color 0.25s ease; } +.ab-stat:hover { border-color: rgba(0, 0, 0, 0.16); } +[data-theme="dark"] .ab-stat:hover { border-color: rgba(255, 255, 255, 0.16); } .ab-bars { margin-top: 26px; } .ab-bar { @@ -4518,16 +4509,6 @@ input[type=submit] { } [data-theme="dark"] .ab-footnote { color: #6b7280; } -/* ── 关于页响应式 ── */ -@media (max-width: 700px) { - .ab-attr { gap: 12px; } - .ab-attr .k { width: 54px; } - .ab-stats { gap: 8px; } - .ab-stat { padding: 13px 4px; } - .ab-stat .n { font-size: 1.4rem; } - .ab-bar .n { width: 48px; } -} - /* ══════════════════════════════════════════════════════════════════════════ 关于页 · 动效层(v7:纯 UIKit 官方写法,与其他页面完全同源,零自定义) ────────────────────────────────────────────────────────────────────────── @@ -4537,20 +4518,21 @@ input[type=submit] { —— 官方默认时长就在打包 CSS 里:[class*=uk-animation-]{duration:.5s}, fade 0.8s。★ 这里不再覆盖时长/keyframes(v6 的自定义层已删, 之前注释里说的「主题 0.2s 压制」实测并不存在)。 - · 内容组 repeat: true:移出视口重藏、滚回重播 —— 滚动时页面是活的。 + · 内容组不写 repeat:首次滚进播一次,滚回时保持就位不重播(用户定案)。 本文件只保留两件 UIKit 管不了的事:分类条宽度填充、减弱动效守卫。 ══════════════════════════════════════════════════════════════════════════ */ /* ── 1) 分类条:填充宽度从 0 长出 ── UIKit 只管「淡入+位移」,宽度是它不管的,用 transition 补。 条体被 scrollspy 判定进视口后会带上 .uk-scrollspy-inview,以此放行到目标宽度; - repeat 移出视口时类被摘掉 → 宽度回到 0,下次滚进重新长出。 */ + 不写 repeat → inview 类常驻,滚回时宽度保持、不重长。 */ .ab-bar .t i { width: 0; transition: width 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.15s; } -.ab-bar.uk-scrollspy-inview .t i, -.uk-scrollspy-inview .ab-bar .t i { +/* scrollspy 的 target 就是 .ab-bar 自身 → inview 类落在条体上, + 只此一个选择器即可(曾多写一条祖先版 .uk-scrollspy-inview .ab-bar,永不匹配) */ +.ab-bar.uk-scrollspy-inview .t i { width: var(--ab-bar-w, 0%); } @@ -4582,14 +4564,6 @@ input[type=submit] { .ab-bar .t i { width: var(--ab-bar-w, 0%); transition: none; } } -/* ── 6) 数据卡悬停:极轻的边框加深,与主题其他卡片观感一致 ── - 只为「可点」之外的静态卡增加一点呼吸感,不加阴影跳变。 */ -.ab-stat { - transition: border-color 0.25s ease; -} -.ab-stat:hover { border-color: rgba(0, 0, 0, 0.16); } -[data-theme="dark"] .ab-stat:hover { border-color: rgba(255, 255, 255, 0.16); } - /* ── 关于页响应式 ── */ @media (max-width: 700px) { .ab-attr { gap: 12px; } diff --git a/themes/Ying/assets/js/modules/mypjax.js b/themes/Ying/assets/js/modules/mypjax.js index 36f33397..26ad0d29 100644 --- a/themes/Ying/assets/js/modules/mypjax.js +++ b/themes/Ying/assets/js/modules/mypjax.js @@ -8,7 +8,10 @@ var pjax = new Pjax({ // 这里填写页面中改变的部分(和 CSS 选择器用法一样) selectors: ["title", "#pjax-container"], - cacheBust: false, + // ★ cacheBust: PJAX 取新页面时在 URL 上加时间戳参数,绕开浏览器/CDN + // 对 HTML 的长期缓存。没有它,HTML 缓存期内 PJAX 会把「部署前的旧页面」 + // 直接换进来(站点 HTML 的 Cache-Control 长达数天,踩过实锤)。 + cacheBust: true, elements: "a", // 拦截所有链接 switches: { "#pjax-container": Pjax.switches.default @@ -21,6 +24,50 @@ console.log("Pjax initialized:", pjax); })(); +// ── 静态资源版本同步(修复「部署后 PJAX 页面样式裸奔」)── +// ───────────────────────────────────────────────────────────── +// 根因:Pjax 只换 title 和 #pjax-container,
里的指纹 CSS +// (style.min.