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-1103", "mangaid": "1103", "zh_title": "极乐幻奇谭", "hant_title": "極樂幻奇譚", "en_title": "极乐幻奇谭 (Bilimanga #1103)", "author": "L.DART", "tags": ["奇幻", "末日", "神鬼", "战斗", "群像", "奇幻冒险", "大陆漫画", "漫画"], "zh_desc": "银发独臂的女子孑然一身彳亍在荒芜的末世之中,心中不灭的火焰支撑她一路前行,而那耸立于末世的繁荣城市,背后却拥有著不可告人的秘密……\n\n📚 作品信息:作者 L.DART · 评分 10 · 共收录 10 卷 / 186 话章节目录与高清彩页/条漫预览。", "hant_desc": "銀發獨臂的女子孑然一身彳亍在荒蕪的末世之中,心中不滅的火焰支撐她一路前行,而那聳立於末世的繁榮城市,背後卻擁有著不可告人的秘密……\n\n📚 作品資訊:作者 L.DART · 評分 10 · 共收錄 10 卷 / 186 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '极乐幻奇谭' (極樂幻奇譚) by L.DART. Includes 10 volumes and 186 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1103/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1103/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1103/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1103/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1103/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1103/page_06.jpg"], "volumes": [{"title_hant": "極樂幻奇譚 Vol.1 仰望巨人的少女", "title_zh": "极乐幻奇谭 Vol.1 仰望巨人的少女", "cover_id": 1980719, "first_chap_id": 92603, "cover_url": "https://i.motiezw.com/cover/1103/1980719.jpg"}, {"title_hant": "極樂幻奇譚 Vol.2 疾馳於神都", "title_zh": "极乐幻奇谭 Vol.2 疾驰于神都", "cover_id": 1981354, "first_chap_id": 92622, "cover_url": "https://i.motiezw.com/cover/1103/1981354.jpg"}, {"title_hant": "極樂幻奇譚 Vol.3 當白色染成黑色", "title_zh": "极乐幻奇谭 Vol.3 当白色染成黑色", "cover_id": 1981988, "first_chap_id": 92651, "cover_url": "https://i.motiezw.com/cover/1103/1981988.jpg"}, {"title_hant": "極樂幻奇譚 Vol.4 褫魂的倒計時", "title_zh": "极乐幻奇谭 Vol.4 褫魂的倒计时", "cover_id": 1982440, "first_chap_id": 92672, "cover_url": "https://i.motiezw.com/cover/1103/1982440.jpg"}, {"title_hant": "極樂幻奇譚 Vol.5 黃昏亦是黎明", "title_zh": "极乐幻奇谭 Vol.5 黄昏亦是黎明", "cover_id": 1985733, "first_chap_id": 92692, "cover_url": "https://i.motiezw.com/cover/1103/1985733.jpg"}, {"title_hant": "極樂幻奇譚 Vol.6 過去現在未來", "title_zh": "极乐幻奇谭 Vol.6 过去现在未来", "cover_id": 1983310, "first_chap_id": 92711, "cover_url": "https://i.motiezw.com/cover/1103/1983310.jpg"}, {"title_hant": "極樂幻奇譚 Vol.7 激戰的防衛線", "title_zh": "极乐幻奇谭 Vol.7 激战的防卫线", "cover_id": 1983792, "first_chap_id": 92732, "cover_url": "https://i.motiezw.com/cover/1103/1983792.jpg"}, {"title_hant": "極樂幻奇譚 Vol.8 神都鏖戰", "title_zh": "极乐幻奇谭 Vol.8 神都鏖战", "cover_id": 1984245, "first_chap_id": 92753, "cover_url": "https://i.motiezw.com/cover/1103/1984245.jpg"}, {"title_hant": "極樂幻奇譚 Vol.9 最後的殷商之王", "title_zh": "极乐幻奇谭 Vol.9 最后的殷商之王", "cover_id": 1984667, "first_chap_id": 92773, "cover_url": "https://i.motiezw.com/cover/1103/1984667.jpg"}, {"title_hant": "極樂幻奇譚 Vol.10 末世白城", "title_zh": "极乐幻奇谭 Vol.10 末世白城", "cover_id": 1985282, "first_chap_id": 92799, "cover_url": "https://i.motiezw.com/cover/1103/1985282.jpg"}], "chapters": [{"cid": "92603", "title": "01 孑然末世", "title_zh": "01 孑然末世"}, {"cid": "92604", "title": "02 神都", "title_zh": "02 神都"}, {"cid": "92605", "title": "03 淨靈冢的悲鳴", "title_zh": "03 净灵冢的悲鸣"}, {"cid": "92606", "title": "04 十三太守", "title_zh": "04 十三太守"}, {"cid": "92607", "title": "05 朝歌夜弦", "title_zh": "05 朝歌夜弦"}, {"cid": "92608", "title": "06 燈火闌珊處", "title_zh": "06 灯火阑珊处"}, {"cid": "92609", "title": "07 RUN!RUN!RUN!", "title_zh": "07 RUN!RUN!RUN!"}, {"cid": "92610", "title": "08 食人魔", "title_zh": "08 食人魔"}, {"cid": "92611", "title": "09 殘燈明滅,九首無言", "title_zh": "09 残灯明灭,九首无言"}, {"cid": "92612", "title": "10 八十!", "title_zh": "10 八十!"}, {"cid": "92613", "title": "11 “我可以預言”", "title_zh": "11 “我可以预言”"}, {"cid": "92614", "title": "11.5 番外篇 十年之間", "title_zh": "11.5 番外篇 十年之间"}, {"cid": "92615", "title": "12 血S分歧", "title_zh": "12 血S分歧"}, {"cid": "92616", "title": "13 第五太守", "title_zh": "13 第五太守"}, {"cid": "92617", "title": "13.5 特別篇 BW活動感謝!同人圖大放送!", "title_zh": "13.5 特别篇 BW活动感谢!同人图大放送!"}, {"cid": "92618", "title": "14 秦相甘羅", "title_zh": "14 秦相甘罗"}, {"cid": "92619", "title": "15 最溫柔的N悻", "title_zh": "15 最温柔的N悻"}, {"cid": "92620", "title": "16 歸來", "title_zh": "16 归来"}, {"cid": "92622", "title": "17 永恆的笑容", "title_zh": "17 永恒的笑容"}, {"cid": "92623", "title": "17.1 番外 一碗素面", "title_zh": "17.1 番外 一碗素面"}, {"cid": "92624", "title": "17.2 同人活動 還有小番外哦~", "title_zh": "17.2 同人活动 还有小番外哦~"}, {"cid": "92625", "title": "18 決戰之地", "title_zh": "18 决战之地"}, {"cid": "92627", "title": "20 一心守護", "title_zh": "20 一心守护"}, {"cid": "92628", "title": "21 蠱", "title_zh": "21 蛊"}, {"cid": "92629", "title": "22 背負「極樂」之名", "title_zh": "22 背负「极乐」之名"}, {"cid": "92630", "title": "23 逆轉氣運", "title_zh": "23 逆转气运"}, {"cid": "92631", "title": "23.5 番外 四格小番外~", "title_zh": "23.5 番外 四格小番外~"}, {"cid": "92632", "title": "24 甘羅與三次突擊", "title_zh": "24 甘罗与三次突击"}, {"cid": "92633", "title": "25 十字傷痕", "title_zh": "25 十字伤痕"}, {"cid": "92634", "title": "26 被托付的未來", "title_zh": "26 被托付的未来"}, {"cid": "92635", "title": "27 大音希聲", "title_zh": "27 大音希声"}, {"cid": "92636", "title": "28 新的暴風雨", "title_zh": "28 新的暴风雨"}, {"cid": "92637", "title": "29 結束的局", "title_zh": "29 结束的局"}, {"cid": "92638", "title": "29.1 番外 同人圖及工作室大揭秘!", "title_zh": "29.1 番外 同人图及工作室大揭秘!"}, {"cid": "92639", "title": "29.2 番外 天狼的一天", "title_zh": "29.2 番外 天狼的一天"}, {"cid": "92640", "title": "30 穹頂之下", "title_zh": "30 穹顶之下"}, {"cid": "92641", "title": "31 垃圾", "title_zh": "31 垃圾"}, {"cid": "92642", "title": "32 血脈傳承", "title_zh": "32 血脉传承"}, {"cid": "92643", "title": "32.5 福利特典", "title_zh": "32.5 福利特典"}, {"cid": "92651", "title": "33 斯夜靜悄悄", "title_zh": "33 斯夜静悄悄"}, {"cid": "92652", "title": "34 真實的謊言", "title_zh": "34 真实的谎言"}, {"cid": "92653", "title": "35 站隊", "title_zh": "35 站队"}, {"cid": "92654", "title": "35.5 漫畫設定 初始設定大公開", "title_zh": "35.5 漫画设定 初始设定大公开"}, {"cid": "92655", "title": "36 一點也不喜歡", "title_zh": "36 一点也不喜欢"}, {"cid": "92656", "title": "37 太守榮耀", "title_zh": "37 太守荣耀"}, {"cid": "92658", "title": "38.5 同人活動 再度來襲", "title_zh": "38.5 同人活动 再度来袭"}, {"cid": "92659", "title": "39 當她染上黑S", "title_zh": "39 当她染上黑S"}, {"cid": "92660", "title": "40 墓場", "title_zh": "40 墓场"}, {"cid": "92661", "title": "41 搖擺不定的箭", "title_zh": "41 摇摆不定的箭"}, {"cid": "92662", "title": "42 HE AND SHE", "title_zh": "42 HE AND SHE"}, {"cid": "92663", "title": "43 唐風樓", "title_zh": "43 唐风楼"}, {"cid": "92664", "title": "44 白與黑的決絕", "title_zh": "44 白与黑的决绝"}, {"cid": "92665", "title": "45 約定", "title_zh": "45 约定"}, {"cid": "92666", "title": "46 那一瞬間", "title_zh": "46 那一瞬间"}, {"cid": "92667", "title": "46.5 甘羅的七夕節", "title_zh": "46.5 甘罗的七夕节"}, {"cid": "92668", "title": "47 暗流湧動", "title_zh": "47 暗流涌动"}, {"cid": "92669", "title": "48 落第", "title_zh": "48 落第"}, {"cid": "92670", "title": "48.5 福利特典", "title_zh": "48.5 福利特典"}, {"cid": "92672", "title": "49 危機的時間限制", "title_zh": "49 危机的时间限制"}, {"cid": "92673", "title": "50 空不異S", "title_zh": "50 空不异S"}]};
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>