jianzhihuixiang/alacarte-novel-website/chapters/chapter-30.html
小虾米 f8894dd3f3 fix: 修复上一章/下一章导航对小数章节(如107.5)的支持
- updateNavButtons: 改用数组索引查找,而非简单的+1/-1
- updateSidebarHighlight: 使用parseFloat比较章节ID
- updateMobileTOCHighlight: 使用parseFloat比较章节ID
- 更新版本号强制刷新缓存
2026-03-27 17:42:41 +08:00

607 lines
28 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>浅栖之地 - 阿拉德:剑之回响</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
<style>
:root {
--bg-primary: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
--text-primary: #e0e0e0;
--text-secondary: #888;
--accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
--border-color: rgba(255,255,255,0.1);
--btn-bg: rgba(255,255,255,0.1);
--btn-hover: rgba(255,255,255,0.2);
}
[data-theme="light"] {
--bg-primary: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
--text-primary: #333;
--text-secondary: #666;
--border-color: rgba(0,0,0,0.1);
--btn-bg: rgba(0,0,0,0.05);
--btn-hover: rgba(0,0,0,0.1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Noto Serif SC', serif;
background: var(--bg-primary);
color: var(--text-primary);
line-height: 1.8;
min-height: 100vh;
transition: all 0.3s ease;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
padding-bottom: 120px;
}
/* 顶部导航 */
.top-nav {
position: fixed;
top: 0;
left: 0;
right: 0;
background: rgba(0,0,0,0.3);
backdrop-filter: blur(10px);
border-bottom: 1px solid var(--border-color);
z-index: 1000;
padding: 10px 20px;
}
.top-nav-content {
max-width: 800px;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
}
.nav-link {
color: var(--text-primary);
text-decoration: none;
font-family: 'Noto Sans SC', sans-serif;
font-size: 14px;
padding: 8px 16px;
background: var(--btn-bg);
border: 1px solid var(--border-color);
border-radius: 8px;
transition: all 0.3s ease;
}
.nav-link:hover {
background: var(--btn-hover);
}
.chapter-header {
text-align: center;
padding: 80px 0 40px;
border-bottom: 1px solid var(--border-color);
margin-bottom: 40px;
}
.chapter-number {
font-size: 14px;
color: var(--text-secondary);
letter-spacing: 4px;
text-transform: uppercase;
margin-bottom: 10px;
}
.chapter-title {
font-size: 32px;
font-weight: 700;
background: var(--accent-gradient);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 20px;
}
.chapter-meta {
font-size: 14px;
color: var(--text-secondary);
}
.chapter-content {
font-size: 18px;
line-height: 2;
text-align: justify;
}
.chapter-content p {
margin-bottom: 1.5em;
text-indent: 2em;
}
.chapter-content p:first-of-type::first-letter {
font-size: 3em;
float: left;
line-height: 1;
margin-right: 8px;
margin-top: -5px;
background: var(--accent-gradient);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
font-weight: 700;
}
/* 固定底部导航 */
.fixed-nav {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: rgba(0,0,0,0.3);
backdrop-filter: blur(10px);
border-top: 1px solid var(--border-color);
z-index: 1000;
padding: 15px 20px;
}
.fixed-nav-content {
max-width: 800px;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
}
.nav-btn {
padding: 12px 24px;
background: var(--btn-bg);
border: 1px solid var(--border-color);
border-radius: 8px;
color: var(--text-primary);
text-decoration: none;
transition: all 0.3s ease;
font-family: 'Noto Sans SC', sans-serif;
font-size: 14px;
cursor: pointer;
}
.nav-btn:hover {
background: var(--btn-hover);
transform: translateY(-2px);
}
.nav-btn.disabled {
opacity: 0.3;
cursor: not-allowed;
pointer-events: none;
}
/* 右侧滚动按钮 */
.scroll-buttons {
position: fixed;
right: 20px;
bottom: 90px;
display: flex;
flex-direction: column;
gap: 10px;
z-index: 1001;
}
.scroll-btn {
width: 40px;
height: 40px;
border-radius: 8px;
background: var(--btn-bg);
border: 1px solid var(--border-color);
color: var(--text-primary);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
transition: all 0.3s ease;
font-family: 'Noto Sans SC', sans-serif;
}
.scroll-btn:hover {
background: var(--btn-hover);
}
/* 侧边栏 - 标题固定,内容滚动 */
.sidebar {
position: fixed;
right: 20px;
top: 50%;
transform: translateY(-50%);
background: rgba(0,0,0,0.5);
backdrop-filter: blur(10px);
border-radius: 12px;
border: 1px solid var(--border-color);
width: 200px;
max-height: 70vh;
z-index: 999;
display: flex;
flex-direction: column;
}
.sidebar-title {
font-size: 14px;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 2px;
padding: 15px 20px;
border-bottom: 1px solid var(--border-color);
flex-shrink: 0;
}
.sidebar-content {
overflow-y: auto;
padding: 10px 20px 20px;
flex: 1;
scrollbar-width: thin;
scrollbar-color: transparent transparent;
transition: scrollbar-color 0.3s ease;
}
.sidebar-content:hover {
scrollbar-color: rgba(255,255,255,0.3) transparent;
}
.sidebar-content::-webkit-scrollbar {
width: 6px;
}
.sidebar-content::-webkit-scrollbar-track {
background: transparent;
}
.sidebar-content::-webkit-scrollbar-thumb {
background: transparent;
border-radius: 3px;
transition: background 0.3s ease;
}
.sidebar-content:hover::-webkit-scrollbar-thumb {
background: rgba(255,255,255,0.3);
}
.sidebar-content:hover::-webkit-scrollbar-thumb:hover {
background: rgba(255,255,255,0.5);
}
[data-theme="light"] .sidebar-content:hover {
scrollbar-color: rgba(0,0,0,0.3) transparent;
}
[data-theme="light"] .sidebar-content:hover::-webkit-scrollbar-thumb {
background: rgba(0,0,0,0.3);
}
[data-theme="light"] .sidebar-content:hover::-webkit-scrollbar-thumb:hover {
background: rgba(0,0,0,0.5);
}
.sidebar-chapter {
display: block;
padding: 8px 0;
color: #aaa;
text-decoration: none;
font-size: 13px;
border-bottom: 1px solid rgba(255,255,255,0.05);
transition: all 0.3s ease;
line-height: 1.5;
}
.sidebar-chapter:hover {
color: #667eea;
}
.sidebar-chapter.current {
color: #667eea;
font-weight: 600;
}
@media (max-width: 1200px) {
.sidebar {
display: none;
}
}
@media (max-width: 600px) {
.chapter-title {
font-size: 24px;
}
.chapter-content {
font-size: 16px;
}
.fixed-nav-content {
gap: 10px;
}
.nav-btn {
padding: 10px 15px;
font-size: 12px;
}
.scroll-buttons {
right: 10px;
bottom: 80px;
}
.scroll-btn {
width: 36px;
height: 36px;
}
}
/* 滚动条样式 */
.sidebar::-webkit-scrollbar {
width: 4px;
}
.sidebar::-webkit-scrollbar-track {
background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
background: rgba(255,255,255,0.2);
border-radius: 2px;
}
</style>
</head>
<body>
<!-- 顶部导航 -->
<nav class="top-nav">
<div class="top-nav-content">
<a href="../index.html" class="nav-link">返回首页</a>
<button class="nav-link" id="themeToggle">切换主题</button>
</div>
</nav>
<div class="container">
<header class="chapter-header">
<div class="chapter-number">Chapter 30</div>
<h1 class="chapter-title">浅栖之地</h1>
</header>
<article class="chapter-content">
<p>诺伊佩拉地区笼罩在一片灰蒙蒙的雾气中。</p>
<p>这里曾经是暗精灵繁荣的领地,如今却变成了死寂的废墟。空气中弥漫着腐朽和疾病的气息,让人作呕。</p>
<p>林克一行人沿着克伦特提供的地图,来到了浅栖之地的入口。那是一个巨大的地下洞穴,黑漆漆的洞口像是巨兽的嘴巴,等待着吞噬一切进入其中的生命。</p>
<p>"这里的邪气好重……"艾伦皱着眉头,圣光在他的剑身上微微闪烁,"比暗黑雷鸣废墟还要浓郁。"</p>
<p>" Morgan就在里面。"林克握紧了晨曦,"大家小心,随时准备战斗。"</p>
<p>赛丽亚和奥菲利亚同时点了点头,一左一右站在林克身边。虽然昨晚还有些互相看不顺眼,但在战斗面前,她们都明白现在不是闹别扭的时候。</p>
<p>"我会保护好你的,林克。"赛丽亚说,手中的法杖散发着柔和的光芒。</p>
<p>"我也会。"奥菲利亚不甘示弱,从背包里拿出了几瓶炼金药剂,"这些可以解毒,如果中了尸毒就喝下去。"</p>
<p>林克看着两个少女,心中涌起一股暖意:"走吧。"</p>
<p>---</p>
<p>浅栖之地内部比想象中更加阴森。</p>
<p>洞穴的墙壁上长满了奇怪的菌类,散发着幽幽的绿光。地面上到处是腐烂的尸体和破碎的装备,显然之前已经有不少冒险者死在了这里。</p>
<p>"那些是……"赛丽亚指着前方,声音有些颤抖。</p>
<p>一群摇摇晃晃的身影从黑暗中走出。那是被感染的暗精灵——或者说,曾经是暗精灵。现在它们已经变成了只知道攻击的丧尸,皮肤腐烂,眼睛泛着红光。</p>
<p>"被感染的暗精灵!"奥菲利亚惊呼,"和罗特斯控制的GBL教徒不一样这些是被瘟疫感染的"</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>
<p>奥菲利亚咬了咬嘴唇,然后从背包里拿出一个瓶子扔向丧尸群:"尝尝这个!火焰瓶!"</p>
<p>轰——</p>
<p>火焰瞬间吞没了十几只丧尸,将它们烧成灰烬。</p>
<p>"怎么样?"奥菲利亚得意地看向赛丽亚。</p>
<p>赛丽亚哼了一声:"没什么了不起的,我也能行!"</p>
<p>她说着,举起法杖念起了咒语。一道巨大的光柱从天而降,将剩余的丧尸全部净化。</p>
<p>两个少女对视一眼,虽然还有些互相不服气,但嘴角都不自觉地露出了一丝笑意。</p>
<p>---</p>
<p>战斗结束后,队伍继续前进。</p>
<p>洞穴越来越深,空气也越来越浑浊。林克能感觉到,他们正在接近某个强大的存在。</p>
<p>"前面就是BOSS房间了。"林克看着地图说,"摩根应该就在里面。"</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>
<p>林克迅速后退,躲过了摩根的利爪。但摩根的攻击还没结束,他张开嘴,喷出了一团绿色的毒雾。</p>
<p>"屏住呼吸!"赛丽亚大喊,同时施展净化术,将毒雾驱散。</p>
<p>摩根见毒雾无效,变得更加狂暴。他的身体开始膨胀,身上的伤口中钻出了无数条触手般的血管,向四周挥舞。</p>
<p>"这是什么怪物……"赛丽亚倒吸一口凉气。</p>
<p>"死亡诅咒!"艾伦突然大喊,"林克,小心!"</p>
<p>林克感到身上一沉一个骷髅头的标志出现在他头顶。他想起之前搜集的情报——死亡诅咒会在1.5秒后发动,必须跳跃躲避!</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>
<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>那是摩根的炼金术笔记,记录着他调查传染病的经过。最后一页写着:</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>
<p>"林克……"赛丽亚轻声说,"刚才谢谢你保护我。"</p>
<p>"我也谢谢你救了我。"奥菲利亚也说道,"你的精灵之箭……真的很厉害。"</p>
<p>赛丽亚愣了一下,然后露出了一丝微笑:"你的火焰瓶也不差。"</p>
<p>两个少女相视一笑,之前的芥蒂似乎在这一刻消融了不少。</p>
<p>"其实……"奥菲利亚低下头,"我知道林克最喜欢的是你。我不会和你争的……只要能在林克身边,我就满足了。"</p>
<p>赛丽亚沉默了一会儿,然后轻轻握住了奥菲利亚的手:"谢谢你的理解。但是……林克也很在乎你。以后我们一起保护他,好吗?"</p>
<p>奥菲利亚抬起头,眼中闪着泪光,然后用力点了点头。</p>
<p>林克看着两个少女握手言和,心中涌起一股暖流。</p>
<p>也许,这就是后宫的奥义吧。</p>
<p>---</p>
<p>(第三十章完)</p>
</article>
</div>
<!-- 固定底部导航 -->
<nav class="fixed-nav">
<div class="fixed-nav-content">
<a href="chapter-29.html" class="nav-btn ">上一章</a>
<a href="../chapters.html" class="nav-btn">目录</a>
<a href="chapter-31.html" class="nav-btn ">下一章</a>
</div>
</nav>
<!-- 右侧滚动按钮 -->
<div class="scroll-buttons">
<button class="scroll-btn" id="scrollTop" title="回到顶部"></button>
<button class="scroll-btn" id="scrollBottom" title="回到底部"></button>
</div>
<!-- 侧边栏章节导航 -->
<aside class="sidebar">
<div class="sidebar-title">章节导航</div>
<div class="sidebar-content" id="sidebarContent">
<a href="chapter-1.html" class="sidebar-chapter">第1章洛兰的风</a>
<a href="chapter-2.html" class="sidebar-chapter">第2章洛兰深处</a>
<a href="chapter-3.html" class="sidebar-chapter">第3章幽暗密林</a>
<a href="chapter-4.html" class="sidebar-chapter">第4章幽暗密林深处</a>
<a href="chapter-5.html" class="sidebar-chapter">第5章雷鸣废墟</a>
<a href="chapter-6.html" class="sidebar-chapter">第6章格拉卡</a>
<a href="chapter-7.html" class="sidebar-chapter">第7章烈焰格拉卡</a>
<a href="chapter-8.html" class="sidebar-chapter">第8章冰霜幽暗密林</a>
<a href="chapter-9.html" class="sidebar-chapter">第9章转职之路</a>
<a href="chapter-10.html" class="sidebar-chapter">第10章暗黑雷鸣废墟</a>
<a href="chapter-11.html" class="sidebar-chapter">第11章剑魂转职仪式</a>
<a href="chapter-12.html" class="sidebar-chapter">第12章西海岸</a>
<a href="chapter-13.html" class="sidebar-chapter">第13章龙人之塔</a>
<a href="chapter-14.html" class="sidebar-chapter">第14章人偶玄关</a>
<a href="chapter-15.html" class="sidebar-chapter">第15章石巨人塔</a>
<a href="chapter-16.html" class="sidebar-chapter">第16章黑暗玄廊</a>
<a href="chapter-17.html" class="sidebar-chapter">第17章城主宫殿</a>
<a href="chapter-18.html" class="sidebar-chapter">第18章番外·悬空城</a>
<a href="chapter-19.html" class="sidebar-chapter">第19章天帷巨兽·神殿外围</a>
<a href="chapter-20.html" class="sidebar-chapter">第20章树精丛林</a>
<a href="chapter-21.html" class="sidebar-chapter">第21章炼狱</a>
<a href="chapter-22.html" class="sidebar-chapter">第22章西海岸的闲暇</a>
<a href="chapter-23.html" class="sidebar-chapter">第23章极昼</a>
<a href="chapter-24.html" class="sidebar-chapter">第24章第一脊椎</a>
<a href="chapter-25.html" class="sidebar-chapter">第25章赫顿玛尔的准备</a>
<a href="chapter-26.html" class="sidebar-chapter">第26章第二脊椎</a>
<a href="chapter-27.html" class="sidebar-chapter">第27章重逢的温柔</a>
<a href="chapter-28.html" class="sidebar-chapter">第28章暗精灵的委托</a>
<a href="chapter-29.html" class="sidebar-chapter">第29章阿法利亚营地</a>
<a href="chapter-30.html" class="sidebar-chapter current">第30章浅栖之地</a>
<a href="chapter-31.html" class="sidebar-chapter">第31章蜘蛛洞穴</a>
<a href="chapter-32.html" class="sidebar-chapter">第32章克伦特的委托</a>
<a href="chapter-33.html" class="sidebar-chapter">第33章暗精灵墓地·左翼守卫</a>
<a href="chapter-34.html" class="sidebar-chapter">第34章暗精灵墓地·剩余三将军</a>
</div>
</aside>
<script>
// 记录阅读进度
let readChapters = JSON.parse(localStorage.getItem('readChapters') || '[]');
if (!readChapters.includes(30)) {
readChapters.push(30);
localStorage.setItem('readChapters', JSON.stringify(readChapters));
}
// 主题切换
const themeToggle = document.getElementById('themeToggle');
const savedTheme = localStorage.getItem('theme') || 'dark';
document.documentElement.setAttribute('data-theme', savedTheme);
themeToggle.textContent = savedTheme === 'dark' ? '浅色' : '深色';
themeToggle.addEventListener('click', () => {
const currentTheme = document.documentElement.getAttribute('data-theme');
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
document.documentElement.setAttribute('data-theme', newTheme);
localStorage.setItem('theme', newTheme);
themeToggle.textContent = newTheme === 'dark' ? '浅色' : '深色';
});
// 滚动到顶部
document.getElementById('scrollTop').addEventListener('click', () => {
window.scrollTo({ top: 0, behavior: 'smooth' });
});
// 滚动到底部
document.getElementById('scrollBottom').addEventListener('click', () => {
window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' });
});
// 页面加载时,侧边栏自动滚动到当前章节
window.addEventListener('load', () => {
const sidebarContent = document.getElementById('sidebarContent');
const currentChapter = sidebarContent.querySelector('.current');
if (currentChapter) {
currentChapter.scrollIntoView({ behavior: 'smooth', block: 'center' });
}
});
</script>
</body>
</html>