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-494", "mangaid": "494", "zh_title": "亚人", "hant_title": "亞人", "en_title": "亚人 (Bilimanga #494)", "author": "桜井画门 / 三浦追傩", "tags": ["悬疑", "惊悚", "战斗", "奇幻", "冒险", "悬疑惊悚", "日本漫画", "漫画"], "zh_desc": "17年前,美军在非洲战场上俘虏到传说中不死的神兵,从此人类称呼这种跟自己长得一模一样却又不会死亡的生物叫做「亚人」。亚人不会因为任何因素死亡,因此只能透过「死过一次」来分辨。普通的高中生永井圭在放学途中被卡车意外撞死,却又马上复活。于是成为「日本国内第3个亚人」的他,从此被投以高额悬赏。不想成为实验动物的他,便与好朋友海斗,展开了浪迹天涯的旅行……\n\n📚 作品信息:作者 桜井画门 / 三浦追傩 · 评分 10 · 共收录 17 卷 / 81 话章节目录与高清彩页/条漫预览。", "hant_desc": "17年前,美軍在非洲戰場上俘虜到傳說中不死的神兵,從此人類稱呼這種跟自己長得一模一樣卻又不會死亡的生物叫做「亞人」。亞人不會因為任何因素死亡,因此只能透過「死過一次」來分辨。普通的高中生永井圭在放學途中被卡車意外撞死,卻又馬上復活。於是成為「日本國內第3個亞人」的他,從此被投以高額懸賞。不想成為實驗動物的他,便與好朋友海斗,展開了浪跡天涯的旅行……\n\n📚 作品資訊:作者 桜井画門 / 三浦追儺 · 評分 10 · 共收錄 17 卷 / 81 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '亚人' (亞人) by 桜井画门 / 三浦追傩. Includes 17 volumes and 81 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-494/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-494/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-494/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-494/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-494/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-494/page_06.jpg"], "volumes": [{"title_hant": "亞人 1", "title_zh": "亚人 1", "cover_id": 838057, "first_chap_id": 39185, "cover_url": "https://i.motiezw.com/cover/494/838057.jpg"}, {"title_hant": "亞人 2", "title_zh": "亚人 2", "cover_id": 838331, "first_chap_id": 39192, "cover_url": "https://i.motiezw.com/cover/494/838331.jpg"}, {"title_hant": "亞人 3", "title_zh": "亚人 3", "cover_id": 838468, "first_chap_id": 39197, "cover_url": "https://i.motiezw.com/cover/494/838468.jpg"}, {"title_hant": "亞人 4", "title_zh": "亚人 4", "cover_id": 838703, "first_chap_id": 39204, "cover_url": "https://i.motiezw.com/cover/494/838703.jpg"}, {"title_hant": "亞人 5", "title_zh": "亚人 5", "cover_id": 838853, "first_chap_id": 39209, "cover_url": "https://i.motiezw.com/cover/494/838853.jpg"}, {"title_hant": "亞人 6", "title_zh": "亚人 6", "cover_id": 839048, "first_chap_id": 39215, "cover_url": "https://i.motiezw.com/cover/494/839048.jpg"}, {"title_hant": "亞人 7", "title_zh": "亚人 7", "cover_id": 839239, "first_chap_id": 39220, "cover_url": "https://i.motiezw.com/cover/494/839239.jpg"}, {"title_hant": "亞人 8", "title_zh": "亚人 8", "cover_id": 839439, "first_chap_id": 39226, "cover_url": "https://i.motiezw.com/cover/494/839439.jpg"}, {"title_hant": "亞人 9", "title_zh": "亚人 9", "cover_id": 839632, "first_chap_id": 39232, "cover_url": "https://i.motiezw.com/cover/494/839632.jpg"}, {"title_hant": "亞人 10", "title_zh": "亚人 10", "cover_id": 839826, "first_chap_id": 39238, "cover_url": "https://i.motiezw.com/cover/494/839826.jpg"}, {"title_hant": "亞人 11", "title_zh": "亚人 11", "cover_id": 840019, "first_chap_id": 39244, "cover_url": "https://i.motiezw.com/cover/494/840019.jpg"}, {"title_hant": "亞人 12", "title_zh": "亚人 12", "cover_id": 840255, "first_chap_id": 39254, "cover_url": "https://i.motiezw.com/cover/494/840255.jpg"}], "chapters": [{"cid": "39185", "title": "第FILE01 關於發覺及其後的行動", "title_zh": "第FILE01 关于发觉及其后的行动"}, {"cid": "39186", "title": "第FILE02 關於第1天,深夜的事象", "title_zh": "第FILE02 关于第1天,深夜的事象"}, {"cid": "39187", "title": "第FILE03 關於逃走及威脅", "title_zh": "第FILE03 关于逃走及威胁"}, {"cid": "39188", "title": "第FILE04 關於訊問及同夥", "title_zh": "第FILE04 关于讯问及同伙"}, {"cid": "39189", "title": "第FILE05 關於發現及組織", "title_zh": "第FILE05 关于发现及组织"}, {"cid": "39192", "title": "第FILE06 心念一轉", "title_zh": "第FILE06 心念一转"}, {"cid": "39193", "title": "第FILE07 003", "title_zh": "第FILE07 003"}, {"cid": "39194", "title": "第FILE08 blindness", "title_zh": "第FILE08 blindness"}, {"cid": "39195", "title": "第FILE09 Killfacular", "title_zh": "第FILE09 Killfacular"}, {"cid": "39191", "title": "第FILE00 中村慎也事件", "title_zh": "第FILE00 中村慎也事件"}, {"cid": "39197", "title": "第FILE10 真正的永井圭①", "title_zh": "第FILE10 真正的永井圭①"}, {"cid": "39198", "title": "第FILE11 真正的永井主②", "title_zh": "第FILE11 真正的永井主②"}, {"cid": "39199", "title": "第FILE12 真正的永井圭③", "title_zh": "第FILE12 真正的永井圭③"}, {"cid": "39200", "title": "第FILE13 A計畫", "title_zh": "第FILE13 A计划"}, {"cid": "39201", "title": "第FILE14 後台", "title_zh": "第FILE14 后台"}, {"cid": "39204", "title": "第FILE15 鬥士", "title_zh": "第FILE15 斗士"}, {"cid": "39205", "title": "第FILE16 逃亡者", "title_zh": "第FILE16 逃亡者"}, {"cid": "39206", "title": "第FILE17 兩隊", "title_zh": "第FILE17 两队"}, {"cid": "39203", "title": "第FILE18 危機邊緣", "title_zh": "第FILE18 危机边缘"}, {"cid": "39207", "title": "第FILE19 大鬧一場吧!", "title_zh": "第FILE19 大闹一场吧!"}, {"cid": "39209", "title": "第FILE20 偷襲", "title_zh": "第FILE20 偷袭"}, {"cid": "39210", "title": "第FILE21 戰場損友", "title_zh": "第FILE21 战场损友"}, {"cid": "39211", "title": "第FILE22 亞人", "title_zh": "第FILE22 亚人"}, {"cid": "39212", "title": "第FILE23 被選上的男人", "title_zh": "第FILE23 被选上的男人"}, {"cid": "39213", "title": "第FILE24 Come with Me!!", "title_zh": "第FILE24 Come with Me!!"}, {"cid": "39215", "title": "第FILE25 第一天", "title_zh": "第FILE25 第一天"}, {"cid": "39216", "title": "第FILE26 Genius…!?", "title_zh": "第FILE26 Genius…!?"}, {"cid": "39217", "title": "第FILE27 下村泉", "title_zh": "第FILE27 下村泉"}, {"cid": "39218", "title": "第FILE28 牆", "title_zh": "第FILE28 墙"}, {"cid": "39220", "title": "第FILE29 Listen!!", "title_zh": "第FILE29 Listen!!"}, {"cid": "39221", "title": "第FILE30 Call of Duty", "title_zh": "第FILE30 Call of Duty"}, {"cid": "39222", "title": "第FILE31 Don't say", "title_zh": "第FILE31 Don't say"}, {"cid": "39223", "title": "第FILE32 攻擊開始", "title_zh": "第FILE32 攻击开始"}, {"cid": "39224", "title": "第FILE33 無敵", "title_zh": "第FILE33 无敌"}, {"cid": "39226", "title": "第FILE34 細胞分裂", "title_zh": "第FILE34 细胞分裂"}, {"cid": "39227", "title": "第FILE35 The Man Trap", "title_zh": "第FILE35 The Man Trap"}, {"cid": "39228", "title": "第FILE36 毀滅戰士", "title_zh": "第FILE36 毁灭战士"}, {"cid": "39229", "title": "第FILE37 暗影狂奔", "title_zh": "第FILE37 暗影狂奔"}, {"cid": "39230", "title": "第FILE38 戰地風雲:強硬路線", "title_zh": "第FILE38 战地风云:强硬路线"}, {"cid": "39232", "title": "第FILE39 戰地風雲:強硬路線②", "title_zh": "第FILE39 战地风云:强硬路线②"}, {"cid": "39234", "title": "第FILE41 祭典過後", "title_zh": "第FILE41 祭典过后"}, {"cid": "39235", "title": "第FILE42 平澤", "title_zh": "第FILE42 平泽"}, {"cid": "39236", "title": "第FILE43 大吵", "title_zh": "第FILE43 大吵"}, {"cid": "39238", "title": "第FILE44 血脈", "title_zh": "第FILE44 血脉"}, {"cid": "39239", "title": "第FILE45 U&I", "title_zh": "第FILE45 U&I"}, {"cid": "39240", "title": "第FILE46 早安,明天見", "title_zh": "第FILE46 早安,明天见"}, {"cid": "39241", "title": "第FILE47 Call of Duty Infinite Warfare", "title_zh": "第FILE47 Call of Duty Infinite Warfare"}, {"cid": "39242", "title": "第FILE48 喪家之犬們", "title_zh": "第FILE48 丧家之犬们"}, {"cid": "39244", "title": "第FILE49 險峻之路", "title_zh": "第FILE49 险峻之路"}, {"cid": "39245", "title": "第FILE50 應許之地", "title_zh": "第FILE50 应许之地"}, {"cid": "39246", "title": "第FILE51 FURY", "title_zh": "第FILE51 FURY"}, {"cid": "39247", "title": "第FILE52 When Where Who", "title_zh": "第FILE52 When Where Who"}, {"cid": "39248", "title": "第FILE53 信念", "title_zh": "第FILE53 信念"}, {"cid": "39254", "title": "第FILE54 大義", "title_zh": "第FILE54 大义"}, {"cid": "39256", "title": "第FILE55 樂園", "title_zh": "第FILE55 乐园"}, {"cid": "39257", "title": "第FILE56 ROLLING STAR", "title_zh": "第FILE56 ROLLING STAR"}, {"cid": "39258", "title": "第FILE57 超越理論", "title_zh": "第FILE57 超越理论"}, {"cid": "39261", "title": "第FILE58 Everything that has a beginning has an end.", "title_zh": "第FILE58 Everything that has a beginning has an end."}, {"cid": "39260", "title": "第FILE59 H-hour", "title_zh": "第FILE59 H-hour"}, {"cid": "39262", "title": "第FILE60 D-day", "title_zh": "第FILE60 D-day"}]};
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>