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-1578", "mangaid": "1578", "zh_title": "这个美术社大有问题!", "hant_title": "這個美術社大有問題!", "en_title": "这个美术社大有问题! (Bilimanga #1578)", "author": "いみぎむる", "tags": ["校园", "恋爱", "青春", "日常", "欢乐", "校园青春", "日本漫画", "漫画"], "zh_desc": "在某所中学的美术社里,有一位具有绘画天赋,\n\r\n却只对画「理想的二次元新娘」感兴趣的男孩——\n\r\n在以这名男孩为中心的美术社里,\n\r\n还聚集了有点令人惋惜的人们。\n\r\n不晓得今天又会发生什么事……\n\n📚 作品信息:作者 いみぎむる · 评分 10 · 共收录 15 卷 / 98 话章节目录与高清彩页/条漫预览。", "hant_desc": "在某所中學的美術社裡,有一位具有繪畫天賦,\n\r\n卻只對畫「理想的二次元新娘」感興趣的男孩——\n\r\n在以這名男孩為中心的美術社裡,\n\r\n還聚集了有點令人惋惜的人們。\n\r\n不曉得今天又會發生什麼事……\n\n📚 作品資訊:作者 いみぎむる · 評分 10 · 共收錄 15 卷 / 98 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '这个美术社大有问题!' (這個美術社大有問題!) by いみぎむる. Includes 15 volumes and 98 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1578/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1578/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1578/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1578/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1578/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1578/page_06.jpg"], "volumes": [{"title_hant": "這個美術社大有問題! 1", "title_zh": "这个美术社大有问题! 1", "cover_id": 2855351, "first_chap_id": 130530, "cover_url": "https://i.motiezw.com/cover/1578/2855351.jpg"}, {"title_hant": "這個美術社大有問題! 2", "title_zh": "这个美术社大有问题! 2", "cover_id": 2855529, "first_chap_id": 130537, "cover_url": "https://i.motiezw.com/cover/1578/2855529.jpg"}, {"title_hant": "這個美術社大有問題! 3", "title_zh": "这个美术社大有问题! 3", "cover_id": 2855708, "first_chap_id": 130545, "cover_url": "https://i.motiezw.com/cover/1578/2855708.jpg"}, {"title_hant": "這個美術社大有問題! 4", "title_zh": "这个美术社大有问题! 4", "cover_id": 2855887, "first_chap_id": 130554, "cover_url": "https://i.motiezw.com/cover/1578/2855887.jpg"}, {"title_hant": "這個美術社大有問題! 5", "title_zh": "这个美术社大有问题! 5", "cover_id": 2856066, "first_chap_id": 130562, "cover_url": "https://i.motiezw.com/cover/1578/2856066.jpg"}, {"title_hant": "這個美術社大有問題! 6", "title_zh": "这个美术社大有问题! 6", "cover_id": 2856245, "first_chap_id": 130571, "cover_url": "https://i.motiezw.com/cover/1578/2856245.jpg"}, {"title_hant": "這個美術社大有問題! 7", "title_zh": "这个美术社大有问题! 7", "cover_id": 2856424, "first_chap_id": 130579, "cover_url": "https://i.motiezw.com/cover/1578/2856424.jpg"}, {"title_hant": "這個美術社大有問題! 8", "title_zh": "这个美术社大有问题! 8", "cover_id": 2856603, "first_chap_id": 130587, "cover_url": "https://i.motiezw.com/cover/1578/2856603.jpg"}, {"title_hant": "這個美術社大有問題! 9", "title_zh": "这个美术社大有问题! 9", "cover_id": 2856782, "first_chap_id": 130594, "cover_url": "https://i.motiezw.com/cover/1578/2856782.jpg"}, {"title_hant": "這個美術社大有問題! 10", "title_zh": "这个美术社大有问题! 10", "cover_id": 2856961, "first_chap_id": 130601, "cover_url": "https://i.motiezw.com/cover/1578/2856961.jpg"}, {"title_hant": "這個美術社大有問題! 11", "title_zh": "这个美术社大有问题! 11", "cover_id": 2857124, "first_chap_id": 130608, "cover_url": "https://i.motiezw.com/cover/1578/2857124.jpg"}, {"title_hant": "這個美術社大有問題! 12", "title_zh": "这个美术社大有问题! 12", "cover_id": 2857286, "first_chap_id": 130616, "cover_url": "https://i.motiezw.com/cover/1578/2857286.jpg"}], "chapters": [{"cid": "130530", "title": "作品1 大有問題的一群人", "title_zh": "作品1 大有问题的一群人"}, {"cid": "130531", "title": "作品2 M術社社長凶殺案", "title_zh": "作品2 M术社社长凶杀案"}, {"cid": "130532", "title": "作品3 再見了內卷", "title_zh": "作品3 再见了内卷"}, {"cid": "130533", "title": "作品4 失物何處尋?", "title_zh": "作品4 失物何处寻?"}, {"cid": "130534", "title": "作品5 來畫海報吧!", "title_zh": "作品5 来画海报吧!"}, {"cid": "130535", "title": "作品6 飛天可蕾特", "title_zh": "作品6 飞天可蕾特"}, {"cid": "130537", "title": "作品7 短鮑伯", "title_zh": "作品7 短鲍伯"}, {"cid": "130538", "title": "作品8 歡迎來到M術社", "title_zh": "作品8 欢迎来到M术社"}, {"cid": "130539", "title": "作品9 Q書風波", "title_zh": "作品9 Q书风波"}, {"cid": "130540", "title": "作品10 好孩子壞孩子迷路的孩子", "title_zh": "作品10 好孩子坏孩子迷路的孩子"}, {"cid": "130541", "title": "作品11 誤會一連串", "title_zh": "作品11 误会一连串"}, {"cid": "130542", "title": "作品12 逐漸靠近的彼此", "title_zh": "作品12 逐渐靠近的彼此"}, {"cid": "130543", "title": "番外篇 宇佐M似乎是超能力者", "title_zh": "番外篇 宇佐M似乎是超能力者"}, {"cid": "130545", "title": "作品13 鴿子、人魚和清掃游泳池", "title_zh": "作品13 鸽子、人鱼和清扫游泳池"}, {"cid": "130546", "title": "作品14 可蕾散步", "title_zh": "作品14 可蕾散步"}, {"cid": "130547", "title": "作品15 飲料罐間接接溫", "title_zh": "作品15 饮料罐间接接温"}, {"cid": "130548", "title": "作品16 動搖的特質", "title_zh": "作品16 动摇的特质"}, {"cid": "130549", "title": "作品17 打發時間的方法", "title_zh": "作品17 打发时间的方法"}, {"cid": "130550", "title": "作品18 第一次的合作繪畫…?(上篇)", "title_zh": "作品18 第一次的合作绘画…?(上篇)"}, {"cid": "130551", "title": "作品19 第一次的合作繪畫…?(下篇)", "title_zh": "作品19 第一次的合作绘画…?(下篇)"}, {"cid": "130552", "title": "番外篇 裡面的人", "title_zh": "番外篇 里面的人"}, {"cid": "130554", "title": "作品20 謎樣M少N轉學生", "title_zh": "作品20 谜样M少N转学生"}, {"cid": "130555", "title": "作品21 令人在意的兩人", "title_zh": "作品21 令人在意的两人"}, {"cid": "130556", "title": "作品22 購物", "title_zh": "作品22 购物"}, {"cid": "130557", "title": "作品23 同好們,集結吧!", "title_zh": "作品23 同好们,集结吧!"}, {"cid": "130558", "title": "作品24 祕密房間(上篇)", "title_zh": "作品24 秘密房间(上篇)"}, {"cid": "130559", "title": "作品25 祕密房間(下篇)", "title_zh": "作品25 秘密房间(下篇)"}, {"cid": "130560", "title": "作品26 Let's Treasure Hunt!", "title_zh": "作品26 Let's Treasure Hunt!"}, {"cid": "130562", "title": "作品27 回憶的綠松S", "title_zh": "作品27 回忆的绿松S"}, {"cid": "130563", "title": "番外篇 挑戰者再現", "title_zh": "番外篇 挑战者再现"}, {"cid": "130564", "title": "作品28 伊萬莉大師", "title_zh": "作品28 伊万莉大师"}, {"cid": "130565", "title": "作品29 尋找魔導書!", "title_zh": "作品29 寻找魔导书!"}, {"cid": "130566", "title": "作品30 宇佐M補習班", "title_zh": "作品30 宇佐M补习班"}, {"cid": "130567", "title": "作品31 團結!空罐藝術(上篇)", "title_zh": "作品31 团结!空罐艺术(上篇)"}, {"cid": "130568", "title": "作品32 團結!空罐藝術(下篇)", "title_zh": "作品32 团结!空罐艺术(下篇)"}, {"cid": "130569", "title": "番外篇 空罐藝術之後日談", "title_zh": "番外篇 空罐艺术之后日谈"}, {"cid": "130571", "title": "作品33 我愛宇佐M", "title_zh": "作品33 我爱宇佐M"}, {"cid": "130572", "title": "作品34 萌萌散步", "title_zh": "作品34 萌萌散步"}, {"cid": "130573", "title": "作品35 第一次寫Q書(上篇)", "title_zh": "作品35 第一次写Q书(上篇)"}, {"cid": "130574", "title": "作品36 第一次寫Q書(下篇)", "title_zh": "作品36 第一次写Q书(下篇)"}, {"cid": "130575", "title": "作品37 第一次抽籤大會", "title_zh": "作品37 第一次抽签大会"}, {"cid": "130576", "title": "作品38 社長與乃乃花", "title_zh": "作品38 社长与乃乃花"}, {"cid": "130577", "title": "作品39 兩人共撐一把傘", "title_zh": "作品39 两人共撑一把伞"}, {"cid": "130579", "title": "作品40 禮物", "title_zh": "作品40 礼物"}, {"cid": "130580", "title": "作品41 某天的社辦", "title_zh": "作品41 某天的社办"}, {"cid": "130581", "title": "作品42 發掘!祕密DVD", "title_zh": "作品42 发掘!秘密DVD"}, {"cid": "130582", "title": "作品43 昂子風波", "title_zh": "作品43 昂子风波"}, {"cid": "130583", "title": "作品44 M術社海邊行(上篇)", "title_zh": "作品44 M术社海边行(上篇)"}, {"cid": "130584", "title": "作品45 M術社海邊行(下篇)", "title_zh": "作品45 M术社海边行(下篇)"}, {"cid": "130585", "title": "番外篇 被盯上的內卷昂", "title_zh": "番外篇 被盯上的内卷昂"}, {"cid": "130587", "title": "作品46 瑞希寫生", "title_zh": "作品46 瑞希写生"}, {"cid": "130588", "title": "作品47 環保繼承者", "title_zh": "作品47 环保继承者"}, {"cid": "130589", "title": "作品48 內卷昂是跟蹤狂", "title_zh": "作品48 内卷昂是跟踪狂"}, {"cid": "130590", "title": "作品49 祕密的緣分", "title_zh": "作品49 秘密的缘分"}, {"cid": "130591", "title": "作品50 走吧!去圖書館", "title_zh": "作品50 走吧!去图书馆"}, {"cid": "130592", "title": "作品51 長髮的香織", "title_zh": "作品51 长发的香织"}, {"cid": "130594", "title": "作品52 粉彩筆支離破碎事件", "title_zh": "作品52 粉彩笔支离破碎事件"}, {"cid": "130595", "title": "作品53 沈重的人", "title_zh": "作品53 沈重的人"}, {"cid": "130596", "title": "作品54 瑞希的突發事故", "title_zh": "作品54 瑞希的突发事故"}, {"cid": "130597", "title": "作品55 文藝社團之花選M大賽(上篇)", "title_zh": "作品55 文艺社团之花选M大赛(上篇)"}]};
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>