~cytrogen/blog-public

blog-public/posts/df9e.html -rw-r--r-- 27.0 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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<!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="女人,或者说有雌性生殖器官的人,又或者说需要生产卵子来进行繁殖生育的哺乳动物,都会有月经吧。以防万一有人不知道月经的底层逻辑,它本质上是卵子死去时流出的血液。女人需要每个月更换卵子,经历「流血的七天、安全期、卵子生成的发情期」这样的 28 天循环,直到无法生育。这期间有一个例外,那便是怀孕。"><link rel="icon" href="../favicon.png"><link rel="canonical" href="https://cytrogen.icu/posts/df9e.html"><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" 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"></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="post"><article class="post-block h-entry"><div class="post-meta p-author h-card visually-hidden"><img class="author-avatar u-photo" src="../favicon.png" alt="Cytrogen"><span class="p-name">Cytrogen</span><a class="u-url" href="https://cytrogen.icu">https://cytrogen.icu</a></div><a class="post-permalink u-url u-uid visually-hidden" href="https://cytrogen.icu/posts/df9e.html">永久链接</a><div class="p-summary visually-hidden"><p>女人,或者说有雌性生殖器官的人,又或者说需要生产卵子来进行繁殖生育的哺乳动物,都会有月经吧。以防万一有人不知道月经的底层逻辑,它本质上是卵子死去时流出的血液。女人需要每个月更换卵子,经历「流血的七天、安全期、卵子生成的发情期」这样的 28 天循环,直到无法生育。这期间有一个例外,那便是怀孕。</p></div><div class="visually-hidden"><a class="p-category" href="../categories/%E4%B8%AA%E4%BA%BA%E9%9A%8F%E6%83%B3/">个人随想</a><a class="p-category" href="../tags/%E7%A4%BE%E4%BC%9A%E5%AD%A6/">社会学</a></div><a class="u-syndication visually-hidden" target="_blank" rel="noopener" href="https://m.otter.homes/@Cytrogen/116060673793294969">https://m.otter.homes/@Cytrogen/116060673793294969</a><h1 class="post-title p-name">女人的血</h1><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 e-content"><html><head></head><body><p>女人,或者说有雌性生殖器官的人,又或者说需要生产卵子来进行繁殖生育的哺乳动物,都会有月经吧。以防万一有人不知道月经的底层逻辑,它本质上是卵子死去时流出的血液。女人需要每个月更换卵子,经历「流血的七天、安全期、卵子生成的发情期」这样的 28 天循环,直到无法生育。这期间有一个例外,那便是怀孕。</p>
<span id="more"></span>
<p>要说月经有多么不便,一是伴随而来的腹痛和肌肉酸痛,二是下体那无法离去的黏稠感,三是对于流血这件事情的恐惧 —— 这里主要指的是不知道什么时候流血,以及在实际确认前不知道自己流了多少。量就像死或者没死的猫,无论是哪个结果,在打开箱子前我们作为观测者都是心惊胆跳的。</p>
<p>五年级的时候,我流出了第一滩月经血。那是一坨黑色的东西,附在我彩色的凯蒂猫睡裤上,当然还有内裤上。我对它的第一个反应,便是恐怖 —— 废话,身体不舒服去蹲个马桶,刚脱下裤子就是这么一大滩黑色的玩意儿,哪个小孩儿不会被吓到。和近乎所有中二的小孩儿一样,我的第二个反应是「我该不会得了什么绝症吧」,进而得出自己是「特殊的」这件事。</p>
<p>也和近乎所有中二的小孩儿一样,我认为「特殊」的事情,不过是世界上比我能数出的数字更多的人正在经历的事情。因为母亲像是没事人一样说,「我也到那个年纪了」,然后像是被逗乐般,告诉我如何使用卫生巾。使用卫生巾是一个极其不适的事情:你的肉体和内裤之间隔了一层粗糙的护垫;要是你出汗了,这个护垫还会黏糊糊地粘在屁股上,更别提血多的时候了。虽然长大后我有幸使用过高质量的卫生巾,但是我绝大多数只买得起便宜货…… 而这种事情,每个月都要发生足足七天,可能会少一两天,亦或者多一两天。</p>
<p>为什么女人一定要经历月经这件事,我自小就在思考。它实在不是一件能让我觉得有价值的事情,无论是不舒适还是其带来的结果 —— 可生育 —— 都让我觉得可有可无。</p>
<p>母亲来美国后,成为了一个忠诚的基督教徒。我来美国后,自然也没少和她去教堂。还是孩子的我,并不能理解宗教,只是在没有娱乐的教堂里一遍遍翻阅圣经,直到看到《撒母耳记》以及后面的明显不再带有故事情节的内容;因为那些内容实在是「无聊」,无法吸引到我。圣经在那时候,对我来说更像是西方人的「故事书」。因此,孩童时期的我最喜欢的章节是《启示录》。不过那里面没有太多和耶稣相关的内容,说出去的时候还被说教了一番。</p>
<p>先前我表态过,我并 <a href="/posts/b211.html#%E6%96%B0%E6%8A%A5%E5%91%8A%E5%91%BC%E5%90%81%E5%9C%A8%E7%BE%8E%E5%9B%BD%E7%BB%88%E7%BB%93%E7%AB%A5%E5%A9%9A">不喜欢宗教</a>。不过我喜欢宗教故事。也就是说,将它们视为故事书来看,我是很欢迎的;如果是传教来的,我只能用手打个大大的 X 给你看。我很不喜欢跟耶和华有关系的宗教。无论是犹太教还是基督教还是伊斯兰教,都一定会出现旧约的内容。尽管知道一些派系否认了旧约里说的事情,但我还是无法喜欢上它们。《创世纪》里说,夏娃被蛇欺骗,吃了生命果,还劝亚当吃下,所以被上帝额外惩罚,后代的所有女人都要每月受腹痛之刑,且在一个章节里,女人要额外比男人多清洗几天,只因女人一出生便是不洁的。</p>
<p>我会一次次去想,我是生而不纯洁的吗?我会在小时候就体验这种钻心之痛,是因为这种事情吗?</p>
<p>「血」,仿佛真的像是诅咒一般。</p>
<p>疫情期间,父亲被辞退,纽约市的街道空荡荡的,大家买不到口罩,我们一家四口和一个亲戚在房子里日复一日地搓麻将。那是一段压抑的时期,我们无处可去,只能醒来、玩手机、打麻将、睡觉、重复。这种像是被打了一针麻醉的生活里,母亲突然说了一句,「要是当时死掉的人是我就好了。」我陷入了沉默,然后和过去一样,不受控制地出现了情绪闪回:这是母亲多少次如此厌恶我?或者在我的面前赞扬她那个已经胎死腹中的男孩儿?</p>
<p>母亲打掉的孩子一共有两个,我是她第三个怀上的孩子,也是第一个顺利生产的孩子。在我之前,她怀上的是一个男婴。然而当时发生了许多事情,母亲一气之下打掉了这个孩子,后面又一个劲儿地后悔。梦里,她时不时会梦到这个男婴,对着她说「妈妈,我冷。」惊恐中,她向外婆求助做法事,心境安稳后,就再也没有梦到这个男婴了;取而代之的是她会潜意识中将所有男青年视为自己的儿子,并对我说,「要是你哥哥还活着,他就是这个样子吧。」</p>
<p>我一边摸着麻将牌,一边流下泪水。父亲看到我哭了,愤怒地掀翻了麻将桌,和母亲吵了一架;妹妹大声哭了起来,亲戚只能在旁边做和事佬。</p>
<p>在美国欠债的生活压得还未成年的我很是难受,也压得父母难受,尤其是母亲。她在我初中时开始,精神逐渐变态。不仅打骂已经是家常便饭,还会管控我和同龄人之间的社交,令我很难和朋友们进一步发展关系。最为可恶的是那些向着她的人们,口上说着要帮助我,却没有人真的做什么,只是让身为孩子的我一次次原谅母亲、体谅她。直到日后,高中的一位老师策划了一件事,瞒着我报告了儿童局,且一位友人一直在帮助和支持我,我和母亲的关系才得以缓和。所以让孩子体谅父母,根本就不是什么责任,明明解决问题有着更好的方法。</p>
<p>母亲到底是为什么生下我,以及妹妹的呢?是为了社会义务,是为了一己私欲,还是真的希望一个生命能够诞生、享受世界上各个美好?我想,怎么都不会是最后一个吧。如果我都不觉得自己能够抚养好的一个孩子的话,那我这些年为了生育而保留的这个系统,真的还有存在的必要吗?</p>
<p>在知道我和同性交往过后,一个说教味儿极重的校友找到我,开门见山问我为什么要和同性在一起、我应该知道「洞和洞是不能在一起」的吧。我心想,这个人恐怕是一个「洞性恋」;怎么会有人将其他人类视作为「洞」呢?除非他满脑子都是洞,看到的也只有洞。对话的结尾,他为了让我难堪,说「因为你是同性恋者,所以你全家的血脉都断了。」</p>
<p>香火、血脉,这些事情,真的有那么重要吗?为了这些「社会义务」,生下一个又一个孩子,但是缺乏培养他们的能力,最终得到的却是一个个倍受童年折磨的人。</p>
<p>这一切的目的是什么?在生物角度上来看,是为了发情和繁殖。生育从来都不是一件错事,这是自然的。只是我并不清楚自己真的会想要生育吗?我在未来,会喜欢上一个人,然后想要去那个人组建家庭、生下两人基因的融合体吗?不,这样的想法到底在把孩子们当成什么?如果要让一个生命诞生的话,就必须为他负起责任吧。我不想成为一个,像父母亲那样的人啊。我希望世上的孩子们,都可以幸福地度过童年,可以成长为自己想要成为的大人 —— 因为,我连自己也喜欢不上来啊。</p>
<p>既然如此,为什么我没有去采取相关的措施、好让自己的生活好过一些?我思来想去,觉得最大的问题在于「后路」。每次想到这件事,考虑到的都不是所消耗的精力和资源,而是「万一自己未来会使用到呢」—— 潜意识中,生育这种与生俱来的能力,竟是我的后路吗?</p>
<p>如果我构建出来的社会身份失败了,我剩下的,便是「母亲」这种最为原始的身份。照顾孩子是困难的,我一直都知道,所以我也会认为母爱是伟大的。但如果让我因为这种理由而成为一位母亲,这个身份便成了廉价的兜底方案 —— 它不需要我拥有才智和品格,只需要我维持这具肉体的基本机能。这种思想是可怕的,我在潜意识里依然认可了将人简化为「洞」的逻辑,依然在为自己保留一种功能性的价值,而非主体性。</p>
<p>我要是因为自己的失败,而让一个生命诞生了,对他而言,我或许只不过是一个又傲慢又糟糕的人吧。我会将他视为填补自己人生空洞的工具,让他成为我逃避虚无的牺牲品。好像,我又一次变成了母亲。</p>
<p>我好希望这「女人的血」,仅仅是血,而不是诅咒。</p>
</body></html></div></article></div></main><footer><div class="paginator"><a class="prev" href="9408.html">上一篇</a><a class="next" href="9027.html">下一篇</a></div><!-- Webmention 显示区域--><div class="webmention-section webmention-empty" data-page-url="posts/df9e.html" data-full-url="https://cytrogen.icu/posts/df9e.html" data-mode="static">
              <h3 class="webmention-title">Webmentions (<span class="webmention-count">0</span>)</h3>
              <div class="webmention-list"></div>
              <span>暂无 Webmentions</span>
            </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>