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-1487", "mangaid": "1487", "zh_title": "我不受欢迎,怎么想都是你们的错!", "hant_title": "我不受歡迎,怎麼想都是你們的錯!", "en_title": "我不受欢迎,怎么想都是你们的错! (Bilimanga #1487)", "author": "谷川二コ", "tags": ["校园", "青春", "日常", "群像", "欢乐", "校园青春", "日本漫画", "漫画"], "zh_desc": "智子对于升上高中充满了期待,原以为到时候就能够大受男性欢迎,可以好好玩上3年,没想到完全不是这么一回事,不仅升上高中2个月都还没跟别人说过话,在班上也是很不起眼,所以只好沉溺在自己的幻想世界里,不但自我感觉很良好,还嫌其他同学只会聚集聊天唱卡拉OK,完全没想到自己才是所谓的「丧女」,而弟弟智贵对她也是相当感冒又头大。\n\n📚 作品信息:作者 谷川二コ · 评分 10 · 共收录 24 卷 / 255 话章节目录与高清彩页/条漫预览。", "hant_desc": "智子對於升上高中充滿了期待,原以為到時候就能夠大受男性歡迎,可以好好玩上3年,沒想到完全不是這麼一回事,不僅升上高中2個月都還沒跟別人說過話,在班上也是很不起眼,所以只好沉溺在自己的幻想世界裡,不但自我感覺很良好,還嫌其他同學只會聚集聊天唱卡拉OK,完全沒想到自己才是所謂的「喪女」,而弟弟智貴對她也是相當感冒又頭大。\n\n📚 作品資訊:作者 谷川二コ · 評分 10 · 共收錄 24 卷 / 255 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '我不受欢迎,怎么想都是你们的错!' (我不受歡迎,怎麼想都是你們的錯!) by 谷川二コ. Includes 24 volumes and 255 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1487/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1487/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1487/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1487/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1487/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1487/page_06.jpg"], "volumes": [{"title_hant": "我不受歡迎,怎麼想都是你們的錯! 1", "title_zh": "我不受欢迎,怎么想都是你们的错! 1", "cover_id": 2699968, "first_chap_id": 123790, "cover_url": "https://i.motiezw.com/cover/1487/2699968.jpg"}, {"title_hant": "我不受歡迎,怎麼想都是你們的錯! 2", "title_zh": "我不受欢迎,怎么想都是你们的错! 2", "cover_id": 2700106, "first_chap_id": 123800, "cover_url": "https://i.motiezw.com/cover/1487/2700106.jpg"}, {"title_hant": "我不受歡迎,怎麼想都是你們的錯! 3", "title_zh": "我不受欢迎,怎么想都是你们的错! 3", "cover_id": 2700243, "first_chap_id": 123812, "cover_url": "https://i.motiezw.com/cover/1487/2700243.jpg"}, {"title_hant": "我不受歡迎,怎麼想都是你們的錯! 4", "title_zh": "我不受欢迎,怎么想都是你们的错! 4", "cover_id": 2700378, "first_chap_id": 123822, "cover_url": "https://i.motiezw.com/cover/1487/2700378.jpg"}, {"title_hant": "我不受歡迎,怎麼想都是你們的錯! 5", "title_zh": "我不受欢迎,怎么想都是你们的错! 5", "cover_id": 2700502, "first_chap_id": 123834, "cover_url": "https://i.motiezw.com/cover/1487/2700502.jpg"}, {"title_hant": "我不受歡迎,怎麼想都是你們的錯! 6", "title_zh": "我不受欢迎,怎么想都是你们的错! 6", "cover_id": 2700627, "first_chap_id": 123846, "cover_url": "https://i.motiezw.com/cover/1487/2700627.jpg"}, {"title_hant": "我不受歡迎,怎麼想都是你們的錯! 7", "title_zh": "我不受欢迎,怎么想都是你们的错! 7", "cover_id": 2700745, "first_chap_id": 123857, "cover_url": "https://i.motiezw.com/cover/1487/2700745.jpg"}, {"title_hant": "我不受歡迎,怎麼想都是你們的錯! 8", "title_zh": "我不受欢迎,怎么想都是你们的错! 8", "cover_id": 2700871, "first_chap_id": 123869, "cover_url": "https://i.motiezw.com/cover/1487/2700871.jpg"}, {"title_hant": "我不受歡迎,怎麼想都是你們的錯! 9", "title_zh": "我不受欢迎,怎么想都是你们的错! 9", "cover_id": 2700999, "first_chap_id": 123882, "cover_url": "https://i.motiezw.com/cover/1487/2700999.jpg"}, {"title_hant": "我不受歡迎,怎麼想都是你們的錯! 10", "title_zh": "我不受欢迎,怎么想都是你们的错! 10", "cover_id": 2701126, "first_chap_id": 123895, "cover_url": "https://i.motiezw.com/cover/1487/2701126.jpg"}, {"title_hant": "我不受歡迎,怎麼想都是你們的錯! 11", "title_zh": "我不受欢迎,怎么想都是你们的错! 11", "cover_id": 2701587, "first_chap_id": 123920, "cover_url": "https://i.motiezw.com/cover/1487/2701587.jpg"}, {"title_hant": "我不受歡迎,怎麼想都是你們的錯! 12", "title_zh": "我不受欢迎,怎么想都是你们的错! 12", "cover_id": 2701716, "first_chap_id": 123934, "cover_url": "https://i.motiezw.com/cover/1487/2701716.jpg"}], "chapters": [{"cid": "123790", "title": "喪① 反正不受歡迎 稍微改變一下形象", "title_zh": "丧① 反正不受欢迎 稍微改变一下形象"}, {"cid": "123791", "title": "喪② 反正不受歡迎 所以害羞", "title_zh": "丧② 反正不受欢迎 所以害羞"}, {"cid": "123792", "title": "喪③ 反正不受歡迎 要去跟老朋友見面", "title_zh": "丧③ 反正不受欢迎 要去跟老朋友见面"}, {"cid": "123793", "title": "喪④ 反正不受歡迎 就繞路", "title_zh": "丧④ 反正不受欢迎 就绕路"}, {"cid": "123794", "title": "喪⑤ 反正不受歡迎 暫時躲雨", "title_zh": "丧⑤ 反正不受欢迎 暂时躲雨"}, {"cid": "123795", "title": "喪⑥ 反正不受歡迎 只能打電動", "title_zh": "丧⑥ 反正不受欢迎 只能打电动"}, {"cid": "123796", "title": "喪⑦ 反正不受歡迎 只好過著索然無味的日常生活", "title_zh": "丧⑦ 反正不受欢迎 只好过著索然无味的日常生活"}, {"cid": "123797", "title": "喪⑧ 反正不受歡迎 只好在意看不見的地方", "title_zh": "丧⑧ 反正不受欢迎 只好在意看不见的地方"}, {"cid": "123798", "title": "喪⑨ 反正不受歡迎 就畫人像", "title_zh": "丧⑨ 反正不受欢迎 就画人像"}, {"cid": "123800", "title": "喪⑩ 反正不受歡迎 乾脆面無表Q", "title_zh": "丧⑩ 反正不受欢迎 干脆面无表Q"}, {"cid": "123801", "title": "喪⑪ 反正不受歡迎 占卜稍微相信就好", "title_zh": "丧⑪ 反正不受欢迎 占卜稍微相信就好"}, {"cid": "123802", "title": "喪⑫ 反正不受歡迎 只好去看煙火", "title_zh": "丧⑫ 反正不受欢迎 只好去看烟火"}, {"cid": "123803", "title": "喪⑬ 反正不受歡迎 就好好享受暑假", "title_zh": "丧⑬ 反正不受欢迎 就好好享受暑假"}, {"cid": "123804", "title": "喪⑭ 反正不受歡迎 只好追求虛榮", "title_zh": "丧⑭ 反正不受欢迎 只好追求虚荣"}, {"cid": "123805", "title": "喪⑮ 反正不受歡迎 又重逢了", "title_zh": "丧⑮ 反正不受欢迎 又重逢了"}, {"cid": "123806", "title": "喪⑯ 反正不受歡迎 只好試圖挽回", "title_zh": "丧⑯ 反正不受欢迎 只好试图挽回"}, {"cid": "123807", "title": "喪⑰ 反正不受歡迎 那就去參加握手會", "title_zh": "丧⑰ 反正不受欢迎 那就去参加握手会"}, {"cid": "123808", "title": "喪⑱ 反正不受歡迎 夏天就這麼結束了", "title_zh": "丧⑱ 反正不受欢迎 夏天就这么结束了"}, {"cid": "123809", "title": "特別篇", "title_zh": "特别篇"}, {"cid": "123810", "title": "附錄", "title_zh": "附录"}, {"cid": "123812", "title": "喪⑲ 反正不受歡迎 第二學期開始了", "title_zh": "丧⑲ 反正不受欢迎 第二学期开始了"}, {"cid": "123814", "title": "喪㉑ 反正不受歡迎 參加校慶", "title_zh": "丧㉑ 反正不受欢迎 参加校庆"}, {"cid": "123815", "title": "喪㉒ 反正不受歡迎 拍大頭貼", "title_zh": "丧㉒ 反正不受欢迎 拍大头贴"}, {"cid": "123816", "title": "喪㉓ 反正不受歡迎 惡劣天氣", "title_zh": "丧㉓ 反正不受欢迎 恶劣天气"}, {"cid": "123817", "title": "喪㉔ 反正不受歡迎 被悻搔擾", "title_zh": "丧㉔ 反正不受欢迎 被悻搔扰"}, {"cid": "123818", "title": "喪㉕ 反正不受歡迎 照顧病人", "title_zh": "丧㉕ 反正不受欢迎 照顾病人"}, {"cid": "123819", "title": "喪㉖ 反正不受歡迎 成立社團", "title_zh": "丧㉖ 反正不受欢迎 成立社团"}, {"cid": "123820", "title": "喪㉗ 反正不受歡迎 作夢", "title_zh": "丧㉗ 反正不受欢迎 作梦"}, {"cid": "123822", "title": "喪28 因為不受歡迎,所以前往夜世界", "title_zh": "丧28 因为不受欢迎,所以前往夜世界"}, {"cid": "123823", "title": "喪29 因為不受歡迎,所以去做蛋糕", "title_zh": "丧29 因为不受欢迎,所以去做蛋糕"}, {"cid": "123824", "title": "喪30 因為不受歡迎,所以奔跑", "title_zh": "丧30 因为不受欢迎,所以奔跑"}, {"cid": "123825", "title": "喪31 因為不受歡迎,所以中二病⋯", "title_zh": "丧31 因为不受欢迎,所以中二病⋯"}, {"cid": "123826", "title": "喪32 因為不受歡迎,所以年末", "title_zh": "丧32 因为不受欢迎,所以年末"}, {"cid": "123827", "title": "喪32.5 特別篇2", "title_zh": "丧32.5 特别篇2"}, {"cid": "123828", "title": "喪33 因為不受歡迎,所以迎接正月", "title_zh": "丧33 因为不受欢迎,所以迎接正月"}, {"cid": "123829", "title": "喪34 因為不受歡迎,所以引人注目", "title_zh": "丧34 因为不受欢迎,所以引人注目"}, {"cid": "123830", "title": "喪35 因為不受歡迎,所以關心弟弟", "title_zh": "丧35 因为不受欢迎,所以关心弟弟"}, {"cid": "123831", "title": "喪36 因為不受歡迎,所以成為大人", "title_zh": "丧36 因为不受欢迎,所以成为大人"}, {"cid": "123832", "title": "附錄", "title_zh": "附录"}, {"cid": "123834", "title": "喪37 反正也不受歡迎出席畢業典禮", "title_zh": "丧37 反正也不受欢迎出席毕业典礼"}, {"cid": "123835", "title": "喪38 反正也不受歡迎被認錯", "title_zh": "丧38 反正也不受欢迎被认错"}, {"cid": "123836", "title": "喪39 反正也不受歡迎自我介紹", "title_zh": "丧39 反正也不受欢迎自我介绍"}, {"cid": "123837", "title": "喪40 反正也不受歡迎吸引周圍人", "title_zh": "丧40 反正也不受欢迎吸引周围人"}, {"cid": "123839", "title": "喪42 反正也不受歡迎 日常生活(高二)", "title_zh": "丧42 反正也不受欢迎 日常生活(高二)"}, {"cid": "123840", "title": "喪43 反正也不受歡迎對果本有了興趣", "title_zh": "丧43 反正也不受欢迎对果本有了兴趣"}, {"cid": "123841", "title": "喪44 反正也不受歡迎學習", "title_zh": "丧44 反正也不受欢迎学习"}, {"cid": "123842", "title": "喪45 反正也不受歡迎打發時間", "title_zh": "丧45 反正也不受欢迎打发时间"}, {"cid": "123843", "title": "喪46 反正也不受歡迎遇到從前的小夥伴", "title_zh": "丧46 反正也不受欢迎遇到从前的小伙伴"}, {"cid": "123844", "title": "附錄", "title_zh": "附录"}, {"cid": "123846", "title": "喪47 不受歡迎所以想起了以前熟的人", "title_zh": "丧47 不受欢迎所以想起了以前熟的人"}, {"cid": "123847", "title": "喪48 不受歡迎所以爭奪低處", "title_zh": "丧48 不受欢迎所以争夺低处"}, {"cid": "123848", "title": "喪49 不受歡迎所以決定目的地", "title_zh": "丧49 不受欢迎所以决定目的地"}, {"cid": "123849", "title": "喪50 不受歡迎所以一個人留在傍晚的教室里", "title_zh": "丧50 不受欢迎所以一个人留在傍晚的教室里"}, {"cid": "123850", "title": "喪51 不受歡迎所以在意同悻", "title_zh": "丧51 不受欢迎所以在意同悻"}, {"cid": "123851", "title": "喪52 不受歡迎所以作曲", "title_zh": "丧52 不受欢迎所以作曲"}, {"cid": "123852", "title": "喪53 不受歡迎兮 走運", "title_zh": "丧53 不受欢迎兮 走运"}, {"cid": "123853", "title": "喪54 不受歡迎兮,似曾相識", "title_zh": "丧54 不受欢迎兮,似曾相识"}, {"cid": "123854", "title": "喪55 不受歡迎兮 七夕", "title_zh": "丧55 不受欢迎兮 七夕"}, {"cid": "123855", "title": "特別篇3", "title_zh": "特别篇3"}, {"cid": "123912", "title": "附錄", "title_zh": "附录"}]};
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>