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-174", "mangaid": "174", "zh_title": "迷茫管家与胆怯的我", "hant_title": "迷茫管家與膽怯的我", "en_title": "迷茫管家与胆怯的我 (Bilimanga #174)", "author": "にぃと / 朝野始 / 菊池政治", "tags": ["校园", "日常", "欢乐", "后宫", "大小姐", "妹妹", "校园青春", "日本漫画"], "zh_desc": "纤瘦的身体,淡淡的幽香,吸附手掌的柔软触感……这家伙是女生啊!\n\r\n「我会扁到你丧失记忆为止,这就是管家的记忆消除法。」\n\r\n「这种方法和管家根本没关系!」\n\r\n原来她因为家庭因素,只要被人发现是女儿身,就必须辞去管家职务。奏为了守住昴的秘密,因而向我提出某个交换条件……\n\n📚 作品信息:作者 にぃと / 朝野始 / 菊池政治 · 评分 10 · 共收录 7 卷 / 45 话章节目录与高清彩页/条漫预览。", "hant_desc": "纖瘦的身體,淡淡的幽香,吸附手掌的柔軟觸感……這傢伙是女生啊!\n\r\n「我會扁到你喪失記憶為止,這就是管家的記憶消除法。」\n\r\n「這種方法和管家根本沒關係!」\n\r\n原來她因為家庭因素,只要被人發現是女兒身,就必須辭去管家職務。奏為了守住昴的秘密,因而向我提出某個交換條件……\n\n📚 作品資訊:作者 にぃと / 朝野始 / 菊池政治 · 評分 10 · 共收錄 7 卷 / 45 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '迷茫管家与胆怯的我' (迷茫管家與膽怯的我) by にぃと / 朝野始 / 菊池政治. Includes 7 volumes and 45 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-174/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-174/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-174/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-174/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-174/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-174/page_06.jpg"], "volumes": [{"title_hant": "迷茫管家與膽怯的我 1", "title_zh": "迷茫管家与胆怯的我 1", "cover_id": 322899, "first_chap_id": 15171, "cover_url": "https://i.motiezw.com/cover/174/322899.jpg"}, {"title_hant": "迷茫管家與膽怯的我 2", "title_zh": "迷茫管家与胆怯的我 2", "cover_id": 323070, "first_chap_id": 15178, "cover_url": "https://i.motiezw.com/cover/174/323070.jpg"}, {"title_hant": "迷茫管家與膽怯的我 3", "title_zh": "迷茫管家与胆怯的我 3", "cover_id": 323243, "first_chap_id": 15186, "cover_url": "https://i.motiezw.com/cover/174/323243.jpg"}, {"title_hant": "迷茫管家與膽怯的我 4", "title_zh": "迷茫管家与胆怯的我 4", "cover_id": 323414, "first_chap_id": 15193, "cover_url": "https://i.motiezw.com/cover/174/323414.jpg"}, {"title_hant": "迷茫管家與膽怯的我 5", "title_zh": "迷茫管家与胆怯的我 5", "cover_id": 323577, "first_chap_id": 15202, "cover_url": "https://i.motiezw.com/cover/174/323577.jpg"}, {"title_hant": "迷茫管家與膽怯的我 6", "title_zh": "迷茫管家与胆怯的我 6", "cover_id": 323749, "first_chap_id": 15209, "cover_url": "https://i.motiezw.com/cover/174/323749.jpg"}, {"title_hant": "迷茫管家與膽怯的我 7", "title_zh": "迷茫管家与胆怯的我 7", "cover_id": 323917, "first_chap_id": 15216, "cover_url": "https://i.motiezw.com/cover/174/323917.jpg"}], "chapters": [{"cid": "15171", "title": "第1話「管家的秘密」", "title_zh": "第1话「管家的秘密」"}, {"cid": "15172", "title": "第2話「迷茫管家與腆態的我」", "title_zh": "第2话「迷茫管家与腆态的我」"}, {"cid": "15173", "title": "第3話「突如其來的羅曼史」", "title_zh": "第3话「突如其来的罗曼史」"}, {"cid": "15174", "title": "第4話「夏日天堂」", "title_zh": "第4话「夏日天堂」"}, {"cid": "15175", "title": "第5話「狼與羊」", "title_zh": "第5话「狼与羊」"}, {"cid": "15176", "title": "附錄「朝野始的新篇小說」", "title_zh": "附录「朝野始的新篇小说」"}, {"cid": "15178", "title": "第6話「我家有一個管家N孩」", "title_zh": "第6话「我家有一个管家N孩」"}, {"cid": "15179", "title": "第7話「管家與N僕」", "title_zh": "第7话「管家与N仆」"}, {"cid": "15180", "title": "第8話「BABY PLEASE GO HOME」", "title_zh": "第8话「BABY PLEASE GO HOME」"}, {"cid": "15181", "title": "第9話「小兔子與腆小鬼」", "title_zh": "第9话「小兔子与腆小鬼」"}, {"cid": "15182", "title": "第10話「頂樓的秘密」", "title_zh": "第10话「顶楼的秘密」"}, {"cid": "15183", "title": "番外篇「兩個人獨處的空教室」", "title_zh": "番外篇「两个人独处的空教室」"}, {"cid": "15184", "title": "附錄「朝野始的新篇小說」", "title_zh": "附录「朝野始的新篇小说」"}, {"cid": "15186", "title": "第11話「學園祭狂熱」", "title_zh": "第11话「学园祭狂热」"}, {"cid": "15187", "title": "第12話「兩個大騙子」", "title_zh": "第12话「两个大骗子」"}, {"cid": "15188", "title": "第13話「私奔之旅」", "title_zh": "第13话「私奔之旅」"}, {"cid": "15189", "title": "第14話「海灘寶貝」", "title_zh": "第14话「海滩宝贝」"}, {"cid": "15190", "title": "第15話「煙霧殺人5秒前!」", "title_zh": "第15话「烟雾杀人5秒前!」"}, {"cid": "15191", "title": "附錄「朝野始的新篇小說」", "title_zh": "附录「朝野始的新篇小说」"}, {"cid": "15193", "title": "第16話「夏日祭典大亂鬥,還有她——。」", "title_zh": "第16话「夏日祭典大乱斗,还有她——。」"}, {"cid": "15195", "title": "第18話「生日快樂,我的老妹」", "title_zh": "第18话「生日快乐,我的老妹」"}, {"cid": "15196", "title": "第19話「解惑野餐」", "title_zh": "第19话「解惑野餐」"}, {"cid": "15197", "title": "第20話「N僕咖啡廳狂想曲」", "title_zh": "第20话「N仆咖啡厅狂想曲」"}, {"cid": "15198", "title": "第21話「暑假最終事件」", "title_zh": "第21话「暑假最终事件」"}, {"cid": "15199", "title": "第22話「大小姐的自白」", "title_zh": "第22话「大小姐的自白」"}, {"cid": "15200", "title": "附錄「朝野始的新篇小說」", "title_zh": "附录「朝野始的新篇小说」"}, {"cid": "15202", "title": "第23話「運動會爭奪戰」", "title_zh": "第23话「运动会争夺战」"}, {"cid": "15203", "title": "第24話「VS心結」", "title_zh": "第24话「VS心结」"}, {"cid": "15204", "title": "第25話「雖然在涼月家工作,但是我可能已經不行了」", "title_zh": "第25话「虽然在凉月家工作,但是我可能已经不行了」"}, {"cid": "15205", "title": "第26話「應該是喜歡你唷?」", "title_zh": "第26话「应该是喜欢你唷?」"}, {"cid": "15206", "title": "第27話「爆誕」", "title_zh": "第27话「爆诞」"}, {"cid": "15207", "title": "附錄「朝野始的新篇小說」", "title_zh": "附录「朝野始的新篇小说」"}, {"cid": "15209", "title": "第28話「歡迎來到武藏野樂園」", "title_zh": "第28话「欢迎来到武藏野乐园」"}, {"cid": "15210", "title": "第29話「變裝遊行的夜裡」", "title_zh": "第29话「变装游行的夜里」"}, {"cid": "15211", "title": "第30話「寄居生活」", "title_zh": "第30话「寄居生活」"}, {"cid": "15212", "title": "第31話「涼月奏」", "title_zh": "第31话「凉月奏」"}, {"cid": "15213", "title": "第32話「阪町家首腦會議」", "title_zh": "第32话「阪町家首脑会议」"}, {"cid": "15214", "title": "附錄「朝野始的新篇小說」", "title_zh": "附录「朝野始的新篇小说」"}, {"cid": "15216", "title": "第33話「銀盤的聖誕節」", "title_zh": "第33话「银盘的圣诞节」"}, {"cid": "15217", "title": "第34話「新年嘉年華」", "title_zh": "第34话「新年嘉年华」"}, {"cid": "15218", "title": "第35話「觀測星象」", "title_zh": "第35话「观测星象」"}, {"cid": "15220", "title": "第37話「測試」", "title_zh": "第37话「测试」"}, {"cid": "15221", "title": "第38話「答覆」", "title_zh": "第38话「答复」"}, {"cid": "15222", "title": "第39話「這部作品的標題就叫做——」", "title_zh": "第39话「这部作品的标题就叫做——」"}, {"cid": "15223", "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>