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-701", "mangaid": "701", "zh_title": "模拟后宫体验", "hant_title": "模擬後宮體驗", "en_title": "模拟后宫体验 (Bilimanga #701)", "author": "齐藤祐", "tags": ["恋爱", "后宫", "校园", "日常", "欢乐", "爱情浪漫", "日本漫画", "漫画"], "zh_desc": "我果然还是很喜欢在学长面前演戏呢。\n\r\n\n\r\n像是漫画发展般的后宫状态,\n\r\n憧憬的学长「北浜瑛二」与\n\r\n不由得在学长面前\n\r\n演出各种『角色』的「七仓凛」。\n\r\n到底……七仓凛用自己原本的面貌对学长\n\r\n告白的那一天何时才会到来呢!?\n\n📚 作品信息:作者 齐藤祐 · 评分 10 · 共收录 6 卷 / 156 话章节目录与高清彩页/条漫预览。", "hant_desc": "我果然還是很喜歡在學長面前演戲呢。\n\r\n\n\r\n像是漫畫發展般的後宮狀態,\n\r\n憧憬的學長「北浜瑛二」與\n\r\n不由得在學長面前\n\r\n演出各種『角色』的「七倉凜」。\n\r\n到底……七倉凜用自己原本的面貌對學長\n\r\n告白的那一天何時才會到來呢!?\n\n📚 作品資訊:作者 齊藤祐 · 評分 10 · 共收錄 6 卷 / 156 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '模拟后宫体验' (模擬後宮體驗) by 齐藤祐. Includes 6 volumes and 156 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-701/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-701/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-701/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-701/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-701/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-701/page_06.jpg"], "volumes": [{"title_hant": "模擬後宮體驗 1", "title_zh": "模拟后宫体验 1", "cover_id": 1190967, "first_chap_id": 53486, "cover_url": "https://i.motiezw.com/cover/701/1190967.jpg"}, {"title_hant": "模擬後宮體驗 2", "title_zh": "模拟后宫体验 2", "cover_id": 1191128, "first_chap_id": 53520, "cover_url": "https://i.motiezw.com/cover/701/1191128.jpg"}, {"title_hant": "模擬後宮體驗 3", "title_zh": "模拟后宫体验 3", "cover_id": 1191269, "first_chap_id": 53547, "cover_url": "https://i.motiezw.com/cover/701/1191269.jpg"}, {"title_hant": "模擬後宮體驗 4", "title_zh": "模拟后宫体验 4", "cover_id": 1191503, "first_chap_id": 53594, "cover_url": "https://i.motiezw.com/cover/701/1191503.jpg"}, {"title_hant": "模擬後宮體驗 5", "title_zh": "模拟后宫体验 5", "cover_id": 1191560, "first_chap_id": 53602, "cover_url": "https://i.motiezw.com/cover/701/1191560.jpg"}, {"title_hant": "模擬後宮體驗 6", "title_zh": "模拟后宫体验 6", "cover_id": 1191812, "first_chap_id": 53650, "cover_url": "https://i.motiezw.com/cover/701/1191812.jpg"}], "chapters": [{"cid": "53486", "title": "第1話 後宮", "title_zh": "第1话 后宫"}, {"cid": "53487", "title": "第2話 演技", "title_zh": "第2话 演技"}, {"cid": "53488", "title": "第3話 貓的手", "title_zh": "第3话 猫的手"}, {"cid": "53489", "title": "第4話 電話號碼", "title_zh": "第4话 电话号码"}, {"cid": "53490", "title": "第5話 M術", "title_zh": "第5话 M术"}, {"cid": "53491", "title": "第6話 鬼故事", "title_zh": "第6话 鬼故事"}, {"cid": "53492", "title": "第7話 惡作劇", "title_zh": "第7话 恶作剧"}, {"cid": "53493", "title": "第8話 全力解放", "title_zh": "第8话 全力解放"}, {"cid": "53494", "title": "第9話 期末考", "title_zh": "第9话 期末考"}, {"cid": "53495", "title": "第10話 扮裝接力賽", "title_zh": "第10话 扮装接力赛"}, {"cid": "53496", "title": "第11話 寒冷的日子", "title_zh": "第11话 寒冷的日子"}, {"cid": "53497", "title": "第12話 一頭亂發", "title_zh": "第12话 一头乱发"}, {"cid": "53498", "title": "第13話 校慶", "title_zh": "第13话 校庆"}, {"cid": "53499", "title": "第14話 禮物", "title_zh": "第14话 礼物"}, {"cid": "53500", "title": "第15話 萬聖節", "title_zh": "第15话 万圣节"}, {"cid": "53501", "title": "第16話 小妹", "title_zh": "第16话 小妹"}, {"cid": "53502", "title": "第17話 眼淚", "title_zh": "第17话 眼泪"}, {"cid": "53503", "title": "第18話 筆記", "title_zh": "第18话 笔记"}, {"cid": "53504", "title": "第19話 難喝的飲料", "title_zh": "第19话 难喝的饮料"}, {"cid": "53505", "title": "第20話 感冒", "title_zh": "第20话 感冒"}, {"cid": "53506", "title": "第21話 感冒2", "title_zh": "第21话 感冒2"}, {"cid": "53507", "title": "第22話 遊戲", "title_zh": "第22话 游戏"}, {"cid": "53517", "title": "EX1話 告白", "title_zh": "EX1话 告白"}, {"cid": "53509", "title": "第24話 年末", "title_zh": "第24话 年末"}, {"cid": "53510", "title": "第25話 拜年", "title_zh": "第25话 拜年"}, {"cid": "53511", "title": "第26話 暖暖包", "title_zh": "第26话 暖暖包"}, {"cid": "53512", "title": "第27話 夜景", "title_zh": "第27话 夜景"}, {"cid": "53513", "title": "第28話 念書", "title_zh": "第28话 念书"}, {"cid": "53518", "title": "EX2話 信件", "title_zh": "EX2话 信件"}, {"cid": "53514", "title": "第29話 排演", "title_zh": "第29话 排演"}, {"cid": "53515", "title": "第30話 正式上場", "title_zh": "第30话 正式上场"}, {"cid": "53516", "title": "第四格小鬧劇 ~結婚生活~", "title_zh": "第四格小闹剧 ~结婚生活~"}, {"cid": "53520", "title": "第31話 戀愛指南", "title_zh": "第31话 恋爱指南"}, {"cid": "53541", "title": "EX3話 學生會長", "title_zh": "EX3话 学生会长"}, {"cid": "53521", "title": "第32話 肖像畫", "title_zh": "第32话 肖像画"}, {"cid": "53522", "title": "第33話 敬語", "title_zh": "第33话 敬语"}, {"cid": "53523", "title": "第34話 髮型", "title_zh": "第34话 发型"}, {"cid": "53524", "title": "第35話 便服", "title_zh": "第35话 便服"}, {"cid": "53525", "title": "第36話 新進社員", "title_zh": "第36话 新进社员"}, {"cid": "53526", "title": "第37話 JUMP", "title_zh": "第37话 JUMP"}, {"cid": "53542", "title": "EX4話 畢業紀念冊", "title_zh": "EX4话 毕业纪念册"}, {"cid": "53527", "title": "第38話 料理對決", "title_zh": "第38话 料理对决"}, {"cid": "53543", "title": "EX5話 課外教學", "title_zh": "EX5话 课外教学"}, {"cid": "53528", "title": "第39話 第二鈕扣", "title_zh": "第39话 第二钮扣"}, {"cid": "53529", "title": "第40話 秘密", "title_zh": "第40话 秘密"}, {"cid": "53544", "title": "EX6話 軟懶學妹", "title_zh": "EX6话 软懒学妹"}, {"cid": "53531", "title": "第42話 夢話", "title_zh": "第42话 梦话"}, {"cid": "53532", "title": "第43話 接龍", "title_zh": "第43话 接龙"}, {"cid": "53533", "title": "第44話 拋媚眼", "title_zh": "第44话 抛媚眼"}, {"cid": "53534", "title": "第45話 視力檢查", "title_zh": "第45话 视力检查"}, {"cid": "53545", "title": "EX7話 治療", "title_zh": "EX7话 治疗"}, {"cid": "53535", "title": "第47話 戀愛諮詢", "title_zh": "第47话 恋爱咨询"}, {"cid": "53536", "title": "第47話 屋頂", "title_zh": "第47话 屋顶"}, {"cid": "53537", "title": "第48話 雷", "title_zh": "第48话 雷"}, {"cid": "53538", "title": "第49話 WOW", "title_zh": "第49话 WOW"}, {"cid": "53539", "title": "第50話 名字", "title_zh": "第50话 名字"}, {"cid": "53540", "title": "特別篇 軟懶姊姊的觀察日記", "title_zh": "特别篇 软懒姊姊的观察日记"}, {"cid": "53547", "title": "第51話 結業式", "title_zh": "第51话 结业式"}, {"cid": "53567", "title": "EX8話 夏日祭典", "title_zh": "EX8话 夏日祭典"}, {"cid": "53548", "title": "第52話 游泳池", "title_zh": "第52话 游泳池"}]};
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>