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-900", "mangaid": "900", "zh_title": "记录的地平线 ~西风旅团~", "hant_title": "記錄的地平線 ~西風旅團~", "en_title": "记录的地平线 ~西风旅团~ (Bilimanga #900)", "author": "こゆき / 橙乃ままれ / ハラカズヒロ", "tags": ["转生", "奇幻", "战斗", "经营", "斗智", "后宫", "奇幻冒险", "日本漫画"], "zh_desc": "《记录的地平线》的新篇是…美少女后宫公会大奋战!\n\r\n公会〈西风旅团〉一行人,被囚禁在线上游戏〈幻境神话〉的世界。\n\r\n公会的美少女成员们在混乱之中面临危机?\n\r\n为了保护同伴,公会长宗次郎展开了战斗!\n\n📚 作品信息:作者 こゆき / 橙乃ままれ / ハラカズヒロ · 评分 10 · 共收录 11 卷 / 64 话章节目录与高清彩页/条漫预览。", "hant_desc": "《記錄的地平線》的新篇是…美少女後宮公會大奮戰!\n\r\n公會〈西風旅團〉一行人,被囚禁在線上遊戲〈幻境神話〉的世界。\n\r\n公會的美少女成員們在混亂之中面臨危機?\n\r\n為了保護同伴,公會長宗次郎展開了戰鬥!\n\n📚 作品資訊:作者 こゆき / 橙乃ままれ / ハラカズヒロ · 評分 10 · 共收錄 11 卷 / 64 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '记录的地平线 ~西风旅团~' (記錄的地平線 ~西風旅團~) by こゆき / 橙乃ままれ / ハラカズヒロ. Includes 11 volumes and 64 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-900/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-900/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-900/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-900/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-900/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-900/page_06.jpg"], "volumes": [{"title_hant": "記錄的地平線 ~西風旅團~ 1", "title_zh": "记录的地平线 ~西风旅团~ 1", "cover_id": 1548495, "first_chap_id": 71234, "cover_url": "https://i.motiezw.com/cover/900/1548495.jpg"}, {"title_hant": "記錄的地平線 ~西風旅團~ 2", "title_zh": "记录的地平线 ~西风旅团~ 2", "cover_id": 1548657, "first_chap_id": 71241, "cover_url": "https://i.motiezw.com/cover/900/1548657.jpg"}, {"title_hant": "記錄的地平線 ~西風旅團~ 3", "title_zh": "记录的地平线 ~西风旅团~ 3", "cover_id": 1548817, "first_chap_id": 71248, "cover_url": "https://i.motiezw.com/cover/900/1548817.jpg"}, {"title_hant": "記錄的地平線 ~西風旅團~ 4", "title_zh": "记录的地平线 ~西风旅团~ 4", "cover_id": 1548976, "first_chap_id": 71255, "cover_url": "https://i.motiezw.com/cover/900/1548976.jpg"}, {"title_hant": "記錄的地平線 ~西風旅團~ 5", "title_zh": "记录的地平线 ~西风旅团~ 5", "cover_id": 1549137, "first_chap_id": 71262, "cover_url": "https://i.motiezw.com/cover/900/1549137.jpg"}, {"title_hant": "記錄的地平線 ~西風旅團~ 6", "title_zh": "记录的地平线 ~西风旅团~ 6", "cover_id": 1549294, "first_chap_id": 71269, "cover_url": "https://i.motiezw.com/cover/900/1549294.jpg"}, {"title_hant": "記錄的地平線 ~西風旅團~ 7", "title_zh": "记录的地平线 ~西风旅团~ 7", "cover_id": 1549453, "first_chap_id": 71277, "cover_url": "https://i.motiezw.com/cover/900/1549453.jpg"}, {"title_hant": "記錄的地平線 ~西風旅團~ 8", "title_zh": "记录的地平线 ~西风旅团~ 8", "cover_id": 1549611, "first_chap_id": 71284, "cover_url": "https://i.motiezw.com/cover/900/1549611.jpg"}, {"title_hant": "記錄的地平線 ~西風旅團~ 9", "title_zh": "记录的地平线 ~西风旅团~ 9", "cover_id": 1549768, "first_chap_id": 71291, "cover_url": "https://i.motiezw.com/cover/900/1549768.jpg"}, {"title_hant": "記錄的地平線 ~西風旅團~ 10", "title_zh": "记录的地平线 ~西风旅团~ 10", "cover_id": 1549921, "first_chap_id": 71298, "cover_url": "https://i.motiezw.com/cover/900/1549921.jpg"}, {"title_hant": "記錄的地平線 ~西風旅團~ 11", "title_zh": "记录的地平线 ~西风旅团~ 11", "cover_id": 1550072, "first_chap_id": 71305, "cover_url": "https://i.motiezw.com/cover/900/1550072.jpg"}], "chapters": [{"cid": "71234", "title": "CHAPTER01 現實", "title_zh": "CHAPTER01 现实"}, {"cid": "71235", "title": "CHAPTER02 饮食", "title_zh": "CHAPTER02 饮食"}, {"cid": "71236", "title": "CHAPTER03 大地人", "title_zh": "CHAPTER03 大地人"}, {"cid": "71237", "title": "CHAPTER04 不安", "title_zh": "CHAPTER04 不安"}, {"cid": "71238", "title": "CHAPTER05 衛兵", "title_zh": "CHAPTER05 卫兵"}, {"cid": "71239", "title": "CHAPTER06 死", "title_zh": "CHAPTER06 死"}, {"cid": "71241", "title": "CHAPTER07 PK", "title_zh": "CHAPTER07 PK"}, {"cid": "71242", "title": "CHAPTER08 哈M倫", "title_zh": "CHAPTER08 哈M伦"}, {"cid": "71243", "title": "CHAPTER09 中小型公會聯盟", "title_zh": "CHAPTER09 中小型公会联盟"}, {"cid": "71244", "title": "CHAPTER10 劍聖與黑劍", "title_zh": "CHAPTER10 剑圣与黑剑"}, {"cid": "71245", "title": "CHAPTER11 原形", "title_zh": "CHAPTER11 原形"}, {"cid": "71246", "title": "CHAPTER12 開戰", "title_zh": "CHAPTER12 开战"}, {"cid": "71248", "title": "CHAPTER13 VS 哈M倫", "title_zh": "CHAPTER13 VS 哈M伦"}, {"cid": "71249", "title": "CHAPTER14 不能輸", "title_zh": "CHAPTER14 不能输"}, {"cid": "71250", "title": "CHAPTER15 同伴", "title_zh": "CHAPTER15 同伴"}, {"cid": "71251", "title": "CHAPTER16 翻越高牆", "title_zh": "CHAPTER16 翻越高墙"}, {"cid": "71252", "title": "CHAPTER17 拜拜,再見", "title_zh": "CHAPTER17 拜拜,再见"}, {"cid": "71253", "title": "CHAPTER18 法則", "title_zh": "CHAPTER18 法则"}, {"cid": "71255", "title": "CHAPTER18.5 生病", "title_zh": "CHAPTER18.5 生病"}, {"cid": "71256", "title": "CHAPTER19 新月漢堡① ——再度開始——", "title_zh": "CHAPTER19 新月汉堡① ——再度开始——"}, {"cid": "71258", "title": "CHAPTER21 新月漢堡③ ——M食爭奪戰——", "title_zh": "CHAPTER21 新月汉堡③ ——M食争夺战——"}, {"cid": "71259", "title": "CHAPTER22 謝謝", "title_zh": "CHAPTER22 谢谢"}, {"cid": "71260", "title": "CHAPTER23 關於秋葉原", "title_zh": "CHAPTER23 关于秋叶原"}, {"cid": "71262", "title": "CHAPTER24 遊戲的終結", "title_zh": "CHAPTER24 游戏的终结"}, {"cid": "71263", "title": "CHAPTER25 大浴場", "title_zh": "CHAPTER25 大浴场"}, {"cid": "71264", "title": "CHAPTER26 大浴場 下篇", "title_zh": "CHAPTER26 大浴场 下篇"}, {"cid": "71265", "title": "CHAPTER27 和洛德立克先生做實驗", "title_zh": "CHAPTER27 和洛德立克先生做实验"}, {"cid": "71266", "title": "CHAPTER28 華和良", "title_zh": "CHAPTER28 华和良"}, {"cid": "71267", "title": "CHAPTER29 出發", "title_zh": "CHAPTER29 出发"}, {"cid": "71269", "title": "CHAPTER30 大家一起努力吧", "title_zh": "CHAPTER30 大家一起努力吧"}, {"cid": "71270", "title": "CHAPTER31 克莉儂的陰謀", "title_zh": "CHAPTER31 克莉侬的阴谋"}, {"cid": "71271", "title": "CHAPTER32 慵懶公主", "title_zh": "CHAPTER32 慵懒公主"}, {"cid": "71272", "title": "CHAPTER33 逮捕克莉儂(上篇)", "title_zh": "CHAPTER33 逮捕克莉侬(上篇)"}, {"cid": "71273", "title": "CHAPTER34 逮捕克莉儂(中篇)", "title_zh": "CHAPTER34 逮捕克莉侬(中篇)"}, {"cid": "71274", "title": "CHAPTER35 逮捕克莉儂(下篇)", "title_zh": "CHAPTER35 逮捕克莉侬(下篇)"}, {"cid": "71275", "title": "CHAPTER36 風險", "title_zh": "CHAPTER36 风险"}, {"cid": "71277", "title": "CHAPTER37 危機", "title_zh": "CHAPTER37 危机"}, {"cid": "71278", "title": "CHAPTER38 軍勢", "title_zh": "CHAPTER38 军势"}, {"cid": "71279", "title": "CHAPTER39 地精王的歸還", "title_zh": "CHAPTER39 地精王的归还"}, {"cid": "71280", "title": "CHAPTER40 各自的戰鬥", "title_zh": "CHAPTER40 各自的战斗"}, {"cid": "71281", "title": "CHAPTER41 來自泥沼之底", "title_zh": "CHAPTER41 来自泥沼之底"}, {"cid": "71284", "title": "CHAPTER42 幾近瘋狂", "title_zh": "CHAPTER42 几近疯狂"}, {"cid": "71285", "title": "CHAPTER43 因為你對我笑了", "title_zh": "CHAPTER43 因为你对我笑了"}, {"cid": "71286", "title": "CHAPTER44 生與死", "title_zh": "CHAPTER44 生与死"}, {"cid": "71287", "title": "CHAPTER45 進擊", "title_zh": "CHAPTER45 进击"}, {"cid": "71288", "title": "CHAPTER46 復活", "title_zh": "CHAPTER46 复活"}, {"cid": "71289", "title": "CHAPTER47 尋物", "title_zh": "CHAPTER47 寻物"}, {"cid": "71291", "title": "CHAPTER48 裝備獵人", "title_zh": "CHAPTER48 装备猎人"}, {"cid": "71292", "title": "CHAPTER49 真面目", "title_zh": "CHAPTER49 真面目"}, {"cid": "71293", "title": "CHAPTER50 刃", "title_zh": "CHAPTER50 刃"}, {"cid": "71294", "title": "CHAPTER51 力量(前篇)", "title_zh": "CHAPTER51 力量(前篇)"}, {"cid": "71295", "title": "CHAPTER52 力量(後篇)", "title_zh": "CHAPTER52 力量(后篇)"}, {"cid": "71296", "title": "CHAPTER53 曾為一體", "title_zh": "CHAPTER53 曾为一体"}, {"cid": "71298", "title": "CHAPTER54 意志", "title_zh": "CHAPTER54 意志"}, {"cid": "71299", "title": "CHAPTER55 戰鬥準備", "title_zh": "CHAPTER55 战斗准备"}, {"cid": "71300", "title": "CHAPTER56 三次", "title_zh": "CHAPTER56 三次"}, {"cid": "71301", "title": "CHAPTER57 一箭", "title_zh": "CHAPTER57 一箭"}, {"cid": "71302", "title": "CHAPTER58 不准", "title_zh": "CHAPTER58 不准"}, {"cid": "71303", "title": "CHAPTER59 開眼", "title_zh": "CHAPTER59 开眼"}, {"cid": "71305", "title": "CHAPTER60 相信", "title_zh": "CHAPTER60 相信"}]};
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>