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>纯真之人Rouge - 在线漫画阅读器</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-1213", "mangaid": "1213", "zh_title": "纯真之人Rouge", "hant_title": "純真之人Rouge", "en_title": "纯真之人Rouge (Bilimanga #1213)", "author": "坂本真一", "tags": ["历史", "犯罪", "猎奇", "黑暗", "群像", "历史文化", "日本漫画", "漫画"], "zh_desc": "后缀「Rouge」为法语中的「赤红」,引申义为「胭脂」(代表法国皇室的奢靡、本作主角玛丽的女性身份)及「革命」(代表本作的法革时代背景)。\n\r\n本作主要围绕前作《纯真之人》中主角夏尔的妹妹,副主角玛丽的故事展开。虽然玛丽在历史上确有其人,但她的经历在本作中均为虚构。故事背景继承了前作,并在时间线上推进至法国大革命的全面爆发、断头台的发明,以及国王路易十六和王后的处决。\n\r\n\n\r\n2021年,获第24届文化厅媒体艺术祭漫画部门优秀奖。\n\n📚 作品信息:作者 坂本真一 · 评分 10 · 共收录 5 卷 / 33 话章节目录与高清彩页/条漫预览。", "hant_desc": "後綴「Rouge」為法語中的「赤紅」,引申義為「胭脂」(代表法國皇室的奢靡、本作主角瑪麗的女性身份)及「革命」(代表本作的法革時代背景)。\n\r\n本作主要圍繞前作《純真之人》中主角夏爾的妹妹,副主角瑪麗的故事展開。雖然瑪麗在歷史上確有其人,但她的經歷在本作中均為虛構。故事背景繼承了前作,並在時間線上推進至法國大革命的全面爆發、斷頭台的發明,以及國王路易十六和王后的處決。\n\r\n\n\r\n2021年,獲第24屆文化廳媒體藝術祭漫畫部門優秀獎。\n\n📚 作品資訊:作者 坂本真一 · 評分 10 · 共收錄 5 卷 / 33 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '纯真之人Rouge' (純真之人Rouge) by 坂本真一. Includes 5 volumes and 33 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1213/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1213/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1213/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1213/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1213/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1213/page_06.jpg"], "volumes": [{"title_hant": "純真之人Rouge 1", "title_zh": "纯真之人Rouge 1", "cover_id": 2190359, "first_chap_id": 101542, "cover_url": "https://i.motiezw.com/cover/1213/2190359.jpg"}, {"title_hant": "純真之人Rouge 2", "title_zh": "纯真之人Rouge 2", "cover_id": 2190540, "first_chap_id": 101549, "cover_url": "https://i.motiezw.com/cover/1213/2190540.jpg"}, {"title_hant": "純真之人Rouge 3", "title_zh": "纯真之人Rouge 3", "cover_id": 2190732, "first_chap_id": 101558, "cover_url": "https://i.motiezw.com/cover/1213/2190732.jpg"}, {"title_hant": "純真之人Rouge 4", "title_zh": "纯真之人Rouge 4", "cover_id": 2190910, "first_chap_id": 101567, "cover_url": "https://i.motiezw.com/cover/1213/2190910.jpg"}, {"title_hant": "純真之人Rouge 5", "title_zh": "纯真之人Rouge 5", "cover_id": 2191095, "first_chap_id": 101574, "cover_url": "https://i.motiezw.com/cover/1213/2191095.jpg"}], "chapters": [{"cid": "101542", "title": "n˚1 沾滿鮮血的純真", "title_zh": "n˚1 沾满鲜血的纯真"}, {"cid": "101543", "title": "n˚2 實現夢想的死刑", "title_zh": "n˚2 实现梦想的死刑"}, {"cid": "101544", "title": "n˚3 驕傲的一族", "title_zh": "n˚3 骄傲的一族"}, {"cid": "101545", "title": "n˚4 掌握生命之手", "title_zh": "n˚4 掌握生命之手"}, {"cid": "101546", "title": "n˚5 清濁世界", "title_zh": "n˚5 清浊世界"}, {"cid": "101547", "title": "n˚6 安静的革命", "title_zh": "n˚6 安静的革命"}, {"cid": "101549", "title": "n˚7 初代桑松的話語", "title_zh": "n˚7 初代桑松的话语"}, {"cid": "101550", "title": "n˚8 N神的圈套", "title_zh": "n˚8 N神的圈套"}, {"cid": "101551", "title": "n˚9 原罪之夜", "title_zh": "n˚9 原罪之夜"}, {"cid": "101552", "title": "n˚10 那個男人,被詛咒了", "title_zh": "n˚10 那个男人,被诅咒了"}, {"cid": "101553", "title": "n˚11 血S的創世紀", "title_zh": "n˚11 血S的创世纪"}, {"cid": "101554", "title": "n˚12 真正的「敵人」", "title_zh": "n˚12 真正的「敌人」"}, {"cid": "101555", "title": "n˚13 名為「愛」的詛咒", "title_zh": "n˚13 名为「爱」的诅咒"}, {"cid": "101558", "title": "n˚14 國王加冕", "title_zh": "n˚14 国王加冕"}, {"cid": "101559", "title": "n˚15 我正是王妃安托瓦內特", "title_zh": "n˚15 我正是王妃安托瓦内特"}, {"cid": "101560", "title": "n˚16 舞會的權謀", "title_zh": "n˚16 舞会的权谋"}, {"cid": "101561", "title": "n˚17 舞動的死刑執行人", "title_zh": "n˚17 舞动的死刑执行人"}, {"cid": "101562", "title": "n˚18 豐泰特村的讓娜", "title_zh": "n˚18 丰泰特村的让娜"}, {"cid": "101563", "title": "n˚19 繼承王室血脈的N人", "title_zh": "n˚19 继承王室血脉的N人"}, {"cid": "101564", "title": "n˚20 安托瓦內特懷孕", "title_zh": "n˚20 安托瓦内特怀孕"}, {"cid": "101567", "title": "n˚22 忿激派", "title_zh": "n˚22 忿激派"}, {"cid": "101568", "title": "n˚23 被詛咒的邂逅", "title_zh": "n˚23 被诅咒的邂逅"}, {"cid": "101569", "title": "n˚24 對我等的「憤怒」感到畏懼吧", "title_zh": "n˚24 对我等的「愤怒」感到畏惧吧"}, {"cid": "101570", "title": "n˚25 「主謀」的匈懷", "title_zh": "n˚25 「主谋」的匈怀"}, {"cid": "101571", "title": "n˚26 國王的暗殺計劃", "title_zh": "n˚26 国王的暗杀计划"}, {"cid": "101572", "title": "n˚27 四人的真實", "title_zh": "n˚27 四人的真实"}, {"cid": "101574", "title": "n˚28 賦於死神理想", "title_zh": "n˚28 赋于死神理想"}, {"cid": "101575", "title": "n˚29 理念的羈絆", "title_zh": "n˚29 理念的羁绊"}, {"cid": "101576", "title": "n˚30 深紅的命題", "title_zh": "n˚30 深红的命题"}, {"cid": "101577", "title": "n˚31 瘋狂的世界", "title_zh": "n˚31 疯狂的世界"}, {"cid": "101578", "title": "n˚32 死神與毒婦", "title_zh": "n˚32 死神与毒妇"}, {"cid": "101579", "title": "n˚33 腐敗的項鍊", "title_zh": "n˚33 腐败的项链"}, {"cid": "101580", "title": "n˚34 醜聞狂想曲", "title_zh": "n˚34 丑闻狂想曲"}]};
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>