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-1479", "mangaid": "1479", "zh_title": "爆漫王。 爱藏版", "hant_title": "爆漫王。 愛藏版", "en_title": "爆漫王。 爱藏版 (Bilimanga #1479)", "author": "小畑健 / 大场鶫", "tags": ["职场", "励志", "青春", "群像", "宅系", "职场都市", "日本漫画", "漫画"], "zh_desc": "为了追求只有极少数的人才能得到的光荣,两人决定步上艰难崎岖的「漫画路」。有高度画功的真城最高,与以文才见长的高木秋人搭档合作,创造新的漫画传说!新时代成功物语开始!!\n\n📚 作品信息:作者 小畑健 / 大场鶫 · 评分 10 · 共收录 12 卷 / 172 话章节目录与高清彩页/条漫预览。", "hant_desc": "為了追求只有極少數的人才能得到的光榮,兩人決定步上艱難崎嶇的「漫畫路」。有高度畫功的真城最高,與以文才見長的高木秋人搭檔合作,創造新的漫畫傳說!新時代成功物語開始!!\n\n📚 作品資訊:作者 小畑健 / 大場鶫 · 評分 10 · 共收錄 12 卷 / 172 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '爆漫王。 爱藏版' (爆漫王。 愛藏版) by 小畑健 / 大场鶫. Includes 12 volumes and 172 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1479/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1479/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1479/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1479/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1479/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1479/page_06.jpg"], "volumes": [{"title_hant": "爆漫王。 愛藏版 1", "title_zh": "爆漫王。 爱藏版 1", "cover_id": 2684914, "first_chap_id": 123097, "cover_url": "https://i.motiezw.com/cover/1479/2684914.jpg"}, {"title_hant": "爆漫王。 愛藏版 2", "title_zh": "爆漫王。 爱藏版 2", "cover_id": 2685225, "first_chap_id": 123110, "cover_url": "https://i.motiezw.com/cover/1479/2685225.jpg"}, {"title_hant": "爆漫王。 愛藏版 3", "title_zh": "爆漫王。 爱藏版 3", "cover_id": 2685539, "first_chap_id": 123126, "cover_url": "https://i.motiezw.com/cover/1479/2685539.jpg"}, {"title_hant": "爆漫王。 愛藏版 4", "title_zh": "爆漫王。 爱藏版 4", "cover_id": 2685857, "first_chap_id": 123142, "cover_url": "https://i.motiezw.com/cover/1479/2685857.jpg"}, {"title_hant": "爆漫王。 愛藏版 5", "title_zh": "爆漫王。 爱藏版 5", "cover_id": 2686170, "first_chap_id": 123158, "cover_url": "https://i.motiezw.com/cover/1479/2686170.jpg"}, {"title_hant": "爆漫王。 愛藏版 6", "title_zh": "爆漫王。 爱藏版 6", "cover_id": 2686661, "first_chap_id": 123178, "cover_url": "https://i.motiezw.com/cover/1479/2686661.jpg"}, {"title_hant": "爆漫王。 愛藏版 7", "title_zh": "爆漫王。 爱藏版 7", "cover_id": 2686993, "first_chap_id": 123195, "cover_url": "https://i.motiezw.com/cover/1479/2686993.jpg"}, {"title_hant": "爆漫王。 愛藏版 8", "title_zh": "爆漫王。 爱藏版 8", "cover_id": 2687324, "first_chap_id": 123212, "cover_url": "https://i.motiezw.com/cover/1479/2687324.jpg"}, {"title_hant": "爆漫王。 愛藏版 9", "title_zh": "爆漫王。 爱藏版 9", "cover_id": 2687646, "first_chap_id": 123228, "cover_url": "https://i.motiezw.com/cover/1479/2687646.jpg"}, {"title_hant": "爆漫王。 愛藏版 10", "title_zh": "爆漫王。 爱藏版 10", "cover_id": 2687960, "first_chap_id": 123244, "cover_url": "https://i.motiezw.com/cover/1479/2687960.jpg"}, {"title_hant": "爆漫王。 愛藏版 11", "title_zh": "爆漫王。 爱藏版 11", "cover_id": 2688274, "first_chap_id": 123260, "cover_url": "https://i.motiezw.com/cover/1479/2688274.jpg"}, {"title_hant": "爆漫王。 愛藏版 12", "title_zh": "爆漫王。 爱藏版 12", "cover_id": 2688587, "first_chap_id": 123276, "cover_url": "https://i.motiezw.com/cover/1479/2688587.jpg"}], "chapters": [{"cid": "123097", "title": "第1頁 夢想與現實", "title_zh": "第1页 梦想与现实"}, {"cid": "123098", "title": "第2頁 傻瓜和聰明人", "title_zh": "第2页 傻瓜和聪明人"}, {"cid": "123099", "title": "第3頁 筆與分鏡稿", "title_zh": "第3页 笔与分镜稿"}, {"cid": "123100", "title": "第4頁 親與子", "title_zh": "第4页 亲与子"}, {"cid": "123101", "title": "第5頁 時間與鑰匙", "title_zh": "第5页 时间与钥匙"}, {"cid": "123102", "title": "第6頁 最好與最壞", "title_zh": "第6页 最好与最坏"}, {"cid": "123103", "title": "第7頁 笑容和害羞臉紅", "title_zh": "第7页 笑容和害羞脸红"}, {"cid": "123104", "title": "第8頁 糖果與鞭子", "title_zh": "第8页 糖果与鞭子"}, {"cid": "123105", "title": "第9頁 條件與前往東京", "title_zh": "第9页 条件与前往东京"}, {"cid": "123106", "title": "第10頁 不安與期待", "title_zh": "第10页 不安与期待"}, {"cid": "123107", "title": "第11頁 後悔與信服", "title_zh": "第11页 后悔与信服"}, {"cid": "123108", "title": "第12頁 10與2", "title_zh": "第12页 10与2"}, {"cid": "123110", "title": "第13頁 巧克力與赤丸JUMP", "title_zh": "第13页 巧克力与赤丸JUMP"}, {"cid": "123111", "title": "第14頁 M食與畢業", "title_zh": "第14页 M食与毕业"}, {"cid": "123112", "title": "第15頁 傳送與回覆", "title_zh": "第15页 传送与回复"}, {"cid": "123113", "title": "第16頁 速報與小正", "title_zh": "第16页 速报与小正"}, {"cid": "123114", "title": "第17頁 戰鬥與臨摹", "title_zh": "第17页 战斗与临摹"}, {"cid": "123115", "title": "第18頁 對手與朋友", "title_zh": "第18页 对手与朋友"}, {"cid": "123116", "title": "第19頁 出道與心急", "title_zh": "第19页 出道与心急"}, {"cid": "123117", "title": "第20頁 未來與樓梯", "title_zh": "第20页 未来与楼梯"}, {"cid": "123118", "title": "第21頁 障礙與溫", "title_zh": "第21页 障碍与温"}, {"cid": "123119", "title": "第22頁 妨礙與年輕", "title_zh": "第22页 妨碍与年轻"}, {"cid": "123121", "title": "第24頁 筆記本與角S", "title_zh": "第24页 笔记本与角S"}, {"cid": "123122", "title": "第25頁 嫉妒與愛", "title_zh": "第25页 嫉妒与爱"}, {"cid": "123123", "title": "第26頁 2個人與1個人", "title_zh": "第26页 2个人与1个人"}, {"cid": "123124", "title": "第27頁 策士與欺騙", "title_zh": "第27页 策士与欺骗"}, {"cid": "123126", "title": "第28頁 協助與條件", "title_zh": "第28页 协助与条件"}, {"cid": "123127", "title": "第29頁 文學與音樂", "title_zh": "第29页 文学与音乐"}, {"cid": "123128", "title": "第30頁 團結與決裂", "title_zh": "第30页 团结与决裂"}, {"cid": "123129", "title": "第31頁 星期二和星期五", "title_zh": "第31页 星期二和星期五"}, {"cid": "123130", "title": "第32頁 電話與前一晚", "title_zh": "第32页 电话与前一晚"}, {"cid": "123131", "title": "第33頁 納入與剔除", "title_zh": "第33页 纳入与剔除"}, {"cid": "123132", "title": "第34頁 追逐者與領先者", "title_zh": "第34页 追逐者与领先者"}, {"cid": "123133", "title": "第35頁 喜悅與落寞", "title_zh": "第35页 喜悦与落寞"}, {"cid": "123134", "title": "第36頁 沉默與宴會", "title_zh": "第36页 沉默与宴会"}, {"cid": "123135", "title": "第37頁 董事與壓軸", "title_zh": "第37页 董事与压轴"}, {"cid": "123136", "title": "第38頁 窗戶與雪", "title_zh": "第38页 窗户与雪"}, {"cid": "123137", "title": "第39頁 文集與寫真集", "title_zh": "第39页 文集与写真集"}, {"cid": "123138", "title": "第40頁 海與浮沉", "title_zh": "第40页 海与浮沉"}, {"cid": "123139", "title": "第41頁 幫忙出主意與忍耐", "title_zh": "第41页 帮忙出主意与忍耐"}, {"cid": "123140", "title": "第42頁 搞笑與台詞", "title_zh": "第42页 搞笑与台词"}, {"cid": "123142", "title": "第43頁 裝傻與消息", "title_zh": "第43页 装傻与消息"}, {"cid": "123143", "title": "第44頁 報恩與適得其反", "title_zh": "第44页 报恩与适得其反"}, {"cid": "123144", "title": "第45頁 生病與幹勁", "title_zh": "第45页 生病与干劲"}, {"cid": "123146", "title": "第47頁 矛盾與理由", "title_zh": "第47页 矛盾与理由"}, {"cid": "123147", "title": "第48頁 生死與靜止", "title_zh": "第48页 生死与静止"}, {"cid": "123148", "title": "第49頁 撤回與要求", "title_zh": "第49页 撤回与要求"}, {"cid": "123149", "title": "第50頁 貿然行動與堅持", "title_zh": "第50页 贸然行动与坚持"}, {"cid": "123150", "title": "第51頁 重返連載與低名次", "title_zh": "第51页 重返连载与低名次"}, {"cid": "123151", "title": "第52頁 感想與疾馳", "title_zh": "第52页 感想与疾驰"}, {"cid": "123152", "title": "第53頁 18與40", "title_zh": "第53页 18与40"}, {"cid": "123153", "title": "第54頁 搞笑與嚴肅", "title_zh": "第54页 搞笑与严肃"}, {"cid": "123154", "title": "第55頁 3格與3篇", "title_zh": "第55页 3格与3篇"}, {"cid": "123155", "title": "第56頁 成熟與幼稚", "title_zh": "第56页 成熟与幼稚"}, {"cid": "123156", "title": "第57頁 分配與平手", "title_zh": "第57页 分配与平手"}, {"cid": "123158", "title": "第58頁 一位數和兩位數", "title_zh": "第58页 一位数和两位数"}, {"cid": "123159", "title": "第59頁 經驗與資料", "title_zh": "第59页 经验与资料"}, {"cid": "123160", "title": "第60頁 男悻與N悻", "title_zh": "第60页 男悻与N悻"}, {"cid": "123161", "title": "第61頁 同盟與同班", "title_zh": "第61页 同盟与同班"}, {"cid": "123162", "title": "第62頁 小說與信", "title_zh": "第62页 小说与信"}]};
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>