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-1471", "mangaid": "1471", "zh_title": "工作细菌", "hant_title": "工作細菌", "en_title": "工作细菌 (Bilimanga #1471)", "author": "吉田春幸 / 清水茜", "tags": ["脑洞", "战斗", "职场", "欢乐", "群像", "奇异幻想", "日本漫画", "漫画"], "zh_desc": "人体肠道内有各式各样的益菌、害菌、伺机菌(伺机性感染菌)。比菲德氏菌等益菌喜欢寡糖与食物纤维,会产生醋酸对抗害菌;产气荚膜梭菌等害菌会分解动物性蛋白质,产生对身体不好的物质及臭味气体,经由肠道排出放屁。因此肉吃太多会导致放屁变臭,食物纤维摄取不足将会导致便秘。\n\n📚 作品信息:作者 吉田春幸 / 清水茜 · 评分 10 · 共收录 7 卷 / 59 话章节目录与高清彩页/条漫预览。", "hant_desc": "人體腸道內有各式各樣的益菌、害菌、伺機菌(伺機性感染菌)。比菲德氏菌等益菌喜歡寡糖與食物纖維,會產生醋酸對抗害菌;產氣莢膜梭菌等害菌會分解動物性蛋白質,產生對身體不好的物質及臭味氣體,經由腸道排出放屁。因此肉吃太多會導致放屁變臭,食物纖維攝取不足將會導致便秘。\n\n📚 作品資訊:作者 吉田春幸 / 清水茜 · 評分 10 · 共收錄 7 卷 / 59 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '工作细菌' (工作細菌) by 吉田春幸 / 清水茜. Includes 7 volumes and 59 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1471/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1471/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1471/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1471/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1471/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1471/page_06.jpg"], "volumes": [{"title_hant": "工作細菌 1", "title_zh": "工作细菌 1", "cover_id": 2668672, "first_chap_id": 122359, "cover_url": "https://i.motiezw.com/cover/1471/2668672.jpg"}, {"title_hant": "工作細菌 2", "title_zh": "工作细菌 2", "cover_id": 2668831, "first_chap_id": 122371, "cover_url": "https://i.motiezw.com/cover/1471/2668831.jpg"}, {"title_hant": "工作細菌 3", "title_zh": "工作细菌 3", "cover_id": 2668976, "first_chap_id": 122380, "cover_url": "https://i.motiezw.com/cover/1471/2668976.jpg"}, {"title_hant": "工作細菌 4", "title_zh": "工作细菌 4", "cover_id": 2669119, "first_chap_id": 122389, "cover_url": "https://i.motiezw.com/cover/1471/2669119.jpg"}, {"title_hant": "工作細菌 5", "title_zh": "工作细菌 5", "cover_id": 2669262, "first_chap_id": 122398, "cover_url": "https://i.motiezw.com/cover/1471/2669262.jpg"}, {"title_hant": "工作細菌 6", "title_zh": "工作细菌 6", "cover_id": 2669405, "first_chap_id": 122408, "cover_url": "https://i.motiezw.com/cover/1471/2669405.jpg"}, {"title_hant": "工作細菌 7", "title_zh": "工作细菌 7", "cover_id": 2669550, "first_chap_id": 122417, "cover_url": "https://i.motiezw.com/cover/1471/2669550.jpg"}], "chapters": [{"cid": "122359", "title": "出來吧,臭屁!細菌對抗 搶陣地大戰!", "title_zh": "出来吧,臭屁!细菌对抗 抢阵地大战!"}, {"cid": "122360", "title": "食物纖維來了!益菌的逆襲!", "title_zh": "食物纤维来了!益菌的逆袭!"}, {"cid": "122361", "title": "陣地的邊界 小小的邂逅", "title_zh": "阵地的边界 小小的邂逅"}, {"cid": "122362", "title": "便秘要怎麼辦啊?比菲德氏菌的苦惱!", "title_zh": "便秘要怎么办啊?比菲德氏菌的苦恼!"}, {"cid": "122363", "title": "腸道內最多的細菌就是我!擬桿菌", "title_zh": "肠道内最多的细菌就是我!拟杆菌"}, {"cid": "122364", "title": "不要光看名字就下定論!大腸桿菌的吶喊", "title_zh": "不要光看名字就下定论!大肠杆菌的呐喊"}, {"cid": "122365", "title": "我想讓大家精神百倍!汝酸桿菌", "title_zh": "我想让大家精神百倍!汝酸杆菌"}, {"cid": "122366", "title": "皮膚乾燥危機!表皮葡萄球菌vs.金黃S葡萄球菌", "title_zh": "皮肤干燥危机!表皮葡萄球菌vs.金黄S葡萄球菌"}, {"cid": "122367", "title": "我住在你的皮膚上★馬拉S菌", "title_zh": "我住在你的皮肤上★马拉S菌"}, {"cid": "122368", "title": "登場★放在食物上!納豆菌", "title_zh": "登场★放在食物上!纳豆菌"}, {"cid": "122369", "title": "腸道毀滅危機!沙門氏菌(前篇)", "title_zh": "肠道毁灭危机!沙门氏菌(前篇)"}, {"cid": "122371", "title": "腸道毀滅危機!沙門氏菌(後篇)", "title_zh": "肠道毁灭危机!沙门氏菌(后篇)"}, {"cid": "122372", "title": "打造壯觀的蛀牙吧★齲齒菌工作小隊", "title_zh": "打造壮观的蛀牙吧★龋齿菌工作小队"}, {"cid": "122373", "title": "在腸道裡做什麼?優格裡的細菌", "title_zh": "在肠道里做什么?优格里的细菌"}, {"cid": "122374", "title": "青春痘的成因 痤瘡桿菌!", "title_zh": "青春痘的成因 痤疮杆菌!"}, {"cid": "122375", "title": "跟禸一起⋯呵呵呵♡麴菌", "title_zh": "跟禸一起⋯呵呵呵♡曲菌"}, {"cid": "122376", "title": "好、好臭!這個毛茸茸的細菌是什麼!", "title_zh": "好、好臭!这个毛茸茸的细菌是什么!"}, {"cid": "122377", "title": "口腔中一定會有!牙周病菌", "title_zh": "口腔中一定会有!牙周病菌"}, {"cid": "122378", "title": "好、好、好癢!皮癬菌", "title_zh": "好、好、好痒!皮癣菌"}, {"cid": "122380", "title": "在我面前下跪吧。O157", "title_zh": "在我面前下跪吧。O157"}, {"cid": "122381", "title": "與蔬菜一同進入腸道!酪酸菌", "title_zh": "与蔬菜一同进入肠道!酪酸菌"}, {"cid": "122383", "title": "害菌是為了什麼而存在⋯?金黃S葡萄球菌的苦惱", "title_zh": "害菌是为了什么而存在⋯?金黄S葡萄球菌的苦恼"}, {"cid": "122384", "title": "明明有保養,肌膚卻仍然乾燥⋯原因在於腸道!", "title_zh": "明明有保养,肌肤却仍然干燥⋯原因在于肠道!"}, {"cid": "122385", "title": "STOP!別忍著不上廁所!", "title_zh": "STOP!别忍著不上厕所!"}, {"cid": "122386", "title": "如果過著不吃禸的生活⋯?營養素與腸道", "title_zh": "如果过著不吃禸的生活⋯?营养素与肠道"}, {"cid": "122387", "title": "眼睛也要注意!激烈的戰鬥,針眼", "title_zh": "眼睛也要注意!激烈的战斗,针眼"}, {"cid": "122389", "title": "冰淇淋!冰塊!雪酪!那時候你的腸道是!", "title_zh": "冰淇淋!冰块!雪酪!那时候你的肠道是!"}, {"cid": "122390", "title": "享受M甲的樂趣♪在那指甲上⋯?綠膿桿菌", "title_zh": "享受M甲的乐趣♪在那指甲上⋯?绿脓杆菌"}, {"cid": "122391", "title": "我們最強大♥味噌隊!", "title_zh": "我们最强大♥味噌队!"}, {"cid": "122392", "title": "得想辦法解決!乾燥的嘴唇", "title_zh": "得想办法解决!干燥的嘴唇"}, {"cid": "122393", "title": "從嬰兒時期就跟著你", "title_zh": "从婴儿时期就跟著你"}, {"cid": "122394", "title": "嘴巴好臭!原因是?", "title_zh": "嘴巴好臭!原因是?"}, {"cid": "122395", "title": "隱藏在綠茶裡的神秘力量是!", "title_zh": "隐藏在绿茶里的神秘力量是!"}, {"cid": "122396", "title": "番外篇 13頁就能懂!『工作細菌』", "title_zh": "番外篇 13页就能懂!『工作细菌』"}, {"cid": "122398", "title": "天使還是惡魔!擬桿菌的日常", "title_zh": "天使还是恶魔!拟杆菌的日常"}, {"cid": "122399", "title": "必看!正確的洗手方式", "title_zh": "必看!正确的洗手方式"}, {"cid": "122400", "title": "在手指上冒出來!疣!", "title_zh": "在手指上冒出来!疣!"}, {"cid": "122401", "title": "得多喝水才行⋯危險!腸道與水分攝取不足", "title_zh": "得多喝水才行⋯危险!肠道与水分摄取不足"}, {"cid": "122402", "title": "好想改善!剛睡醒時嘴裡的不舒服感!", "title_zh": "好想改善!刚睡醒时嘴里的不舒服感!"}, {"cid": "122403", "title": "保養腋下很重要!狐臭菌", "title_zh": "保养腋下很重要!狐臭菌"}, {"cid": "122404", "title": "為什麼會長?紅S青春痘!", "title_zh": "为什么会长?红S青春痘!"}, {"cid": "122405", "title": "我們的隊長", "title_zh": "我们的队长"}, {"cid": "122408", "title": "慢慢入侵的日曬!那個時候,肌膚會!", "title_zh": "慢慢入侵的日晒!那个时候,肌肤会!"}, {"cid": "122409", "title": "恐怖!諾羅病毒!", "title_zh": "恐怖!诺罗病毒!"}, {"cid": "122410", "title": "迫切的大問題!對指甲的紛爭充滿興趣!", "title_zh": "迫切的大问题!对指甲的纷争充满兴趣!"}, {"cid": "122411", "title": "害菌大爆衝!這種地方竟然是演唱會的會場!", "title_zh": "害菌大爆冲!这种地方竟然是演唱会的会场!"}, {"cid": "122412", "title": "笨拙的那傢伙", "title_zh": "笨拙的那家伙"}, {"cid": "122413", "title": "M腿的推薦!肌膚保養,只有臉是不夠的★", "title_zh": "M腿的推荐!肌肤保养,只有脸是不够的★"}, {"cid": "122414", "title": "為宿主的笑容加油打氣的汝酸桿菌", "title_zh": "为宿主的笑容加油打气的汝酸杆菌"}, {"cid": "122415", "title": "更加努力工作細菌", "title_zh": "更加努力工作细菌"}, {"cid": "122417", "title": "益菌成雙一起來!", "title_zh": "益菌成双一起来!"}, {"cid": "122418", "title": "不是只有細菌!你所不知道的病毒的世界", "title_zh": "不是只有细菌!你所不知道的病毒的世界"}, {"cid": "122419", "title": "顯現宿主生活的一切,腸道環境的故事", "title_zh": "显现宿主生活的一切,肠道环境的故事"}, {"cid": "122420", "title": "宿主一點點的破綻就引起暴風雨與大繁殖的故事", "title_zh": "宿主一点点的破绽就引起暴风雨与大繁殖的故事"}, {"cid": "122421", "title": "立志刷新世界新紀錄!金黃S葡萄球菌", "title_zh": "立志刷新世界新纪录!金黄S葡萄球菌"}, {"cid": "122422", "title": "菁英的憂鬱!溶血悻鏈球菌", "title_zh": "菁英的忧郁!溶血悻链球菌"}, {"cid": "122423", "title": "體內某處的秘密樂園", "title_zh": "体内某处的秘密乐园"}, {"cid": "122424", "title": "工作細菌(前篇)", "title_zh": "工作细菌(前篇)"}, {"cid": "122425", "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>