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-917", "mangaid": "917", "zh_title": "学生会也有洞!", "hant_title": "學生會也有洞!", "en_title": "学生会也有洞! (Bilimanga #917)", "author": "无知麻吕", "tags": ["欢乐", "校园", "日常", "校园青春", "日本漫画", "漫画", "日漫", "连载漫画"], "zh_desc": "高一的文艺青年水之江梅的文学造诣相当精深,但是物理化学数学等等理科的成绩却完全毁灭性的差,因此面临了留级的危机。在导师平冢的建议下,他加入学生会想要借此挽救成绩。想不到这间国高中一贯制的学校的学生会的成员,竟然不是嚣张小屁孩,就是闷骚学姊跟不幸少女……在这些充满个性的成员之中,阿梅也开始过起「色」彩缤纷的欢乐校园生活!\n\n📚 作品信息:作者 无知麻吕 · 评分 9.7 · 共收录 11 卷 / 142 话章节目录与高清彩页/条漫预览。", "hant_desc": "高一的文藝青年水之江梅的文學造詣相當精深,但是物理化學數學等等理科的成績卻完全毀滅性的差,因此面臨了留級的危機。在導師平塚的建議下,他加入學生會想要藉此挽救成績。想不到這間國高中一貫制的學校的學生會的成員,竟然不是囂張小屁孩,就是悶騷學姊跟不幸少女……在這些充滿個性的成員之中,阿梅也開始過起「色」彩繽紛的歡樂校園生活!\n\n📚 作品資訊:作者 無知麻呂 · 評分 9.7 · 共收錄 11 卷 / 142 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '学生会也有洞!' (學生會也有洞!) by 无知麻吕. Includes 11 volumes and 142 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-917/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-917/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-917/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-917/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-917/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-917/page_06.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-917/page_07.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-917/page_08.jpg"], "volumes": [{"title_hant": "學生會也有洞! 1", "title_zh": "学生会也有洞! 1", "cover_id": 1586989, "first_chap_id": 73015, "cover_url": "https://i.motiezw.com/cover/917/1586989.jpg"}, {"title_hant": "學生會也有洞! 2", "title_zh": "学生会也有洞! 2", "cover_id": 1587150, "first_chap_id": 73031, "cover_url": "https://i.motiezw.com/cover/917/1587150.jpg"}, {"title_hant": "學生會也有洞! 3", "title_zh": "学生会也有洞! 3", "cover_id": 1587294, "first_chap_id": 73046, "cover_url": "https://i.motiezw.com/cover/917/1587294.jpg"}, {"title_hant": "學生會也有洞! 4", "title_zh": "学生会也有洞! 4", "cover_id": 1587439, "first_chap_id": 73061, "cover_url": "https://i.motiezw.com/cover/917/1587439.jpg"}, {"title_hant": "學生會也有洞! 5", "title_zh": "学生会也有洞! 5", "cover_id": 1587587, "first_chap_id": 73076, "cover_url": "https://i.motiezw.com/cover/917/1587587.jpg"}, {"title_hant": "學生會也有洞! 6", "title_zh": "学生会也有洞! 6", "cover_id": 1587734, "first_chap_id": 73091, "cover_url": "https://i.motiezw.com/cover/917/1587734.jpg"}, {"title_hant": "學生會也有洞! 7", "title_zh": "学生会也有洞! 7", "cover_id": 1587881, "first_chap_id": 73106, "cover_url": "https://i.motiezw.com/cover/917/1587881.jpg"}, {"title_hant": "學生會也有洞! 8", "title_zh": "学生会也有洞! 8", "cover_id": 1588013, "first_chap_id": 73120, "cover_url": "https://i.motiezw.com/cover/917/1588013.jpg"}, {"title_hant": "學生會也有洞! 9", "title_zh": "学生会也有洞! 9", "cover_id": 1588151, "first_chap_id": 73134, "cover_url": "https://i.motiezw.com/cover/917/1588151.jpg"}, {"title_hant": "學生會也有洞! 10", "title_zh": "学生会也有洞! 10", "cover_id": 1588273, "first_chap_id": 73148, "cover_url": "https://i.motiezw.com/cover/917/1588273.jpg"}, {"title_hant": "學生會也有洞! 11", "title_zh": "学生会也有洞! 11", "cover_id": 1675169, "first_chap_id": 77493, "cover_url": "https://i.motiezw.com/cover/917/1675169.jpg"}], "chapters": [{"cid": "73015", "title": "第1話 雄悻小鬼頭也是有洞的吧⋯", "title_zh": "第1话 雄悻小鬼头也是有洞的吧⋯"}, {"cid": "73016", "title": "第2話 熱熱的、粗粗的又大大的", "title_zh": "第2话 热热的、粗粗的又大大的"}, {"cid": "73017", "title": "第3話 照井學姊的憂鬱", "title_zh": "第3话 照井学姊的忧郁"}, {"cid": "73018", "title": "第4話 救世主小綻", "title_zh": "第4话 救世主小绽"}, {"cid": "73019", "title": "第5話 我覺得還滿S的啦…?", "title_zh": "第5话 我觉得还满S的啦…?"}, {"cid": "73020", "title": "第6話 會長被梅同學娶回家", "title_zh": "第6话 会长被梅同学娶回家"}, {"cid": "73021", "title": "第7話 七大不可思議與夜間的工作", "title_zh": "第7话 七大不可思议与夜间的工作"}, {"cid": "73022", "title": "第8話 駒絽現身!", "title_zh": "第8话 驹絽现身!"}, {"cid": "73023", "title": "第9話 駒絽與學生會", "title_zh": "第9话 驹絽与学生会"}, {"cid": "73024", "title": "第10話 洗泳池所以是泳裝回!", "title_zh": "第10话 洗泳池所以是泳装回!"}, {"cid": "73025", "title": "第11話 小綻感冒了", "title_zh": "第11话 小绽感冒了"}, {"cid": "73026", "title": "第12話 小學生來襲!", "title_zh": "第12话 小学生来袭!"}, {"cid": "73027", "title": "第13話 大家一起讀書", "title_zh": "第13话 大家一起读书"}, {"cid": "73028", "title": "第14話 太好了呢", "title_zh": "第14话 太好了呢"}, {"cid": "73029", "title": "附錄", "title_zh": "附录"}, {"cid": "73031", "title": "第15話 駒絽與意見箱", "title_zh": "第15话 驹絽与意见箱"}, {"cid": "73032", "title": "第16話 照井學姊的祕密♪", "title_zh": "第16话 照井学姊的秘密♪"}, {"cid": "73033", "title": "第17話 光希與熱音社", "title_zh": "第17话 光希与热音社"}, {"cid": "73034", "title": "第18話 在體育倉庫約會!", "title_zh": "第18话 在体育仓库约会!"}, {"cid": "73035", "title": "第19話 學生會宿營!(準備篇)", "title_zh": "第19话 学生会宿营!(准备篇)"}, {"cid": "73036", "title": "第20話 學生會宿營!(溫泉篇)", "title_zh": "第20话 学生会宿营!(温泉篇)"}, {"cid": "73037", "title": "第21話 學生會宿營!(就寢篇)", "title_zh": "第21话 学生会宿营!(就寝篇)"}, {"cid": "73039", "title": "第23話 因為傘重疊的雨天阿梅!", "title_zh": "第23话 因为伞重叠的雨天阿梅!"}, {"cid": "73040", "title": "第24話 你真是傻", "title_zh": "第24话 你真是傻"}, {"cid": "73041", "title": "第25話 梅與老師", "title_zh": "第25话 梅与老师"}, {"cid": "73042", "title": "第26話 駒絽與老師", "title_zh": "第26话 驹絽与老师"}, {"cid": "73043", "title": "第27話 駒絽的世界", "title_zh": "第27话 驹絽的世界"}, {"cid": "73044", "title": "附錄", "title_zh": "附录"}, {"cid": "73046", "title": "第28話 痛痛飛走了!", "title_zh": "第28话 痛痛飞走了!"}, {"cid": "73047", "title": "第29話 小心蜜蜂!", "title_zh": "第29话 小心蜜蜂!"}, {"cid": "73048", "title": "第30話 駒絽的挑戰", "title_zh": "第30话 驹絽的挑战"}, {"cid": "73049", "title": "第31話 會長的媽媽登場!", "title_zh": "第31话 会长的妈妈登场!"}, {"cid": "73050", "title": "第32話 飯糰家族", "title_zh": "第32话 饭团家族"}, {"cid": "73051", "title": "第33話 飯糰戰爭", "title_zh": "第33话 饭团战争"}, {"cid": "73052", "title": "第34話 勸善懲惡", "title_zh": "第34话 劝善惩恶"}, {"cid": "73053", "title": "第35話 只要大家聚在一起", "title_zh": "第35话 只要大家聚在一起"}, {"cid": "73054", "title": "第36話 阿梅是花心大蘿蔔疑雲", "title_zh": "第36话 阿梅是花心大萝卜疑云"}, {"cid": "73055", "title": "第37話 廁所大混亂!", "title_zh": "第37话 厕所大混乱!"}, {"cid": "73056", "title": "第38話 綻的企圖!", "title_zh": "第38话 绽的企图!"}, {"cid": "73057", "title": "第39話 綻的世界", "title_zh": "第39话 绽的世界"}, {"cid": "73058", "title": "第40話 駒絽的前進", "title_zh": "第40话 驹絽的前进"}, {"cid": "73059", "title": "附錄", "title_zh": "附录"}, {"cid": "73061", "title": "第41話 藤成之虎", "title_zh": "第41话 藤成之虎"}, {"cid": "73062", "title": "第42話 搞砸了!", "title_zh": "第42话 搞砸了!"}, {"cid": "73064", "title": "第44話 大家一起去KTV!", "title_zh": "第44话 大家一起去KTV!"}, {"cid": "73065", "title": "第45話 虎X梅", "title_zh": "第45话 虎X梅"}, {"cid": "73066", "title": "第46話 打掃與匈部", "title_zh": "第46话 打扫与匈部"}, {"cid": "73067", "title": "第47話 跟駒絽去動物園(前篇)", "title_zh": "第47话 跟驹絽去动物园(前篇)"}, {"cid": "73068", "title": "第48話 跟駒絽去動物園(後篇)", "title_zh": "第48话 跟驹絽去动物园(后篇)"}, {"cid": "73069", "title": "第49話 有栖的無罩漫遊(前篇)", "title_zh": "第49话 有栖的无罩漫游(前篇)"}, {"cid": "73070", "title": "第50話 有栖的無罩漫遊(後篇)", "title_zh": "第50话 有栖的无罩漫游(后篇)"}, {"cid": "73071", "title": "第51話 Q敵現身?", "title_zh": "第51话 Q敌现身?"}, {"cid": "73072", "title": "第52話 會長超不順!", "title_zh": "第52话 会长超不顺!"}, {"cid": "73073", "title": "第53話 敏深的世界", "title_zh": "第53话 敏深的世界"}, {"cid": "73074", "title": "附錄", "title_zh": "附录"}, {"cid": "73076", "title": "第54話 大熱天累兮兮", "title_zh": "第54话 大热天累兮兮"}, {"cid": "73077", "title": "第55話 跟駒絽去吃拉麵!", "title_zh": "第55话 跟驹絽去吃拉面!"}, {"cid": "73078", "title": "第56話 學姊和學弟", "title_zh": "第56话 学姊和学弟"}, {"cid": "73079", "title": "第57話 壽子的真心話", "title_zh": "第57话 寿子的真心话"}, {"cid": "73080", "title": "第58話 大家的假日", "title_zh": "第58话 大家的假日"}]};
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>