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-750", "mangaid": "750", "zh_title": "小书痴的下克上:为了成为图书管理员不择手段", "hant_title": "小書痴的下剋上:為了成為圖書管理員不擇手段", "en_title": "小书痴的下克上:为了成为图书管理员不择手段 (Bilimanga #750)", "author": "铃华 / 香月美夜 / 椎名优", "tags": ["转生", "奇幻", "异世界", "日常", "恋爱", "女性视角", "奇幻冒险", "日本漫画"], "zh_desc": "爱书成痴的大学生丽乃,从没想过有一天会在地震中被掉落的书给「活埋」!\n\r\n当她再次睁开眼睛,发现自己竟然转生到了异世界,变成一个叫作「梅茵」的五岁小女孩。然而这里不仅没有图书馆,她最爱的书更是一般平民买不起的天价。\n\r\n「既然没有书,那就自己动手做!」梅茵拖著体弱多病的小小身躯,不可思议的做书计划,就此展开!\n\n📚 作品信息:作者 铃华 / 香月美夜 / 椎名优 · 评分 10 · 共收录 7 卷 / 52 话章节目录与高清彩页/条漫预览。", "hant_desc": "愛書成痴的大學生麗乃,從沒想過有一天會在地震中被掉落的書給「活埋」!\n\r\n當她再次睜開眼睛,發現自己竟然轉生到了異世界,變成一個叫作「梅茵」的五歲小女孩。然而這裡不僅沒有圖書館,她最愛的書更是一般平民買不起的天價。\n\r\n「既然沒有書,那就自己動手做!」梅茵拖著體弱多病的小小身軀,不可思議的做書計畫,就此展開!\n\n📚 作品資訊:作者 鈴華 / 香月美夜 / 椎名優 · 評分 10 · 共收錄 7 卷 / 52 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '小书痴的下克上:为了成为图书管理员不择手段' (小書痴的下剋上:為了成為圖書管理員不擇手段) by 铃华 / 香月美夜 / 椎名优. Includes 7 volumes and 52 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-750/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-750/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-750/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-750/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-750/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-750/page_06.jpg"], "volumes": [{"title_hant": "小書痴的下剋上:為了成為圖書管理員不擇手段 第一部 沒有書,我就自己做!❶", "title_zh": "小书痴的下克上:为了成为图书管理员不择手段 第一部 没有书,我就自己做!❶", "cover_id": 1281445, "first_chap_id": 58339, "cover_url": "https://i.motiezw.com/cover/750/1281445.jpg"}, {"title_hant": "小書痴的下剋上:為了成為圖書管理員不擇手段 第一部 沒有書,我就自己做!❷", "title_zh": "小书痴的下克上:为了成为图书管理员不择手段 第一部 没有书,我就自己做!❷", "cover_id": 1281606, "first_chap_id": 58347, "cover_url": "https://i.motiezw.com/cover/750/1281606.jpg"}, {"title_hant": "小書痴的下剋上:為了成為圖書管理員不擇手段 第一部 沒有書,我就自己做!❸", "title_zh": "小书痴的下克上:为了成为图书管理员不择手段 第一部 没有书,我就自己做!❸", "cover_id": 1281784, "first_chap_id": 58355, "cover_url": "https://i.motiezw.com/cover/750/1281784.jpg"}, {"title_hant": "小書痴的下剋上:為了成為圖書管理員不擇手段 第一部 沒有書,我就自己做!❹", "title_zh": "小书痴的下克上:为了成为图书管理员不择手段 第一部 没有书,我就自己做!❹", "cover_id": 1281978, "first_chap_id": 58364, "cover_url": "https://i.motiezw.com/cover/750/1281978.jpg"}, {"title_hant": "小書痴的下剋上:為了成為圖書管理員不擇手段 第一部 沒有書,我就自己做!❺", "title_zh": "小书痴的下克上:为了成为图书管理员不择手段 第一部 没有书,我就自己做!❺", "cover_id": 1282156, "first_chap_id": 58373, "cover_url": "https://i.motiezw.com/cover/750/1282156.jpg"}, {"title_hant": "小書痴的下剋上:為了成為圖書管理員不擇手段 第一部 沒有書,我就自己做!❻", "title_zh": "小书痴的下克上:为了成为图书管理员不择手段 第一部 没有书,我就自己做!❻", "cover_id": 1282350, "first_chap_id": 58382, "cover_url": "https://i.motiezw.com/cover/750/1282350.jpg"}, {"title_hant": "小書痴的下剋上:為了成為圖書管理員不擇手段 第一部 沒有書,我就自己做!❼", "title_zh": "小书痴的下克上:为了成为图书管理员不择手段 第一部 没有书,我就自己做!❼", "cover_id": 1282544, "first_chap_id": 58391, "cover_url": "https://i.motiezw.com/cover/750/1282544.jpg"}], "chapters": [{"cid": "58339", "title": "第一話 新生活", "title_zh": "第一话 新生活"}, {"cid": "58340", "title": "第二話 購書無望", "title_zh": "第二话 购书无望"}, {"cid": "58341", "title": "第三話 生活改善中", "title_zh": "第三话 生活改善中"}, {"cid": "58342", "title": "第四話 對埃及文明獻上敬意", "title_zh": "第四话 对埃及文明献上敬意"}, {"cid": "58343", "title": "第五話 準備過冬", "title_zh": "第五话 准备过冬"}, {"cid": "58344", "title": "番外篇 梅茵變得好奇怪", "title_zh": "番外篇 梅茵变得好奇怪"}, {"cid": "58345", "title": "後記", "title_zh": "后记"}, {"cid": "58347", "title": "第六話 豬禸加工日", "title_zh": "第六话 猪禸加工日"}, {"cid": "58348", "title": "第七話 冬天的M味", "title_zh": "第七话 冬天的M味"}, {"cid": "58349", "title": "第八話 歐托先生的幫手", "title_zh": "第八话 欧托先生的帮手"}, {"cid": "58350", "title": "第九話 帶我去森林", "title_zh": "第九话 带我去森林"}, {"cid": "58351", "title": "第十話 首次去森林", "title_zh": "第十话 首次去森林"}, {"cid": "58352", "title": "番外篇 路茲與帕露樹", "title_zh": "番外篇 路兹与帕露树"}, {"cid": "58353", "title": "後記", "title_zh": "后记"}, {"cid": "58355", "title": "第十一話 黄河文明我愛你", "title_zh": "第十一话 黄河文明我爱你"}, {"cid": "58356", "title": "第十二話 不可思議的熱與會面", "title_zh": "第十二话 不可思议的热与会面"}, {"cid": "58357", "title": "第十二•五 話小番外會面的結果", "title_zh": "第十二•五 话小番外会面的结果"}, {"cid": "58358", "title": "第十三話 動手做和紙", "title_zh": "第十三话 动手做和纸"}, {"cid": "58359", "title": "第十四話 班諾的召見", "title_zh": "第十四话 班诺的召见"}, {"cid": "58360", "title": "番外篇 與料理的奮鬥", "title_zh": "番外篇 与料理的奋斗"}, {"cid": "58361", "title": "全新特別短篇小說 洗禮儀式與髮飾", "title_zh": "全新特别短篇小说 洗礼仪式与发饰"}, {"cid": "58364", "title": "第十五話 路茲最重要的任務", "title_zh": "第十五话 路兹最重要的任务"}, {"cid": "58365", "title": "第十六話 開始做紙", "title_zh": "第十六话 开始做纸"}, {"cid": "58366", "title": "第十七話 路茲的梅茵", "title_zh": "第十七话 路兹的梅茵"}, {"cid": "58367", "title": "第十八話 商業公會", "title_zh": "第十八话 商业公会"}, {"cid": "58368", "title": "第十九話 暫時登記與交涉", "title_zh": "第十九话 暂时登记与交涉"}, {"cid": "58369", "title": "番外篇 硬幣與商品價值", "title_zh": "番外篇 硬币与商品价值"}, {"cid": "58370", "title": "全新特別短篇小說 工藝師學徒賽格", "title_zh": "全新特别短篇小说 工艺师学徒赛格"}, {"cid": "58371", "title": "後記", "title_zh": "后记"}, {"cid": "58373", "title": "第二十話 公會長的孫N", "title_zh": "第二十话 公会长的孙N"}, {"cid": "58374", "title": "第二十一話 芙麗妲的髮飾", "title_zh": "第二十一话 芙丽妲的发饰"}, {"cid": "58375", "title": "第二十二話 絲髮精的改善方法", "title_zh": "第二十二话 丝发精的改善方法"}, {"cid": "58376", "title": "第二十三話 陀龍布出現了", "title_zh": "第二十三话 陀龙布出现了"}, {"cid": "58377", "title": "第二十四話 冬天腳步近了", "title_zh": "第二十四话 冬天脚步近了"}, {"cid": "58378", "title": "番外篇 金錢的力量", "title_zh": "番外篇 金钱的力量"}, {"cid": "58379", "title": "全新特別短篇小說 大店會議與髮飾", "title_zh": "全新特别短篇小说 大店会议与发饰"}, {"cid": "58380", "title": "後記", "title_zh": "后记"}, {"cid": "58382", "title": "第二十五話 芙麗妲與梅茵", "title_zh": "第二十五话 芙丽妲与梅茵"}, {"cid": "58383", "title": "第二十六話 冬始", "title_zh": "第二十六话 冬始"}, {"cid": "58384", "title": "第二十七話 家庭會議", "title_zh": "第二十七话 家庭会议"}, {"cid": "58385", "title": "第二十八話 重新開始做紙", "title_zh": "第二十八话 重新开始做纸"}, {"cid": "58386", "title": "第二十九話 既得利益", "title_zh": "第二十九话 既得利益"}, {"cid": "58388", "title": "全新特別短篇小說 引頸期盼的再會", "title_zh": "全新特别短篇小说 引颈期盼的再会"}, {"cid": "58389", "title": "後記", "title_zh": "后记"}, {"cid": "58391", "title": "第三十話 與芙麗妲簽約以及洗禮儀式", "title_zh": "第三十话 与芙丽妲签约以及洗礼仪式"}, {"cid": "58392", "title": "第三十一話 眾神的樂園", "title_zh": "第三十一话 众神的乐园"}, {"cid": "58393", "title": "第三十二話 成為見習巫N的選擇", "title_zh": "第三十二话 成为见习巫N的选择"}, {"cid": "58394", "title": "第三十三話 定案", "title_zh": "第三十三话 定案"}, {"cid": "58395", "title": "第三十三•五話 小番外 神官長室裡的面談", "title_zh": "第三十三•五话 小番外 神官长室里的面谈"}, {"cid": "58396", "title": "番外篇 磅蛋糕的試吃會", "title_zh": "番外篇 磅蛋糕的试吃会"}, {"cid": "58397", "title": "全新特別短篇小說 奇爾博塔商會的繼承人", "title_zh": "全新特别短篇小说 奇尔博塔商会的继承人"}, {"cid": "58398", "title": "後記", "title_zh": "后记"}]};
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>