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-1642", "mangaid": "1642", "zh_title": "跃动青春", "hant_title": "躍動青春", "en_title": "跃动青春 (Bilimanga #1642)", "author": "高松美咲", "tags": ["校园", "青春", "日常", "恋爱", "治愈", "校园青春", "日本漫画", "漫画"], "zh_desc": "梦想著衣锦还乡、规划著完美的生涯蓝图,\n\r\n却天生有点少根筋的美津未,\n\r\n前往东京展开闪闪发亮的高中生活!\n\n📚 作品信息:作者 高松美咲 · 评分 10 · 共收录 12 卷 / 69 话章节目录与高清彩页/条漫预览。", "hant_desc": "夢想著衣錦還鄉、規劃著完美的生涯藍圖,\n\r\n卻天生有點少根筋的美津未,\n\r\n前往東京展開閃閃發亮的高中生活!\n\n📚 作品資訊:作者 高松美咲 · 評分 10 · 共收錄 12 卷 / 69 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '跃动青春' (躍動青春) by 高松美咲. Includes 12 volumes and 69 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1642/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1642/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1642/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1642/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1642/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1642/page_06.jpg"], "volumes": [{"title_hant": "躍動青春 1", "title_zh": "跃动青春 1", "cover_id": 2961204, "first_chap_id": 135100, "cover_url": "https://i.motiezw.com/cover/1642/2961204.jpg"}, {"title_hant": "躍動青春 2", "title_zh": "跃动青春 2", "cover_id": 2961398, "first_chap_id": 135106, "cover_url": "https://i.motiezw.com/cover/1642/2961398.jpg"}, {"title_hant": "躍動青春 3", "title_zh": "跃动青春 3", "cover_id": 2961576, "first_chap_id": 135113, "cover_url": "https://i.motiezw.com/cover/1642/2961576.jpg"}, {"title_hant": "躍動青春 4", "title_zh": "跃动青春 4", "cover_id": 2961754, "first_chap_id": 135120, "cover_url": "https://i.motiezw.com/cover/1642/2961754.jpg"}, {"title_hant": "躍動青春 5", "title_zh": "跃动青春 5", "cover_id": 2961933, "first_chap_id": 135127, "cover_url": "https://i.motiezw.com/cover/1642/2961933.jpg"}, {"title_hant": "躍動青春 6", "title_zh": "跃动青春 6", "cover_id": 2962111, "first_chap_id": 135134, "cover_url": "https://i.motiezw.com/cover/1642/2962111.jpg"}, {"title_hant": "躍動青春 7", "title_zh": "跃动青春 7", "cover_id": 2962291, "first_chap_id": 135141, "cover_url": "https://i.motiezw.com/cover/1642/2962291.jpg"}, {"title_hant": "躍動青春 8", "title_zh": "跃动青春 8", "cover_id": 2962471, "first_chap_id": 135149, "cover_url": "https://i.motiezw.com/cover/1642/2962471.jpg"}, {"title_hant": "躍動青春 9", "title_zh": "跃动青春 9", "cover_id": 2962651, "first_chap_id": 135155, "cover_url": "https://i.motiezw.com/cover/1642/2962651.jpg"}, {"title_hant": "躍動青春 10", "title_zh": "跃动青春 10", "cover_id": 2962831, "first_chap_id": 135162, "cover_url": "https://i.motiezw.com/cover/1642/2962831.jpg"}, {"title_hant": "躍動青春 11", "title_zh": "跃动青春 11", "cover_id": 2962995, "first_chap_id": 135169, "cover_url": "https://i.motiezw.com/cover/1642/2962995.jpg"}, {"title_hant": "躍動青春 12", "title_zh": "跃动青春 12", "cover_id": 2963172, "first_chap_id": 135176, "cover_url": "https://i.motiezw.com/cover/1642/2963172.jpg"}], "chapters": [{"cid": "135100", "title": "Scene1 閃閃發亮的高中生", "title_zh": "Scene1 闪闪发亮的高中生"}, {"cid": "135101", "title": "Scene2 坐立不安的KTV包廂", "title_zh": "Scene2 坐立不安的KTV包厢"}, {"cid": "135102", "title": "Scene3 徘徊徬徨的社團活動", "title_zh": "Scene3 徘徊徬徨的社团活动"}, {"cid": "135103", "title": "Scene4 輕飄飄的學生會", "title_zh": "Scene4 轻飘飘的学生会"}, {"cid": "135104", "title": "Scene5 掌聲雷動的電影院", "title_zh": "Scene5 掌声雷动的电影院"}, {"cid": "135106", "title": "Scene6 酥酥麻麻的朋友", "title_zh": "Scene6 酥酥麻麻的朋友"}, {"cid": "135107", "title": "Scene7 滿滿當當的日程表", "title_zh": "Scene7 满满当当的日程表"}, {"cid": "135108", "title": "Scene8 陰陽怪氣的個人練習", "title_zh": "Scene8 阴阳怪气的个人练习"}, {"cid": "135109", "title": "Scene9 興沖沖的球技大賽", "title_zh": "Scene9 兴冲冲的球技大赛"}, {"cid": "135110", "title": "Scene10 陰雨綿綿的入梅", "title_zh": "Scene10 阴雨绵绵的入梅"}, {"cid": "135111", "title": "Scene11 一閃一閃的出梅", "title_zh": "Scene11 一闪一闪的出梅"}, {"cid": "135113", "title": "Scene12 東奔西走的學生會長選舉", "title_zh": "Scene12 东奔西走的学生会长选举"}, {"cid": "135114", "title": "Scene13 桃花朵朵的暑假前夕", "title_zh": "Scene13 桃花朵朵的暑假前夕"}, {"cid": "135115", "title": "Scene14 悶熱煩亂的動物園", "title_zh": "Scene14 闷热烦乱的动物园"}, {"cid": "135116", "title": "Scene15 各式各樣的暑假", "title_zh": "Scene15 各式各样的暑假"}, {"cid": "135117", "title": "Scene16 昏昏愉睡的返鄉", "title_zh": "Scene16 昏昏愉睡的返乡"}, {"cid": "135118", "title": "Scene17 心Q雀躍的收假", "title_zh": "Scene17 心Q雀跃的收假"}, {"cid": "135120", "title": "Scene18 忙忙碌碌的文化祭籌備", "title_zh": "Scene18 忙忙碌碌的文化祭筹备"}, {"cid": "135121", "title": "Scene19 淚如雨下的舞蹈", "title_zh": "Scene19 泪如雨下的舞蹈"}, {"cid": "135122", "title": "Scene20 熱熱鬧鬧的文化祭1", "title_zh": "Scene20 热热闹闹的文化祭1"}, {"cid": "135124", "title": "Scene22 熱熱鬧鬧的文化祭3", "title_zh": "Scene22 热热闹闹的文化祭3"}, {"cid": "135125", "title": "Scene23 熱熱鬧鬧的文化祭4", "title_zh": "Scene23 热热闹闹的文化祭4"}, {"cid": "135127", "title": "Scene24 扭扭捏捏的青春期", "title_zh": "Scene24 扭扭捏捏的青春期"}, {"cid": "135128", "title": "Scene25 暈頭轉向的初戀?", "title_zh": "Scene25 晕头转向的初恋?"}, {"cid": "135129", "title": "Scene26 心如刀割的N孩 1", "title_zh": "Scene26 心如刀割的N孩 1"}, {"cid": "135130", "title": "Scene27 心如刀割的N孩 2", "title_zh": "Scene27 心如刀割的N孩 2"}, {"cid": "135131", "title": "Scene28 叮叮噹噹的聖誕節", "title_zh": "Scene28 叮叮当当的圣诞节"}, {"cid": "135132", "title": "Scene29 雪落無聲的新年假期", "title_zh": "Scene29 雪落无声的新年假期"}, {"cid": "135134", "title": "Scene30 大快朵頤的Q人節 1", "title_zh": "Scene30 大快朵颐的Q人节 1"}, {"cid": "135135", "title": "Scene31 大快朵頤的Q人節 2", "title_zh": "Scene31 大快朵颐的Q人节 2"}, {"cid": "135136", "title": "Scene32 喀嚓喀嚓的16歲", "title_zh": "Scene32 喀嚓喀嚓的16岁"}, {"cid": "135137", "title": "Scene33 笑瞇瞇的蛋糕", "title_zh": "Scene33 笑瞇瞇的蛋糕"}, {"cid": "135138", "title": "Scene34 甜甜蜜蜜的野心", "title_zh": "Scene34 甜甜蜜蜜的野心"}, {"cid": "135139", "title": "Scene35 步步高升的高二", "title_zh": "Scene35 步步高升的高二"}, {"cid": "135141", "title": "Scene36 光鮮亮麗的高2生", "title_zh": "Scene36 光鲜亮丽的高2生"}, {"cid": "135142", "title": "Scene37 意氣風發的學長姊", "title_zh": "Scene37 意气风发的学长姊"}, {"cid": "135143", "title": "Scene38 如坐針氈的新班級", "title_zh": "Scene38 如坐针毡的新班级"}, {"cid": "135144", "title": "Scene39 長路漫漫的回家路", "title_zh": "Scene39 长路漫漫的回家路"}, {"cid": "135145", "title": "Scene40 昂首闊步的爬山", "title_zh": "Scene40 昂首阔步的爬山"}, {"cid": "135146", "title": "Scene41 心旌搖曳的春天", "title_zh": "Scene41 心旌摇曳的春天"}, {"cid": "135149", "title": "Scene43 各自表述的想法", "title_zh": "Scene43 各自表述的想法"}, {"cid": "135150", "title": "Scene44 鬱鬱寡歡的心", "title_zh": "Scene44 郁郁寡欢的心"}, {"cid": "135151", "title": "Scene45 鬧鬧哄哄的新學生會長", "title_zh": "Scene45 闹闹哄哄的新学生会长"}, {"cid": "135152", "title": "Scene46 日暖風和的野餐", "title_zh": "Scene46 日暖风和的野餐"}, {"cid": "135153", "title": "Scene47 淅淅瀝瀝的雨", "title_zh": "Scene47 淅淅沥沥的雨"}, {"cid": "135155", "title": "Scene48 反覆無常的單相思", "title_zh": "Scene48 反复无常的单相思"}, {"cid": "135156", "title": "Scene49 翹首以待的旅行計劃", "title_zh": "Scene49 翘首以待的旅行计划"}, {"cid": "135157", "title": "Scene50 不知所措的返校日", "title_zh": "Scene50 不知所措的返校日"}, {"cid": "135158", "title": "Scene51 心潮澎湃的海邊1", "title_zh": "Scene51 心潮澎湃的海边1"}, {"cid": "135159", "title": "Scene52 心潮澎湃的海邊2", "title_zh": "Scene52 心潮澎湃的海边2"}, {"cid": "135160", "title": "Scene53 心潮澎湃的海邊3", "title_zh": "Scene53 心潮澎湃的海边3"}, {"cid": "135162", "title": "Scene54 心潮澎湃的海邊4", "title_zh": "Scene54 心潮澎湃的海边4"}, {"cid": "135163", "title": "Scene55 心潮澎湃的海邊5", "title_zh": "Scene55 心潮澎湃的海边5"}, {"cid": "135164", "title": "Scene56 筋疲力盡的歸途", "title_zh": "Scene56 筋疲力尽的归途"}, {"cid": "135165", "title": "Scene57 興高采烈的返校日", "title_zh": "Scene57 兴高采烈的返校日"}, {"cid": "135166", "title": "Scene58 光輝燦爛的未來1", "title_zh": "Scene58 光辉灿烂的未来1"}, {"cid": "135167", "title": "Scene59 光輝燦爛的未來2", "title_zh": "Scene59 光辉灿烂的未来2"}, {"cid": "135169", "title": "Scene60 嘀嘀咕咕的發言", "title_zh": "Scene60 嘀嘀咕咕的发言"}, {"cid": "135170", "title": "Scene61 火冒三丈的地區大賽", "title_zh": "Scene61 火冒三丈的地区大赛"}, {"cid": "135171", "title": "Scene62 摟摟抱抱的逛街", "title_zh": "Scene62 搂搂抱抱的逛街"}]};
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>