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-1700", "mangaid": "1700", "zh_title": "封神演义 完全版", "hant_title": "封神演義 完全版", "en_title": "封神演义 完全版 (Bilimanga #1700)", "author": "藤崎龙", "tags": ["奇幻", "战斗", "战争", "斗智", "东方", "奇幻冒险", "日本漫画", "漫画"], "zh_desc": "与『西游记』、『三国演义』、『水浒传』,并称为中国四大神怪小说。\n\r\n话说三千年以前的古代──西元前11世纪,中国殷朝末期, 仙人、道士、妖怪杂处共存的混乱世界,将成为这个故事的舞台…\n\n📚 作品信息:作者 藤崎龙 · 评分 10 · 共收录 18 卷 / 199 话章节目录与高清彩页/条漫预览。", "hant_desc": "與『西遊記』、『三國演義』、『水滸傳』,並稱為中國四大神怪小說。\n\r\n話說三千年以前的古代──西元前11世紀,中國殷朝末期, 仙人、道士、妖怪雜處共存的混亂世界,將成為這個故事的舞台…\n\n📚 作品資訊:作者 藤崎龍 · 評分 10 · 共收錄 18 卷 / 199 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '封神演义 完全版' (封神演義 完全版) by 藤崎龙. Includes 18 volumes and 199 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1700/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1700/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1700/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1700/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1700/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1700/page_06.jpg"], "volumes": [{"title_hant": "封神演義 完全版 1", "title_zh": "封神演义 完全版 1", "cover_id": 3039253, "first_chap_id": 138280, "cover_url": "https://i.motiezw.com/cover/1700/3039253.jpg"}, {"title_hant": "封神演義 完全版 2", "title_zh": "封神演义 完全版 2", "cover_id": 3039497, "first_chap_id": 138290, "cover_url": "https://i.motiezw.com/cover/1700/3039497.jpg"}, {"title_hant": "封神演義 完全版 3", "title_zh": "封神演义 完全版 3", "cover_id": 3039745, "first_chap_id": 138302, "cover_url": "https://i.motiezw.com/cover/1700/3039745.jpg"}, {"title_hant": "封神演義 完全版 4", "title_zh": "封神演义 完全版 4", "cover_id": 3040001, "first_chap_id": 138315, "cover_url": "https://i.motiezw.com/cover/1700/3040001.jpg"}, {"title_hant": "封神演義 完全版 5", "title_zh": "封神演义 完全版 5", "cover_id": 3040233, "first_chap_id": 138327, "cover_url": "https://i.motiezw.com/cover/1700/3040233.jpg"}, {"title_hant": "封神演義 完全版 6", "title_zh": "封神演义 完全版 6", "cover_id": 3042498, "first_chap_id": 138457, "cover_url": "https://i.motiezw.com/cover/1700/3042498.jpg"}, {"title_hant": "封神演義 完全版 7", "title_zh": "封神演义 完全版 7", "cover_id": 3042740, "first_chap_id": 138470, "cover_url": "https://i.motiezw.com/cover/1700/3042740.jpg"}, {"title_hant": "封神演義 完全版 8", "title_zh": "封神演义 完全版 8", "cover_id": 3042985, "first_chap_id": 138483, "cover_url": "https://i.motiezw.com/cover/1700/3042985.jpg"}, {"title_hant": "封神演義 完全版 9", "title_zh": "封神演义 完全版 9", "cover_id": 3043217, "first_chap_id": 138495, "cover_url": "https://i.motiezw.com/cover/1700/3043217.jpg"}, {"title_hant": "封神演義 完全版 10", "title_zh": "封神演义 完全版 10", "cover_id": 3043453, "first_chap_id": 138507, "cover_url": "https://i.motiezw.com/cover/1700/3043453.jpg"}, {"title_hant": "封神演義 完全版 11", "title_zh": "封神演义 完全版 11", "cover_id": 3043682, "first_chap_id": 138519, "cover_url": "https://i.motiezw.com/cover/1700/3043682.jpg"}, {"title_hant": "封神演義 完全版 12", "title_zh": "封神演义 完全版 12", "cover_id": 3043938, "first_chap_id": 138532, "cover_url": "https://i.motiezw.com/cover/1700/3043938.jpg"}], "chapters": [{"cid": "138280", "title": "封神榜", "title_zh": "封神榜"}, {"cid": "138281", "title": "首次的封神", "title_zh": "首次的封神"}, {"cid": "138282", "title": "妲己造炮烙", "title_zh": "妲己造炮烙"}, {"cid": "138283", "title": "石琵琶妖", "title_zh": "石琵琶妖"}, {"cid": "138284", "title": "宮中孤軍", "title_zh": "宫中孤军"}, {"cid": "138285", "title": "魅惑之術", "title_zh": "魅惑之术"}, {"cid": "138286", "title": "妲己造蠆盆", "title_zh": "妲己造虿盆"}, {"cid": "138287", "title": "序章之終結", "title_zh": "序章之终结"}, {"cid": "138288", "title": "法寶人.哪吒登場!", "title_zh": "法宝人.哪吒登场!"}, {"cid": "138290", "title": "哪吒出生之秘", "title_zh": "哪吒出生之秘"}, {"cid": "138291", "title": "太公望VS.哪吒.空中大決戰", "title_zh": "太公望VS.哪吒.空中大决战"}, {"cid": "138292", "title": "哪吒篇.父子和好", "title_zh": "哪吒篇.父子和好"}, {"cid": "138293", "title": "玉泉山金霞洞玉鼎真人門下.楊戩登場!", "title_zh": "玉泉山金霞洞玉鼎真人门下.杨戬登场!"}, {"cid": "138294", "title": "楊戩的測試", "title_zh": "杨戬的测试"}, {"cid": "138295", "title": "TEST.終了", "title_zh": "TEST.终了"}, {"cid": "138296", "title": "妲己之酒池禸林", "title_zh": "妲己之酒池禸林"}, {"cid": "138297", "title": "天空的兄弟", "title_zh": "天空的兄弟"}, {"cid": "138298", "title": "太公望.變黑人頭", "title_zh": "太公望.变黑人头"}, {"cid": "138299", "title": "太公望耍泥醉拳", "title_zh": "太公望耍泥醉拳"}, {"cid": "138300", "title": "兩位太子", "title_zh": "两位太子"}, {"cid": "138302", "title": "兩位太子 Ⅱ", "title_zh": "两位太子 Ⅱ"}, {"cid": "138304", "title": "透視未來者的辨證法.上", "title_zh": "透视未来者的辨证法.上"}, {"cid": "138305", "title": "透視未來者的辨證法.下", "title_zh": "透视未来者的辨证法.下"}, {"cid": "138306", "title": "閒話01 土行孫追N生", "title_zh": "闲话01 土行孙追N生"}, {"cid": "138307", "title": "妲己.喜媚的3分鐘上菜", "title_zh": "妲己.喜媚的3分钟上菜"}, {"cid": "138308", "title": "聞仲VS妲己的藍圖", "title_zh": "闻仲VS妲己的蓝图"}, {"cid": "138309", "title": "太公望的徒弟", "title_zh": "太公望的徒弟"}, {"cid": "138310", "title": "太公望與姬昌", "title_zh": "太公望与姬昌"}, {"cid": "138311", "title": "武成王造反① —賈氏與黃氏—", "title_zh": "武成王造反① —贾氏与黄氏—"}, {"cid": "138312", "title": "武成王造反② —紂王的力量—", "title_zh": "武成王造反② —纣王的力量—"}, {"cid": "138313", "title": "武成王造反③ —天化登場—", "title_zh": "武成王造反③ —天化登场—"}, {"cid": "138315", "title": "武成王造反④ —與太公望會合—", "title_zh": "武成王造反④ —与太公望会合—"}, {"cid": "138316", "title": "武成王造反⑤ —哪吒.出動!!!—", "title_zh": "武成王造反⑤ —哪吒.出动!!!—"}, {"cid": "138317", "title": "武成王造反⑥ —金鰲的法寶—", "title_zh": "武成王造反⑥ —金鳌的法宝—"}, {"cid": "138318", "title": "武成王造反⑦ —哪吒的加入—", "title_zh": "武成王造反⑦ —哪吒的加入—"}, {"cid": "138319", "title": "九龍島四聖① —太公望軟腳蝦疑雲—", "title_zh": "九龙岛四圣① —太公望软脚虾疑云—"}, {"cid": "138320", "title": "九龍島四聖② —四聖的過去—", "title_zh": "九龙岛四圣② —四圣的过去—"}, {"cid": "138321", "title": "九龍島四聖③ —暢飲大賽—", "title_zh": "九龙岛四圣③ —畅饮大赛—"}, {"cid": "138322", "title": "九龍島四聖④ —四聖.前往西岐—", "title_zh": "九龙岛四圣④ —四圣.前往西岐—"}, {"cid": "138323", "title": "九龍島四聖⑤ —天才.楊戩—", "title_zh": "九龙岛四圣⑤ —天才.杨戬—"}, {"cid": "138324", "title": "九龍島四聖⑥ —破壞王.哪吒—", "title_zh": "九龙岛四圣⑥ —破坏王.哪吒—"}, {"cid": "138325", "title": "九龍島四聖⑦ —太公望將火龍鏢交付黃天化—", "title_zh": "九龙岛四圣⑦ —太公望将火龙镖交付黄天化—"}, {"cid": "138327", "title": "乘著夜S眼來⋯", "title_zh": "乘著夜S眼来⋯"}, {"cid": "138329", "title": "兩條道路", "title_zh": "两条道路"}, {"cid": "138330", "title": "各自的現在.過去.未來系列① —紅顏禍水♡妲己—", "title_zh": "各自的现在.过去.未来系列① —红颜祸水♡妲己—"}, {"cid": "138331", "title": "各自的現在.過去.未來系列② —哪吒獵取法寶與元始天尊的〇×△—", "title_zh": "各自的现在.过去.未来系列② —哪吒猎取法宝与元始天尊的〇×△—"}, {"cid": "138332", "title": "各自的現在.過去.未來系列③ —BATTLE COOKING!!黃飛虎V.S南宮適—", "title_zh": "各自的现在.过去.未来系列③ —BATTLE COOKING!!黄飞虎V.S南宫适—"}, {"cid": "138333", "title": "各自的現在.過去.未來系列④ —太公望的封神計劃與糊塗少主姬發—", "title_zh": "各自的现在.过去.未来系列④ —太公望的封神计划与糊涂少主姬发—"}, {"cid": "138334", "title": "各自的現在.過去.未來系列⑤ —大象賽跑—", "title_zh": "各自的现在.过去.未来系列⑤ —大象赛跑—"}, {"cid": "138335", "title": "各自的現在.過去.未來系列⑥ —與血脈承繼者之間的羈絆—", "title_zh": "各自的现在.过去.未来系列⑥ —与血脉承继者之间的羁绊—"}, {"cid": "138336", "title": "四不像成為神鷹之餌", "title_zh": "四不像成为神鹰之饵"}, {"cid": "138337", "title": "賢人姬昌辭世.上", "title_zh": "贤人姬昌辞世.上"}, {"cid": "138457", "title": "賢人姬昌辭世.下", "title_zh": "贤人姬昌辞世.下"}, {"cid": "138458", "title": "魔家四將 ① —革命初期結束與故事主軸揭幕—", "title_zh": "魔家四将 ① —革命初期结束与故事主轴揭幕—"}, {"cid": "138459", "title": "魔家四將 ② —惡夢的開始—", "title_zh": "魔家四将 ② —恶梦的开始—"}, {"cid": "138460", "title": "魔家四將 ③ —逃T敵人之手,全力反撲篇—", "title_zh": "魔家四将 ③ —逃T敌人之手,全力反扑篇—"}, {"cid": "138461", "title": "魔家四將 ④ —特攻!法寶人!AND花狐貂的末路?—", "title_zh": "魔家四将 ④ —特攻!法宝人!AND花狐貂的末路?—"}, {"cid": "138462", "title": "魔家四將 ⑤ —沒想到還有那麼多隻花狐貂!—", "title_zh": "魔家四将 ⑤ —没想到还有那么多只花狐貂!—"}, {"cid": "138463", "title": "魔家四將 ⑥ —雷震子.被人喊做怪物—", "title_zh": "魔家四将 ⑥ —雷震子.被人喊做怪物—"}, {"cid": "138464", "title": "魔家四將 ⑦ —天化再度登場!—", "title_zh": "魔家四将 ⑦ —天化再度登场!—"}]};
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>