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-1275", "mangaid": "1275", "zh_title": "变异体少女", "hant_title": "變異體少女", "en_title": "变异体少女 (Bilimanga #1275)", "author": "冈本伦", "tags": ["科幻", "异能", "猎奇", "黑暗", "病娇", "战斗", "科幻未来", "日本漫画"], "zh_desc": "突发性的事故造成了凶暴的新人类──变异体少女露西从研究机构逃脱!!\n\r\n在过程中,露西因受伤而丧失了记忆,在海岸边遇到了耕太和由香,耕太收留了露西,并将之命名为「Nyu」。\n\r\n人间凶器露西和丧失记忆的Nyu,如同双重人格般轮流出现,耕太两人将会有什么危险…!?\n\n📚 作品信息:作者 冈本伦 · 评分 10 · 共收录 12 卷 / 109 话章节目录与高清彩页/条漫预览。", "hant_desc": "突發性的事故造成了兇暴的新人類──變異體少女露西從研究機構逃脫!!\n\r\n在過程中,露西因受傷而喪失了記憶,在海岸邊遇到了耕太和由香,耕太收留了露西,並將之命名為「Nyu」。\n\r\n人間兇器露西和喪失記憶的Nyu,如同雙重人格般輪流出現,耕太兩人將會有什麼危險…!?\n\n📚 作品資訊:作者 岡本倫 · 評分 10 · 共收錄 12 卷 / 109 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '变异体少女' (變異體少女) by 冈本伦. Includes 12 volumes and 109 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1275/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1275/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1275/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1275/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1275/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1275/page_06.jpg"], "volumes": [{"title_hant": "變異體少女 1", "title_zh": "变异体少女 1", "cover_id": 2287973, "first_chap_id": 105786, "cover_url": "https://i.motiezw.com/cover/1275/2287973.jpg"}, {"title_hant": "變異體少女 2", "title_zh": "变异体少女 2", "cover_id": 2288179, "first_chap_id": 105795, "cover_url": "https://i.motiezw.com/cover/1275/2288179.jpg"}, {"title_hant": "變異體少女 3", "title_zh": "变异体少女 3", "cover_id": 2288405, "first_chap_id": 105807, "cover_url": "https://i.motiezw.com/cover/1275/2288405.jpg"}, {"title_hant": "變異體少女 4", "title_zh": "变异体少女 4", "cover_id": 2288623, "first_chap_id": 105819, "cover_url": "https://i.motiezw.com/cover/1275/2288623.jpg"}, {"title_hant": "變異體少女 5", "title_zh": "变异体少女 5", "cover_id": 2289617, "first_chap_id": 105884, "cover_url": "https://i.motiezw.com/cover/1275/2289617.jpg"}, {"title_hant": "變異體少女 6", "title_zh": "变异体少女 6", "cover_id": 2289842, "first_chap_id": 105896, "cover_url": "https://i.motiezw.com/cover/1275/2289842.jpg"}, {"title_hant": "變異體少女 7", "title_zh": "变异体少女 7", "cover_id": 2290067, "first_chap_id": 105909, "cover_url": "https://i.motiezw.com/cover/1275/2290067.jpg"}, {"title_hant": "變異體少女 8", "title_zh": "变异体少女 8", "cover_id": 2290323, "first_chap_id": 105923, "cover_url": "https://i.motiezw.com/cover/1275/2290323.jpg"}, {"title_hant": "變異體少女 9", "title_zh": "变异体少女 9", "cover_id": 2290485, "first_chap_id": 105928, "cover_url": "https://i.motiezw.com/cover/1275/2290485.jpg"}, {"title_hant": "變異體少女 10", "title_zh": "变异体少女 10", "cover_id": 2290686, "first_chap_id": 105936, "cover_url": "https://i.motiezw.com/cover/1275/2290686.jpg"}, {"title_hant": "變異體少女 11", "title_zh": "变异体少女 11", "cover_id": 2290918, "first_chap_id": 105943, "cover_url": "https://i.motiezw.com/cover/1275/2290918.jpg"}, {"title_hant": "變異體少女 12", "title_zh": "变异体少女 12", "cover_id": 2291151, "first_chap_id": 105954, "cover_url": "https://i.motiezw.com/cover/1275/2291151.jpg"}], "chapters": [{"cid": "105786", "title": "EL1 妖精", "title_zh": "EL1 妖精"}, {"cid": "105787", "title": "EL2 Nyu", "title_zh": "EL2 Nyu"}, {"cid": "105788", "title": "EL3 SAT男人", "title_zh": "EL3 SAT男人"}, {"cid": "105789", "title": "EL4 消失的記憶", "title_zh": "EL4 消失的记忆"}, {"cid": "105790", "title": "EL5 攻防", "title_zh": "EL5 攻防"}, {"cid": "105791", "title": "EL6 變身", "title_zh": "EL6 变身"}, {"cid": "105792", "title": "EL7 接觸點", "title_zh": "EL7 接触点"}, {"cid": "105793", "title": "SPECIAL MOL", "title_zh": "SPECIAL MOL"}, {"cid": "105795", "title": "EL8 由香的回憶", "title_zh": "EL8 由香的回忆"}, {"cid": "105796", "title": "EL9 喪失的記憶", "title_zh": "EL9 丧失的记忆"}, {"cid": "105797", "title": "EL10 不速之客", "title_zh": "EL10 不速之客"}, {"cid": "105798", "title": "EL11 訪問少N", "title_zh": "EL11 访问少N"}, {"cid": "105799", "title": "EL12 使者", "title_zh": "EL12 使者"}, {"cid": "105800", "title": "EL13 一發", "title_zh": "EL13 一发"}, {"cid": "105801", "title": "EL14 激鬥", "title_zh": "EL14 激斗"}, {"cid": "105802", "title": "EL15 救兵", "title_zh": "EL15 救兵"}, {"cid": "105803", "title": "EL16 然後少N死了", "title_zh": "EL16 然后少N死了"}, {"cid": "105804", "title": "EL17 新人類之父", "title_zh": "EL17 新人类之父"}, {"cid": "105805", "title": "SPECIAL digitopolis", "title_zh": "SPECIAL digitopolis"}, {"cid": "105807", "title": "EL18 少N的過去", "title_zh": "EL18 少N的过去"}, {"cid": "105808", "title": "EL19 同居人", "title_zh": "EL19 同居人"}, {"cid": "105810", "title": "EL21 子孫", "title_zh": "EL21 子孙"}, {"cid": "105811", "title": "EL22 繁殖?死?", "title_zh": "EL22 繁殖?死?"}, {"cid": "105812", "title": "EL23 角教授", "title_zh": "EL23 角教授"}, {"cid": "105813", "title": "EL24 軟禁Nyu", "title_zh": "EL24 软禁Nyu"}, {"cid": "105814", "title": "EL25 溝", "title_zh": "EL25 沟"}, {"cid": "105815", "title": "EL26 生命之泉", "title_zh": "EL26 生命之泉"}, {"cid": "105816", "title": "EL27 被解放者", "title_zh": "EL27 被解放者"}, {"cid": "105817", "title": "SPECIAL memoria", "title_zh": "SPECIAL memoria"}, {"cid": "105819", "title": "EL28 改造手術", "title_zh": "EL28 改造手术"}, {"cid": "105820", "title": "EL29 羈絆", "title_zh": "EL29 羁绊"}, {"cid": "105821", "title": "EL30 結", "title_zh": "EL30 结"}, {"cid": "105822", "title": "EL31 察覺", "title_zh": "EL31 察觉"}, {"cid": "105823", "title": "EL32 Nyu的過去", "title_zh": "EL32 Nyu的过去"}, {"cid": "105824", "title": "EL33 約定", "title_zh": "EL33 约定"}, {"cid": "105825", "title": "EL34 明喊", "title_zh": "EL34 明喊"}, {"cid": "105826", "title": "EL35 lies", "title_zh": "EL35 lies"}, {"cid": "105827", "title": "EL36 耳語", "title_zh": "EL36 耳语"}, {"cid": "105828", "title": "EL37 香苗", "title_zh": "EL37 香苗"}, {"cid": "105829", "title": "EL38 倒敘", "title_zh": "EL38 倒叙"}, {"cid": "105884", "title": "EL39 處刑命令", "title_zh": "EL39 处刑命令"}, {"cid": "105885", "title": "EL40 別離", "title_zh": "EL40 别离"}, {"cid": "105886", "title": "EL41 戰鬥的理由", "title_zh": "EL41 战斗的理由"}, {"cid": "105888", "title": "EL43 不能看的東西", "title_zh": "EL43 不能看的东西"}, {"cid": "105889", "title": "EL44 洩漏", "title_zh": "EL44 泄漏"}, {"cid": "105890", "title": "EL45 捉迷藏", "title_zh": "EL45 捉迷藏"}, {"cid": "105891", "title": "EL46 計畫", "title_zh": "EL46 计划"}, {"cid": "105892", "title": "EL47 接觸", "title_zh": "EL47 接触"}, {"cid": "105893", "title": "EL48 恐慌in楓莊", "title_zh": "EL48 恐慌in枫庄"}, {"cid": "105894", "title": "SPECIAL Elfen Lied", "title_zh": "SPECIAL Elfen Lied"}, {"cid": "105896", "title": "EL49 預想之外", "title_zh": "EL49 预想之外"}, {"cid": "105897", "title": "EL50 好像香苗", "title_zh": "EL50 好像香苗"}, {"cid": "105898", "title": "EL51 淚", "title_zh": "EL51 泪"}, {"cid": "105899", "title": "EL52 藏間的N兒", "title_zh": "EL52 藏间的N儿"}, {"cid": "105900", "title": "EL53 手段和選擇", "title_zh": "EL53 手段和选择"}, {"cid": "105901", "title": "EL54 海市蜃樓", "title_zh": "EL54 海市蜃楼"}, {"cid": "105902", "title": "EL55 MARIKO", "title_zh": "EL55 MARIKO"}, {"cid": "105903", "title": "EL56 少N的遊戲", "title_zh": "EL56 少N的游戏"}, {"cid": "105904", "title": "EL57 兩人的爸爸", "title_zh": "EL57 两人的爸爸"}, {"cid": "105905", "title": "EL58 白牆的研究所", "title_zh": "EL58 白墙的研究所"}]};
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>