From aafd211393c8a1c8571bcb855674206653bb5409 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Mon, 13 Oct 2025 08:36:35 +0800 Subject: docs: post weekly --- content/posts/weekly/50.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/content/posts/weekly/50.md b/content/posts/weekly/50.md index 29259cce..4e075567 100644 --- a/content/posts/weekly/50.md +++ b/content/posts/weekly/50.md @@ -8,14 +8,18 @@ tags: - 烹饪 - 生活 categories: 稻草人周刊 -date: 2025-10-11T23:32:00 -draft: true +date: 2025-10-13T08:36:00 +draft: false toc: true -banner: -endnotes: --- +{{< music cover="https://image.guhub.cn/uPic/2025/10/Where_Is_My_Husband!_-_Raye.png" title="WHERE IS MY HUSBAND!" artist="Raye" apple="https://music.apple.com/cn/album/where-is-my-husband/1838737596?i=1838737598" spotify="https://open.spotify.com/album/01sqwTOTrN9gaYQc1rr6Zw" netease="https://music.163.com/#/song?id=2747347844" >}} +> Baby, where the hell is my husband? +> +> What is taking him so long to find me? + +很癫很饿的一首歌。看完歌词我突然意识到,在如今的流行歌曲里,「Baby」俨然成为了一个没有实意的感叹词,算是很有意思的语言现象。 @@ -137,5 +141,3 @@ main { #烹饪 #生活 -## ⁂ · 星群 - -- cgit v1.2.3 From e3d1057a906f67f62c1b85da532a3a30e7bc3aff Mon Sep 17 00:00:00 2001 From: Eltrac Date: Mon, 13 Oct 2025 09:09:15 +0800 Subject: docs: new draft --- content/posts/weekly/51.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 content/posts/weekly/51.md diff --git a/content/posts/weekly/51.md b/content/posts/weekly/51.md new file mode 100644 index 00000000..9ad65e19 --- /dev/null +++ b/content/posts/weekly/51.md @@ -0,0 +1,24 @@ +--- +title: 稻草人周刊 Vol. 51 +subtitle: +tags: +categories: 稻草人周刊 +date: 2025-10-13 T08:36:00 +draft: true +toc: true +--- + +{{< music cover="https://image.guhub.cn/uPic/2025/10/Where_Is_My_Husband!_-_Raye.png" title="WHERE IS MY HUSBAND!" artist="Raye" apple="https://music.apple.com/cn/album/where-is-my-husband/1838737596?i=1838737598" spotify="https://open.spotify.com/album/01sqwTOTrN9gaYQc1rr6Zw" netease="https://music.163.com/#/song?id=2747347844" >}} + + + + +--- + +## ↯ · 当下 + +- 把 IntelliJ IDEA 卸载了,一方面是它真的太重了,另一方面是最近写代码的时候遇到好几个莫名其妙的问题,完全不知道怎么排查。如果不用图形界面的话,就完全不会有这些问题,所以我就全面转向 Zed 编辑器和命令行工具了。自己需要写 Java 代码的时间其实相对较少,用得更多的语言是 JavaScript、Lua 还有偶尔的 Go 语言,这些语言我都能够用一个简单轻量的编辑器,加上本身就足够好用、清晰的命令行工具搭建开发环境。 + + 明明 Spring Boot 的 `mvn spring-boot:run` 和 JavaScript 的 `npm run dev` 一样好用,命令行排查问题也更方便、加载速度也更快,真不知道为什么非要用一个又贵又难用的图形界面工具。 + +## ⋈︎ · 连接 -- cgit v1.2.3 From ab28dbf17de72a0caff664a7437d8f6af86d198b Mon Sep 17 00:00:00 2001 From: Eltrac Date: Mon, 13 Oct 2025 09:17:34 +0800 Subject: refactor: move comment toggle script to modular partial --- .../posts/action-menu/comment-button.html | 31 +++++++++++++++++++ layouts/_partials/scripts/action-menu-js.html | 35 ---------------------- 2 files changed, 31 insertions(+), 35 deletions(-) diff --git a/layouts/_partials/posts/action-menu/comment-button.html b/layouts/_partials/posts/action-menu/comment-button.html index bc079a4f..563bf4bd 100644 --- a/layouts/_partials/posts/action-menu/comment-button.html +++ b/layouts/_partials/posts/action-menu/comment-button.html @@ -1,3 +1,4 @@ +{{ /* button html */}} + +{{ /* button functionality */}} + diff --git a/layouts/_partials/scripts/action-menu-js.html b/layouts/_partials/scripts/action-menu-js.html index df1c498c..dca99369 100644 --- a/layouts/_partials/scripts/action-menu-js.html +++ b/layouts/_partials/scripts/action-menu-js.html @@ -3,45 +3,11 @@ /** * ================= * Initialize all Action Menu features - * - comment toggle * - comment count * - like * ================= */ -/** - * ================= - * Toggle Comment Section - * ================= - */ - -function initializeComments() { - const commentsToggle = document.getElementById('comments-toggle'); - const commentsSection = document.getElementById('comments-section'); - - if (!commentsToggle || !commentsSection) return; - - // click on toggle - commentsToggle.addEventListener('click', function() { - const isHidden = commentsSection.classList.contains('hidden'); - const entranceAnimation = 'animate-slide-in-down'; - const exitAnimation = 'animate-slide-out-up'; - - if (isHidden) { - // swtich on - commentsSection.classList.remove('hidden', exitAnimation); - commentsSection.classList.add(entranceAnimation); - } else { - // switch off - commentsSection.classList.remove(entranceAnimation); - commentsSection.classList.add(exitAnimation); - setTimeout(() => { - commentsSection.classList.add('hidden'); - }, 200); - } - }); -} - /** * ================= * Fetch and set Comment Count @@ -196,7 +162,6 @@ function initializeFeatures() { const pageId = "{{ $pageId }}"; if (!pageId) return; - initializeComments(); initializeLikes(pageId); initializeCommentCount(); } -- cgit v1.2.3 From 91fd13228da54baa8f6145efe8e81f7ce8e893d3 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Mon, 13 Oct 2025 09:17:57 +0800 Subject: refactor: move comment section to a modular partial --- layouts/_partials/posts/action-menu.html | 8 +------- layouts/_partials/posts/action-menu/comment-section.html | 8 ++++++++ 2 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 layouts/_partials/posts/action-menu/comment-section.html diff --git a/layouts/_partials/posts/action-menu.html b/layouts/_partials/posts/action-menu.html index fed2def8..ae19873a 100644 --- a/layouts/_partials/posts/action-menu.html +++ b/layouts/_partials/posts/action-menu.html @@ -8,11 +8,5 @@ {{ partial "posts/action-menu/info-links" . }} - - -
- -
+ {{ partial "posts/action-menu/comment-section" . }} diff --git a/layouts/_partials/posts/action-menu/comment-section.html b/layouts/_partials/posts/action-menu/comment-section.html new file mode 100644 index 00000000..be99487a --- /dev/null +++ b/layouts/_partials/posts/action-menu/comment-section.html @@ -0,0 +1,8 @@ + + + +
+ +
-- cgit v1.2.3 From 459b3fb1230c664f3ee0e6e27a54eb4fb22e2da6 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Mon, 13 Oct 2025 09:33:58 +0800 Subject: docs: fix date format --- content/posts/weekly/51.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/posts/weekly/51.md b/content/posts/weekly/51.md index 9ad65e19..c23e50ea 100644 --- a/content/posts/weekly/51.md +++ b/content/posts/weekly/51.md @@ -3,7 +3,7 @@ title: 稻草人周刊 Vol. 51 subtitle: tags: categories: 稻草人周刊 -date: 2025-10-13 T08:36:00 +date: 2025-10-13T09:19:00 draft: true toc: true --- -- cgit v1.2.3 From 9b33cfcc8fd8cc52d09c599efd06108b1e35d0d7 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Mon, 13 Oct 2025 09:34:25 +0800 Subject: refactor: move all action menu js to individual modules --- .../posts/action-menu/comment-button.html | 86 +++++++---- .../_partials/posts/action-menu/like-button.html | 122 ++++++++++++++- layouts/_partials/scripts.html | 4 - layouts/_partials/scripts/action-menu-js.html | 170 --------------------- 4 files changed, 177 insertions(+), 205 deletions(-) delete mode 100644 layouts/_partials/scripts/action-menu-js.html diff --git a/layouts/_partials/posts/action-menu/comment-button.html b/layouts/_partials/posts/action-menu/comment-button.html index 563bf4bd..d646ca27 100644 --- a/layouts/_partials/posts/action-menu/comment-button.html +++ b/layouts/_partials/posts/action-menu/comment-button.html @@ -1,4 +1,3 @@ -{{ /* button html */}} -{{ /* button functionality */}} diff --git a/layouts/_partials/posts/action-menu/like-button.html b/layouts/_partials/posts/action-menu/like-button.html index c4c50c91..c9e793b8 100644 --- a/layouts/_partials/posts/action-menu/like-button.html +++ b/layouts/_partials/posts/action-menu/like-button.html @@ -1,17 +1,18 @@ +{{ $pageID := .File.UniqueID | urlize }} -
+
@@ -24,3 +25,114 @@ color: #8B0000 !important; } + + diff --git a/layouts/_partials/scripts.html b/layouts/_partials/scripts.html index 2b84ea3c..edfb51b3 100644 --- a/layouts/_partials/scripts.html +++ b/layouts/_partials/scripts.html @@ -14,7 +14,3 @@ {{ partial "scripts/littlefoot-js" . }} {{ partial "scripts/libra-js" . }} {{ partial "scripts/aplayer-js" . }} - -{{ if .File }} - {{ partial "scripts/action-menu-js" (.File.UniqueID | urlize) }} -{{ end }} diff --git a/layouts/_partials/scripts/action-menu-js.html b/layouts/_partials/scripts/action-menu-js.html deleted file mode 100644 index dca99369..00000000 --- a/layouts/_partials/scripts/action-menu-js.html +++ /dev/null @@ -1,170 +0,0 @@ -{{ $pageId := . }} - -- cgit v1.2.3 From f4a68d0ab6efeb56831905db1ac04b53ff29de68 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Mon, 13 Oct 2025 09:36:46 +0800 Subject: refactor: remove unnecessary external js param --- config/_default/params.yaml | 2 -- layouts/_partials/scripts.html | 4 ---- layouts/_partials/scripts/littlefoot-js.html | 1 + 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/config/_default/params.yaml b/config/_default/params.yaml index 896c5714..bd3a3f87 100644 --- a/config/_default/params.yaml +++ b/config/_default/params.yaml @@ -5,8 +5,6 @@ mainSections: - fictions - library favicon: /favicon.png -externalJSFIles: - - /js/littlefoot.js footerExternalLinks: - name: GitHub link: https://github.com/BigCoke233/geek-death-project diff --git a/layouts/_partials/scripts.html b/layouts/_partials/scripts.html index edfb51b3..bc43802d 100644 --- a/layouts/_partials/scripts.html +++ b/layouts/_partials/scripts.html @@ -6,10 +6,6 @@ {{ end }} -{{- range .Site.Params.externalJSFiles }} - -{{- end }} - {{ partial "scripts/toc-js" . }} {{ partial "scripts/littlefoot-js" . }} {{ partial "scripts/libra-js" . }} diff --git a/layouts/_partials/scripts/littlefoot-js.html b/layouts/_partials/scripts/littlefoot-js.html index 69c9ce14..8ce2b721 100644 --- a/layouts/_partials/scripts/littlefoot-js.html +++ b/layouts/_partials/scripts/littlefoot-js.html @@ -1,3 +1,4 @@ +