Skip to content

2.9.0

Latest
Compare
Choose a tag to compare
@EveSunMaple EveSunMaple released this 28 Dec 15:49
· 1 commit to main since this release

Important

所有 MDX 组件已经移动至 components/mdx 目录之下,更新版本后请及时修改引用路径!

[2.9.0] - 2024-12-28

Features

  • 新增 mdx/TocCopllapse.astro 组件用于在文章中添加折叠的目录(小屏幕侧边栏无法显示时才出现)
    • 新增 remark-heading-extractor.mjs 在服务端提取标题并存贮在 frontmatter

Note

原本想通过此组件实现在服务端生成所有目录, 但发现侧边栏并不在 Swup 的按需渲染范围之中, 所以只能保留在客户端生成目录的形式

  • 新增 TocCard.astro (拆分 Tool.astro)

Refactored

  • 取消了昼夜颜色的切换动画
  • 修改侧边栏结构, 删除了多余的组件合并为 ProfileCard.astro 并优化了样式
    • 鼠标放在图标上新增小动画
    • 微调了菜单与子菜单的间距
  • 完全重写 License.astro 组件的样式与构建逻辑
    • 文末添加 'Thanks for reading!' (平衡页面)
    • CC 图标移动至左上方
    • 在 License 中添加文章信息如: 作者\发布日期\字数\阅读时长\永久链接\分类\标签
    • 重写原本的分享组件
  • 针对所有 MDX 组件进行了样式优化
    • 对所有 alert 使用统一格式
    • 修改 Kbd.astro 新增大小 size 选项
    • 重写 Collapse.astro 组件使用自定义格式而非由 DaisyUI 提供
    • 针对 Diff.astro 组件添加了 rightAlt 等选项
    • 修改 TimeLine.astro 组件的样式并添加了动效
    • 修改 LinkCard.astro 组件的结构与样式
    • 新增 TocCopllapse.astro 组件
  • 文字排版:行间距修改
  • 重写 badge 的样式而不是使用 DaisyUI 提供的默认样式
    • TagCard.astroCategoryCard.astro 中使用全新的 badge 样式
  • 重写 EnvelopeCard.astro 组件的样式
    • 文章信息展示修改
      • 去除原本堆砌的 DaisyUI 样式
      • 文章发表日期与字数统计等内容收纳至上方
      • 文章分类与标签信息使用全新的 badge 样式
      • 取消原本指针覆盖在图片上出现的小箭头样式
    • 同理修改 BaseCard.astro 组件中文章信息的样式
  • 修改 ProjectCard.astro 组件的样式与逻辑
    • 收纳逻辑至 utils/github.ts 等文件中
    • 添加针对获取数据的格式化处理
    • 代码语言改至左侧, 仓库信息放在右侧
    • 删除针对 Watch 的数据统计
  • 修改 Navbar.astro 组件的样式与逻辑
    • 使用调换重做顶部菜单按钮
    • 添加顶部菜单滑入\滑出动画
  • 将分页制作为全新的可重用组件 Pagination.astro
  • 隐藏了 TocCard 的滑动条
  • 修改了 code 的样式
  • 布局文件微调

Fix

  • 修复了原 CategoryCard.astro 组件中错误的变量命名
  • 修复了图片放大导致的页面触摸失效问题

Chore

  • 基本上的变量都有了 interface 的定义
  • 基本上的图标都使用了 iconify 提供的图标

EN

Important

All MDX components have been moved to the components/mdx directory. Please update the import paths after upgrading to the new version!

[2.9.0] - 2024-12-28

Features

  • Added mdx/TocCollapse.astro component to add a collapsible table of contents in articles (it only appears when the sidebar is not visible on small screens).
    • Added remark-heading-extractor.mjs to extract headings on the server side and store them in frontmatter.

Note

The initial intention was to generate the entire table of contents on the server side, but it was found that the sidebar is not part of the on-demand rendering range of Swup, so the table of contents can only be generated on the client side.

  • Added TocCard.astro (split from Tool.astro).

Refactored

  • Removed the day/night theme toggle animation.
  • Modified the sidebar structure, removed redundant components, merged them into ProfileCard.astro, and optimized the styles.
    • Added a small animation when hovering over icons.
    • Adjusted the spacing between the menu and submenu.
  • Completely rewrote the style and build logic of the License.astro component.
    • Added 'Thanks for reading!' at the end of the page (to balance the layout).
    • Moved the CC icon to the top-left corner.
    • Added article information in the License, such as: author, publish date, word count, reading time, permalink, category, and tags.
    • Rewritten the original share component.
  • Optimized styles for all MDX components.
    • Unified format for all alert components.
    • Modified Kbd.astro and added a size option.
    • Rewritten Collapse.astro component to use custom formats instead of DaisyUI.
    • Added options like rightAlt for the Diff.astro component.
    • Modified the styles of TimeLine.astro and added animations.
    • Changed the structure and style of LinkCard.astro.
    • Added TocCollapse.astro component.
  • Adjusted line spacing in typography.
  • Rewritten the badge styles instead of using DaisyUI’s default.
    • Used the new badge style in TagCard.astro and CategoryCard.astro.
  • Rewritten the styles of EnvelopeCard.astro.
    • Modified the article information display.
      • Removed the piled-up DaisyUI styles.
      • Moved the article publish date and word count to the top.
      • Used the new badge style for article category and tag information.
      • Removed the small arrow style that appeared over images when hovering.
    • Similarly, modified the article information styles in BaseCard.astro.
  • Modified the style and logic of ProjectCard.astro.
    • Moved logic to utils/github.ts and other files.
    • Added formatting for data fetching.
    • Moved the code language to the left and repository info to the right.
    • Removed the data statistics for Watch.
  • Modified the style and logic of Navbar.astro.
    • Reworked the top menu button.
    • Added sliding animations for the top menu.
  • Made pagination a completely reusable component, Pagination.astro.
  • Hid the scrollbar in TocCard.
  • Modified the styles of code.
  • Minor tweaks in layout files.

Fix

  • Fixed incorrect variable naming in the original CategoryCard.astro.
  • Fixed an issue where image zooming caused touch interaction failures on the page.

Chore

  • Most variables now have interface definitions.
  • Most icons have been replaced with those provided by iconify.

Full Changelog: v2.9.0-rc...v2.9.0