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>Debby·the·Corsifa 讨厌认输 - 在线漫画阅读器</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-1389", "mangaid": "1389", "zh_title": "Debby·the·Corsifa 讨厌认输", "hant_title": "Debby·the·Corsifa 討厭認輸", "en_title": "Debby·the·Corsifa 讨厌认输 (Bilimanga #1389)", "author": "平方昌宏", "tags": ["奇幻", "欢乐", "日常", "竞技", "人外", "恋爱", "萌系", "校园"], "zh_desc": "正当六郎闲得发慌时,他的身边突然出现————最强恶魔.黛比.扎.可露西法!!\n\r\n面对前来消灭人类的黛比,六郎在情急之下向她提出用抽鬼牌一决胜负————!?\n\r\n与单纯好骗的恶魔一起玩耍,赌上人类存亡的搞笑解闷时间就此开幕!!\n\n📚 作品信息:作者 平方昌宏 · 评分 10 · 共收录 6 卷 / 63 话章节目录与高清彩页/条漫预览。", "hant_desc": "正當六郎閒得發慌時,他的身邊突然出現————最強惡魔.黛比.扎.可露西法!!\n\r\n面對前來消滅人類的黛比,六郎在情急之下向她提出用抽鬼牌一決勝負————!?\n\r\n與單純好騙的惡魔一起玩耍,賭上人類存亡的搞笑解悶時間就此開幕!!\n\n📚 作品資訊:作者 平方昌宏 · 評分 10 · 共收錄 6 卷 / 63 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga 'Debby·the·Corsifa 讨厌认输' (Debby·the·Corsifa 討厭認輸) by 平方昌宏. Includes 6 volumes and 63 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1389/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1389/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1389/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1389/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1389/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1389/page_06.jpg"], "volumes": [{"title_hant": "Debby·the·Corsifa 討厭認輸 1", "title_zh": "Debby·the·Corsifa 讨厌认输 1", "cover_id": 2504761, "first_chap_id": 115393, "cover_url": "https://i.motiezw.com/cover/1389/2504761.jpg"}, {"title_hant": "Debby·the·Corsifa 討厭認輸 2", "title_zh": "Debby·the·Corsifa 讨厌认输 2", "cover_id": 2504959, "first_chap_id": 115404, "cover_url": "https://i.motiezw.com/cover/1389/2504959.jpg"}, {"title_hant": "Debby·the·Corsifa 討厭認輸 3", "title_zh": "Debby·the·Corsifa 讨厌认输 3", "cover_id": 2505158, "first_chap_id": 115417, "cover_url": "https://i.motiezw.com/cover/1389/2505158.jpg"}, {"title_hant": "Debby·the·Corsifa 討厭認輸 4", "title_zh": "Debby·the·Corsifa 讨厌认输 4", "cover_id": 2505356, "first_chap_id": 115428, "cover_url": "https://i.motiezw.com/cover/1389/2505356.jpg"}, {"title_hant": "Debby·the·Corsifa 討厭認輸 5", "title_zh": "Debby·the·Corsifa 讨厌认输 5", "cover_id": 2505554, "first_chap_id": 115440, "cover_url": "https://i.motiezw.com/cover/1389/2505554.jpg"}, {"title_hant": "Debby·the·Corsifa 討厭認輸 6", "title_zh": "Debby·the·Corsifa 讨厌认输 6", "cover_id": 2505751, "first_chap_id": 115452, "cover_url": "https://i.motiezw.com/cover/1389/2505751.jpg"}], "chapters": [{"cid": "115393", "title": "解悶時間1:抽鬼牌", "title_zh": "解闷时间1:抽鬼牌"}, {"cid": "115394", "title": "解悶時間2:屁股相撲", "title_zh": "解闷时间2:屁股相扑"}, {"cid": "115395", "title": "解悶時間3:打排球", "title_zh": "解闷时间3:打排球"}, {"cid": "115396", "title": "解悶時間4:猜謎語", "title_zh": "解闷时间4:猜谜语"}, {"cid": "115397", "title": "解悶時間5:喝茶", "title_zh": "解闷时间5:喝茶"}, {"cid": "115398", "title": "解悶時間6:等待", "title_zh": "解闷时间6:等待"}, {"cid": "115399", "title": "解悶時間7:海釣", "title_zh": "解闷时间7:海钓"}, {"cid": "115400", "title": "解悶時間8:黑白棋", "title_zh": "解闷时间8:黑白棋"}, {"cid": "115401", "title": "解悶時間9:盪鞦韆", "title_zh": "解闷时间9:荡秋千"}, {"cid": "115402", "title": "惡魔小番外 ~單行本特別加筆篇~", "title_zh": "恶魔小番外 ~单行本特别加笔篇~"}, {"cid": "115404", "title": "解悶時間10:一二三木頭人", "title_zh": "解闷时间10:一二三木头人"}, {"cid": "115405", "title": "解悶時間11:打水漂", "title_zh": "解闷时间11:打水漂"}, {"cid": "115406", "title": "解悶時間12:格鬥遊戲", "title_zh": "解闷时间12:格斗游戏"}, {"cid": "115407", "title": "解悶時間13:大富翁", "title_zh": "解闷时间13:大富翁"}, {"cid": "115408", "title": "解悶時間14:感冒", "title_zh": "解闷时间14:感冒"}, {"cid": "115409", "title": "解悶時間15:角S扮演", "title_zh": "解闷时间15:角S扮演"}, {"cid": "115410", "title": "解悶時間16:貓", "title_zh": "解闷时间16:猫"}, {"cid": "115411", "title": "解悶時間17:玩頭髮(髮型整理)", "title_zh": "解闷时间17:玩头发(发型整理)"}, {"cid": "115412", "title": "解悶時間18:剉冰", "title_zh": "解闷时间18:剉冰"}, {"cid": "115413", "title": "解悶時間19:睡午覺", "title_zh": "解闷时间19:睡午觉"}, {"cid": "115414", "title": "惡魔小番外 ~單行本加筆新作篇~", "title_zh": "恶魔小番外 ~单行本加笔新作篇~"}, {"cid": "115417", "title": "解悶時間21:試膽大會", "title_zh": "解闷时间21:试胆大会"}, {"cid": "115418", "title": "解悶時間22:放煙火", "title_zh": "解闷时间22:放烟火"}, {"cid": "115419", "title": "解悶時間23:夏季症候群", "title_zh": "解闷时间23:夏季症候群"}, {"cid": "115420", "title": "解悶時間24:Pocky遊戲", "title_zh": "解闷时间24:Pocky游戏"}, {"cid": "115421", "title": "解悶時間25:煮咖哩", "title_zh": "解闷时间25:煮咖哩"}, {"cid": "115422", "title": "解悶時間26:擊退G", "title_zh": "解闷时间26:击退G"}, {"cid": "115423", "title": "解悶時間27:萬聖節", "title_zh": "解闷时间27:万圣节"}, {"cid": "115424", "title": "解悶時間28:登山", "title_zh": "解闷时间28:登山"}, {"cid": "115425", "title": "解悶時間29:居家約會", "title_zh": "解闷时间29:居家约会"}, {"cid": "115426", "title": "惡魔小番外 ~單行本加筆新作篇~", "title_zh": "恶魔小番外 ~单行本加笔新作篇~"}, {"cid": "115428", "title": "解悶時間30:打架", "title_zh": "解闷时间30:打架"}, {"cid": "115429", "title": "解悶時間31:聖誕節", "title_zh": "解闷时间31:圣诞节"}, {"cid": "115430", "title": "解悶時間32:暖桌", "title_zh": "解闷时间32:暖桌"}, {"cid": "115431", "title": "解悶時間33:打雪仗", "title_zh": "解闷时间33:打雪仗"}, {"cid": "115432", "title": "解悶時間34:介紹", "title_zh": "解闷时间34:介绍"}, {"cid": "115433", "title": "解悶時間35:Q人節", "title_zh": "解闷时间35:Q人节"}, {"cid": "115434", "title": "解悶時間36:一對一", "title_zh": "解闷时间36:一对一"}, {"cid": "115435", "title": "解悶時間37:白SQ人節", "title_zh": "解闷时间37:白SQ人节"}, {"cid": "115436", "title": "解悶時間38:宅宅閒聊", "title_zh": "解闷时间38:宅宅闲聊"}, {"cid": "115437", "title": "解悶時間39:賞櫻", "title_zh": "解闷时间39:赏樱"}, {"cid": "115438", "title": "惡魔小番外 扉頁插圖收藏", "title_zh": "恶魔小番外 扉页插图收藏"}, {"cid": "115440", "title": "解悶時間40:畫畫", "title_zh": "解闷时间40:画画"}, {"cid": "115442", "title": "解悶時間42:拜訪", "title_zh": "解闷时间42:拜访"}, {"cid": "115443", "title": "解悶時間43:躲雨", "title_zh": "解闷时间43:躲雨"}, {"cid": "115444", "title": "解悶時間44:伺候", "title_zh": "解闷时间44:伺候"}, {"cid": "115445", "title": "解悶時間45:生存遊戲", "title_zh": "解闷时间45:生存游戏"}, {"cid": "115446", "title": "解悶時間46:對打", "title_zh": "解闷时间46:对打"}, {"cid": "115447", "title": "解悶時間47:河川戲水", "title_zh": "解闷时间47:河川戏水"}, {"cid": "115448", "title": "解悶時間48:夜路", "title_zh": "解闷时间48:夜路"}, {"cid": "115449", "title": "解悶時間49:篝火", "title_zh": "解闷时间49:篝火"}, {"cid": "115450", "title": "惡魔小番外 ~單行本加筆新作篇~", "title_zh": "恶魔小番外 ~单行本加笔新作篇~"}, {"cid": "115452", "title": "解悶時間50:手拋滑翔機", "title_zh": "解闷时间50:手抛滑翔机"}, {"cid": "115453", "title": "解悶時間51:熊貓", "title_zh": "解闷时间51:熊猫"}, {"cid": "115454", "title": "解悶時間52:社群遊戲", "title_zh": "解闷时间52:社群游戏"}, {"cid": "115455", "title": "解悶時間53:N僕", "title_zh": "解闷时间53:N仆"}, {"cid": "115456", "title": "解悶時間54:商量", "title_zh": "解闷时间54:商量"}, {"cid": "115457", "title": "解悶時間55:秋季", "title_zh": "解闷时间55:秋季"}, {"cid": "115458", "title": "解悶時間56:邂逅", "title_zh": "解闷时间56:邂逅"}, {"cid": "115459", "title": "解悶時間57:溜冰", "title_zh": "解闷时间57:溜冰"}]};
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>