漫画简介与全卷章节目录
【黑执事(黑執事)· 漫画导览与全卷目录】
作者:枢やな
评分:10
标签:奇幻 / 悬疑 / 神鬼 / 人外 / 复仇 / 恶役 / 黑暗 / 历史
在线漫画阅读器:https://media.huangguodrama.ai/motion/comics/bilimanga-1143/index.html
■ 剧情简介:
身为执事,怎么可以连这点小事都不会呢?英国名门贵族——凡多姆海伍家的执事赛巴斯钦。他在知识、教养、品味、料理、武术…各方面都完美无缺。侍候任性的12岁主人,漆黑的燕尾服终日不停摇摆。为您送上全世界最适合红茶的执事漫画…
📚 作品信息:作者 枢やな · 评分 10 · 共收录 34 卷 / 213 话章节目录与高清彩页/条漫预览。
■ 收录分卷(共 34 卷):
• 黑执事 1
• 黑执事 2
• 黑执事 3
• 黑执事 4
• 黑执事 5
• 黑执事 6
• 黑执事 7
• 黑执事 8
• 黑执事 9
• 黑执事 10
• 黑执事 11
• 黑执事 12
• 黑执事 13
• 黑执事 14
• 黑执事 15
• 黑执事 16
• 黑执事 17
• 黑执事 18
• 黑执事 19
• 黑执事 20
■ 章节目录(前 80 话 / 共 213 话):
• 第1话 In the morning 那名执事⋯能干
• 第2话 In the afternoon 那名执事⋯万能
• 第3话 In ninght 那名执事⋯最强
• 第4话 At midnight 那名执事⋯最悍
• 附录
• 第5话 In the morning 那名执事⋯繁忙
• 第6话 At noon 那名执事⋯行动
• 第7话 In the afternoon 那名执事⋯疯狂
• 第8话 At night 那名执事⋯可佩
• 第9话 At midnight 那名执事⋯邂逅
• 附录
• 第10话 In the morning 那名执事⋯回忆
• 第11话 At noon 那名执事⋯追忆
• 第12话 In the afternoon 那名执事⋯反攻
• 第13话 At night 那名执事⋯送葬
• 第14话 At midnight 那名执事⋯狩猎
• 第15话 In the morning 那名执事⋯借住
• 第16话 At noon 那名执事⋯异乡
• 第17话 In the afternoon 那名执事⋯对抗
• 第18话 At night 那名执事⋯尾随
• 第20话 In the morning 那名执事⋯钻研
• 第21话 In the afternoon 那名执事⋯竞争
• 第22话 At night 那名执事⋯优胜
• 第23话 At midnight 那名执事⋯焦躁
• 附录
• 第24话 In the morning 那名执事⋯上台
• 第25话 In the afternoon 那名执事⋯治疗
• 第26话 At night 那名执事⋯同事
• 第27话 At midnight 那名执事⋯演出
• 附录
• 第28话 In the morning 那名执事⋯交涉
• 第29话 At noon 那名执事⋯丑事
• 第30话 In the afternoon 那名执事⋯抚养
• 第31话 At night 那名执事⋯观望
• 第32话 At midnight 那名执事⋯嘲笑
• 附录
• 第33话 In the morning 那名执事⋯信誉
• 第34话 At noon 那名执事⋯从容
• 第35话 In the afternoon 那名执事⋯执行
• 第36话 At night 那名执事⋯随行
• 第38话 In the morning 那名执事⋯悲怆
• 第39话 At noon 那名执事⋯吃惊
• 第40话 In the afternoon 那名执事⋯收容
• 第41话 At night 那名执事⋯死亡
• 第42话 At midnight 那名执事⋯代行
• 第43话 In the morning 那名执事⋯倔强
• 第44话 At noon 那名执事⋯哀号
• 第45话 In the afternoon 那名执事⋯移动
• 第46话 At night 那名执事⋯不需
• 第47话 At midnight 那名执事⋯默根
• 第48话 In the morning 那名执事⋯解答
• 第49话 At noon 那名执事⋯奇特
• 第50话 In the afternoon 那名执事⋯埋葬
• 第51话 At night 那名执事⋯出港
• 第52话 At midnight 那名执事⋯航行
• 第53话 In the morning 那名执事⋯乱斗
• 第54话 At noon 那名执事⋯无双
• 第55话 In the afternoon 那名执事⋯徒劳
• 第56话 At night 那名执事⋯预估
• 第57话 At midnight 那名执事⋯苦斗
• 第58话 In the morning 那名执事⋯手刀
• 第59话 At noon 那名执事⋯妥协
• 第60话 In the afternoon 那名执事⋯动摇
• 第61话 At night 那名执事⋯诞生
• 第62话 At midnight 那名执事⋯成长
• 附录
• 第63话 In the morning 那名执事⋯修行
• 第64话 At noon 那名执事⋯重伤
• 第65话 In the afternoon 那名执事⋯奋战
• 第66话 At night 那名执事⋯骚动
• 第67话 At midnight 那名执事⋯上学
• 第68话 In the morning 那名执事⋯清扫
• 第69话 At noon 那名执事⋯伪装
• 第70话 In the afternoon 那名执事⋯诱导
• 第71话 At night 那名执事⋯策画
• 第72话 At midnight 那名执事⋯赞赏
• 附录
• 第73话 In the morning 那名执事⋯商议
• 第74话 At noon 那名执事⋯入场
• 第75话 In the afternoon 那名执事⋯谈笑
HTML5 在线漫画阅读器 (index.html)
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=3,user-scalable=yes">
<title>黑执事 - 在线漫画阅读器</title>
<style>
*{box-sizing:border-box;margin:0;padding:0}
body{background:#0d0f17;color:#f1f5f9;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;min-height:100vh;display:flex;flex-direction:column}
header{position:sticky;top:0;z-index:50;background:rgba(13,15,23,0.92);backdrop-filter:blur(12px);border-bottom:1px solid rgba(255,255,255,0.09);padding:10px 16px;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.brand{display:flex;align-items:center;gap:10px}
.badge{background:linear-gradient(135deg,#ec4899,#8b5cf6);color:#fff;font-size:11px;font-weight:700;padding:3px 8px;border-radius:99px}
.title{font-size:16px;font-weight:700;color:#fff}
.controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
button{background:rgba(255,255,255,0.08);color:#e2e8f0;border:1px solid rgba(255,255,255,0.14);padding:6px 12px;border-radius:8px;font-size:12px;cursor:pointer;transition:.18s}
button:hover,button.active{background:#ec4899;color:#fff;border-color:#ec4899}
.hero{max-width:920px;margin:16px auto;padding:18px;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.08);border-radius:14px;display:flex;gap:18px;align-items:flex-start}
.hero img{width:120px;height:160px;object-fit:cover;border-radius:10px;flex-shrink:0;box-shadow:0 8px 24px rgba(0,0,0,0.45)}
.hero-meta h1{font-size:20px;margin-bottom:6px}
.hero-meta .sub{font-size:13px;color:#94a3b8;margin-bottom:8px}
.tags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.tag{background:rgba(236,72,153,0.16);color:#f472b6;padding:2px 8px;border-radius:6px;font-size:11px}
.desc{font-size:13px;line-height:1.6;color:#cbd5e1}
.reader-wrap{max-width:860px;width:100%;margin:0 auto 40px;padding:0 8px;flex:1}
.scroll-mode .page-card{margin-bottom:10px;background:#161925;border-radius:8px;overflow:hidden;box-shadow:0 6px 20px rgba(0,0,0,0.4)}
.scroll-mode .page-card img{width:100%;height:auto;display:block}
.page-footer{text-align:center;font-size:11px;color:#64748b;padding:4px 0}
.flip-controls{display:none;justify-content:center;align-items:center;gap:14px;margin:14px 0}
.flip-mode .flip-controls{display:flex}
.drawer{display:none;max-width:920px;margin:0 auto 20px;padding:16px;background:rgba(255,255,255,0.04);border-radius:12px;border:1px solid rgba(255,255,255,0.1)}
.drawer.open{display:block}
.chap-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px;margin-top:10px}
.chap-item{padding:8px 10px;background:rgba(255,255,255,0.06);border-radius:8px;font-size:12px;color:#e2e8f0;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chap-item:hover{background:rgba(236,72,153,0.28)}
@media(max-width:600px){.hero{flex-direction:column;align-items:center;text-align:center}.tags{justify-content:center}}
</style>
</head>
<body>
<header>
<div class="brand">
<span class="badge">BILIMANGA · 统一媒体库</span>
<span class="title" id="hdrTitle"></span>
</div>
<div class="controls">
<button id="btnScroll" class="active" onclick="setMode('scroll')">条漫下拉模式</button>
<button id="btnFlip" onclick="setMode('flip')">单页翻页模式</button>
<button onclick="toggleCatalog()">章节目录 (<span id="chapCount">0</span>)</button>
<button onclick="cycleLang()" id="btnLang">繁/簡/EN</button>
</div>
</header>
<section class="hero">
<img id="heroCover" src="" alt="cover">
<div class="hero-meta">
<h1 id="heroTitle"></h1>
<div class="sub" id="heroSub"></div>
<div class="tags" id="heroTags"></div>
<p class="desc" id="heroDesc"></p>
</div>
</section>
<section class="drawer" id="catDrawer">
<h3 style="font-size:14px;margin-bottom:6px">全卷章节目录 (点击切换预览章节)</h3>
<div class="chap-grid" id="chapGrid"></div>
</section>
<div class="reader-wrap scroll-mode" id="readerWrap">
<div class="flip-controls">
<button onclick="stepPage(-1)">◀ 上一页</button>
<span id="pageIndicator" style="font-size:13px;color:#cbd5e1">1 / 1</span>
<button onclick="stepPage(1)">下一页 ▶</button>
</div>
<div id="pagesContainer"></div>
</div>
<script>
const COMIC = {"slug": "bilimanga-1143", "mangaid": "1143", "zh_title": "黑执事", "hant_title": "黑執事", "en_title": "黑执事 (Bilimanga #1143)", "author": "枢やな", "tags": ["奇幻", "悬疑", "神鬼", "人外", "复仇", "恶役", "黑暗", "历史"], "zh_desc": "身为执事,怎么可以连这点小事都不会呢?英国名门贵族——凡多姆海伍家的执事赛巴斯钦。他在知识、教养、品味、料理、武术…各方面都完美无缺。侍候任性的12岁主人,漆黑的燕尾服终日不停摇摆。为您送上全世界最适合红茶的执事漫画…\n\n📚 作品信息:作者 枢やな · 评分 10 · 共收录 34 卷 / 213 话章节目录与高清彩页/条漫预览。", "hant_desc": "身為執事,怎麼可以連這點小事都不會呢?英國名門貴族——凡多姆海伍家的執事賽巴斯欽。他在知識、教養、品味、料理、武術…各方面都完美無缺。侍候任性的12歲主人,漆黑的燕尾服終日不停搖擺。為您送上全世界最適合紅茶的執事漫畫…\n\n📚 作品資訊:作者 枢やな · 評分 10 · 共收錄 34 卷 / 213 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '黑执事' (黑執事) by 枢やな. Includes 34 volumes and 213 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1143/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1143/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1143/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1143/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1143/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1143/page_06.jpg"], "volumes": [{"title_hant": "黑執事 1", "title_zh": "黑执事 1", "cover_id": 2049503, "first_chap_id": 95483, "cover_url": "https://i.motiezw.com/cover/1143/2049503.jpg"}, {"title_hant": "黑執事 2", "title_zh": "黑执事 2", "cover_id": 2050245, "first_chap_id": 95512, "cover_url": "https://i.motiezw.com/cover/1143/2050245.jpg"}, {"title_hant": "黑執事 3", "title_zh": "黑执事 3", "cover_id": 2050436, "first_chap_id": 95519, "cover_url": "https://i.motiezw.com/cover/1143/2050436.jpg"}, {"title_hant": "黑執事 4", "title_zh": "黑执事 4", "cover_id": 2050630, "first_chap_id": 95525, "cover_url": "https://i.motiezw.com/cover/1143/2050630.jpg"}, {"title_hant": "黑執事 5", "title_zh": "黑执事 5", "cover_id": 2050826, "first_chap_id": 95531, "cover_url": "https://i.motiezw.com/cover/1143/2050826.jpg"}, {"title_hant": "黑執事 6", "title_zh": "黑执事 6", "cover_id": 2051003, "first_chap_id": 95537, "cover_url": "https://i.motiezw.com/cover/1143/2051003.jpg"}, {"title_hant": "黑執事 7", "title_zh": "黑执事 7", "cover_id": 2051180, "first_chap_id": 95543, "cover_url": "https://i.motiezw.com/cover/1143/2051180.jpg"}, {"title_hant": "黑執事 8", "title_zh": "黑执事 8", "cover_id": 2051357, "first_chap_id": 95550, "cover_url": "https://i.motiezw.com/cover/1143/2051357.jpg"}, {"title_hant": "黑執事 9", "title_zh": "黑执事 9", "cover_id": 2053597, "first_chap_id": 95644, "cover_url": "https://i.motiezw.com/cover/1143/2053597.jpg"}, {"title_hant": "黑執事 10", "title_zh": "黑执事 10", "cover_id": 2053779, "first_chap_id": 95650, "cover_url": "https://i.motiezw.com/cover/1143/2053779.jpg"}, {"title_hant": "黑執事 11", "title_zh": "黑执事 11", "cover_id": 2053956, "first_chap_id": 95656, "cover_url": "https://i.motiezw.com/cover/1143/2053956.jpg"}, {"title_hant": "黑執事 12", "title_zh": "黑执事 12", "cover_id": 2054136, "first_chap_id": 95662, "cover_url": "https://i.motiezw.com/cover/1143/2054136.jpg"}], "chapters": [{"cid": "95483", "title": "第1話 In the morning 那名執事⋯能幹", "title_zh": "第1话 In the morning 那名执事⋯能干"}, {"cid": "95484", "title": "第2話 In the afternoon 那名執事⋯萬能", "title_zh": "第2话 In the afternoon 那名执事⋯万能"}, {"cid": "95485", "title": "第3話 In ninght 那名執事⋯最強", "title_zh": "第3话 In ninght 那名执事⋯最强"}, {"cid": "95486", "title": "第4話 At midnight 那名執事⋯最悍", "title_zh": "第4话 At midnight 那名执事⋯最悍"}, {"cid": "95487", "title": "附錄", "title_zh": "附录"}, {"cid": "95512", "title": "第5話 In the morning 那名執事⋯繁忙", "title_zh": "第5话 In the morning 那名执事⋯繁忙"}, {"cid": "95513", "title": "第6話 At noon 那名執事⋯行動", "title_zh": "第6话 At noon 那名执事⋯行动"}, {"cid": "95514", "title": "第7話 In the afternoon 那名執事⋯瘋狂", "title_zh": "第7话 In the afternoon 那名执事⋯疯狂"}, {"cid": "95515", "title": "第8話 At night 那名執事⋯可佩", "title_zh": "第8话 At night 那名执事⋯可佩"}, {"cid": "95516", "title": "第9話 At midnight 那名執事⋯邂逅", "title_zh": "第9话 At midnight 那名执事⋯邂逅"}, {"cid": "95517", "title": "附錄", "title_zh": "附录"}, {"cid": "95519", "title": "第10話 In the morning 那名執事⋯回憶", "title_zh": "第10话 In the morning 那名执事⋯回忆"}, {"cid": "95520", "title": "第11話 At noon 那名執事⋯追憶", "title_zh": "第11话 At noon 那名执事⋯追忆"}, {"cid": "95521", "title": "第12話 In the afternoon 那名執事⋯反攻", "title_zh": "第12话 In the afternoon 那名执事⋯反攻"}, {"cid": "95522", "title": "第13話 At night 那名執事⋯送葬", "title_zh": "第13话 At night 那名执事⋯送葬"}, {"cid": "95523", "title": "第14話 At midnight 那名執事⋯狩獵", "title_zh": "第14话 At midnight 那名执事⋯狩猎"}, {"cid": "95525", "title": "第15話 In the morning 那名執事⋯借住", "title_zh": "第15话 In the morning 那名执事⋯借住"}, {"cid": "95526", "title": "第16話 At noon 那名執事⋯異鄉", "title_zh": "第16话 At noon 那名执事⋯异乡"}, {"cid": "95527", "title": "第17話 In the afternoon 那名執事⋯對抗", "title_zh": "第17话 In the afternoon 那名执事⋯对抗"}, {"cid": "95528", "title": "第18話 At night 那名執事⋯尾隨", "title_zh": "第18话 At night 那名执事⋯尾随"}, {"cid": "95531", "title": "第20話 In the morning 那名執事⋯鑽研", "title_zh": "第20话 In the morning 那名执事⋯钻研"}, {"cid": "95532", "title": "第21話 In the afternoon 那名執事⋯競爭", "title_zh": "第21话 In the afternoon 那名执事⋯竞争"}, {"cid": "95533", "title": "第22話 At night 那名執事⋯優勝", "title_zh": "第22话 At night 那名执事⋯优胜"}, {"cid": "95534", "title": "第23話 At midnight 那名執事⋯焦躁", "title_zh": "第23话 At midnight 那名执事⋯焦躁"}, {"cid": "95535", "title": "附錄", "title_zh": "附录"}, {"cid": "95537", "title": "第24話 In the morning 那名執事⋯上台", "title_zh": "第24话 In the morning 那名执事⋯上台"}, {"cid": "95538", "title": "第25話 In the afternoon 那名執事⋯治療", "title_zh": "第25话 In the afternoon 那名执事⋯治疗"}, {"cid": "95539", "title": "第26話 At night 那名執事⋯同事", "title_zh": "第26话 At night 那名执事⋯同事"}, {"cid": "95540", "title": "第27話 At midnight 那名執事⋯演出", "title_zh": "第27话 At midnight 那名执事⋯演出"}, {"cid": "95541", "title": "附錄", "title_zh": "附录"}, {"cid": "95543", "title": "第28話 In the morning 那名執事⋯交涉", "title_zh": "第28话 In the morning 那名执事⋯交涉"}, {"cid": "95544", "title": "第29話 At noon 那名執事⋯醜事", "title_zh": "第29话 At noon 那名执事⋯丑事"}, {"cid": "95545", "title": "第30話 In the afternoon 那名執事⋯撫養", "title_zh": "第30话 In the afternoon 那名执事⋯抚养"}, {"cid": "95546", "title": "第31話 At night 那名執事⋯觀望", "title_zh": "第31话 At night 那名执事⋯观望"}, {"cid": "95547", "title": "第32話 At midnight 那名執事⋯嘲笑", "title_zh": "第32话 At midnight 那名执事⋯嘲笑"}, {"cid": "95548", "title": "附錄", "title_zh": "附录"}, {"cid": "95550", "title": "第33話 In the morning 那名執事⋯信譽", "title_zh": "第33话 In the morning 那名执事⋯信誉"}, {"cid": "95551", "title": "第34話 At noon 那名執事⋯從容", "title_zh": "第34话 At noon 那名执事⋯从容"}, {"cid": "95552", "title": "第35話 In the afternoon 那名執事⋯執行", "title_zh": "第35话 In the afternoon 那名执事⋯执行"}, {"cid": "95553", "title": "第36話 At night 那名執事⋯隨行", "title_zh": "第36话 At night 那名执事⋯随行"}, {"cid": "95644", "title": "第38話 In the morning 那名執事⋯悲愴", "title_zh": "第38话 In the morning 那名执事⋯悲怆"}, {"cid": "95645", "title": "第39話 At noon 那名執事⋯吃驚", "title_zh": "第39话 At noon 那名执事⋯吃惊"}, {"cid": "95646", "title": "第40話 In the afternoon 那名執事⋯收容", "title_zh": "第40话 In the afternoon 那名执事⋯收容"}, {"cid": "95647", "title": "第41話 At night 那名執事⋯死亡", "title_zh": "第41话 At night 那名执事⋯死亡"}, {"cid": "95648", "title": "第42話 At midnight 那名執事⋯代行", "title_zh": "第42话 At midnight 那名执事⋯代行"}, {"cid": "95650", "title": "第43話 In the morning 那名執事⋯倔強", "title_zh": "第43话 In the morning 那名执事⋯倔强"}, {"cid": "95651", "title": "第44話 At noon 那名執事⋯哀號", "title_zh": "第44话 At noon 那名执事⋯哀号"}, {"cid": "95652", "title": "第45話 In the afternoon 那名執事⋯移動", "title_zh": "第45话 In the afternoon 那名执事⋯移动"}, {"cid": "95653", "title": "第46話 At night 那名執事⋯不需", "title_zh": "第46话 At night 那名执事⋯不需"}, {"cid": "95654", "title": "第47話 At midnight 那名執事⋯默根", "title_zh": "第47话 At midnight 那名执事⋯默根"}, {"cid": "95656", "title": "第48話 In the morning 那名執事⋯解答", "title_zh": "第48话 In the morning 那名执事⋯解答"}, {"cid": "95657", "title": "第49話 At noon 那名執事⋯奇特", "title_zh": "第49话 At noon 那名执事⋯奇特"}, {"cid": "95658", "title": "第50話 In the afternoon 那名執事⋯埋葬", "title_zh": "第50话 In the afternoon 那名执事⋯埋葬"}, {"cid": "95659", "title": "第51話 At night 那名執事⋯出港", "title_zh": "第51话 At night 那名执事⋯出港"}, {"cid": "95660", "title": "第52話 At midnight 那名執事⋯航行", "title_zh": "第52话 At midnight 那名执事⋯航行"}, {"cid": "95662", "title": "第53話 In the morning 那名執事⋯亂鬥", "title_zh": "第53话 In the morning 那名执事⋯乱斗"}, {"cid": "95663", "title": "第54話 At noon 那名執事⋯無雙", "title_zh": "第54话 At noon 那名执事⋯无双"}, {"cid": "95664", "title": "第55話 In the afternoon 那名執事⋯徒勞", "title_zh": "第55话 In the afternoon 那名执事⋯徒劳"}, {"cid": "95665", "title": "第56話 At night 那名執事⋯預估", "title_zh": "第56话 At night 那名执事⋯预估"}, {"cid": "95666", "title": "第57話 At midnight 那名執事⋯苦鬥", "title_zh": "第57话 At midnight 那名执事⋯苦斗"}]};
let lang = 'zh';
let mode = 'scroll';
let curPage = 0;
function renderMeta() {
const t = lang === 'zh' ? COMIC.zh_title : (lang === 'hant' ? COMIC.hant_title : COMIC.en_title);
const d = lang === 'zh' ? COMIC.zh_desc : (lang === 'hant' ? COMIC.hant_desc : COMIC.en_desc);
document.getElementById('hdrTitle').textContent = t;
document.getElementById('heroTitle').textContent = t;
document.getElementById('heroSub').textContent = `${COMIC.author} · 共 ${COMIC.volumes.length} 卷 / ${COMIC.chapters.length} 话`;
document.getElementById('heroDesc').textContent = d;
document.getElementById('heroCover').src = COMIC.pages[0] || '';
document.getElementById('chapCount').textContent = COMIC.chapters.length;
const tg = document.getElementById('heroTags');
tg.innerHTML = '';
(COMIC.tags || []).forEach(x => {
const s = document.createElement('span');
s.className = 'tag';
s.textContent = x;
tg.appendChild(s);
});
}
function renderCatalog() {
const g = document.getElementById('chapGrid');
g.innerHTML = '';
(COMIC.chapters || []).forEach((c, idx) => {
const d = document.createElement('div');
d.className = 'chap-item';
d.textContent = c.title_zh || c.title;
d.onclick = () => {
curPage = idx % COMIC.pages.length;
if (mode === 'flip') renderPages();
else document.querySelectorAll('.page-card')[curPage]?.scrollIntoView({behavior:'smooth'});
document.getElementById('catDrawer').classList.remove('open');
};
g.appendChild(d);
});
}
function renderPages() {
const wrap = document.getElementById('readerWrap');
wrap.className = 'reader-wrap ' + (mode === 'scroll' ? 'scroll-mode' : 'flip-mode');
const box = document.getElementById('pagesContainer');
box.innerHTML = '';
const list = mode === 'scroll' ? COMIC.pages : [COMIC.pages[curPage]];
list.forEach((url, i) => {
const idx = mode === 'scroll' ? i : curPage;
const card = document.createElement('div');
card.className = 'page-card';
card.innerHTML = `<img src="${url}" loading="lazy" alt="Page ${idx+1}"><div class="page-footer">第 ${idx+1} / ${COMIC.pages.length} 页 · ${COMIC.zh_title}</div>`;
if (mode === 'flip') card.onclick = () => stepPage(1);
box.appendChild(card);
});
document.getElementById('pageIndicator').textContent = `${curPage + 1} / ${COMIC.pages.length}`;
}
function setMode(m) {
mode = m;
document.getElementById('btnScroll').classList.toggle('active', m === 'scroll');
document.getElementById('btnFlip').classList.toggle('active', m === 'flip');
renderPages();
}
function stepPage(delta) {
curPage = (curPage + delta + COMIC.pages.length) % COMIC.pages.length;
renderPages();
}
function toggleCatalog() {
document.getElementById('catDrawer').classList.toggle('open');
}
function cycleLang() {
lang = lang === 'zh' ? 'hant' : (lang === 'hant' ? 'en' : 'zh');
renderMeta();
}
renderMeta();
renderCatalog();
renderPages();
</script>
</body>
</html>