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-1518", "mangaid": "1518", "zh_title": "恋爱季节", "hant_title": "戀愛季節", "en_title": "恋爱季节 (Bilimanga #1518)", "author": "猪熊忍", "tags": ["校园", "恋爱", "青春", "日常", "群像", "校园青春", "日本漫画", "漫画"], "zh_desc": "这是一部超清纯、正统的高中恋爱故事。描述发生在青青学子身边不断上演的小恋曲……\n\r\n谁都至少有过一次的经验,青涩、纯真的恋爱季节,那是脑于妳的「SALAD DAYS」。\n\r\n不久的未来,降临妳身上的爱情,或许就在眼前的这本书中!\n\n📚 作品信息:作者 猪熊忍 · 评分 10 · 共收录 18 卷 / 158 话章节目录与高清彩页/条漫预览。", "hant_desc": "這是一部超清純、正統的高中戀愛故事。描述發生在青青學子身邊不斷上演的小戀曲……\n\r\n誰都至少有過一次的經驗,青澀、純真的戀愛季節,那是腦於妳的「SALAD DAYS」。\n\r\n不久的未來,降臨妳身上的愛情,或許就在眼前的這本書中!\n\n📚 作品資訊:作者 豬熊忍 · 評分 10 · 共收錄 18 卷 / 158 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '恋爱季节' (戀愛季節) by 猪熊忍. Includes 18 volumes and 158 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1518/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1518/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1518/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1518/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1518/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1518/page_06.jpg"], "volumes": [{"title_hant": "戀愛季節 1", "title_zh": "恋爱季节 1", "cover_id": 2737729, "first_chap_id": 125394, "cover_url": "https://i.motiezw.com/cover/1518/2737729.jpg"}, {"title_hant": "戀愛季節 2", "title_zh": "恋爱季节 2", "cover_id": 2738088, "first_chap_id": 125401, "cover_url": "https://i.motiezw.com/cover/1518/2738088.jpg"}, {"title_hant": "戀愛季節 3", "title_zh": "恋爱季节 3", "cover_id": 2748115, "first_chap_id": 125794, "cover_url": "https://i.motiezw.com/cover/1518/2748115.jpg"}, {"title_hant": "戀愛季節 4", "title_zh": "恋爱季节 4", "cover_id": 2748146, "first_chap_id": 125802, "cover_url": "https://i.motiezw.com/cover/1518/2748146.jpg"}, {"title_hant": "戀愛季節 5", "title_zh": "恋爱季节 5", "cover_id": 2748183, "first_chap_id": 125811, "cover_url": "https://i.motiezw.com/cover/1518/2748183.jpg"}, {"title_hant": "戀愛季節 6", "title_zh": "恋爱季节 6", "cover_id": 2759885, "first_chap_id": 126250, "cover_url": "https://i.motiezw.com/cover/1518/2759885.jpg"}, {"title_hant": "戀愛季節 7", "title_zh": "恋爱季节 7", "cover_id": 2760068, "first_chap_id": 126261, "cover_url": "https://i.motiezw.com/cover/1518/2760068.jpg"}, {"title_hant": "戀愛季節 8", "title_zh": "恋爱季节 8", "cover_id": 2760262, "first_chap_id": 126273, "cover_url": "https://i.motiezw.com/cover/1518/2760262.jpg"}, {"title_hant": "戀愛季節 9", "title_zh": "恋爱季节 9", "cover_id": 2760452, "first_chap_id": 126284, "cover_url": "https://i.motiezw.com/cover/1518/2760452.jpg"}, {"title_hant": "戀愛季節 10", "title_zh": "恋爱季节 10", "cover_id": 2760640, "first_chap_id": 126295, "cover_url": "https://i.motiezw.com/cover/1518/2760640.jpg"}, {"title_hant": "戀愛季節 11", "title_zh": "恋爱季节 11", "cover_id": 2760830, "first_chap_id": 126306, "cover_url": "https://i.motiezw.com/cover/1518/2760830.jpg"}, {"title_hant": "戀愛季節 12", "title_zh": "恋爱季节 12", "cover_id": 2761016, "first_chap_id": 126316, "cover_url": "https://i.motiezw.com/cover/1518/2761016.jpg"}], "chapters": [{"cid": "125394", "title": "PART 1 告白", "title_zh": "PART 1 告白"}, {"cid": "125395", "title": "PART 2 KISS", "title_zh": "PART 2 KISS"}, {"cid": "125396", "title": "PART 3 夏之戀", "title_zh": "PART 3 夏之恋"}, {"cid": "125397", "title": "PART 4 理想的Q人", "title_zh": "PART 4 理想的Q人"}, {"cid": "125398", "title": "PART 5 劍道Q緣《前篇》", "title_zh": "PART 5 剑道Q缘《前篇》"}, {"cid": "125399", "title": "PART 6 劍道Q緣《後篇》", "title_zh": "PART 6 剑道Q缘《后篇》"}, {"cid": "125401", "title": "PART 1 童年的回憶", "title_zh": "PART 1 童年的回忆"}, {"cid": "125402", "title": "PART 2 藍寶石", "title_zh": "PART 2 蓝宝石"}, {"cid": "125403", "title": "PART 3 甲子園", "title_zh": "PART 3 甲子园"}, {"cid": "125404", "title": "PART 4 牛仔褲", "title_zh": "PART 4 牛仔裤"}, {"cid": "125405", "title": "PART 5 未來的序曲(前篇)", "title_zh": "PART 5 未来的序曲(前篇)"}, {"cid": "125406", "title": "PART 6 未來的序曲(後篇)", "title_zh": "PART 6 未来的序曲(后篇)"}, {"cid": "125794", "title": "PART 1 入學(前篇)", "title_zh": "PART 1 入学(前篇)"}, {"cid": "125795", "title": "PART 2 入學(後篇)", "title_zh": "PART 2 入学(后篇)"}, {"cid": "125796", "title": "PART 3 聖誕節", "title_zh": "PART 3 圣诞节"}, {"cid": "125797", "title": "PART 4 日菜子與端午", "title_zh": "PART 4 日菜子与端午"}, {"cid": "125798", "title": "PART 5 拳頭與OK繃", "title_zh": "PART 5 拳头与OK绷"}, {"cid": "125799", "title": "PART 6 逢瀨岬(前篇)", "title_zh": "PART 6 逢濑岬(前篇)"}, {"cid": "125800", "title": "PART 7 逢瀨岬(後篇)", "title_zh": "PART 7 逢濑岬(后篇)"}, {"cid": "125802", "title": "PART 1 Q書(前篇)", "title_zh": "PART 1 Q书(前篇)"}, {"cid": "125804", "title": "PART 3 Q書(後篇)", "title_zh": "PART 3 Q书(后篇)"}, {"cid": "125805", "title": "PART 4 奇怪的兩個人(前篇)", "title_zh": "PART 4 奇怪的两个人(前篇)"}, {"cid": "125806", "title": "PART 5 奇怪的兩個人(中篇)", "title_zh": "PART 5 奇怪的两个人(中篇)"}, {"cid": "125807", "title": "PART 6 奇怪的兩個人(後篇)", "title_zh": "PART 6 奇怪的两个人(后篇)"}, {"cid": "125808", "title": "PART 7 第一次的聖誕節(前篇)", "title_zh": "PART 7 第一次的圣诞节(前篇)"}, {"cid": "125809", "title": "PART 8 第一次的聖誕節(後篇)", "title_zh": "PART 8 第一次的圣诞节(后篇)"}, {"cid": "125811", "title": "PART 1 阿幸的戀愛(前篇)", "title_zh": "PART 1 阿幸的恋爱(前篇)"}, {"cid": "125812", "title": "PART 2 阿幸的戀愛(後篇)", "title_zh": "PART 2 阿幸的恋爱(后篇)"}, {"cid": "125813", "title": "PART 3 制服(前篇)", "title_zh": "PART 3 制服(前篇)"}, {"cid": "125814", "title": "PART 4 制服(後篇)", "title_zh": "PART 4 制服(后篇)"}, {"cid": "125815", "title": "PART 5 Q人節的邀約(前篇)", "title_zh": "PART 5 Q人节的邀约(前篇)"}, {"cid": "125816", "title": "PART 6 Q人節的邀約(後篇)", "title_zh": "PART 6 Q人节的邀约(后篇)"}, {"cid": "125817", "title": "PART 7 畢業(前篇)", "title_zh": "PART 7 毕业(前篇)"}, {"cid": "125818", "title": "PART 8 畢業(中篇)", "title_zh": "PART 8 毕业(中篇)"}, {"cid": "125819", "title": "PART 9 畢業(後篇)", "title_zh": "PART 9 毕业(后篇)"}, {"cid": "126250", "title": "PART 1 十六夜(前篇)", "title_zh": "PART 1 十六夜(前篇)"}, {"cid": "126251", "title": "PART 2 十六夜(後篇)", "title_zh": "PART 2 十六夜(后篇)"}, {"cid": "126252", "title": "PART 3 新生活(前篇)", "title_zh": "PART 3 新生活(前篇)"}, {"cid": "126253", "title": "PART 4 新生活(後篇)", "title_zh": "PART 4 新生活(后篇)"}, {"cid": "126254", "title": "PART 5 鈴木先生與佐藤先生(前篇)", "title_zh": "PART 5 铃木先生与佐藤先生(前篇)"}, {"cid": "126255", "title": "PART 6 鈴木先生與佐藤先生(後篇)", "title_zh": "PART 6 铃木先生与佐藤先生(后篇)"}, {"cid": "126256", "title": "PART 7 搖滾樂·蔬菜(前篇)", "title_zh": "PART 7 摇滚乐·蔬菜(前篇)"}, {"cid": "126258", "title": "PART 9 搖滾樂·蔬菜(後篇)", "title_zh": "PART 9 摇滚乐·蔬菜(后篇)"}, {"cid": "126259", "title": "PART 10 惡夢般的行動電話?", "title_zh": "PART 10 恶梦般的行动电话?"}, {"cid": "126261", "title": "PART 1 阿幸的戀Q'99 初夏(前篇)", "title_zh": "PART 1 阿幸的恋Q'99 初夏(前篇)"}, {"cid": "126262", "title": "PART 2 阿幸的戀Q'99 初夏(中篇)", "title_zh": "PART 2 阿幸的恋Q'99 初夏(中篇)"}, {"cid": "126263", "title": "PART 3 阿幸的戀Q'99 初夏(後篇)", "title_zh": "PART 3 阿幸的恋Q'99 初夏(后篇)"}, {"cid": "126264", "title": "PART 4 「回憶」的海(前篇)", "title_zh": "PART 4 「回忆」的海(前篇)"}, {"cid": "126265", "title": "PART 5 「回憶」的海(後篇)", "title_zh": "PART 5 「回忆」的海(后篇)"}, {"cid": "126266", "title": "PART 6 小惡魔的⋯戀愛?(前篇)", "title_zh": "PART 6 小恶魔的⋯恋爱?(前篇)"}, {"cid": "126267", "title": "PART 7 小惡魔的⋯戀愛?(後篇)", "title_zh": "PART 7 小恶魔的⋯恋爱?(后篇)"}, {"cid": "126268", "title": "PART 8 熱Q的入社申請書(前篇)", "title_zh": "PART 8 热Q的入社申请书(前篇)"}, {"cid": "126269", "title": "PART 9 熱Q的入社申請書(後篇)", "title_zh": "PART 9 热Q的入社申请书(后篇)"}, {"cid": "126270", "title": "PART 10 表兄妹(前篇)", "title_zh": "PART 10 表兄妹(前篇)"}, {"cid": "126271", "title": "PART 11 表兄妹(後篇)", "title_zh": "PART 11 表兄妹(后篇)"}, {"cid": "126273", "title": "PART 1 戀愛的一分勝負(前篇)", "title_zh": "PART 1 恋爱的一分胜负(前篇)"}, {"cid": "126274", "title": "PART 2 戀愛的一分勝負(中篇)", "title_zh": "PART 2 恋爱的一分胜负(中篇)"}, {"cid": "126275", "title": "PART 3 戀愛的一分勝負(後篇)", "title_zh": "PART 3 恋爱的一分胜负(后篇)"}, {"cid": "126276", "title": "PART 4 號外!(前篇)", "title_zh": "PART 4 号外!(前篇)"}, {"cid": "126277", "title": "PART 5 號外!(後篇)", "title_zh": "PART 5 号外!(后篇)"}]};
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>