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-678", "mangaid": "678", "zh_title": "摇曳露营△", "hant_title": "搖曳露營△", "en_title": "摇曳露营△ (Bilimanga #678)", "author": "あfろ", "tags": ["日常", "旅行", "治愈", "萌系", "女性视角", "治愈温馨", "日本漫画", "漫画"], "zh_desc": "凛是喜欢一个人去露营的高中女生,一次的露营中,碰到了意外睡在路边的抚子,请她吃了泡面后,温暖了身子,也萌芽了友情,围绕在露营的故事也就这么展开了。抚子在一次的露营体验后,从此爱上了露营,便决定加入校内的野外活动同好会,但成员连抚子在内只有三个人,露营装备也不齐全。这时,她意外地发现,原来凛跟自己是同个学校的学生……\n\n📚 作品信息:作者 あfろ · 评分 10 · 共收录 19 卷 / 123 话章节目录与高清彩页/条漫预览。", "hant_desc": "凜是喜歡一個人去露營的高中女生,一次的露營中,碰到了意外睡在路邊的撫子,請她吃了泡麵後,溫暖了身子,也萌芽了友情,圍繞在露營的故事也就這麼展開了。撫子在一次的露營體驗後,從此愛上了露營,便決定加入校內的野外活動同好會,但成員連撫子在內只有三個人,露營裝備也不齊全。這時,她意外地發現,原來凜跟自己是同個學校的學生……\n\n📚 作品資訊:作者 あfろ · 評分 10 · 共收錄 19 卷 / 123 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '摇曳露营△' (搖曳露營△) by あfろ. Includes 19 volumes and 123 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-678/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-678/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-678/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-678/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-678/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-678/page_06.jpg"], "volumes": [{"title_hant": "搖曳露營△ 1", "title_zh": "摇曳露营△ 1", "cover_id": 1128162, "first_chap_id": 51382, "cover_url": "https://i.motiezw.com/cover/678/1128162.jpg"}, {"title_hant": "搖曳露營△ 2", "title_zh": "摇曳露营△ 2", "cover_id": 1128336, "first_chap_id": 51390, "cover_url": "https://i.motiezw.com/cover/678/1128336.jpg"}, {"title_hant": "搖曳露營△ 3", "title_zh": "摇曳露营△ 3", "cover_id": 1128512, "first_chap_id": 51398, "cover_url": "https://i.motiezw.com/cover/678/1128512.jpg"}, {"title_hant": "搖曳露營△ 4", "title_zh": "摇曳露营△ 4", "cover_id": 1128688, "first_chap_id": 51406, "cover_url": "https://i.motiezw.com/cover/678/1128688.jpg"}, {"title_hant": "搖曳露營△ 5", "title_zh": "摇曳露营△ 5", "cover_id": 1128865, "first_chap_id": 51412, "cover_url": "https://i.motiezw.com/cover/678/1128865.jpg"}, {"title_hant": "搖曳露營△ 6", "title_zh": "摇曳露营△ 6", "cover_id": 1129040, "first_chap_id": 51419, "cover_url": "https://i.motiezw.com/cover/678/1129040.jpg"}, {"title_hant": "搖曳露營△ 7", "title_zh": "摇曳露营△ 7", "cover_id": 1129218, "first_chap_id": 51427, "cover_url": "https://i.motiezw.com/cover/678/1129218.jpg"}, {"title_hant": "搖曳露營△ 8", "title_zh": "摇曳露营△ 8", "cover_id": 1129395, "first_chap_id": 51435, "cover_url": "https://i.motiezw.com/cover/678/1129395.jpg"}, {"title_hant": "搖曳露營△ 9", "title_zh": "摇曳露营△ 9", "cover_id": 1129573, "first_chap_id": 51443, "cover_url": "https://i.motiezw.com/cover/678/1129573.jpg"}, {"title_hant": "搖曳露營△ 10", "title_zh": "摇曳露营△ 10", "cover_id": 1129750, "first_chap_id": 51451, "cover_url": "https://i.motiezw.com/cover/678/1129750.jpg"}, {"title_hant": "搖曳露營△ 11", "title_zh": "摇曳露营△ 11", "cover_id": 1129929, "first_chap_id": 51459, "cover_url": "https://i.motiezw.com/cover/678/1129929.jpg"}, {"title_hant": "搖曳露營△ 12", "title_zh": "摇曳露营△ 12", "cover_id": 1130107, "first_chap_id": 51467, "cover_url": "https://i.motiezw.com/cover/678/1130107.jpg"}], "chapters": [{"cid": "51382", "title": "第1話 富士山和速食杯面", "title_zh": "第1话 富士山和速食杯面"}, {"cid": "51383", "title": "第2話 歡迎來到野會!", "title_zh": "第2话 欢迎来到野会!"}, {"cid": "51384", "title": "第3話 山腳下的獨自露營少N", "title_zh": "第3话 山脚下的独自露营少N"}, {"cid": "51385", "title": "第4話 富士山和火鍋露營", "title_zh": "第4话 富士山和火锅露营"}, {"cid": "51386", "title": "第5話 露營是從準備裝備開始", "title_zh": "第5话 露营是从准备装备开始"}, {"cid": "51387", "title": "第6話 冬日露營和山間咖啡廳", "title_zh": "第6话 冬日露营和山间咖啡厅"}, {"cid": "51388", "title": "第[番外篇] 星期天和戶外搖椅", "title_zh": "第[番外篇] 星期天和户外摇椅"}, {"cid": "51390", "title": "第7話 溫泉和獨行和野炊", "title_zh": "第7话 温泉和独行和野炊"}, {"cid": "51391", "title": "第8話 各自的露營,兩人的景S", "title_zh": "第8话 各自的露营,两人的景S"}, {"cid": "51392", "title": "第9話 伴手禮和放學後的烤禸理論", "title_zh": "第9话 伴手礼和放学后的烤禸理论"}, {"cid": "51393", "title": "第10話 禸和紅葉和神秘的湖", "title_zh": "第10话 禸和红叶和神秘的湖"}, {"cid": "51394", "title": "第11話 冬日露營和四尾連湖", "title_zh": "第11话 冬日露营和四尾连湖"}, {"cid": "51395", "title": "第12話 夜晚湖畔和露營的人們", "title_zh": "第12话 夜晚湖畔和露营的人们"}, {"cid": "51396", "title": "第13話 考試會出的時尚露營入門", "title_zh": "第13话 考试会出的时尚露营入门"}, {"cid": "51398", "title": "第14話 身延Caribou饅頭好吃", "title_zh": "第14话 身延Caribou馒头好吃"}, {"cid": "51399", "title": "第15話 感冒和一個人的旅行", "title_zh": "第15话 感冒和一个人的旅行"}, {"cid": "51400", "title": "第16話 向您推薦!撫子導航", "title_zh": "第16话 向您推荐!抚子导航"}, {"cid": "51401", "title": "第17話 早太郎和雲霧繚繞的駒根之夜", "title_zh": "第17话 早太郎和云雾缭绕的驹根之夜"}, {"cid": "51402", "title": "第18話 山上", "title_zh": "第18话 山上"}, {"cid": "51403", "title": "番外篇 房間露營△", "title_zh": "番外篇 房间露营△"}, {"cid": "51406", "title": "第20話 急悻子露營客和戶外活動點心", "title_zh": "第20话 急悻子露营客和户外活动点心"}, {"cid": "51407", "title": "第21話 聖誕露營要開始囉!", "title_zh": "第21话 圣诞露营要开始啰!"}, {"cid": "51408", "title": "第22話 特別的晚餐", "title_zh": "第22话 特别的晚餐"}, {"cid": "51409", "title": "第23話 12月25日", "title_zh": "第23话 12月25日"}, {"cid": "51410", "title": "番外篇 房間露營△", "title_zh": "番外篇 房间露营△"}, {"cid": "51412", "title": "第24話 12月的工作,大家的假期", "title_zh": "第24话 12月的工作,大家的假期"}, {"cid": "51413", "title": "第25話 在除夕獨自露營的少N", "title_zh": "第25话 在除夕独自露营的少N"}, {"cid": "51414", "title": "第26話 一年之始", "title_zh": "第26话 一年之始"}, {"cid": "51415", "title": "第27話 海和湖和幸運的露營", "title_zh": "第27话 海和湖和幸运的露营"}, {"cid": "51416", "title": "第28話 再次察覺到的事", "title_zh": "第28话 再次察觉到的事"}, {"cid": "51417", "title": "番外篇 房間露營△", "title_zh": "番外篇 房间露营△"}, {"cid": "51419", "title": "第29話 要用打工的錢買什麼?", "title_zh": "第29话 要用打工的钱买什么?"}, {"cid": "51420", "title": "第30話 燈具和懷爐", "title_zh": "第30话 灯具和怀炉"}, {"cid": "51421", "title": "第31話 Caribou小子和露營休閒椅", "title_zh": "第31话 Caribou小子和露营休闲椅"}, {"cid": "51422", "title": "第32話 雪國火鍋和山中湖", "title_zh": "第32话 雪国火锅和山中湖"}, {"cid": "51423", "title": "第33話 大間間岬的冬天", "title_zh": "第33话 大间间岬的冬天"}, {"cid": "51424", "title": "第34話 圍著火爐", "title_zh": "第34话 围著火炉"}, {"cid": "51425", "title": "番外篇 房間露營△", "title_zh": "番外篇 房间露营△"}, {"cid": "51427", "title": "第35話 撫子的獨自露營計劃", "title_zh": "第35话 抚子的独自露营计划"}, {"cid": "51428", "title": "第36話 撫子散步和小凜散步", "title_zh": "第36话 抚子散步和小凛散步"}, {"cid": "51429", "title": "第37話 咖啡廳和時雨和一個人的旅行", "title_zh": "第37话 咖啡厅和时雨和一个人的旅行"}, {"cid": "51431", "title": "第39話 一個人的露營", "title_zh": "第39话 一个人的露营"}, {"cid": "51432", "title": "第40話 野會的伊豆露營計劃", "title_zh": "第40话 野会的伊豆露营计划"}, {"cid": "51433", "title": "番外篇 房間露營△", "title_zh": "番外篇 房间露营△"}, {"cid": "51435", "title": "第41話 離伊豆露營還有幾天?", "title_zh": "第41话 离伊豆露营还有几天?"}, {"cid": "51436", "title": "第42話 冬天的結束和出發的日子", "title_zh": "第42话 冬天的结束和出发的日子"}, {"cid": "51437", "title": "第43話 還要多久才到下田?", "title_zh": "第43话 还要多久才到下田?"}, {"cid": "51438", "title": "第44話 蝦子和金目鯛和犬島", "title_zh": "第44话 虾子和金目鲷和犬岛"}, {"cid": "51439", "title": "第45話 海景山景", "title_zh": "第45话 海景山景"}, {"cid": "51440", "title": "第46話 黃昏的溫泉和一天的結束", "title_zh": "第46话 黄昏的温泉和一天的结束"}, {"cid": "51441", "title": "番外篇 房間露營△", "title_zh": "番外篇 房间露营△"}, {"cid": "51443", "title": "第47話 本日晚餐!", "title_zh": "第47话 本日晚餐!"}, {"cid": "51444", "title": "第48話 早起的志摩凜的搶先溫泉", "title_zh": "第48话 早起的志摩凛的抢先温泉"}, {"cid": "51445", "title": "第49話 海之道和空之道", "title_zh": "第49话 海之道和空之道"}, {"cid": "51446", "title": "第50話 Birthday!", "title_zh": "第50话 Birthday!"}, {"cid": "51447", "title": "第51話 大室山是什麼顏S?", "title_zh": "第51话 大室山是什么颜S?"}, {"cid": "51448", "title": "第52話 旅程的最後", "title_zh": "第52话 旅程的最后"}, {"cid": "51449", "title": "番外篇 房間露營△", "title_zh": "番外篇 房间露营△"}, {"cid": "51451", "title": "第53話 來製作酒精爐吧", "title_zh": "第53话 来制作酒精炉吧"}, {"cid": "51452", "title": "第54話 庭院露營和千明的斷發式", "title_zh": "第54话 庭院露营和千明的断发式"}]};
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>