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-711", "mangaid": "711", "zh_title": "白圣女与黑牧师", "hant_title": "白聖女與黑牧師", "en_title": "白圣女与黑牧师 (Bilimanga #711)", "author": "和武叶佐乃", "tags": ["恋爱", "奇幻", "欢乐", "日常", "治愈", "爱情浪漫", "日本漫画", "漫画"], "zh_desc": "长相可爱,却有很多小毛病的圣女—赛西莉亚,以及外表严肃却十分温柔,对圣女过度保护、家事万能的牧师—罗伦斯,两人一起度过的每一天,无时无刻都在不自觉地放闪(!)有著奇幻世界观的温馨爱情喜剧(?)罗伦斯的特殊体质究竟是怎么回事?赶快翻开此作一见分晓!\n\n📚 作品信息:作者 和武叶佐乃 · 评分 10 · 共收录 13 卷 / 85 话章节目录与高清彩页/条漫预览。", "hant_desc": "長相可愛,卻有很多小毛病的聖女—賽西莉亞,以及外表嚴肅卻十分溫柔,對聖女過度保護、家事萬能的牧師—羅倫斯,兩人一起度過的每一天,無時無刻都在不自覺地放閃(!)有著奇幻世界觀的溫馨愛情喜劇(?)羅倫斯的特殊體質究竟是怎麼回事?趕快翻開此作一見分曉!\n\n📚 作品資訊:作者 和武葉佐乃 · 評分 10 · 共收錄 13 卷 / 85 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '白圣女与黑牧师' (白聖女與黑牧師) by 和武叶佐乃. Includes 13 volumes and 85 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-711/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-711/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-711/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-711/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-711/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-711/page_06.jpg"], "volumes": [{"title_hant": "白聖女與黑牧師 1", "title_zh": "白圣女与黑牧师 1", "cover_id": 1215182, "first_chap_id": 54862, "cover_url": "https://i.motiezw.com/cover/711/1215182.jpg"}, {"title_hant": "白聖女與黑牧師 2", "title_zh": "白圣女与黑牧师 2", "cover_id": 1215360, "first_chap_id": 54870, "cover_url": "https://i.motiezw.com/cover/711/1215360.jpg"}, {"title_hant": "白聖女與黑牧師 3", "title_zh": "白圣女与黑牧师 3", "cover_id": 1215526, "first_chap_id": 54878, "cover_url": "https://i.motiezw.com/cover/711/1215526.jpg"}, {"title_hant": "白聖女與黑牧師 4", "title_zh": "白圣女与黑牧师 4", "cover_id": 1215682, "first_chap_id": 54886, "cover_url": "https://i.motiezw.com/cover/711/1215682.jpg"}, {"title_hant": "白聖女與黑牧師 5", "title_zh": "白圣女与黑牧师 5", "cover_id": 1215840, "first_chap_id": 54893, "cover_url": "https://i.motiezw.com/cover/711/1215840.jpg"}, {"title_hant": "白聖女與黑牧師 6", "title_zh": "白圣女与黑牧师 6", "cover_id": 1216024, "first_chap_id": 54902, "cover_url": "https://i.motiezw.com/cover/711/1216024.jpg"}, {"title_hant": "白聖女與黑牧師 7", "title_zh": "白圣女与黑牧师 7", "cover_id": 1216186, "first_chap_id": 54909, "cover_url": "https://i.motiezw.com/cover/711/1216186.jpg"}, {"title_hant": "白聖女與黑牧師 8", "title_zh": "白圣女与黑牧师 8", "cover_id": 1216347, "first_chap_id": 54917, "cover_url": "https://i.motiezw.com/cover/711/1216347.jpg"}, {"title_hant": "白聖女與黑牧師 9", "title_zh": "白圣女与黑牧师 9", "cover_id": 1216509, "first_chap_id": 54925, "cover_url": "https://i.motiezw.com/cover/711/1216509.jpg"}, {"title_hant": "白聖女與黑牧師 10", "title_zh": "白圣女与黑牧师 10", "cover_id": 1216669, "first_chap_id": 54933, "cover_url": "https://i.motiezw.com/cover/711/1216669.jpg"}, {"title_hant": "白聖女與黑牧師 11", "title_zh": "白圣女与黑牧师 11", "cover_id": 1216833, "first_chap_id": 54941, "cover_url": "https://i.motiezw.com/cover/711/1216833.jpg"}, {"title_hant": "白聖女與黑牧師 12", "title_zh": "白圣女与黑牧师 12", "cover_id": 1216995, "first_chap_id": 54948, "cover_url": "https://i.motiezw.com/cover/711/1216995.jpg"}], "chapters": [{"cid": "54862", "title": "第1話 兩人的關係", "title_zh": "第1话 两人的关系"}, {"cid": "54863", "title": "第2話 兩人的用餐", "title_zh": "第2话 两人的用餐"}, {"cid": "54864", "title": "第3話 兩人的購物", "title_zh": "第3话 两人的购物"}, {"cid": "54865", "title": "第4話 兩人的訪客", "title_zh": "第4话 两人的访客"}, {"cid": "54866", "title": "第5話 兩人守護之物", "title_zh": "第5话 两人守护之物"}, {"cid": "54867", "title": "第6話 兩人的每一天 ~回顧~", "title_zh": "第6话 两人的每一天 ~回顾~"}, {"cid": "54868", "title": "第7話 兩人的每一天 ~展望~", "title_zh": "第7话 两人的每一天 ~展望~"}, {"cid": "54870", "title": "第8話 兩人的夜晚", "title_zh": "第8话 两人的夜晚"}, {"cid": "54871", "title": "第9話 羅倫的不安", "title_zh": "第9话 罗伦的不安"}, {"cid": "54872", "title": "第10話 兩人的契合度", "title_zh": "第10话 两人的契合度"}, {"cid": "54873", "title": "第11話 賽西莉亞的心願", "title_zh": "第11话 赛西莉亚的心愿"}, {"cid": "54874", "title": "第12話 身負聖N名號之人", "title_zh": "第12话 身负圣N名号之人"}, {"cid": "54875", "title": "第13話 兩人的關係 2", "title_zh": "第13话 两人的关系 2"}, {"cid": "54876", "title": "附錄漫畫", "title_zh": "附录漫画"}, {"cid": "54878", "title": "第14話 兩人的「可愛」", "title_zh": "第14话 两人的「可爱」"}, {"cid": "54879", "title": "第15話 加入了赫賽麗塔的日常", "title_zh": "第15话 加入了赫赛丽塔的日常"}, {"cid": "54880", "title": "第16話 第一次出差", "title_zh": "第16话 第一次出差"}, {"cid": "54881", "title": "第17話 兩人能做的事", "title_zh": "第17话 两人能做的事"}, {"cid": "54882", "title": "第18話 專屬N生的晚宴", "title_zh": "第18话 专属N生的晚宴"}, {"cid": "54883", "title": "第19話 兩人的Q人節", "title_zh": "第19话 两人的Q人节"}, {"cid": "54886", "title": "第21話 亞伯的生存之道", "title_zh": "第21话 亚伯的生存之道"}, {"cid": "54887", "title": "第22話 賽西莉亞的煩惱", "title_zh": "第22话 赛西莉亚的烦恼"}, {"cid": "54888", "title": "第23話 羅倫的秘密", "title_zh": "第23话 罗伦的秘密"}, {"cid": "54889", "title": "第24話 兩人的「家人」", "title_zh": "第24话 两人的「家人」"}, {"cid": "54890", "title": "第25話 兩人的關係 3", "title_zh": "第25话 两人的关系 3"}, {"cid": "54891", "title": "附錄漫畫", "title_zh": "附录漫画"}, {"cid": "54893", "title": "第26話 羅倫斯與貓", "title_zh": "第26话 罗伦斯与猫"}, {"cid": "54894", "title": "第27話 賽西莉亞的髮型", "title_zh": "第27话 赛西莉亚的发型"}, {"cid": "54895", "title": "第28話 家庭教師與大小姐", "title_zh": "第28话 家庭教师与大小姐"}, {"cid": "54896", "title": "第29話 兩人與牧師大人們", "title_zh": "第29话 两人与牧师大人们"}, {"cid": "54897", "title": "第30話 哥哥與西方城鎮", "title_zh": "第30话 哥哥与西方城镇"}, {"cid": "54898", "title": "第31話 芙蕾德莉卡留下的東西", "title_zh": "第31话 芙蕾德莉卡留下的东西"}, {"cid": "54899", "title": "第32話 在水邊的兩人", "title_zh": "第32话 在水边的两人"}, {"cid": "54900", "title": "附錄漫畫", "title_zh": "附录漫画"}, {"cid": "54902", "title": "第33話 滿滿戀愛話題的N子聚會×3", "title_zh": "第33话 满满恋爱话题的N子聚会×3"}, {"cid": "54903", "title": "第34話 兩人與亞伯的家", "title_zh": "第34话 两人与亚伯的家"}, {"cid": "54904", "title": "第35話 聖N的「加持」", "title_zh": "第35话 圣N的「加持」"}, {"cid": "54905", "title": "第36話 大小姐想從事的工作", "title_zh": "第36话 大小姐想从事的工作"}, {"cid": "54906", "title": "第37話 久違的兩人", "title_zh": "第37话 久违的两人"}, {"cid": "54907", "title": "第38話 兩人的心意", "title_zh": "第38话 两人的心意"}, {"cid": "54909", "title": "第39話 大家的住處", "title_zh": "第39话 大家的住处"}, {"cid": "54911", "title": "第41話 賽西莉亞的工作", "title_zh": "第41话 赛西莉亚的工作"}, {"cid": "54912", "title": "第42話「看得見」「看不見」", "title_zh": "第42话「看得见」「看不见」"}, {"cid": "54913", "title": "第43話「摸得到」「摸不到」", "title_zh": "第43话「摸得到」「摸不到」"}, {"cid": "54914", "title": "第44話 兩人的信賴", "title_zh": "第44话 两人的信赖"}, {"cid": "54915", "title": "加筆漫畫", "title_zh": "加笔漫画"}, {"cid": "54917", "title": "第45話 赫賽麗塔的堅持", "title_zh": "第45话 赫赛丽塔的坚持"}, {"cid": "54918", "title": "第46話 兩人感興趣的事物", "title_zh": "第46话 两人感兴趣的事物"}, {"cid": "54919", "title": "第47話 有熊熊的生活", "title_zh": "第47话 有熊熊的生活"}, {"cid": "54920", "title": "第47.5話 後來的熊熊", "title_zh": "第47.5话 后来的熊熊"}, {"cid": "54921", "title": "第48話 兩人與下雪的城鎮", "title_zh": "第48话 两人与下雪的城镇"}, {"cid": "54922", "title": "第49話 占卜師的祕密", "title_zh": "第49话 占卜师的秘密"}, {"cid": "54923", "title": "第50話 兩人單獨出門", "title_zh": "第50话 两人单独出门"}, {"cid": "54925", "title": "特別篇 兩人的共同作業", "title_zh": "特别篇 两人的共同作业"}, {"cid": "54926", "title": "第51話 賽西粘亞的看護", "title_zh": "第51话 赛西粘亚的看护"}, {"cid": "54927", "title": "第52話 兩人的學習", "title_zh": "第52话 两人的学习"}, {"cid": "54928", "title": "第53話 第二次Q人節", "title_zh": "第53话 第二次Q人节"}, {"cid": "54929", "title": "第54話 我想知道", "title_zh": "第54话 我想知道"}, {"cid": "54930", "title": "第55話 不變的兩人", "title_zh": "第55话 不变的两人"}, {"cid": "54931", "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>