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-1214", "mangaid": "1214", "zh_title": "孤高之人", "hant_title": "孤高之人", "en_title": "孤高之人 (Bilimanga #1214)", "author": "坂本真一 / 新田次郎", "tags": ["励志", "群像", "日常", "黑暗", "奇幻冒险", "日本漫画", "漫画", "日漫"], "zh_desc": "孤独的青年‧森文太郎在转学的第一天\n\r\n受到同班的宫本所挑唆,冒险攀爬了校舍。\n\r\n只要踏错一步就可能会死,但是,\n\r\n顺利完攀那一瞬间的充实感却让他第一次感受到自己确实「活著」…\n\r\n文太郎对攀岩的渴望开始加速--!!\n\r\n\n\r\n与攀岩的相遇将改变文太郎的命运--!!\n\n📚 作品信息:作者 坂本真一 / 新田次郎 · 评分 10 · 共收录 17 卷 / 181 话章节目录与高清彩页/条漫预览。", "hant_desc": "孤獨的青年‧森文太郎在轉學的第一天\n\r\n受到同班的宮本所挑唆,冒險攀爬了校舍。\n\r\n只要踏錯一步就可能會死,但是,\n\r\n順利完攀那一瞬間的充實感卻讓他第一次感受到自己確實「活著」…\n\r\n文太郎對攀岩的渴望開始加速--!!\n\r\n\n\r\n與攀岩的相遇將改變文太郎的命運--!!\n\n📚 作品資訊:作者 坂本真一 / 新田次郎 · 評分 10 · 共收錄 17 卷 / 181 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '孤高之人' (孤高之人) by 坂本真一 / 新田次郎. Includes 17 volumes and 181 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1214/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1214/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1214/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1214/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1214/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1214/page_06.jpg"], "volumes": [{"title_hant": "孤高之人 1", "title_zh": "孤高之人 1", "cover_id": 2191619, "first_chap_id": 101598, "cover_url": "https://i.motiezw.com/cover/1214/2191619.jpg"}, {"title_hant": "孤高之人 2", "title_zh": "孤高之人 2", "cover_id": 2191836, "first_chap_id": 101609, "cover_url": "https://i.motiezw.com/cover/1214/2191836.jpg"}, {"title_hant": "孤高之人 3", "title_zh": "孤高之人 3", "cover_id": 2192366, "first_chap_id": 101634, "cover_url": "https://i.motiezw.com/cover/1214/2192366.jpg"}, {"title_hant": "孤高之人 4", "title_zh": "孤高之人 4", "cover_id": 2192581, "first_chap_id": 101647, "cover_url": "https://i.motiezw.com/cover/1214/2192581.jpg"}, {"title_hant": "孤高之人 5", "title_zh": "孤高之人 5", "cover_id": 2192783, "first_chap_id": 101660, "cover_url": "https://i.motiezw.com/cover/1214/2192783.jpg"}, {"title_hant": "孤高之人 6", "title_zh": "孤高之人 6", "cover_id": 2193191, "first_chap_id": 101680, "cover_url": "https://i.motiezw.com/cover/1214/2193191.jpg"}, {"title_hant": "孤高之人 7", "title_zh": "孤高之人 7", "cover_id": 2193386, "first_chap_id": 101692, "cover_url": "https://i.motiezw.com/cover/1214/2193386.jpg"}, {"title_hant": "孤高之人 8", "title_zh": "孤高之人 8", "cover_id": 2193579, "first_chap_id": 101704, "cover_url": "https://i.motiezw.com/cover/1214/2193579.jpg"}, {"title_hant": "孤高之人 9", "title_zh": "孤高之人 9", "cover_id": 2193773, "first_chap_id": 101717, "cover_url": "https://i.motiezw.com/cover/1214/2193773.jpg"}, {"title_hant": "孤高之人 10", "title_zh": "孤高之人 10", "cover_id": 2193960, "first_chap_id": 101728, "cover_url": "https://i.motiezw.com/cover/1214/2193960.jpg"}, {"title_hant": "孤高之人 11", "title_zh": "孤高之人 11", "cover_id": 2194157, "first_chap_id": 101740, "cover_url": "https://i.motiezw.com/cover/1214/2194157.jpg"}, {"title_hant": "孤高之人 12", "title_zh": "孤高之人 12", "cover_id": 2194349, "first_chap_id": 101752, "cover_url": "https://i.motiezw.com/cover/1214/2194349.jpg"}], "chapters": [{"cid": "101598", "title": "第1攀 攀登校舍", "title_zh": "第1攀 攀登校舍"}, {"cid": "101599", "title": "第2攀 攀山繩拍檔", "title_zh": "第2攀 攀山绳拍档"}, {"cid": "101600", "title": "第3攀 攀山鞋", "title_zh": "第3攀 攀山鞋"}, {"cid": "101601", "title": "第4攀 想像攀爬", "title_zh": "第4攀 想像攀爬"}, {"cid": "101602", "title": "第5攀 On-sight", "title_zh": "第5攀 On-sight"}, {"cid": "101603", "title": "第6攀 Observation!", "title_zh": "第6攀 Observation!"}, {"cid": "101604", "title": "第7攀 Move!", "title_zh": "第7攀 Move!"}, {"cid": "101605", "title": "第8攀 高烏山", "title_zh": "第8攀 高乌山"}, {"cid": "101606", "title": "第9攀 幻影", "title_zh": "第9攀 幻影"}, {"cid": "101607", "title": "攀爬用語解說", "title_zh": "攀爬用语解说"}, {"cid": "101609", "title": "第10攀 徒手獨攀者", "title_zh": "第10攀 徒手独攀者"}, {"cid": "101610", "title": "第11攀 渴望獨來獨往", "title_zh": "第11攀 渴望独来独往"}, {"cid": "101611", "title": "第12攀 文太郎的身影", "title_zh": "第12攀 文太郎的身影"}, {"cid": "101612", "title": "第13攀 後樓梯", "title_zh": "第13攀 后楼梯"}, {"cid": "101613", "title": "第14攀 自己的極限", "title_zh": "第14攀 自己的极限"}, {"cid": "101614", "title": "第15攀 出路", "title_zh": "第15攀 出路"}, {"cid": "101615", "title": "第16攀 雙子山", "title_zh": "第16攀 双子山"}, {"cid": "101616", "title": "第17攀 墜山意外", "title_zh": "第17攀 坠山意外"}, {"cid": "101617", "title": "第18攀 營救", "title_zh": "第18攀 营救"}, {"cid": "101618", "title": "第19攀 平凡主角", "title_zh": "第19攀 平凡主角"}, {"cid": "101619", "title": "第20攀 無Q", "title_zh": "第20攀 无Q"}, {"cid": "101620", "title": "攀爬用語解說", "title_zh": "攀爬用语解说"}, {"cid": "101634", "title": "第21攀 八岳的黎明", "title_zh": "第21攀 八岳的黎明"}, {"cid": "101635", "title": "第22攀 雪山的洗禮", "title_zh": "第22攀 雪山的洗礼"}, {"cid": "101636", "title": "第23攀 雨雪", "title_zh": "第23攀 雨雪"}, {"cid": "101637", "title": "第24攀 攀爬吧", "title_zh": "第24攀 攀爬吧"}, {"cid": "101638", "title": "第25攀 燈火", "title_zh": "第25攀 灯火"}, {"cid": "101639", "title": "第26攀 二人的恩怨", "title_zh": "第26攀 二人的恩怨"}, {"cid": "101640", "title": "第27攀 避世", "title_zh": "第27攀 避世"}, {"cid": "101641", "title": "第28攀 真相", "title_zh": "第28攀 真相"}, {"cid": "101642", "title": "第29攀 因果顛覆", "title_zh": "第29攀 因果颠覆"}, {"cid": "101643", "title": "第30攀 墮落的記憶", "title_zh": "第30攀 堕落的记忆"}, {"cid": "101644", "title": "第31攀 業報或非業報", "title_zh": "第31攀 业报或非业报"}, {"cid": "101645", "title": "攀爬用語解說", "title_zh": "攀爬用语解说"}, {"cid": "101647", "title": "第32攀 沉默的回歸", "title_zh": "第32攀 沉默的回归"}, {"cid": "101648", "title": "第33攀 悲傷歲月靜靜流逝", "title_zh": "第33攀 悲伤岁月静静流逝"}, {"cid": "101649", "title": "第34攀 步荷", "title_zh": "第34攀 步荷"}, {"cid": "101650", "title": "第35攀 死穴", "title_zh": "第35攀 死穴"}, {"cid": "101651", "title": "第36攀 悼念攀山", "title_zh": "第36攀 悼念攀山"}, {"cid": "101652", "title": "第37攀 發掘", "title_zh": "第37攀 发掘"}, {"cid": "101653", "title": "第38攀 未曾踏足的冰壁", "title_zh": "第38攀 未曾踏足的冰壁"}, {"cid": "101654", "title": "第39攀 代價", "title_zh": "第39攀 代价"}, {"cid": "101655", "title": "第40攀 悲哀的偶遇", "title_zh": "第40攀 悲哀的偶遇"}, {"cid": "101656", "title": "第41攀 純Q和不純", "title_zh": "第41攀 纯Q和不纯"}, {"cid": "101657", "title": "第42攀 煩惱", "title_zh": "第42攀 烦恼"}, {"cid": "101660", "title": "第43攀 投身濁流", "title_zh": "第43攀 投身浊流"}, {"cid": "101661", "title": "第44攀 超高地的考驗", "title_zh": "第44攀 超高地的考验"}, {"cid": "101662", "title": "第45攀 心無雜念", "title_zh": "第45攀 心无杂念"}, {"cid": "101664", "title": "第46攀 山上的統率", "title_zh": "第46攀 山上的统率"}, {"cid": "101665", "title": "第47攀 磨擦", "title_zh": "第47攀 磨擦"}, {"cid": "101666", "title": "第48攀 縱走星空之路", "title_zh": "第48攀 纵走星空之路"}, {"cid": "101667", "title": "第49攀 本悻", "title_zh": "第49攀 本悻"}, {"cid": "101668", "title": "第50攀 文太郎與社會", "title_zh": "第50攀 文太郎与社会"}, {"cid": "101669", "title": "第51攀 第一次積雪", "title_zh": "第51攀 第一次积雪"}, {"cid": "101670", "title": "第52攀 攀爬者", "title_zh": "第52攀 攀爬者"}, {"cid": "101671", "title": "攀爬用語解說", "title_zh": "攀爬用语解说"}, {"cid": "101680", "title": "第53攀 覺悟", "title_zh": "第53攀 觉悟"}, {"cid": "101681", "title": "第54攀 固執的男人", "title_zh": "第54攀 固执的男人"}, {"cid": "101682", "title": "第55攀 新M拓的因果", "title_zh": "第55攀 新M拓的因果"}, {"cid": "101683", "title": "第56攀 他為了甚麼攀爬", "title_zh": "第56攀 他为了甚么攀爬"}]};
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>