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-918", "mangaid": "918", "zh_title": "湾岸竞速", "hant_title": "灣岸競速", "en_title": "湾岸竞速 (Bilimanga #918)", "author": "楠通春", "tags": ["热血", "竞技", "战斗热血", "日本漫画", "漫画", "日漫", "连载漫画"], "zh_desc": "「FAIRLADYS三〇Z」是一辆经常被送到废车肢解场的汽车。就像有着什么难以言喻的魅力,明雄完全被它所吸引。而「BLACKBIRD」,则是在过去曾经和这辆「恶魔之Z」一起交锋的保时捷。延续着过往的传说,两辆车之间炙热的竞争重新展开……刻画男子汉们对汽车的爱与恨——湾岸所发生的传奇,众所期待的第一集登场!!\n\n📚 作品信息:作者 楠通春 · 评分 10 · 共收录 36 卷 / 454 话章节目录与高清彩页/条漫预览。", "hant_desc": "「FAIRLADYS三〇Z」是一辆经常被送到废车肢解场的汽车。就像有着什么难以言喻的魅力,明雄完全被它所吸引。而「BLACKBIRD」,则是在过去曾经和这辆「恶魔之Z」一起交锋的保时捷。延续着过往的传说,两辆车之间炙热的竞争重新展开……刻画男子汉们对汽车的爱与恨——湾岸所发生的传奇,众所期待的第一集登场!!\n\n📚 作品資訊:作者 楠通春 · 評分 10 · 共收錄 36 卷 / 454 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '湾岸竞速' (灣岸競速) by 楠通春. Includes 36 volumes and 454 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-918/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-918/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-918/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-918/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-918/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-918/page_06.jpg"], "volumes": [{"title_hant": "灣岸競速 1", "title_zh": "湾岸竞速 1", "cover_id": 1590718, "first_chap_id": 73229, "cover_url": "https://i.motiezw.com/cover/918/1590718.jpg"}, {"title_hant": "灣岸競速 2", "title_zh": "湾岸竞速 2", "cover_id": 1590940, "first_chap_id": 73240, "cover_url": "https://i.motiezw.com/cover/918/1590940.jpg"}, {"title_hant": "灣岸競速 3", "title_zh": "湾岸竞速 3", "cover_id": 1591189, "first_chap_id": 73252, "cover_url": "https://i.motiezw.com/cover/918/1591189.jpg"}, {"title_hant": "灣岸競速 4", "title_zh": "湾岸竞速 4", "cover_id": 1591419, "first_chap_id": 73263, "cover_url": "https://i.motiezw.com/cover/918/1591419.jpg"}, {"title_hant": "灣岸競速 5", "title_zh": "湾岸竞速 5", "cover_id": 1591646, "first_chap_id": 73274, "cover_url": "https://i.motiezw.com/cover/918/1591646.jpg"}, {"title_hant": "灣岸競速 6", "title_zh": "湾岸竞速 6", "cover_id": 1590254, "first_chap_id": 73205, "cover_url": "https://i.motiezw.com/cover/918/1590254.jpg"}, {"title_hant": "灣岸競速 7", "title_zh": "湾岸竞速 7", "cover_id": 1590487, "first_chap_id": 73217, "cover_url": "https://i.motiezw.com/cover/918/1590487.jpg"}, {"title_hant": "灣岸競速 8", "title_zh": "湾岸竞速 8", "cover_id": 1590025, "first_chap_id": 73193, "cover_url": "https://i.motiezw.com/cover/918/1590025.jpg"}, {"title_hant": "灣岸競速 9", "title_zh": "湾岸竞速 9", "cover_id": 1591876, "first_chap_id": 73286, "cover_url": "https://i.motiezw.com/cover/918/1591876.jpg"}, {"title_hant": "灣岸競速 10", "title_zh": "湾岸竞速 10", "cover_id": 1592101, "first_chap_id": 73299, "cover_url": "https://i.motiezw.com/cover/918/1592101.jpg"}, {"title_hant": "灣岸競速 11", "title_zh": "湾岸竞速 11", "cover_id": 1592332, "first_chap_id": 73313, "cover_url": "https://i.motiezw.com/cover/918/1592332.jpg"}, {"title_hant": "灣岸競速 12", "title_zh": "湾岸竞速 12", "cover_id": 1595593, "first_chap_id": 73486, "cover_url": "https://i.motiezw.com/cover/918/1595593.jpg"}], "chapters": [{"cid": "73229", "title": "SERIES 1 S 三〇Z①", "title_zh": "SERIES 1 S 三〇Z①"}, {"cid": "73230", "title": "SERIES 1 S 三〇Z②", "title_zh": "SERIES 1 S 三〇Z②"}, {"cid": "73231", "title": "SERIES 1 S 三〇Z③", "title_zh": "SERIES 1 S 三〇Z③"}, {"cid": "73232", "title": "SERIES 2 零奈①", "title_zh": "SERIES 2 零奈①"}, {"cid": "73233", "title": "SERIES 2 零奈②", "title_zh": "SERIES 2 零奈②"}, {"cid": "73234", "title": "SERIES 2 零奈③", "title_zh": "SERIES 2 零奈③"}, {"cid": "73235", "title": "SERIES 2 零奈④", "title_zh": "SERIES 2 零奈④"}, {"cid": "73236", "title": "SERIES 3 BLACKBIRD①", "title_zh": "SERIES 3 BLACKBIRD①"}, {"cid": "73237", "title": "SERIES 3 BLACKBIRD②", "title_zh": "SERIES 3 BLACKBIRD②"}, {"cid": "73238", "title": "SERIES 3 BLACKBIRD③", "title_zh": "SERIES 3 BLACKBIRD③"}, {"cid": "73239", "title": "SERIES 4 TESTAROSSA①", "title_zh": "SERIES 4 TESTAROSSA①"}, {"cid": "73240", "title": "SERIES 4 TESTAROSSA①", "title_zh": "SERIES 4 TESTAROSSA①"}, {"cid": "73241", "title": "SERIES 4 TESTAROSSA②", "title_zh": "SERIES 4 TESTAROSSA②"}, {"cid": "73242", "title": "SERIES 5 地獄的修理師①", "title_zh": "SERIES 5 地狱的修理师①"}, {"cid": "73243", "title": "SERIES 5 地獄的修理師②", "title_zh": "SERIES 5 地狱的修理师②"}, {"cid": "73244", "title": "SERIES 5 地獄的修理師③", "title_zh": "SERIES 5 地狱的修理师③"}, {"cid": "73245", "title": "SERIES 6 NEW MACHINE①", "title_zh": "SERIES 6 NEW MACHINE①"}, {"cid": "73246", "title": "SERIES 6 NEW MACHINE②", "title_zh": "SERIES 6 NEW MACHINE②"}, {"cid": "73247", "title": "SERIES 6 NEW MACHINE③", "title_zh": "SERIES 6 NEW MACHINE③"}, {"cid": "73248", "title": "SERIES 7 預感①", "title_zh": "SERIES 7 预感①"}, {"cid": "73249", "title": "SERIES 7 預感②", "title_zh": "SERIES 7 预感②"}, {"cid": "73250", "title": "SERIES 7 預感③", "title_zh": "SERIES 7 预感③"}, {"cid": "73252", "title": "SERIES 8 FAREVELL「別離」①", "title_zh": "SERIES 8 FAREVELL「别离」①"}, {"cid": "73253", "title": "SERIES 8 FAREVELL「別離」②", "title_zh": "SERIES 8 FAREVELL「别离」②"}, {"cid": "73254", "title": "SERIES 8 FAREVELL「別離」③", "title_zh": "SERIES 8 FAREVELL「别离」③"}, {"cid": "73255", "title": "SERIES 8 FAREVELL「別離」④", "title_zh": "SERIES 8 FAREVELL「别离」④"}, {"cid": "73256", "title": "SERIES 9 機械技師①", "title_zh": "SERIES 9 机械技师①"}, {"cid": "73257", "title": "SERIES 9 機械技師②", "title_zh": "SERIES 9 机械技师②"}, {"cid": "73258", "title": "SERIES 9 機械技師③", "title_zh": "SERIES 9 机械技师③"}, {"cid": "73259", "title": "SERIES 9 機械技師④", "title_zh": "SERIES 9 机械技师④"}, {"cid": "73260", "title": "SERIES 10 BNR32①", "title_zh": "SERIES 10 BNR32①"}, {"cid": "73261", "title": "SERIES 10 BNR32②", "title_zh": "SERIES 10 BNR32②"}, {"cid": "73262", "title": "SERIES 10 BNR32③", "title_zh": "SERIES 10 BNR32③"}, {"cid": "73263", "title": "SERIES 11 SETUP①", "title_zh": "SERIES 11 SETUP①"}, {"cid": "73264", "title": "SERIES 11 SETUP②", "title_zh": "SERIES 11 SETUP②"}, {"cid": "73265", "title": "SERIES 11 SETUP③", "title_zh": "SERIES 11 SETUP③"}, {"cid": "73266", "title": "SERIES 11 SETUP④", "title_zh": "SERIES 11 SETUP④"}, {"cid": "73267", "title": "SERIES 12 RESURRECTIONI「復活」①", "title_zh": "SERIES 12 RESURRECTIONI「复活」①"}, {"cid": "73268", "title": "SERIES 12 RESURRECTIONI「復活」②", "title_zh": "SERIES 12 RESURRECTIONI「复活」②"}, {"cid": "73269", "title": "SERIES 12 RESURRECTIONI「復活」③", "title_zh": "SERIES 12 RESURRECTIONI「复活」③"}, {"cid": "73270", "title": "SERIES 12 RESURRECTIONI「復活」④", "title_zh": "SERIES 12 RESURRECTIONI「复活」④"}, {"cid": "73271", "title": "SERIES 13 DOG FIGHT①", "title_zh": "SERIES 13 DOG FIGHT①"}, {"cid": "73272", "title": "SERIES 13 DOG FIGHT②", "title_zh": "SERIES 13 DOG FIGHT②"}, {"cid": "73273", "title": "SERIES 13 DOG FIGHT③", "title_zh": "SERIES 13 DOG FIGHT③"}, {"cid": "73274", "title": "SERIES 14 DOG FIGHTⅡ①", "title_zh": "SERIES 14 DOG FIGHTⅡ①"}, {"cid": "73275", "title": "SERIES 14 DOG FIGHTⅡ②", "title_zh": "SERIES 14 DOG FIGHTⅡ②"}, {"cid": "73276", "title": "SERIES 14 DOG FIGHTⅡ③", "title_zh": "SERIES 14 DOG FIGHTⅡ③"}, {"cid": "73277", "title": "SERIES 14 DOG FIGHTⅡ④", "title_zh": "SERIES 14 DOG FIGHTⅡ④"}, {"cid": "73278", "title": "SERIES 15 FLAT OUT①", "title_zh": "SERIES 15 FLAT OUT①"}, {"cid": "73279", "title": "SERIES 15 FLAT OUT②", "title_zh": "SERIES 15 FLAT OUT②"}, {"cid": "73280", "title": "SERIES 15 FLAT OUT③", "title_zh": "SERIES 15 FLAT OUT③"}, {"cid": "73281", "title": "SERIES 15 FLAT OUT④", "title_zh": "SERIES 15 FLAT OUT④"}, {"cid": "73282", "title": "SERIES 16 1986 谷田部①", "title_zh": "SERIES 16 1986 谷田部①"}, {"cid": "73283", "title": "SERIES 16 1986 谷田部②", "title_zh": "SERIES 16 1986 谷田部②"}, {"cid": "73284", "title": "SERIES 16 1986 谷田部③", "title_zh": "SERIES 16 1986 谷田部③"}, {"cid": "73205", "title": "SERIES 16 1986 谷田部④", "title_zh": "SERIES 16 1986 谷田部④"}, {"cid": "73206", "title": "SERIES 16 1986 谷田部⑤", "title_zh": "SERIES 16 1986 谷田部⑤"}, {"cid": "73207", "title": "SERIES 16 1986 谷田部⑥", "title_zh": "SERIES 16 1986 谷田部⑥"}, {"cid": "73208", "title": "SERIES 17 北見的改裝①", "title_zh": "SERIES 17 北见的改装①"}, {"cid": "73209", "title": "SERIES 17 北見的改裝②", "title_zh": "SERIES 17 北见的改装②"}]};
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>