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-732", "mangaid": "732", "zh_title": "天才麻将少女", "hant_title": "天才麻將少女", "en_title": "天才麻将少女 (Bilimanga #732)", "author": "小林立", "tags": ["竞技", "校园", "超自然", "热血", "战斗热血", "日本漫画", "漫画", "日漫"], "zh_desc": "21世纪…有两位天才女高中生,降临在这个靠打麻将实力来左右人生的时代。\n\r\n一位是每一次都能够以正负0分的方式打完牌局的少女.宫永?。\n\r\n另一位是在全国中学生麻将大赛个人组中夺冠的少女.原村和。\n\r\n当两人的生存之道交会在一起时,热血沸腾的故事就拉开序幕了!\n\n📚 作品信息:作者 小林立 · 评分 10 · 共收录 26 卷 / 288 话章节目录与高清彩页/条漫预览。", "hant_desc": "21世紀…有兩位天才女高中生,降臨在這個靠打麻將實力來左右人生的時代。\n\r\n一位是每一次都能夠以正負0分的方式打完牌局的少女.宮永?。\n\r\n另一位是在全國中學生麻將大賽個人組中奪冠的少女.原村和。\n\r\n當兩人的生存之道交會在一起時,熱血沸騰的故事就拉開序幕了!\n\n📚 作品資訊:作者 小林立 · 評分 10 · 共收錄 26 卷 / 288 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '天才麻将少女' (天才麻將少女) by 小林立. Includes 26 volumes and 288 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-732/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-732/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-732/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-732/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-732/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-732/page_06.jpg"], "volumes": [{"title_hant": "天才麻將少女 1", "title_zh": "天才麻将少女 1", "cover_id": 1249457, "first_chap_id": 56566, "cover_url": "https://i.motiezw.com/cover/732/1249457.jpg"}, {"title_hant": "天才麻將少女 2", "title_zh": "天才麻将少女 2", "cover_id": 1249686, "first_chap_id": 56577, "cover_url": "https://i.motiezw.com/cover/732/1249686.jpg"}, {"title_hant": "天才麻將少女 3", "title_zh": "天才麻将少女 3", "cover_id": 1249888, "first_chap_id": 56587, "cover_url": "https://i.motiezw.com/cover/732/1249888.jpg"}, {"title_hant": "天才麻將少女 4", "title_zh": "天才麻将少女 4", "cover_id": 1250089, "first_chap_id": 56597, "cover_url": "https://i.motiezw.com/cover/732/1250089.jpg"}, {"title_hant": "天才麻將少女 5", "title_zh": "天才麻将少女 5", "cover_id": 1250287, "first_chap_id": 56608, "cover_url": "https://i.motiezw.com/cover/732/1250287.jpg"}, {"title_hant": "天才麻將少女 6", "title_zh": "天才麻将少女 6", "cover_id": 1250487, "first_chap_id": 56618, "cover_url": "https://i.motiezw.com/cover/732/1250487.jpg"}, {"title_hant": "天才麻將少女 7", "title_zh": "天才麻将少女 7", "cover_id": 1250672, "first_chap_id": 56628, "cover_url": "https://i.motiezw.com/cover/732/1250672.jpg"}, {"title_hant": "天才麻將少女 8", "title_zh": "天才麻将少女 8", "cover_id": 1250873, "first_chap_id": 56640, "cover_url": "https://i.motiezw.com/cover/732/1250873.jpg"}, {"title_hant": "天才麻將少女 9", "title_zh": "天才麻将少女 9", "cover_id": 1251076, "first_chap_id": 56653, "cover_url": "https://i.motiezw.com/cover/732/1251076.jpg"}, {"title_hant": "天才麻將少女 10", "title_zh": "天才麻将少女 10", "cover_id": 1251317, "first_chap_id": 56668, "cover_url": "https://i.motiezw.com/cover/732/1251317.jpg"}, {"title_hant": "天才麻將少女 11", "title_zh": "天才麻将少女 11", "cover_id": 1251524, "first_chap_id": 56682, "cover_url": "https://i.motiezw.com/cover/732/1251524.jpg"}, {"title_hant": "天才麻將少女 12", "title_zh": "天才麻将少女 12", "cover_id": 1251730, "first_chap_id": 56694, "cover_url": "https://i.motiezw.com/cover/732/1251730.jpg"}], "chapters": [{"cid": "56566", "title": "第1話【邂逅】", "title_zh": "第1话【邂逅】"}, {"cid": "56567", "title": "第2話【再次交手】", "title_zh": "第2话【再次交手】"}, {"cid": "56568", "title": "第3話/第0局【勝負】", "title_zh": "第3话/第0局【胜负】"}, {"cid": "56569", "title": "第1局【對立】", "title_zh": "第1局【对立】"}, {"cid": "56570", "title": "第2局【理由】", "title_zh": "第2局【理由】"}, {"cid": "56571", "title": "第3局【麻將館】", "title_zh": "第3局【麻将馆】"}, {"cid": "56572", "title": "第4局【玩弄】", "title_zh": "第4局【玩弄】"}, {"cid": "56573", "title": "第5局【慘敗】", "title_zh": "第5局【惨败】"}, {"cid": "56574", "title": "第6局【決心】", "title_zh": "第6局【决心】"}, {"cid": "56575", "title": "附錄", "title_zh": "附录"}, {"cid": "56577", "title": "第7話【預賽】", "title_zh": "第7话【预赛】"}, {"cid": "56578", "title": "第8話【初次上陣】", "title_zh": "第8话【初次上阵】"}, {"cid": "56579", "title": "第9話【降臨】", "title_zh": "第9话【降临】"}, {"cid": "56580", "title": "第10局【最快】", "title_zh": "第10局【最快】"}, {"cid": "56581", "title": "第11局【傳統】", "title_zh": "第11局【传统】"}, {"cid": "56582", "title": "第12局【四強】", "title_zh": "第12局【四强】"}, {"cid": "56583", "title": "第13局【掠奪】", "title_zh": "第13局【掠夺】"}, {"cid": "56584", "title": "第14局【前進】", "title_zh": "第14局【前进】"}, {"cid": "56585", "title": "第15局【開眼】", "title_zh": "第15局【开眼】"}, {"cid": "56587", "title": "第16話【危急】", "title_zh": "第16话【危急】"}, {"cid": "56588", "title": "第17話【外行人】", "title_zh": "第17话【外行人】"}, {"cid": "56590", "title": "第19局【預兆】", "title_zh": "第19局【预兆】"}, {"cid": "56591", "title": "第20局【社長】", "title_zh": "第20局【社长】"}, {"cid": "56592", "title": "第21局【裂帛】", "title_zh": "第21局【裂帛】"}, {"cid": "56593", "title": "第22局【魔術】", "title_zh": "第22局【魔术】"}, {"cid": "56594", "title": "第23局【追擊】", "title_zh": "第23局【追击】"}, {"cid": "56595", "title": "第24局【換手】", "title_zh": "第24局【换手】"}, {"cid": "56597", "title": "第25局【朋友】", "title_zh": "第25局【朋友】"}, {"cid": "56598", "title": "第26局【理論】", "title_zh": "第26局【理论】"}, {"cid": "56599", "title": "第27局【未完】", "title_zh": "第27局【未完】"}, {"cid": "56600", "title": "第28局【變異】", "title_zh": "第28局【变异】"}, {"cid": "56601", "title": "第29局【別人】", "title_zh": "第29局【别人】"}, {"cid": "56602", "title": "第30局【全勝】", "title_zh": "第30局【全胜】"}, {"cid": "56603", "title": "第31局【阻止】", "title_zh": "第31局【阻止】"}, {"cid": "56604", "title": "第32局【學姊】", "title_zh": "第32局【学姊】"}, {"cid": "56605", "title": "第33局【分出勝負】", "title_zh": "第33局【分出胜负】"}, {"cid": "56606", "title": "番外篇", "title_zh": "番外篇"}, {"cid": "56608", "title": "第34局【魔物】", "title_zh": "第34局【魔物】"}, {"cid": "56609", "title": "第35局【混亂】", "title_zh": "第35局【混乱】"}, {"cid": "56610", "title": "第36局【滿月】", "title_zh": "第36局【满月】"}, {"cid": "56611", "title": "第37局【海底】", "title_zh": "第37局【海底】"}, {"cid": "56612", "title": "第38局【串通】", "title_zh": "第38局【串通】"}, {"cid": "56613", "title": "第39局【命運】", "title_zh": "第39局【命运】"}, {"cid": "56615", "title": "第41局【自信】", "title_zh": "第41局【自信】"}, {"cid": "56616", "title": "第42局【惡夢】", "title_zh": "第42局【恶梦】"}, {"cid": "56618", "title": "第43局【困境】", "title_zh": "第43局【困境】"}, {"cid": "56619", "title": "第44局【咆哮】", "title_zh": "第44局【咆哮】"}, {"cid": "56620", "title": "第45局【解放】", "title_zh": "第45局【解放】"}, {"cid": "56621", "title": "第46局【摆脱】", "title_zh": "第46局【摆脱】"}, {"cid": "56622", "title": "第47局【小牌】", "title_zh": "第47局【小牌】"}, {"cid": "56623", "title": "第48局【超越】", "title_zh": "第48局【超越】"}, {"cid": "56624", "title": "第49局【本领】", "title_zh": "第49局【本领】"}, {"cid": "56625", "title": "第50局【怒涛】", "title_zh": "第50局【怒涛】"}, {"cid": "56626", "title": "番外篇", "title_zh": "番外篇"}, {"cid": "56628", "title": "第51局【迷亂】", "title_zh": "第51局【迷乱】"}, {"cid": "56629", "title": "第52局【開花】", "title_zh": "第52局【开花】"}, {"cid": "56630", "title": "第53局【勝利】", "title_zh": "第53局【胜利】"}, {"cid": "56631", "title": "第54局【餘韻】", "title_zh": "第54局【余韵】"}, {"cid": "56632", "title": "第55局【隨想】", "title_zh": "第55局【随想】"}, {"cid": "56633", "title": "第56局【全國】", "title_zh": "第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>