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-988", "mangaid": "988", "zh_title": "浑身是胆", "hant_title": "渾身是膽", "en_title": "浑身是胆 (Bilimanga #988)", "author": "村上纪香", "tags": ["热血", "竞技", "战斗热血", "日本漫画", "漫画", "日漫", "连载漫画"], "zh_desc": "启动油门……这一瞬间骑士成为一阵风!\n\r\n比谁都快,姿势比任何人都优美,只是一个劲地朝向终点……\n\r\n既然要参加就不可以输!\n\r\n一文字慧15岁,现在驾驶RC125,加足油门往摩托车越野赛折线前进!\n\n📚 作品信息:作者 村上纪香 · 评分 10 · 共收录 13 卷 / 120 话章节目录与高清彩页/条漫预览。", "hant_desc": "啓動油門……這一瞬間騎士成爲一陣風!\n\r\n比誰都快,姿勢比任何人都優美,只是一個勁地朝向終點……\n\r\n既然要參加就不可以輸!\n\r\n一文字慧15歲,現在駕駛RC125,加足油門往摩托車越野賽折綫前進!\n\n📚 作品資訊:作者 村上紀香 · 評分 10 · 共收錄 13 卷 / 120 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '浑身是胆' (渾身是膽) by 村上纪香. Includes 13 volumes and 120 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-988/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-988/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-988/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-988/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-988/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-988/page_06.jpg"], "volumes": [{"title_hant": "渾身是膽 1", "title_zh": "浑身是胆 1", "cover_id": 1733871, "first_chap_id": 80080, "cover_url": "https://i.motiezw.com/cover/988/1733871.jpg"}, {"title_hant": "渾身是膽 2", "title_zh": "浑身是胆 2", "cover_id": 1734045, "first_chap_id": 80088, "cover_url": "https://i.motiezw.com/cover/988/1734045.jpg"}, {"title_hant": "渾身是膽 3", "title_zh": "浑身是胆 3", "cover_id": 1734234, "first_chap_id": 80099, "cover_url": "https://i.motiezw.com/cover/988/1734234.jpg"}, {"title_hant": "渾身是膽 4", "title_zh": "浑身是胆 4", "cover_id": 1734418, "first_chap_id": 80110, "cover_url": "https://i.motiezw.com/cover/988/1734418.jpg"}, {"title_hant": "渾身是膽 5", "title_zh": "浑身是胆 5", "cover_id": 1734598, "first_chap_id": 80119, "cover_url": "https://i.motiezw.com/cover/988/1734598.jpg"}, {"title_hant": "渾身是膽 6", "title_zh": "浑身是胆 6", "cover_id": 1734778, "first_chap_id": 80130, "cover_url": "https://i.motiezw.com/cover/988/1734778.jpg"}, {"title_hant": "渾身是膽 7", "title_zh": "浑身是胆 7", "cover_id": 1734961, "first_chap_id": 80141, "cover_url": "https://i.motiezw.com/cover/988/1734961.jpg"}, {"title_hant": "渾身是膽 8", "title_zh": "浑身是胆 8", "cover_id": 1735140, "first_chap_id": 80152, "cover_url": "https://i.motiezw.com/cover/988/1735140.jpg"}, {"title_hant": "渾身是膽 9", "title_zh": "浑身是胆 9", "cover_id": 1735324, "first_chap_id": 80163, "cover_url": "https://i.motiezw.com/cover/988/1735324.jpg"}, {"title_hant": "渾身是膽 10", "title_zh": "浑身是胆 10", "cover_id": 1735503, "first_chap_id": 80174, "cover_url": "https://i.motiezw.com/cover/988/1735503.jpg"}, {"title_hant": "渾身是膽 11", "title_zh": "浑身是胆 11", "cover_id": 1735688, "first_chap_id": 80185, "cover_url": "https://i.motiezw.com/cover/988/1735688.jpg"}, {"title_hant": "渾身是膽 12", "title_zh": "浑身是胆 12", "cover_id": 1735870, "first_chap_id": 80196, "cover_url": "https://i.motiezw.com/cover/988/1735870.jpg"}], "chapters": [{"cid": "80080", "title": "第一文字慧出發", "title_zh": "第一文字慧出发"}, {"cid": "80081", "title": "第榴槤隊", "title_zh": "第榴梿队"}, {"cid": "80082", "title": "第信號燈", "title_zh": "第信号灯"}, {"cid": "80083", "title": "第咆哮的機車", "title_zh": "第咆哮的机车"}, {"cid": "80084", "title": "第瞄準急轉彎", "title_zh": "第瞄准急转弯"}, {"cid": "80085", "title": "第無敵的越野車", "title_zh": "第无敌的越野车"}, {"cid": "80086", "title": "第命運的邂逅", "title_zh": "第命运的邂逅"}, {"cid": "80088", "title": "第驚天動地的傳聞", "title_zh": "第惊天动地的传闻"}, {"cid": "80089", "title": "第先下手為強", "title_zh": "第先下手为强"}, {"cid": "80090", "title": "第排除妨礙者", "title_zh": "第排除妨碍者"}, {"cid": "80091", "title": "第抱著必死的決心", "title_zh": "第抱著必死的决心"}, {"cid": "80092", "title": "第完全不服輸的志氣", "title_zh": "第完全不服输的志气"}, {"cid": "80093", "title": "第摩托車越野賽一直線", "title_zh": "第摩托车越野赛一直线"}, {"cid": "80094", "title": "第非正式比賽", "title_zh": "第非正式比赛"}, {"cid": "80095", "title": "第突然全開", "title_zh": "第突然全开"}, {"cid": "80096", "title": "第打垮火少年", "title_zh": "第打垮火少年"}, {"cid": "80097", "title": "第心跳的瞬間", "title_zh": "第心跳的瞬间"}, {"cid": "80099", "title": "第憤怒的外跑道", "title_zh": "第愤怒的外跑道"}, {"cid": "80100", "title": "第激烈的4連跳", "title_zh": "第激烈的4连跳"}, {"cid": "80101", "title": "最後的骨氣", "title_zh": "最后的骨气"}, {"cid": "80102", "title": "第目標是世界冠軍", "title_zh": "第目标是世界冠军"}, {"cid": "80104", "title": "第取得駕照", "title_zh": "第取得驾照"}, {"cid": "80105", "title": "第勁敵出現", "title_zh": "第劲敌出现"}, {"cid": "80106", "title": "第強敵傑夫•亞尼摩斯", "title_zh": "第强敌杰夫•亚尼摩斯"}, {"cid": "80107", "title": "第顯露鬥志", "title_zh": "第显露斗志"}, {"cid": "80108", "title": "第雨中的預賽", "title_zh": "第雨中的预赛"}, {"cid": "80110", "title": "第傑夫猛烈追逐", "title_zh": "第杰夫猛烈追逐"}, {"cid": "80111", "title": "第MX是格鬥技", "title_zh": "第MX是格斗技"}, {"cid": "80112", "title": "第再度單挑", "title_zh": "第再度单挑"}, {"cid": "80113", "title": "第高速度跑", "title_zh": "第高速度跑"}, {"cid": "80114", "title": "第同時到達終點", "title_zh": "第同时到达终点"}, {"cid": "80115", "title": "第勝負現在才剛開始", "title_zh": "第胜负现在才刚开始"}, {"cid": "80116", "title": "第追逐幻影", "title_zh": "第追逐幻影"}, {"cid": "80117", "title": "特別的日子", "title_zh": "特别的日子"}, {"cid": "80119", "title": "第連夜趕往鈴鹿", "title_zh": "第连夜赶往铃鹿"}, {"cid": "80120", "title": "第不必客氣", "title_zh": "第不必客气"}, {"cid": "80121", "title": "第日本大獎賽開幕", "title_zh": "第日本大奖赛开幕"}, {"cid": "80122", "title": "第哭泣!預賽落選", "title_zh": "第哭泣!预赛落选"}, {"cid": "80123", "title": "第一切都看250CC決賽", "title_zh": "第一切都看250CC决赛"}, {"cid": "80124", "title": "第15分又2圈", "title_zh": "第15分又2圈"}, {"cid": "80125", "title": "第突然接近領先", "title_zh": "第突然接近领先"}, {"cid": "80126", "title": "第極限!同時到達終點", "title_zh": "第极限!同时到达终点"}, {"cid": "80127", "title": "第剩下一圈", "title_zh": "第剩下一圈"}, {"cid": "80130", "title": "第遙遠的方格花紋旗", "title_zh": "第遥远的方格花纹旗"}, {"cid": "80131", "title": "第眞正的勁敵", "title_zh": "第真正的劲敌"}, {"cid": "80132", "title": "第新技師一桐生純", "title_zh": "第新技师一桐生纯"}, {"cid": "80133", "title": "第向國際B級挑戰", "title_zh": "第向国际B级挑战"}, {"cid": "80134", "title": "第再追過一個!固定號碼4號", "title_zh": "第再追过一个!固定号码4号"}, {"cid": "80135", "title": "第數10秒的修理", "title_zh": "第数10秒的修理"}, {"cid": "80136", "title": "第騎手與機車的羈絆", "title_zh": "第骑手与机车的羁绊"}, {"cid": "80137", "title": "第雪中的初次比賽", "title_zh": "第雪中的初次比赛"}, {"cid": "80138", "title": "第超級的搭擋", "title_zh": "第超级的搭挡"}, {"cid": "80139", "title": "第從倒數第一名重新出發", "title_zh": "第从倒数第一名重新出发"}, {"cid": "80141", "title": "第瞄準洞口射擊", "title_zh": "第瞄准洞口射击"}, {"cid": "80142", "title": "第夢幻的行駛線", "title_zh": "第梦幻的行驶线"}, {"cid": "80143", "title": "第還剩最後一圈!", "title_zh": "第还剩最后一圈!"}, {"cid": "80144", "title": "第一對一的比賽", "title_zh": "第一对一的比赛"}, {"cid": "80145", "title": "第再度衝向極限", "title_zh": "第再度冲向极限"}, {"cid": "80146", "title": "第完全燃燒!風馳電掣!", "title_zh": "第完全燃烧!风驰电掣!"}, {"cid": "80147", "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>