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-1067", "mangaid": "1067", "zh_title": "我家有个鱼干妹", "hant_title": "我家有個魚乾妹", "en_title": "我家有个鱼干妹 (Bilimanga #1067)", "author": "三角头", "tags": ["校园", "日常", "恋爱", "欢乐", "萌系", "治愈温馨", "日本漫画", "漫画"], "zh_desc": "我的妹妹「小埋」是个容貌秀丽!文武双全!\n\r\n任谁都会羡慕的完美女高中生♥\n\r\n而这个美少女妹妹她有个不为人知的秘密!!\n\r\n每当她一进入家门后就会……\n\r\n这里滚呀滚♪那里滚呀滚♪\n\r\n过著「吃、睡、玩」的鱼干妹生活!?\n\r\n追踪在家耍任性在外是气质美女「小埋」的生态!\n\n📚 作品信息:作者 三角头 · 评分 10 · 共收录 12 卷 / 226 话章节目录与高清彩页/条漫预览。", "hant_desc": "我的妹妹「小埋」是個容貌秀麗!文武雙全!\n\r\n任誰都會羨慕的完美女高中生♥\n\r\n而這個美少女妹妹她有個不為人知的祕密!!\n\r\n每當她一進入家門後就會……\n\r\n這裡滾呀滾♪那裡滾呀滾♪\n\r\n過著「吃、睡、玩」的魚乾妹生活!?\n\r\n追蹤在家耍任性在外是氣質美女「小埋」的生態!\n\n📚 作品資訊:作者 三角頭 · 評分 10 · 共收錄 12 卷 / 226 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '我家有个鱼干妹' (我家有個魚乾妹) by 三角头. Includes 12 volumes and 226 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1067/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1067/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1067/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1067/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1067/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1067/page_06.jpg"], "volumes": [{"title_hant": "我家有個魚乾妹 1", "title_zh": "我家有个鱼干妹 1", "cover_id": 1905741, "first_chap_id": 88470, "cover_url": "https://i.motiezw.com/cover/1067/1905741.jpg"}, {"title_hant": "我家有個魚乾妹 2", "title_zh": "我家有个鱼干妹 2", "cover_id": 1905759, "first_chap_id": 88491, "cover_url": "https://i.motiezw.com/cover/1067/1905759.jpg"}, {"title_hant": "我家有個魚乾妹 3", "title_zh": "我家有个鱼干妹 3", "cover_id": 1905939, "first_chap_id": 88512, "cover_url": "https://i.motiezw.com/cover/1067/1905939.jpg"}, {"title_hant": "我家有個魚乾妹 4", "title_zh": "我家有个鱼干妹 4", "cover_id": 1906118, "first_chap_id": 88532, "cover_url": "https://i.motiezw.com/cover/1067/1906118.jpg"}, {"title_hant": "我家有個魚乾妹 5", "title_zh": "我家有个鱼干妹 5", "cover_id": 1906306, "first_chap_id": 88553, "cover_url": "https://i.motiezw.com/cover/1067/1906306.jpg"}, {"title_hant": "我家有個魚乾妹 6", "title_zh": "我家有个鱼干妹 6", "cover_id": 1906487, "first_chap_id": 88573, "cover_url": "https://i.motiezw.com/cover/1067/1906487.jpg"}, {"title_hant": "我家有個魚乾妹 7", "title_zh": "我家有个鱼干妹 7", "cover_id": 1906668, "first_chap_id": 88594, "cover_url": "https://i.motiezw.com/cover/1067/1906668.jpg"}, {"title_hant": "我家有個魚乾妹 8", "title_zh": "我家有个鱼干妹 8", "cover_id": 1906852, "first_chap_id": 88614, "cover_url": "https://i.motiezw.com/cover/1067/1906852.jpg"}, {"title_hant": "我家有個魚乾妹 9", "title_zh": "我家有个鱼干妹 9", "cover_id": 1907032, "first_chap_id": 88635, "cover_url": "https://i.motiezw.com/cover/1067/1907032.jpg"}, {"title_hant": "我家有個魚乾妹 10", "title_zh": "我家有个鱼干妹 10", "cover_id": 1907212, "first_chap_id": 88656, "cover_url": "https://i.motiezw.com/cover/1067/1907212.jpg"}, {"title_hant": "我家有個魚乾妹 11", "title_zh": "我家有个鱼干妹 11", "cover_id": 1907393, "first_chap_id": 88677, "cover_url": "https://i.motiezw.com/cover/1067/1907393.jpg"}, {"title_hant": "我家有個魚乾妹 12", "title_zh": "我家有个鱼干妹 12", "cover_id": 1907566, "first_chap_id": 88697, "cover_url": "https://i.motiezw.com/cover/1067/1907566.jpg"}], "chapters": [{"cid": "88470", "title": "1 小埋與哥哥", "title_zh": "1 小埋与哥哥"}, {"cid": "88471", "title": "2 小埋與學校", "title_zh": "2 小埋与学校"}, {"cid": "88472", "title": "3 小埋與假日", "title_zh": "3 小埋与假日"}, {"cid": "88473", "title": "4 小埋的M食", "title_zh": "4 小埋的M食"}, {"cid": "88474", "title": "5 和小埋一起出門", "title_zh": "5 和小埋一起出门"}, {"cid": "88475", "title": "6 小埋與寵物", "title_zh": "6 小埋与宠物"}, {"cid": "88476", "title": "7 小埋與壽喜燒", "title_zh": "7 小埋与寿喜烧"}, {"cid": "88477", "title": "8 小埋與朋友", "title_zh": "8 小埋与朋友"}, {"cid": "88478", "title": "9 小埋與猜拳大賽", "title_zh": "9 小埋与猜拳大赛"}, {"cid": "88479", "title": "10 小埋與黃金週", "title_zh": "10 小埋与黄金周"}, {"cid": "88480", "title": "11 和小埋吵架了", "title_zh": "11 和小埋吵架了"}, {"cid": "88481", "title": "12 小埋與電玩店", "title_zh": "12 小埋与电玩店"}, {"cid": "88482", "title": "13 小埋與外食", "title_zh": "13 小埋与外食"}, {"cid": "88483", "title": "14 哥哥的一天", "title_zh": "14 哥哥的一天"}, {"cid": "88484", "title": "15 小埋與讀書", "title_zh": "15 小埋与读书"}, {"cid": "88485", "title": "16 小埋與修理", "title_zh": "16 小埋与修理"}, {"cid": "88486", "title": "17 小埋與購物", "title_zh": "17 小埋与购物"}, {"cid": "88487", "title": "18 小埋與切糖", "title_zh": "18 小埋与切糖"}, {"cid": "88488", "title": "小時候的小埋", "title_zh": "小时候的小埋"}, {"cid": "88489", "title": "短篇版小埋", "title_zh": "短篇版小埋"}, {"cid": "88491", "title": "19 小埋與切繪②", "title_zh": "19 小埋与切绘②"}, {"cid": "88492", "title": "20 小埋與夏天", "title_zh": "20 小埋与夏天"}, {"cid": "88494", "title": "22 小埋與感冒", "title_zh": "22 小埋与感冒"}, {"cid": "88495", "title": "23 小埋與便常", "title_zh": "23 小埋与便常"}, {"cid": "88496", "title": "24 小埋與拉麵", "title_zh": "24 小埋与拉面"}, {"cid": "88497", "title": "25 小埋與新朋友", "title_zh": "25 小埋与新朋友"}, {"cid": "88498", "title": "26 小埋與恐怖電影", "title_zh": "26 小埋与恐怖电影"}, {"cid": "88499", "title": "27 小埋與房間", "title_zh": "27 小埋与房间"}, {"cid": "88500", "title": "28 小埋與人生遊戲", "title_zh": "28 小埋与人生游戏"}, {"cid": "88501", "title": "29 小埋的生日", "title_zh": "29 小埋的生日"}, {"cid": "88502", "title": "30 品哥的施团", "title_zh": "30 品哥的施团"}, {"cid": "88503", "title": "31 小埋與散歩", "title_zh": "31 小埋与散歩"}, {"cid": "88504", "title": "31.5 小埋與頭巾", "title_zh": "31.5 小埋与头巾"}, {"cid": "88505", "title": "32 小埋與時尚", "title_zh": "32 小埋与时尚"}, {"cid": "88506", "title": "33 小埋與凡場", "title_zh": "33 小埋与凡场"}, {"cid": "88507", "title": "34 小埋與布了", "title_zh": "34 小埋与布了"}, {"cid": "88508", "title": "稍早之前的海老名", "title_zh": "稍早之前的海老名"}, {"cid": "88509", "title": "短篇版小埋其之②", "title_zh": "短篇版小埋其之②"}, {"cid": "88510", "title": "短篇版小埋其之③", "title_zh": "短篇版小埋其之③"}, {"cid": "88512", "title": "35 小埋與網路", "title_zh": "35 小埋与网路"}, {"cid": "88513", "title": "36 小埋與漫畫喫茶", "title_zh": "36 小埋与漫画吃茶"}, {"cid": "88514", "title": "37 小埋與餐會", "title_zh": "37 小埋与餐会"}, {"cid": "88515", "title": "38 小埋與暖桌", "title_zh": "38 小埋与暖桌"}, {"cid": "88516", "title": "39 小埋與餅乾", "title_zh": "39 小埋与饼干"}, {"cid": "88517", "title": "40 小埋與百圓商店", "title_zh": "40 小埋与百圆商店"}, {"cid": "88519", "title": "42 小埋與汽車", "title_zh": "42 小埋与汽车"}, {"cid": "88520", "title": "43 小埋與除夕夜", "title_zh": "43 小埋与除夕夜"}, {"cid": "88521", "title": "44 小埋與新年", "title_zh": "44 小埋与新年"}, {"cid": "88522", "title": "45 小埋與恐怖遊戲", "title_zh": "45 小埋与恐怖游戏"}, {"cid": "88523", "title": "46 小埋與網球", "title_zh": "46 小埋与网球"}, {"cid": "88524", "title": "47 哥哥與回憶", "title_zh": "47 哥哥与回忆"}, {"cid": "88525", "title": "48 小埋與Q人節", "title_zh": "48 小埋与Q人节"}, {"cid": "88526", "title": "49 小埋與壽司", "title_zh": "49 小埋与寿司"}, {"cid": "88527", "title": "50 小埋不在家", "title_zh": "50 小埋不在家"}, {"cid": "88528", "title": "51 小埋忍耐中", "title_zh": "51 小埋忍耐中"}, {"cid": "88529", "title": "52 小埋與電玩比賽①", "title_zh": "52 小埋与电玩比赛①"}, {"cid": "88530", "title": "聖誕夜的哥哥們", "title_zh": "圣诞夜的哥哥们"}, {"cid": "88532", "title": "53 小埋與電玩比賽②", "title_zh": "53 小埋与电玩比赛②"}, {"cid": "88533", "title": "54 小埋與動畫", "title_zh": "54 小埋与动画"}, {"cid": "88534", "title": "55 小埋與春天", "title_zh": "55 小埋与春天"}]};
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>