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>SIDOOH 士道 - 在线漫画阅读器</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-1511", "mangaid": "1511", "zh_title": "SIDOOH 士道", "hant_title": "SIDOOH 士道", "en_title": "SIDOOH 士道 (Bilimanga #1511)", "author": "高桥努", "tags": ["历史", "战争", "青春", "群像", "黑暗", "战斗热血", "日本漫画", "漫画"], "zh_desc": "高桥努创作的青年武士漫画,故事背景设定在日本即将进入幕末动乱时期,主角是一对年幼的兄弟 – 雪村翔太郎(14岁)和 雪村源太郎(10岁)。\n\r\n母亲因霍乱去世,临终前嘱咐两兄弟「磨练本领」。他们带著父亲的剑踏上前往江户的旅程,途中被卖到名为「白心乡」的组织,开始接受残酷的剑术训练,并逐步卷入幕末的政治与战争漩涡。兄弟俩在血与火中成长,面对背叛、战争与死亡,展现出武士道精神与兄弟情谊的深刻描写。\n\n📚 作品信息:作者 高桥努 · 评分 10 · 共收录 25 卷 / 257 话章节目录与高清彩页/条漫预览。", "hant_desc": "高橋努創作的青年武士漫畫,故事背景設定在日本即將進入幕末動亂時期,主角是一對年幼的兄弟 – 雪村翔太郎(14歲)和 雪村源太郎(10歲)。\n\r\n母親因霍亂去世,臨終前囑咐兩兄弟「磨練本領」。他們帶著父親的劍踏上前往江戶的旅程,途中被賣到名為「白心鄉」的組織,開始接受殘酷的劍術訓練,並逐步捲入幕末的政治與戰爭漩渦。兄弟倆在血與火中成長,面對背叛、戰爭與死亡,展現出武士道精神與兄弟情誼的深刻描寫。\n\n📚 作品資訊:作者 高橋努 · 評分 10 · 共收錄 25 卷 / 257 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga 'SIDOOH 士道' (SIDOOH 士道) by 高桥努. Includes 25 volumes and 257 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1511/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1511/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1511/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1511/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1511/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1511/page_06.jpg"], "volumes": [{"title_hant": "SIDOOH 士道 1", "title_zh": "SIDOOH 士道 1", "cover_id": 2731508, "first_chap_id": 125128, "cover_url": "https://i.motiezw.com/cover/1511/2731508.jpg"}, {"title_hant": "SIDOOH 士道 2", "title_zh": "SIDOOH 士道 2", "cover_id": 2731724, "first_chap_id": 125137, "cover_url": "https://i.motiezw.com/cover/1511/2731724.jpg"}, {"title_hant": "SIDOOH 士道 3", "title_zh": "SIDOOH 士道 3", "cover_id": 2741005, "first_chap_id": 125478, "cover_url": "https://i.motiezw.com/cover/1511/2741005.jpg"}, {"title_hant": "SIDOOH 士道 4", "title_zh": "SIDOOH 士道 4", "cover_id": 2741226, "first_chap_id": 125490, "cover_url": "https://i.motiezw.com/cover/1511/2741226.jpg"}, {"title_hant": "SIDOOH 士道 5", "title_zh": "SIDOOH 士道 5", "cover_id": 2741437, "first_chap_id": 125502, "cover_url": "https://i.motiezw.com/cover/1511/2741437.jpg"}, {"title_hant": "SIDOOH 士道 6", "title_zh": "SIDOOH 士道 6", "cover_id": 2741656, "first_chap_id": 125514, "cover_url": "https://i.motiezw.com/cover/1511/2741656.jpg"}, {"title_hant": "SIDOOH 士道 7", "title_zh": "SIDOOH 士道 7", "cover_id": 2741855, "first_chap_id": 125525, "cover_url": "https://i.motiezw.com/cover/1511/2741855.jpg"}, {"title_hant": "SIDOOH 士道 8", "title_zh": "SIDOOH 士道 8", "cover_id": 2742072, "first_chap_id": 125537, "cover_url": "https://i.motiezw.com/cover/1511/2742072.jpg"}, {"title_hant": "SIDOOH 士道 9", "title_zh": "SIDOOH 士道 9", "cover_id": 2742286, "first_chap_id": 125549, "cover_url": "https://i.motiezw.com/cover/1511/2742286.jpg"}, {"title_hant": "SIDOOH 士道 10", "title_zh": "SIDOOH 士道 10", "cover_id": 2742493, "first_chap_id": 125561, "cover_url": "https://i.motiezw.com/cover/1511/2742493.jpg"}, {"title_hant": "SIDOOH 士道 11", "title_zh": "SIDOOH 士道 11", "cover_id": 2742710, "first_chap_id": 125573, "cover_url": "https://i.motiezw.com/cover/1511/2742710.jpg"}, {"title_hant": "SIDOOH 士道 12", "title_zh": "SIDOOH 士道 12", "cover_id": 2742926, "first_chap_id": 125585, "cover_url": "https://i.motiezw.com/cover/1511/2742926.jpg"}], "chapters": [{"cid": "125128", "title": "序幕", "title_zh": "序幕"}, {"cid": "125129", "title": "第一道 空腹", "title_zh": "第一道 空腹"}, {"cid": "125130", "title": "第二道 朝倉清藏", "title_zh": "第二道 朝仓清藏"}, {"cid": "125131", "title": "第三道 安頓", "title_zh": "第三道 安顿"}, {"cid": "125132", "title": "第四道 愚斷", "title_zh": "第四道 愚断"}, {"cid": "125133", "title": "第五道 本能", "title_zh": "第五道 本能"}, {"cid": "125134", "title": "第六道 波動", "title_zh": "第六道 波动"}, {"cid": "125135", "title": "第七道 瑠儀", "title_zh": "第七道 瑠仪"}, {"cid": "125137", "title": "第八道 母流未", "title_zh": "第八道 母流未"}, {"cid": "125138", "title": "第九道 值得感謝的幸福", "title_zh": "第九道 值得感谢的幸福"}, {"cid": "125139", "title": "第十道 祭場", "title_zh": "第十道 祭场"}, {"cid": "125140", "title": "第十一道 起", "title_zh": "第十一道 起"}, {"cid": "125141", "title": "第十二道 劍術", "title_zh": "第十二道 剑术"}, {"cid": "125142", "title": "第十三道 裂", "title_zh": "第十三道 裂"}, {"cid": "125143", "title": "第十四道 宴", "title_zh": "第十四道 宴"}, {"cid": "125144", "title": "第十五道 燃", "title_zh": "第十五道 燃"}, {"cid": "125145", "title": "第十六道 祝心之儀", "title_zh": "第十六道 祝心之仪"}, {"cid": "125146", "title": "第十七道 死合", "title_zh": "第十七道 死合"}, {"cid": "125147", "title": "第十八道 死合・貳", "title_zh": "第十八道 死合・贰"}, {"cid": "125478", "title": "第十九道 死合·参", "title_zh": "第十九道 死合·参"}, {"cid": "125479", "title": "第二十道 死合·四", "title_zh": "第二十道 死合·四"}, {"cid": "125481", "title": "第二十二道 死合·六", "title_zh": "第二十二道 死合·六"}, {"cid": "125482", "title": "第二十三道 生存", "title_zh": "第二十三道 生存"}, {"cid": "125483", "title": "第二十四道 時務", "title_zh": "第二十四道 时务"}, {"cid": "125484", "title": "第二十五道 TEST", "title_zh": "第二十五道 TEST"}, {"cid": "125485", "title": "第二十六道 拔刀", "title_zh": "第二十六道 拔刀"}, {"cid": "125486", "title": "第二十七道 結隊", "title_zh": "第二十七道 结队"}, {"cid": "125487", "title": "第二十八道 進入江戶", "title_zh": "第二十八道 进入江户"}, {"cid": "125488", "title": "第二十九道 初陣", "title_zh": "第二十九道 初阵"}, {"cid": "125490", "title": "第三十道 逆碎", "title_zh": "第三十道 逆碎"}, {"cid": "125491", "title": "第三十一道 百舌的獵物", "title_zh": "第三十一道 百舌的猎物"}, {"cid": "125492", "title": "第三十二道 關內", "title_zh": "第三十二道 关内"}, {"cid": "125493", "title": "第三十三道 關口", "title_zh": "第三十三道 关口"}, {"cid": "125494", "title": "第三十四道 清水屋", "title_zh": "第三十四道 清水屋"}, {"cid": "125495", "title": "第三十五道 未來的轎", "title_zh": "第三十五道 未来的轿"}, {"cid": "125496", "title": "第三十六道 Train", "title_zh": "第三十六道 Train"}, {"cid": "125497", "title": "第三十七道 洗衣的好日子", "title_zh": "第三十七道 洗衣的好日子"}, {"cid": "125498", "title": "第三十八道 圖謀", "title_zh": "第三十八道 图谋"}, {"cid": "125499", "title": "第三十九道 狩獵國賊", "title_zh": "第三十九道 狩猎国贼"}, {"cid": "125500", "title": "第四十道 斬殺", "title_zh": "第四十道 斩杀"}, {"cid": "125502", "title": "第四十一道 散", "title_zh": "第四十一道 散"}, {"cid": "125503", "title": "第四十二道 艷", "title_zh": "第四十二道 艳"}, {"cid": "125504", "title": "第四十三道 上船", "title_zh": "第四十三道 上船"}, {"cid": "125506", "title": "第四十五道 亥時", "title_zh": "第四十五道 亥时"}, {"cid": "125507", "title": "第四十六道 籠中鳥", "title_zh": "第四十六道 笼中鸟"}, {"cid": "125508", "title": "第四十七道 烽火", "title_zh": "第四十七道 烽火"}, {"cid": "125509", "title": "第四十八道 火紅的黑船", "title_zh": "第四十八道 火红的黑船"}, {"cid": "125510", "title": "第四十九道 血炎", "title_zh": "第四十九道 血炎"}, {"cid": "125511", "title": "第五十道 百舌的呼叫", "title_zh": "第五十道 百舌的呼叫"}, {"cid": "125512", "title": "第五十一道 伊能謙之輔", "title_zh": "第五十一道 伊能谦之辅"}, {"cid": "125514", "title": "第五十二道 彈", "title_zh": "第五十二道 弹"}, {"cid": "125515", "title": "第五十三道 激船", "title_zh": "第五十三道 激船"}, {"cid": "125516", "title": "第五十四道 怒-IKARI-", "title_zh": "第五十四道 怒-IKARI-"}, {"cid": "125517", "title": "第五十五道 擊沉", "title_zh": "第五十五道 击沉"}, {"cid": "125518", "title": "第五十六道 朝霧", "title_zh": "第五十六道 朝雾"}, {"cid": "125519", "title": "第五十七道 白散", "title_zh": "第五十七道 白散"}, {"cid": "125520", "title": "第五十八道 獄門", "title_zh": "第五十八道 狱门"}, {"cid": "125521", "title": "第五十九道 時雨", "title_zh": "第五十九道 时雨"}, {"cid": "125522", "title": "第六十道 紅雨", "title_zh": "第六十道 红雨"}, {"cid": "125523", "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>