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>属性同好会 D-FRAGMENTS - 在线漫画阅读器</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-1410", "mangaid": "1410", "zh_title": "属性同好会 D-FRAGMENTS", "hant_title": "屬性同好會 D-FRAGMENTS", "en_title": "属性同好会 D-FRAGMENTS (Bilimanga #1410)", "author": "春野友矢", "tags": ["校园", "日常", "后宫", "欢乐", "萌系", "校园青春", "日本漫画", "漫画"], "zh_desc": "风间坚次是校内赫赫有名的不良少年,\n\r\n一天他偶然踏入「游戏制作社」,\n\r\n遇见了正在社团教室里点火的4名女子社员…\n\r\n除了摩拳擦掌等著坚次加入这座女孩花园的社员们,\n\r\n连「真正的游戏制作社」都出现了!?\n\r\n这里是地狱吗…或是真正的地狱呢(都一样)?\n\r\n高潮搞笑漫画第1集空降登场!!\n\n📚 作品信息:作者 春野友矢 · 评分 10 · 共收录 21 卷 / 188 话章节目录与高清彩页/条漫预览。", "hant_desc": "風間堅次是校內赫赫有名的不良少年,\n\r\n一天他偶然踏入「遊戲製作社」,\n\r\n遇見了正在社團教室裡點火的4名女子社員…\n\r\n除了摩拳擦掌等著堅次加入這座女孩花園的社員們,\n\r\n連「真正的遊戲製作社」都出現了!?\n\r\n這裡是地獄嗎…或是真正的地獄呢(都一樣)?\n\r\n高潮搞笑漫畫第1集空降登場!!\n\n📚 作品資訊:作者 春野友矢 · 評分 10 · 共收錄 21 卷 / 188 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '属性同好会 D-FRAGMENTS' (屬性同好會 D-FRAGMENTS) by 春野友矢. Includes 21 volumes and 188 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1410/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1410/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1410/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1410/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1410/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1410/page_06.jpg"], "volumes": [{"title_hant": "屬性同好會 D-FRAGMENTS 1", "title_zh": "属性同好会 D-FRAGMENTS 1", "cover_id": 2533128, "first_chap_id": 116682, "cover_url": "https://i.motiezw.com/cover/1410/2533128.jpg"}, {"title_hant": "屬性同好會 D-FRAGMENTS 2", "title_zh": "属性同好会 D-FRAGMENTS 2", "cover_id": 2533290, "first_chap_id": 116691, "cover_url": "https://i.motiezw.com/cover/1410/2533290.jpg"}, {"title_hant": "屬性同好會 D-FRAGMENTS 3", "title_zh": "属性同好会 D-FRAGMENTS 3", "cover_id": 2533449, "first_chap_id": 116700, "cover_url": "https://i.motiezw.com/cover/1410/2533449.jpg"}, {"title_hant": "屬性同好會 D-FRAGMENTS 4", "title_zh": "属性同好会 D-FRAGMENTS 4", "cover_id": 2533616, "first_chap_id": 116709, "cover_url": "https://i.motiezw.com/cover/1410/2533616.jpg"}, {"title_hant": "屬性同好會 D-FRAGMENTS 5", "title_zh": "属性同好会 D-FRAGMENTS 5", "cover_id": 2533780, "first_chap_id": 116718, "cover_url": "https://i.motiezw.com/cover/1410/2533780.jpg"}, {"title_hant": "屬性同好會 D-FRAGMENTS 6", "title_zh": "属性同好会 D-FRAGMENTS 6", "cover_id": 2533952, "first_chap_id": 116728, "cover_url": "https://i.motiezw.com/cover/1410/2533952.jpg"}, {"title_hant": "屬性同好會 D-FRAGMENTS 7", "title_zh": "属性同好会 D-FRAGMENTS 7", "cover_id": 2534110, "first_chap_id": 116738, "cover_url": "https://i.motiezw.com/cover/1410/2534110.jpg"}, {"title_hant": "屬性同好會 D-FRAGMENTS 8", "title_zh": "属性同好会 D-FRAGMENTS 8", "cover_id": 2534267, "first_chap_id": 116747, "cover_url": "https://i.motiezw.com/cover/1410/2534267.jpg"}, {"title_hant": "屬性同好會 D-FRAGMENTS 9", "title_zh": "属性同好会 D-FRAGMENTS 9", "cover_id": 2534417, "first_chap_id": 116756, "cover_url": "https://i.motiezw.com/cover/1410/2534417.jpg"}, {"title_hant": "屬性同好會 D-FRAGMENTS 10", "title_zh": "属性同好会 D-FRAGMENTS 10", "cover_id": 2534563, "first_chap_id": 116765, "cover_url": "https://i.motiezw.com/cover/1410/2534563.jpg"}, {"title_hant": "屬性同好會 D-FRAGMENTS 11", "title_zh": "属性同好会 D-FRAGMENTS 11", "cover_id": 2534718, "first_chap_id": 116777, "cover_url": "https://i.motiezw.com/cover/1410/2534718.jpg"}, {"title_hant": "屬性同好會 D-FRAGMENTS 12", "title_zh": "属性同好会 D-FRAGMENTS 12", "cover_id": 2534879, "first_chap_id": 116790, "cover_url": "https://i.motiezw.com/cover/1410/2534879.jpg"}], "chapters": [{"cid": "116682", "title": "第1話 風間一派!", "title_zh": "第1话 风间一派!"}, {"cid": "116683", "title": "第2話 請多指教", "title_zh": "第2话 请多指教"}, {"cid": "116684", "title": "第3話 有這1分鐘就足夠了", "title_zh": "第3话 有这1分钟就足够了"}, {"cid": "116685", "title": "第4話 完全不知道", "title_zh": "第4话 完全不知道"}, {"cid": "116686", "title": "第5話 還在構思中", "title_zh": "第5话 还在构思中"}, {"cid": "116687", "title": "第6話 那樣才有趣吧?", "title_zh": "第6话 那样才有趣吧?"}, {"cid": "116688", "title": "第7話 那麼比賽就此開始!", "title_zh": "第7话 那么比赛就此开始!"}, {"cid": "116689", "title": "附錄", "title_zh": "附录"}, {"cid": "116691", "title": "第8話 你其實心裡也想做這個吧?", "title_zh": "第8话 你其实心里也想做这个吧?"}, {"cid": "116692", "title": "第9話 現在開始社團會議", "title_zh": "第9话 现在开始社团会议"}, {"cid": "116693", "title": "第10話 那是我", "title_zh": "第10话 那是我"}, {"cid": "116694", "title": "第11話 這點我可以打包票", "title_zh": "第11话 这点我可以打包票"}, {"cid": "116695", "title": "第12話 這件事我很確定", "title_zh": "第12话 这件事我很确定"}, {"cid": "116696", "title": "第13話 竟然不退出!!", "title_zh": "第13话 竟然不退出!!"}, {"cid": "116697", "title": "第14話 我就非做不可啦", "title_zh": "第14话 我就非做不可啦"}, {"cid": "116698", "title": "附錄", "title_zh": "附录"}, {"cid": "116700", "title": "第15話 妳那是什麼啊——!!", "title_zh": "第15话 妳那是什么啊——!!"}, {"cid": "116701", "title": "第16話 好酷!!", "title_zh": "第16话 好酷!!"}, {"cid": "116702", "title": "第17話 敵人來襲了!!", "title_zh": "第17话 敌人来袭了!!"}, {"cid": "116703", "title": "第18話 請與我一決勝負", "title_zh": "第18话 请与我一决胜负"}, {"cid": "116704", "title": "第19話 我不希望你獲得優勝嘛!!", "title_zh": "第19话 我不希望你获得优胜嘛!!"}, {"cid": "116706", "title": "第21話 不然我可不饒你", "title_zh": "第21话 不然我可不饶你"}, {"cid": "116707", "title": "附錄", "title_zh": "附录"}, {"cid": "116709", "title": "第22話 演變成大問題", "title_zh": "第22话 演变成大问题"}, {"cid": "116710", "title": "第23話 我真是沒用⋯", "title_zh": "第23话 我真是没用⋯"}, {"cid": "116711", "title": "第24話 超厲害", "title_zh": "第24话 超厉害"}, {"cid": "116712", "title": "第25話 不是反而更棒嗎!!", "title_zh": "第25话 不是反而更棒吗!!"}, {"cid": "116713", "title": "第26話 WATER!!", "title_zh": "第26话 WATER!!"}, {"cid": "116714", "title": "第27話 真的是讓人有夠不爽", "title_zh": "第27话 真的是让人有够不爽"}, {"cid": "116715", "title": "第28話 還是親兄妹最好~", "title_zh": "第28话 还是亲兄妹最好~"}, {"cid": "116716", "title": "附錄", "title_zh": "附录"}, {"cid": "116718", "title": "第29話 傳說中超厲害的高尾學姊!", "title_zh": "第29话 传说中超厉害的高尾学姊!"}, {"cid": "116719", "title": "第30話 搖啊搖", "title_zh": "第30话 摇啊摇"}, {"cid": "116720", "title": "第31話 總之就是好對付?", "title_zh": "第31话 总之就是好对付?"}, {"cid": "116721", "title": "第32話 我希望讓遊戲製作社(暫)廢社", "title_zh": "第32话 我希望让游戏制作社(暂)废社"}, {"cid": "116722", "title": "第33話 鑽石不碎", "title_zh": "第33话 钻石不碎"}, {"cid": "116723", "title": "第34話 好、好厲害的出現了——!!", "title_zh": "第34话 好、好厉害的出现了——!!"}, {"cid": "116724", "title": "第35話 她根本只想一個人玩吧", "title_zh": "第35话 她根本只想一个人玩吧"}, {"cid": "116725", "title": "第36話 決定一擊是⋯", "title_zh": "第36话 决定一击是⋯"}, {"cid": "116726", "title": "附錄", "title_zh": "附录"}, {"cid": "116728", "title": "第37話 可惡的匈恩·谷捏谷捏!!", "title_zh": "第37话 可恶的匈恩·谷捏谷捏!!"}, {"cid": "116729", "title": "第38話 是毛巾嘛!!", "title_zh": "第38话 是毛巾嘛!!"}, {"cid": "116731", "title": "第40話 真要說是發生了很多事啦", "title_zh": "第40话 真要说是发生了很多事啦"}, {"cid": "116732", "title": "第41話 高尾學姊也快點進來吧", "title_zh": "第41话 高尾学姊也快点进来吧"}, {"cid": "116733", "title": "第42話 站起來了——!!", "title_zh": "第42话 站起来了——!!"}, {"cid": "116734", "title": "第43話 啪噹噹", "title_zh": "第43话 啪当当"}, {"cid": "116735", "title": "第44話 妳被妳姊騙了啦!!", "title_zh": "第44话 妳被妳姊骗了啦!!"}, {"cid": "116736", "title": "附錄", "title_zh": "附录"}, {"cid": "116738", "title": "第45話 去青春100倍吧!!", "title_zh": "第45话 去青春100倍吧!!"}, {"cid": "116739", "title": "第46話 妳在吸什麼啊!", "title_zh": "第46话 妳在吸什么啊!"}, {"cid": "116740", "title": "第47話 喂喂!這是什麼Q況!", "title_zh": "第47话 喂喂!这是什么Q况!"}, {"cid": "116741", "title": "第48話 人生中最不妙的高度!!", "title_zh": "第48话 人生中最不妙的高度!!"}, {"cid": "116742", "title": "第49話 終於學到了精髓!!", "title_zh": "第49话 终于学到了精髓!!"}, {"cid": "116743", "title": "第50話 剩⋯N!", "title_zh": "第50话 剩⋯N!"}, {"cid": "116744", "title": "第51話 太爽了!!", "title_zh": "第51话 太爽了!!"}, {"cid": "116745", "title": "附錄", "title_zh": "附录"}, {"cid": "116747", "title": "第52話 對不起!", "title_zh": "第52话 对不起!"}, {"cid": "116748", "title": "第53話 這⋯這是勾結——!!", "title_zh": "第53话 这⋯这是勾结——!!"}, {"cid": "116749", "title": "第54話 要把運氣吸~回來!", "title_zh": "第54话 要把运气吸~回来!"}, {"cid": "116750", "title": "第55話 虧妳敢說!", "title_zh": "第55话 亏妳敢说!"}]};
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>