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-527", "mangaid": "527", "zh_title": "食戟之灵", "hant_title": "食戟之靈", "en_title": "食戟之灵 (Bilimanga #527)", "author": "佐伯俊 / 附田祐斗 / 森崎友纪", "tags": ["美食", "竞技", "热血", "校园", "日常", "经营", "其他分类", "日本漫画"], "zh_desc": "家里经营餐馆的中学生.幸平创真,以料理人的父亲为目标,每天持续磨练自己的厨艺。\n\r\n但是某一天,父亲却要他进入厨艺学校「远月学园」就读!来到远月学园的创真,\n\r\n遇见了一个拥有「神之舌」的少女.薙切绘里奈,\n\r\n但是创真在插班考试中做出的料理,却被绘里奈判定为不合格?\n\r\n创真的未来会如何呢?\n\r\n大受好评的新型料理漫画,不容错过!\n\n📚 作品信息:作者 佐伯俊 / 附田祐斗 / 森崎友纪 · 评分 10 · 共收录 36 卷 / 338 话章节目录与高清彩页/条漫预览。", "hant_desc": "家裡經營餐館的中學生.幸平創真,以料理人的父親為目標,每天持續磨練自己的廚藝。\n\r\n但是某一天,父親卻要他進入廚藝學校「遠月學園」就讀!來到遠月學園的創真,\n\r\n遇見了一個擁有「神之舌」的少女.薙切繪里奈,\n\r\n但是創真在插班考試中做出的料理,卻被繪里奈判定為不合格?\n\r\n創真的未來會如何呢?\n\r\n大受好評的新型料理漫畫,不容錯過!\n\n📚 作品資訊:作者 佐伯俊 / 附田祐斗 / 森崎友紀 · 評分 10 · 共收錄 36 卷 / 338 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '食戟之灵' (食戟之靈) by 佐伯俊 / 附田祐斗 / 森崎友纪. Includes 36 volumes and 338 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-527/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-527/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-527/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-527/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-527/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-527/page_06.jpg"], "volumes": [{"title_hant": "食戟之靈 1", "title_zh": "食戟之灵 1", "cover_id": 897270, "first_chap_id": 41874, "cover_url": "https://i.motiezw.com/cover/527/897270.jpg"}, {"title_hant": "食戟之靈 2", "title_zh": "食戟之灵 2", "cover_id": 906531, "first_chap_id": 42195, "cover_url": "https://i.motiezw.com/cover/527/906531.jpg"}, {"title_hant": "食戟之靈 3", "title_zh": "食戟之灵 3", "cover_id": 906728, "first_chap_id": 42205, "cover_url": "https://i.motiezw.com/cover/527/906728.jpg"}, {"title_hant": "食戟之靈 4", "title_zh": "食戟之灵 4", "cover_id": 906927, "first_chap_id": 42215, "cover_url": "https://i.motiezw.com/cover/527/906927.jpg"}, {"title_hant": "食戟之靈 5", "title_zh": "食戟之灵 5", "cover_id": 907119, "first_chap_id": 42226, "cover_url": "https://i.motiezw.com/cover/527/907119.jpg"}, {"title_hant": "食戟之靈 6", "title_zh": "食戟之灵 6", "cover_id": 907310, "first_chap_id": 42237, "cover_url": "https://i.motiezw.com/cover/527/907310.jpg"}, {"title_hant": "食戟之靈 7", "title_zh": "食戟之灵 7", "cover_id": 907503, "first_chap_id": 42248, "cover_url": "https://i.motiezw.com/cover/527/907503.jpg"}, {"title_hant": "食戟之靈 8", "title_zh": "食戟之灵 8", "cover_id": 907701, "first_chap_id": 42260, "cover_url": "https://i.motiezw.com/cover/527/907701.jpg"}, {"title_hant": "食戟之靈 9", "title_zh": "食戟之灵 9", "cover_id": 907910, "first_chap_id": 42271, "cover_url": "https://i.motiezw.com/cover/527/907910.jpg"}, {"title_hant": "食戟之靈 10", "title_zh": "食戟之灵 10", "cover_id": 908101, "first_chap_id": 42281, "cover_url": "https://i.motiezw.com/cover/527/908101.jpg"}, {"title_hant": "食戟之靈 11", "title_zh": "食戟之灵 11", "cover_id": 908673, "first_chap_id": 42292, "cover_url": "https://i.motiezw.com/cover/527/908673.jpg"}, {"title_hant": "食戟之靈 12", "title_zh": "食戟之灵 12", "cover_id": 908482, "first_chap_id": 42302, "cover_url": "https://i.motiezw.com/cover/527/908482.jpg"}], "chapters": [{"cid": "41874", "title": "第1. 無盡的荒野", "title_zh": "第1. 无尽的荒野"}, {"cid": "41875", "title": "第2. 神之舌", "title_zh": "第2. 神之舌"}, {"cid": "41876", "title": "第3.「變身」雞蛋拌飯", "title_zh": "第3.「变身」鸡蛋拌饭"}, {"cid": "41877", "title": "第4. 魔王謂「玉」", "title_zh": "第4. 魔王谓「玉」"}, {"cid": "41878", "title": "第5. 那個廚師不會笑", "title_zh": "第5. 那个厨师不会笑"}, {"cid": "41879", "title": "特別短篇 食戟之靈", "title_zh": "特别短篇 食戟之灵"}, {"cid": "41880", "title": "番外篇「倉瀨同學的日記』", "title_zh": "番外篇「仓濑同学的日记』"}, {"cid": "42195", "title": "第6. 極星的瑪莉亞", "title_zh": "第6. 极星的玛莉亚"}, {"cid": "42196", "title": "第7. 三不管地帶", "title_zh": "第7. 三不管地带"}, {"cid": "42197", "title": "第8. 呼喚春天的料理", "title_zh": "第8. 呼唤春天的料理"}, {"cid": "42198", "title": "第9. 冰之N王與春之嵐", "title_zh": "第9. 冰之N王与春之岚"}, {"cid": "42199", "title": "第10. 禸之侵略者", "title_zh": "第10. 禸之侵略者"}, {"cid": "42200", "title": "第11. 對決前夕", "title_zh": "第11. 对决前夕"}, {"cid": "42201", "title": "第12. 身臨戰場", "title_zh": "第12. 身临战场"}, {"cid": "42202", "title": "第13. 靜默之丼,雄辯之丼", "title_zh": "第13. 静默之丼,雄辩之丼"}, {"cid": "42203", "title": "第14. 小惠的庭園", "title_zh": "第14. 小惠的庭园"}, {"cid": "42205", "title": "第15. 摩擦與菁英", "title_zh": "第15. 摩擦与菁英"}, {"cid": "42206", "title": "第16. 構思與創造的協奏曲", "title_zh": "第16. 构思与创造的协奏曲"}, {"cid": "42207", "title": "第17. 點綴山林的衣袍", "title_zh": "第17. 点缀山林的衣袍"}, {"cid": "42208", "title": "第18. 創意的種子", "title_zh": "第18. 创意的种子"}, {"cid": "42209", "title": "第19. 耀眼的靈魂", "title_zh": "第19. 耀眼的灵魂"}, {"cid": "42211", "title": "第21. 無上的Recette", "title_zh": "第21. 无上的Recette"}, {"cid": "42212", "title": "特別單篇 你和我的戀愛諮詢", "title_zh": "特别单篇 你和我的恋爱咨询"}, {"cid": "42213", "title": "番外篇 CUOCO IN ITALIA", "title_zh": "番外篇 CUOCO IN ITALIA"}, {"cid": "42215", "title": "第22. 畢業生們", "title_zh": "第22. 毕业生们"}, {"cid": "42216", "title": "第23. 存在的證明", "title_zh": "第23. 存在的证明"}, {"cid": "42217", "title": "第24. 來自東方的魔法師", "title_zh": "第24. 来自东方的魔法师"}, {"cid": "42218", "title": "第25. 其之面貌", "title_zh": "第25. 其之面貌"}, {"cid": "42219", "title": "第26. 盤中的記憶", "title_zh": "第26. 盘中的记忆"}, {"cid": "42220", "title": "第27. 敗北的苦澀", "title_zh": "第27. 败北的苦涩"}, {"cid": "42221", "title": "第28. 誰都不准睡", "title_zh": "第28. 谁都不准睡"}, {"cid": "42222", "title": "第29. 黎明前的蛋們", "title_zh": "第29. 黎明前的蛋们"}, {"cid": "42223", "title": "第30. 假設的圈套", "title_zh": "第30. 假设的圈套"}, {"cid": "42224", "title": "附錄", "title_zh": "附录"}, {"cid": "42226", "title": "第31. Metamorphose", "title_zh": "第31. Metamorphose"}, {"cid": "42227", "title": "第32. 躍動的料理人", "title_zh": "第32. 跃动的料理人"}, {"cid": "42228", "title": "第33. 致終將踏上戰場的各位", "title_zh": "第33. 致终将踏上战场的各位"}, {"cid": "42229", "title": "第34. 圍繞遠月的因緣", "title_zh": "第34. 围绕远月的因缘"}, {"cid": "42230", "title": "第35. 官能的炸雞塊①", "title_zh": "第35. 官能的炸鸡块①"}, {"cid": "42231", "title": "第36. 官能的炸雞塊②", "title_zh": "第36. 官能的炸鸡块②"}, {"cid": "42232", "title": "第37. 官能的炸雞塊③", "title_zh": "第37. 官能的炸鸡块③"}, {"cid": "42233", "title": "第38. 官能的炸雞塊④", "title_zh": "第38. 官能的炸鸡块④"}, {"cid": "42234", "title": "第39. 被選上的人", "title_zh": "第39. 被选上的人"}, {"cid": "42237", "title": "第40. 歸來", "title_zh": "第40. 归来"}, {"cid": "42238", "title": "第41. 曾被稱為「修羅」的男人", "title_zh": "第41. 曾被称为「修罗」的男人"}, {"cid": "42239", "title": "第42. 將人喚醒的親溫", "title_zh": "第42. 将人唤醒的亲温"}, {"cid": "42240", "title": "第43. 馳騁萬里的料理人", "title_zh": "第43. 驰骋万里的料理人"}, {"cid": "42241", "title": "第44. 預料之外的直擊", "title_zh": "第44. 预料之外的直击"}, {"cid": "42242", "title": "第45. 香氣與刺激的伴奏者", "title_zh": "第45. 香气与刺激的伴奏者"}, {"cid": "42243", "title": "第46. 臥龍昇天", "title_zh": "第46. 卧龙升天"}, {"cid": "42244", "title": "第47. 戰鬥的記憶", "title_zh": "第47. 战斗的记忆"}, {"cid": "42245", "title": "第48. 未知的已知", "title_zh": "第48. 未知的已知"}, {"cid": "42246", "title": "番外篇「盛夏的禸魅同學」", "title_zh": "番外篇「盛夏的禸魅同学」"}, {"cid": "42248", "title": "第49. 群狼", "title_zh": "第49. 群狼"}, {"cid": "42249", "title": "第50. 超越日常的事物", "title_zh": "第50. 超越日常的事物"}, {"cid": "42250", "title": "第51. 魔N的餐桌", "title_zh": "第51. 魔N的餐桌"}, {"cid": "42251", "title": "第52. 侍花之人", "title_zh": "第52. 侍花之人"}, {"cid": "42252", "title": "第53. 來自寒冰之國的男人", "title_zh": "第53. 来自寒冰之国的男人"}, {"cid": "42253", "title": "第54. 百花齊放的個人競演", "title_zh": "第54. 百花齐放的个人竞演"}, {"cid": "42254", "title": "第55. 以知識另闢門路", "title_zh": "第55. 以知识另辟门路"}]};
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>