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-1234", "mangaid": "1234", "zh_title": "我在麻里体内", "hant_title": "我在麻里體內", "en_title": "我在麻里体内 (Bilimanga #1234)", "author": "押见修造", "tags": ["性转", "悬疑", "校园", "黑暗", "群像", "悬疑惊悚", "日本漫画", "漫画"], "zh_desc": "大学三年级的小森功整日宅家打游戏、逃课,生活邋遢不堪,对未来毫无规划。他有个怪癖,常去附近便利店偷窥并尾随高中女生吉崎麻理。\n\r\n然而,某天清晨醒来,小森竟惊觉自己变成了麻理!慌乱中,他去找原本的自己,却不见麻理踪影。更棘手的是,神秘同学似乎察觉到了他身上这突如其来、不同寻常的变化。\n\n📚 作品信息:作者 押见修造 · 评分 9.6 · 共收录 9 卷 / 86 话章节目录与高清彩页/条漫预览。", "hant_desc": "大學三年級的小森功整日宅家打遊戲、逃課,生活邋遢不堪,對未來毫無規劃。他有個怪癖,常去附近便利店偷窺並尾隨高中女生吉崎麻理。\n\r\n然而,某天清晨醒來,小森竟驚覺自己變成了麻理!慌亂中,他去找原本的自己,卻不見麻理蹤影。更棘手的是,神秘同學似乎察覺到了他身上這突如其來、不同尋常的變化。\n\n📚 作品資訊:作者 押見修造 · 評分 9.6 · 共收錄 9 卷 / 86 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '我在麻里体内' (我在麻里體內) by 押见修造. Includes 9 volumes and 86 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1234/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1234/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1234/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1234/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1234/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1234/page_06.jpg"], "volumes": [{"title_hant": "我在麻里體內 1", "title_zh": "我在麻里体内 1", "cover_id": 2213896, "first_chap_id": 102491, "cover_url": "https://i.motiezw.com/cover/1234/2213896.jpg"}, {"title_hant": "我在麻里體內 2", "title_zh": "我在麻里体内 2", "cover_id": 2214088, "first_chap_id": 102501, "cover_url": "https://i.motiezw.com/cover/1234/2214088.jpg"}, {"title_hant": "我在麻里體內 3", "title_zh": "我在麻里体内 3", "cover_id": 2214279, "first_chap_id": 102512, "cover_url": "https://i.motiezw.com/cover/1234/2214279.jpg"}, {"title_hant": "我在麻里體內 4", "title_zh": "我在麻里体内 4", "cover_id": 2214470, "first_chap_id": 102523, "cover_url": "https://i.motiezw.com/cover/1234/2214470.jpg"}, {"title_hant": "我在麻里體內 5", "title_zh": "我在麻里体内 5", "cover_id": 2214660, "first_chap_id": 102534, "cover_url": "https://i.motiezw.com/cover/1234/2214660.jpg"}, {"title_hant": "我在麻里體內 6", "title_zh": "我在麻里体内 6", "cover_id": 2214850, "first_chap_id": 102545, "cover_url": "https://i.motiezw.com/cover/1234/2214850.jpg"}, {"title_hant": "我在麻里體內 7", "title_zh": "我在麻里体内 7", "cover_id": 2215040, "first_chap_id": 102556, "cover_url": "https://i.motiezw.com/cover/1234/2215040.jpg"}, {"title_hant": "我在麻里體內 8", "title_zh": "我在麻里体内 8", "cover_id": 2215227, "first_chap_id": 102567, "cover_url": "https://i.motiezw.com/cover/1234/2215227.jpg"}, {"title_hant": "我在麻里體內 9", "title_zh": "我在麻里体内 9", "cover_id": 2215418, "first_chap_id": 102578, "cover_url": "https://i.motiezw.com/cover/1234/2215418.jpg"}], "chapters": [{"cid": "102491", "title": "第1話 處男少N", "title_zh": "第1话 处男少N"}, {"cid": "102492", "title": "第2話 第一次的噓噓聲", "title_zh": "第2话 第一次的嘘嘘声"}, {"cid": "102493", "title": "第3話 接著去學校", "title_zh": "第3话 接著去学校"}, {"cid": "102494", "title": "第4話 高中N生的聖地", "title_zh": "第4话 高中N生的圣地"}, {"cid": "102495", "title": "第5話 尋找麻理", "title_zh": "第5话 寻找麻理"}, {"cid": "102496", "title": "第6話 妳是誰?", "title_zh": "第6话 妳是谁?"}, {"cid": "102497", "title": "第7話 真正的麻理", "title_zh": "第7话 真正的麻理"}, {"cid": "102498", "title": "第8話《我》的證明", "title_zh": "第8话《我》的证明"}, {"cid": "102499", "title": "附錄", "title_zh": "附录"}, {"cid": "102501", "title": "第9話 與小依的約定", "title_zh": "第9话 与小依的约定"}, {"cid": "102502", "title": "第10話 折磨時刻", "title_zh": "第10话 折磨时刻"}, {"cid": "102503", "title": "第11話 去搜索她家吧", "title_zh": "第11话 去搜索她家吧"}, {"cid": "102504", "title": "第12話 男人的聖地", "title_zh": "第12话 男人的圣地"}, {"cid": "102505", "title": "第13話 吉崎家的餐桌", "title_zh": "第13话 吉崎家的餐桌"}, {"cid": "102506", "title": "第14話 小依的獨白", "title_zh": "第14话 小依的独白"}, {"cid": "102507", "title": "第15話 莫名積極", "title_zh": "第15话 莫名积极"}, {"cid": "102508", "title": "第16話《我》心Q極嗨!", "title_zh": "第16话《我》心Q极嗨!"}, {"cid": "102509", "title": "第17話 享樂的代價", "title_zh": "第17话 享乐的代价"}, {"cid": "102510", "title": "附錄", "title_zh": "附录"}, {"cid": "102512", "title": "第18話 對峙之時", "title_zh": "第18话 对峙之时"}, {"cid": "102513", "title": "第19話 麻理的日常", "title_zh": "第19话 麻理的日常"}, {"cid": "102515", "title": "第21話 N子會流放", "title_zh": "第21话 N子会流放"}, {"cid": "102516", "title": "第22話 逐漸混濁的氣氛", "title_zh": "第22话 逐渐混浊的气氛"}, {"cid": "102517", "title": "第23話 自白", "title_zh": "第23话 自白"}, {"cid": "102518", "title": "第24新「我是小森功」", "title_zh": "第24新「我是小森功」"}, {"cid": "102519", "title": "第25話 麻理的訊息", "title_zh": "第25话 麻理的讯息"}, {"cid": "102520", "title": "第26話 面對面的我們", "title_zh": "第26话 面对面的我们"}, {"cid": "102521", "title": "附錄", "title_zh": "附录"}, {"cid": "102523", "title": "第27話 那個瞬間的麻理", "title_zh": "第27话 那个瞬间的麻理"}, {"cid": "102524", "title": "第28話 享樂的時光", "title_zh": "第28话 享乐的时光"}, {"cid": "102525", "title": "第29話 吉崎家的晚飯Ⅱ", "title_zh": "第29话 吉崎家的晚饭Ⅱ"}, {"cid": "102526", "title": "第30話 我注視著麻理", "title_zh": "第30话 我注视著麻理"}, {"cid": "102527", "title": "第31話 麻理渴求著我", "title_zh": "第31话 麻理渴求著我"}, {"cid": "102528", "title": "第32話 我所渴求的事物", "title_zh": "第32话 我所渴求的事物"}, {"cid": "102529", "title": "第33話 我、是麻理", "title_zh": "第33话 我、是麻理"}, {"cid": "102530", "title": "第34話 N高中生的聖域Ⅱ", "title_zh": "第34话 N高中生的圣域Ⅱ"}, {"cid": "102531", "title": "第35話 摯友?", "title_zh": "第35话 挚友?"}, {"cid": "102532", "title": "附錄", "title_zh": "附录"}, {"cid": "102534", "title": "第36話 我們是一丘之貉", "title_zh": "第36话 我们是一丘之貉"}, {"cid": "102535", "title": "第37話 我在依的房間裡", "title_zh": "第37话 我在依的房间里"}, {"cid": "102536", "title": "第38話 毋庸置疑的存在", "title_zh": "第38话 毋庸置疑的存在"}, {"cid": "102537", "title": "第39話 ぼくはぼくを見る", "title_zh": "第39话 ぼくはぼくを见る"}, {"cid": "102538", "title": "第40話 大家都思念著麻理", "title_zh": "第40话 大家都思念著麻理"}, {"cid": "102540", "title": "第42話 冰釋前嫌", "title_zh": "第42话 冰释前嫌"}, {"cid": "102541", "title": "第43話 全部都是真的", "title_zh": "第43话 全部都是真的"}, {"cid": "102542", "title": "第44話 初次表白", "title_zh": "第44话 初次表白"}, {"cid": "102543", "title": "附錄", "title_zh": "附录"}, {"cid": "102545", "title": "第45話 我到底是誰", "title_zh": "第45话 我到底是谁"}, {"cid": "102546", "title": "第46話 依同學改轅易轍", "title_zh": "第46话 依同学改辕易辙"}, {"cid": "102547", "title": "第47話 你不要插嘴!", "title_zh": "第47话 你不要插嘴!"}, {"cid": "102548", "title": "第48話 我、是麻理Ⅱ", "title_zh": "第48话 我、是麻理Ⅱ"}, {"cid": "102549", "title": "第49話 大家都思念著麻理", "title_zh": "第49话 大家都思念著麻理"}, {"cid": "102550", "title": "第50話 霸王硬上弓", "title_zh": "第50话 霸王硬上弓"}, {"cid": "102551", "title": "第51話 Flash Back", "title_zh": "第51话 Flash Back"}, {"cid": "102552", "title": "第52話 「文字」", "title_zh": "第52话 「文字」"}, {"cid": "102553", "title": "第53話 心中有依", "title_zh": "第53话 心中有依"}, {"cid": "102554", "title": "附錄", "title_zh": "附录"}, {"cid": "102556", "title": "第54話 被壓抑之溫", "title_zh": "第54话 被压抑之温"}, {"cid": "102557", "title": "第55話 愛上一個人的瞬間", "title_zh": "第55话 爱上一个人的瞬间"}, {"cid": "102558", "title": "第56話 霞空", "title_zh": "第56话 霞空"}]};
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>