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-1676", "mangaid": "1676", "zh_title": "战国鬼才传", "hant_title": "戰國鬼才傳", "en_title": "战国鬼才传 (Bilimanga #1676)", "author": "山田芳裕", "tags": ["历史", "斗智", "战争", "欢乐", "历史文化", "日本漫画", "漫画", "日漫"], "zh_desc": "群雄割据、下克上的战国时代。\n\r\n有一个不断追求出人头地的机会,却被茶道与物欲夺去灵魂的男人。\n\r\n织田信长的家臣.古田左介。\n\r\n从天才.信长所学到壮大的世界观,与茶圣.千宗易(利休)所学到深远的精神性,坚持走上自己的「鬼才」之路。\n\r\n是生是死。是武士是雅士。这就是问题啦!!\n\n📚 作品信息:作者 山田芳裕 · 评分 10 · 共收录 25 卷 / 263 话章节目录与高清彩页/条漫预览。", "hant_desc": "群雄割據、下剋上的戰國時代。\n\r\n有一個不斷追求出人頭地的機會,卻被茶道與物慾奪去靈魂的男人。\n\r\n織田信長的家臣.古田左介。\n\r\n從天才.信長所學到壯大的世界觀,與茶聖.千宗易(利休)所學到深遠的精神性,堅持走上自己的「鬼才」之路。\n\r\n是生是死。是武士是雅士。這就是問題啦!!\n\n📚 作品資訊:作者 山田芳裕 · 評分 10 · 共收錄 25 卷 / 263 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '战国鬼才传' (戰國鬼才傳) by 山田芳裕. Includes 25 volumes and 263 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1676/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1676/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1676/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1676/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1676/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1676/page_06.jpg"], "volumes": [{"title_hant": "戰國鬼才傳 1", "title_zh": "战国鬼才传 1", "cover_id": 2999247, "first_chap_id": 136720, "cover_url": "https://i.motiezw.com/cover/1676/2999247.jpg"}, {"title_hant": "戰國鬼才傳 2", "title_zh": "战国鬼才传 2", "cover_id": 3001281, "first_chap_id": 136848, "cover_url": "https://i.motiezw.com/cover/1676/3001281.jpg"}, {"title_hant": "戰國鬼才傳 3", "title_zh": "战国鬼才传 3", "cover_id": 3001502, "first_chap_id": 136861, "cover_url": "https://i.motiezw.com/cover/1676/3001502.jpg"}, {"title_hant": "戰國鬼才傳 4", "title_zh": "战国鬼才传 4", "cover_id": 3001725, "first_chap_id": 136872, "cover_url": "https://i.motiezw.com/cover/1676/3001725.jpg"}, {"title_hant": "戰國鬼才傳 5", "title_zh": "战国鬼才传 5", "cover_id": 3001948, "first_chap_id": 136884, "cover_url": "https://i.motiezw.com/cover/1676/3001948.jpg"}, {"title_hant": "戰國鬼才傳 6", "title_zh": "战国鬼才传 6", "cover_id": 3002173, "first_chap_id": 136896, "cover_url": "https://i.motiezw.com/cover/1676/3002173.jpg"}, {"title_hant": "戰國鬼才傳 7", "title_zh": "战国鬼才传 7", "cover_id": 3002398, "first_chap_id": 136908, "cover_url": "https://i.motiezw.com/cover/1676/3002398.jpg"}, {"title_hant": "戰國鬼才傳 8", "title_zh": "战国鬼才传 8", "cover_id": 3002622, "first_chap_id": 136920, "cover_url": "https://i.motiezw.com/cover/1676/3002622.jpg"}, {"title_hant": "戰國鬼才傳 9", "title_zh": "战国鬼才传 9", "cover_id": 3002847, "first_chap_id": 136932, "cover_url": "https://i.motiezw.com/cover/1676/3002847.jpg"}, {"title_hant": "戰國鬼才傳 10", "title_zh": "战国鬼才传 10", "cover_id": 3003076, "first_chap_id": 136944, "cover_url": "https://i.motiezw.com/cover/1676/3003076.jpg"}, {"title_hant": "戰國鬼才傳 11", "title_zh": "战国鬼才传 11", "cover_id": 3006503, "first_chap_id": 137014, "cover_url": "https://i.motiezw.com/cover/1676/3006503.jpg"}, {"title_hant": "戰國鬼才傳 12", "title_zh": "战国鬼才传 12", "cover_id": 3006727, "first_chap_id": 137026, "cover_url": "https://i.motiezw.com/cover/1676/3006727.jpg"}], "chapters": [{"cid": "136720", "title": "第一席 你是否能夠為“物”而犧牲生命!", "title_zh": "第一席 你是否能够为“物”而牺牲生命!"}, {"cid": "136721", "title": "第二席 黑S塗裝!!", "title_zh": "第二席 黑S涂装!!"}, {"cid": "136722", "title": "第三席 碗LOVE", "title_zh": "第三席 碗LOVE"}, {"cid": "136723", "title": "第四席 茶室的幻想曲", "title_zh": "第四席 茶室的幻想曲"}, {"cid": "136724", "title": "第五席 天界的階梯", "title_zh": "第五席 天界的阶梯"}, {"cid": "136725", "title": "第六席 二大強者的茶會", "title_zh": "第六席 二大强者的茶会"}, {"cid": "136726", "title": "第七席 京都的狂熱之夜", "title_zh": "第七席 京都的狂热之夜"}, {"cid": "136727", "title": "第八席 Kind Of Black", "title_zh": "第八席 Kind Of Black"}, {"cid": "136728", "title": "第九席 左右天下的使者", "title_zh": "第九席 左右天下的使者"}, {"cid": "136729", "title": "附錄", "title_zh": "附录"}, {"cid": "136848", "title": "第十席 決心的策略", "title_zh": "第十席 决心的策略"}, {"cid": "136849", "title": "第十一席 命運 '82", "title_zh": "第十一席 命运 '82"}, {"cid": "136850", "title": "第十二席 把武田幹掉", "title_zh": "第十二席 把武田干掉"}, {"cid": "136851", "title": "第十三席 想要被愛", "title_zh": "第十三席 想要被爱"}, {"cid": "136852", "title": "第十四席 Mt. 富士的輪廓", "title_zh": "第十四席 Mt. 富士的轮廓"}, {"cid": "136853", "title": "第十五席 Rain Fall Down!", "title_zh": "第十五席 Rain Fall Down!"}, {"cid": "136854", "title": "第十六席 今夜 Eat It", "title_zh": "第十六席 今夜 Eat It"}, {"cid": "136855", "title": "第十七席 幻惑的鼓動", "title_zh": "第十七席 幻惑的鼓动"}, {"cid": "136856", "title": "第十八席 悲憫天下之歌", "title_zh": "第十八席 悲悯天下之歌"}, {"cid": "136857", "title": "第十九席 未來之禮讚", "title_zh": "第十九席 未来之礼赞"}, {"cid": "136858", "title": "第二十席 無Q的聲明", "title_zh": "第二十席 无Q的声明"}, {"cid": "136861", "title": "第二十二席 無法之都", "title_zh": "第二十二席 无法之都"}, {"cid": "136862", "title": "第二十三席 瓦礫堆的餘韻", "title_zh": "第二十三席 瓦砾堆的余韵"}, {"cid": "136863", "title": "第二十四席 孤立的回音", "title_zh": "第二十四席 孤立的回音"}, {"cid": "136864", "title": "第二十五席 信長 ON MY MIND", "title_zh": "第二十五席 信长 ON MY MIND"}, {"cid": "136865", "title": "第二十六席 白S之城的藍調", "title_zh": "第二十六席 白S之城的蓝调"}, {"cid": "136866", "title": "第二十七席 像路邊的糞土一般", "title_zh": "第二十七席 像路边的粪土一般"}, {"cid": "136867", "title": "第二十八席 壽喜燒", "title_zh": "第二十八席 寿喜烧"}, {"cid": "136868", "title": "第二十九席 放棄夏天", "title_zh": "第二十九席 放弃夏天"}, {"cid": "136869", "title": "第三十席 身不由己的步兵", "title_zh": "第三十席 身不由己的步兵"}, {"cid": "136870", "title": "第三十一席 哀傷的深紫之夜", "title_zh": "第三十一席 哀伤的深紫之夜"}, {"cid": "136872", "title": "第三十二席 時代在改變", "title_zh": "第三十二席 时代在改变"}, {"cid": "136873", "title": "第三十三席 孤獨一人的世界", "title_zh": "第三十三席 孤独一人的世界"}, {"cid": "136874", "title": "第三十四席 BLACK in BLACK", "title_zh": "第三十四席 BLACK in BLACK"}, {"cid": "136875", "title": "第三十五席 離別的喃喃細語", "title_zh": "第三十五席 离别的喃喃细语"}, {"cid": "136876", "title": "第三十六席 Genmai • Bomb", "title_zh": "第三十六席 Genmai • Bomb"}, {"cid": "136877", "title": "第三十七席 Changing • Man", "title_zh": "第三十七席 Changing • Man"}, {"cid": "136878", "title": "第三十八席 Beautiful Name", "title_zh": "第三十八席 Beautiful Name"}, {"cid": "136879", "title": "第三十九席 Start Me Up", "title_zh": "第三十九席 Start Me Up"}, {"cid": "136880", "title": "第四十席 全世界唯一的人", "title_zh": "第四十席 全世界唯一的人"}, {"cid": "136881", "title": "第四十一席 Golden Years", "title_zh": "第四十一席 Golden Years"}, {"cid": "136882", "title": "第四十二席 Woman from Nagoya", "title_zh": "第四十二席 Woman from Nagoya"}, {"cid": "136884", "title": "第四十三席 寂禪的大洞", "title_zh": "第四十三席 寂禅的大洞"}, {"cid": "136886", "title": "第四十五席 Fool On The Hill", "title_zh": "第四十五席 Fool On The Hill"}, {"cid": "136887", "title": "第四十六席 初戀", "title_zh": "第四十六席 初恋"}, {"cid": "136888", "title": "第四十七席 溫柔的掠奪", "title_zh": "第四十七席 温柔的掠夺"}, {"cid": "136889", "title": "第四十八席 惡魔的呢喃", "title_zh": "第四十八席 恶魔的呢喃"}, {"cid": "136890", "title": "第四十九席 Isn't She LOVELY!", "title_zh": "第四十九席 Isn't She LOVELY!"}, {"cid": "136891", "title": "第五十席 Just the TEA of Us", "title_zh": "第五十席 Just the TEA of Us"}, {"cid": "136892", "title": "第五十一席 Living in JAPAN", "title_zh": "第五十一席 Living in JAPAN"}, {"cid": "136893", "title": "第五十二席 Come on My 聚樂", "title_zh": "第五十二席 Come on My 聚乐"}, {"cid": "136894", "title": "第五十三席 帶我到北野去吧", "title_zh": "第五十三席 带我到北野去吧"}, {"cid": "136896", "title": "第五十四席 We Are 茶 World", "title_zh": "第五十四席 We Are 茶 World"}, {"cid": "136897", "title": "第五十五席 I Shot The 利休", "title_zh": "第五十五席 I Shot The 利休"}, {"cid": "136898", "title": "第五十六席 God Save the 織部", "title_zh": "第五十六席 God Save the 织部"}, {"cid": "136899", "title": "第五十七席 我們的足跡之Ballad", "title_zh": "第五十七席 我们的足迹之Ballad"}, {"cid": "136900", "title": "第五十八席 由一開始重新出發", "title_zh": "第五十八席 由一开始重新出发"}, {"cid": "136901", "title": "第五十九席 I Can't Get No 滿足", "title_zh": "第五十九席 I Can't Get No 满足"}, {"cid": "136902", "title": "第六十席 披頭咒的夜", "title_zh": "第六十席 披头咒的夜"}, {"cid": "136903", "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>