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-146", "mangaid": "146", "zh_title": "水星领航员", "hant_title": "水星領航員", "en_title": "水星领航员 (Bilimanga #146)", "author": "天野こずえ", "tags": ["科幻", "旅行", "治愈", "治愈温馨", "日本漫画", "漫画", "日漫", "连载漫画"], "zh_desc": "公元2301年,经过未来科技的改造,人类成功将一颗蛮荒的行星改造成为充满水的「水星」,名了「Aqua」,随著源源不断到来的移民,Aqua开始变成了繁华的旅游城市,在这里有著一种专门由女性担当的职业——水之领航员,她们划著小船,带领游客四处观光。\n\r\n15岁的女孩水无灯里怀抱著对水之领航员的向往,从遥远的地球来到了Aqua的旅游圣地之一的新维内茨亚市,立场要成为一名优秀的水之领航员……\n\n📚 作品信息:作者 天野こずえ · 评分 10 · 共收录 12 卷 / 64 话章节目录与高清彩页/条漫预览。", "hant_desc": "公元2301年,經過未來科技的改造,人類成功將一顆蠻荒的行星改造成為充滿水的「水星」,名了「Aqua」,隨著源源不斷到來的移民,Aqua開始變成了繁華的旅遊城市,在這裏有著一種專門由女性擔當的職業——水之領航員,她們劃著小船,帶領遊客四處觀光。\n\r\n15歲的女孩水無燈裏懷抱著對水之領航員的向往,從遙遠的地球來到了Aqua的旅遊聖地之一的新維內茨亞市,立場要成為一名優秀的水之領航員……\n\n📚 作品資訊:作者 天野こずえ · 評分 10 · 共收錄 12 卷 / 64 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '水星领航员' (水星領航員) by 天野こずえ. Includes 12 volumes and 64 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-146/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-146/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-146/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-146/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-146/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-146/page_06.jpg"], "volumes": [{"title_hant": "水星領航員 1", "title_zh": "水星领航员 1", "cover_id": 229864, "first_chap_id": 10620, "cover_url": "https://i.motiezw.com/cover/146/229864.jpg"}, {"title_hant": "水星領航員 2", "title_zh": "水星领航员 2", "cover_id": 230043, "first_chap_id": 10626, "cover_url": "https://i.motiezw.com/cover/146/230043.jpg"}, {"title_hant": "水星領航員 3", "title_zh": "水星领航员 3", "cover_id": 230225, "first_chap_id": 10633, "cover_url": "https://i.motiezw.com/cover/146/230225.jpg"}, {"title_hant": "水星領航員 4", "title_zh": "水星领航员 4", "cover_id": 230399, "first_chap_id": 10639, "cover_url": "https://i.motiezw.com/cover/146/230399.jpg"}, {"title_hant": "水星領航員 5", "title_zh": "水星领航员 5", "cover_id": 230570, "first_chap_id": 10645, "cover_url": "https://i.motiezw.com/cover/146/230570.jpg"}, {"title_hant": "水星領航員 6", "title_zh": "水星领航员 6", "cover_id": 230745, "first_chap_id": 10651, "cover_url": "https://i.motiezw.com/cover/146/230745.jpg"}, {"title_hant": "水星領航員 7", "title_zh": "水星领航员 7", "cover_id": 230922, "first_chap_id": 10658, "cover_url": "https://i.motiezw.com/cover/146/230922.jpg"}, {"title_hant": "水星領航員 8", "title_zh": "水星领航员 8", "cover_id": 231098, "first_chap_id": 10665, "cover_url": "https://i.motiezw.com/cover/146/231098.jpg"}, {"title_hant": "水星領航員 9", "title_zh": "水星领航员 9", "cover_id": 231273, "first_chap_id": 10672, "cover_url": "https://i.motiezw.com/cover/146/231273.jpg"}, {"title_hant": "水星領航員 10", "title_zh": "水星领航员 10", "cover_id": 231449, "first_chap_id": 10679, "cover_url": "https://i.motiezw.com/cover/146/231449.jpg"}, {"title_hant": "水星領航員 11", "title_zh": "水星领航员 11", "cover_id": 231624, "first_chap_id": 10686, "cover_url": "https://i.motiezw.com/cover/146/231624.jpg"}, {"title_hant": "水星領航員 12", "title_zh": "水星领航员 12", "cover_id": 231798, "first_chap_id": 10692, "cover_url": "https://i.motiezw.com/cover/146/231798.jpg"}], "chapters": [{"cid": "10620", "title": "Navigation 01 新威尼斯", "title_zh": "Navigation 01 新威尼斯"}, {"cid": "10621", "title": "Navigation 02 上岸保養", "title_zh": "Navigation 02 上岸保养"}, {"cid": "10622", "title": "Navigation 03 嘆息橋", "title_zh": "Navigation 03 叹息桥"}, {"cid": "10623", "title": "Navigation 04 太陽雨", "title_zh": "Navigation 04 太阳雨"}, {"cid": "10624", "title": "Navigation 05 VOGARE LONGA", "title_zh": "Navigation 05 VOGARE LONGA"}, {"cid": "10626", "title": "Navigation 06 雪蟲", "title_zh": "Navigation 06 雪虫"}, {"cid": "10627", "title": "Navigation 07 世外桃源", "title_zh": "Navigation 07 世外桃源"}, {"cid": "10628", "title": "Special Navigation 社長的日常生活", "title_zh": "Special Navigation 社长的日常生活"}, {"cid": "10629", "title": "Navigation 08 星球的歌聲", "title_zh": "Navigation 08 星球的歌声"}, {"cid": "10630", "title": "Navigation 09 Augur io Buonanno", "title_zh": "Navigation 09 Augur io Buonanno"}, {"cid": "10631", "title": "Navigation 10 謝禸祭", "title_zh": "Navigation 10 谢禸祭"}, {"cid": "10633", "title": "Navigation 11 初春的南風", "title_zh": "Navigation 11 初春的南风"}, {"cid": "10634", "title": "Navigation 12 盛開森林的櫻樹下", "title_zh": "Navigation 12 盛开森林的樱树下"}, {"cid": "10635", "title": "Navigation 13 城裡的寶物", "title_zh": "Navigation 13 城里的宝物"}, {"cid": "10636", "title": "Navigation 14 三大水精靈", "title_zh": "Navigation 14 三大水精灵"}, {"cid": "10637", "title": "Navigation 15 波克羅日", "title_zh": "Navigation 15 波克罗日"}, {"cid": "10639", "title": "Navigation 16 夢幻島", "title_zh": "Navigation 16 梦幻岛"}, {"cid": "10640", "title": "Navigation 17 逃走的水", "title_zh": "Navigation 17 逃走的水"}, {"cid": "10641", "title": "Navigation 18 在空中游泳的魚", "title_zh": "Navigation 18 在空中游泳的鱼"}, {"cid": "10642", "title": "Navigation 19 傳說中的大精靈", "title_zh": "Navigation 19 传说中的大精灵"}, {"cid": "10645", "title": "Navigation 21 郵差先生", "title_zh": "Navigation 21 邮差先生"}, {"cid": "10646", "title": "Navigation 22 船歌", "title_zh": "Navigation 22 船歌"}, {"cid": "10647", "title": "Navigation 23 流星群之夜", "title_zh": "Navigation 23 流星群之夜"}, {"cid": "10648", "title": "Navigation 24 瑪格麗特披薩", "title_zh": "Navigation 24 玛格丽特披萨"}, {"cid": "10649", "title": "Navigation 25 追影", "title_zh": "Navigation 25 追影"}, {"cid": "10651", "title": "Navigation 26 橘S日子", "title_zh": "Navigation 26 橘S日子"}, {"cid": "10652", "title": "Navigation 27 威尼斯玻璃", "title_zh": "Navigation 27 威尼斯玻璃"}, {"cid": "10653", "title": "Navigation 28 白雪", "title_zh": "Navigation 28 白雪"}, {"cid": "10654", "title": "Navigation 29 迷路小貓", "title_zh": "Navigation 29 迷路小猫"}, {"cid": "10655", "title": "Navigation 30 銀河鐵道之夜", "title_zh": "Navigation 30 银河铁道之夜"}, {"cid": "10656", "title": "Special Navigation 平行世界", "title_zh": "Special Navigation 平行世界"}, {"cid": "10658", "title": "Navigation 31 春之N神", "title_zh": "Navigation 31 春之N神"}, {"cid": "10659", "title": "Navigation 32 停電", "title_zh": "Navigation 32 停电"}, {"cid": "10660", "title": "Navigation 33 鏡子", "title_zh": "Navigation 33 镜子"}, {"cid": "10661", "title": "Navigation 34 水上巴士", "title_zh": "Navigation 34 水上巴士"}, {"cid": "10662", "title": "Navigation 35 頭髮與髮夾與我", "title_zh": "Navigation 35 头发与发夹与我"}, {"cid": "10663", "title": "Special Navigation 人造人", "title_zh": "Special Navigation 人造人"}, {"cid": "10665", "title": "Navigation 36 船", "title_zh": "Navigation 36 船"}, {"cid": "10666", "title": "Navigation 37 失憶", "title_zh": "Navigation 37 失忆"}, {"cid": "10667", "title": "Special Navigation N人心", "title_zh": "Special Navigation N人心"}, {"cid": "10669", "title": "Navigation 39 秘密的場所", "title_zh": "Navigation 39 秘密的场所"}, {"cid": "10670", "title": "Navigation 40 送別之火", "title_zh": "Navigation 40 送别之火"}, {"cid": "10672", "title": "Navigation 41 檕船椿", "title_zh": "Navigation 41 檕船椿"}, {"cid": "10673", "title": "Navigation 42 自己的規則", "title_zh": "Navigation 42 自己的规则"}, {"cid": "10674", "title": "Navigation 43 兒時玩伴", "title_zh": "Navigation 43 儿时玩伴"}, {"cid": "10675", "title": "Navigation 44 prima donna", "title_zh": "Navigation 44 prima donna"}, {"cid": "10676", "title": "Navigation 45 賞月", "title_zh": "Navigation 45 赏月"}, {"cid": "10677", "title": "Special Navigation 藍寶石", "title_zh": "Special Navigation 蓝宝石"}, {"cid": "10679", "title": "Navigation 46 生日", "title_zh": "Navigation 46 生日"}, {"cid": "10680", "title": "Navigation 47 耶穌顯靈日", "title_zh": "Navigation 47 耶稣显灵日"}, {"cid": "10681", "title": "Navigation 48 Traghetto", "title_zh": "Navigation 48 Traghetto"}, {"cid": "10682", "title": "Navigation 49 春夏秋冬", "title_zh": "Navigation 49 春夏秋冬"}, {"cid": "10683", "title": "Navigation 50 課外教學", "title_zh": "Navigation 50 课外教学"}, {"cid": "10684", "title": "Special Navigation 占星", "title_zh": "Special Navigation 占星"}, {"cid": "10686", "title": "Navigation 51 酢漿草", "title_zh": "Navigation 51 酢浆草"}, {"cid": "10687", "title": "Navigation 52 與海洋的結婚", "title_zh": "Navigation 52 与海洋的结婚"}, {"cid": "10688", "title": "Navigation 53 貓妖精", "title_zh": "Navigation 53 猫妖精"}, {"cid": "10689", "title": "Navigation 54 假日", "title_zh": "Navigation 54 假日"}, {"cid": "10690", "title": "Navigation 55 黃昏時分", "title_zh": "Navigation 55 黄昏时分"}, {"cid": "10692", "title": "Navigation 56 活娃娃", "title_zh": "Navigation 56 活娃娃"}]};
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>