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-449", "mangaid": "449", "zh_title": "来自深渊", "hant_title": "來自深淵", "en_title": "来自深渊 (Bilimanga #449)", "author": "つくしあきひと", "tags": ["奇幻", "冒险", "异世界", "战斗", "悬疑", "猎奇", "治愈", "奇幻冒险"], "zh_desc": "已经被彻底地探索的这个世界,唯一仅存的秘境就是名为『深渊』的大洞。\n\r\n在这个完全不知道会通往何处的巨大垂直洞穴里,不仅有怪模怪样的生物栖息,\n\r\n同时还有著现今人类无法制作的珍贵遗物沉睡其中。\n\r\n\n\r\n人们受到深渊永无止尽的神秘样貌吸引,驱使他们进入内部展开冒险。\n\r\n就这样,面对无数次进入大洞挑战的冒险者,\n\r\n人们开始用『探窟家』一词来称呼他们。\n\r\n\n\r\n住在搭建于深渊周围的城镇『奥斯』的孤儿‧莉可,\n\r\n她抱持著「总有一天要和母亲一样成为伟大的探窟家,并解开所有深渊的谜团」这样的梦想。\n\r\n某一天,正在深渊探窟的她捡到了外表有如少年的机器人…?\n\r\n\n\r\n溶入幻想与机械的庞大动作冒险故事,\n\n📚 作品信息:作者 つくしあきひと · 评分 10 · 共收录 15 卷 / 79 话章节目录与高清彩页/条漫预览。", "hant_desc": "已經被徹底地探索的這個世界,唯一僅存的秘境就是名為『深淵』的大洞。\n\r\n在這個完全不知道會通往何處的巨大垂直洞穴裡,不僅有怪模怪樣的生物棲息,\n\r\n同時還有著現今人類無法製作的珍貴遺物沉睡其中。\n\r\n\n\r\n人們受到深淵永無止盡的神祕樣貌吸引,驅使他們進入內部展開冒險。\n\r\n就這樣,面對無數次進入大洞挑戰的冒險者,\n\r\n人們開始用『探窟家』一詞來稱呼他們。\n\r\n\n\r\n住在搭建於深淵周圍的城鎮『奧斯』的孤兒‧莉可,\n\r\n她抱持著「總有一天要和母親一樣成為偉大的探窟家,並解開所有深淵的謎團」這樣的夢想。\n\r\n某一天,正在深淵探窟的她撿到了外表有如少年的機器人…?\n\r\n\n\r\n溶入幻想與機械的龐大動作冒險故事,\n\n📚 作品資訊:作者 つくしあきひと · 評分 10 · 共收錄 15 卷 / 79 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '来自深渊' (來自深淵) by つくしあきひと. Includes 15 volumes and 79 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-449/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-449/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-449/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-449/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-449/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-449/page_06.jpg"], "volumes": [{"title_hant": "來自深淵 1", "title_zh": "来自深渊 1", "cover_id": 770528, "first_chap_id": 35868, "cover_url": "https://i.motiezw.com/cover/449/770528.jpg"}, {"title_hant": "來自深淵 2", "title_zh": "来自深渊 2", "cover_id": 770693, "first_chap_id": 35877, "cover_url": "https://i.motiezw.com/cover/449/770693.jpg"}, {"title_hant": "來自深淵 3", "title_zh": "来自深渊 3", "cover_id": 770850, "first_chap_id": 35886, "cover_url": "https://i.motiezw.com/cover/449/770850.jpg"}, {"title_hant": "來自深淵 4", "title_zh": "来自深渊 4", "cover_id": 771008, "first_chap_id": 35895, "cover_url": "https://i.motiezw.com/cover/449/771008.jpg"}, {"title_hant": "來自深淵 5", "title_zh": "来自深渊 5", "cover_id": 771167, "first_chap_id": 35904, "cover_url": "https://i.motiezw.com/cover/449/771167.jpg"}, {"title_hant": "來自深淵 6", "title_zh": "来自深渊 6", "cover_id": 771325, "first_chap_id": 35911, "cover_url": "https://i.motiezw.com/cover/449/771325.jpg"}, {"title_hant": "來自深淵 7", "title_zh": "来自深渊 7", "cover_id": 771524, "first_chap_id": 35920, "cover_url": "https://i.motiezw.com/cover/449/771524.jpg"}, {"title_hant": "來自深淵 8", "title_zh": "来自深渊 8", "cover_id": 771684, "first_chap_id": 35926, "cover_url": "https://i.motiezw.com/cover/449/771684.jpg"}, {"title_hant": "來自深淵 9", "title_zh": "来自深渊 9", "cover_id": 771844, "first_chap_id": 35932, "cover_url": "https://i.motiezw.com/cover/449/771844.jpg"}, {"title_hant": "來自深淵 10", "title_zh": "来自深渊 10", "cover_id": 772003, "first_chap_id": 35938, "cover_url": "https://i.motiezw.com/cover/449/772003.jpg"}, {"title_hant": "來自深淵 11", "title_zh": "来自深渊 11", "cover_id": 772163, "first_chap_id": 35944, "cover_url": "https://i.motiezw.com/cover/449/772163.jpg"}, {"title_hant": "來自深淵 12", "title_zh": "来自深渊 12", "cover_id": 772311, "first_chap_id": 35950, "cover_url": "https://i.motiezw.com/cover/449/772311.jpg"}], "chapters": [{"cid": "35868", "title": "01 大洞的城鎮奧斯", "title_zh": "01 大洞的城镇奥斯"}, {"cid": "35869", "title": "02 樹木叢生的化石群", "title_zh": "02 树木丛生的化石群"}, {"cid": "35870", "title": "03 本來是處罰房的莉可房間", "title_zh": "03 本来是处罚房的莉可房间"}, {"cid": "35871", "title": "04 孤兒院貝爾爵羅", "title_zh": "04 孤儿院贝尔爵罗"}, {"cid": "35872", "title": "05 復活祭", "title_zh": "05 复活祭"}, {"cid": "35873", "title": "06 預兆", "title_zh": "06 预兆"}, {"cid": "35874", "title": "07 出發前夜", "title_zh": "07 出发前夜"}, {"cid": "35875", "title": "08 我們出發了!", "title_zh": "08 我们出发了!"}, {"cid": "35877", "title": "09 深界一層", "title_zh": "09 深界一层"}, {"cid": "35878", "title": "10 深界二層", "title_zh": "10 深界二层"}, {"cid": "35879", "title": "11 火葬砲", "title_zh": "11 火葬砲"}, {"cid": "35880", "title": "12 二層最底端 顛倒森林", "title_zh": "12 二层最底端 颠倒森林"}, {"cid": "35881", "title": "13 監視基地", "title_zh": "13 监视基地"}, {"cid": "35882", "title": "14 除去詛咒的搖籃", "title_zh": "14 除去诅咒的摇篮"}, {"cid": "35883", "title": "15 不動卿", "title_zh": "15 不动卿"}, {"cid": "35884", "title": "16 教育遺物的方法", "title_zh": "16 教育遗物的方法"}, {"cid": "35886", "title": "17 生存訓練", "title_zh": "17 生存训练"}, {"cid": "35887", "title": "18 深界三層 大斷層", "title_zh": "18 深界三层 大断层"}, {"cid": "35888", "title": "19 毒與詛咒", "title_zh": "19 毒与诅咒"}, {"cid": "35889", "title": "20 奈奈祈", "title_zh": "20 奈奈祈"}, {"cid": "35890", "title": "21 雷格的記憶", "title_zh": "21 雷格的记忆"}, {"cid": "35892", "title": "23 恐怖的實驗", "title_zh": "23 恐怖的实验"}, {"cid": "35893", "title": "24 解放靈魂", "title_zh": "24 解放灵魂"}, {"cid": "35895", "title": "25 從黑暗中的生還", "title_zh": "25 从黑暗中的生还"}, {"cid": "35896", "title": "26 重新起步", "title_zh": "26 重新起步"}, {"cid": "35897", "title": "27 禁斷的花園", "title_zh": "27 禁断的花园"}, {"cid": "35898", "title": "28 通往六層的入口", "title_zh": "28 通往六层的入口"}, {"cid": "35899", "title": "29 命運的再會", "title_zh": "29 命运的再会"}, {"cid": "35900", "title": "30 意想不到的危機", "title_zh": "30 意想不到的危机"}, {"cid": "35901", "title": "31 絕望與希望", "title_zh": "31 绝望与希望"}, {"cid": "35902", "title": "32 激戰的盡頭", "title_zh": "32 激战的尽头"}, {"cid": "35904", "title": "33 面具的真貌", "title_zh": "33 面具的真貌"}, {"cid": "35905", "title": "34 逆襲", "title_zh": "34 逆袭"}, {"cid": "35906", "title": "35 混濁的記憶", "title_zh": "35 混浊的记忆"}, {"cid": "35907", "title": "36 黎明的庭園", "title_zh": "36 黎明的庭园"}, {"cid": "35908", "title": "37 黎明之花", "title_zh": "37 黎明之花"}, {"cid": "35909", "title": "38 挑戰者們", "title_zh": "38 挑战者们"}, {"cid": "35911", "title": "不知何處的 How are you 01 雷格", "title_zh": "不知何处的 How are you 01 雷格"}, {"cid": "35912", "title": "39 不謠之都", "title_zh": "39 不谣之都"}, {"cid": "35913", "title": "40 化為修劇終末的生命", "title_zh": "40 化为修剧终末的生命"}, {"cid": "35914", "title": "41 價值的精算", "title_zh": "41 价值的精算"}, {"cid": "35915", "title": "42 修劇終末的公主", "title_zh": "42 修剧终末的公主"}, {"cid": "35917", "title": "不知何處的 How are you 03 吉路歐", "title_zh": "不知何处的 How are you 03 吉路欧"}, {"cid": "35920", "title": "43 逼近而來的危機", "title_zh": "43 逼近而来的危机"}, {"cid": "35921", "title": "44 慘劇終末的食堂", "title_zh": "44 惨剧终末的食堂"}, {"cid": "35922", "title": "45 被囚禁者", "title_zh": "45 被囚禁者"}, {"cid": "35923", "title": "46 呼喚", "title_zh": "46 呼唤"}, {"cid": "35924", "title": "47 村子的秘密", "title_zh": "47 村子的秘密"}, {"cid": "35926", "title": "48 羅盤指向了黑暗", "title_zh": "48 罗盘指向了黑暗"}, {"cid": "35927", "title": "49 黃金鄉", "title_zh": "49 黄金乡"}, {"cid": "35928", "title": "50 愉望的搖籃", "title_zh": "50 愉望的摇篮"}, {"cid": "35929", "title": "51 願望的形體 1", "title_zh": "51 愿望的形体 1"}, {"cid": "35930", "title": "51 願望的形體 2", "title_zh": "51 愿望的形体 2"}, {"cid": "35932", "title": "52 與法普妲的約定", "title_zh": "52 与法普妲的约定"}, {"cid": "35933", "title": "53 崩壞的序曲", "title_zh": "53 崩坏的序曲"}, {"cid": "35934", "title": "54 換起來的全會是", "title_zh": "54 换起来的全会是"}, {"cid": "35935", "title": "55 法普妲與雷格 1", "title_zh": "55 法普妲与雷格 1"}, {"cid": "35936", "title": "55 法普妲與雷格 2", "title_zh": "55 法普妲与雷格 2"}, {"cid": "35938", "title": "56 禮物", "title_zh": "56 礼物"}, {"cid": "35939", "title": "57 價值", "title_zh": "57 价值"}]};
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>