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-1296", "mangaid": "1296", "zh_title": "不死不运", "hant_title": "不死不運", "en_title": "不死不运 (Bilimanga #1296)", "author": "戸冢庆文", "tags": ["战斗", "热血", "异能", "末日", "冒险", "斗智", "战斗热血", "日本漫画"], "zh_desc": "某天,出云风子(不运)再也受不了自己总是给身旁的人带来不幸,决定一死了之;此时却突然出现一名全身唯美的神秘男子(不死),也打算靠她的不幸能力自我了断。然而这个举动却让双方都无法顺利死去,于是决定换地方再死一次,不过这次却出现某个组织(UNION)派来的追兵,试图将他们带回组织。不死为了完成心愿,带著不运展开逃亡,他们的命运将会如何?那个组织又是什么来头?新人漫画家户冢庆文老师的首部连载作品,各自拥有不同特殊能力的男女主角,为了达成共同目的「死亡」而联手,是一部风格与众不同的超能力漫画。\n\n📚 作品信息:作者 戸冢庆文 · 评分 10 · 共收录 27 卷 / 241 话章节目录与高清彩页/条漫预览。", "hant_desc": "某天,出雲風子(不運)再也受不了自己總是給身旁的人帶來不幸,決定一死了之;此時卻突然出現一名全身唯美的神秘男子(不死),也打算靠她的不幸能力自我了斷。然而這個舉動卻讓雙方都無法順利死去,於是決定換地方再死一次,不過這次卻出現某個組織(UNION)派來的追兵,試圖將他們帶回組織。不死為了完成心願,帶著不運展開逃亡,他們的命運將會如何?那個組織又是什麼來頭?新人漫畫家戶塚慶文老師的首部連載作品,各自擁有不同特殊能力的男女主角,為了達成共同目的「死亡」而聯手,是一部風格與眾不同的超能力漫畫。\n\n📚 作品資訊:作者 戸塚慶文 · 評分 10 · 共收錄 27 卷 / 241 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '不死不运' (不死不運) by 戸冢庆文. Includes 27 volumes and 241 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1296/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1296/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1296/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1296/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1296/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1296/page_06.jpg"], "volumes": [{"title_hant": "不死不運 1", "title_zh": "不死不运 1", "cover_id": 2332599, "first_chap_id": 107973, "cover_url": "https://i.motiezw.com/cover/1296/2332599.jpg"}, {"title_hant": "不死不運 2", "title_zh": "不死不运 2", "cover_id": 2332785, "first_chap_id": 107981, "cover_url": "https://i.motiezw.com/cover/1296/2332785.jpg"}, {"title_hant": "不死不運 3", "title_zh": "不死不运 3", "cover_id": 2332969, "first_chap_id": 107991, "cover_url": "https://i.motiezw.com/cover/1296/2332969.jpg"}, {"title_hant": "不死不運 4", "title_zh": "不死不运 4", "cover_id": 2333152, "first_chap_id": 108001, "cover_url": "https://i.motiezw.com/cover/1296/2333152.jpg"}, {"title_hant": "不死不運 5", "title_zh": "不死不运 5", "cover_id": 2333328, "first_chap_id": 108011, "cover_url": "https://i.motiezw.com/cover/1296/2333328.jpg"}, {"title_hant": "不死不運 6", "title_zh": "不死不运 6", "cover_id": 2333503, "first_chap_id": 108022, "cover_url": "https://i.motiezw.com/cover/1296/2333503.jpg"}, {"title_hant": "不死不運 7", "title_zh": "不死不运 7", "cover_id": 2333668, "first_chap_id": 108032, "cover_url": "https://i.motiezw.com/cover/1296/2333668.jpg"}, {"title_hant": "不死不運 8", "title_zh": "不死不运 8", "cover_id": 2333839, "first_chap_id": 108042, "cover_url": "https://i.motiezw.com/cover/1296/2333839.jpg"}, {"title_hant": "不死不運 9", "title_zh": "不死不运 9", "cover_id": 2334009, "first_chap_id": 108052, "cover_url": "https://i.motiezw.com/cover/1296/2334009.jpg"}, {"title_hant": "不死不運 10", "title_zh": "不死不运 10", "cover_id": 2334178, "first_chap_id": 108062, "cover_url": "https://i.motiezw.com/cover/1296/2334178.jpg"}, {"title_hant": "不死不運 11", "title_zh": "不死不运 11", "cover_id": 2334351, "first_chap_id": 108072, "cover_url": "https://i.motiezw.com/cover/1296/2334351.jpg"}, {"title_hant": "不死不運 12", "title_zh": "不死不运 12", "cover_id": 2334539, "first_chap_id": 108082, "cover_url": "https://i.motiezw.com/cover/1296/2334539.jpg"}], "chapters": [{"cid": "107973", "title": "No.001 不死跟不運", "title_zh": "No.001 不死跟不运"}, {"cid": "107974", "title": "No.002 UNION", "title_zh": "No.002 UNION"}, {"cid": "107975", "title": "No.003 你在否定什麼", "title_zh": "No.003 你在否定什么"}, {"cid": "107976", "title": "No.004 我的不運使用万法", "title_zh": "No.004 我的不运使用万法"}, {"cid": "107977", "title": "No.005 妳喜歡哪一個?", "title_zh": "No.005 妳喜欢哪一个?"}, {"cid": "107978", "title": "No.006 你果然都沒改變", "title_zh": "No.006 你果然都没改变"}, {"cid": "107979", "title": "No.007 我們來改變吧", "title_zh": "No.007 我们来改变吧"}, {"cid": "107981", "title": "No.008 你喜歡改變的我嗎?", "title_zh": "No.008 你喜欢改变的我吗?"}, {"cid": "107982", "title": "No.009 我們否定", "title_zh": "No.009 我们否定"}, {"cid": "107983", "title": "No.010 這是我想穿的衣服", "title_zh": "No.010 这是我想穿的衣服"}, {"cid": "107984", "title": "No.011 Longing", "title_zh": "No.011 Longing"}, {"cid": "107985", "title": "No.012 SPOIL", "title_zh": "No.012 SPOIL"}, {"cid": "107986", "title": "No.013 Revenge", "title_zh": "No.013 Revenge"}, {"cid": "107987", "title": "No.014 Dream", "title_zh": "No.014 Dream"}, {"cid": "107988", "title": "No.015 Truth", "title_zh": "No.015 Truth"}, {"cid": "107989", "title": "No.016 Victhor", "title_zh": "No.016 Victhor"}, {"cid": "107991", "title": "No.017 Exam", "title_zh": "No.017 Exam"}, {"cid": "107992", "title": "No.018 Return", "title_zh": "No.018 Return"}, {"cid": "107993", "title": "No.019 Result", "title_zh": "No.019 Result"}, {"cid": "107994", "title": "No.020 不准對地球出手", "title_zh": "No.020 不准对地球出手"}, {"cid": "107995", "title": "No.021 只要你在那裡,不管多少次都會救你", "title_zh": "No.021 只要你在那里,不管多少次都会救你"}, {"cid": "107997", "title": "No.023 在我死前都無法治癒", "title_zh": "No.023 在我死前都无法治愈"}, {"cid": "107998", "title": "No.024 無法取代的人", "title_zh": "No.024 无法取代的人"}, {"cid": "107999", "title": "No.025 變回普通身體的話", "title_zh": "No.025 变回普通身体的话"}, {"cid": "108001", "title": "No.026 任何一根寒毛", "title_zh": "No.026 任何一根寒毛"}, {"cid": "108002", "title": "No.027 該死的人是你", "title_zh": "No.027 该死的人是你"}, {"cid": "108003", "title": "No.028 紅蓮彈", "title_zh": "No.028 红莲弹"}, {"cid": "108004", "title": "No.029 UNDER", "title_zh": "No.029 UNDER"}, {"cid": "108005", "title": "No.030 所以請讓我", "title_zh": "No.030 所以请让我"}, {"cid": "108006", "title": "No.031 Revolution", "title_zh": "No.031 Revolution"}, {"cid": "108007", "title": "No.032 UNBELIEVABLE", "title_zh": "No.032 UNBELIEVABLE"}, {"cid": "108008", "title": "No.033 不運緊緊跟隨", "title_zh": "No.033 不运紧紧跟随"}, {"cid": "108009", "title": "No.034 這個世界始終都是", "title_zh": "No.034 这个世界始终都是"}, {"cid": "108011", "title": "No.035 這個世界是", "title_zh": "No.035 这个世界是"}, {"cid": "108012", "title": "No.036 不是一個人", "title_zh": "No.036 不是一个人"}, {"cid": "108013", "title": "No.037 UNDEAD+UNLUCK", "title_zh": "No.037 UNDEAD+UNLUCK"}, {"cid": "108014", "title": "No.038 安野雲", "title_zh": "No.038 安野云"}, {"cid": "108015", "title": "No.039 即使不用左手也能畫漫畫", "title_zh": "No.039 即使不用左手也能画漫画"}, {"cid": "108016", "title": "No.040 安迪?", "title_zh": "No.040 安迪?"}, {"cid": "108017", "title": "No.041 疼痛根本算不了什麼", "title_zh": "No.041 疼痛根本算不了什么"}, {"cid": "108018", "title": "No.042 只要沒有忘記", "title_zh": "No.042 只要没有忘记"}, {"cid": "108019", "title": "No.043 DEADLINE", "title_zh": "No.043 DEADLINE"}, {"cid": "108020", "title": "番外篇", "title_zh": "番外篇"}, {"cid": "108022", "title": "No.044 不死VS不死", "title_zh": "No.044 不死VS不死"}, {"cid": "108023", "title": "No.045 不運彈", "title_zh": "No.045 不运弹"}, {"cid": "108024", "title": "No.046 到現代見面吧", "title_zh": "No.046 到现代见面吧"}, {"cid": "108025", "title": "No.047 九能明", "title_zh": "No.047 九能明"}, {"cid": "108026", "title": "No.048 我不知道的故事", "title_zh": "No.048 我不知道的故事"}, {"cid": "108027", "title": "No.049 是屬於我們的", "title_zh": "No.049 是属于我们的"}, {"cid": "108028", "title": "No.050 交給你們了", "title_zh": "No.050 交给你们了"}, {"cid": "108029", "title": "No.051 英雄", "title_zh": "No.051 英雄"}, {"cid": "108030", "title": "No.052 想傳達給你", "title_zh": "No.052 想传达给你"}, {"cid": "108032", "title": "No.053 你有紅茶嗎?", "title_zh": "No.053 你有红茶吗?"}, {"cid": "108033", "title": "No.054 希望", "title_zh": "No.054 希望"}, {"cid": "108034", "title": "No.055 我基於真理", "title_zh": "No.055 我基于真理"}, {"cid": "108035", "title": "No.056 相信我", "title_zh": "No.056 相信我"}, {"cid": "108036", "title": "No.057 精彩", "title_zh": "No.057 精彩"}, {"cid": "108037", "title": "No.058 龍之眼", "title_zh": "No.058 龙之眼"}, {"cid": "108038", "title": "No.059 鐵山靠", "title_zh": "No.059 铁山靠"}, {"cid": "108039", "title": "No.060 真相", "title_zh": "No.060 真相"}]};
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>