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>SAKAMOTO DAYS 坂本日常 - 在线漫画阅读器</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-204", "mangaid": "204", "zh_title": "SAKAMOTO DAYS 坂本日常", "hant_title": "SAKAMOTO DAYS 坂本日常", "en_title": "SAKAMOTO DAYS 坂本日常 (Bilimanga #204)", "author": "铃木祐斗", "tags": ["热血", "战斗", "冒险", "日常", "欢乐", "战斗热血", "日本漫画", "漫画"], "zh_desc": "在悠闲小镇开设商店的发福男子‧坂本太郎,真实身分竟是在遇见真命天女后隐退数年的传奇杀手!昔日搭档兼小弟阿新捎来消息,有人在杀手界重金悬赏要坂本太郎的命,从那一刻起,平静的生活一去不复返……但是坂本太郎不允许!于是,为了保卫家人和美好的日常生活,坂本带领小弟和许多新、旧朋友,抵抗接连来袭的敌人,却慢慢发现幕后黑手似乎没那么简单……?\n\n📚 作品信息:作者 铃木祐斗 · 评分 10 · 共收录 27 卷 / 245 话章节目录与高清彩页/条漫预览。", "hant_desc": "在悠閒小鎮開設商店的發福男子‧坂本太郎,真實身分竟是在遇見真命天女後隱退數年的傳奇殺手!昔日搭檔兼小弟阿新捎來消息,有人在殺手界重金懸賞要坂本太郎的命,從那一刻起,平靜的生活一去不復返……但是坂本太郎不允許!於是,為了保衛家人和美好的日常生活,坂本帶領小弟和許多新、舊朋友,抵抗接連來襲的敵人,卻慢慢發現幕後黑手似乎沒那麼簡單……?\n\n📚 作品資訊:作者 鈴木祐斗 · 評分 10 · 共收錄 27 卷 / 245 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga 'SAKAMOTO DAYS 坂本日常' (SAKAMOTO DAYS 坂本日常) by 铃木祐斗. Includes 27 volumes and 245 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-204/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-204/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-204/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-204/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-204/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-204/page_06.jpg"], "volumes": [{"title_hant": "SAKAMOTO DAYS 坂本日常 1", "title_zh": "SAKAMOTO DAYS 坂本日常 1", "cover_id": 368225, "first_chap_id": 17861, "cover_url": "https://i.motiezw.com/cover/204/368225.jpg"}, {"title_hant": "SAKAMOTO DAYS 坂本日常 2", "title_zh": "SAKAMOTO DAYS 坂本日常 2", "cover_id": 368424, "first_chap_id": 17869, "cover_url": "https://i.motiezw.com/cover/204/368424.jpg"}, {"title_hant": "SAKAMOTO DAYS 坂本日常 3", "title_zh": "SAKAMOTO DAYS 坂本日常 3", "cover_id": 368625, "first_chap_id": 17879, "cover_url": "https://i.motiezw.com/cover/204/368625.jpg"}, {"title_hant": "SAKAMOTO DAYS 坂本日常 4", "title_zh": "SAKAMOTO DAYS 坂本日常 4", "cover_id": 368824, "first_chap_id": 17889, "cover_url": "https://i.motiezw.com/cover/204/368824.jpg"}, {"title_hant": "SAKAMOTO DAYS 坂本日常 5", "title_zh": "SAKAMOTO DAYS 坂本日常 5", "cover_id": 369028, "first_chap_id": 17900, "cover_url": "https://i.motiezw.com/cover/204/369028.jpg"}, {"title_hant": "SAKAMOTO DAYS 坂本日常 6", "title_zh": "SAKAMOTO DAYS 坂本日常 6", "cover_id": 369227, "first_chap_id": 17910, "cover_url": "https://i.motiezw.com/cover/204/369227.jpg"}, {"title_hant": "SAKAMOTO DAYS 坂本日常 7", "title_zh": "SAKAMOTO DAYS 坂本日常 7", "cover_id": 369424, "first_chap_id": 17920, "cover_url": "https://i.motiezw.com/cover/204/369424.jpg"}, {"title_hant": "SAKAMOTO DAYS 坂本日常 8", "title_zh": "SAKAMOTO DAYS 坂本日常 8", "cover_id": 369622, "first_chap_id": 17930, "cover_url": "https://i.motiezw.com/cover/204/369622.jpg"}, {"title_hant": "SAKAMOTO DAYS 坂本日常 9", "title_zh": "SAKAMOTO DAYS 坂本日常 9", "cover_id": 369810, "first_chap_id": 17940, "cover_url": "https://i.motiezw.com/cover/204/369810.jpg"}, {"title_hant": "SAKAMOTO DAYS 坂本日常 10", "title_zh": "SAKAMOTO DAYS 坂本日常 10", "cover_id": 370007, "first_chap_id": 17950, "cover_url": "https://i.motiezw.com/cover/204/370007.jpg"}, {"title_hant": "SAKAMOTO DAYS 坂本日常 11", "title_zh": "SAKAMOTO DAYS 坂本日常 11", "cover_id": 370206, "first_chap_id": 17961, "cover_url": "https://i.motiezw.com/cover/204/370206.jpg"}, {"title_hant": "SAKAMOTO DAYS 坂本日常 12", "title_zh": "SAKAMOTO DAYS 坂本日常 12", "cover_id": 370402, "first_chap_id": 17972, "cover_url": "https://i.motiezw.com/cover/204/370402.jpg"}], "chapters": [{"cid": "17861", "title": "DAYS 1 傳說中的殺手", "title_zh": "DAYS 1 传说中的杀手"}, {"cid": "17862", "title": "DAYS 2 阪本家家訓", "title_zh": "DAYS 2 阪本家家训"}, {"cid": "17863", "title": "DAYS 3 中瀨巡佐與神秘英雄", "title_zh": "DAYS 3 中濑巡佐与神秘英雄"}, {"cid": "17864", "title": "DAYS 4 中華勢力來襲!", "title_zh": "DAYS 4 中华势力来袭!"}, {"cid": "17865", "title": "DAYS 5 vs.孫悲、馬弔", "title_zh": "DAYS 5 vs.孙悲、马吊"}, {"cid": "17866", "title": "DAYS 6 南雲", "title_zh": "DAYS 6 南云"}, {"cid": "17867", "title": "DAYS 7 歡迎來到糖糖樂園!", "title_zh": "DAYS 7 欢迎来到糖糖乐园!"}, {"cid": "17869", "title": "DAYS 8 表演時間", "title_zh": "DAYS 8 表演时间"}, {"cid": "17870", "title": "DAYS 9 波以爾與帶黑", "title_zh": "DAYS 9 波以尔与带黑"}, {"cid": "17871", "title": "DAYS 10 冷硬派", "title_zh": "DAYS 10 冷硬派"}, {"cid": "17872", "title": "DAYS 11 阪本vs.波以爾", "title_zh": "DAYS 11 阪本vs.波以尔"}, {"cid": "17873", "title": "DAYS 12 強大的理由", "title_zh": "DAYS 12 强大的理由"}, {"cid": "17874", "title": "DAYS 13 出租錄影帶", "title_zh": "DAYS 13 出租录影带"}, {"cid": "17875", "title": "DAYS 14 潛入任務!", "title_zh": "DAYS 14 潜入任务!"}, {"cid": "17876", "title": "DAYS 15 啓動", "title_zh": "DAYS 15 启动"}, {"cid": "17877", "title": "DAYS 16 百貨公司戰爭", "title_zh": "DAYS 16 百货公司战争"}, {"cid": "17879", "title": "DAYS 17 真霜平助", "title_zh": "DAYS 17 真霜平助"}, {"cid": "17880", "title": "DAYS 18 vs.狙擊手", "title_zh": "DAYS 18 vs.狙击手"}, {"cid": "17881", "title": "DAYS 19 吵架", "title_zh": "DAYS 19 吵架"}, {"cid": "17882", "title": "DAYS 20 透明高速", "title_zh": "DAYS 20 透明高速"}, {"cid": "17883", "title": "DAYS 21 去博物館吧!", "title_zh": "DAYS 21 去博物馆吧!"}, {"cid": "17885", "title": "DAYS 23 朝倉與阿新", "title_zh": "DAYS 23 朝仓与阿新"}, {"cid": "17886", "title": "DAYS 24 殺手×科學", "title_zh": "DAYS 24 杀手×科学"}, {"cid": "17887", "title": "DAYS 25 科學大傢伙", "title_zh": "DAYS 25 科学大家伙"}, {"cid": "17889", "title": "DAYS 26 ORDER", "title_zh": "DAYS 26 ORDER"}, {"cid": "17890", "title": "DAYS 27 阪本商店vs.LABO", "title_zh": "DAYS 27 阪本商店vs.LABO"}, {"cid": "17891", "title": "DAYS 28 一流", "title_zh": "DAYS 28 一流"}, {"cid": "17892", "title": "DAYS 29 硬闖上車", "title_zh": "DAYS 29 硬闯上车"}, {"cid": "17893", "title": "DAYS 30 車廂內請保持安靜", "title_zh": "DAYS 30 车厢内请保持安静"}, {"cid": "17894", "title": "DAYS 31 我說過啦", "title_zh": "DAYS 31 我说过啦"}, {"cid": "17895", "title": "DAYS 32 澡堂模式", "title_zh": "DAYS 32 澡堂模式"}, {"cid": "17896", "title": "DAYS 33 驚喜", "title_zh": "DAYS 33 惊喜"}, {"cid": "17897", "title": "DAYS 34 無糖", "title_zh": "DAYS 34 无糖"}, {"cid": "17898", "title": "附錄", "title_zh": "附录"}, {"cid": "17900", "title": "DAYS 35 賭場大戰", "title_zh": "DAYS 35 赌场大战"}, {"cid": "17901", "title": "DAYS 36 訛詐", "title_zh": "DAYS 36 讹诈"}, {"cid": "17902", "title": "DAYS 37 死刑犯", "title_zh": "DAYS 37 死刑犯"}, {"cid": "17903", "title": "DAYS 38 不知道踩煞車", "title_zh": "DAYS 38 不知道踩煞车"}, {"cid": "17904", "title": "DAYS 39 ENCOUNT", "title_zh": "DAYS 39 ENCOUNT"}, {"cid": "17905", "title": "DAYS 40 Overload", "title_zh": "DAYS 40 Overload"}, {"cid": "17906", "title": "DAYS 41 生存方式", "title_zh": "DAYS 41 生存方式"}, {"cid": "17907", "title": "DAYS 42 狹路相逢", "title_zh": "DAYS 42 狭路相逢"}, {"cid": "17908", "title": "DAYS 43 喜歡", "title_zh": "DAYS 43 喜欢"}, {"cid": "17910", "title": "DAYS 44 各自進行", "title_zh": "DAYS 44 各自进行"}, {"cid": "17911", "title": "DAYS 45 猛攻", "title_zh": "DAYS 45 猛攻"}, {"cid": "17912", "title": "DAYS 46 不走運", "title_zh": "DAYS 46 不走运"}, {"cid": "17913", "title": "DAYS 47 電梯向上", "title_zh": "DAYS 47 电梯向上"}, {"cid": "17914", "title": "DAYS 48 心之線", "title_zh": "DAYS 48 心之线"}, {"cid": "17915", "title": "DAYS 49 纏繞鐵塔", "title_zh": "DAYS 49 缠绕铁塔"}, {"cid": "17916", "title": "DAYS 50 自行車", "title_zh": "DAYS 50 自行车"}, {"cid": "17917", "title": "DAYS 51 遊行", "title_zh": "DAYS 51 游行"}, {"cid": "17918", "title": "DAYS 52 斬斬舞", "title_zh": "DAYS 52 斩斩舞"}, {"cid": "17920", "title": "DAYS 53 撐不住", "title_zh": "DAYS 53 撑不住"}, {"cid": "17921", "title": "DAYS 54 小事一椿", "title_zh": "DAYS 54 小事一椿"}, {"cid": "17922", "title": "DAYS 55 休息時間", "title_zh": "DAYS 55 休息时间"}, {"cid": "17923", "title": "DAYS 56 JCC", "title_zh": "DAYS 56 JCC"}, {"cid": "17924", "title": "DAYS 57 Have a nice flight", "title_zh": "DAYS 57 Have a nice flight"}, {"cid": "17925", "title": "DAYS 58 新人", "title_zh": "DAYS 58 新人"}, {"cid": "17926", "title": "DAYS 59 CUT", "title_zh": "DAYS 59 CUT"}, {"cid": "17927", "title": "DAYS 60 京", "title_zh": "DAYS 60 京"}]};
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>