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-653", "mangaid": "653", "zh_title": "银魂", "hant_title": "銀魂", "en_title": "银魂 (Bilimanga #653)", "author": "空知英秋", "tags": ["奇幻冒险", "日本漫画", "漫画", "日漫", "连载漫画"], "zh_desc": "在江户,因为突然从宇宙来的异人「天人」势力的抬头加上颁布废刀令,使得武士走上衰退的道路。但是有个人依然坚持武士的灵魂…。他叫做坂田银时。这个喜欢吃甜食&又无厘头的家伙,说不定能将腐败的江户给一分为二呢……?\n\n📚 作品信息:作者 空知英秋 · 评分 10 · 共收录 77 卷 / 702 话章节目录与高清彩页/条漫预览。", "hant_desc": "在江戶,因為突然從宇宙來的異人「天人」勢力的抬頭加上頒布廢刀令,使得武士走上衰退的道路。但是有個人依然堅持武士的靈魂…。他叫做坂田銀時。這個喜歡吃甜食&又無厘頭的傢伙,說不定能將腐敗的江戶給一分為二呢……?\n\n📚 作品資訊:作者 空知英秋 · 評分 10 · 共收錄 77 卷 / 702 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '银魂' (銀魂) by 空知英秋. Includes 77 volumes and 702 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-653/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-653/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-653/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-653/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-653/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-653/page_06.jpg"], "volumes": [{"title_hant": "銀魂 1", "title_zh": "银魂 1", "cover_id": 1090678, "first_chap_id": 49607, "cover_url": "https://i.motiezw.com/cover/653/1090678.jpg"}, {"title_hant": "銀魂 2", "title_zh": "银魂 2", "cover_id": 1090882, "first_chap_id": 49616, "cover_url": "https://i.motiezw.com/cover/653/1090882.jpg"}, {"title_hant": "銀魂 3", "title_zh": "银魂 3", "cover_id": 1091087, "first_chap_id": 49626, "cover_url": "https://i.motiezw.com/cover/653/1091087.jpg"}, {"title_hant": "銀魂 4", "title_zh": "银魂 4", "cover_id": 1091277, "first_chap_id": 49637, "cover_url": "https://i.motiezw.com/cover/653/1091277.jpg"}, {"title_hant": "銀魂 5", "title_zh": "银魂 5", "cover_id": 1091465, "first_chap_id": 49648, "cover_url": "https://i.motiezw.com/cover/653/1091465.jpg"}, {"title_hant": "銀魂 6", "title_zh": "银魂 6", "cover_id": 1091661, "first_chap_id": 49659, "cover_url": "https://i.motiezw.com/cover/653/1091661.jpg"}, {"title_hant": "銀魂 7", "title_zh": "银魂 7", "cover_id": 1091850, "first_chap_id": 49670, "cover_url": "https://i.motiezw.com/cover/653/1091850.jpg"}, {"title_hant": "銀魂 8", "title_zh": "银魂 8", "cover_id": 1092040, "first_chap_id": 49681, "cover_url": "https://i.motiezw.com/cover/653/1092040.jpg"}, {"title_hant": "銀魂 9", "title_zh": "银魂 9", "cover_id": 1092229, "first_chap_id": 49692, "cover_url": "https://i.motiezw.com/cover/653/1092229.jpg"}, {"title_hant": "銀魂 10", "title_zh": "银魂 10", "cover_id": 1092418, "first_chap_id": 49703, "cover_url": "https://i.motiezw.com/cover/653/1092418.jpg"}, {"title_hant": "銀魂 11", "title_zh": "银魂 11", "cover_id": 1092607, "first_chap_id": 49714, "cover_url": "https://i.motiezw.com/cover/653/1092607.jpg"}, {"title_hant": "銀魂 12", "title_zh": "银魂 12", "cover_id": 1092796, "first_chap_id": 49724, "cover_url": "https://i.motiezw.com/cover/653/1092796.jpg"}], "chapters": [{"cid": "49607", "title": "第一訓 凡是自然卷的傢伙都是好人", "title_zh": "第一训 凡是自然卷的家伙都是好人"}, {"cid": "49608", "title": "第二訓 飼主要負起責任,照顧寵物到最後一刻!", "title_zh": "第二训 饲主要负起责任,照顾宠物到最后一刻!"}, {"cid": "49609", "title": "第三訓 JUMP常常會在星期四出刊,大家別忘了!", "title_zh": "第三训 JUMP常常会在星期四出刊,大家别忘了!"}, {"cid": "49610", "title": "第四訓 凡是第一印象不錯的人,沒有一個像樣的!", "title_zh": "第四训 凡是第一印象不错的人,没有一个像样的!"}, {"cid": "49611", "title": "第五訓 就算變成老頭子,也要有個能夠叫彼此綽號的好友!", "title_zh": "第五训 就算变成老头子,也要有个能够叫彼此绰号的好友!"}, {"cid": "49612", "title": "第六訓 你們既然有時間搞恐怖活動,不如去散個步吧!", "title_zh": "第六训 你们既然有时间搞恐怖活动,不如去散个步吧!"}, {"cid": "49613", "title": "特別短篇作品 『Dandy Lion』", "title_zh": "特别短篇作品 『Dandy Lion』"}, {"cid": "49614", "title": "附錄", "title_zh": "附录"}, {"cid": "49616", "title": "第七訓 一旦答應人家的事,死都要遵守!", "title_zh": "第七训 一旦答应人家的事,死都要遵守!"}, {"cid": "49617", "title": "第八訓 堅持立場和死纏爛打只是一線之隔!", "title_zh": "第八训 坚持立场和死缠烂打只是一线之隔!"}, {"cid": "49618", "title": "第九訓 打架就是要靠拳頭", "title_zh": "第九训 打架就是要靠拳头"}, {"cid": "49619", "title": "第十訓 感覺疲勞時,就多吃點酸的東西!", "title_zh": "第十训 感觉疲劳时,就多吃点酸的东西!"}, {"cid": "49620", "title": "第十一訓 壓得扁扁的丸子根本不算是丸子,混帳!", "title_zh": "第十一训 压得扁扁的丸子根本不算是丸子,混帐!"}, {"cid": "49621", "title": "第十二訓 全國的辣妹們,請遵守門禁時間!", "title_zh": "第十二训 全国的辣妹们,请遵守门禁时间!"}, {"cid": "49622", "title": "第十三訓 在廁所所產生的東西全都是髒東西!", "title_zh": "第十三训 在厕所所产生的东西全都是脏东西!"}, {"cid": "49623", "title": "特別短篇作品 『是非黑白』", "title_zh": "特别短篇作品 『是非黑白』"}, {"cid": "49624", "title": "附錄", "title_zh": "附录"}, {"cid": "49626", "title": "第十四訓 既然要COSPLAY,那就連內心都要打扮", "title_zh": "第十四训 既然要COSPLAY,那就连内心都要打扮"}, {"cid": "49627", "title": "第十五訓 有個莫名其妙的規則是說… 男人要是摸了青蛙就會成為男子漢", "title_zh": "第十五训 有个莫名其妙的规则是说… 男人要是摸了青蛙就会成为男子汉"}, {"cid": "49628", "title": "第十六訓 仔細想想,人生是從你成為大叔之後才會變得更加漫長的!好可怕!", "title_zh": "第十六训 仔细想想,人生是从你成为大叔之后才会变得更加漫长的!好可怕!"}, {"cid": "49629", "title": "第十七訓 就算沒喝醉也要裝成酩酊大醉,讓上司有面子", "title_zh": "第十七训 就算没喝醉也要装成酩酊大醉,让上司有面子"}, {"cid": "49631", "title": "第十九訓 偶像做的事其實都和你們沒兩樣啊", "title_zh": "第十九训 偶像做的事其实都和你们没两样啊"}, {"cid": "49632", "title": "第二十訓 飼主和寵物通常都很像", "title_zh": "第二十训 饲主和宠物通常都很像"}, {"cid": "49633", "title": "第二十一訓 發際的長度與孩子令人討厭的程度是等比例的", "title_zh": "第二十一训 发际的长度与孩子令人讨厌的程度是等比例的"}, {"cid": "49634", "title": "第二十二訓 壓力是造成禿頭的原因,為了避免累積壓力而非常注意,因而又累積了壓力,到頭來我們根本無能為力。", "title_zh": "第二十二训 压力是造成秃头的原因,为了避免累积压力而非常注意,因而又累积了压力,到头来我们根本无能为力。"}, {"cid": "49635", "title": "附錄", "title_zh": "附录"}, {"cid": "49637", "title": "第二十三訓 只要把腋下洗一洗就行啦", "title_zh": "第二十三训 只要把腋下洗一洗就行啦"}, {"cid": "49638", "title": "第二十四訓 以前的英雄事跡要誇張三分,大家熱鬧一下就夠了", "title_zh": "第二十四训 以前的英雄事迹要夸张三分,大家热闹一下就够了"}, {"cid": "49639", "title": "第二十五訓 你們一定覺得自己一直說好可愛,自己一定很可愛吧", "title_zh": "第二十五训 你们一定觉得自己一直说好可爱,自己一定很可爱吧"}, {"cid": "49640", "title": "第二十六訓 就算去旅行忘了帶NK,也不可以忘了UNO", "title_zh": "第二十六训 就算去旅行忘了带NK,也不可以忘了UNO"}, {"cid": "49641", "title": "第二十七訓 困難時也要開懷大笑", "title_zh": "第二十七训 困难时也要开怀大笑"}, {"cid": "49642", "title": "第二十八訓 啊啊!不管金窩銀窩,還是自己的狗窩最舒服!", "title_zh": "第二十八训 啊啊!不管金窝银窝,还是自己的狗窝最舒服!"}, {"cid": "49643", "title": "第二十九訓 你還覺得自己可以邊聽音樂邊準備考試嗎?還是快改掉吧!", "title_zh": "第二十九训 你还觉得自己可以边听音乐边准备考试吗?还是快改掉吧!"}, {"cid": "49644", "title": "第三十訓 事件並不是壞人所引起的,而是那些太喧鬧的傢伙所引起的", "title_zh": "第三十训 事件并不是坏人所引起的,而是那些太喧闹的家伙所引起的"}, {"cid": "49645", "title": "第三十一訓 父子就只有在討厭的東西上很像", "title_zh": "第三十一训 父子就只有在讨厌的东西上很像"}, {"cid": "49646", "title": "附錄", "title_zh": "附录"}, {"cid": "49648", "title": "第三十二訓 你問為什麼海水是咸的?還不是你們這些都市人一邊游泳還不忘大小便!", "title_zh": "第三十二训 你问为什么海水是咸的?还不是你们这些都市人一边游泳还不忘大小便!"}, {"cid": "49649", "title": "第三十三訓 大家要小心輸送帶", "title_zh": "第三十三训 大家要小心输送带"}, {"cid": "49650", "title": "第三十四訓 內心有重大Q結的人,能夠成就大事!", "title_zh": "第三十四训 内心有重大Q结的人,能够成就大事!"}, {"cid": "49651", "title": "第三十五訓 不要慌張!還是有所謂冷卻期制度的!", "title_zh": "第三十五训 不要慌张!还是有所谓冷却期制度的!"}, {"cid": "49652", "title": "第三十六訓 不要害羞,勇敢地說出來!", "title_zh": "第三十六训 不要害羞,勇敢地说出来!"}, {"cid": "49653", "title": "第三十七訓 不要再飆車啦!", "title_zh": "第三十七训 不要再飙车啦!"}, {"cid": "49654", "title": "第三十八訓 人妖很清楚男人的愚蠢和N人的狡猾", "title_zh": "第三十八训 人妖很清楚男人的愚蠢和N人的狡猾"}, {"cid": "49656", "title": "第四十訓 所謂結婚,就是你會持續錯上一輩子!", "title_zh": "第四十训 所谓结婚,就是你会持续错上一辈子!"}, {"cid": "49657", "title": "附錄", "title_zh": "附录"}, {"cid": "49659", "title": "第四十一訓 松茸真的有那麼好吃嗎?請你們再仔細想一想!", "title_zh": "第四十一训 松茸真的有那么好吃吗?请你们再仔细想一想!"}, {"cid": "49660", "title": "第四十二訓 夢想想要靠拳頭去掌握", "title_zh": "第四十二训 梦想想要靠拳头去掌握"}, {"cid": "49661", "title": "第四十三訓 男人都是浪漫主義者", "title_zh": "第四十三训 男人都是浪漫主义者"}, {"cid": "49662", "title": "第四十四訓 有些東西是刀子斬不斷的", "title_zh": "第四十四训 有些东西是刀子斩不断的"}, {"cid": "49663", "title": "第四十五訓 為什麼好事不會連續發生,而壞事卻接二連三找上我!", "title_zh": "第四十五训 为什么好事不会连续发生,而坏事却接二连三找上我!"}, {"cid": "49664", "title": "第四十六訓 越好吃的東西,一旦中毒可是很可怕的!", "title_zh": "第四十六训 越好吃的东西,一旦中毒可是很可怕的!"}, {"cid": "49665", "title": "第四十七訓 電視和報紙必須看仔細才行", "title_zh": "第四十七训 电视和报纸必须看仔细才行"}, {"cid": "49666", "title": "第四十八訓 小腿上有傷的人非常多話", "title_zh": "第四十八训 小腿上有伤的人非常多话"}, {"cid": "49667", "title": "第四十九訓 一旦用過免治馬桶,其它的廁所都無法適應!", "title_zh": "第四十九训 一旦用过免治马桶,其它的厕所都无法适应!"}, {"cid": "49668", "title": "附錄", "title_zh": "附录"}, {"cid": "49670", "title": "第五十訓 唯獨那些無所謂的事反而很難忘記", "title_zh": "第五十训 唯独那些无所谓的事反而很难忘记"}, {"cid": "49671", "title": "第五十一訓 人生就像輸送帶一樣在運行", "title_zh": "第五十一训 人生就像输送带一样在运行"}, {"cid": "49672", "title": "第五十二訓 公園是屬於孩子們的", "title_zh": "第五十二训 公园是属于孩子们的"}, {"cid": "49673", "title": "第五十三訓 靠鐘聲就能消除煩惱嗎…應該靠自己去抑制吧!", "title_zh": "第五十三训 靠钟声就能消除烦恼吗…应该靠自己去抑制吧!"}, {"cid": "49674", "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>