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-181", "mangaid": "181", "zh_title": "拳斗暗黑传", "hant_title": "拳鬥暗黑傳", "en_title": "拳斗暗黑传 (Bilimanga #181)", "author": "技来静也", "tags": ["热血", "战斗", "竞技", "历史", "战斗热血", "日本漫画", "漫画", "日漫"], "zh_desc": "古罗马角斗士之间残酷的竞技漫画!庞贝的「活传说」莎比娜希望席斯坦成为她的侍从,但却遭到了席斯坦的拒绝。恼羞成怒的莎比娜于是动用人际关系控制竞技大会拳斗赛的比赛顺序,让席斯坦对上了庞贝最强的拳斗士.艾姆汀,比赛的结果是……\n\n📚 作品信息:作者 技来静也 · 评分 10 · 共收录 15 卷 / 151 话章节目录与高清彩页/条漫预览。", "hant_desc": "古羅馬角鬥士之間殘酷的競技漫畫!龐貝的「活傳說」莎比娜希望席斯坦成為她的侍從,但卻遭到了席斯坦的拒絕。惱羞成怒的莎比娜於是動用人際關係控制競技大會拳斗賽的比賽順序,讓席斯坦對上了龐貝最強的拳鬥士.艾姆汀,比賽的結果是……\n\n📚 作品資訊:作者 技來靜也 · 評分 10 · 共收錄 15 卷 / 151 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '拳斗暗黑传' (拳鬥暗黑傳) by 技来静也. Includes 15 volumes and 151 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-181/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-181/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-181/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-181/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-181/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-181/page_06.jpg"], "volumes": [{"title_hant": "拳鬥暗黑傳 1", "title_zh": "拳斗暗黑传 1", "cover_id": 328554, "first_chap_id": 15450, "cover_url": "https://i.motiezw.com/cover/181/328554.jpg"}, {"title_hant": "拳鬥暗黑傳 2", "title_zh": "拳斗暗黑传 2", "cover_id": 328747, "first_chap_id": 15459, "cover_url": "https://i.motiezw.com/cover/181/328747.jpg"}, {"title_hant": "拳鬥暗黑傳 3", "title_zh": "拳斗暗黑传 3", "cover_id": 328937, "first_chap_id": 15468, "cover_url": "https://i.motiezw.com/cover/181/328937.jpg"}, {"title_hant": "拳鬥暗黑傳 4", "title_zh": "拳斗暗黑传 4", "cover_id": 329142, "first_chap_id": 15477, "cover_url": "https://i.motiezw.com/cover/181/329142.jpg"}, {"title_hant": "拳鬥暗黑傳 5", "title_zh": "拳斗暗黑传 5", "cover_id": 329335, "first_chap_id": 15486, "cover_url": "https://i.motiezw.com/cover/181/329335.jpg"}, {"title_hant": "拳鬥暗黑傳 6", "title_zh": "拳斗暗黑传 6", "cover_id": 329551, "first_chap_id": 15496, "cover_url": "https://i.motiezw.com/cover/181/329551.jpg"}, {"title_hant": "拳鬥暗黑傳 7", "title_zh": "拳斗暗黑传 7", "cover_id": 329741, "first_chap_id": 15505, "cover_url": "https://i.motiezw.com/cover/181/329741.jpg"}, {"title_hant": "拳鬥暗黑傳 8", "title_zh": "拳斗暗黑传 8", "cover_id": 329934, "first_chap_id": 15514, "cover_url": "https://i.motiezw.com/cover/181/329934.jpg"}, {"title_hant": "拳鬥暗黑傳 9", "title_zh": "拳斗暗黑传 9", "cover_id": 330173, "first_chap_id": 15524, "cover_url": "https://i.motiezw.com/cover/181/330173.jpg"}, {"title_hant": "拳鬥暗黑傳 10", "title_zh": "拳斗暗黑传 10", "cover_id": 330370, "first_chap_id": 15537, "cover_url": "https://i.motiezw.com/cover/181/330370.jpg"}, {"title_hant": "拳鬥暗黑傳 11", "title_zh": "拳斗暗黑传 11", "cover_id": 330552, "first_chap_id": 15546, "cover_url": "https://i.motiezw.com/cover/181/330552.jpg"}, {"title_hant": "拳鬥暗黑傳 12", "title_zh": "拳斗暗黑传 12", "cover_id": 330747, "first_chap_id": 15559, "cover_url": "https://i.motiezw.com/cover/181/330747.jpg"}], "chapters": [{"cid": "15450", "title": "第1話「拳駑·席斯坦」", "title_zh": "第1话「拳驽·席斯坦」"}, {"cid": "15451", "title": "第2話「勝利者的烙印」", "title_zh": "第2话「胜利者的烙印」"}, {"cid": "15452", "title": "第3話「帝都·羅馬」", "title_zh": "第3话「帝都·罗马」"}, {"cid": "15453", "title": "第4話「圓形的戰場」", "title_zh": "第4话「圆形的战场」"}, {"cid": "15454", "title": "第5話「少年皇帝·尼祿」", "title_zh": "第5话「少年皇帝·尼禄」"}, {"cid": "15455", "title": "第6話「格鬥兒·魯斯卡」", "title_zh": "第6话「格斗儿·鲁斯卡」"}, {"cid": "15456", "title": "第7話「三人的邂逅」", "title_zh": "第7话「三人的邂逅」"}, {"cid": "15457", "title": "第8話「異種格鬥」", "title_zh": "第8话「异种格斗」"}, {"cid": "15459", "title": "第1話「紅髪少年」", "title_zh": "第1话「红髪少年」"}, {"cid": "15460", "title": "第2話「壁」", "title_zh": "第2话「壁」"}, {"cid": "15461", "title": "第3話「演者」", "title_zh": "第3话「演者」"}, {"cid": "15462", "title": "第4話「刺客」", "title_zh": "第4话「刺客」"}, {"cid": "15463", "title": "第5話「虜囚」", "title_zh": "第5话「虏囚」"}, {"cid": "15464", "title": "第6話「劍舞」", "title_zh": "第6话「剑舞」"}, {"cid": "15465", "title": "第7話「偽證」", "title_zh": "第7话「伪证」"}, {"cid": "15466", "title": "第8話「鬥者之道」", "title_zh": "第8话「斗者之道」"}, {"cid": "15468", "title": "第1話「歸還」", "title_zh": "第1话「归还」"}, {"cid": "15469", "title": "第2話「制服者、服從者!」", "title_zh": "第2话「制服者、服从者!」"}, {"cid": "15470", "title": "第3話「聖戰」", "title_zh": "第3话「圣战」"}, {"cid": "15471", "title": "第4話「拳鬥繼承人」", "title_zh": "第4话「拳斗继承人」"}, {"cid": "15472", "title": "第5話「孤影」", "title_zh": "第5话「孤影」"}, {"cid": "15474", "title": "第7話「獅子吼」", "title_zh": "第7话「狮子吼」"}, {"cid": "15475", "title": "第8話「神的車輪」", "title_zh": "第8话「神的车轮」"}, {"cid": "15477", "title": "第1話「魔拳」", "title_zh": "第1话「魔拳」"}, {"cid": "15478", "title": "第2話「戀結」", "title_zh": "第2话「恋结」"}, {"cid": "15479", "title": "第3話「臨界點」", "title_zh": "第3话「临界点」"}, {"cid": "15480", "title": "第4話「起爆」", "title_zh": "第4话「起爆」"}, {"cid": "15481", "title": "第5話「怨火」", "title_zh": "第5话「怨火」"}, {"cid": "15482", "title": "第6話「慟哭」", "title_zh": "第6话「恸哭」"}, {"cid": "15483", "title": "第7話「決裂」", "title_zh": "第7话「决裂」"}, {"cid": "15484", "title": "第8話「告別」", "title_zh": "第8话「告别」"}, {"cid": "15486", "title": "第1話「駑隸市場」", "title_zh": "第1话「驽隶市场」"}, {"cid": "15487", "title": "第2話「轉變」", "title_zh": "第2话「转变」"}, {"cid": "15488", "title": "第3話「再起」", "title_zh": "第3话「再起」"}, {"cid": "15489", "title": "第4話「咒縛」", "title_zh": "第4话「咒缚」"}, {"cid": "15490", "title": "第4話「咒縛」", "title_zh": "第4话「咒缚」"}, {"cid": "15491", "title": "第5話「殘像」", "title_zh": "第5话「残像」"}, {"cid": "15492", "title": "第6話「流轉」", "title_zh": "第6话「流转」"}, {"cid": "15493", "title": "第7話「試鬥」", "title_zh": "第7话「试斗」"}, {"cid": "15494", "title": "第8話「交叉」", "title_zh": "第8话「交叉」"}, {"cid": "15496", "title": "第1話『駑隸街道』", "title_zh": "第1话『驽隶街道』"}, {"cid": "15497", "title": "第2話『奇譚』", "title_zh": "第2话『奇谭』"}, {"cid": "15499", "title": "第4話『異端兒』", "title_zh": "第4话『异端儿』"}, {"cid": "15500", "title": "第5話『咆哮』", "title_zh": "第5话『咆哮』"}, {"cid": "15501", "title": "第6話『狂搔』", "title_zh": "第6话『狂搔』"}, {"cid": "15502", "title": "第7話『赤閣』", "title_zh": "第7话『赤阁』"}, {"cid": "15503", "title": "第8話『狂亂』", "title_zh": "第8话『狂乱』"}, {"cid": "15505", "title": "第1話『蒼海』", "title_zh": "第1话『苍海』"}, {"cid": "15506", "title": "第2話『來港者』", "title_zh": "第2话『来港者』"}, {"cid": "15507", "title": "第3話『幻臭』", "title_zh": "第3话『幻臭』"}, {"cid": "15508", "title": "第4話『悶倒』", "title_zh": "第4话『闷倒』"}, {"cid": "15509", "title": "第5話『領悟』", "title_zh": "第5话『领悟』"}, {"cid": "15510", "title": "第6話『勝者的禮儀』", "title_zh": "第6话『胜者的礼仪』"}, {"cid": "15511", "title": "第7話『殺戮祭』", "title_zh": "第7话『杀戮祭』"}, {"cid": "15512", "title": "第8話『落陽』", "title_zh": "第8话『落阳』"}, {"cid": "15514", "title": "第1話『獅子的血族』", "title_zh": "第1话『狮子的血族』"}, {"cid": "15515", "title": "第2話『奇劇』", "title_zh": "第2话『奇剧』"}, {"cid": "15516", "title": "第3話『幻夢』", "title_zh": "第3话『幻梦』"}, {"cid": "15517", "title": "第4話『舊傷』", "title_zh": "第4话『旧伤』"}, {"cid": "15518", "title": "第5話『疑惑』", "title_zh": "第5话『疑惑』"}]};
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>