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-329", "mangaid": "329", "zh_title": "蓝色时期", "hant_title": "藍色時期", "en_title": "蓝色时期 (Bilimanga #329)", "author": "山口飞翔", "tags": ["校园", "励志", "日常", "群像", "校园青春", "日本漫画", "漫画", "日漫"], "zh_desc": "矢口八虎虽然像个不良少年,爱喝酒抽烟和朋友打混,但在学校却是个成绩优异、深受欢迎的学生,然而他却对这种空虚无趣的生活感到焦躁。某一天在美术社中,看见学姊美丽的油画,以及美术老师那番建言,让他决心想尝试画画这条路。在作画的过程中,也重新发现自我,从中找到人生的意义与目标,就此开启了考美术大学的努力之路。\n\n📚 作品信息:作者 山口飞翔 · 评分 6.8 · 共收录 16 卷 / 83 话章节目录与高清彩页/条漫预览。", "hant_desc": "矢口八虎雖然像個不良少年,愛喝酒抽菸和朋友打混,但在學校卻是個成績優異、深受歡迎的學生,然而他卻對這種空虛無趣的生活感到焦躁。某一天在美術社中,看見學姊美麗的油畫,以及美術老師那番建言,讓他決心想嘗試畫畫這條路。在作畫的過程中,也重新發現自我,從中找到人生的意義與目標,就此開啟了考美術大學的努力之路。\n\n📚 作品資訊:作者 山口飛翔 · 評分 6.8 · 共收錄 16 卷 / 83 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '蓝色时期' (藍色時期) by 山口飞翔. Includes 16 volumes and 83 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-329/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-329/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-329/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-329/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-329/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-329/page_06.jpg"], "volumes": [{"title_hant": "藍色時期 1", "title_zh": "蓝色时期 1", "cover_id": 612611, "first_chap_id": 28621, "cover_url": "https://i.motiezw.com/cover/329/612611.jpg"}, {"title_hant": "藍色時期 2", "title_zh": "蓝色时期 2", "cover_id": 612833, "first_chap_id": 28627, "cover_url": "https://i.motiezw.com/cover/329/612833.jpg"}, {"title_hant": "藍色時期 3", "title_zh": "蓝色时期 3", "cover_id": 613023, "first_chap_id": 28633, "cover_url": "https://i.motiezw.com/cover/329/613023.jpg"}, {"title_hant": "藍色時期 4", "title_zh": "蓝色时期 4", "cover_id": 613211, "first_chap_id": 28639, "cover_url": "https://i.motiezw.com/cover/329/613211.jpg"}, {"title_hant": "藍色時期 5", "title_zh": "蓝色时期 5", "cover_id": 613556, "first_chap_id": 28653, "cover_url": "https://i.motiezw.com/cover/329/613556.jpg"}, {"title_hant": "藍色時期 6", "title_zh": "蓝色时期 6", "cover_id": 613745, "first_chap_id": 28660, "cover_url": "https://i.motiezw.com/cover/329/613745.jpg"}, {"title_hant": "藍色時期 7", "title_zh": "蓝色时期 7", "cover_id": 613931, "first_chap_id": 28666, "cover_url": "https://i.motiezw.com/cover/329/613931.jpg"}, {"title_hant": "藍色時期 8", "title_zh": "蓝色时期 8", "cover_id": 614119, "first_chap_id": 28672, "cover_url": "https://i.motiezw.com/cover/329/614119.jpg"}, {"title_hant": "藍色時期 9", "title_zh": "蓝色时期 9", "cover_id": 614309, "first_chap_id": 28678, "cover_url": "https://i.motiezw.com/cover/329/614309.jpg"}, {"title_hant": "藍色時期 10", "title_zh": "蓝色时期 10", "cover_id": 614498, "first_chap_id": 28684, "cover_url": "https://i.motiezw.com/cover/329/614498.jpg"}, {"title_hant": "藍色時期 11", "title_zh": "蓝色时期 11", "cover_id": 614702, "first_chap_id": 28690, "cover_url": "https://i.motiezw.com/cover/329/614702.jpg"}, {"title_hant": "藍色時期 12", "title_zh": "蓝色时期 12", "cover_id": 614894, "first_chap_id": 28696, "cover_url": "https://i.motiezw.com/cover/329/614894.jpg"}], "chapters": [{"cid": "28621", "title": "第一筆 感受到繪畫的樂趣", "title_zh": "第一笔 感受到绘画的乐趣"}, {"cid": "28622", "title": "第二筆 有意義的時間", "title_zh": "第二笔 有意义的时间"}, {"cid": "28623", "title": "第三筆 完全沒曬黑", "title_zh": "第三笔 完全没晒黑"}, {"cid": "28624", "title": "第四筆 真的不是神", "title_zh": "第四笔 真的不是神"}, {"cid": "28625", "title": "附錄", "title_zh": "附录"}, {"cid": "28627", "title": "第五筆 補習班debut of the dead", "title_zh": "第五笔 补习班debut of the dead"}, {"cid": "28628", "title": "第六筆 反倒很純潔嗎", "title_zh": "第六笔 反倒很纯洁吗"}, {"cid": "28629", "title": "第七筆 我們該何去何從", "title_zh": "第七笔 我们该何去何从"}, {"cid": "28630", "title": "第八筆 應考繪畫", "title_zh": "第八笔 应考绘画"}, {"cid": "28631", "title": "附錄", "title_zh": "附录"}, {"cid": "28633", "title": "第九筆 看到課題卻也束手無策", "title_zh": "第九笔 看到课题却也束手无策"}, {"cid": "28634", "title": "第十筆 這種畫根本無法表達想說的事", "title_zh": "第十笔 这种画根本无法表达想说的事"}, {"cid": "28635", "title": "第十一筆 發生被讚賞的Q況", "title_zh": "第十一笔 发生被赞赏的Q况"}, {"cid": "28636", "title": "第十二筆 少得意忘形了", "title_zh": "第十二笔 少得意忘形了"}, {"cid": "28637", "title": "附錄", "title_zh": "附录"}, {"cid": "28639", "title": "第十三筆 精神崩潰到極致", "title_zh": "第十三笔 精神崩溃到极致"}, {"cid": "28640", "title": "第十四筆 享受力", "title_zh": "第十四笔 享受力"}, {"cid": "28641", "title": "第十五筆 初試開始", "title_zh": "第十五笔 初试开始"}, {"cid": "28642", "title": "第十六筆 腦汁大噴", "title_zh": "第十六笔 脑汁大喷"}, {"cid": "28643", "title": "附錄", "title_zh": "附录"}, {"cid": "28653", "title": "第十七筆 真的很噁心", "title_zh": "第十七笔 真的很恶心"}, {"cid": "28654", "title": "第十八筆 徬徨的刀刃", "title_zh": "第十八笔 徬徨的刀刃"}, {"cid": "28655", "title": "第十九筆 真不像你啊", "title_zh": "第十九笔 真不像你啊"}, {"cid": "28656", "title": "第二十筆 我們的藍S", "title_zh": "第二十笔 我们的蓝S"}, {"cid": "28657", "title": "第二十一筆 意想不到的敵人,來襲。", "title_zh": "第二十一笔 意想不到的敌人,来袭。"}, {"cid": "28658", "title": "番外篇 M大應考餐點", "title_zh": "番外篇 M大应考餐点"}, {"cid": "28660", "title": "第二十二筆 複試開始", "title_zh": "第二十二笔 复试开始"}, {"cid": "28661", "title": "第二十三筆 複試此刻才正要開始", "title_zh": "第二十三笔 复试此刻才正要开始"}, {"cid": "28662", "title": "第二十四筆 開始有顏S的自己", "title_zh": "第二十四笔 开始有颜S的自己"}, {"cid": "28663", "title": "第二十五筆 沒有遺憾", "title_zh": "第二十五笔 没有遗憾"}, {"cid": "28664", "title": "附錄", "title_zh": "附录"}, {"cid": "28666", "title": "第二十六筆 藝大生活第一天", "title_zh": "第二十六笔 艺大生活第一天"}, {"cid": "28667", "title": "第二十七筆 洗禮", "title_zh": "第二十七笔 洗礼"}, {"cid": "28668", "title": "第二十八筆 大受打擊", "title_zh": "第二十八笔 大受打击"}, {"cid": "28669", "title": "第二十九筆 原來我一無所有嗎⋯?", "title_zh": "第二十九笔 原来我一无所有吗⋯?"}, {"cid": "28670", "title": "附錄", "title_zh": "附录"}, {"cid": "28672", "title": "第三十筆 不可抱持偏見", "title_zh": "第三十笔 不可抱持偏见"}, {"cid": "28673", "title": "第三十一筆 澀谷不是一天造成的", "title_zh": "第三十一笔 涩谷不是一天造成的"}, {"cid": "28674", "title": "第三十二筆 開始準備祭典", "title_zh": "第三十二笔 开始准备祭典"}, {"cid": "28675", "title": "第三十三筆 自我犧牲精神", "title_zh": "第三十三笔 自我牺牲精神"}, {"cid": "28676", "title": "番外篇 M味的寫生旅行", "title_zh": "番外篇 M味的写生旅行"}, {"cid": "28678", "title": "第三十四筆 這是喜事的預兆", "title_zh": "第三十四笔 这是喜事的预兆"}, {"cid": "28679", "title": "第三十五筆 什麽都畫不出來的⋯夏天", "title_zh": "第三十五笔 什么都画不出来的⋯夏天"}, {"cid": "28680", "title": "第三十六筆 Hello! World.", "title_zh": "第三十六笔 Hello! World."}, {"cid": "28681", "title": "第三十七筆 穿著鎧甲的維納斯", "title_zh": "第三十七笔 穿著铠甲的维纳斯"}, {"cid": "28682", "title": "第三十八筆 天分與努力", "title_zh": "第三十八笔 天分与努力"}, {"cid": "28684", "title": "第三十九筆 雪上加霜", "title_zh": "第三十九笔 雪上加霜"}, {"cid": "28685", "title": "第四十筆 回過神來,發現踩中朋友地雷的我,技術太優秀了。", "title_zh": "第四十笔 回过神来,发现踩中朋友地雷的我,技术太优秀了。"}, {"cid": "28686", "title": "第四十一筆 回過神來,發現踩中我地雷的朋友,技術太優秀了。", "title_zh": "第四十一笔 回过神来,发现踩中我地雷的朋友,技术太优秀了。"}, {"cid": "28687", "title": "第四十二筆 畫是不會騙人的", "title_zh": "第四十二笔 画是不会骗人的"}, {"cid": "28688", "title": "附錄", "title_zh": "附录"}, {"cid": "28690", "title": "第四十三筆 為什麼為什麼為什麽", "title_zh": "第四十三笔 为什么为什么为什么"}, {"cid": "28691", "title": "第四十四筆 可以先讓我重新審視自己嗎?", "title_zh": "第四十四笔 可以先让我重新审视自己吗?"}, {"cid": "28692", "title": "第四十五筆 請讓我繼續喜歡下去", "title_zh": "第四十五笔 请让我继续喜欢下去"}, {"cid": "28693", "title": "第四十六筆 某個小學生努力想獲得幸福", "title_zh": "第四十六笔 某个小学生努力想获得幸福"}, {"cid": "28694", "title": "第四十七筆 動搖的筆尖", "title_zh": "第四十七笔 动摇的笔尖"}, {"cid": "28696", "title": "第四十八筆「討厭的食物是拿坡里義大利麵」", "title_zh": "第四十八笔「讨厌的食物是拿坡里义大利面」"}, {"cid": "28697", "title": "第四十九筆 能通關這個煩惱的死亡循環的攻略網站在哪裡", "title_zh": "第四十九笔 能通关这个烦恼的死亡循环的攻略网站在哪里"}, {"cid": "28698", "title": "第五十筆 被熱Q蠱惑,反而會冷靜下來的那個", "title_zh": "第五十笔 被热Q蛊惑,反而会冷静下来的那个"}, {"cid": "28699", "title": "第五十一筆 迷途2.0 學術版優惠包", "title_zh": "第五十一笔 迷途2.0 学术版优惠包"}]};
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>