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-225", "mangaid": "225", "zh_title": "飞翔的魔女", "hant_title": "飛翔的魔女", "en_title": "飞翔的魔女 (Bilimanga #225)", "author": "石冢千寻", "tags": ["奇幻", "魔法", "治愈", "日常", "治愈温馨", "日本漫画", "漫画", "日漫"], "zh_desc": "木幡真琴是15岁的魔女,从横滨来到了日本东北地区的青森,开始进行魔女的修练。她带著黑猫奇多,住进了远房亲戚阿圭的家,也转学到当地的学校,开始在这座小镇里生活。虽然她现在的魔法程度只会坐竹扫帚飞在天上,但是她还是很努力的学习。除了拔曼陀罗草做成草药之外,真琴也开始开拓了一小块田地,打算准备要种植蔬菜。\n\n📚 作品信息:作者 石冢千寻 · 评分 10 · 共收录 14 卷 / 81 话章节目录与高清彩页/条漫预览。", "hant_desc": "木幡真琴是15歲的魔女,從橫濱來到了日本東北地區的青森,開始進行魔女的修練。她帶著黑貓奇多,住進了遠房親戚阿圭的家,也轉學到當地的學校,開始在這座小鎮裡生活。雖然她現在的魔法程度只會坐竹掃帚飛在天上,但是她還是很努力的學習。除了拔曼陀羅草做成草藥之外,真琴也開始開拓了一小塊田地,打算準備要種植蔬菜。\n\n📚 作品資訊:作者 石塚千尋 · 評分 10 · 共收錄 14 卷 / 81 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '飞翔的魔女' (飛翔的魔女) by 石冢千寻. Includes 14 volumes and 81 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-225/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-225/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-225/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-225/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-225/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-225/page_06.jpg"], "volumes": [{"title_hant": "飛翔的魔女 1", "title_zh": "飞翔的魔女 1", "cover_id": 424323, "first_chap_id": 19736, "cover_url": "https://i.motiezw.com/cover/225/424323.jpg"}, {"title_hant": "飛翔的魔女 2", "title_zh": "飞翔的魔女 2", "cover_id": 424484, "first_chap_id": 19743, "cover_url": "https://i.motiezw.com/cover/225/424484.jpg"}, {"title_hant": "飛翔的魔女 3", "title_zh": "飞翔的魔女 3", "cover_id": 424644, "first_chap_id": 19750, "cover_url": "https://i.motiezw.com/cover/225/424644.jpg"}, {"title_hant": "飛翔的魔女 4", "title_zh": "飞翔的魔女 4", "cover_id": 424806, "first_chap_id": 19758, "cover_url": "https://i.motiezw.com/cover/225/424806.jpg"}, {"title_hant": "飛翔的魔女 5", "title_zh": "飞翔的魔女 5", "cover_id": 424964, "first_chap_id": 19765, "cover_url": "https://i.motiezw.com/cover/225/424964.jpg"}, {"title_hant": "飛翔的魔女 6", "title_zh": "飞翔的魔女 6", "cover_id": 425133, "first_chap_id": 19772, "cover_url": "https://i.motiezw.com/cover/225/425133.jpg"}, {"title_hant": "飛翔的魔女 7", "title_zh": "飞翔的魔女 7", "cover_id": 425309, "first_chap_id": 19779, "cover_url": "https://i.motiezw.com/cover/225/425309.jpg"}, {"title_hant": "飛翔的魔女 8", "title_zh": "飞翔的魔女 8", "cover_id": 425486, "first_chap_id": 19786, "cover_url": "https://i.motiezw.com/cover/225/425486.jpg"}, {"title_hant": "飛翔的魔女 9", "title_zh": "飞翔的魔女 9", "cover_id": 425660, "first_chap_id": 19793, "cover_url": "https://i.motiezw.com/cover/225/425660.jpg"}, {"title_hant": "飛翔的魔女 10", "title_zh": "飞翔的魔女 10", "cover_id": 425815, "first_chap_id": 19800, "cover_url": "https://i.motiezw.com/cover/225/425815.jpg"}, {"title_hant": "飛翔的魔女 11", "title_zh": "飞翔的魔女 11", "cover_id": 425992, "first_chap_id": 19808, "cover_url": "https://i.motiezw.com/cover/225/425992.jpg"}, {"title_hant": "飛翔的魔女 12", "title_zh": "飞翔的魔女 12", "cover_id": 426213, "first_chap_id": 19817, "cover_url": "https://i.motiezw.com/cover/225/426213.jpg"}], "chapters": [{"cid": "19736", "title": "第1話 相隔六年的不可思議", "title_zh": "第1话 相隔六年的不可思议"}, {"cid": "19737", "title": "第2話 路邊的草是萬靈藥", "title_zh": "第2话 路边的草是万灵药"}, {"cid": "19738", "title": "第3話 國鳥啼聲不斷", "title_zh": "第3话 国鸟啼声不断"}, {"cid": "19739", "title": "第4話 如何善用使魔", "title_zh": "第4话 如何善用使魔"}, {"cid": "19740", "title": "第5話 魔N的訪客", "title_zh": "第5话 魔N的访客"}, {"cid": "19741", "title": "第6話 魔術講習", "title_zh": "第6话 魔术讲习"}, {"cid": "19743", "title": "第7話 夢境與路旁的幸福", "title_zh": "第7话 梦境与路旁的幸福"}, {"cid": "19744", "title": "第8話 櫻花中的占卜師", "title_zh": "第8话 樱花中的占卜师"}, {"cid": "19745", "title": "第9話 犬魔N與姊姊魔N", "title_zh": "第9话 犬魔N与姊姊魔N"}, {"cid": "19746", "title": "第10話 千夏的決心", "title_zh": "第10话 千夏的决心"}, {"cid": "19747", "title": "第11話 奇怪的點心", "title_zh": "第11话 奇怪的点心"}, {"cid": "19748", "title": "第12話 春天的山", "title_zh": "第12话 春天的山"}, {"cid": "19750", "title": "第13話 咖啡廳「孔庫魯西歌」", "title_zh": "第13话 咖啡厅「孔库鲁西歌」"}, {"cid": "19751", "title": "第14話 常客的叫聲", "title_zh": "第14话 常客的叫声"}, {"cid": "19752", "title": "第15話 明天的明天就在現在", "title_zh": "第15话 明天的明天就在现在"}, {"cid": "19753", "title": "第16話 良藥苦口", "title_zh": "第16话 良药苦口"}, {"cid": "19754", "title": "第17話 送報員與鯨魚", "title_zh": "第17话 送报员与鲸鱼"}, {"cid": "19755", "title": "第18話 平底鍋與鬆餅之間的關係", "title_zh": "第18话 平底锅与松饼之间的关系"}, {"cid": "19756", "title": "特別篇", "title_zh": "特别篇"}, {"cid": "19758", "title": "第20話 魔N的長袍各式各樣", "title_zh": "第20话 魔N的长袍各式各样"}, {"cid": "19760", "title": "第22話 魔N與蜂不合", "title_zh": "第22话 魔N与蜂不合"}, {"cid": "19761", "title": "第23話 煙草、燃油、咖啡的香氣", "title_zh": "第23话 烟草、燃油、咖啡的香气"}, {"cid": "19762", "title": "第24話 在春日里等待兔子", "title_zh": "第24话 在春日里等待兔子"}, {"cid": "19763", "title": "第25話 兔子的倒立", "title_zh": "第25话 兔子的倒立"}, {"cid": "19765", "title": "第25話 紙拉門有貓又有蝴蝶", "title_zh": "第25话 纸拉门有猫又有蝴蝶"}, {"cid": "19766", "title": "第26話 下雨天是心Q不好", "title_zh": "第26话 下雨天是心Q不好"}, {"cid": "19767", "title": "第27話 鯛魚釣蝦子", "title_zh": "第27话 鲷鱼钓虾子"}, {"cid": "19768", "title": "第28話 一點點東西就引發打嗝", "title_zh": "第28话 一点点东西就引发打嗝"}, {"cid": "19769", "title": "第29話 會飛的水壺", "title_zh": "第29话 会飞的水壶"}, {"cid": "19770", "title": "第30話 後院的魔法使", "title_zh": "第30话 后院的魔法使"}, {"cid": "19772", "title": "第31話 第一次的魔法紀念日", "title_zh": "第31话 第一次的魔法纪念日"}, {"cid": "19773", "title": "第32話 天地、夏冬、雪與墨", "title_zh": "第32话 天地、夏冬、雪与墨"}, {"cid": "19774", "title": "第33話 就算貓來了,飯後還是要休息", "title_zh": "第33话 就算猫来了,饭后还是要休息"}, {"cid": "19775", "title": "第34話 2年級的經驗不可小覷", "title_zh": "第34话 2年级的经验不可小觑"}, {"cid": "19776", "title": "第35話 複製小鎮", "title_zh": "第35话 复制小镇"}, {"cid": "19777", "title": "第36話 納魯納魯魯珍真的進食畫面與捕捉方法", "title_zh": "第36话 纳鲁纳鲁鲁珍真的进食画面与捕捉方法"}, {"cid": "19779", "title": "第37話 魔N的外號", "title_zh": "第37话 魔N的外号"}, {"cid": "19780", "title": "第38話 另一邊的點心", "title_zh": "第38话 另一边的点心"}, {"cid": "19781", "title": "第39話 狗駒外甥割草", "title_zh": "第39话 狗驹外甥割草"}, {"cid": "19782", "title": "第40話 會跑的藥草", "title_zh": "第40话 会跑的药草"}, {"cid": "19783", "title": "第41話 酒是用來釣魔N的魚餌", "title_zh": "第41话 酒是用来钓魔N的鱼饵"}, {"cid": "19786", "title": "第44話 機械使魔", "title_zh": "第44话 机械使魔"}, {"cid": "19787", "title": "第45話 九行、硬幣和魔法師", "title_zh": "第45话 九行、硬币和魔法师"}, {"cid": "19788", "title": "第46話 閒逛、近路、歸途", "title_zh": "第46话 闲逛、近路、归途"}, {"cid": "19789", "title": "第47話 結冰的草中有剝落的影子", "title_zh": "第47话 结冰的草中有剥落的影子"}, {"cid": "19790", "title": "第48話 不可冒犯夜貓子", "title_zh": "第48话 不可冒犯夜猫子"}, {"cid": "19791", "title": "第49話 夏天的伊始、排球的屍體", "title_zh": "第49话 夏天的伊始、排球的尸体"}, {"cid": "19793", "title": "第50話 烏鴉叼不動相機", "title_zh": "第50话 乌鸦叼不动相机"}, {"cid": "19794", "title": "第51話 兩個世界,兩個祭典", "title_zh": "第51话 两个世界,两个祭典"}, {"cid": "19795", "title": "第52話 期待已久的珠穆朗瑪", "title_zh": "第52话 期待已久的珠穆朗玛"}, {"cid": "19796", "title": "第53話 朋友是海邊的守護神", "title_zh": "第53话 朋友是海边的守护神"}, {"cid": "19797", "title": "第54話 曼德拉草的進化", "title_zh": "第54话 曼德拉草的进化"}, {"cid": "19798", "title": "第55話 哼哈二將是老饕", "title_zh": "第55话 哼哈二将是老饕"}, {"cid": "19800", "title": "第55話 二分送的農產品分量十足", "title_zh": "第55话 二分送的农产品分量十足"}, {"cid": "19801", "title": "第56話 魔N協會弘前支部", "title_zh": "第56话 魔N协会弘前支部"}, {"cid": "19802", "title": "第57話 旅行需要旅伴,貓需要同Q", "title_zh": "第57话 旅行需要旅伴,猫需要同Q"}, {"cid": "19803", "title": "第58話 相隔四個月再次跟親人重聚,多了一個好朋友", "title_zh": "第58话 相隔四个月再次跟亲人重聚,多了一个好朋友"}, {"cid": "19804", "title": "第59話 都會的工作", "title_zh": "第59话 都会的工作"}, {"cid": "19805", "title": "第60話 招財貓的要求", "title_zh": "第60话 招财猫的要求"}, {"cid": "19806", "title": "第61話 一萬分的活躍表現", "title_zh": "第61话 一万分的活跃表现"}]};
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>