~cytrogen/blog-public

blog-public/index.html -rw-r--r-- 24.6 KiB
88eebf3dCytrogen Deploy 2026-02-19 08:34:27 3 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<!DOCTYPE html><html lang="zh" data-theme="dark"><head><meta charset="utf-8"><meta name="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Cytrogen 的个人博客</title><meta name="description" content="Cytrogen 的个人博客,Cytrogen's Blog"><link rel="icon" href="favicon.png"><link rel="canonical"><link rel="webmention" href="https://webmention.io/cytrogen.icu/webmention"><link rel="me" href="https://m.otter.homes/@Cytrogen"><link rel="me" href="https://github.com/cytrogen"><meta name="fediverse:creator" content="@Cytrogen@m.otter.homes"><link rel="preload" href="fonts/opensans-regular-latin.woff2" as="font" type="font/woff2" crossorigin="anonymous"><style>@font-face {
  font-family: 'Open Sans';
  src: url('fonts/opensans-regular-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  size-adjust: 107%;
  ascent-override: 97%;
  descent-override: 25%;
  line-gap-override: 0%;
}
</style><script>(function() {
  try {
    // 优先级:用户选择 > 系统偏好 > 默认浅色
    const saved = localStorage.getItem('theme');
    const theme = saved || 
      (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
    
    document.documentElement.setAttribute('data-theme', theme);
    document.documentElement.style.colorScheme = theme;
  } catch (error) {
    // 失败时使用默认主题,不阻塞渲染
    document.documentElement.setAttribute('data-theme', 'light');
  }
})();
</script><link rel="stylesheet" href="css/ares.css"><script data-netlify-skip-bundle="true">(function() {
  document.addEventListener('DOMContentLoaded', function() {
    const theme = document.documentElement.getAttribute('data-theme');
    const pageWrapper = document.getElementById('page-wrapper');
    if (pageWrapper && theme) {
      pageWrapper.setAttribute('data-theme', theme);
    }
  });
})();

</script><!-- hexo injector head_end start -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css">

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/hexo-math@4.0.0/dist/style.css">
<!-- hexo injector head_end end --><meta name="generator" content="Hexo 8.1.1"><link rel="alternate" href="atom.xml" title="Cytrogen 的个人博客" type="application/atom+xml">
</head><body><div id="page-wrapper"><a class="skip-link" href="#main-content">跳到主要内容</a><div class="wrap"><header><a class="logo-link" href="index.html"><img src="favicon.png" alt="logo"></a><div class="h-card visually-hidden"><img class="u-photo" src="https://cytrogen.icu/favicon.png" alt="Cytrogen"><a class="p-name u-url u-uid" href="https://cytrogen.icu">Cytrogen</a><p class="p-note">Cytrogen 的个人博客,Cytrogen's Blog</p><a class="u-url" rel="me noopener" target="_blank" href="https://m.otter.homes/@Cytrogen">Mastodon</a><a class="u-url" rel="me noopener" target="_blank" href="https://github.com/cytrogen">GitHub</a></div><nav class="site-nav"><div class="nav-main"><div class="nav-primary"><ul class="nav-list hidden-mobile"><li class="nav-item"><a class="nav-link active" href="index.html">首页</a></li></ul><div class="nav-tools"><div class="language-menu"><button class="language-toggle" type="button"><svg class="icon icon-globe" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" focusable="false"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm7.5-6.923c-.67.204-1.335.82-1.887 1.855A7.97 7.97 0 0 0 5.145 4H7.5V1.077zM4.09 4a9.267 9.267 0 0 1 .64-1.539 6.7 6.7 0 0 1 .597-.933A7.025 7.025 0 0 0 2.255 4H4.09zm-.582 3.5c.03-.877.138-1.718.312-2.5H1.674a6.958 6.958 0 0 0-.656 2.5h2.49zM4.847 5a12.5 12.5 0 0 0-.338 2.5H7.5V5H4.847zM8.5 5v2.5h2.99a12.495 12.495 0 0 0-.337-2.5H8.5zM4.51 8.5a12.5 12.5 0 0 0 .337 2.5H7.5V8.5H4.51zm3.99 0V11h2.653c.187-.765.306-1.608.338-2.5H8.5zM5.145 12c.138.386.295.744.468 1.068.552 1.035 1.218 1.65 1.887 1.855V12H5.145zm.182 2.472a6.696 6.696 0 0 1-.597-.933A9.268 9.268 0 0 1 4.09 12H2.255a7.024 7.024 0 0 0 3.072 2.472zM3.82 11a13.652 13.652 0 0 1-.312-2.5h-2.49c.062.89.291 1.733.656 2.5H3.82zm6.853 3.472A7.024 7.024 0 0 0 13.745 12H11.91a9.27 9.27 0 0 1-.64 1.539 6.688 6.688 0 0 1-.597.933zM8.5 12v2.923c.67-.204 1.335-.82 1.887-1.855A7.97 7.97 0 0 0 10.855 12H8.5zm3.68-1h2.146c.365-.767.594-1.61.656-2.5h-2.49a13.65 13.65 0 0 1-.312 2.5zm2.802-3.5a6.959 6.959 0 0 0-.656-2.5H12.18c.174.782.282 1.623.312 2.5h2.49zM11.27 2.461c.247.464.462.98.64 1.539h1.835a7.024 7.024 0 0 0-3.072-2.472c.218.284.418.598.597.933zM10.855 4a7.966 7.966 0 0 0-.468-1.068C9.835 1.897 9.17 1.282 8.5 1.077V4h2.355z"></path></svg><span>中文</span></button><div class="language-dropdown"><a class="language-option" href="/en/index.html">English</a></div></div></div><div class="nav-controls"><div class="more-menu hidden-mobile"><button class="more-toggle" type="button"><span>更多</span><svg class="icon icon-chevron-down" width="12" height="12" viewBox="0 0 12 12" fill="currentColor" aria-hidden="true" focusable="false"><path d="M6 8.825c-.2 0-.4-.1-.5-.2l-3.3-3.3c-.3-.3-.3-.8 0-1.1s.8-.3 1.1 0l2.7 2.7 2.7-2.7c.3-.3.8-.3 1.1 0s.3.8 0 1.1l-3.3 3.3c-.1.1-.3.2-.5.2z"></path></svg></button><div class="more-dropdown"><ul class="dropdown-list"><li class="dropdown-item"><a class="nav-link" href="/archives/index.html">归档</a></li><li class="dropdown-item"><a class="nav-link" href="/categories/index.html">分类</a></li><li class="dropdown-item"><a class="nav-link" href="/tags/index.html">标签</a></li><li class="dropdown-item"><a class="nav-link" href="/about/index.html">关于</a></li><li class="dropdown-item"><a class="nav-link" href="/sitemap/index.html">领地地图</a></li></ul></div></div><div class="theme-switcher"><button class="theme-toggle" type="button" role="switch" aria-pressed="false" aria-label="切换主题"><div class="theme-icon moon-icon"><svg class="icon icon-moon" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" focusable="false"><path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"></path></svg></div><div class="theme-icon sun-icon"><svg class="icon icon-sun" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" focusable="false"><path d="M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"></path></svg></div></button></div><details class="mobile-menu-details hidden-desktop"><summary class="hamburger-menu" aria-label="nav.menu"><svg class="icon icon-bars" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" focusable="false"><path d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"></path></svg><span class="menu-text">nav.menu</span></summary><div class="mobile-menu-dropdown"><ul class="mobile-nav-list"><li class="mobile-nav-item"><a class="mobile-nav-link" href="index.html">首页</a></li><li class="mobile-nav-item"><a class="mobile-nav-link" href="/archives/index.html">归档</a></li><li class="mobile-nav-item"><a class="mobile-nav-link" href="/categories/index.html">分类</a></li><li class="mobile-nav-item"><a class="mobile-nav-link" href="/tags/index.html">标签</a></li><li class="mobile-nav-item"><a class="mobile-nav-link" href="/about/index.html">关于</a></li><li class="mobile-nav-item"><a class="mobile-nav-link" href="/sitemap/index.html">领地地图</a></li></ul></div></details></div></div></div></nav></header><main class="container" id="main-content" tabindex="-1"><div class="h-feed"><span class="p-name visually-hidden">Cytrogen 的个人博客</span><ul class="home post-list"><li class="post-list-item"><article class="post-block h-entry"><h2 class="post-title"><a class="post-title-link u-url p-name" href="posts/cf35.html">4 个字符为一组构成的城市</a></h2><div class="post-info"><time class="post-date dt-published" datetime="2026-02-16T05:00:00.000Z">2/16/2026</time><time class="dt-updated visually-hidden" datetime="2026-02-19T07:42:07.353Z"></time></div><div class="post-content p-summary"><p>从小时候记事起,我就有一个奇怪的习惯,那就是看到商店招牌,会自动将上面的字符以 4 个一组的形式排列起来。</p></div><a class="read-more" href="posts/cf35.html">...阅读全文</a></article></li><li class="post-list-item"><article class="post-block h-entry"><h2 class="post-title"><a class="post-title-link u-url p-name" href="posts/cc52.html">玩《茂林源记》</a></h2><div class="post-info"><time class="post-date dt-published" datetime="2026-02-15T05:00:00.000Z">2/15/2026</time><time class="dt-updated visually-hidden" datetime="2026-02-19T07:42:07.353Z"></time></div><div class="post-content p-summary"><p>《茂林源记》,或称 Root(以下也这么称呼),是一个区域控制类桌游。虽然这么说,但它的标签还是很多的,例如德式桌游标准的得分制、应该被划分给美式桌游的阵营机制等等。我先前为这款游戏写过一些评价,本来没有打算继续去写该游戏的说明,但介于自己刚写了个扫雷的入门说明,最终还是写下了这篇文章。</p></div><a class="read-more" href="posts/cc52.html">...阅读全文</a></article></li><li class="post-list-item"><article class="post-block h-entry"><h2 class="post-title"><a class="post-title-link u-url p-name" href="posts/9408.html">用笑脸玩扫雷</a></h2><div class="post-info"><time class="post-date dt-published" datetime="2026-02-14T05:00:00.000Z">2/14/2026</time><time class="dt-updated visually-hidden" datetime="2026-02-19T07:42:07.357Z"></time></div><div class="post-content p-summary"><p>想必大家都有玩过「扫雷」这款游戏,尤其是经历过 Windows 早年版本时代的人们,在计算机的开始菜单里找了半天,好不容易找到「游戏」文件夹,里面赫然躺着一个应用程序。双击打开,看到一个黄黄的微笑,心想这游戏肯定很简单吧!然后便被炸弹炸死。</p></div><a class="read-more" href="posts/9408.html">...阅读全文</a></article></li><li class="post-list-item"><article class="post-block h-entry"><h2 class="post-title"><a class="post-title-link u-url p-name" href="posts/df9e.html">女人的血</a></h2><div class="post-info"><time class="post-date dt-published" datetime="2026-02-12T05:00:00.000Z">2/12/2026</time><time class="dt-updated visually-hidden" datetime="2026-02-19T07:42:07.353Z"></time></div><div class="post-content p-summary"><p>女人,或者说有雌性生殖器官的人,又或者说需要生产卵子来进行繁殖生育的哺乳动物,都会有月经吧。以防万一有人不知道月经的底层逻辑,它本质上是卵子死去时流出的血液。女人需要每个月更换卵子,经历「流血的七天、安全期、卵子生成的发情期」这样的 28 天循环,直到无法生育。这期间有一个例外,那便是怀孕。</p></div><a class="read-more" href="posts/df9e.html">...阅读全文</a></article></li><li class="post-list-item"><article class="post-block h-entry"><h2 class="post-title"><a class="post-title-link u-url p-name" href="posts/9027.html">读《那片血一般红的杜鹃花》</a></h2><div class="post-info"><time class="post-date dt-published" datetime="2026-02-07T05:00:00.000Z">2/7/2026</time><time class="dt-updated visually-hidden" datetime="2026-02-19T07:42:07.357Z"></time></div><div class="post-content p-summary"><p>我这个学期开始上中文课了。这节课是短篇小说课,主要是阅读上个世纪台湾、大陆等作者们的短篇小说。</p>
<p>开课要阅读的第一本叫作《那片血一般红的杜鹃花》,出自于《白先勇文集》的第二卷「台北人」。</p>
<p>这是一个第一人称视角的故事,但「我」并非故事的主角,而是故事的旁观者。而故事采取的叙事手法是倒叙。</p></div><a class="read-more" href="posts/9027.html">...阅读全文</a></article></li><li class="post-list-item"><article class="post-block h-entry"><h2 class="post-title"><a class="post-title-link u-url p-name" href="posts/c089.html">想法在丙午岁始迭代</a></h2><div class="post-info"><time class="post-date dt-published" datetime="2026-02-01T05:00:00.000Z">2/1/2026</time><time class="dt-updated visually-hidden" datetime="2026-02-19T07:42:07.353Z"></time></div><div class="post-content p-summary"><p>这个月里我做了很多在笔记本上的工作,所以在阅读文章上花费的时间跟精力都变少了很多。</p></div><a class="read-more" href="posts/c089.html">...阅读全文</a></article></li><li class="post-list-item"><article class="post-block h-entry"><h2 class="post-title"><a class="post-title-link u-url p-name" href="posts/2590.html">最能保障「数字主权」的 VPS 公司</a></h2><div class="post-info"><time class="post-date dt-published" datetime="2026-01-30T05:00:00.000Z">1/30/2026</time><time class="dt-updated visually-hidden" datetime="2026-02-19T07:42:07.353Z"></time></div><div class="post-content p-summary"><p>我观看了一场名为「后美国互联网」的 <a target="_blank" rel="noopener" href="https://pluralistic.net/2026/01/01/39c3/">演讲</a>,实在是精彩,让我对「数字主权」这一概念有了更深刻的认知。借此,我发现我的许多服务依然部署在美国的 PaaS 服务上。这类中心化的服务如果出问题了会很麻烦,参考去年 Cloudflare 的事故。而我愈来愈对美国企业产生抵触之心。不过要我完全逃离是很难做到的,毕竟我人就在美国。这些原因结合在一起,促使我对「哪家提供 VPS(虚拟专用服务器)服务的公司最适用于数字主权者」这一命题感到好奇。</p></div><a class="read-more" href="posts/2590.html">...阅读全文</a></article></li><li class="post-list-item"><article class="post-block h-entry"><h2 class="post-title"><a class="post-title-link u-url p-name" href="posts/53f4.html">初次走半马</a></h2><div class="post-info"><time class="post-date dt-published" datetime="2026-01-19T05:00:00.000Z">1/19/2026</time><time class="dt-updated visually-hidden" datetime="2026-02-19T07:42:07.353Z"></time></div><div class="post-content p-summary"><p>室友这些天喜欢看 <a target="_blank" rel="noopener" href="https://space.bilibili.com/8263502">橙飞一下</a> 这个 BiliBili 频道。频道主是一位大胃王,也是一位马拉松跑者,吃饭的时候看他吃饭会格外香。不过呢他跑马拉松这件事情引起了室友那奇怪的好战之心,想要试试一天内走「全马」。不过嘛,结果从本文标题里就可以看出……</p></div><a class="read-more" href="posts/53f4.html">...阅读全文</a></article></li><li class="post-list-item"><article class="post-block h-entry"><h2 class="post-title"><a class="post-title-link u-url p-name" href="posts/9412.html">谈模仿学习与身份误区</a></h2><div class="post-info"><time class="post-date dt-published" datetime="2026-01-16T05:00:00.000Z">1/16/2026</time><time class="dt-updated visually-hidden" datetime="2026-02-19T07:42:07.357Z"></time></div><div class="post-content p-summary"><p>我在网络冲浪时看到了一位网友的求助。他自小就没有被教导如何和人打交道,长大后先是被母亲认定是一个孤僻的人,又被学校的环境误导,以为优秀的道路注定是孤独的、维持人际关系不重要。</p>
<p>这些因素堆叠在一起,当他意识到的时候,自己已经错过了积累社交经验的黄金期。</p>
<p>在此背景下,我真挚地给出了自己的建议:你只是不知道怎么说而已,你可以通过学习他人的对话来补上这个技术缺陷。这却遭到了第三人的反对,他认为这会让当事人丢失自己,不如让当事人以自己的方法来。</p></div><a class="read-more" href="posts/9412.html">...阅读全文</a></article></li><li class="post-list-item"><article class="post-block h-entry"><h2 class="post-title"><a class="post-title-link u-url p-name" href="posts/4420.html">Emacs 里配置邮箱服务</a></h2><div class="post-info"><time class="post-date dt-published" datetime="2026-01-11T05:00:00.000Z">1/11/2026</time><time class="dt-updated visually-hidden" datetime="2026-02-09T17:16:55.009Z"></time></div><div class="post-content p-summary"><p>我开始在我的笔记本电脑上使用 EndeavourOS+i3WM 以及 Emacs 了。刚开始使用 Emacs,实在是被它的能力上限所折服,巴不得所有事情都让它来做 —— 例如邮件收发。</p></div><a class="read-more" href="posts/4420.html">...阅读全文</a></article></li></ul></div></main><footer><div class="paginator"><a class="next" href="page/2/">下一页</a></div><div class="copyright"><p class="footer-links"><a href="/friends/index.html">友链</a><span class="footer-separator"> ·</span><a href="/links/index.html">邻邦</a><span class="footer-separator"> ·</span><a href="/contact/index.html">联络</a><span class="footer-separator"> ·</span><a href="/colophon/index.html">营造记</a><span class="footer-separator"> ·</span><a href="/atom.xml">RSS订阅</a></p><p>© 2025 - 2026 <a href="https://cytrogen.icu">Cytrogen</a>, powered by <a href="https://hexo.io/" target="_blank">Hexo</a> and <a href="https://github.com/cytrogen/hexo-theme-ares" target="_blank">hexo-theme-ares</a>.</p><p><a href="https://blogscn.fun" target="_blank" rel="noopener">BLOGS·CN</a></p></div></footer></div></div><a class="back-to-top" href="#top" aria-label="返回顶部"><svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path d="M3.293 9.707a1 1 0 010-1.414L9.586 2a2 2 0 012.828 0l6.293 6.293a1 1 0 01-1.414 1.414L11 3.414V17a1 1 0 11-2 0V3.414L2.707 9.707a1 1 0 01-1.414 0z"></path></svg></a><script>document.addEventListener('DOMContentLoaded', function() {
  const codeBlocks = document.querySelectorAll('figure.highlight');
  
  codeBlocks.forEach(block => {
    let caption = block.querySelector('figcaption');
    if (!caption) {
      caption = document.createElement('figcaption');
      block.insertBefore(caption, block.firstChild);
    }

    const info = document.createElement('div');
    info.className = 'info';
    
    const filename = caption.querySelector('span');
    if (filename) {
      filename.className = 'filename';
      info.appendChild(filename);
    }
    
    const lang = block.className.split(' ')[1];
    if (lang) {
      const langSpan = document.createElement('span');
      langSpan.className = 'lang-name';
      langSpan.textContent = lang;
      info.appendChild(langSpan);
    }

    const sourceLink = caption.querySelector('a');
    if (sourceLink) {
      sourceLink.className = 'source-link';
      info.appendChild(sourceLink);
    }

    const actions = document.createElement('div');
    actions.className = 'actions';

    const codeHeight = block.scrollHeight;
    const threshold = 300;

    if (codeHeight > threshold) {
      block.classList.add('folded');
      
      const toggleBtn = document.createElement('button');
      toggleBtn.textContent = '展开';
      toggleBtn.addEventListener('click', () => {
        block.classList.toggle('folded');
        toggleBtn.textContent = block.classList.contains('folded') ? '展开' : '折叠';
      });
      actions.appendChild(toggleBtn);
    }

    const copyBtn = document.createElement('button');
    copyBtn.textContent = '复制';
    copyBtn.addEventListener('click', async () => {
      const codeLines = block.querySelectorAll('.code .line');
      const code = Array.from(codeLines)
        .map(line => line.textContent)
        .join('\n')
        .replace(/\n\n/g, '\n');
      
      try {
        await navigator.clipboard.writeText(code);
        copyBtn.textContent = '已复制';
        copyBtn.classList.add('copied');
        
        setTimeout(() => {
          copyBtn.textContent = '复制';
          copyBtn.classList.remove('copied');
        }, 3000);
      } catch (err) {
        console.error('复制失败:', err);
        copyBtn.textContent = '复制失败';
        
        setTimeout(() => {
          copyBtn.textContent = '复制';
        }, 3000);
      }
    });
    actions.appendChild(copyBtn);

    caption.innerHTML = '';
    caption.appendChild(info);
    caption.appendChild(actions);

    const markedLines = block.getAttribute('data-marked-lines');
    if (markedLines) {
      const lines = markedLines.split(',');
      lines.forEach(range => {
        if (range.includes('-')) {
          const [start, end] = range.split('-').map(Number);
          for (let i = start; i <= end; i++) {
            const line = block.querySelector(`.line-${i}`);
            if (line) line.classList.add('marked');
          }
        } else {
          const line = block.querySelector(`.line-${range}`);
          if (line) line.classList.add('marked');
        }
      });
    }
  });
});</script><script async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" id="MathJax-script"></script><script>(function() {
  document.addEventListener('DOMContentLoaded', function() {
    const themeToggle = document.querySelector('.theme-toggle');
    
    if (!themeToggle) return;
    
    const getCurrentTheme = () => {
      return document.documentElement.getAttribute('data-theme') || 'light';
    };
    
    const updateUI = (theme) => {
      const isDark = theme === 'dark';
      themeToggle.setAttribute('aria-pressed', isDark.toString());
    };
    
    const setTheme = (theme) => {
      document.documentElement.setAttribute('data-theme', theme);
      document.documentElement.style.colorScheme = theme;
      
      const pageWrapper = document.getElementById('page-wrapper');
      if (pageWrapper) {
        pageWrapper.setAttribute('data-theme', theme);
      }
      
      // Find and remove the temporary anti-flicker style tag if it exists.
      // This ensures the main stylesheet takes full control after the initial load.
      const antiFlickerStyle = document.getElementById('anti-flicker-style');
      if (antiFlickerStyle) {
        antiFlickerStyle.remove();
      }
      
      localStorage.setItem('theme', theme);
      updateUI(theme);
    };
    
    const toggleTheme = () => {
      const current = getCurrentTheme();
      const newTheme = current === 'light' ? 'dark' : 'light';
      setTheme(newTheme);
    };
    
    updateUI(getCurrentTheme());
    
    themeToggle.addEventListener('click', toggleTheme);
    
    if (window.matchMedia) {
      const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
      mediaQuery.addEventListener('change', function(e) {
        if (!localStorage.getItem('theme')) {
          const theme = e.matches ? 'dark' : 'light';
          setTheme(theme);
        }
      });
    }
  });
})();
</script><script src="js/details-toggle.js" defer></script><script>(function() {
  document.addEventListener('DOMContentLoaded', function() {
    const backToTopBtn = document.querySelector('.back-to-top');
    
    if (!backToTopBtn) return;
    
    const toggleButtonVisibility = () => {
      const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
      const shouldShow = scrollTop > 200;
      
      if (shouldShow) {
        backToTopBtn.classList.add('is-visible');
      } else {
        backToTopBtn.classList.remove('is-visible');
      }
    };
    
    let ticking = false;
    const handleScroll = () => {
      if (!ticking) {
        requestAnimationFrame(() => {
          toggleButtonVisibility();
          ticking = false;
        });
        ticking = true;
      }
    };
    
    const scrollToTop = (event) => {
      event.preventDefault();
      window.scrollTo({
        top: 0,
        behavior: 'smooth'
      });
    };
    
    window.addEventListener('scroll', handleScroll);
    backToTopBtn.addEventListener('click', scrollToTop);
    
    toggleButtonVisibility();
  });
})();</script></body></html>