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-1157", "mangaid": "1157", "zh_title": "掠夺者", "hant_title": "掠奪者", "en_title": "掠夺者 (Bilimanga #1157)", "author": "水无月すう", "tags": ["奇幻", "冒险", "异世界", "战斗", "战争", "热血", "异能", "黑暗"], "zh_desc": "艾尔西亚历305年。\n\r\n在这个由数字统治的世界,少女与一名男性邂逅了——\n\r\n\n\r\n\n\r\n曾经有一群人以压倒性的力量在一场后世称为「废弃战争」的大战里将世界导向和平。\n\r\n那逐渐被人们遗忘的英雄名为——击坠王。\n\r\n然而,当一名心怀强烈意志走上旅程的年幼少女道出此名之际,\n\r\n在这个由印于身上的数字决定人们价值的世界,一场震撼世界的崭新故事开始了!\n\n📚 作品信息:作者 水无月すう · 评分 10 · 共收录 21 卷 / 81 话章节目录与高清彩页/条漫预览。", "hant_desc": "艾爾西亞曆305年。\n\r\n在這個由數字統治的世界,少女與一名男性邂逅了——\n\r\n\n\r\n\n\r\n曾經有一群人以壓倒性的力量在一場後世稱為「廢棄戰爭」的大戰裡將世界導向和平。\n\r\n那逐漸被人們遺忘的英雄名為——擊墜王。\n\r\n然而,當一名心懷強烈意志走上旅程的年幼少女道出此名之際,\n\r\n在這個由印於身上的數字決定人們價值的世界,一場震撼世界的嶄新故事開始了!\n\n📚 作品資訊:作者 水無月すう · 評分 10 · 共收錄 21 卷 / 81 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '掠夺者' (掠奪者) by 水无月すう. Includes 21 volumes and 81 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1157/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1157/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1157/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1157/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1157/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1157/page_06.jpg"], "volumes": [{"title_hant": "掠奪者 1", "title_zh": "掠夺者 1", "cover_id": 2081793, "first_chap_id": 96984, "cover_url": "https://i.motiezw.com/cover/1157/2081793.jpg"}, {"title_hant": "掠奪者 2", "title_zh": "掠夺者 2", "cover_id": 2081996, "first_chap_id": 96990, "cover_url": "https://i.motiezw.com/cover/1157/2081996.jpg"}, {"title_hant": "掠奪者 3", "title_zh": "掠夺者 3", "cover_id": 2082206, "first_chap_id": 96995, "cover_url": "https://i.motiezw.com/cover/1157/2082206.jpg"}, {"title_hant": "掠奪者 4", "title_zh": "掠夺者 4", "cover_id": 2082386, "first_chap_id": 97000, "cover_url": "https://i.motiezw.com/cover/1157/2082386.jpg"}, {"title_hant": "掠奪者 5", "title_zh": "掠夺者 5", "cover_id": 2082576, "first_chap_id": 97005, "cover_url": "https://i.motiezw.com/cover/1157/2082576.jpg"}, {"title_hant": "掠奪者 6", "title_zh": "掠夺者 6", "cover_id": 2082763, "first_chap_id": 97010, "cover_url": "https://i.motiezw.com/cover/1157/2082763.jpg"}, {"title_hant": "掠奪者 7", "title_zh": "掠夺者 7", "cover_id": 2082959, "first_chap_id": 97015, "cover_url": "https://i.motiezw.com/cover/1157/2082959.jpg"}, {"title_hant": "掠奪者 8", "title_zh": "掠夺者 8", "cover_id": 2083148, "first_chap_id": 97020, "cover_url": "https://i.motiezw.com/cover/1157/2083148.jpg"}, {"title_hant": "掠奪者 9", "title_zh": "掠夺者 9", "cover_id": 2083321, "first_chap_id": 97025, "cover_url": "https://i.motiezw.com/cover/1157/2083321.jpg"}, {"title_hant": "掠奪者 10", "title_zh": "掠夺者 10", "cover_id": 2083500, "first_chap_id": 97030, "cover_url": "https://i.motiezw.com/cover/1157/2083500.jpg"}, {"title_hant": "掠奪者 11", "title_zh": "掠夺者 11", "cover_id": 2083684, "first_chap_id": 97035, "cover_url": "https://i.motiezw.com/cover/1157/2083684.jpg"}, {"title_hant": "掠奪者 12", "title_zh": "掠夺者 12", "cover_id": 2083843, "first_chap_id": 97040, "cover_url": "https://i.motiezw.com/cover/1157/2083843.jpg"}], "chapters": [{"cid": "96984", "title": "第1話 傳說的擊墜王①", "title_zh": "第1话 传说的击坠王①"}, {"cid": "96985", "title": "第1話 傳說的擊墜王②", "title_zh": "第1话 传说的击坠王②"}, {"cid": "96986", "title": "第2話 最討厭你了", "title_zh": "第2话 最讨厌你了"}, {"cid": "96987", "title": "第3話 制服就這樣,也沒辦法", "title_zh": "第3话 制服就这样,也没办法"}, {"cid": "96988", "title": "附錄 設定畫廊", "title_zh": "附录 设定画廊"}, {"cid": "96990", "title": "第4話 非法持有者", "title_zh": "第4话 非法持有者"}, {"cid": "96991", "title": "第5話 該道歉的人是你", "title_zh": "第5话 该道歉的人是你"}, {"cid": "96992", "title": "第6話 直覺", "title_zh": "第6话 直觉"}, {"cid": "96993", "title": "第7話 深淵的惡魔", "title_zh": "第7话 深渊的恶魔"}, {"cid": "96995", "title": "第8話 什麼都看不見", "title_zh": "第8话 什么都看不见"}, {"cid": "96996", "title": "第9話 掠奪者", "title_zh": "第9话 掠夺者"}, {"cid": "96997", "title": "第10話 請溫柔撩起我的頭髮", "title_zh": "第10话 请温柔撩起我的头发"}, {"cid": "96998", "title": "第11話 真本事", "title_zh": "第11话 真本事"}, {"cid": "97000", "title": "第12話 間諜", "title_zh": "第12话 间谍"}, {"cid": "97001", "title": "第13話 入學典禮", "title_zh": "第13话 入学典礼"}, {"cid": "97002", "title": "第14話 罕見的人", "title_zh": "第14话 罕见的人"}, {"cid": "97003", "title": "第15話 墜落的神", "title_zh": "第15话 坠落的神"}, {"cid": "97005", "title": "第16話 吃得飽飽的", "title_zh": "第16话 吃得饱饱的"}, {"cid": "97006", "title": "第17話 连坐處分", "title_zh": "第17话 连坐处分"}, {"cid": "97008", "title": "第19話 協定的戰爭", "title_zh": "第19话 协定的战争"}, {"cid": "97010", "title": "第20話 Q書", "title_zh": "第20话 Q书"}, {"cid": "97011", "title": "第21話 敗露", "title_zh": "第21话 败露"}, {"cid": "97012", "title": "第22話 磨擦聲", "title_zh": "第22话 磨擦声"}, {"cid": "97013", "title": "第23話 為廢棄而掀起的戰爭", "title_zh": "第23话 为废弃而掀起的战争"}, {"cid": "97015", "title": "第24話 騎士", "title_zh": "第24话 骑士"}, {"cid": "97016", "title": "第25話 閃擊的擊墜王", "title_zh": "第25话 闪击的击坠王"}, {"cid": "97017", "title": "第26話 我的統計基準是——", "title_zh": "第26话 我的统计基准是——"}, {"cid": "97018", "title": "第27話 選民", "title_zh": "第27话 选民"}, {"cid": "97020", "title": "第28話 花心", "title_zh": "第28话 花心"}, {"cid": "97021", "title": "第29話 雨①", "title_zh": "第29话 雨①"}, {"cid": "97022", "title": "第30話 雨②", "title_zh": "第30话 雨②"}, {"cid": "97023", "title": "第31話 父親", "title_zh": "第31话 父亲"}, {"cid": "97025", "title": "第32話 測試", "title_zh": "第32话 测试"}, {"cid": "97026", "title": "第33話 英雄①", "title_zh": "第33话 英雄①"}, {"cid": "97027", "title": "第34話 英雄②", "title_zh": "第34话 英雄②"}, {"cid": "97028", "title": "第35話 約定", "title_zh": "第35话 约定"}, {"cid": "97030", "title": "第36話 純屬偶然", "title_zh": "第36话 纯属偶然"}, {"cid": "97031", "title": "第37話 巴哈", "title_zh": "第37话 巴哈"}, {"cid": "97033", "title": "第39話 重逢", "title_zh": "第39话 重逢"}, {"cid": "97035", "title": "第40話 別離", "title_zh": "第40话 别离"}, {"cid": "97036", "title": "第41話 我的統計基準是——", "title_zh": "第41话 我的统计基准是——"}, {"cid": "97037", "title": "第42話 開會", "title_zh": "第42话 开会"}, {"cid": "97038", "title": "第43話 被守護的願望、被摧毀的願望", "title_zh": "第43话 被守护的愿望、被摧毁的愿望"}, {"cid": "97040", "title": "第44話 侵略", "title_zh": "第44话 侵略"}, {"cid": "97041", "title": "第45話 重返", "title_zh": "第45话 重返"}, {"cid": "97042", "title": "第46話 方法", "title_zh": "第46话 方法"}, {"cid": "97043", "title": "第47話 光", "title_zh": "第47话 光"}, {"cid": "97045", "title": "第48話 玩具", "title_zh": "第48话 玩具"}, {"cid": "97046", "title": "第49話 背叛", "title_zh": "第49话 背叛"}, {"cid": "97047", "title": "第50話 唯一的人!", "title_zh": "第50话 唯一的人!"}, {"cid": "97048", "title": "第51話 迎擊", "title_zh": "第51话 迎击"}, {"cid": "97050", "title": "第52話 天使", "title_zh": "第52话 天使"}, {"cid": "97051", "title": "第53話 後悔", "title_zh": "第53话 后悔"}, {"cid": "97052", "title": "第54話 孤獨", "title_zh": "第54话 孤独"}, {"cid": "97053", "title": "第55話 壓抑", "title_zh": "第55话 压抑"}, {"cid": "97055", "title": "第56話 弱點", "title_zh": "第56话 弱点"}, {"cid": "97056", "title": "第57話 男孩", "title_zh": "第57话 男孩"}, {"cid": "97058", "title": "第59話 信念", "title_zh": "第59话 信念"}, {"cid": "97060", "title": "第60話 如風一般!", "title_zh": "第60话 如风一般!"}, {"cid": "97061", "title": "第61話 宣戰布告!", "title_zh": "第61话 宣战布告!"}]};
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>