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-993", "mangaid": "993", "zh_title": "火影忍者 爱藏版", "hant_title": "火影忍者 愛藏版", "en_title": "火影忍者 爱藏版 (Bilimanga #993)", "author": "岸本斉史", "tags": ["奇幻", "冒险", "战斗", "异能", "斗智", "奇幻冒险", "日本漫画", "漫画"], "zh_desc": "木叶忍者村的漩涡鸣人从小失去了父母,在学校的成绩也是吊车尾。他为了吸引别人的注意,到处恶作剧,是大人眼中的头痛人物。某一天,他为了顺利通过忍者学校的毕业考,而偷走了禁忌的卷轴,想要学习封印在卷轴里的忍术……\n\n📚 作品信息:作者 岸本斉史 · 评分 10 · 共收录 36 卷 / 677 话章节目录与高清彩页/条漫预览。", "hant_desc": "木葉忍者村的漩渦鳴人從小失去了父母,在學校的成績也是吊車尾。他為了吸引別人的注意,到處惡作劇,是大人眼中的頭痛人物。某一天,他為了順利通過忍者學校的畢業考,而偷走了禁忌的捲軸,想要學習封印在捲軸裡的忍術……\n\n📚 作品資訊:作者 岸本斉史 · 評分 10 · 共收錄 36 卷 / 677 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '火影忍者 爱藏版' (火影忍者 愛藏版) by 岸本斉史. Includes 36 volumes and 677 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-993/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-993/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-993/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-993/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-993/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-993/page_06.jpg"], "volumes": [{"title_hant": "火影忍者 愛藏版 1", "title_zh": "火影忍者 爱藏版 1", "cover_id": 1744605, "first_chap_id": 80665, "cover_url": "https://i.motiezw.com/cover/993/1744605.jpg"}, {"title_hant": "火影忍者 愛藏版 2", "title_zh": "火影忍者 爱藏版 2", "cover_id": 1744992, "first_chap_id": 80683, "cover_url": "https://i.motiezw.com/cover/993/1744992.jpg"}, {"title_hant": "火影忍者 愛藏版 3", "title_zh": "火影忍者 爱藏版 3", "cover_id": 1745371, "first_chap_id": 80704, "cover_url": "https://i.motiezw.com/cover/993/1745371.jpg"}, {"title_hant": "火影忍者 愛藏版 4", "title_zh": "火影忍者 爱藏版 4", "cover_id": 1745731, "first_chap_id": 80724, "cover_url": "https://i.motiezw.com/cover/993/1745731.jpg"}, {"title_hant": "火影忍者 愛藏版 5", "title_zh": "火影忍者 爱藏版 5", "cover_id": 1746096, "first_chap_id": 80744, "cover_url": "https://i.motiezw.com/cover/993/1746096.jpg"}, {"title_hant": "火影忍者 愛藏版 6", "title_zh": "火影忍者 爱藏版 6", "cover_id": 1746447, "first_chap_id": 80764, "cover_url": "https://i.motiezw.com/cover/993/1746447.jpg"}, {"title_hant": "火影忍者 愛藏版 7", "title_zh": "火影忍者 爱藏版 7", "cover_id": 1746814, "first_chap_id": 80783, "cover_url": "https://i.motiezw.com/cover/993/1746814.jpg"}, {"title_hant": "火影忍者 愛藏版 8", "title_zh": "火影忍者 爱藏版 8", "cover_id": 1747170, "first_chap_id": 80803, "cover_url": "https://i.motiezw.com/cover/993/1747170.jpg"}, {"title_hant": "火影忍者 愛藏版 9", "title_zh": "火影忍者 爱藏版 9", "cover_id": 1747699, "first_chap_id": 80830, "cover_url": "https://i.motiezw.com/cover/993/1747699.jpg"}, {"title_hant": "火影忍者 愛藏版 10", "title_zh": "火影忍者 爱藏版 10", "cover_id": 1748067, "first_chap_id": 80849, "cover_url": "https://i.motiezw.com/cover/993/1748067.jpg"}, {"title_hant": "火影忍者 愛藏版 11", "title_zh": "火影忍者 爱藏版 11", "cover_id": 1748425, "first_chap_id": 80868, "cover_url": "https://i.motiezw.com/cover/993/1748425.jpg"}, {"title_hant": "火影忍者 愛藏版 12", "title_zh": "火影忍者 爱藏版 12", "cover_id": 1748816, "first_chap_id": 80888, "cover_url": "https://i.motiezw.com/cover/993/1748816.jpg"}], "chapters": [{"cid": "80665", "title": "第1 漩渦鳴人!!", "title_zh": "第1 漩涡鸣人!!"}, {"cid": "80666", "title": "第2 木葉丸!!", "title_zh": "第2 木叶丸!!"}, {"cid": "80667", "title": "第3 宇智波佐助!!", "title_zh": "第3 宇智波佐助!!"}, {"cid": "80668", "title": "第4 旗木卡卡西!!", "title_zh": "第4 旗木卡卡西!!"}, {"cid": "80669", "title": "第5 切勿輕忽大意!!", "title_zh": "第5 切勿轻忽大意!!"}, {"cid": "80670", "title": "第6 只有佐助⋯!!", "title_zh": "第6 只有佐助⋯!!"}, {"cid": "80671", "title": "第7 卡卡西的結論", "title_zh": "第7 卡卡西的结论"}, {"cid": "80672", "title": "第8 所以說你們不合格啦!!", "title_zh": "第8 所以说你们不合格啦!!"}, {"cid": "80673", "title": "第9 最差勁的委託人", "title_zh": "第9 最差劲的委托人"}, {"cid": "80674", "title": "第10 第二隻", "title_zh": "第10 第二只"}, {"cid": "80675", "title": "第11 登陸⋯!!", "title_zh": "第11 登陆⋯!!"}, {"cid": "80676", "title": "第12 結束了!!", "title_zh": "第12 结束了!!"}, {"cid": "80677", "title": "第13 我是忍者!!", "title_zh": "第13 我是忍者!!"}, {"cid": "80678", "title": "第14 密招⋯!!", "title_zh": "第14 密招⋯!!"}, {"cid": "80679", "title": "第15 寫輪眼復活!!", "title_zh": "第15 写轮眼复活!!"}, {"cid": "80680", "title": "第16 你是誰!!", "title_zh": "第16 你是谁!!"}, {"cid": "80681", "title": "第17 戰鬥準備!!", "title_zh": "第17 战斗准备!!"}, {"cid": "80683", "title": "第18 修練開始", "title_zh": "第18 修练开始"}, {"cid": "80684", "title": "第19 勇氣的象徵", "title_zh": "第19 勇气的象征"}, {"cid": "80685", "title": "第20 有個英雄之國⋯!!", "title_zh": "第20 有个英雄之国⋯!!"}, {"cid": "80686", "title": "第21 森林中的相遇⋯!!", "title_zh": "第21 森林中的相遇⋯!!"}, {"cid": "80687", "title": "第22 猛敵出現!!", "title_zh": "第22 猛敌出现!!"}, {"cid": "80689", "title": "第24 速度!!", "title_zh": "第24 速度!!"}, {"cid": "80690", "title": "第25 為了夢想⋯!!", "title_zh": "第25 为了梦想⋯!!"}, {"cid": "80691", "title": "第26 封鎖寫輪眼⋯!!", "title_zh": "第26 封锁写轮眼⋯!!"}, {"cid": "80692", "title": "第27 覺醒⋯!!", "title_zh": "第27 觉醒⋯!!"}, {"cid": "80693", "title": "第28 九尾⋯!!", "title_zh": "第28 九尾⋯!!"}, {"cid": "80694", "title": "第29 重要的人⋯!!", "title_zh": "第29 重要的人⋯!!"}, {"cid": "80695", "title": "第30 你的未來是⋯!!", "title_zh": "第30 你的未来是⋯!!"}, {"cid": "80696", "title": "第31 各自的戰鬥⋯!!", "title_zh": "第31 各自的战斗⋯!!"}, {"cid": "80697", "title": "第32 名為忍者的工具", "title_zh": "第32 名为忍者的工具"}, {"cid": "80698", "title": "第33 英雄的橋", "title_zh": "第33 英雄的桥"}, {"cid": "80699", "title": "第34 入侵者!?", "title_zh": "第34 入侵者!?"}, {"cid": "80700", "title": "第35 伊魯卡 VS. 卡卡西!?", "title_zh": "第35 伊鲁卡 VS. 卡卡西!?"}, {"cid": "80701", "title": "第36 小櫻的憂慮!!", "title_zh": "第36 小樱的忧虑!!"}, {"cid": "80702", "title": "附錄", "title_zh": "附录"}, {"cid": "80704", "title": "第37 最壞的適悻⋯!!", "title_zh": "第37 最坏的适悻⋯!!"}, {"cid": "80705", "title": "第38 START⋯!!", "title_zh": "第38 START⋯!!"}, {"cid": "80706", "title": "第39 挑戰者們!!", "title_zh": "第39 挑战者们!!"}, {"cid": "80707", "title": "第40 第一場考試!!", "title_zh": "第40 第一场考试!!"}, {"cid": "80708", "title": "第41 惡魔的私語⋯!?", "title_zh": "第41 恶魔的私语⋯!?"}, {"cid": "80709", "title": "第42 各自的戰鬥⋯!!", "title_zh": "第42 各自的战斗⋯!!"}, {"cid": "80710", "title": "第43 第十題⋯!!", "title_zh": "第43 第十题⋯!!"}, {"cid": "80711", "title": "第44 被考驗的資質⋯!!", "title_zh": "第44 被考验的资质⋯!!"}, {"cid": "80712", "title": "第45 第二場考試!!", "title_zh": "第45 第二场考试!!"}, {"cid": "80714", "title": "第47 捕食者!!", "title_zh": "第47 捕食者!!"}, {"cid": "80715", "title": "第48 他的目的是⋯!!", "title_zh": "第48 他的目的是⋯!!"}, {"cid": "80716", "title": "第49 膽小鬼⋯!!", "title_zh": "第49 胆小鬼⋯!!"}, {"cid": "80717", "title": "第50 我必須⋯!!", "title_zh": "第50 我必须⋯!!"}, {"cid": "80718", "title": "第51 M麗的野獸⋯!!", "title_zh": "第51 M丽的野兽⋯!!"}, {"cid": "80719", "title": "第52 使用的條件!!", "title_zh": "第52 使用的条件!!"}, {"cid": "80720", "title": "第53 小櫻的決心!!", "title_zh": "第53 小樱的决心!!"}, {"cid": "80721", "title": "第54 小櫻與井野", "title_zh": "第54 小樱与井野"}, {"cid": "80722", "title": "附錄", "title_zh": "附录"}, {"cid": "80724", "title": "第55 全面戰爭⋯!!", "title_zh": "第55 全面战争⋯!!"}, {"cid": "80725", "title": "第56 被賜予的力量⋯!!", "title_zh": "第56 被赐予的力量⋯!!"}, {"cid": "80726", "title": "第57 10小時前", "title_zh": "第57 10小时前"}, {"cid": "80727", "title": "第58 目擊者⋯!!", "title_zh": "第58 目击者⋯!!"}, {"cid": "80728", "title": "第59 砂的慘劇!!", "title_zh": "第59 砂的惨剧!!"}, {"cid": "80729", "title": "第60 最後的機會⋯!!", "title_zh": "第60 最后的机会⋯!!"}]};
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>