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-1257", "mangaid": "1257", "zh_title": "一人之下", "hant_title": "一人之下", "en_title": "一人之下 (Bilimanga #1257)", "author": "米二 / 动漫堂", "tags": ["战斗", "悬疑", "战斗热血", "大陆漫画", "漫画", "日漫", "连载漫画"], "zh_desc": "大学生张楚岚清明回乡,遭遇神秘少女冯宝宝。\n\r\n素未谋面的冯宝宝却对张楚岚异常熟悉,并将其带去自己打工的快递公司。\n\r\n为了帮冯宝宝寻找她的身世,也为了查清自己与爷爷身上的秘密,张楚岚的生活被彻底颠覆,与冯宝宝一同踏上「异人」之旅。\n\n📚 作品信息:作者 米二 / 动漫堂 · 评分 10 · 共收录 20 卷 / 590 话章节目录与高清彩页/条漫预览。", "hant_desc": "大學生張楚嵐清明回鄉,遭遇神秘少女馮寶寶。\n\r\n素未謀面的馮寶寶卻對張楚嵐異常熟悉,並將其帶去自己打工的快遞公司。\n\r\n為了幫馮寶寶尋找她的身世,也為了查清自己與爺爺身上的秘密,張楚嵐的生活被徹底顛覆,與馮寶寶一同踏上「異人」之旅。\n\n📚 作品資訊:作者 米二 / 動漫堂 · 評分 10 · 共收錄 20 卷 / 590 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '一人之下' (一人之下) by 米二 / 动漫堂. Includes 20 volumes and 590 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1257/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1257/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1257/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1257/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1257/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1257/page_06.jpg"], "volumes": [{"title_hant": "一人之下 1", "title_zh": "一人之下 1", "cover_id": 2253210, "first_chap_id": 104149, "cover_url": "https://i.motiezw.com/cover/1257/2253210.jpg"}, {"title_hant": "一人之下 2", "title_zh": "一人之下 2", "cover_id": 2253434, "first_chap_id": 104173, "cover_url": "https://i.motiezw.com/cover/1257/2253434.jpg"}, {"title_hant": "一人之下 3①", "title_zh": "一人之下 3①", "cover_id": 2253671, "first_chap_id": 104191, "cover_url": "https://i.motiezw.com/cover/1257/2253671.jpg"}, {"title_hant": "一人之下 3②", "title_zh": "一人之下 3②", "cover_id": 2253902, "first_chap_id": 104212, "cover_url": "https://i.motiezw.com/cover/1257/2253902.jpg"}, {"title_hant": "一人之下 3③", "title_zh": "一人之下 3③", "cover_id": 2254129, "first_chap_id": 104233, "cover_url": "https://i.motiezw.com/cover/1257/2254129.jpg"}, {"title_hant": "一人之下 3④", "title_zh": "一人之下 3④", "cover_id": 2254549, "first_chap_id": 104267, "cover_url": "https://i.motiezw.com/cover/1257/2254549.jpg"}, {"title_hant": "一人之下 3⑤", "title_zh": "一人之下 3⑤", "cover_id": 2254769, "first_chap_id": 104288, "cover_url": "https://i.motiezw.com/cover/1257/2254769.jpg"}, {"title_hant": "一人之下 3⑥", "title_zh": "一人之下 3⑥", "cover_id": 2255023, "first_chap_id": 104309, "cover_url": "https://i.motiezw.com/cover/1257/2255023.jpg"}, {"title_hant": "一人之下 3⑦", "title_zh": "一人之下 3⑦", "cover_id": 2255290, "first_chap_id": 104330, "cover_url": "https://i.motiezw.com/cover/1257/2255290.jpg"}, {"title_hant": "一人之下 3⑧", "title_zh": "一人之下 3⑧", "cover_id": 2255577, "first_chap_id": 104351, "cover_url": "https://i.motiezw.com/cover/1257/2255577.jpg"}, {"title_hant": "一人之下 4", "title_zh": "一人之下 4", "cover_id": 2255845, "first_chap_id": 104372, "cover_url": "https://i.motiezw.com/cover/1257/2255845.jpg"}, {"title_hant": "一人之下 5", "title_zh": "一人之下 5", "cover_id": 2256672, "first_chap_id": 104431, "cover_url": "https://i.motiezw.com/cover/1257/2256672.jpg"}], "chapters": [{"cid": "104149", "title": "001 姐姐1", "title_zh": "001 姐姐1"}, {"cid": "104150", "title": "002 姐姐2", "title_zh": "002 姐姐2"}, {"cid": "104151", "title": "003 一大波喪屍", "title_zh": "003 一大波丧尸"}, {"cid": "104152", "title": "004 大學快成義務教育了", "title_zh": "004 大学快成义务教育了"}, {"cid": "104153", "title": "005 愉快的會面", "title_zh": "005 愉快的会面"}, {"cid": "104154", "title": "006 張楚嵐1", "title_zh": "006 张楚岚1"}, {"cid": "104155", "title": "007 張楚嵐2", "title_zh": "007 张楚岚2"}, {"cid": "104156", "title": "008 同類", "title_zh": "008 同类"}, {"cid": "104157", "title": "009 遺體", "title_zh": "009 遗体"}, {"cid": "104158", "title": "010 惡劣的開始也算開始", "title_zh": "010 恶劣的开始也算开始"}, {"cid": "104159", "title": "011 運氣的觸底反彈", "title_zh": "011 运气的触底反弹"}, {"cid": "104160", "title": "012 強力反彈中!", "title_zh": "012 强力反弹中!"}, {"cid": "104161", "title": "013 臥槽,又被運氣套住了!", "title_zh": "013 卧槽,又被运气套住了!"}, {"cid": "104162", "title": "014 大家都想要我的腎麼?", "title_zh": "014 大家都想要我的肾么?"}, {"cid": "104163", "title": "015 離譜的綁匪和營救者", "title_zh": "015 离谱的绑匪和营救者"}, {"cid": "104164", "title": "016 正義必將戰勝邪惡!", "title_zh": "016 正义必将战胜邪恶!"}, {"cid": "104165", "title": "017 正義的補刀⋯⋯", "title_zh": "017 正义的补刀⋯⋯"}, {"cid": "104166", "title": "018 新世界的大門", "title_zh": "018 新世界的大门"}, {"cid": "104167", "title": "019 全悻", "title_zh": "019 全悻"}, {"cid": "104168", "title": "020 遺產", "title_zh": "020 遗产"}, {"cid": "104169", "title": "021 好工作不易找,易找的⋯", "title_zh": "021 好工作不易找,易找的⋯"}, {"cid": "104170", "title": "022 金光咒", "title_zh": "022 金光咒"}, {"cid": "104173", "title": "024 師叔欺負人!", "title_zh": "024 师叔欺负人!"}, {"cid": "104174", "title": "025 師叔我不好欺負!", "title_zh": "025 师叔我不好欺负!"}, {"cid": "104175", "title": "026 因為我有個姐姐⋯⋯", "title_zh": "026 因为我有个姐姐⋯⋯"}, {"cid": "104176", "title": "027 好感度加1", "title_zh": "027 好感度加1"}, {"cid": "104177", "title": "028 好感度減10", "title_zh": "028 好感度减10"}, {"cid": "104178", "title": "029 八奇技", "title_zh": "029 八奇技"}, {"cid": "104179", "title": "030 三四的M學", "title_zh": "030 三四的M学"}, {"cid": "104180", "title": "031 理解萬歲", "title_zh": "031 理解万岁"}, {"cid": "104181", "title": "032 做人不能太坦率", "title_zh": "032 做人不能太坦率"}, {"cid": "104182", "title": "033 大師對小妞", "title_zh": "033 大师对小妞"}, {"cid": "104183", "title": "034 打賭", "title_zh": "034 打赌"}, {"cid": "104184", "title": "035 再會", "title_zh": "035 再会"}, {"cid": "104185", "title": "036 一根筋", "title_zh": "036 一根筋"}, {"cid": "104186", "title": "037 異人", "title_zh": "037 异人"}, {"cid": "104187", "title": "038 刮骨刀", "title_zh": "038 刮骨刀"}, {"cid": "104188", "title": "039 跟蹤", "title_zh": "039 跟踪"}, {"cid": "104189", "title": "040 大魔王", "title_zh": "040 大魔王"}, {"cid": "104191", "title": "041 兇手", "title_zh": "041 凶手"}, {"cid": "104192", "title": "042 蘇醒", "title_zh": "042 苏醒"}, {"cid": "104193", "title": "043 阿無", "title_zh": "043 阿无"}, {"cid": "104194", "title": "044 提親", "title_zh": "044 提亲"}, {"cid": "104195", "title": "045 喜歡是什麼", "title_zh": "045 喜欢是什么"}, {"cid": "104196", "title": "046 殺戮", "title_zh": "046 杀戮"}, {"cid": "104198", "title": "048 怪物", "title_zh": "048 怪物"}, {"cid": "104199", "title": "049 我也有的", "title_zh": "049 我也有的"}, {"cid": "104200", "title": "050 入世", "title_zh": "050 入世"}, {"cid": "104201", "title": "051 極品", "title_zh": "051 极品"}, {"cid": "104202", "title": "052 認識的人", "title_zh": "052 认识的人"}, {"cid": "104203", "title": "053 回頭太難", "title_zh": "053 回头太难"}, {"cid": "104204", "title": "054 異動", "title_zh": "054 异动"}, {"cid": "104205", "title": "055 張錫林之死", "title_zh": "055 张锡林之死"}, {"cid": "104206", "title": "056 還想照顧你", "title_zh": "056 还想照顾你"}, {"cid": "104207", "title": "057 留在你身邊", "title_zh": "057 留在你身边"}, {"cid": "104208", "title": "058 通天籙", "title_zh": "058 通天箓"}, {"cid": "104209", "title": "059 命運", "title_zh": "059 命运"}, {"cid": "104210", "title": "060 阿威十八式", "title_zh": "060 阿威十八式"}, {"cid": "104212", "title": "061 雷煙炮", "title_zh": "061 雷烟炮"}, {"cid": "104213", "title": "062 諸葛青", "title_zh": "062 诸葛青"}]};
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>