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-1407", "mangaid": "1407", "zh_title": "今际之国的闯关者", "hant_title": "今際之國的闖關者", "en_title": "今际之国的闯关者 (Bilimanga #1407)", "author": "麻生羽吕", "tags": ["大逃杀", "游戏", "斗智", "悬疑", "黑暗", "悬疑惊悚", "日本漫画", "漫画"], "zh_desc": "一事无成的高三学生有栖良平,因为永远比不赢优秀的弟弟,心中常想著逃离这讨厌的现实。有一天,他与死党苅部与张太一同鬼混时,目睹一颗极大的烟火,却没想到从此踏入了诡异的世界,还莫名其妙加入了一场「游戏」。却没想到失败的结果大得惊人……为了在这个世界生存下来,他们必须陆续参加游戏,赢取「今际之国」的「签证」!\n\n📚 作品信息:作者 麻生羽吕 · 评分 10 · 共收录 18 卷 / 86 话章节目录与高清彩页/条漫预览。", "hant_desc": "一事無成的高三學生有栖良平,因為永遠比不贏優秀的弟弟,心中常想著逃離這討厭的現實。有一天,他與死黨苅部與張太一同鬼混時,目睹一顆極大的煙火,卻沒想到從此踏入了詭異的世界,還莫名其妙加入了一場「遊戲」。卻沒想到失敗的結果大得驚人……為了在這個世界生存下來,他們必須陸續參加遊戲,贏取「今際之國」的「簽證」!\n\n📚 作品資訊:作者 麻生羽呂 · 評分 10 · 共收錄 18 卷 / 86 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '今际之国的闯关者' (今際之國的闖關者) by 麻生羽吕. Includes 18 volumes and 86 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1407/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1407/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1407/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1407/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1407/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1407/page_06.jpg"], "volumes": [{"title_hant": "今際之國的闖關者 1", "title_zh": "今际之国的闯关者 1", "cover_id": 2527183, "first_chap_id": 116408, "cover_url": "https://i.motiezw.com/cover/1407/2527183.jpg"}, {"title_hant": "今際之國的闖關者 2", "title_zh": "今际之国的闯关者 2", "cover_id": 2527345, "first_chap_id": 116414, "cover_url": "https://i.motiezw.com/cover/1407/2527345.jpg"}, {"title_hant": "今際之國的闖關者 3", "title_zh": "今际之国的闯关者 3", "cover_id": 2527512, "first_chap_id": 116420, "cover_url": "https://i.motiezw.com/cover/1407/2527512.jpg"}, {"title_hant": "今際之國的闖關者 4", "title_zh": "今际之国的闯关者 4", "cover_id": 2527677, "first_chap_id": 116426, "cover_url": "https://i.motiezw.com/cover/1407/2527677.jpg"}, {"title_hant": "今際之國的闖關者 5", "title_zh": "今际之国的闯关者 5", "cover_id": 2527896, "first_chap_id": 116433, "cover_url": "https://i.motiezw.com/cover/1407/2527896.jpg"}, {"title_hant": "今際之國的闖關者 6", "title_zh": "今际之国的闯关者 6", "cover_id": 2528010, "first_chap_id": 116437, "cover_url": "https://i.motiezw.com/cover/1407/2528010.jpg"}, {"title_hant": "今際之國的闖關者 7", "title_zh": "今际之国的闯关者 7", "cover_id": 2528178, "first_chap_id": 116443, "cover_url": "https://i.motiezw.com/cover/1407/2528178.jpg"}, {"title_hant": "今際之國的闖關者 8", "title_zh": "今际之国的闯关者 8", "cover_id": 2528339, "first_chap_id": 116448, "cover_url": "https://i.motiezw.com/cover/1407/2528339.jpg"}, {"title_hant": "今際之國的闖關者 9", "title_zh": "今际之国的闯关者 9", "cover_id": 2528505, "first_chap_id": 116454, "cover_url": "https://i.motiezw.com/cover/1407/2528505.jpg"}, {"title_hant": "今際之國的闖關者 10", "title_zh": "今际之国的闯关者 10", "cover_id": 2528671, "first_chap_id": 116460, "cover_url": "https://i.motiezw.com/cover/1407/2528671.jpg"}, {"title_hant": "今際之國的闖關者 11", "title_zh": "今际之国的闯关者 11", "cover_id": 2528837, "first_chap_id": 116466, "cover_url": "https://i.motiezw.com/cover/1407/2528837.jpg"}, {"title_hant": "今際之國的闖關者 12", "title_zh": "今际之国的闯关者 12", "cover_id": 2529000, "first_chap_id": 116472, "cover_url": "https://i.motiezw.com/cover/1407/2529000.jpg"}], "chapters": [{"cid": "116408", "title": "第1話 今際之國的有栖 ①", "title_zh": "第1话 今际之国的有栖 ①"}, {"cid": "116409", "title": "第1話 今際之國的有栖 ②", "title_zh": "第1话 今际之国的有栖 ②"}, {"cid": "116410", "title": "第2話 梅花3①", "title_zh": "第2话 梅花3①"}, {"cid": "116411", "title": "第3話 梅花3②", "title_zh": "第3话 梅花3②"}, {"cid": "116412", "title": "第4話 簽證", "title_zh": "第4话 签证"}, {"cid": "116414", "title": "第5話 入境第二天", "title_zh": "第5话 入境第二天"}, {"cid": "116415", "title": "第6話 黑桃5①", "title_zh": "第6话 黑桃5①"}, {"cid": "116416", "title": "第7話 黑桃5②", "title_zh": "第7话 黑桃5②"}, {"cid": "116417", "title": "第8話 黑桃5③", "title_zh": "第8话 黑桃5③"}, {"cid": "116418", "title": "第9話 黑桃5④", "title_zh": "第9话 黑桃5④"}, {"cid": "116420", "title": "第10話 入境第三天", "title_zh": "第10话 入境第三天"}, {"cid": "116421", "title": "第11話 紅心7①", "title_zh": "第11话 红心7①"}, {"cid": "116422", "title": "第12話 紅心7②", "title_zh": "第12话 红心7②"}, {"cid": "116423", "title": "第13話 紅心7③", "title_zh": "第13话 红心7③"}, {"cid": "116424", "title": "第14話 入境第七天", "title_zh": "第14话 入境第七天"}, {"cid": "116426", "title": "第15話 入境第八天", "title_zh": "第15话 入境第八天"}, {"cid": "116427", "title": "第16話 海灘 ①", "title_zh": "第16话 海滩 ①"}, {"cid": "116428", "title": "第17話 海灘 ②", "title_zh": "第17话 海滩 ②"}, {"cid": "116429", "title": "第18話 海灘 ③", "title_zh": "第18话 海滩 ③"}, {"cid": "116430", "title": "第19話 海灘 ④", "title_zh": "第19话 海滩 ④"}, {"cid": "116433", "title": "第20話 海灘 ⑤", "title_zh": "第20话 海滩 ⑤"}, {"cid": "116434", "title": "第21話 紅心10 ①", "title_zh": "第21话 红心10 ①"}, {"cid": "116435", "title": "第22話 紅心10 ②", "title_zh": "第22话 红心10 ②"}, {"cid": "116432", "title": "特別篇 紅心4①", "title_zh": "特别篇 红心4①"}, {"cid": "116437", "title": "特別篇 紅心4②", "title_zh": "特别篇 红心4②"}, {"cid": "116438", "title": "特別篇 紅心4③", "title_zh": "特别篇 红心4③"}, {"cid": "116439", "title": "第23話 紅心10 ③", "title_zh": "第23话 红心10 ③"}, {"cid": "116440", "title": "第24話 紅心10 ④", "title_zh": "第24话 红心10 ④"}, {"cid": "116441", "title": "第25話 紅心10 ⑤", "title_zh": "第25话 红心10 ⑤"}, {"cid": "116443", "title": "第26話 紅心10 ⑥", "title_zh": "第26话 红心10 ⑥"}, {"cid": "116444", "title": "第27話 紅心10 ⑦", "title_zh": "第27话 红心10 ⑦"}, {"cid": "116445", "title": "第28話 紅心10 ⑧", "title_zh": "第28话 红心10 ⑧"}, {"cid": "116446", "title": "第29話 滯留第22天", "title_zh": "第29话 滞留第22天"}, {"cid": "116448", "title": "特別篇2 梅花4①", "title_zh": "特别篇2 梅花4①"}, {"cid": "116449", "title": "特別篇2 梅花4②", "title_zh": "特别篇2 梅花4②"}, {"cid": "116450", "title": "第30話 滯留第23天", "title_zh": "第30话 滞留第23天"}, {"cid": "116451", "title": "第31話 中場休息", "title_zh": "第31话 中场休息"}, {"cid": "116452", "title": "第32話 下一階段", "title_zh": "第32话 下一阶段"}, {"cid": "116454", "title": "第33話 梅花K①", "title_zh": "第33话 梅花K①"}, {"cid": "116455", "title": "第34話 梅花K②", "title_zh": "第34话 梅花K②"}, {"cid": "116457", "title": "特別篇3 方塊6①", "title_zh": "特别篇3 方块6①"}, {"cid": "116458", "title": "特別篇3 方塊6②", "title_zh": "特别篇3 方块6②"}, {"cid": "116460", "title": "第36話 梅花K④", "title_zh": "第36话 梅花K④"}, {"cid": "116461", "title": "第37話 梅花K⑤", "title_zh": "第37话 梅花K⑤"}, {"cid": "116462", "title": "特別篇4 黑桃7①", "title_zh": "特别篇4 黑桃7①"}, {"cid": "116463", "title": "特別篇4 黑桃7②", "title_zh": "特别篇4 黑桃7②"}, {"cid": "116464", "title": "特別篇4 黑桃7③", "title_zh": "特别篇4 黑桃7③"}, {"cid": "116466", "title": "第38話 梅花K⑥", "title_zh": "第38话 梅花K⑥"}, {"cid": "116467", "title": "第39話 梅花K⑦", "title_zh": "第39话 梅花K⑦"}, {"cid": "116468", "title": "第40話 梅花K⑧", "title_zh": "第40话 梅花K⑧"}, {"cid": "116469", "title": "第41話 梅花K⑨", "title_zh": "第41话 梅花K⑨"}, {"cid": "116470", "title": "第42話 開始第3天", "title_zh": "第42话 开始第3天"}, {"cid": "116472", "title": "第43話 開始第4天", "title_zh": "第43话 开始第4天"}, {"cid": "116473", "title": "第44話 開始第5天", "title_zh": "第44话 开始第5天"}, {"cid": "116474", "title": "第45話 紅心J①", "title_zh": "第45话 红心J①"}, {"cid": "116475", "title": "第46話 紅心J②", "title_zh": "第46话 红心J②"}, {"cid": "116477", "title": "第47話 紅心J③", "title_zh": "第47话 红心J③"}, {"cid": "116478", "title": "第48話 紅心J④", "title_zh": "第48话 红心J④"}, {"cid": "116479", "title": "第49話 紅心J⑤", "title_zh": "第49话 红心J⑤"}, {"cid": "116480", "title": "特別篇5 黑桃K①", "title_zh": "特别篇5 黑桃K①"}]};
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>