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-1159", "mangaid": "1159", "zh_title": "愚蠢天使与恶魔共舞", "hant_title": "愚蠢天使與惡魔共舞", "en_title": "愚蠢天使与恶魔共舞 (Bilimanga #1159)", "author": "アズマ サワヨシ", "tags": ["恋爱", "校园", "日常", "欢乐", "人外", "斗智", "校园青春", "日本漫画"], "zh_desc": "为了让面临存亡关头的魔界恶魔们重拾干劲,阿久津雅虎被指派前往人类世界寻找具备偶像特质的人。\n\r\n阿久津以转学生身分进入校园,发现班上的美少女天音具备成为精神领导者的特质,不料天音真正的身分竟然是恶魔的天敌「天使」!\n\r\n于是一场互相征服的腹黑恋爱喜剧开幕!\n\n📚 作品信息:作者 アズマ サワヨシ · 评分 10 · 共收录 22 卷 / 118 话章节目录与高清彩页/条漫预览。", "hant_desc": "為了讓面臨存亡關頭的魔界惡魔們重拾幹勁,阿久津雅虎被指派前往人類世界尋找具備偶像特質的人。\n\r\n阿久津以轉學生身分進入校園,發現班上的美少女天音具備成為精神領導者的特質,不料天音真正的身分竟然是惡魔的天敵「天使」!\n\r\n於是一場互相征服的腹黑戀愛喜劇開幕!\n\n📚 作品資訊:作者 アズマ サワヨシ · 評分 10 · 共收錄 22 卷 / 118 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '愚蠢天使与恶魔共舞' (愚蠢天使與惡魔共舞) by アズマ サワヨシ. Includes 22 volumes and 118 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1159/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1159/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1159/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1159/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1159/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1159/page_06.jpg"], "volumes": [{"title_hant": "愚蠢天使與惡魔共舞 1", "title_zh": "愚蠢天使与恶魔共舞 1", "cover_id": 2086827, "first_chap_id": 97157, "cover_url": "https://i.motiezw.com/cover/1159/2086827.jpg"}, {"title_hant": "愚蠢天使與惡魔共舞 2", "title_zh": "愚蠢天使与恶魔共舞 2", "cover_id": 2087007, "first_chap_id": 97162, "cover_url": "https://i.motiezw.com/cover/1159/2087007.jpg"}, {"title_hant": "愚蠢天使與惡魔共舞 3", "title_zh": "愚蠢天使与恶魔共舞 3", "cover_id": 2087171, "first_chap_id": 97169, "cover_url": "https://i.motiezw.com/cover/1159/2087171.jpg"}, {"title_hant": "愚蠢天使與惡魔共舞 4", "title_zh": "愚蠢天使与恶魔共舞 4", "cover_id": 2087330, "first_chap_id": 97176, "cover_url": "https://i.motiezw.com/cover/1159/2087330.jpg"}, {"title_hant": "愚蠢天使與惡魔共舞 5", "title_zh": "愚蠢天使与恶魔共舞 5", "cover_id": 2087490, "first_chap_id": 97183, "cover_url": "https://i.motiezw.com/cover/1159/2087490.jpg"}, {"title_hant": "愚蠢天使與惡魔共舞 6", "title_zh": "愚蠢天使与恶魔共舞 6", "cover_id": 2087652, "first_chap_id": 97190, "cover_url": "https://i.motiezw.com/cover/1159/2087652.jpg"}, {"title_hant": "愚蠢天使與惡魔共舞 7", "title_zh": "愚蠢天使与恶魔共舞 7", "cover_id": 2087812, "first_chap_id": 97198, "cover_url": "https://i.motiezw.com/cover/1159/2087812.jpg"}, {"title_hant": "愚蠢天使與惡魔共舞 8", "title_zh": "愚蠢天使与恶魔共舞 8", "cover_id": 2087968, "first_chap_id": 97206, "cover_url": "https://i.motiezw.com/cover/1159/2087968.jpg"}, {"title_hant": "愚蠢天使與惡魔共舞 9", "title_zh": "愚蠢天使与恶魔共舞 9", "cover_id": 2088132, "first_chap_id": 97213, "cover_url": "https://i.motiezw.com/cover/1159/2088132.jpg"}, {"title_hant": "愚蠢天使與惡魔共舞 10", "title_zh": "愚蠢天使与恶魔共舞 10", "cover_id": 2088298, "first_chap_id": 97221, "cover_url": "https://i.motiezw.com/cover/1159/2088298.jpg"}, {"title_hant": "愚蠢天使與惡魔共舞 11", "title_zh": "愚蠢天使与恶魔共舞 11", "cover_id": 2088461, "first_chap_id": 97228, "cover_url": "https://i.motiezw.com/cover/1159/2088461.jpg"}, {"title_hant": "愚蠢天使與惡魔共舞 12", "title_zh": "愚蠢天使与恶魔共舞 12", "cover_id": 2088658, "first_chap_id": 97235, "cover_url": "https://i.motiezw.com/cover/1159/2088658.jpg"}], "chapters": [{"cid": "97157", "title": "第1話「愚蠢惡魔與天使共舞」", "title_zh": "第1话「愚蠢恶魔与天使共舞」"}, {"cid": "97158", "title": "第2話「Lyric&Loud SOUL」", "title_zh": "第2话「Lyric&Loud SOUL」"}, {"cid": "97159", "title": "第3話「Heaven's Road」", "title_zh": "第3话「Heaven's Road」"}, {"cid": "97160", "title": "第4話「這股力量大約80kgw」", "title_zh": "第4话「这股力量大约80kgw」"}, {"cid": "97162", "title": "第5話「三十一文字的愛」", "title_zh": "第5话「三十一文字的爱」"}, {"cid": "97163", "title": "第6話「nur für Erwachsene]", "title_zh": "第6话「nur für Erwachsene]"}, {"cid": "97164", "title": "第7話「所以是天使」", "title_zh": "第7话「所以是天使」"}, {"cid": "97165", "title": "第7.5話「最近的自動販賣機實在是」", "title_zh": "第7.5话「最近的自动贩卖机实在是」"}, {"cid": "97166", "title": "第8話「The Kiss of the Dead」", "title_zh": "第8话「The Kiss of the Dead」"}, {"cid": "97167", "title": "附錄", "title_zh": "附录"}, {"cid": "97169", "title": "第9話「伊甸園的蘋果」", "title_zh": "第9话「伊甸园的苹果」"}, {"cid": "97170", "title": "第10話「多算勝」", "title_zh": "第10话「多算胜」"}, {"cid": "97171", "title": "第11話「愛Q喜劇中的優勢」", "title_zh": "第11话「爱Q喜剧中的优势」"}, {"cid": "97173", "title": "第12話「ROCK YOU!」", "title_zh": "第12话「ROCK YOU!」"}, {"cid": "97172", "title": "第13話「CAN'T HELP FALLING IN LOVE」", "title_zh": "第13话「CAN'T HELP FALLING IN LOVE」"}, {"cid": "97174", "title": "附錄", "title_zh": "附录"}, {"cid": "97176", "title": "第14話「如果能在夢中相見」", "title_zh": "第14话「如果能在梦中相见」"}, {"cid": "97177", "title": "第15話「TANGEL VOICE]", "title_zh": "第15话「TANGEL VOICE]"}, {"cid": "97178", "title": "第16話「No.9攻擊手」", "title_zh": "第16话「No.9攻击手」"}, {"cid": "97179", "title": "第17話「耀眼的世界」", "title_zh": "第17话「耀眼的世界」"}, {"cid": "97181", "title": "第19話「別走」", "title_zh": "第19话「别走」"}, {"cid": "97183", "title": "第20話「А-В-С」", "title_zh": "第20话「А-В-С」"}, {"cid": "97184", "title": "第21話「獎賞」", "title_zh": "第21话「奖赏」"}, {"cid": "97185", "title": "第22話「粉紅惡魔們」", "title_zh": "第22话「粉红恶魔们」"}, {"cid": "97186", "title": "第23話「2/5」", "title_zh": "第23话「2/5」"}, {"cid": "97187", "title": "第24話「乾脆由我來」", "title_zh": "第24话「干脆由我来」"}, {"cid": "97188", "title": "附錄", "title_zh": "附录"}, {"cid": "97190", "title": "第25話「姊姊,求求妳♡」", "title_zh": "第25话「姊姊,求求妳♡」"}, {"cid": "97192", "title": "第26話「夢的盡頭」", "title_zh": "第26话「梦的尽头」"}, {"cid": "97191", "title": "第27話「哥哥」", "title_zh": "第27话「哥哥」"}, {"cid": "97194", "title": "第28話「別看」", "title_zh": "第28话「别看」"}, {"cid": "97193", "title": "第29話「想想辦法啊!」", "title_zh": "第29话「想想办法啊!」"}, {"cid": "97195", "title": "番外篇「然後沒有半個人⋯」", "title_zh": "番外篇「然后没有半个人⋯」"}, {"cid": "97196", "title": "附錄", "title_zh": "附录"}, {"cid": "97198", "title": "第30話「你應該更加」", "title_zh": "第30话「你应该更加」"}, {"cid": "97199", "title": "第32話「最終回」", "title_zh": "第32话「最终回」"}, {"cid": "97200", "title": "第31話「謝謝你」", "title_zh": "第31话「谢谢你」"}, {"cid": "97201", "title": "第33話「Stupid Angel Dance with Devil」", "title_zh": "第33话「Stupid Angel Dance with Devil」"}, {"cid": "97203", "title": "第34話「歡迎來到妖怪宅邸!」", "title_zh": "第34话「欢迎来到妖怪宅邸!」"}, {"cid": "97202", "title": "第35話「Cat walk」", "title_zh": "第35话「Cat walk」"}, {"cid": "97204", "title": "附錄", "title_zh": "附录"}, {"cid": "97206", "title": "第36話「K是野獸的K」", "title_zh": "第36话「K是野兽的K」"}, {"cid": "97207", "title": "第37話「結婚前提」", "title_zh": "第37话「结婚前提」"}, {"cid": "97208", "title": "第38話「滿是回憶」", "title_zh": "第38话「满是回忆」"}, {"cid": "97209", "title": "第39話「Under The Sea」", "title_zh": "第39话「Under The Sea」"}, {"cid": "97210", "title": "第40話「YMD」", "title_zh": "第40话「YMD」"}, {"cid": "97211", "title": "附錄", "title_zh": "附录"}, {"cid": "97213", "title": "第40.5話「混蛋惡魔」", "title_zh": "第40.5话「混蛋恶魔」"}, {"cid": "97214", "title": "第41話「Little little⋯」", "title_zh": "第41话「Little little⋯」"}, {"cid": "97215", "title": "第42話「謝啦」", "title_zh": "第42话「谢啦」"}, {"cid": "97216", "title": "第43話「結束與開始」", "title_zh": "第43话「结束与开始」"}, {"cid": "97217", "title": "第44話「不能讓我撒個嬌嗎?」", "title_zh": "第44话「不能让我撒个娇吗?」"}, {"cid": "97218", "title": "第45話「重逢」", "title_zh": "第45话「重逢」"}, {"cid": "97219", "title": "附錄", "title_zh": "附录"}, {"cid": "97221", "title": "第46話「小綾」", "title_zh": "第46话「小绫」"}, {"cid": "97222", "title": "第47話「再燃」", "title_zh": "第47话「再燃」"}, {"cid": "97223", "title": "第48話「singin'in the rain」", "title_zh": "第48话「singin'in the rain」"}, {"cid": "97224", "title": "第49話「close to me」", "title_zh": "第49话「close to me」"}, {"cid": "97225", "title": "第50話「bittersweet」", "title_zh": "第50话「bittersweet」"}, {"cid": "97226", "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>