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-1049", "mangaid": "1049", "zh_title": "未踏之地", "hant_title": "未踏之地", "en_title": "未踏之地 (Bilimanga #1049)", "author": "山下和美", "tags": ["奇幻", "冒险", "神鬼", "猎奇", "东方", "奇幻冒险", "日本漫画", "漫画"], "zh_desc": "这个村子里的人,只能活到50岁──\n\r\n\n\r\n「这个世界是否真实存在呢?就连这件事都未能得证。」\n\r\n「我们唯一能真实感受到的是,我存在于此,你也存在于此。」\n\r\n「只是就连这个感受是否为真都无法知晓。」\n\n📚 作品信息:作者 山下和美 · 评分 10 · 共收录 11 卷 / 68 话章节目录与高清彩页/条漫预览。", "hant_desc": "這個村子裡的人,只能活到50歲──\n\r\n\n\r\n「這個世界是否真實存在呢?就連這件事都未能得證。」\n\r\n「我們唯一能真實感受到的是,我存在於此,你也存在於此。」\n\r\n「只是就連這個感受是否為真都無法知曉。」\n\n📚 作品資訊:作者 山下和美 · 評分 10 · 共收錄 11 卷 / 68 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '未踏之地' (未踏之地) by 山下和美. Includes 11 volumes and 68 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1049/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1049/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1049/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1049/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1049/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1049/page_06.jpg"], "volumes": [{"title_hant": "未踏之地 1", "title_zh": "未踏之地 1", "cover_id": 1870871, "first_chap_id": 86972, "cover_url": "https://i.motiezw.com/cover/1049/1870871.jpg"}, {"title_hant": "未踏之地 2", "title_zh": "未踏之地 2", "cover_id": 1871237, "first_chap_id": 86983, "cover_url": "https://i.motiezw.com/cover/1049/1871237.jpg"}, {"title_hant": "未踏之地 3", "title_zh": "未踏之地 3", "cover_id": 1871529, "first_chap_id": 86992, "cover_url": "https://i.motiezw.com/cover/1049/1871529.jpg"}, {"title_hant": "未踏之地 4", "title_zh": "未踏之地 4", "cover_id": 1871821, "first_chap_id": 87001, "cover_url": "https://i.motiezw.com/cover/1049/1871821.jpg"}, {"title_hant": "未踏之地 5", "title_zh": "未踏之地 5", "cover_id": 1872037, "first_chap_id": 87008, "cover_url": "https://i.motiezw.com/cover/1049/1872037.jpg"}, {"title_hant": "未踏之地 6", "title_zh": "未踏之地 6", "cover_id": 1872258, "first_chap_id": 87015, "cover_url": "https://i.motiezw.com/cover/1049/1872258.jpg"}, {"title_hant": "未踏之地 7", "title_zh": "未踏之地 7", "cover_id": 1872480, "first_chap_id": 87022, "cover_url": "https://i.motiezw.com/cover/1049/1872480.jpg"}, {"title_hant": "未踏之地 8", "title_zh": "未踏之地 8", "cover_id": 1872690, "first_chap_id": 87029, "cover_url": "https://i.motiezw.com/cover/1049/1872690.jpg"}, {"title_hant": "未踏之地 9", "title_zh": "未踏之地 9", "cover_id": 1872906, "first_chap_id": 87036, "cover_url": "https://i.motiezw.com/cover/1049/1872906.jpg"}, {"title_hant": "未踏之地 10", "title_zh": "未踏之地 10", "cover_id": 1873127, "first_chap_id": 87043, "cover_url": "https://i.motiezw.com/cover/1049/1873127.jpg"}, {"title_hant": "未踏之地 11", "title_zh": "未踏之地 11", "cover_id": 1873532, "first_chap_id": 87063, "cover_url": "https://i.motiezw.com/cover/1049/1873532.jpg"}], "chapters": [{"cid": "86972", "title": "第1回 安", "title_zh": "第1回 安"}, {"cid": "86973", "title": "第2回 貪愉", "title_zh": "第2回 贪愉"}, {"cid": "86974", "title": "第3回 知命", "title_zh": "第3回 知命"}, {"cid": "86975", "title": "第4回 屍臭", "title_zh": "第4回 尸臭"}, {"cid": "86976", "title": "第5回 死角", "title_zh": "第5回 死角"}, {"cid": "86977", "title": "第6回 凶報", "title_zh": "第6回 凶报"}, {"cid": "86978", "title": "第7回 龜裂", "title_zh": "第7回 龟裂"}, {"cid": "86979", "title": "第8回 異形", "title_zh": "第8回 异形"}, {"cid": "86980", "title": "第9回 秘密", "title_zh": "第9回 秘密"}, {"cid": "86981", "title": "第10回 彼世", "title_zh": "第10回 彼世"}, {"cid": "86983", "title": "第11回 恐懼", "title_zh": "第11回 恐惧"}, {"cid": "86984", "title": "第12回 厭惡", "title_zh": "第12回 厌恶"}, {"cid": "86985", "title": "第13回 咒縛", "title_zh": "第13回 咒缚"}, {"cid": "86986", "title": "第14回 罪惩", "title_zh": "第14回 罪惩"}, {"cid": "86987", "title": "第15回 刑場", "title_zh": "第15回 刑场"}, {"cid": "86988", "title": "第16回 雙生", "title_zh": "第16回 双生"}, {"cid": "86989", "title": "第17回 災禍", "title_zh": "第17回 灾祸"}, {"cid": "86990", "title": "第18回 咒文", "title_zh": "第18回 咒文"}, {"cid": "86992", "title": "第19回 犧牲", "title_zh": "第19回 牺牲"}, {"cid": "86993", "title": "第20回 喪失", "title_zh": "第20回 丧失"}, {"cid": "86994", "title": "第21回 複眼", "title_zh": "第21回 复眼"}, {"cid": "86996", "title": "第23回 武器", "title_zh": "第23回 武器"}, {"cid": "86997", "title": "第24回 心臟", "title_zh": "第24回 心脏"}, {"cid": "86998", "title": "第25回 天國", "title_zh": "第25回 天国"}, {"cid": "86999", "title": "第26回 塵芥", "title_zh": "第26回 尘芥"}, {"cid": "87001", "title": "第27回 光陰", "title_zh": "第27回 光阴"}, {"cid": "87002", "title": "第28回 流轉", "title_zh": "第28回 流转"}, {"cid": "87003", "title": "第29回 斷絕", "title_zh": "第29回 断绝"}, {"cid": "87004", "title": "第30回 追憶", "title_zh": "第30回 追忆"}, {"cid": "87005", "title": "第31回 蠢動", "title_zh": "第31回 蠢动"}, {"cid": "87006", "title": "第32回 搔亂", "title_zh": "第32回 搔乱"}, {"cid": "87008", "title": "第33回 發現", "title_zh": "第33回 发现"}, {"cid": "87009", "title": "第34回 觸感", "title_zh": "第34回 触感"}, {"cid": "87010", "title": "第35回 演員", "title_zh": "第35回 演员"}, {"cid": "87011", "title": "第36回 飛翔", "title_zh": "第36回 飞翔"}, {"cid": "87012", "title": "第37回 繼承", "title_zh": "第37回 继承"}, {"cid": "87013", "title": "第38回 真假", "title_zh": "第38回 真假"}, {"cid": "87015", "title": "第39回 傳心", "title_zh": "第39回 传心"}, {"cid": "87016", "title": "第40回 痛哭", "title_zh": "第40回 痛哭"}, {"cid": "87017", "title": "第41回 分歧", "title_zh": "第41回 分歧"}, {"cid": "87018", "title": "第42回 異界", "title_zh": "第42回 异界"}, {"cid": "87019", "title": "第43回 規矩", "title_zh": "第43回 规矩"}, {"cid": "87022", "title": "第45回 懷疑", "title_zh": "第45回 怀疑"}, {"cid": "87023", "title": "第46回 愤怒", "title_zh": "第46回 愤怒"}, {"cid": "87024", "title": "第47回 初源", "title_zh": "第47回 初源"}, {"cid": "87025", "title": "第48回 權力", "title_zh": "第48回 权力"}, {"cid": "87026", "title": "第49回 鬼胎", "title_zh": "第49回 鬼胎"}, {"cid": "87027", "title": "第50回 胚胎", "title_zh": "第50回 胚胎"}, {"cid": "87029", "title": "第51回 夜空", "title_zh": "第51回 夜空"}, {"cid": "87030", "title": "第52回 暴露", "title_zh": "第52回 暴露"}, {"cid": "87031", "title": "第53回 回想", "title_zh": "第53回 回想"}, {"cid": "87032", "title": "第54回 凡夫", "title_zh": "第54回 凡夫"}, {"cid": "87033", "title": "第55回 共振", "title_zh": "第55回 共振"}, {"cid": "87034", "title": "第56回 亂舞", "title_zh": "第56回 乱舞"}, {"cid": "87036", "title": "第57回 幻日", "title_zh": "第57回 幻日"}, {"cid": "87037", "title": "第58回 初恋", "title_zh": "第58回 初恋"}, {"cid": "87038", "title": "第59回 偶像", "title_zh": "第59回 偶像"}, {"cid": "87039", "title": "第60回 刹那", "title_zh": "第60回 刹那"}, {"cid": "87040", "title": "第61回 劇変", "title_zh": "第61回 剧変"}, {"cid": "87041", "title": "第62回 序曲", "title_zh": "第62回 序曲"}]};
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>