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-1101", "mangaid": "1101", "zh_title": "濑户的花嫁", "hant_title": "瀨戶的花嫁", "en_title": "濑户的花嫁 (Bilimanga #1101)", "author": "木村太彦", "tags": ["奇幻", "校园", "日常", "恋爱", "后宫", "人外", "恶役", "欢乐"], "zh_desc": "满潮永澄是住在埼玉县极普通高中生,某日来到祖母所在的居住濑户内海游玩,不小心跌落到了海中。快要被淹死了的永澄被一位美丽的人鱼少女濑户灿救起,灿借此机会向永澄求婚,但遭到灿的父亲豪三郎的极力反对!\n\r\n原来豪三郎是人鱼族的黑社会集团濑户内鱼类连合「濑户组」的老大!永澄因为得知了人鱼族存在的秘密而遭到黑社会的追杀?!\n\r\n不过灿的母亲、豪三郎的妻子莲以及濑户组干部政的理解下,永澄平安无事的回到了埼玉的家中。灿却追随著永澄来到他就读的矶野第三中学校,充满暴力(?! )风情的青春爱情喜剧就此拉开帷幕!\n\n📚 作品信息:作者 木村太彦 · 评分 10 · 共收录 16 卷 / 78 话章节目录与高清彩页/条漫预览。", "hant_desc": "滿潮永澄是住在埼玉縣極普通高中生,某日來到祖母所在的居住瀨戶內海遊玩,不小心跌落到了海中。快要被淹死了的永澄被一位美麗的人魚少女瀨戶燦救起,燦藉此機會向永澄求婚,但遭到燦的父親豪三郎的極力反對!\n\r\n原來豪三郎是人魚族的黑社會集團瀨戶內魚類連合「瀨戶組」的老大!永澄因為得知了人魚族存在的秘密而遭到黑社會的追殺?!\n\r\n不過燦的母親、豪三郎的妻子蓮以及瀨戶組幹部政的理解下,永澄平安無事的回到了埼玉的家中。燦卻追隨著永澄來到他就讀的磯野第三中學校,充滿暴力(?! )風情的青春愛情喜劇就此拉開帷幕!\n\n📚 作品資訊:作者 木村太彥 · 評分 10 · 共收錄 16 卷 / 78 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '濑户的花嫁' (瀨戶的花嫁) by 木村太彦. Includes 16 volumes and 78 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1101/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1101/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1101/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1101/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1101/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1101/page_06.jpg"], "volumes": [{"title_hant": "瀨戶的花嫁 1", "title_zh": "濑户的花嫁 1", "cover_id": 1979912, "first_chap_id": 92569, "cover_url": "https://i.motiezw.com/cover/1101/1979912.jpg"}, {"title_hant": "瀨戶的花嫁 2", "title_zh": "濑户的花嫁 2", "cover_id": 1985114, "first_chap_id": 92793, "cover_url": "https://i.motiezw.com/cover/1101/1985114.jpg"}, {"title_hant": "瀨戶的花嫁 3", "title_zh": "濑户的花嫁 3", "cover_id": 1987301, "first_chap_id": 92873, "cover_url": "https://i.motiezw.com/cover/1101/1987301.jpg"}, {"title_hant": "瀨戶的花嫁 4", "title_zh": "濑户的花嫁 4", "cover_id": 1987479, "first_chap_id": 92879, "cover_url": "https://i.motiezw.com/cover/1101/1987479.jpg"}, {"title_hant": "瀨戶的花嫁 5", "title_zh": "濑户的花嫁 5", "cover_id": 1987662, "first_chap_id": 92885, "cover_url": "https://i.motiezw.com/cover/1101/1987662.jpg"}, {"title_hant": "瀨戶的花嫁 6", "title_zh": "濑户的花嫁 6", "cover_id": 1987835, "first_chap_id": 92891, "cover_url": "https://i.motiezw.com/cover/1101/1987835.jpg"}, {"title_hant": "瀨戶的花嫁 7", "title_zh": "濑户的花嫁 7", "cover_id": 1988011, "first_chap_id": 92896, "cover_url": "https://i.motiezw.com/cover/1101/1988011.jpg"}, {"title_hant": "瀨戶的花嫁 8", "title_zh": "濑户的花嫁 8", "cover_id": 1988184, "first_chap_id": 92901, "cover_url": "https://i.motiezw.com/cover/1101/1988184.jpg"}, {"title_hant": "瀨戶的花嫁 9", "title_zh": "濑户的花嫁 9", "cover_id": 1988358, "first_chap_id": 92907, "cover_url": "https://i.motiezw.com/cover/1101/1988358.jpg"}, {"title_hant": "瀨戶的花嫁 10", "title_zh": "濑户的花嫁 10", "cover_id": 1988535, "first_chap_id": 92912, "cover_url": "https://i.motiezw.com/cover/1101/1988535.jpg"}, {"title_hant": "瀨戶的花嫁 11", "title_zh": "濑户的花嫁 11", "cover_id": 1991822, "first_chap_id": 93048, "cover_url": "https://i.motiezw.com/cover/1101/1991822.jpg"}, {"title_hant": "瀨戶的花嫁 12", "title_zh": "濑户的花嫁 12", "cover_id": 1991993, "first_chap_id": 93053, "cover_url": "https://i.motiezw.com/cover/1101/1991993.jpg"}], "chapters": [{"cid": "92569", "title": "WAVE.1 黑酒的妻子", "title_zh": "WAVE.1 黑酒的妻子"}, {"cid": "92570", "title": "WAVE.2 不可能的任務", "title_zh": "WAVE.2 不可能的任务"}, {"cid": "92571", "title": "WAVE.3 全鎮孟蘭盆節大會?", "title_zh": "WAVE.3 全镇孟兰盆节大会?"}, {"cid": "92572", "title": "WAVE.4 靠天國最近的島", "title_zh": "WAVE.4 靠天国最近的岛"}, {"cid": "92573", "title": "WAVE.5 再見的季節", "title_zh": "WAVE.5 再见的季节"}, {"cid": "92793", "title": "WAVE.6 我們溫暖的家", "title_zh": "WAVE.6 我们温暖的家"}, {"cid": "92794", "title": "WAVE.7 朋友", "title_zh": "WAVE.7 朋友"}, {"cid": "92795", "title": "WAVE.8 男人真命苦", "title_zh": "WAVE.8 男人真命苦"}, {"cid": "92796", "title": "WAVE.9 逆噴射傢族", "title_zh": "WAVE.9 逆喷射家族"}, {"cid": "92797", "title": "WAVE.10 男N之間", "title_zh": "WAVE.10 男N之间"}, {"cid": "92873", "title": "WAVE.11 小姐、請手下留Q", "title_zh": "WAVE.11 小姐、请手下留Q"}, {"cid": "92874", "title": "WAVE.12 來訪者", "title_zh": "WAVE.12 来访者"}, {"cid": "92875", "title": "WAVE.13 對抗", "title_zh": "WAVE.13 对抗"}, {"cid": "92876", "title": "WAVE.14 激戰", "title_zh": "WAVE.14 激战"}, {"cid": "92877", "title": "WAVE.15 鋼鐵之男", "title_zh": "WAVE.15 钢铁之男"}, {"cid": "92879", "title": "WAVE.16 戀人,請回到我的懷裡!", "title_zh": "WAVE.16 恋人,请回到我的怀里!"}, {"cid": "92880", "title": "WAVE.17 戰鬥極速者", "title_zh": "WAVE.17 战斗极速者"}, {"cid": "92881", "title": "WAVE.18 不死之男", "title_zh": "WAVE.18 不死之男"}, {"cid": "92882", "title": "WAVE.19 巨人", "title_zh": "WAVE.19 巨人"}, {"cid": "92883", "title": "WAVE.20 私人授課", "title_zh": "WAVE.20 私人授课"}, {"cid": "92885", "title": "WAVE.21 愛的駑隸", "title_zh": "WAVE.21 爱的驽隶"}, {"cid": "92886", "title": "WAVE.22 父親的願望", "title_zh": "WAVE.22 父亲的愿望"}, {"cid": "92887", "title": "番外篇 瀨戶組的聖誕節", "title_zh": "番外篇 濑户组的圣诞节"}, {"cid": "92888", "title": "WAVE.23 小貓物語", "title_zh": "WAVE.23 小猫物语"}, {"cid": "92889", "title": "WAVE.24 你的名字", "title_zh": "WAVE.24 你的名字"}, {"cid": "92891", "title": "WAVE.25 少數派報告", "title_zh": "WAVE.25 少数派报告"}, {"cid": "92892", "title": "WAVE.26 麻煩旅行", "title_zh": "WAVE.26 麻烦旅行"}, {"cid": "92893", "title": "WAVE.27 雙重時刻,雙人時光", "title_zh": "WAVE.27 双重时刻,双人时光"}, {"cid": "92894", "title": "WAVE.28 池田屋事件", "title_zh": "WAVE.28 池田屋事件"}, {"cid": "92896", "title": "WAVE.29 GO JOE", "title_zh": "WAVE.29 GO JOE"}, {"cid": "92897", "title": "WAVE.30 男人們的挽歌", "title_zh": "WAVE.30 男人们的挽歌"}, {"cid": "92898", "title": "WAVE.31 戀愛的搔動", "title_zh": "WAVE.31 恋爱的搔动"}, {"cid": "92899", "title": "WAVE.32 你的歸所", "title_zh": "WAVE.32 你的归所"}, {"cid": "92901", "title": "WAVE.33 沒有過去的男人", "title_zh": "WAVE.33 没有过去的男人"}, {"cid": "92902", "title": "WAVE.34 到戀人的距離 (Distanoe)", "title_zh": "WAVE.34 到恋人的距离 (Distanoe)"}, {"cid": "92903", "title": "WAVE.35 腹語術很愉快", "title_zh": "WAVE.35 腹语术很愉快"}, {"cid": "92904", "title": "WAVE.36 愛與平成的M男子", "title_zh": "WAVE.36 爱与平成的M男子"}, {"cid": "92905", "title": "WAVE.37 記憶的旅人", "title_zh": "WAVE.37 记忆的旅人"}, {"cid": "92907", "title": "WAVE.38 沒有你的話", "title_zh": "WAVE.38 没有你的话"}, {"cid": "92908", "title": "WAVE.39 KING KONG", "title_zh": "WAVE.39 KING KONG"}, {"cid": "92910", "title": "WAVE.41 SCHOOL OF LOCK", "title_zh": "WAVE.41 SCHOOL OF LOCK"}, {"cid": "92912", "title": "WAVE.42 N杰族", "title_zh": "WAVE.42 N杰族"}, {"cid": "92913", "title": "WAVE.43 能夠為你做的事", "title_zh": "WAVE.43 能够为你做的事"}, {"cid": "92914", "title": "WAVE.44 兄妹", "title_zh": "WAVE.44 兄妹"}, {"cid": "92915", "title": "WAVE.45 妖精之尾", "title_zh": "WAVE.45 妖精之尾"}, {"cid": "92916", "title": "WAVE.46 食人族", "title_zh": "WAVE.46 食人族"}, {"cid": "93048", "title": "WAVE.47 我是地獄魔術師", "title_zh": "WAVE.47 我是地狱魔术师"}, {"cid": "93049", "title": "WAVE.48 最佳拍檔", "title_zh": "WAVE.48 最佳拍档"}, {"cid": "93050", "title": "WAVE.49 天空隊長", "title_zh": "WAVE.49 天空队长"}, {"cid": "93051", "title": "WAVE.50 百合傳說", "title_zh": "WAVE.50 百合传说"}, {"cid": "93053", "title": "WAVE.51 布萊布的故事", "title_zh": "WAVE.51 布莱布的故事"}, {"cid": "93054", "title": "番外篇 穿越時空的少N", "title_zh": "番外篇 穿越时空的少N"}, {"cid": "93055", "title": "WAVE.52 馬上約會", "title_zh": "WAVE.52 马上约会"}, {"cid": "93056", "title": "WAVE.53 愛的世界", "title_zh": "WAVE.53 爱的世界"}, {"cid": "93057", "title": "WAVE.54 聖誕節前的騎士", "title_zh": "WAVE.54 圣诞节前的骑士"}, {"cid": "93059", "title": "WAVE.55 普渡世間惡人的好人們", "title_zh": "WAVE.55 普渡世间恶人的好人们"}, {"cid": "93060", "title": "WAVE.56 武士的面子", "title_zh": "WAVE.56 武士的面子"}, {"cid": "93061", "title": "WAVE.57 哥哥的風度", "title_zh": "WAVE.57 哥哥的风度"}, {"cid": "93062", "title": "WAVE.58 即使那樣我也做不了", "title_zh": "WAVE.58 即使那样我也做不了"}, {"cid": "93063", "title": "WAVE.59 黑幫老大妻子們的差別", "title_zh": "WAVE.59 黑帮老大妻子们的差别"}]};
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>