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-1533", "mangaid": "1533", "zh_title": "勇者斗恶龙 达伊的大冒险", "hant_title": "勇者鬥惡龍 達伊的大冒險", "en_title": "勇者斗恶龙 达伊的大冒险 (Bilimanga #1533)", "author": "稻田浩司 / 三条陆 / 鸟山明", "tags": ["奇幻", "冒险", "魔法", "战斗", "热血", "奇幻冒险", "日本漫画", "漫画"], "zh_desc": "怪物们和平相处的南方孤岛.迪尔穆林岛。\n\r\n在那里有位憧憬著勇者的少年,他的名字叫做达伊!!\n\r\n遇见了在世界涌现邪恶时现身的「勇者家庭教师」\n\r\n阿邦后,达伊的命运开始产生了剧烈的变化。\n\n📚 作品信息:作者 稻田浩司 / 三条陆 / 鸟山明 · 评分 10 · 共收录 25 卷 / 362 话章节目录与高清彩页/条漫预览。", "hant_desc": "怪物們和平相處的南方孤島.迪爾穆林島。\n\r\n在那裡有位憧憬著勇者的少年,他的名字叫做達伊!!\n\r\n遇見了在世界湧現邪惡時現身的「勇者家庭教師」\n\r\n阿邦後,達伊的命運開始產生了劇烈的變化。\n\n📚 作品資訊:作者 稻田浩司 / 三条陸 / 鳥山明 · 評分 10 · 共收錄 25 卷 / 362 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '勇者斗恶龙 达伊的大冒险' (勇者鬥惡龍 達伊的大冒險) by 稻田浩司 / 三条陆 / 鸟山明. Includes 25 volumes and 362 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1533/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1533/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1533/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1533/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1533/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1533/page_06.jpg"], "volumes": [{"title_hant": "勇者鬥惡龍 達伊的大冒險 1", "title_zh": "勇者斗恶龙 达伊的大冒险 1", "cover_id": 2772413, "first_chap_id": 126932, "cover_url": "https://i.motiezw.com/cover/1533/2772413.jpg"}, {"title_hant": "勇者鬥惡龍 達伊的大冒險 2", "title_zh": "勇者斗恶龙 达伊的大冒险 2", "cover_id": 2772737, "first_chap_id": 126949, "cover_url": "https://i.motiezw.com/cover/1533/2772737.jpg"}, {"title_hant": "勇者鬥惡龍 達伊的大冒險 3", "title_zh": "勇者斗恶龙 达伊的大冒险 3", "cover_id": 2773069, "first_chap_id": 126967, "cover_url": "https://i.motiezw.com/cover/1533/2773069.jpg"}, {"title_hant": "勇者鬥惡龍 達伊的大冒險 4", "title_zh": "勇者斗恶龙 达伊的大冒险 4", "cover_id": 2774454, "first_chap_id": 127039, "cover_url": "https://i.motiezw.com/cover/1533/2774454.jpg"}, {"title_hant": "勇者鬥惡龍 達伊的大冒險 5", "title_zh": "勇者斗恶龙 达伊的大冒险 5", "cover_id": 2774794, "first_chap_id": 127057, "cover_url": "https://i.motiezw.com/cover/1533/2774794.jpg"}, {"title_hant": "勇者鬥惡龍 達伊的大冒險 6", "title_zh": "勇者斗恶龙 达伊的大冒险 6", "cover_id": 2775139, "first_chap_id": 127075, "cover_url": "https://i.motiezw.com/cover/1533/2775139.jpg"}, {"title_hant": "勇者鬥惡龍 達伊的大冒險 7", "title_zh": "勇者斗恶龙 达伊的大冒险 7", "cover_id": 2775410, "first_chap_id": 127090, "cover_url": "https://i.motiezw.com/cover/1533/2775410.jpg"}, {"title_hant": "勇者鬥惡龍 達伊的大冒險 8", "title_zh": "勇者斗恶龙 达伊的大冒险 8", "cover_id": 2775680, "first_chap_id": 127105, "cover_url": "https://i.motiezw.com/cover/1533/2775680.jpg"}, {"title_hant": "勇者鬥惡龍 達伊的大冒險 9", "title_zh": "勇者斗恶龙 达伊的大冒险 9", "cover_id": 2776045, "first_chap_id": 127124, "cover_url": "https://i.motiezw.com/cover/1533/2776045.jpg"}, {"title_hant": "勇者鬥惡龍 達伊的大冒險 10", "title_zh": "勇者斗恶龙 达伊的大冒险 10", "cover_id": 2776343, "first_chap_id": 127140, "cover_url": "https://i.motiezw.com/cover/1533/2776343.jpg"}, {"title_hant": "勇者鬥惡龍 達伊的大冒險 11", "title_zh": "勇者斗恶龙 达伊的大冒险 11", "cover_id": 2776746, "first_chap_id": 127163, "cover_url": "https://i.motiezw.com/cover/1533/2776746.jpg"}, {"title_hant": "勇者鬥惡龍 達伊的大冒險 12", "title_zh": "勇者斗恶龙 达伊的大冒险 12", "cover_id": 2776993, "first_chap_id": 127176, "cover_url": "https://i.motiezw.com/cover/1533/2776993.jpg"}], "chapters": [{"cid": "126932", "title": "迪爾帕!伊魯伊魯!〈前篇〉", "title_zh": "迪尔帕!伊鲁伊鲁!〈前篇〉"}, {"cid": "126933", "title": "迪爾帕!伊魯伊魯!〈後篇〉", "title_zh": "迪尔帕!伊鲁伊鲁!〈后篇〉"}, {"cid": "126934", "title": "達伊發威!!!〈前篇〉", "title_zh": "达伊发威!!!〈前篇〉"}, {"cid": "126935", "title": "達伊發威!!!〈中篇〉", "title_zh": "达伊发威!!!〈中篇〉"}, {"cid": "126936", "title": "達伊發威!!!〈後篇〉", "title_zh": "达伊发威!!!〈后篇〉"}, {"cid": "126937", "title": "勇者的家庭教師!!之卷", "title_zh": "勇者的家庭教师!!之卷"}, {"cid": "126938", "title": "達伊特訓!!!之卷", "title_zh": "达伊特训!!!之卷"}, {"cid": "126939", "title": "戴著眼鏡的龍!之卷", "title_zh": "戴著眼镜的龙!之卷"}, {"cid": "126940", "title": "魔王出現⋯!?之卷", "title_zh": "魔王出现⋯!?之卷"}, {"cid": "126941", "title": "哈德拉的真面目⋯!!之卷", "title_zh": "哈德拉的真面目⋯!!之卷"}, {"cid": "126942", "title": "對決!!哈德拉對阿邦之卷", "title_zh": "对决!!哈德拉对阿邦之卷"}, {"cid": "126943", "title": "阿邦之證之卷", "title_zh": "阿邦之证之卷"}, {"cid": "126944", "title": "達伊怒火爆發之卷", "title_zh": "达伊怒火爆发之卷"}, {"cid": "126945", "title": "爆發!!最強招式之卷", "title_zh": "爆发!!最强招式之卷"}, {"cid": "126946", "title": "朝大冒險之路出發!!之卷", "title_zh": "朝大冒险之路出发!!之卷"}, {"cid": "126947", "title": "卷末企劃:咒文大全", "title_zh": "卷末企划:咒文大全"}, {"cid": "126949", "title": "魔森林的瑪姆之卷", "title_zh": "魔森林的玛姆之卷"}, {"cid": "126950", "title": "獸王!!庫羅克泰因之卷", "title_zh": "兽王!!库罗克泰因之卷"}, {"cid": "126951", "title": "獸王之吼!!之卷", "title_zh": "兽王之吼!!之卷"}, {"cid": "126952", "title": "集合!!阿邦的門徒之卷", "title_zh": "集合!!阿邦的门徒之卷"}, {"cid": "126953", "title": "驚人的魔彈槍之卷", "title_zh": "惊人的魔弹枪之卷"}, {"cid": "126954", "title": "吾師阿邦之卷", "title_zh": "吾师阿邦之卷"}, {"cid": "126956", "title": "危機逼近羅莫斯之卷", "title_zh": "危机逼近罗莫斯之卷"}, {"cid": "126957", "title": "百獸總進擊!!之卷", "title_zh": "百兽总进击!!之卷"}, {"cid": "126958", "title": "達伊的弱點⋯!?之卷", "title_zh": "达伊的弱点⋯!?之卷"}, {"cid": "126959", "title": "卑鄙的妖魔主教之卷", "title_zh": "卑鄙的妖魔主教之卷"}, {"cid": "126960", "title": "微弱的勇氣之卷", "title_zh": "微弱的勇气之卷"}, {"cid": "126961", "title": "波普!拚死一戰吧!!之卷", "title_zh": "波普!拚死一战吧!!之卷"}, {"cid": "126962", "title": "帶來奇蹟的友Q之卷", "title_zh": "带来奇迹的友Q之卷"}, {"cid": "126963", "title": "達伊憤怒的紋章!!之卷", "title_zh": "达伊愤怒的纹章!!之卷"}, {"cid": "126964", "title": "小小的勇者們之卷", "title_zh": "小小的勇者们之卷"}, {"cid": "126965", "title": "卷末企劃:咒文大全", "title_zh": "卷末企划:咒文大全"}, {"cid": "126967", "title": "朝帕普尼卡出發!之卷", "title_zh": "朝帕普尼卡出发!之卷"}, {"cid": "126968", "title": "六大軍團團長集結⋯!?之卷", "title_zh": "六大军团团长集结⋯!?之卷"}, {"cid": "126969", "title": "神秘的鋼劍士之卷", "title_zh": "神秘的钢剑士之卷"}, {"cid": "126970", "title": "魔劍戰士修凱爾!!之卷", "title_zh": "魔剑战士修凯尔!!之卷"}, {"cid": "126971", "title": "父親的仇人是⋯阿邦!?之卷", "title_zh": "父亲的仇人是⋯阿邦!?之卷"}, {"cid": "126972", "title": "漆黑的最強之劍!!之卷", "title_zh": "漆黑的最强之剑!!之卷"}, {"cid": "126973", "title": "窮途末路⋯!!之卷", "title_zh": "穷途末路⋯!!之卷"}, {"cid": "126974", "title": "獸王的眼淚之卷", "title_zh": "兽王的眼泪之卷"}, {"cid": "126975", "title": "此乃地底魔城!之卷", "title_zh": "此乃地底魔城!之卷"}, {"cid": "126976", "title": "落下閃電吧!之卷", "title_zh": "落下闪电吧!之卷"}, {"cid": "126977", "title": "潛入死之迷宮!之卷", "title_zh": "潜入死之迷宫!之卷"}, {"cid": "126978", "title": "一決勝負的瞬間⋯!!之卷", "title_zh": "一决胜负的瞬间⋯!!之卷"}, {"cid": "126979", "title": "達伊死於魔劍之下⋯!!?之卷", "title_zh": "达伊死于魔剑之下⋯!!?之卷"}, {"cid": "126981", "title": "正義的閃電劍!!!之卷", "title_zh": "正义的闪电剑!!!之卷"}, {"cid": "126982", "title": "再見了!孤獨的戰士之卷", "title_zh": "再见了!孤独的战士之卷"}, {"cid": "126983", "title": "卷末企劃:咒文大全", "title_zh": "卷末企划:咒文大全"}, {"cid": "127039", "title": "約定的信號彈之卷", "title_zh": "约定的信号弹之卷"}, {"cid": "127040", "title": "此時的雷歐娜⋯⋯!?之卷", "title_zh": "此时的雷欧娜⋯⋯!?之卷"}, {"cid": "127041", "title": "殘酷!弗雷查特之卷", "title_zh": "残酷!弗雷查特之卷"}, {"cid": "127042", "title": "勇者對冰炎將軍!!之卷", "title_zh": "勇者对冰炎将军!!之卷"}, {"cid": "127043", "title": "恐怖的結界咒法!!之卷", "title_zh": "恐怖的结界咒法!!之卷"}, {"cid": "127044", "title": "冰封M人·雷歐娜!之卷", "title_zh": "冰封M人·雷欧娜!之卷"}, {"cid": "127045", "title": "傳說中的大魔導士之卷", "title_zh": "传说中的大魔导士之卷"}, {"cid": "127046", "title": "馬德利夫的特訓之卷", "title_zh": "马德利夫的特训之卷"}, {"cid": "127047", "title": "登陸巴爾基島之卷", "title_zh": "登陆巴尔基岛之卷"}, {"cid": "127048", "title": "魔王軍總攻擊!!!之卷", "title_zh": "魔王军总攻击!!!之卷"}, {"cid": "127049", "title": "超高溫的死鬥!!之卷", "title_zh": "超高温的死斗!!之卷"}, {"cid": "127050", "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>