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>战国Strays-时空迷游抄 - 在线漫画阅读器</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-588", "mangaid": "588", "zh_title": "战国Strays-时空迷游抄", "hant_title": "戰國Strays-時空迷遊抄", "en_title": "战国Strays-时空迷游抄 (Bilimanga #588)", "author": "七海慎吾", "tags": ["穿越", "奇幻", "冒险", "历史", "武侠", "校园", "奇幻冒险", "日本漫画"], "zh_desc": "女高中生--草薙重音奔驰于战国时代的战国青春浪漫冒险!\n\r\n穿梭回到天文21年的重音,在她面前出现的是战国史上最大异端,更是凶暴的革命者--织田上总介信长!\n\n📚 作品信息:作者 七海慎吾 · 评分 10 · 共收录 15 卷 / 81 话章节目录与高清彩页/条漫预览。", "hant_desc": "女高中生--草薙重音奔馳於戰國時代的戰國青春浪漫冒險!\n\r\n穿梭回到天文21年的重音,在她面前出現的是戰國史上最大異端,更是凶暴的革命者--織田上總介信長!\n\n📚 作品資訊:作者 七海慎吾 · 評分 10 · 共收錄 15 卷 / 81 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '战国Strays-时空迷游抄' (戰國Strays-時空迷遊抄) by 七海慎吾. Includes 15 volumes and 81 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-588/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-588/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-588/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-588/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-588/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-588/page_06.jpg"], "volumes": [{"title_hant": "戰國Strays-時空迷遊抄 1", "title_zh": "战国Strays-时空迷游抄 1", "cover_id": 999966, "first_chap_id": 45891, "cover_url": "https://i.motiezw.com/cover/588/999966.jpg"}, {"title_hant": "戰國Strays-時空迷遊抄 2", "title_zh": "战国Strays-时空迷游抄 2", "cover_id": 1000140, "first_chap_id": 45897, "cover_url": "https://i.motiezw.com/cover/588/1000140.jpg"}, {"title_hant": "戰國Strays-時空迷遊抄 3", "title_zh": "战国Strays-时空迷游抄 3", "cover_id": 1000314, "first_chap_id": 45903, "cover_url": "https://i.motiezw.com/cover/588/1000314.jpg"}, {"title_hant": "戰國Strays-時空迷遊抄 4", "title_zh": "战国Strays-时空迷游抄 4", "cover_id": 1000485, "first_chap_id": 45908, "cover_url": "https://i.motiezw.com/cover/588/1000485.jpg"}, {"title_hant": "戰國Strays-時空迷遊抄 5", "title_zh": "战国Strays-时空迷游抄 5", "cover_id": 1000661, "first_chap_id": 45915, "cover_url": "https://i.motiezw.com/cover/588/1000661.jpg"}, {"title_hant": "戰國Strays-時空迷遊抄 6", "title_zh": "战国Strays-时空迷游抄 6", "cover_id": 1000840, "first_chap_id": 45920, "cover_url": "https://i.motiezw.com/cover/588/1000840.jpg"}, {"title_hant": "戰國Strays-時空迷遊抄 7", "title_zh": "战国Strays-时空迷游抄 7", "cover_id": 1001017, "first_chap_id": 45926, "cover_url": "https://i.motiezw.com/cover/588/1001017.jpg"}, {"title_hant": "戰國Strays-時空迷遊抄 8", "title_zh": "战国Strays-时空迷游抄 8", "cover_id": 1001210, "first_chap_id": 45933, "cover_url": "https://i.motiezw.com/cover/588/1001210.jpg"}, {"title_hant": "戰國Strays-時空迷遊抄 9", "title_zh": "战国Strays-时空迷游抄 9", "cover_id": 1001401, "first_chap_id": 45940, "cover_url": "https://i.motiezw.com/cover/588/1001401.jpg"}, {"title_hant": "戰國Strays-時空迷遊抄 10", "title_zh": "战国Strays-时空迷游抄 10", "cover_id": 1001607, "first_chap_id": 45947, "cover_url": "https://i.motiezw.com/cover/588/1001607.jpg"}, {"title_hant": "戰國Strays-時空迷遊抄 11", "title_zh": "战国Strays-时空迷游抄 11", "cover_id": 1001784, "first_chap_id": 45953, "cover_url": "https://i.motiezw.com/cover/588/1001784.jpg"}, {"title_hant": "戰國Strays-時空迷遊抄 12", "title_zh": "战国Strays-时空迷游抄 12", "cover_id": 1001959, "first_chap_id": 45959, "cover_url": "https://i.motiezw.com/cover/588/1001959.jpg"}], "chapters": [{"cid": "45891", "title": "第1話 少N到來!!①", "title_zh": "第1话 少N到来!!①"}, {"cid": "45892", "title": "第1話 少N到來!!②", "title_zh": "第1话 少N到来!!②"}, {"cid": "45893", "title": "第1話 少N到來!!③", "title_zh": "第1话 少N到来!!③"}, {"cid": "45894", "title": "第2話 破釜沉舟的決心①", "title_zh": "第2话 破釜沉舟的决心①"}, {"cid": "45895", "title": "第2話 破釜沉舟的決心②", "title_zh": "第2话 破釜沉舟的决心②"}, {"cid": "45897", "title": "第3話 年少君王的肖像", "title_zh": "第3话 年少君王的肖像"}, {"cid": "45898", "title": "第4話 突襲", "title_zh": "第4话 突袭"}, {"cid": "45899", "title": "第5話 比賽好天氣", "title_zh": "第5话 比赛好天气"}, {"cid": "45900", "title": "第6話 武器商回城!", "title_zh": "第6话 武器商回城!"}, {"cid": "45901", "title": "第7話 海市蜃樓的街道", "title_zh": "第7话 海市蜃楼的街道"}, {"cid": "45903", "title": "第8話 漕洲密會", "title_zh": "第8话 漕洲密会"}, {"cid": "45904", "title": "第9話 戰爭的腳步聲", "title_zh": "第9话 战争的脚步声"}, {"cid": "45905", "title": "第10話 不能輸的戰爭", "title_zh": "第10话 不能输的战争"}, {"cid": "45906", "title": "第11話 信長的奇策", "title_zh": "第11话 信长的奇策"}, {"cid": "45908", "title": "第12話 同盟的價值", "title_zh": "第12话 同盟的价值"}, {"cid": "45909", "title": "第13話 爆發的蒼藍", "title_zh": "第13话 爆发的苍蓝"}, {"cid": "45910", "title": "第14話 絕望中的一線希望", "title_zh": "第14话 绝望中的一线希望"}, {"cid": "45911", "title": "第15話 大將的器量", "title_zh": "第15话 大将的器量"}, {"cid": "45912", "title": "第16話 星月夜", "title_zh": "第16话 星月夜"}, {"cid": "45915", "title": "第18話 真心的回禮", "title_zh": "第18话 真心的回礼"}, {"cid": "45916", "title": "第19話 信長的慶典", "title_zh": "第19话 信长的庆典"}, {"cid": "45917", "title": "第20話 重音的一劍!", "title_zh": "第20话 重音的一剑!"}, {"cid": "45918", "title": "第21話 她的存在", "title_zh": "第21话 她的存在"}, {"cid": "45920", "title": "第22話 短暫的重逢", "title_zh": "第22话 短暂的重逢"}, {"cid": "45921", "title": "第23話 對M濃的一招", "title_zh": "第23话 对M浓的一招"}, {"cid": "45922", "title": "第24話 面對會談", "title_zh": "第24话 面对会谈"}, {"cid": "45923", "title": "第25話 門前的攻防戰", "title_zh": "第25话 门前的攻防战"}, {"cid": "45924", "title": "第26話 道三與信長", "title_zh": "第26话 道三与信长"}, {"cid": "45926", "title": "第27話 焰與影", "title_zh": "第27话 焰与影"}, {"cid": "45927", "title": "第28話 這個國家的未來", "title_zh": "第28话 这个国家的未来"}, {"cid": "45928", "title": "第29話 M濃動亂", "title_zh": "第29话 M浓动乱"}, {"cid": "45929", "title": "第30話 救援道三", "title_zh": "第30话 救援道三"}, {"cid": "45930", "title": "第31話 血戰", "title_zh": "第31话 血战"}, {"cid": "45931", "title": "第外傳 主公與貓", "title_zh": "第外传 主公与猫"}, {"cid": "45933", "title": "第32話 父與子", "title_zh": "第32话 父与子"}, {"cid": "45934", "title": "第33話 長良川的訣別", "title_zh": "第33话 长良川的诀别"}, {"cid": "45935", "title": "第34話 背叛的預兆", "title_zh": "第34话 背叛的预兆"}, {"cid": "45936", "title": "第35話 小小的前進", "title_zh": "第35话 小小的前进"}, {"cid": "45937", "title": "第36話 戶部的叛亂", "title_zh": "第36话 户部的叛乱"}, {"cid": "45938", "title": "番外篇 試膽大會", "title_zh": "番外篇 试胆大会"}, {"cid": "45940", "title": "第37話 各自的想法", "title_zh": "第37话 各自的想法"}, {"cid": "45941", "title": "第38話 軍師再臨", "title_zh": "第38话 军师再临"}, {"cid": "45942", "title": "第39話 流動", "title_zh": "第39话 流动"}, {"cid": "45943", "title": "第40話 雨丘的誓言", "title_zh": "第40话 雨丘的誓言"}, {"cid": "45944", "title": "第41話 黎明的敗仗", "title_zh": "第41话 黎明的败仗"}, {"cid": "45945", "title": "第外傳 清官難斷家務事", "title_zh": "第外传 清官难断家务事"}, {"cid": "45947", "title": "第42話 人上人", "title_zh": "第42话 人上人"}, {"cid": "45948", "title": "第43話 流星與動搖的心", "title_zh": "第43话 流星与动摇的心"}, {"cid": "45949", "title": "第44話 崩落的夢想", "title_zh": "第44话 崩落的梦想"}, {"cid": "45950", "title": "第45話 真心話", "title_zh": "第45话 真心话"}, {"cid": "45951", "title": "第46話 戰場上的兄弟", "title_zh": "第46话 战场上的兄弟"}, {"cid": "45953", "title": "第47話 另一支軍隊", "title_zh": "第47话 另一支军队"}, {"cid": "45954", "title": "第48話 冰凍的心", "title_zh": "第48话 冰冻的心"}, {"cid": "45955", "title": "第49話 牽繫的思慕", "title_zh": "第49话 牵系的思慕"}, {"cid": "45956", "title": "第50話 想守護之物", "title_zh": "第50话 想守护之物"}, {"cid": "45957", "title": "第51話 稻生原的咆哮", "title_zh": "第51话 稻生原的咆哮"}, {"cid": "45959", "title": "第52話 羨望", "title_zh": "第52话 羡望"}, {"cid": "45960", "title": "第53話 戰爭的結果", "title_zh": "第53话 战争的结果"}, {"cid": "45961", "title": "第54話 一生的償還", "title_zh": "第54话 一生的偿还"}, {"cid": "45962", "title": "第55話 未來的約定", "title_zh": "第55话 未来的约定"}]};
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>