Skip to content

Releases: mufengyian/theme-earthquake

v1.1.3

Choose a tag to compare

@github-actions github-actions released this 03 Jul 17:13

Automated release for theme-earthquake v1.1.3.

Commit

  • SHA: e151b49fff07f9ea4e0064a59810ee3f3dce4652

Message

v1.1.3: 修复悬浮评论按钮跳回顶部 + TOC scrollIntoView 干扰锚点跳转

根因确认:
点击悬浮评论按钮 href=#post-comment 触发浏览器滚动到底部,
滚动事件触发 TOC 的 scroll 监听器,setActiveHeading 调用
link.scrollIntoView(block:nearest)。由于 .toc 无 overflow 不是
滚动容器,且 sticky TOC 在长文章中会脱离 sticky 范围滚出视口,
scrollIntoView 向上查找可滚动祖先最终滚动整个页面 → 跳回顶部。

修复内容:
1. src/assets/utils/toc.ts setActiveHeading 重写:
   - 分离 class 切换与滚动逻辑
   - 检查 active link 是否在 .toc 容器可视区域内
   - 检查 .toc 容器本身是否在视口内
   - 仅当 link 不可见且容器可见时才调用 scrollIntoView
   - 触摸设备仍跳过 scrollIntoView

2. src/assets/styles/main.css 为 .toc 添加滚动上下文:
   - max-height: calc(100vh - 12rem)
   - overflow-y: auto 使其成为独立滚动容器
   - overscroll-behavior: contain 防止滚动链
   - OKLCH 滚动条样式与全局一致

验证场景:
- 点击悬浮评论按钮 → 平滑滚动到评论区不再跳回顶部
- TOC 目录高亮 → 仅在 .toc 容器内滚动不影响页面位置
- TOC 滚出视口(长文章底部) → 不再调用 scrollIntoView

版本号 1.1.2 → 1.1.3

Changed files

M	src/assets/styles/main.css
M	src/assets/utils/toc.ts
M	theme.yaml

v1.1.2

Choose a tag to compare

@github-actions github-actions released this 03 Jul 16:09

Automated release for theme-earthquake v1.1.2.

Commit

  • SHA: 044c953fca69de5ce00cec883b6e20575c758a4b

Message

fix: 修复悬浮评论按钮点击后页面跳回顶部的问题

- 改进 setActiveHeading 逻辑:仅当 TOC 链接在容器中不可见时才调用 scrollIntoView
- 为 .toc 容器添加 max-height 和 overflow-y,创建独立滚动上下文
- 彻底解决 TOC 的 scrollIntoView 干扰锚点跳转导致页面跳回顶部的问题

Changed files

M	src/assets/styles/main.css
M	src/assets/utils/toc.ts

v1.0.10

Choose a tag to compare

@github-actions github-actions released this 02 Jul 13:03

Automated release for theme-earthquake v1.0.10.

Commit

  • SHA: 95fea2aab768c1cc9a3136c5340a11e306fd0db5

Message

fix: revert fragment references (widgets are raw HTML, not fragments)

Changed files

M	public/modules/sidebar.html

v1.1.1

Choose a tag to compare

@github-actions github-actions released this 03 Jul 09:01

Automated release for theme-earthquake v1.1.1.

Commit

  • SHA: c11b25c01845f54afcd3e1b09fb9752fdcaa68b2

Message

fix: glass navbar invisible on dark-bg presets (ink to crimson) in light mode

Changed files

M	src/assets/styles/main.css

v1.1.0

Choose a tag to compare

@github-actions github-actions released this 02 Jul 15:50

Automated release for theme-earthquake v1.1.0.

Commit

  • SHA: 1baafb830503df3697cea1c5ce1ccba8f79b031f

Message

refactor: OKLCH配色系统重构 + ARIA/transition/focus优化

- 23个配色方案重命名为中文诗意命名
- 毛玻璃导航栏跟随主题色相
- 修复导航栏文字对比度问题
- 添加ARIA role/label/hidden
- transition-all改为具体属性
- focus-visible跟随主题色
- 硬编码语义颜色改为token

Changed files

M	src/assets/styles/main.css

v1.0.9

Choose a tag to compare

@github-actions github-actions released this 24 Jun 16:44
8c037d7

Automated release for theme-earthquake v1.0.9.

Commit

  • SHA: c90c8cdfa05caf83e6ce93f91429ff27a308025f

