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-773", "mangaid": "773", "zh_title": "出包王女", "hant_title": "出包王女", "en_title": "出包王女 (Bilimanga #773)", "author": "矢吹健太朗 / 长谷见沙贵", "tags": ["恋爱", "后宫", "欢乐", "科幻", "校园", "萌系", "校园青春", "日本漫画"], "zh_desc": "超级纯情的结城梨斗,做出重大的决定,他要向憧憬已久的女孩春菜告白。\n\r\n可是,因为一场误会,他告白的对象变成美少女外星人.菈菈…!?\n\r\n可爱,一点点H的笑闹爱情喜剧★登场!!\n\n📚 作品信息:作者 矢吹健太朗 / 长谷见沙贵 · 评分 10 · 共收录 18 卷 / 164 话章节目录与高清彩页/条漫预览。", "hant_desc": "超級純情的結城梨斗,做出重大的決定,他要向憧憬已久的女孩春菜告白。\n\r\n可是,因為一場誤會,他告白的對象變成美少女外星人.菈菈…!?\n\r\n可愛,一點點H的笑鬧愛情喜劇★登場!!\n\n📚 作品資訊:作者 矢吹健太朗 / 長谷見沙貴 · 評分 10 · 共收錄 18 卷 / 164 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '出包王女' (出包王女) by 矢吹健太朗 / 长谷见沙贵. Includes 18 volumes and 164 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-773/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-773/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-773/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-773/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-773/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-773/page_06.jpg"], "volumes": [{"title_hant": "出包王女 1", "title_zh": "出包王女 1", "cover_id": 1324265, "first_chap_id": 60702, "cover_url": "https://i.motiezw.com/cover/773/1324265.jpg"}, {"title_hant": "出包王女 2", "title_zh": "出包王女 2", "cover_id": 1324465, "first_chap_id": 60710, "cover_url": "https://i.motiezw.com/cover/773/1324465.jpg"}, {"title_hant": "出包王女 3", "title_zh": "出包王女 3", "cover_id": 1324659, "first_chap_id": 60720, "cover_url": "https://i.motiezw.com/cover/773/1324659.jpg"}, {"title_hant": "出包王女 4", "title_zh": "出包王女 4", "cover_id": 1324849, "first_chap_id": 60730, "cover_url": "https://i.motiezw.com/cover/773/1324849.jpg"}, {"title_hant": "出包王女 5", "title_zh": "出包王女 5", "cover_id": 1325039, "first_chap_id": 60740, "cover_url": "https://i.motiezw.com/cover/773/1325039.jpg"}, {"title_hant": "出包王女 6", "title_zh": "出包王女 6", "cover_id": 1325231, "first_chap_id": 60751, "cover_url": "https://i.motiezw.com/cover/773/1325231.jpg"}, {"title_hant": "出包王女 7", "title_zh": "出包王女 7", "cover_id": 1325425, "first_chap_id": 60760, "cover_url": "https://i.motiezw.com/cover/773/1325425.jpg"}, {"title_hant": "出包王女 8", "title_zh": "出包王女 8", "cover_id": 1325617, "first_chap_id": 60771, "cover_url": "https://i.motiezw.com/cover/773/1325617.jpg"}, {"title_hant": "出包王女 9", "title_zh": "出包王女 9", "cover_id": 1325809, "first_chap_id": 60781, "cover_url": "https://i.motiezw.com/cover/773/1325809.jpg"}, {"title_hant": "出包王女 10", "title_zh": "出包王女 10", "cover_id": 1326001, "first_chap_id": 60791, "cover_url": "https://i.motiezw.com/cover/773/1326001.jpg"}, {"title_hant": "出包王女 11", "title_zh": "出包王女 11", "cover_id": 1326191, "first_chap_id": 60802, "cover_url": "https://i.motiezw.com/cover/773/1326191.jpg"}, {"title_hant": "出包王女 12", "title_zh": "出包王女 12", "cover_id": 1326383, "first_chap_id": 60813, "cover_url": "https://i.motiezw.com/cover/773/1326383.jpg"}], "chapters": [{"cid": "60702", "title": "第TROUBLE1 從天而降的少N", "title_zh": "第TROUBLE1 从天而降的少N"}, {"cid": "60703", "title": "第TROUBLE2 愛的大逃T", "title_zh": "第TROUBLE2 爱的大逃T"}, {"cid": "60704", "title": "第TROUBLE3 從銀河而來的使者", "title_zh": "第TROUBLE3 从银河而来的使者"}, {"cid": "60705", "title": "第TROUBLE4 放學後的記憶", "title_zh": "第TROUBLE4 放学后的记忆"}, {"cid": "60706", "title": "第TROUBLE5 抹殺", "title_zh": "第TROUBLE5 抹杀"}, {"cid": "60707", "title": "第TROUBLE6 成為標的的少N", "title_zh": "第TROUBLE6 成为标的的少N"}, {"cid": "60708", "title": "第TROUBLE7 外星來的入侵者", "title_zh": "第TROUBLE7 外星来的入侵者"}, {"cid": "60710", "title": "第TROUBLE8 真實的模樣", "title_zh": "第TROUBLE8 真实的模样"}, {"cid": "60711", "title": "第TROUBLE9 購物大慌亂", "title_zh": "第TROUBLE9 购物大慌乱"}, {"cid": "60712", "title": "第TROUBLE10 再度告白", "title_zh": "第TROUBLE10 再度告白"}, {"cid": "60713", "title": "第TROUBLE11 工作室等於戰場?", "title_zh": "第TROUBLE11 工作室等于战场?"}, {"cid": "60714", "title": "第TROUBLE12 盛夏的救助隊", "title_zh": "第TROUBLE12 盛夏的救助队"}, {"cid": "60715", "title": "第TROUBLE13 藏在水族箱裡的戀望", "title_zh": "第TROUBLE13 藏在水族箱里的恋望"}, {"cid": "60716", "title": "第TROUBLE14 腳踏車大暴走", "title_zh": "第TROUBLE14 脚踏车大暴走"}, {"cid": "60717", "title": "第TROUBLE15 心跳不已、煙霧繚繞的旅行", "title_zh": "第TROUBLE15 心跳不已、烟雾缭绕的旅行"}, {"cid": "60718", "title": "第TROUBLE16 命運的試膽大會", "title_zh": "第TROUBLE16 命运的试胆大会"}, {"cid": "60720", "title": "第TROUBLE17 沙灘愛的故事", "title_zh": "第TROUBLE17 沙滩爱的故事"}, {"cid": "60721", "title": "第TROUBLE18 突擊!秘密樂園", "title_zh": "第TROUBLE18 突击!秘密乐园"}, {"cid": "60722", "title": "第TROUBLE19 喜歡的人", "title_zh": "第TROUBLE19 喜欢的人"}, {"cid": "60723", "title": "第TROUBLE20 呼喚風暴的轉學生", "title_zh": "第TROUBLE20 呼唤风暴的转学生"}, {"cid": "60724", "title": "第TROUBLE21 目擊", "title_zh": "第TROUBLE21 目击"}, {"cid": "60726", "title": "第TROUBLE23 懵懂男闖關", "title_zh": "第TROUBLE23 懵懂男闯关"}, {"cid": "60727", "title": "第TROUBLE24 動物裝的時代來了?", "title_zh": "第TROUBLE24 动物装的时代来了?"}, {"cid": "60728", "title": "第TROUBLE25 大王的YH", "title_zh": "第TROUBLE25 大王的YH"}, {"cid": "60730", "title": "第TROUBLE26 彩南祭大災難", "title_zh": "第TROUBLE26 彩南祭大灾难"}, {"cid": "60731", "title": "第TROUBLE27 梨鬥漫長的一天", "title_zh": "第TROUBLE27 梨斗漫长的一天"}, {"cid": "60732", "title": "第TROUBLE28 恐怖的發明品", "title_zh": "第TROUBLE28 恐怖的发明品"}, {"cid": "60733", "title": "第TROUBLE29 小小的的大冒險", "title_zh": "第TROUBLE29 小小的的大冒险"}, {"cid": "60734", "title": "第TROUBLE30 N生要有淑N的樣子", "title_zh": "第TROUBLE30 N生要有淑N的样子"}, {"cid": "60735", "title": "第TROUBLE31 別生氣啦", "title_zh": "第TROUBLE31 别生气啦"}, {"cid": "60736", "title": "第TROUBLE32 想要知道更多", "title_zh": "第TROUBLE32 想要知道更多"}, {"cid": "60737", "title": "第TROUBLE33 禮物爭奪戰", "title_zh": "第TROUBLE33 礼物争夺战"}, {"cid": "60738", "title": "第TROUBLE34 重裝聖誕節", "title_zh": "第TROUBLE34 重装圣诞节"}, {"cid": "60740", "title": "第TROUBLE35 金S闇影", "title_zh": "第TROUBLE35 金S暗影"}, {"cid": "60741", "title": "第TROUBLE36 闇的實力", "title_zh": "第TROUBLE36 暗的实力"}, {"cid": "60742", "title": "第TROUBLE37 公主VS殺手", "title_zh": "第TROUBLE37 公主VS杀手"}, {"cid": "60743", "title": "第TROUBLE38 黑暗悄散?", "title_zh": "第TROUBLE38 黑暗悄散?"}, {"cid": "60744", "title": "第TROUBLE39 滑溜溜的變化", "title_zh": "第TROUBLE39 滑溜溜的变化"}, {"cid": "60745", "title": "第TROUBLE40 凶惡Q人節", "title_zh": "第TROUBLE40 凶恶Q人节"}, {"cid": "60746", "title": "第TROUBLE41 巧克力與大混亂", "title_zh": "第TROUBLE41 巧克力与大混乱"}, {"cid": "60747", "title": "第TROUBLE42 告白", "title_zh": "第TROUBLE42 告白"}, {"cid": "60748", "title": "第TROUBLE43 M好的生活", "title_zh": "第TROUBLE43 M好的生活"}, {"cid": "60751", "title": "第TROUBLE45 地下醫院", "title_zh": "第TROUBLE45 地下医院"}, {"cid": "60752", "title": "第TROUBLE46 生日♡大驚喜", "title_zh": "第TROUBLE46 生日♡大惊喜"}, {"cid": "60753", "title": "第TROUBLE47 暴走小鬼", "title_zh": "第TROUBLE47 暴走小鬼"}, {"cid": "60754", "title": "第TROUBLE48 決心", "title_zh": "第TROUBLE48 决心"}, {"cid": "60755", "title": "第TROUBLE49 從這裡開始", "title_zh": "第TROUBLE49 从这里开始"}, {"cid": "60756", "title": "第TROUBLE50 史上最惡劣班級", "title_zh": "第TROUBLE50 史上最恶劣班级"}, {"cid": "60757", "title": "第TROUBLE51 悻感拉票戰", "title_zh": "第TROUBLE51 悻感拉票战"}, {"cid": "60758", "title": "第TROUBLE52 最強萬人迷", "title_zh": "第TROUBLE52 最强万人迷"}, {"cid": "60760", "title": "第TROUBLE53 春菜喜歡的人", "title_zh": "第TROUBLE53 春菜喜欢的人"}, {"cid": "60761", "title": "第TROUBLE54 歡迎來到結城家", "title_zh": "第TROUBLE54 欢迎来到结城家"}, {"cid": "60762", "title": "第TROUBLE55 潛入!舊校舍", "title_zh": "第TROUBLE55 潜入!旧校舍"}, {"cid": "60763", "title": "第TROUBLE56 緊迫而來的恐怖", "title_zh": "第TROUBLE56 紧迫而来的恐怖"}, {"cid": "60764", "title": "第TROUBLE57 舊校舍的居民", "title_zh": "第TROUBLE57 旧校舍的居民"}, {"cid": "60765", "title": "第TROUBLE58 意外的結局", "title_zh": "第TROUBLE58 意外的结局"}, {"cid": "60766", "title": "第TROUBLE59 大王戀愛", "title_zh": "第TROUBLE59 大王恋爱"}, {"cid": "60767", "title": "第TROUBLE60 好辛苦啊", "title_zh": "第TROUBLE60 好辛苦啊"}, {"cid": "60768", "title": "第TROUBLE61 小闇服裝扮", "title_zh": "第TROUBLE61 小暗服装扮"}, {"cid": "60769", "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>