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-1414", "mangaid": "1414", "zh_title": "排球少年", "hant_title": "排球少年", "en_title": "排球少年 (Bilimanga #1414)", "author": "古馆春一", "tags": ["竞技", "热血", "校园", "励志", "群像", "校园青春", "日本漫画", "漫画"], "zh_desc": "日向翔阳看了电视转播后,被排球的魅力所吸引,参加了国中第一场也是最后一场的正式比赛。然而,他彻底地败在别名「球场上的王者」的天才选手‧影山的手下。日向发誓报仇,考进乌野高中并加入排球社,看到国中的宿敌影山竟然考进同一所高中,遂向他挑战。结果虽然展现一点才能,可是两人的不和引发风波,惹恼了队长!\n\n📚 作品信息:作者 古馆春一 · 评分 10 · 共收录 45 卷 / 417 话章节目录与高清彩页/条漫预览。", "hant_desc": "日向翔陽看了電視轉播後,被排球的魅力所吸引,參加了國中第一場也是最後一場的正式比賽。然而,他徹底地敗在別名「球場上的王者」的天才選手‧影山的手下。日向發誓報仇,考進烏野高中並加入排球社,看到國中的宿敵影山竟然考進同一所高中,遂向他挑戰。結果雖然展現一點才能,可是兩人的不和引發風波,惹惱了隊長!\n\n📚 作品資訊:作者 古館春一 · 評分 10 · 共收錄 45 卷 / 417 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '排球少年' (排球少年) by 古馆春一. Includes 45 volumes and 417 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1414/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1414/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1414/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1414/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1414/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1414/page_06.jpg"], "volumes": [{"title_hant": "排球少年 1", "title_zh": "排球少年 1", "cover_id": 2543349, "first_chap_id": 117210, "cover_url": "https://i.motiezw.com/cover/1414/2543349.jpg"}, {"title_hant": "排球少年 2", "title_zh": "排球少年 2", "cover_id": 2543540, "first_chap_id": 117218, "cover_url": "https://i.motiezw.com/cover/1414/2543540.jpg"}, {"title_hant": "排球少年 3", "title_zh": "排球少年 3", "cover_id": 2543740, "first_chap_id": 117229, "cover_url": "https://i.motiezw.com/cover/1414/2543740.jpg"}, {"title_hant": "排球少年 4", "title_zh": "排球少年 4", "cover_id": 2543937, "first_chap_id": 117240, "cover_url": "https://i.motiezw.com/cover/1414/2543937.jpg"}, {"title_hant": "排球少年 5", "title_zh": "排球少年 5", "cover_id": 2544135, "first_chap_id": 117251, "cover_url": "https://i.motiezw.com/cover/1414/2544135.jpg"}, {"title_hant": "排球少年 6", "title_zh": "排球少年 6", "cover_id": 2544337, "first_chap_id": 117262, "cover_url": "https://i.motiezw.com/cover/1414/2544337.jpg"}, {"title_hant": "排球少年 7", "title_zh": "排球少年 7", "cover_id": 2544526, "first_chap_id": 117273, "cover_url": "https://i.motiezw.com/cover/1414/2544526.jpg"}, {"title_hant": "排球少年 8", "title_zh": "排球少年 8", "cover_id": 2544711, "first_chap_id": 117284, "cover_url": "https://i.motiezw.com/cover/1414/2544711.jpg"}, {"title_hant": "排球少年 9", "title_zh": "排球少年 9", "cover_id": 2544894, "first_chap_id": 117295, "cover_url": "https://i.motiezw.com/cover/1414/2544894.jpg"}, {"title_hant": "排球少年 10", "title_zh": "排球少年 10", "cover_id": 2545078, "first_chap_id": 117305, "cover_url": "https://i.motiezw.com/cover/1414/2545078.jpg"}, {"title_hant": "排球少年 11", "title_zh": "排球少年 11", "cover_id": 2553911, "first_chap_id": 117588, "cover_url": "https://i.motiezw.com/cover/1414/2553911.jpg"}, {"title_hant": "排球少年 12", "title_zh": "排球少年 12", "cover_id": 2554099, "first_chap_id": 117598, "cover_url": "https://i.motiezw.com/cover/1414/2554099.jpg"}], "chapters": [{"cid": "117210", "title": "第1話 結束與開始", "title_zh": "第1话 结束与开始"}, {"cid": "117211", "title": "第2話 烏野高中排球社", "title_zh": "第2话 乌野高中排球社"}, {"cid": "117212", "title": "第3話 單細胞生物", "title_zh": "第3话 单细胞生物"}, {"cid": "117213", "title": "第4話 最強的戰友", "title_zh": "第4话 最强的战友"}, {"cid": "117214", "title": "第5話 球場上的王者", "title_zh": "第5话 球场上的王者"}, {"cid": "117215", "title": "第6話 國中的事Q", "title_zh": "第6话 国中的事Q"}, {"cid": "117216", "title": "第7話 「非天才」的一番話", "title_zh": "第7话 「非天才」的一番话"}, {"cid": "117218", "title": "第8話 「最高處的景S」", "title_zh": "第8话 「最高处的景S」"}, {"cid": "117219", "title": "第9話 搭檔誕生。", "title_zh": "第9话 搭档诞生。"}, {"cid": "117220", "title": "第10話 膽小鬼的緊張", "title_zh": "第10话 胆小鬼的紧张"}, {"cid": "117221", "title": "第11話 「重逢」與「大失敗」", "title_zh": "第11话 「重逢」与「大失败」"}, {"cid": "117222", "title": "第12話 正常運轉", "title_zh": "第12话 正常运转"}, {"cid": "117223", "title": "第13話 「有趣的球隊」", "title_zh": "第13话 「有趣的球队」"}, {"cid": "117224", "title": "第14話 VS「大王者」", "title_zh": "第14话 VS「大王者」"}, {"cid": "117225", "title": "第15話 化學變化", "title_zh": "第15话 化学变化"}, {"cid": "117226", "title": "第16話 另一位天才", "title_zh": "第16话 另一位天才"}, {"cid": "117227", "title": "番外篇 田中學長的惡夢", "title_zh": "番外篇 田中学长的恶梦"}, {"cid": "117229", "title": "第17話 風暴", "title_zh": "第17话 风暴"}, {"cid": "117230", "title": "第18話 被稱為「主攻手」的人", "title_zh": "第18话 被称为「主攻手」的人"}, {"cid": "117231", "title": "第19話 真心話", "title_zh": "第19话 真心话"}, {"cid": "117232", "title": "第20話 「守護神」", "title_zh": "第20话 「守护神」"}, {"cid": "117234", "title": "第22話 憧憬", "title_zh": "第22话 憧憬"}, {"cid": "117235", "title": "第23話 同樣是1分", "title_zh": "第23话 同样是1分"}, {"cid": "117236", "title": "第24話 烏野排球隊開始活動", "title_zh": "第24话 乌野排球队开始活动"}, {"cid": "117237", "title": "第25話 偶然相遇", "title_zh": "第25话 偶然相遇"}, {"cid": "117238", "title": "24話附錄漫畫 『T恤的內Q』", "title_zh": "24话附录漫画 『T恤的内Q』"}, {"cid": "117240", "title": "第26話 決定", "title_zh": "第26话 决定"}, {"cid": "117241", "title": "第27話 貓與烏鴉的重逢", "title_zh": "第27话 猫与乌鸦的重逢"}, {"cid": "117242", "title": "第28話 「鬼」與「鐵棒」", "title_zh": "第28话 「鬼」与「铁棒」"}, {"cid": "117243", "title": "第29話 「腦」", "title_zh": "第29话 「脑」"}, {"cid": "117244", "title": "第30話 飛行的方法", "title_zh": "第30话 飞行的方法"}, {"cid": "117245", "title": "第31話 對手", "title_zh": "第31话 对手"}, {"cid": "117246", "title": "第32話 成貓與烏鴉雛鳥", "title_zh": "第32话 成猫与乌鸦雏鸟"}, {"cid": "117247", "title": "第33話 「延續」的意義", "title_zh": "第33话 「延续」的意义"}, {"cid": "117248", "title": "第34話 發誓再戰", "title_zh": "第34话 发誓再战"}, {"cid": "117249", "title": "附錄漫畫 『布丁頭物語』", "title_zh": "附录漫画 『布丁头物语』"}, {"cid": "117251", "title": "第35話 一群強敵", "title_zh": "第35话 一群强敌"}, {"cid": "117252", "title": "第36話 準備飛翔", "title_zh": "第36话 准备飞翔"}, {"cid": "117253", "title": "第37話 突入", "title_zh": "第37话 突入"}, {"cid": "117254", "title": "第38話 熱身", "title_zh": "第38话 热身"}, {"cid": "117255", "title": "第39話 復活", "title_zh": "第39话 复活"}, {"cid": "117256", "title": "第40話 勝利者與失敗者", "title_zh": "第40话 胜利者与失败者"}, {"cid": "117257", "title": "第41話 進入第2戰", "title_zh": "第41话 进入第2战"}, {"cid": "117259", "title": "第43話 「怪人快攻」解禁", "title_zh": "第43话 「怪人快攻」解禁"}, {"cid": "117260", "title": "第44話 「最強的誘餌」", "title_zh": "第44话 「最强的诱饵」"}, {"cid": "117262", "title": "第45話 「光」的背後", "title_zh": "第45话 「光」的背后"}, {"cid": "117263", "title": "第46話 背後的守衛", "title_zh": "第46话 背后的守卫"}, {"cid": "117264", "title": "第47話 主攻手與英雄", "title_zh": "第47话 主攻手与英雄"}, {"cid": "117265", "title": "第48話 「指揮」", "title_zh": "第48话 「指挥」"}, {"cid": "117266", "title": "第49話 VS「大王者」·2", "title_zh": "第49话 VS「大王者」·2"}, {"cid": "117267", "title": "第50話 THE 舉球員對決", "title_zh": "第50话 THE 举球员对决"}, {"cid": "117268", "title": "第51話 足以被稱為「強校」的實力", "title_zh": "第51话 足以被称为「强校」的实力"}, {"cid": "117269", "title": "第52號 主攻手的資質", "title_zh": "第52号 主攻手的资质"}, {"cid": "117270", "title": "第53話 及川徹並不是天才", "title_zh": "第53话 及川彻并不是天才"}, {"cid": "117271", "title": "排球少年!! 番外篇", "title_zh": "排球少年!! 番外篇"}, {"cid": "117273", "title": "第54話 「前輩」的實力", "title_zh": "第54话 「前辈」的实力"}, {"cid": "117274", "title": "第55話 「我的最佳表現」和「你的最佳表現」", "title_zh": "第55话 「我的最佳表现」和「你的最佳表现」"}, {"cid": "117275", "title": "第56話 少數菁英", "title_zh": "第56话 少数菁英"}, {"cid": "117276", "title": "第57話 「break」", "title_zh": "第57话 「break」"}, {"cid": "117277", "title": "第58話 通常運轉·2", "title_zh": "第58话 通常运转·2"}]};
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>