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-159", "mangaid": "159", "zh_title": "碧蓝之海", "hant_title": "碧藍之海", "en_title": "碧蓝之海 (Bilimanga #159)", "author": "吉冈公威 / 井上坚二", "tags": ["校园", "日常", "恋爱", "欢乐", "校园青春", "日本漫画", "漫画", "日漫"], "zh_desc": "以上大学为契机,北原伊织开始在沿海城镇居住。\n\r\n他在那里遇见的是美貌出众的女孩、以及喜爱喝酒与水肺潜水的强壮男人。\n\r\n最棒的校园生活在等待著他吗!?\n\r\n无止境爆笑生动青春喜剧、就此开幕!\n\r\n笨蛋测验召唤兽作者井上坚二初次执笔的原创漫!!\n\r\n大学生活!可爱女孩!而且还穿泳装!这不就肯定会有色色的发展吗!? (其实没有)\n\n📚 作品信息:作者 吉冈公威 / 井上坚二 · 评分 10 · 共收录 26 卷 / 129 话章节目录与高清彩页/条漫预览。", "hant_desc": "以上大學為契機,北原伊織開始在沿海城鎮居住。\n\r\n他在那裡遇見的是美貌出眾的女孩、以及喜愛喝酒與水肺潛水的強壯男人。\n\r\n最棒的校園生活在等待著他嗎!?\n\r\n無止境爆笑生動青春喜劇、就此開幕!\n\r\n笨蛋測驗召喚獸作者井上堅二初次執筆的原創漫!!\n\r\n大學生活!可愛女孩!而且還穿泳裝!這不就肯定會有色色的發展嗎!? (其實沒有)\n\n📚 作品資訊:作者 吉岡公威 / 井上堅二 · 評分 10 · 共收錄 26 卷 / 129 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '碧蓝之海' (碧藍之海) by 吉冈公威 / 井上坚二. Includes 26 volumes and 129 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-159/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-159/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-159/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-159/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-159/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-159/page_06.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-159/page_07.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-159/page_08.jpg"], "volumes": [{"title_hant": "碧藍之海 1", "title_zh": "碧蓝之海 1", "cover_id": 276907, "first_chap_id": 13203, "cover_url": "https://i.motiezw.com/cover/159/276907.jpg"}, {"title_hant": "碧藍之海 2", "title_zh": "碧蓝之海 2", "cover_id": 278368, "first_chap_id": 13279, "cover_url": "https://i.motiezw.com/cover/159/278368.jpg"}, {"title_hant": "碧藍之海 3", "title_zh": "碧蓝之海 3", "cover_id": 278562, "first_chap_id": 13285, "cover_url": "https://i.motiezw.com/cover/159/278562.jpg"}, {"title_hant": "碧藍之海 4", "title_zh": "碧蓝之海 4", "cover_id": 281700, "first_chap_id": 13493, "cover_url": "https://i.motiezw.com/cover/159/281700.jpg"}, {"title_hant": "碧藍之海 5", "title_zh": "碧蓝之海 5", "cover_id": 281889, "first_chap_id": 13500, "cover_url": "https://i.motiezw.com/cover/159/281889.jpg"}, {"title_hant": "碧藍之海 6", "title_zh": "碧蓝之海 6", "cover_id": 282079, "first_chap_id": 13506, "cover_url": "https://i.motiezw.com/cover/159/282079.jpg"}, {"title_hant": "碧藍之海 7", "title_zh": "碧蓝之海 7", "cover_id": 282271, "first_chap_id": 13512, "cover_url": "https://i.motiezw.com/cover/159/282271.jpg"}, {"title_hant": "碧藍之海 8", "title_zh": "碧蓝之海 8", "cover_id": 282464, "first_chap_id": 13517, "cover_url": "https://i.motiezw.com/cover/159/282464.jpg"}, {"title_hant": "碧藍之海 9", "title_zh": "碧蓝之海 9", "cover_id": 282656, "first_chap_id": 13523, "cover_url": "https://i.motiezw.com/cover/159/282656.jpg"}, {"title_hant": "碧藍之海 10", "title_zh": "碧蓝之海 10", "cover_id": 282849, "first_chap_id": 13528, "cover_url": "https://i.motiezw.com/cover/159/282849.jpg"}, {"title_hant": "碧藍之海 11", "title_zh": "碧蓝之海 11", "cover_id": 283041, "first_chap_id": 13534, "cover_url": "https://i.motiezw.com/cover/159/283041.jpg"}, {"title_hant": "碧藍之海 12", "title_zh": "碧蓝之海 12", "cover_id": 283235, "first_chap_id": 13540, "cover_url": "https://i.motiezw.com/cover/159/283235.jpg"}], "chapters": [{"cid": "13203", "title": "第1話 Deep Blue", "title_zh": "第1话 Deep Blue"}, {"cid": "13204", "title": "第2話 新生歡迎會", "title_zh": "第2话 新生欢迎会"}, {"cid": "13205", "title": "第3話 My Room", "title_zh": "第3话 My Room"}, {"cid": "13206", "title": "第4話 在水中", "title_zh": "第4话 在水中"}, {"cid": "13279", "title": "第5話 新世界", "title_zh": "第5话 新世界"}, {"cid": "13280", "title": "第6話 年長N悻", "title_zh": "第6话 年长N悻"}, {"cid": "13281", "title": "第7話 選M比賽", "title_zh": "第7话 选M比赛"}, {"cid": "13282", "title": "第8話 男悻選M比賽", "title_zh": "第8话 男悻选M比赛"}, {"cid": "13283", "title": "番外篇 笨蛋、考試、作弊", "title_zh": "番外篇 笨蛋、考试、作弊"}, {"cid": "13285", "title": "第9話 祭典之後", "title_zh": "第9话 祭典之后"}, {"cid": "13286", "title": "第10話 聯誼", "title_zh": "第10话 联谊"}, {"cid": "13287", "title": "第11話 初次結伴潜水", "title_zh": "第11话 初次结伴潜水"}, {"cid": "13288", "title": "第12話 雙打", "title_zh": "第12话 双打"}, {"cid": "13289", "title": "番外篇 普通的酒會", "title_zh": "番外篇 普通的酒会"}, {"cid": "13493", "title": "第13話 房間開酒會", "title_zh": "第13话 房间开酒会"}, {"cid": "13494", "title": "第14話 男人的雞尾酒", "title_zh": "第14话 男人的鸡尾酒"}, {"cid": "13495", "title": "第15話 購物!", "title_zh": "第15话 购物!"}, {"cid": "13496", "title": "第16話 登陸沖繩", "title_zh": "第16话 登陆冲绳"}, {"cid": "13497", "title": "第17 話 沒有謊言的地方", "title_zh": "第17 话 没有谎言的地方"}, {"cid": "13498", "title": "第GO TO NEXT PAGE", "title_zh": "第GO TO NEXT PAGE"}, {"cid": "13500", "title": "第18話 是誤會啦", "title_zh": "第18话 是误会啦"}, {"cid": "13501", "title": "第19話 試煉", "title_zh": "第19话 试炼"}, {"cid": "13502", "title": "第20話 船潛", "title_zh": "第20话 船潜"}, {"cid": "13503", "title": "第21話 御通", "title_zh": "第21话 御通"}, {"cid": "13504", "title": "番外篇 團結", "title_zh": "番外篇 团结"}, {"cid": "13506", "title": "第22話 N子會", "title_zh": "第22话 N子会"}, {"cid": "13507", "title": "第23話 門票爭奪戰", "title_zh": "第23话 门票争夺战"}, {"cid": "13508", "title": "第24話 初次來到N子大學", "title_zh": "第24话 初次来到N子大学"}, {"cid": "13509", "title": "第25話 再次來到N子大學", "title_zh": "第25话 再次来到N子大学"}, {"cid": "13510", "title": "番外篇 信", "title_zh": "番外篇 信"}, {"cid": "13512", "title": "第26話 看家", "title_zh": "第26话 看家"}, {"cid": "13513", "title": "第27話 妹妹", "title_zh": "第27话 妹妹"}, {"cid": "13514", "title": "第28話哥哥", "title_zh": "第28话哥哥"}, {"cid": "13515", "title": "番外篇 麻將", "title_zh": "番外篇 麻将"}, {"cid": "13517", "title": "第29話 印象遊戲", "title_zh": "第29话 印象游戏"}, {"cid": "13518", "title": "第30話 我不T喔?", "title_zh": "第30话 我不T喔?"}, {"cid": "13519", "title": "第31話 準教授", "title_zh": "第31话 准教授"}, {"cid": "13520", "title": "第32話 夏比衝擊試驗", "title_zh": "第32话 夏比冲击试验"}, {"cid": "13521", "title": "第33話 大人的林間學校", "title_zh": "第33话 大人的林间学校"}, {"cid": "13523", "title": "第34話 打工同事", "title_zh": "第34话 打工同事"}, {"cid": "13525", "title": "第36話 喜歡嗎?", "title_zh": "第36话 喜欢吗?"}, {"cid": "13526", "title": "第37話 認真的", "title_zh": "第37话 认真的"}, {"cid": "13528", "title": "第38話 約會看電影", "title_zh": "第38话 约会看电影"}, {"cid": "13529", "title": "第39 話 Auction House", "title_zh": "第39 话 Auction House"}, {"cid": "13530", "title": "第40話 White研", "title_zh": "第40话 White研"}, {"cid": "13531", "title": "第41話 去無人島吧!", "title_zh": "第41话 去无人岛吧!"}, {"cid": "13532", "title": "番外篇分組討論", "title_zh": "番外篇分组讨论"}, {"cid": "13534", "title": "第42話 遊玩無人島!", "title_zh": "第42话 游玩无人岛!"}, {"cid": "13535", "title": "第43話 無人島求生!", "title_zh": "第43话 无人岛求生!"}, {"cid": "13536", "title": "第44話 人生諮詢", "title_zh": "第44话 人生咨询"}, {"cid": "13537", "title": "第45話 這樣就一筆勾銷", "title_zh": "第45话 这样就一笔勾销"}, {"cid": "13538", "title": "番外篇 逛咖啡廳", "title_zh": "番外篇 逛咖啡厅"}, {"cid": "13540", "title": "第46話 沒完成的事", "title_zh": "第46话 没完成的事"}, {"cid": "13541", "title": "第47話 返鄉", "title_zh": "第47话 返乡"}, {"cid": "13542", "title": "第48話 護照奪還作戰", "title_zh": "第48话 护照夺还作战"}, {"cid": "13544", "title": "第49話 HENTAI", "title_zh": "第49话 HENTAI"}, {"cid": "13543", "title": "第49.5話 前往帛琉", "title_zh": "第49.5话 前往帛琉"}, {"cid": "13546", "title": "第50話 再會", "title_zh": "第50话 再会"}, {"cid": "13547", "title": "第51話 帛琉的海", "title_zh": "第51话 帛琉的海"}, {"cid": "13548", "title": "第52 話 TV採訪", "title_zh": "第52 话 TV采访"}]};
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>