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-1121", "mangaid": "1121", "zh_title": "杀戮重生犬屋敷", "hant_title": "殺戮重生犬屋敷", "en_title": "杀戮重生犬屋敷 (Bilimanga #1121)", "author": "奥浩哉", "tags": ["科幻", "异能", "战斗", "黑暗", "人外", "悬疑", "科幻未来", "日本漫画"], "zh_desc": "平凡无奇、将近60岁的普通上班族‧犬屋敷,\n\r\n在家里不受家人尊敬,也找不到自己活著的目标,\n\r\n还被医生宣告将不久于人世。\n\r\n失意的他,却在公园与另一名少年被突如其来的外星生物砸到,\n\r\n整个身体都被摧毁了。\n\r\n不明的外星生物为了不影响地球的秩序,让犬屋敷和少年重生──\n\r\n他们变成只有外表是人、身体却由机械所构成,拥有卓绝战斗能力的超强「人类」。\n\r\n两名尚拥有自己意志的「机械人类」会用这个力量作出什么行动呢?\n\r\n又会对世界带来什么影响呢?\n\n📚 作品信息:作者 奥浩哉 · 评分 10 · 共收录 10 卷 / 83 话章节目录与高清彩页/条漫预览。", "hant_desc": "平凡無奇、將近60歲的普通上班族‧犬屋敷,\n\r\n在家裡不受家人尊敬,也找不到自己活著的目標,\n\r\n還被醫生宣告將不久於人世。\n\r\n失意的他,卻在公園與另一名少年被突如其來的外星生物砸到,\n\r\n整個身體都被摧毀了。\n\r\n不明的外星生物為了不影響地球的秩序,讓犬屋敷和少年重生──\n\r\n他們變成只有外表是人、身體卻由機械所構成,擁有卓絕戰鬥能力的超強「人類」。\n\r\n兩名尚擁有自己意志的「機械人類」會用這個力量作出什麼行動呢?\n\r\n又會對世界帶來什麼影響呢?\n\n📚 作品資訊:作者 奥浩哉 · 評分 10 · 共收錄 10 卷 / 83 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '杀戮重生犬屋敷' (殺戮重生犬屋敷) by 奥浩哉. Includes 10 volumes and 83 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1121/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1121/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1121/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1121/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1121/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1121/page_06.jpg"], "volumes": [{"title_hant": "殺戮重生犬屋敷 1", "title_zh": "杀戮重生犬屋敷 1", "cover_id": 2014052, "first_chap_id": 94048, "cover_url": "https://i.motiezw.com/cover/1121/2014052.jpg"}, {"title_hant": "殺戮重生犬屋敷 2", "title_zh": "杀戮重生犬屋敷 2", "cover_id": 2014238, "first_chap_id": 94057, "cover_url": "https://i.motiezw.com/cover/1121/2014238.jpg"}, {"title_hant": "殺戮重生犬屋敷 3", "title_zh": "杀戮重生犬屋敷 3", "cover_id": 2020818, "first_chap_id": 94351, "cover_url": "https://i.motiezw.com/cover/1121/2020818.jpg"}, {"title_hant": "殺戮重生犬屋敷 4", "title_zh": "杀戮重生犬屋敷 4", "cover_id": 2020986, "first_chap_id": 94361, "cover_url": "https://i.motiezw.com/cover/1121/2020986.jpg"}, {"title_hant": "殺戮重生犬屋敷 5", "title_zh": "杀戮重生犬屋敷 5", "cover_id": 2035451, "first_chap_id": 94991, "cover_url": "https://i.motiezw.com/cover/1121/2035451.jpg"}, {"title_hant": "殺戮重生犬屋敷 6", "title_zh": "杀戮重生犬屋敷 6", "cover_id": 2035624, "first_chap_id": 95001, "cover_url": "https://i.motiezw.com/cover/1121/2035624.jpg"}, {"title_hant": "殺戮重生犬屋敷 7", "title_zh": "杀戮重生犬屋敷 7", "cover_id": 2035791, "first_chap_id": 95011, "cover_url": "https://i.motiezw.com/cover/1121/2035791.jpg"}, {"title_hant": "殺戮重生犬屋敷 8", "title_zh": "杀戮重生犬屋敷 8", "cover_id": 2035942, "first_chap_id": 95020, "cover_url": "https://i.motiezw.com/cover/1121/2035942.jpg"}, {"title_hant": "殺戮重生犬屋敷 9", "title_zh": "杀戮重生犬屋敷 9", "cover_id": 2036097, "first_chap_id": 95029, "cover_url": "https://i.motiezw.com/cover/1121/2036097.jpg"}, {"title_hant": "殺戮重生犬屋敷 10", "title_zh": "杀戮重生犬屋敷 10", "cover_id": 2036263, "first_chap_id": 95038, "cover_url": "https://i.motiezw.com/cover/1121/2036263.jpg"}], "chapters": [{"cid": "94048", "title": "第1話 人生形形SS", "title_zh": "第1话 人生形形SS"}, {"cid": "94049", "title": "第2話 異變", "title_zh": "第2话 异变"}, {"cid": "94050", "title": "第3話 怎麼會這樣", "title_zh": "第3话 怎么会这样"}, {"cid": "94051", "title": "第4話 愉哭無淚", "title_zh": "第4话 愉哭无泪"}, {"cid": "94052", "title": "第5話 行凶", "title_zh": "第5话 行凶"}, {"cid": "94053", "title": "第6話 神啊救救我", "title_zh": "第6话 神啊救救我"}, {"cid": "94054", "title": "第7話 犬屋敷壹郎", "title_zh": "第7话 犬屋敷壹郎"}, {"cid": "94055", "title": "第8話 沒有內容的人類", "title_zh": "第8话 没有内容的人类"}, {"cid": "94057", "title": "第9話 另一個存在", "title_zh": "第9话 另一个存在"}, {"cid": "94058", "title": "第10話 獅子神皓", "title_zh": "第10话 狮子神皓"}, {"cid": "94059", "title": "第11話 慘劇", "title_zh": "第11话 惨剧"}, {"cid": "94060", "title": "第12話 一樣的東西", "title_zh": "第12话 一样的东西"}, {"cid": "94061", "title": "第13話 我來當對手", "title_zh": "第13话 我来当对手"}, {"cid": "94062", "title": "第14話 穿越天空", "title_zh": "第14话 穿越天空"}, {"cid": "94063", "title": "第15話 我會保護你", "title_zh": "第15话 我会保护你"}, {"cid": "94064", "title": "第16話 我會保護你", "title_zh": "第16话 我会保护你"}, {"cid": "94065", "title": "第17話 各自的力量", "title_zh": "第17话 各自的力量"}, {"cid": "94351", "title": "第18話 普通的幸福", "title_zh": "第18话 普通的幸福"}, {"cid": "94352", "title": "第19話 強襲", "title_zh": "第19话 强袭"}, {"cid": "94353", "title": "第20話 老子的東西", "title_zh": "第20话 老子的东西"}, {"cid": "94354", "title": "第21話 絕望", "title_zh": "第21话 绝望"}, {"cid": "94356", "title": "第23話 幫幫我", "title_zh": "第23话 帮帮我"}, {"cid": "94357", "title": "第24話 宣戰公告", "title_zh": "第24话 宣战公告"}, {"cid": "94358", "title": "第25話 你是什麼東西!?", "title_zh": "第25话 你是什么东西!?"}, {"cid": "94359", "title": "第26話 神罰", "title_zh": "第26话 神罚"}, {"cid": "94361", "title": "第27話 不要緊", "title_zh": "第27话 不要紧"}, {"cid": "94362", "title": "第28話 還有另一人", "title_zh": "第28话 还有另一人"}, {"cid": "94363", "title": "第29話 英雄", "title_zh": "第29话 英雄"}, {"cid": "94364", "title": "第30話 皓", "title_zh": "第30话 皓"}, {"cid": "94365", "title": "第31話 特訓", "title_zh": "第31话 特训"}, {"cid": "94366", "title": "第32話 能多遠就多遠", "title_zh": "第32话 能多远就多远"}, {"cid": "94367", "title": "第33話 救世主", "title_zh": "第33话 救世主"}, {"cid": "94368", "title": "第34話 變化", "title_zh": "第34话 变化"}, {"cid": "94369", "title": "第35話 逃走", "title_zh": "第35话 逃走"}, {"cid": "94991", "title": "第36話 詩音", "title_zh": "第36话 诗音"}, {"cid": "94992", "title": "第37話 慟哭", "title_zh": "第37话 恸哭"}, {"cid": "94993", "title": "第38話 全部殺光", "title_zh": "第38话 全部杀光"}, {"cid": "94994", "title": "第39話 制裁", "title_zh": "第39话 制裁"}, {"cid": "94995", "title": "第40話 3還活著嗎?", "title_zh": "第40话 3还活著吗?"}, {"cid": "94996", "title": "第41話 我看起來像人嗎?", "title_zh": "第41话 我看起来像人吗?"}, {"cid": "94997", "title": "第42話 別丟下我們", "title_zh": "第42话 别丢下我们"}, {"cid": "94998", "title": "第43話 麻煩大量轉發", "title_zh": "第43话 麻烦大量转发"}, {"cid": "94999", "title": "第44話 平穩的日子", "title_zh": "第44话 平稳的日子"}, {"cid": "95001", "title": "第45話 強襲", "title_zh": "第45话 强袭"}, {"cid": "95002", "title": "第46話 對不起", "title_zh": "第46话 对不起"}, {"cid": "95003", "title": "第47話 麻理", "title_zh": "第47话 麻理"}, {"cid": "95004", "title": "第48話 集中砲火", "title_zh": "第48话 集中砲火"}, {"cid": "95005", "title": "第49話 見證到底吧", "title_zh": "第49话 见证到底吧"}, {"cid": "95006", "title": "第50話 覺醒", "title_zh": "第50话 觉醒"}, {"cid": "95007", "title": "第51話 還沒完呢", "title_zh": "第51话 还没完呢"}, {"cid": "95008", "title": "第52話 跟蹤", "title_zh": "第52话 跟踪"}, {"cid": "95009", "title": "第53話 宣言", "title_zh": "第53话 宣言"}, {"cid": "95011", "title": "第54話 狙擊", "title_zh": "第54话 狙击"}, {"cid": "95012", "title": "第55話 運行測試", "title_zh": "第55话 运行测试"}, {"cid": "95013", "title": "第56話 神與惡魔", "title_zh": "第56话 神与恶魔"}, {"cid": "95014", "title": "第57話 破滅的開始", "title_zh": "第57话 破灭的开始"}, {"cid": "95015", "title": "第58話 墜落", "title_zh": "第58话 坠落"}, {"cid": "95016", "title": "第59話 鐵雨", "title_zh": "第59话 铁雨"}, {"cid": "95017", "title": "第60話 命懸一線", "title_zh": "第60话 命悬一线"}, {"cid": "95018", "title": "第61話 一樣的東西", "title_zh": "第61话 一样的东西"}]};
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>