Message

v1.0.10: refactor, Pjax, site-stats (#1)

- Split image-preview.ts into 5 modules (preview-types/i18n/dom/focus/core)
- Replaced qrious.min.js (30KB) with inline QR generator
- Extracted post/page common article-layout fragment (post.astro 292->13 lines)
- Added Pjax smooth navigation with loading indicator
- Added site-stats sidebar widget (posts/comments/visits/running days)
- Cleaned up old files (image-preview.ts, qrious.min.js)

Changed files

M	i18n/zh_CN.properties
D	public/assets/js/qrious.min.js
M	public/assets/qrcode-share.html
A	public/modules/article-layout.html
M	public/modules/sidebar.html
A	public/modules/widgets/site-stats.html
M	settings.yaml
M	src/assets/main.ts
M	src/assets/styles/main.css
D	src/assets/utils/image-preview.ts
A	src/assets/utils/pjax.ts
A	src/assets/utils/preview-core.ts
A	src/assets/utils/preview-dom.ts
A	src/assets/utils/preview-focus.ts
A	src/assets/utils/preview-i18n.ts
A	src/assets/utils/preview-types.ts
M	src/pages/page.astro
M	src/pages/post.astro

v1.0.8

Choose a tag to compare

@github-actions github-actions released this 24 Jun 09:11

Automated release for theme-earthquake v1.0.8.

Commit

  • SHA: 15a69abc9f4c5f6d8ca41c6d42c5ac452ad2c430

Message

v1.0.8: 接入新 logo,优化 README 截图展示

Changed files

M	README.md
A	docs/screenshots/desktop-dark-home.png
A	docs/screenshots/desktop-dark-post.png
A	docs/screenshots/desktop-light-home.png
A	docs/screenshots/mobile-dark-home.png
A	docs/screenshots/mobile-light-home.png
A	docs/screenshots/mobile-light-post.png
A	docs/screenshots/mobile-light-tags.png
A	docs/screenshots/mobile-light-toc.png
A	public/assets/images/logo.png
A	public/assets/images/logo.svg
M	src/components/BaseHead.astro
M	theme.yaml

v1.0.7

Choose a tag to compare

@github-actions github-actions released this 24 Jun 08:47

Automated release for theme-earthquake v1.0.7.

Commit

  • SHA: 89cb72b98403e8254a7eb5a607903788c1a97d98

Message

fix(seo): 修复 excerpt/canonical/JSON-LD 等 SEO 标签问题 (v1.0.7)

- post.spec.excerpt 改为 post.status.excerpt(spec.excerpt 是对象,status.excerpt 是字符串)
- canonical 改用 th:if 分支判断,修复 th:if+th:unless+th:with 组合导致 link 不渲染
- JSON-LD image 用 #strings.isEmpty 判断(cover 空字符串时不再输出 site.url)
- JSON-LD logo 无站点 logo 时回退主题默认 logo(不再输出 null)
- JSON-LD description 同样改用 post.status.excerpt

Changed files

M	src/components/BaseHead.astro
M	theme.yaml

v1.0.6

Choose a tag to compare

@github-actions github-actions released this 24 Jun 08:19

Automated release for theme-earthquake v1.0.6.

Commit

  • SHA: 487887fdc81eb764b28869b7dfd5a6ae8ff1a620

Message

fix(seo): 修复开启 OG/JSON-LD 时文章页 500 错误 (v1.0.6)

- 删除 post.spec.lastModifyTime 引用(PostSpec 无此字段,SpEL 求值抛异常)
- modified_time / dateModified 统一用 publishTime
- #dates.format 改为 #temporals.format(publishTime 是 java.time.Instant)
- JSON-LD author.name 改用 site.title(contributors 是 List<String>)

Changed files

M	src/components/BaseHead.astro
M	theme.yaml

v1.0.5

Choose a tag to compare

@github-actions github-actions released this 24 Jun 07:39

Automated release for theme-earthquake v1.0.5.

Commit

  • SHA: f169f48d0245b7a077cbe7b681e0370e4c18ea42

Message

Revert "fix(seo): 修复开启 OG/JSON-LD 时文章页 500 错误 (v1.0.6)"

This reverts commit fc4faaa80ca98aa520c62830dda73594bc2ee071.

Changed files

M	src/components/BaseHead.astro
M	theme.yaml