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>FAIRY TAIL 魔导少年 百年任务 - 在线漫画阅读器</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-595", "mangaid": "595", "zh_title": "FAIRY TAIL 魔导少年 百年任务", "hant_title": "FAIRY TAIL 魔導少年 百年任務", "en_title": "FAIRY TAIL 魔导少年 百年任务 (Bilimanga #595)", "author": "上田敦夫 / 真岛浩", "tags": ["奇幻", "冒险", "战斗", "热血", "欢乐", "奇幻冒险", "日本漫画", "漫画"], "zh_desc": "妖精尾巴一如往常的热闹,纳兹却不在公会里,因为他跟格雷、露西、艾尔莎以及两只猫一起出发去挑战当初吉尔达兹没有成功的「百年任务」了!为了这个任务,纳兹一行人来到北方的基尔帝那大陆,拜访最古老的魔导士公会「魔阵之龙」。令他们更惊讶的则是任务内容,竟是封住一个实力都跟亚克诺罗基亚差不多的五神龙!在魔导少年结束后一年多,纳兹等人的后续冒险终于要开始了──!\n\n📚 作品信息:作者 上田敦夫 / 真岛浩 · 评分 10 · 共收录 15 卷 / 141 话章节目录与高清彩页/条漫预览。", "hant_desc": "妖精尾巴一如往常的熱鬧,納茲卻不在公會裡,因為他跟格雷、露西、艾爾莎以及兩隻貓一起出發去挑戰當初吉爾達茲沒有成功的「百年任務」了!為了這個任務,納茲一行人來到北方的基爾帝那大陸,拜訪最古老的魔導士公會「魔陣之龍」。令他們更驚訝的則是任務內容,竟是封住一個實力都跟亞克諾羅基亞差不多的五神龍!在魔導少年結束後一年多,納茲等人的後續冒險終於要開始了──!\n\n📚 作品資訊:作者 上田敦夫 / 真島浩 · 評分 10 · 共收錄 15 卷 / 141 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga 'FAIRY TAIL 魔导少年 百年任务' (FAIRY TAIL 魔導少年 百年任務) by 上田敦夫 / 真岛浩. Includes 15 volumes and 141 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-595/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-595/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-595/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-595/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-595/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-595/page_06.jpg"], "volumes": [{"title_hant": "FAIRY TAIL 魔導少年 百年任務 1", "title_zh": "FAIRY TAIL 魔导少年 百年任务 1", "cover_id": 1011746, "first_chap_id": 46332, "cover_url": "https://i.motiezw.com/cover/595/1011746.jpg"}, {"title_hant": "FAIRY TAIL 魔導少年 百年任務 2", "title_zh": "FAIRY TAIL 魔导少年 百年任务 2", "cover_id": 1011933, "first_chap_id": 46343, "cover_url": "https://i.motiezw.com/cover/595/1011933.jpg"}, {"title_hant": "FAIRY TAIL 魔導少年 百年任務 3", "title_zh": "FAIRY TAIL 魔导少年 百年任务 3", "cover_id": 1012119, "first_chap_id": 46354, "cover_url": "https://i.motiezw.com/cover/595/1012119.jpg"}, {"title_hant": "FAIRY TAIL 魔導少年 百年任務 4", "title_zh": "FAIRY TAIL 魔导少年 百年任务 4", "cover_id": 1012304, "first_chap_id": 46365, "cover_url": "https://i.motiezw.com/cover/595/1012304.jpg"}, {"title_hant": "FAIRY TAIL 魔導少年 百年任務 5", "title_zh": "FAIRY TAIL 魔导少年 百年任务 5", "cover_id": 1012492, "first_chap_id": 46376, "cover_url": "https://i.motiezw.com/cover/595/1012492.jpg"}, {"title_hant": "FAIRY TAIL 魔導少年 百年任務 6", "title_zh": "FAIRY TAIL 魔导少年 百年任务 6", "cover_id": 1012679, "first_chap_id": 46387, "cover_url": "https://i.motiezw.com/cover/595/1012679.jpg"}, {"title_hant": "FAIRY TAIL 魔導少年 百年任務 7", "title_zh": "FAIRY TAIL 魔导少年 百年任务 7", "cover_id": 1012866, "first_chap_id": 46397, "cover_url": "https://i.motiezw.com/cover/595/1012866.jpg"}, {"title_hant": "FAIRY TAIL 魔導少年 百年任務 8", "title_zh": "FAIRY TAIL 魔导少年 百年任务 8", "cover_id": 1013051, "first_chap_id": 46408, "cover_url": "https://i.motiezw.com/cover/595/1013051.jpg"}, {"title_hant": "FAIRY TAIL 魔導少年 百年任務 9", "title_zh": "FAIRY TAIL 魔导少年 百年任务 9", "cover_id": 1013240, "first_chap_id": 46419, "cover_url": "https://i.motiezw.com/cover/595/1013240.jpg"}, {"title_hant": "FAIRY TAIL 魔導少年 百年任務 10", "title_zh": "FAIRY TAIL 魔导少年 百年任务 10", "cover_id": 1013429, "first_chap_id": 46431, "cover_url": "https://i.motiezw.com/cover/595/1013429.jpg"}, {"title_hant": "FAIRY TAIL 魔導少年 百年任務 11", "title_zh": "FAIRY TAIL 魔导少年 百年任务 11", "cover_id": 1013614, "first_chap_id": 46441, "cover_url": "https://i.motiezw.com/cover/595/1013614.jpg"}, {"title_hant": "FAIRY TAIL 魔導少年 百年任務 12", "title_zh": "FAIRY TAIL 魔导少年 百年任务 12", "cover_id": 1013802, "first_chap_id": 46451, "cover_url": "https://i.motiezw.com/cover/595/1013802.jpg"}], "chapters": [{"cid": "46332", "title": "第1話「最初」的公會與「最強」的公會", "title_zh": "第1话「最初」的公会与「最强」的公会"}, {"cid": "46333", "title": "第2話 滅龍的系譜", "title_zh": "第2话 灭龙的系谱"}, {"cid": "46334", "title": "第3話 最後的希望", "title_zh": "第3话 最后的希望"}, {"cid": "46335", "title": "第4話 神奇的艾爾米那", "title_zh": "第4话 神奇的艾尔米那"}, {"cid": "46336", "title": "第5話「封」住五神龍", "title_zh": "第5话「封」住五神龙"}, {"cid": "46337", "title": "第6話 滅絕之刃", "title_zh": "第6话 灭绝之刃"}, {"cid": "46338", "title": "第7話 龍之海", "title_zh": "第7话 龙之海"}, {"cid": "46339", "title": "第8話 神龍的憂鬱", "title_zh": "第8话 神龙的忧郁"}, {"cid": "46340", "title": "第9話 是黑是白", "title_zh": "第9话 是黑是白"}, {"cid": "46341", "title": "附錄", "title_zh": "附录"}, {"cid": "46343", "title": "第10話 斬心的惡魔", "title_zh": "第10话 斩心的恶魔"}, {"cid": "46344", "title": "第11話 刃、鎧、灰", "title_zh": "第11话 刃、铠、灰"}, {"cid": "46345", "title": "第12話 星與雷", "title_zh": "第12话 星与雷"}, {"cid": "46346", "title": "第13話 水的相遇", "title_zh": "第13话 水的相遇"}, {"cid": "46347", "title": "第14話 雨與陰", "title_zh": "第14话 雨与阴"}, {"cid": "46348", "title": "第15話 染白", "title_zh": "第15话 染白"}, {"cid": "46349", "title": "第16話 灰與暗雲", "title_zh": "第16话 灰与暗云"}, {"cid": "46350", "title": "第17話 水神龍", "title_zh": "第17话 水神龙"}, {"cid": "46351", "title": "第18話 苦澀的決定", "title_zh": "第18话 苦涩的决定"}, {"cid": "46352", "title": "附錄", "title_zh": "附录"}, {"cid": "46354", "title": "第19話 來自深淵", "title_zh": "第19话 来自深渊"}, {"cid": "46356", "title": "第21話 燒掉一切", "title_zh": "第21话 烧掉一切"}, {"cid": "46357", "title": "第22話 必須要有大家才行", "title_zh": "第22话 必须要有大家才行"}, {"cid": "46358", "title": "第23話 祝福的港都", "title_zh": "第23话 祝福的港都"}, {"cid": "46359", "title": "第24話 結果很好", "title_zh": "第24话 结果很好"}, {"cid": "46360", "title": "第25話 FAIRY NAIL", "title_zh": "第25话 FAIRY NAIL"}, {"cid": "46361", "title": "第26話 在雷恩希爾", "title_zh": "第26话 在雷恩希尔"}, {"cid": "46362", "title": "第27話 木神龍阿爾德隆", "title_zh": "第27话 木神龙阿尔德隆"}, {"cid": "46363", "title": "附錄", "title_zh": "附录"}, {"cid": "46365", "title": "第28話 白之支配", "title_zh": "第28话 白之支配"}, {"cid": "46366", "title": "第29話 白滅", "title_zh": "第29话 白灭"}, {"cid": "46367", "title": "第30話 打架祭典", "title_zh": "第30话 打架祭典"}, {"cid": "46368", "title": "第31話 對峙的妖精們", "title_zh": "第31话 对峙的妖精们"}, {"cid": "46369", "title": "第32話 星靈衣合成", "title_zh": "第32话 星灵衣合成"}, {"cid": "46370", "title": "第33話 疼痛", "title_zh": "第33话 疼痛"}, {"cid": "46371", "title": "第34話 新刺客們", "title_zh": "第34话 新刺客们"}, {"cid": "46372", "title": "第35話 靈龍雷斯", "title_zh": "第35话 灵龙雷斯"}, {"cid": "46373", "title": "第36話 混戰的多拉席爾", "title_zh": "第36话 混战的多拉席尔"}, {"cid": "46374", "title": "附錄", "title_zh": "附录"}, {"cid": "46376", "title": "第37話 β天國", "title_zh": "第37话 β天国"}, {"cid": "46377", "title": "第38話 同步率", "title_zh": "第38话 同步率"}, {"cid": "46378", "title": "第39話 繭龍繭繭", "title_zh": "第39话 茧龙茧茧"}, {"cid": "46379", "title": "第40話 比血更濃", "title_zh": "第40话 比血更浓"}, {"cid": "46381", "title": "第42話 只要是為了公會", "title_zh": "第42话 只要是为了公会"}, {"cid": "46382", "title": "第43話 議會", "title_zh": "第43话 议会"}, {"cid": "46383", "title": "第44話 紅之激鬥", "title_zh": "第44话 红之激斗"}, {"cid": "46384", "title": "第45話 紅之落幕", "title_zh": "第45话 红之落幕"}, {"cid": "46385", "title": "附錄", "title_zh": "附录"}, {"cid": "46387", "title": "第46話 白之意志", "title_zh": "第46话 白之意志"}, {"cid": "46388", "title": "第47話 暴虐的黏龍", "title_zh": "第47话 暴虐的黏龙"}, {"cid": "46389", "title": "第48話 第五世代龍之力", "title_zh": "第48话 第五世代龙之力"}, {"cid": "46390", "title": "第49話 最後的寶珠", "title_zh": "第49话 最后的宝珠"}, {"cid": "46391", "title": "第50話 木神龍的秘密", "title_zh": "第50话 木神龙的秘密"}, {"cid": "46392", "title": "第51話 轟響的大地", "title_zh": "第51话 轰响的大地"}, {"cid": "46393", "title": "第52話 讀心的群樹", "title_zh": "第52话 读心的群树"}, {"cid": "46394", "title": "第53話 尊貴的詛咒", "title_zh": "第53话 尊贵的诅咒"}, {"cid": "46395", "title": "第54話 神之種子", "title_zh": "第54话 神之种子"}, {"cid": "46397", "title": "第55話 死之命運", "title_zh": "第55话 死之命运"}, {"cid": "46398", "title": "第56話 可靠的夥伴們", "title_zh": "第56话 可靠的伙伴们"}, {"cid": "46399", "title": "第57話 活下去的力量", "title_zh": "第57话 活下去的力量"}]};
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>