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-1146", "mangaid": "1146", "zh_title": "想结束这场「我爱你」的游戏", "hant_title": "想結束這場「我愛你」的遊戲", "en_title": "想结束这场「我爱你」的游戏 (Bilimanga #1146)", "author": "堂本裕贵", "tags": ["校园", "日常", "恋爱", "青梅竹马", "欢乐", "校园青春", "日本漫画", "漫画"], "zh_desc": "互相暗恋的青梅竹马。距离越近,越喜欢对方。距离越近,越是说不出口。\n\r\n无法坦率的两人,连系著他们的是…从孩提时期就持续到现在的『我爱你游戏』。\n\r\n〝害羞就输了〞这般幼稚的游戏,两人为此投注满满的青涩情感,不能输的比赛,从此开始。\n\n📚 作品信息:作者 堂本裕贵 · 评分 9.4 · 共收录 9 卷 / 74 话章节目录与高清彩页/条漫预览。", "hant_desc": "互相暗戀的青梅竹馬。距離越近,越喜歡對方。距離越近,越是說不出口。\n\r\n無法坦率的兩人,連繫著他們的是…從孩提時期就持續到現在的『我愛你遊戲』。\n\r\n〝害羞就輸了〞這般幼稚的遊戲,兩人為此投注滿滿的青澀情感,不能輸的比賽,從此開始。\n\n📚 作品資訊:作者 堂本裕貴 · 評分 9.4 · 共收錄 9 卷 / 74 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '想结束这场「我爱你」的游戏' (想結束這場「我愛你」的遊戲) by 堂本裕贵. Includes 9 volumes and 74 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1146/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1146/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1146/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1146/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1146/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1146/page_06.jpg"], "volumes": [{"title_hant": "想結束這場「我愛你」的遊戲 1", "title_zh": "想结束这场「我爱你」的游戏 1", "cover_id": 2063061, "first_chap_id": 95972, "cover_url": "https://i.motiezw.com/cover/1146/2063061.jpg"}, {"title_hant": "想結束這場「我愛你」的遊戲 2", "title_zh": "想结束这场「我爱你」的游戏 2", "cover_id": 2063270, "first_chap_id": 95984, "cover_url": "https://i.motiezw.com/cover/1146/2063270.jpg"}, {"title_hant": "想結束這場「我愛你」的遊戲 3", "title_zh": "想结束这场「我爱你」的游戏 3", "cover_id": 2063459, "first_chap_id": 95996, "cover_url": "https://i.motiezw.com/cover/1146/2063459.jpg"}, {"title_hant": "想結束這場「我愛你」的遊戲 4", "title_zh": "想结束这场「我爱你」的游戏 4", "cover_id": 2063658, "first_chap_id": 96006, "cover_url": "https://i.motiezw.com/cover/1146/2063658.jpg"}, {"title_hant": "想結束這場「我愛你」的遊戲 5", "title_zh": "想结束这场「我爱你」的游戏 5", "cover_id": 2063856, "first_chap_id": 96016, "cover_url": "https://i.motiezw.com/cover/1146/2063856.jpg"}, {"title_hant": "想結束這場「我愛你」的遊戲 6", "title_zh": "想结束这场「我爱你」的游戏 6", "cover_id": 2064054, "first_chap_id": 96026, "cover_url": "https://i.motiezw.com/cover/1146/2064054.jpg"}, {"title_hant": "想結束這場「我愛你」的遊戲 7", "title_zh": "想结束这场「我爱你」的游戏 7", "cover_id": 2065036, "first_chap_id": 96107, "cover_url": "https://i.motiezw.com/cover/1146/2065036.jpg"}, {"title_hant": "想結束這場「我愛你」的遊戲 8", "title_zh": "想结束这场「我爱你」的游戏 8", "cover_id": 2524754, "first_chap_id": 96115, "cover_url": "https://i.motiezw.com/cover/1146/2524754.jpg"}, {"title_hant": "想結束這場「我愛你」的遊戲 9", "title_zh": "想结束这场「我爱你」的游戏 9", "cover_id": 2524781, "first_chap_id": 116302, "cover_url": "https://i.motiezw.com/cover/1146/2524781.jpg"}], "chapters": [{"cid": "95972", "title": "GAME 1 青梅竹馬不想輸", "title_zh": "GAME 1 青梅竹马不想输"}, {"cid": "95973", "title": "GAME 2 青梅竹馬好難融入", "title_zh": "GAME 2 青梅竹马好难融入"}, {"cid": "95974", "title": "GAME 3 青梅竹馬做料理", "title_zh": "GAME 3 青梅竹马做料理"}, {"cid": "95975", "title": "GAME 4 青梅竹馬連繫在一起", "title_zh": "GAME 4 青梅竹马连系在一起"}, {"cid": "95976", "title": "GAME 5 青梅竹馬約出來", "title_zh": "GAME 5 青梅竹马约出来"}, {"cid": "95977", "title": "GAME 6 青梅竹馬去約會", "title_zh": "GAME 6 青梅竹马去约会"}, {"cid": "95978", "title": "GAME 7 青梅竹馬裝大人", "title_zh": "GAME 7 青梅竹马装大人"}, {"cid": "95979", "title": "BONUS GAME 青梅竹馬畢業了", "title_zh": "BONUS GAME 青梅竹马毕业了"}, {"cid": "95984", "title": "GAME 8 青梅竹馬會做任何事Q", "title_zh": "GAME 8 青梅竹马会做任何事Q"}, {"cid": "95985", "title": "GAME 9 青梅竹馬什麼都做不到", "title_zh": "GAME 9 青梅竹马什么都做不到"}, {"cid": "95986", "title": "GAME 10 青梅竹馬手寫字", "title_zh": "GAME 10 青梅竹马手写字"}, {"cid": "95987", "title": "GAME 11 青梅竹馬早晨來訪", "title_zh": "GAME 11 青梅竹马早晨来访"}, {"cid": "95988", "title": "GAME 12 青梅竹馬很擔心", "title_zh": "GAME 12 青梅竹马很担心"}, {"cid": "95989", "title": "GAME 13 青梅竹馬想再進一步", "title_zh": "GAME 13 青梅竹马想再进一步"}, {"cid": "95990", "title": "GAME 14 青梅竹馬想住下來", "title_zh": "GAME 14 青梅竹马想住下来"}, {"cid": "95991", "title": "GAME 15 青梅竹馬在同一個屋簷下", "title_zh": "GAME 15 青梅竹马在同一个屋簷下"}, {"cid": "95992", "title": "SPECIAL GAME 青梅竹馬想餵對方吃", "title_zh": "SPECIAL GAME 青梅竹马想喂对方吃"}, {"cid": "95981", "title": "EXTRA GAME 1 青梅竹馬說謊", "title_zh": "EXTRA GAME 1 青梅竹马说谎"}, {"cid": "95982", "title": "EXTRA GAME 2 青梅竹馬好懷念", "title_zh": "EXTRA GAME 2 青梅竹马好怀念"}, {"cid": "95983", "title": "EXTRA GAME 3 青梅竹馬有差距", "title_zh": "EXTRA GAME 3 青梅竹马有差距"}, {"cid": "95993", "title": "BONUS GAME 青梅竹馬想待在身邊", "title_zh": "BONUS GAME 青梅竹马想待在身边"}, {"cid": "95996", "title": "GAME 17 青梅竹馬想變得坦率", "title_zh": "GAME 17 青梅竹马想变得坦率"}, {"cid": "95997", "title": "GAME 18 青梅竹馬絕對不能結束", "title_zh": "GAME 18 青梅竹马绝对不能结束"}, {"cid": "95998", "title": "EXTRA GAME 4 青梅竹馬迎接早晨", "title_zh": "EXTRA GAME 4 青梅竹马迎接早晨"}, {"cid": "95999", "title": "EXTRA GAME 5 青梅竹馬和盥洗用具組", "title_zh": "EXTRA GAME 5 青梅竹马和盥洗用具组"}, {"cid": "96000", "title": "GAME 19 青梅竹馬,還有其他的⋯?", "title_zh": "GAME 19 青梅竹马,还有其他的⋯?"}, {"cid": "96001", "title": "GAME 20 青梅竹馬和學生會長", "title_zh": "GAME 20 青梅竹马和学生会长"}, {"cid": "96002", "title": "GAME 21 青梅竹馬成為師徒?", "title_zh": "GAME 21 青梅竹马成为师徒?"}, {"cid": "96003", "title": "GAME 22 青梅竹馬下定決心", "title_zh": "GAME 22 青梅竹马下定决心"}, {"cid": "96004", "title": "GAME 23 青梅竹馬突然做出⋯⋯", "title_zh": "GAME 23 青梅竹马突然做出⋯⋯"}, {"cid": "96006", "title": "GAME 24 青梅竹馬停不下來", "title_zh": "GAME 24 青梅竹马停不下来"}, {"cid": "96007", "title": "GAME 25 青梅竹馬不可愛⋯?", "title_zh": "GAME 25 青梅竹马不可爱⋯?"}, {"cid": "96008", "title": "GAME 26 青梅竹馬跑起來", "title_zh": "GAME 26 青梅竹马跑起来"}, {"cid": "96009", "title": "GAME 27 青梅竹馬太溫柔", "title_zh": "GAME 27 青梅竹马太温柔"}, {"cid": "96010", "title": "GAME 28 青梅竹馬緊緊擁抱", "title_zh": "GAME 28 青梅竹马紧紧拥抱"}, {"cid": "96011", "title": "GAME 29 青梅竹馬有點怪怪的", "title_zh": "GAME 29 青梅竹马有点怪怪的"}, {"cid": "96012", "title": "GAME 30 青梅竹馬是少N", "title_zh": "GAME 30 青梅竹马是少N"}, {"cid": "96013", "title": "GAME 31 青梅竹馬⋯是男友的話", "title_zh": "GAME 31 青梅竹马⋯是男友的话"}, {"cid": "96014", "title": "GAME 32 青梅竹馬試著開始交往⋯?", "title_zh": "GAME 32 青梅竹马试著开始交往⋯?"}, {"cid": "96016", "title": "GAME 33 青梅竹馬熱線不中斷", "title_zh": "GAME 33 青梅竹马热线不中断"}, {"cid": "96017", "title": "GAME 34 青梅竹馬想努力", "title_zh": "GAME 34 青梅竹马想努力"}, {"cid": "96018", "title": "GAME 35 青梅竹馬想分享", "title_zh": "GAME 35 青梅竹马想分享"}, {"cid": "96019", "title": "GAME 36 青梅竹馬當機了", "title_zh": "GAME 36 青梅竹马当机了"}, {"cid": "96021", "title": "GAME 38 青梅竹馬秘密交往", "title_zh": "GAME 38 青梅竹马秘密交往"}, {"cid": "96022", "title": "GAME 39 青梅竹馬想試著加入", "title_zh": "GAME 39 青梅竹马想试著加入"}, {"cid": "96023", "title": "GAME 40 青梅竹馬成為戀人⋯", "title_zh": "GAME 40 青梅竹马成为恋人⋯"}, {"cid": "96026", "title": "GAME 41 青梅竹馬一直看在眼裡", "title_zh": "GAME 41 青梅竹马一直看在眼里"}, {"cid": "96027", "title": "GAME 42 青梅竹馬兩人在房間裡", "title_zh": "GAME 42 青梅竹马两人在房间里"}, {"cid": "96028", "title": "GAME 43 青梅竹馬和最後一天", "title_zh": "GAME 43 青梅竹马和最后一天"}, {"cid": "96029", "title": "GAME 44 青梅竹馬有著一樣的心Q", "title_zh": "GAME 44 青梅竹马有著一样的心Q"}, {"cid": "96030", "title": "GAME 45 青梅竹馬不會逃避", "title_zh": "GAME 45 青梅竹马不会逃避"}, {"cid": "96031", "title": "GAME 46 青梅竹馬想替他加油", "title_zh": "GAME 46 青梅竹马想替他加油"}, {"cid": "96032", "title": "GAME 47 青梅竹馬因為想贏", "title_zh": "GAME 47 青梅竹马因为想赢"}, {"cid": "96033", "title": "GAME 48 青梅竹馬想耍帥", "title_zh": "GAME 48 青梅竹马想耍帅"}, {"cid": "96034", "title": "GAME 49 青梅竹馬下定決心", "title_zh": "GAME 49 青梅竹马下定决心"}, {"cid": "96025", "title": "EXTRA GAME 6 青梅竹馬摺紙", "title_zh": "EXTRA GAME 6 青梅竹马折纸"}, {"cid": "96107", "title": "GAME 50", "title_zh": "GAME 50"}, {"cid": "96108", "title": "GAME 51", "title_zh": "GAME 51"}, {"cid": "96109", "title": "GAME 52", "title_zh": "GAME 52"}, {"cid": "96110", "title": "GAME 53", "title_zh": "GAME 53"}]};
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>