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-444", "mangaid": "444", "zh_title": "女神咖啡厅", "hant_title": "女神咖啡廳", "en_title": "女神咖啡厅 (Bilimanga #444)", "author": "濑尾公治", "tags": ["日常", "恋爱", "后宫", "经营", "治愈", "职场都市", "日本漫画", "漫画"], "zh_desc": "跟相依为命的祖母吵架,负气离家3年后应届考上东大的粕壁隼,突然接获祖母过世的消息,于是他回到了老家,位于海边的一间老旧咖啡厅。想不到一推开门就看到有5个自称是「奶奶的家人」的女孩住在家中!本来打算把店拆了,改成停车场赚钱的隼,在回想起与奶奶的过往后,决定靠自己过人的经营才能(?)重开这间店!就这么,隼与五个女神的共同生活正式开始!\n\n📚 作品信息:作者 濑尾公治 · 评分 10 · 共收录 22 卷 / 214 话章节目录与高清彩页/条漫预览。", "hant_desc": "跟相依為命的祖母吵架,負氣離家3年後應屆考上東大的粕壁隼,突然接獲祖母過世的消息,於是他回到了老家,位於海邊的一間老舊咖啡廳。想不到一推開門就看到有5個自稱是「奶奶的家人」的女孩住在家中!本來打算把店拆了,改成停車場賺錢的隼,在回想起與奶奶的過往後,決定靠自己過人的經營才能(?)重開這間店!就這麼,隼與五個女神的共同生活正式開始!\n\n📚 作品資訊:作者 瀨尾公治 · 評分 10 · 共收錄 22 卷 / 214 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '女神咖啡厅' (女神咖啡廳) by 濑尾公治. Includes 22 volumes and 214 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-444/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-444/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-444/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-444/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-444/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-444/page_06.jpg"], "volumes": [{"title_hant": "女神咖啡廳 1", "title_zh": "女神咖啡厅 1", "cover_id": 760241, "first_chap_id": 35193, "cover_url": "https://i.motiezw.com/cover/444/760241.jpg"}, {"title_hant": "女神咖啡廳 2", "title_zh": "女神咖啡厅 2", "cover_id": 760435, "first_chap_id": 35202, "cover_url": "https://i.motiezw.com/cover/444/760435.jpg"}, {"title_hant": "女神咖啡廳 3", "title_zh": "女神咖啡厅 3", "cover_id": 760624, "first_chap_id": 35214, "cover_url": "https://i.motiezw.com/cover/444/760624.jpg"}, {"title_hant": "女神咖啡廳 4", "title_zh": "女神咖啡厅 4", "cover_id": 760814, "first_chap_id": 35226, "cover_url": "https://i.motiezw.com/cover/444/760814.jpg"}, {"title_hant": "女神咖啡廳 5", "title_zh": "女神咖啡厅 5", "cover_id": 1103026, "first_chap_id": 35238, "cover_url": "https://i.motiezw.com/cover/444/1103026.jpg"}, {"title_hant": "女神咖啡廳 6", "title_zh": "女神咖啡厅 6", "cover_id": 761193, "first_chap_id": 35249, "cover_url": "https://i.motiezw.com/cover/444/761193.jpg"}, {"title_hant": "女神咖啡廳 7", "title_zh": "女神咖啡厅 7", "cover_id": 761376, "first_chap_id": 35260, "cover_url": "https://i.motiezw.com/cover/444/761376.jpg"}, {"title_hant": "女神咖啡廳 8", "title_zh": "女神咖啡厅 8", "cover_id": 761561, "first_chap_id": 35271, "cover_url": "https://i.motiezw.com/cover/444/761561.jpg"}, {"title_hant": "女神咖啡廳 9", "title_zh": "女神咖啡厅 9", "cover_id": 761746, "first_chap_id": 35282, "cover_url": "https://i.motiezw.com/cover/444/761746.jpg"}, {"title_hant": "女神咖啡廳 10", "title_zh": "女神咖啡厅 10", "cover_id": 761929, "first_chap_id": 35293, "cover_url": "https://i.motiezw.com/cover/444/761929.jpg"}, {"title_hant": "女神咖啡廳 11", "title_zh": "女神咖啡厅 11", "cover_id": 762113, "first_chap_id": 35304, "cover_url": "https://i.motiezw.com/cover/444/762113.jpg"}, {"title_hant": "女神咖啡廳 12", "title_zh": "女神咖啡厅 12", "cover_id": 762301, "first_chap_id": 35316, "cover_url": "https://i.motiezw.com/cover/444/762301.jpg"}], "chapters": [{"cid": "35193", "title": "#1 Familia", "title_zh": "#1 Familia"}, {"cid": "35194", "title": "#2 與乃乃的約定", "title_zh": "#2 与乃乃的约定"}, {"cid": "35195", "title": "#3 試營運", "title_zh": "#3 试营运"}, {"cid": "35196", "title": "#4 打招呼", "title_zh": "#4 打招呼"}, {"cid": "35197", "title": "#5 水火不容", "title_zh": "#5 水火不容"}, {"cid": "35198", "title": "#6 開幕前夜", "title_zh": "#6 开幕前夜"}, {"cid": "35199", "title": "#7 開幕!", "title_zh": "#7 开幕!"}, {"cid": "35200", "title": "附錄", "title_zh": "附录"}, {"cid": "35202", "title": "#8 絕對想保護", "title_zh": "#8 绝对想保护"}, {"cid": "35203", "title": "#9 新菜單!", "title_zh": "#9 新菜单!"}, {"cid": "35204", "title": "#10 櫻花祭!", "title_zh": "#10 樱花祭!"}, {"cid": "35205", "title": "#11 零式!", "title_zh": "#11 零式!"}, {"cid": "35206", "title": "#12 公休日", "title_zh": "#12 公休日"}, {"cid": "35207", "title": "#13 不變的日常", "title_zh": "#13 不变的日常"}, {"cid": "35208", "title": "#14 2個月!", "title_zh": "#14 2个月!"}, {"cid": "35209", "title": "#15 三明治戰爭!", "title_zh": "#15 三明治战争!"}, {"cid": "35210", "title": "#16 我想變強", "title_zh": "#16 我想变强"}, {"cid": "35211", "title": "#17 紅葉的隱Q", "title_zh": "#17 红叶的隐Q"}, {"cid": "35212", "title": "附錄", "title_zh": "附录"}, {"cid": "35214", "title": "#18 約會與真心話", "title_zh": "#18 约会与真心话"}, {"cid": "35215", "title": "#19 我的1年", "title_zh": "#19 我的1年"}, {"cid": "35217", "title": "#21 夏天的開始", "title_zh": "#21 夏天的开始"}, {"cid": "35218", "title": "#22 海之家!", "title_zh": "#22 海之家!"}, {"cid": "35219", "title": "#23 夏季重頭戲!", "title_zh": "#23 夏季重头戏!"}, {"cid": "35220", "title": "#24 N人心與夏季氣候", "title_zh": "#24 N人心与夏季气候"}, {"cid": "35221", "title": "#25 流星與她的過去", "title_zh": "#25 流星与她的过去"}, {"cid": "35222", "title": "#26 演技與真心話", "title_zh": "#26 演技与真心话"}, {"cid": "35223", "title": "#27 未來與過去", "title_zh": "#27 未来与过去"}, {"cid": "35224", "title": "附錄", "title_zh": "附录"}, {"cid": "35226", "title": "#28 海水浴!", "title_zh": "#28 海水浴!"}, {"cid": "35227", "title": "#29 煙火大會", "title_zh": "#29 烟火大会"}, {"cid": "35228", "title": "#30 孟蘭盆節假期!", "title_zh": "#30 孟兰盆节假期!"}, {"cid": "35229", "title": "#31 意料之外的言語攻擊", "title_zh": "#31 意料之外的言语攻击"}, {"cid": "35230", "title": "#32 櫻之花,心不在焉", "title_zh": "#32 樱之花,心不在焉"}, {"cid": "35231", "title": "#33 櫻花與橘花", "title_zh": "#33 樱花与橘花"}, {"cid": "35232", "title": "#34 現在,來去看英雄秀吧!", "title_zh": "#34 现在,来去看英雄秀吧!"}, {"cid": "35233", "title": "#35 不懂的事", "title_zh": "#35 不懂的事"}, {"cid": "35234", "title": "#36 夏季的結束與少N心", "title_zh": "#36 夏季的结束与少N心"}, {"cid": "35235", "title": "#37 熱湯之中,搖曳", "title_zh": "#37 热汤之中,摇曳"}, {"cid": "35236", "title": "附錄", "title_zh": "附录"}, {"cid": "35238", "title": "#38 回程,兩人獨處", "title_zh": "#38 回程,两人独处"}, {"cid": "35239", "title": "#39 戀愛的火花", "title_zh": "#39 恋爱的火花"}, {"cid": "35240", "title": "#40 再次構想新菜S!", "title_zh": "#40 再次构想新菜S!"}, {"cid": "35242", "title": "#42 憧憬與活著的意義", "title_zh": "#42 憧憬与活著的意义"}, {"cid": "35243", "title": "#43 野餐!", "title_zh": "#43 野餐!"}, {"cid": "35244", "title": "#44 黑影籠罩Familia", "title_zh": "#44 黑影笼罩Familia"}, {"cid": "35245", "title": "#45 風紀委員·櫻花", "title_zh": "#45 风纪委员·樱花"}, {"cid": "35246", "title": "#46 另一個我", "title_zh": "#46 另一个我"}, {"cid": "35247", "title": "#47 流淚的理由", "title_zh": "#47 流泪的理由"}, {"cid": "50175", "title": "附錄", "title_zh": "附录"}, {"cid": "35249", "title": "第48話", "title_zh": "第48话"}, {"cid": "35250", "title": "第49話", "title_zh": "第49话"}, {"cid": "35251", "title": "第50話", "title_zh": "第50话"}, {"cid": "35252", "title": "第51話", "title_zh": "第51话"}, {"cid": "35253", "title": "第52話", "title_zh": "第52话"}, {"cid": "35254", "title": "第53話", "title_zh": "第53话"}, {"cid": "35255", "title": "第54話", "title_zh": "第54话"}, {"cid": "35256", "title": "第55話", "title_zh": "第55话"}, {"cid": "35257", "title": "第56話", "title_zh": "第56话"}, {"cid": "35258", "title": "第57話", "title_zh": "第57话"}]};
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>