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>机动战士高达 F90FF - 在线漫画阅读器</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-665", "mangaid": "665", "zh_title": "机动战士高达 F90FF", "hant_title": "機動戰士高達 F90FF", "en_title": "机动战士高达 F90FF (Bilimanga #665)", "author": "今ノ夜 きよし / イノ ノブヨシ / 矢立肇・富野由悠季", "tags": ["科幻", "机战", "异能", "战斗", "热血", "冒险", "科幻未来", "日本漫画"], "zh_desc": "围绕宇宙巴比伦崛起背后的阴谋,U.C.0116年,最新的F90物语就此开始\n\n📚 作品信息:作者 今ノ夜 きよし / イノ ノブヨシ / 矢立肇・富野由悠季 · 评分 10 · 共收录 8 卷 / 41 话章节目录与高清彩页/条漫预览。", "hant_desc": "圍繞宇宙巴比倫崛起背後的陰謀,U.C.0116年,最新的F90物語就此開始\n\n📚 作品資訊:作者 今ノ夜 きよし / イノ ノブヨシ / 矢立肇・富野由悠季 · 評分 10 · 共收錄 8 卷 / 41 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '机动战士高达 F90FF' (機動戰士高達 F90FF) by 今ノ夜 きよし / イノ ノブヨシ / 矢立肇・富野由悠季. Includes 8 volumes and 41 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-665/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-665/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-665/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-665/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-665/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-665/page_06.jpg"], "volumes": [{"title_hant": "機動戰士高達 F90FF 1", "title_zh": "机动战士高达 F90FF 1", "cover_id": 1114913, "first_chap_id": 50774, "cover_url": "https://i.motiezw.com/cover/665/1114913.jpg"}, {"title_hant": "機動戰士高達 F90FF 2", "title_zh": "机动战士高达 F90FF 2", "cover_id": 1114735, "first_chap_id": 50780, "cover_url": "https://i.motiezw.com/cover/665/1114735.jpg"}, {"title_hant": "機動戰士高達 F90FF 3", "title_zh": "机动战士高达 F90FF 3", "cover_id": 1114956, "first_chap_id": 50785, "cover_url": "https://i.motiezw.com/cover/665/1114956.jpg"}, {"title_hant": "機動戰士高達 F90FF 4", "title_zh": "机动战士高达 F90FF 4", "cover_id": 1115151, "first_chap_id": 50790, "cover_url": "https://i.motiezw.com/cover/665/1115151.jpg"}, {"title_hant": "機動戰士高達 F90FF 5", "title_zh": "机动战士高达 F90FF 5", "cover_id": 1115356, "first_chap_id": 50796, "cover_url": "https://i.motiezw.com/cover/665/1115356.jpg"}, {"title_hant": "機動戰士高達 F90FF 6", "title_zh": "机动战士高达 F90FF 6", "cover_id": 1115553, "first_chap_id": 50802, "cover_url": "https://i.motiezw.com/cover/665/1115553.jpg"}, {"title_hant": "機動戰士高達 F90FF 7", "title_zh": "机动战士高达 F90FF 7", "cover_id": 1115767, "first_chap_id": 50809, "cover_url": "https://i.motiezw.com/cover/665/1115767.jpg"}, {"title_hant": "機動戰士高達 F90FF 8", "title_zh": "机动战士高达 F90FF 8", "cover_id": 1115974, "first_chap_id": 50815, "cover_url": "https://i.motiezw.com/cover/665/1115974.jpg"}], "chapters": [{"cid": "50774", "title": "PrologueⅠ", "title_zh": "PrologueⅠ"}, {"cid": "50775", "title": "第1話 帕斯蒂和利烏", "title_zh": "第1话 帕斯蒂和利乌"}, {"cid": "50776", "title": "第2話 利烏和帕斯蒂", "title_zh": "第2话 利乌和帕斯蒂"}, {"cid": "50777", "title": "第3話 遭遇", "title_zh": "第3话 遭遇"}, {"cid": "50778", "title": "第4話 加魯哈利烏斯猛攻", "title_zh": "第4话 加鲁哈利乌斯猛攻"}, {"cid": "50780", "title": "PrologueⅡ", "title_zh": "PrologueⅡ"}, {"cid": "50781", "title": "第5話 F89 VS F90", "title_zh": "第5话 F89 VS F90"}, {"cid": "50782", "title": "第6話 潛藏的尖牙", "title_zh": "第6话 潜藏的尖牙"}, {"cid": "50783", "title": "第7話 利烏的叛亂", "title_zh": "第7话 利乌的叛乱"}, {"cid": "50785", "title": "PrologueⅢ", "title_zh": "PrologueⅢ"}, {"cid": "50786", "title": "第8話 被發現的利烏", "title_zh": "第8话 被发现的利乌"}, {"cid": "50787", "title": "第9話 最後的測試", "title_zh": "第9话 最后的测试"}, {"cid": "50788", "title": "第10話 煌黑之槍、虎、以及", "title_zh": "第10话 煌黑之枪、虎、以及"}, {"cid": "50790", "title": "PrologueⅣ", "title_zh": "PrologueⅣ"}, {"cid": "50791", "title": "第11話 疾馳的N", "title_zh": "第11话 疾驰的N"}, {"cid": "50792", "title": "第12話 2道光芒", "title_zh": "第12话 2道光芒"}, {"cid": "50793", "title": "第13話 U.C.0115", "title_zh": "第13话 U.C.0115"}, {"cid": "50794", "title": "第14話 迪爾·萊德", "title_zh": "第14话 迪尔·莱德"}, {"cid": "50796", "title": "第15話 貴婦人號", "title_zh": "第15话 贵妇人号"}, {"cid": "50798", "title": "第17話 同樣的遭遇", "title_zh": "第17话 同样的遭遇"}, {"cid": "50799", "title": "第18話 拯救", "title_zh": "第18话 拯救"}, {"cid": "50800", "title": "第19話 神之眼", "title_zh": "第19话 神之眼"}, {"cid": "50802", "title": "PrologueⅤ", "title_zh": "PrologueⅤ"}, {"cid": "50803", "title": "第20話 被忘卻的機體(Forgotten Machine)", "title_zh": "第20话 被忘却的机体(Forgotten Machine)"}, {"cid": "50804", "title": "第21話 在未知力量的渦流中", "title_zh": "第21话 在未知力量的涡流中"}, {"cid": "50805", "title": "第22話 復蘇的吉翁", "title_zh": "第22话 复苏的吉翁"}, {"cid": "50806", "title": "第23話 阿M利亞受難", "title_zh": "第23话 阿M利亚受难"}, {"cid": "50807", "title": "特別篇", "title_zh": "特别篇"}, {"cid": "50809", "title": "第24話 V.S.B.R.的覺醒", "title_zh": "第24话 V.S.B.R.的觉醒"}, {"cid": "50810", "title": "第25話 理想是渴求著鮮血的妖花", "title_zh": "第25话 理想是渴求著鲜血的妖花"}, {"cid": "50811", "title": "第26話 阿納海姆突擊", "title_zh": "第26话 阿纳海姆突击"}, {"cid": "50812", "title": "第27話 米諾夫斯基的預兆", "title_zh": "第27话 米诺夫斯基的预兆"}, {"cid": "50813", "title": "第28話 煌黑之槍", "title_zh": "第28话 煌黑之枪"}, {"cid": "50815", "title": "第29話 世界之軸(Axis Mundi)", "title_zh": "第29话 世界之轴(Axis Mundi)"}, {"cid": "50816", "title": "第30話 以高貴精神挺身而出", "title_zh": "第30话 以高贵精神挺身而出"}, {"cid": "52711", "title": "第31話 喚醒殘存於此的青春", "title_zh": "第31话 唤醒残存于此的青春"}, {"cid": "55342", "title": "第32話 第一次接觸", "title_zh": "第32话 第一次接触"}, {"cid": "55343", "title": "第33話 追尋破碎之夢的碎片", "title_zh": "第33话 追寻破碎之梦的碎片"}, {"cid": "56746", "title": "间章", "title_zh": "间章"}, {"cid": "59015", "title": "第34話 向光輝的未來", "title_zh": "第34话 向光辉的未来"}, {"cid": "59017", "title": "第36話 我等的祈願", "title_zh": "第36话 我等的祈愿"}]};
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>