From 2f00d41861f1b06c2ff7fa4e67e14e647c3c34b0 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Thu, 12 Dec 2024 01:24:37 +0800 Subject: [PATCH 1/4] fix: refreshing mermaid theme may fail (#2113) --- _javascript/modules/components/mermaid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_javascript/modules/components/mermaid.js b/_javascript/modules/components/mermaid.js index 2b4759f..91df4f2 100644 --- a/_javascript/modules/components/mermaid.js +++ b/_javascript/modules/components/mermaid.js @@ -11,7 +11,7 @@ function refreshTheme(event) { const mermaidList = document.getElementsByClassName(MERMAID); [...mermaidList].forEach((elem) => { - const svgCode = elem.previousSibling.children.item(0).innerHTML; + const svgCode = elem.previousSibling.children.item(0).textContent; elem.textContent = svgCode; elem.removeAttribute('data-processed'); }); From 1b4e318dc1cd57da812e11bf69ebb06083c213fc Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sun, 15 Dec 2024 14:43:07 +0800 Subject: [PATCH 2/4] fix(ui): gap between TOC entries is inconsistent (#2119) In desktop mode, H2 and the first sub-level H3 in the TOC are too close. --- _includes/toc.html | 2 +- _sass/pages/_post.scss | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/_includes/toc.html b/_includes/toc.html index 0f87726..888466d 100644 --- a/_includes/toc.html +++ b/_includes/toc.html @@ -3,7 +3,7 @@ {% if enable_toc %}
{% endif %} diff --git a/_sass/pages/_post.scss b/_sass/pages/_post.scss index 9348c56..f51f3b9 100644 --- a/_sass/pages/_post.scss +++ b/_sass/pages/_post.scss @@ -275,10 +275,6 @@ header { margin: 0.4rem 0; } - &:first-child { - margin-top: 0; - } - a { padding: 0.2rem 0 0.2rem 1.25rem; } From e0c3fafa470eb12bd04ffdf198018bc28b6de20d Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sun, 15 Dec 2024 14:51:51 +0800 Subject: [PATCH 3/4] fix(ui): slow script loading hides TOC fade-up effect in desktop (#2120) --- _sass/pages/_post.scss | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/_sass/pages/_post.scss b/_sass/pages/_post.scss index f51f3b9..9b8fa7e 100644 --- a/_sass/pages/_post.scss +++ b/_sass/pages/_post.scss @@ -220,14 +220,11 @@ header { @-webkit-keyframes fade-up { from { opacity: 0; - position: relative; - top: 2rem; + margin-top: 4rem; } to { opacity: 1; - position: relative; - top: 0; } } @@ -247,6 +244,7 @@ header { %top-cover { content: ''; display: block; + position: -webkit-sticky; position: sticky; top: 0; width: 100%; @@ -257,13 +255,16 @@ header { #toc-wrapper { top: 0; transition: top 0.2s ease-in-out; - -webkit-animation: fade-up 0.8s; - animation: fade-up 0.8s; overflow-y: auto; max-height: 100vh; scrollbar-width: none; margin-top: 2rem; + &:not(.invisible) { + -webkit-animation: fade-up 0.8s; + animation: fade-up 0.8s; + } + ul { list-style: none; font-size: 0.85rem; From c174f62f268859645b8444d35f7cf87789eff28f Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sun, 15 Dec 2024 13:05:48 +0000 Subject: [PATCH 4/4] chore(release): 7.2.3 ## [7.2.3](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.2.2...v7.2.3) (2024-12-15) ### Bug Fixes * refreshing mermaid theme may fail ([#2113](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2113)) ([2f00d41](https://github.com/cotes2020/jekyll-theme-chirpy/commit/2f00d41861f1b06c2ff7fa4e67e14e647c3c34b0)) * **ui:** gap between TOC entries is inconsistent ([#2119](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2119)) ([1b4e318](https://github.com/cotes2020/jekyll-theme-chirpy/commit/1b4e318dc1cd57da812e11bf69ebb06083c213fc)) * **ui:** slow script loading hides TOC fade-up effect in desktop ([#2120](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2120)) ([e0c3faf](https://github.com/cotes2020/jekyll-theme-chirpy/commit/e0c3fafa470eb12bd04ffdf198018bc28b6de20d)) --- docs/CHANGELOG.md | 8 ++++++++ jekyll-theme-chirpy.gemspec | 2 +- package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 4690d7a..74fb88a 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [7.2.3](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.2.2...v7.2.3) (2024-12-15) + +### Bug Fixes + +* refreshing mermaid theme may fail ([#2113](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2113)) ([2f00d41](https://github.com/cotes2020/jekyll-theme-chirpy/commit/2f00d41861f1b06c2ff7fa4e67e14e647c3c34b0)) +* **ui:** gap between TOC entries is inconsistent ([#2119](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2119)) ([1b4e318](https://github.com/cotes2020/jekyll-theme-chirpy/commit/1b4e318dc1cd57da812e11bf69ebb06083c213fc)) +* **ui:** slow script loading hides TOC fade-up effect in desktop ([#2120](https://github.com/cotes2020/jekyll-theme-chirpy/issues/2120)) ([e0c3faf](https://github.com/cotes2020/jekyll-theme-chirpy/commit/e0c3fafa470eb12bd04ffdf198018bc28b6de20d)) + ## [7.2.2](https://github.com/cotes2020/jekyll-theme-chirpy/compare/v7.2.1...v7.2.2) (2024-12-06) ### Bug Fixes diff --git a/jekyll-theme-chirpy.gemspec b/jekyll-theme-chirpy.gemspec index baef126..3d7dc5c 100644 --- a/jekyll-theme-chirpy.gemspec +++ b/jekyll-theme-chirpy.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "jekyll-theme-chirpy" - spec.version = "7.2.2" + spec.version = "7.2.3" spec.authors = ["Cotes Chung"] spec.email = ["cotes.chung@gmail.com"] diff --git a/package.json b/package.json index c30b42b..b786e34 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jekyll-theme-chirpy", - "version": "7.2.2", + "version": "7.2.3", "description": "A minimal, responsive, and feature-rich Jekyll theme for technical writing.", "repository": { "type": "git",