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-960", "mangaid": "960", "zh_title": "边缘行动", "hant_title": "邊緣行動", "en_title": "边缘行动 (Bilimanga #960)", "author": "キムラダイスケ / 芝村裕吏 / 静间良纪", "tags": ["战斗", "战争", "职场", "战斗热血", "日本漫画", "漫画", "日漫", "连载漫画"], "zh_desc": "喜爱轻小说与游戏的尼特族.新田良太。\n\r\n受不了持续7年的尼特身分而痛下决心,\n\r\n他被网路上看到的外资军事企业PMSCs的优渥条件所吸引,\n\r\n一时兴起就去应征了……\n\r\n30岁尼特族,将在异国为世界的现实所震慑不已!\n\r\n由『高机动幻想』的芝村裕吏所著之人气小说,\n\r\n加上新锐漫画家キムラダイスケ,\n\r\n为您献上与其他军事小说大不相同的写实系战场漫画第1集!\n\n📚 作品信息:作者 キムラダイスケ / 芝村裕吏 / 静间良纪 · 评分 10 · 共收录 16 卷 / 92 话章节目录与高清彩页/条漫预览。", "hant_desc": "喜愛輕小說與遊戲的尼特族.新田良太。\n\r\n受不了持續7年的尼特身分而痛下決心,\n\r\n他被網路上看到的外資軍事企業PMSCs的優渥條件所吸引,\n\r\n一時興起就去應徵了……\n\r\n30歲尼特族,將在異國為世界的現實所震懾不已!\n\r\n由『高機動幻想』的芝村裕吏所著之人氣小說,\n\r\n加上新銳漫畫家キムラダイスケ,\n\r\n為您獻上與其他軍事小說大不相同的寫實系戰場漫畫第1集!\n\n📚 作品資訊:作者 キムラダイスケ / 芝村裕吏 / 靜間良紀 · 評分 10 · 共收錄 16 卷 / 92 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '边缘行动' (邊緣行動) by キムラダイスケ / 芝村裕吏 / 静间良纪. Includes 16 volumes and 92 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-960/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-960/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-960/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-960/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-960/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-960/page_06.jpg"], "volumes": [{"title_hant": "邊緣行動 1", "title_zh": "边缘行动 1", "cover_id": 1676228, "first_chap_id": 77548, "cover_url": "https://i.motiezw.com/cover/960/1676228.jpg"}, {"title_hant": "邊緣行動 2", "title_zh": "边缘行动 2", "cover_id": 1676437, "first_chap_id": 77554, "cover_url": "https://i.motiezw.com/cover/960/1676437.jpg"}, {"title_hant": "邊緣行動 3", "title_zh": "边缘行动 3", "cover_id": 1676644, "first_chap_id": 77562, "cover_url": "https://i.motiezw.com/cover/960/1676644.jpg"}, {"title_hant": "邊緣行動 4", "title_zh": "边缘行动 4", "cover_id": 1676845, "first_chap_id": 77569, "cover_url": "https://i.motiezw.com/cover/960/1676845.jpg"}, {"title_hant": "邊緣行動 5", "title_zh": "边缘行动 5", "cover_id": 1677055, "first_chap_id": 77576, "cover_url": "https://i.motiezw.com/cover/960/1677055.jpg"}, {"title_hant": "邊緣行動 6", "title_zh": "边缘行动 6", "cover_id": 1677265, "first_chap_id": 77583, "cover_url": "https://i.motiezw.com/cover/960/1677265.jpg"}, {"title_hant": "邊緣行動 7", "title_zh": "边缘行动 7", "cover_id": 1677449, "first_chap_id": 77590, "cover_url": "https://i.motiezw.com/cover/960/1677449.jpg"}, {"title_hant": "邊緣行動 8", "title_zh": "边缘行动 8", "cover_id": 1677656, "first_chap_id": 77597, "cover_url": "https://i.motiezw.com/cover/960/1677656.jpg"}, {"title_hant": "邊緣行動 9", "title_zh": "边缘行动 9", "cover_id": 1677865, "first_chap_id": 77604, "cover_url": "https://i.motiezw.com/cover/960/1677865.jpg"}, {"title_hant": "邊緣行動 10", "title_zh": "边缘行动 10", "cover_id": 1678073, "first_chap_id": 77611, "cover_url": "https://i.motiezw.com/cover/960/1678073.jpg"}, {"title_hant": "邊緣行動 11", "title_zh": "边缘行动 11", "cover_id": 1678477, "first_chap_id": 77618, "cover_url": "https://i.motiezw.com/cover/960/1678477.jpg"}, {"title_hant": "邊緣行動 12(生肉)", "title_zh": "边缘行动 12(生肉)", "cover_id": 1678683, "first_chap_id": 77624, "cover_url": "https://i.motiezw.com/cover/960/1678683.jpg"}], "chapters": [{"cid": "77548", "title": "第1話 尚在日本時", "title_zh": "第1话 尚在日本时"}, {"cid": "77549", "title": "第2話 CG槽透了的遊戲", "title_zh": "第2话 CG槽透了的游戏"}, {"cid": "77550", "title": "第3話 派遣測試", "title_zh": "第3话 派遣测试"}, {"cid": "77551", "title": "第4話 村莊", "title_zh": "第4话 村庄"}, {"cid": "77552", "title": "第5話 滾回日本", "title_zh": "第5话 滚回日本"}, {"cid": "77554", "title": "第6話 山中之國", "title_zh": "第6话 山中之国"}, {"cid": "77555", "title": "第7話 日本仔", "title_zh": "第7话 日本仔"}, {"cid": "77556", "title": "第8話 襲擊1", "title_zh": "第8话 袭击1"}, {"cid": "77557", "title": "第9話 襲擊2", "title_zh": "第9话 袭击2"}, {"cid": "77558", "title": "第10話 綠扁帽", "title_zh": "第10话 绿扁帽"}, {"cid": "77559", "title": "第11話 拜訪村落", "title_zh": "第11话 拜访村落"}, {"cid": "77560", "title": "附錄", "title_zh": "附录"}, {"cid": "77562", "title": "第12話 襲擊", "title_zh": "第12话 袭击"}, {"cid": "77563", "title": "第13話 精靈的住處", "title_zh": "第13话 精灵的住处"}, {"cid": "77564", "title": "第14話 戰況和輸送", "title_zh": "第14话 战况和输送"}, {"cid": "77565", "title": "第15話 新月祭", "title_zh": "第15话 新月祭"}, {"cid": "77566", "title": "第16話 俘虜生活", "title_zh": "第16话 俘虏生活"}, {"cid": "77567", "title": "第17話 戰鬥", "title_zh": "第17话 战斗"}, {"cid": "77569", "title": "第18話 飯前運動", "title_zh": "第18话 饭前运动"}, {"cid": "77570", "title": "第19話 鯨魚", "title_zh": "第19话 鲸鱼"}, {"cid": "77572", "title": "第21話 活動委託", "title_zh": "第21话 活动委托"}, {"cid": "77573", "title": "第22話 社會學脀", "title_zh": "第22话 社会学脀"}, {"cid": "77574", "title": "第23話 活動開始", "title_zh": "第23话 活动开始"}, {"cid": "77576", "title": "第24話 出擊與展開", "title_zh": "第24话 出击与展开"}, {"cid": "77577", "title": "第25話 射擊綀習", "title_zh": "第25话 射击𦈌习"}, {"cid": "77578", "title": "第26話 於公園再會", "title_zh": "第26话 于公园再会"}, {"cid": "77579", "title": "第27話 妖精與弓", "title_zh": "第27话 妖精与弓"}, {"cid": "77580", "title": "第28話 結束戰爭的方式", "title_zh": "第28话 结束战争的方式"}, {"cid": "77581", "title": "第29話 話 返回外國", "title_zh": "第29话 话 返回外国"}, {"cid": "77583", "title": "第30話 泰國這國家", "title_zh": "第30话 泰国这国家"}, {"cid": "77584", "title": "第31話 工作檢討", "title_zh": "第31话 工作检讨"}, {"cid": "77585", "title": "第32話 與他的再會", "title_zh": "第32话 与他的再会"}, {"cid": "77586", "title": "第33話 武器與接觸", "title_zh": "第33话 武器与接触"}, {"cid": "77587", "title": "第34話 再次思索", "title_zh": "第34话 再次思索"}, {"cid": "77588", "title": "附錄", "title_zh": "附录"}, {"cid": "77590", "title": "第35話 電話大會", "title_zh": "第35话 电话大会"}, {"cid": "77591", "title": "第36話 攻擊", "title_zh": "第36话 攻击"}, {"cid": "77592", "title": "第37話 背叛與失望", "title_zh": "第37话 背叛与失望"}, {"cid": "77593", "title": "第38話 敵人的目的", "title_zh": "第38话 敌人的目的"}, {"cid": "77594", "title": "第39話 錯綜複雜的第二回合", "title_zh": "第39话 错综复杂的第二回合"}, {"cid": "77595", "title": "附錄", "title_zh": "附录"}, {"cid": "77597", "title": "第40話 敵人的緣由", "title_zh": "第40话 敌人的缘由"}, {"cid": "77598", "title": "第41話 失調的原因", "title_zh": "第41话 失调的原因"}, {"cid": "77599", "title": "第42話 他們的目的", "title_zh": "第42话 他们的目的"}, {"cid": "77600", "title": "第43話 急轉直下", "title_zh": "第43话 急转直下"}, {"cid": "77601", "title": "第44話 岸本視角1", "title_zh": "第44话 岸本视角1"}, {"cid": "77602", "title": "附錄", "title_zh": "附录"}, {"cid": "77604", "title": "第45話 岸本視角2", "title_zh": "第45话 岸本视角2"}, {"cid": "77605", "title": "第46話 當時", "title_zh": "第46话 当时"}, {"cid": "77606", "title": "第47話 3分鐘就好", "title_zh": "第47话 3分钟就好"}, {"cid": "77607", "title": "第48話 為人父", "title_zh": "第48话 为人父"}, {"cid": "77608", "title": "第49話 岸本的來電", "title_zh": "第49话 岸本的来电"}, {"cid": "77609", "title": "附錄", "title_zh": "附录"}, {"cid": "77611", "title": "第50話 逼入絕境", "title_zh": "第50话 逼入绝境"}, {"cid": "77612", "title": "第51話 事件結束之後", "title_zh": "第51话 事件结束之后"}, {"cid": "77613", "title": "第52話 業務與新兵", "title_zh": "第52话 业务与新兵"}, {"cid": "77614", "title": "第53話 故鄉的名稱", "title_zh": "第53话 故乡的名称"}, {"cid": "77615", "title": "第54話 與贊助商交涉", "title_zh": "第54话 与赞助商交涉"}, {"cid": "77616", "title": "附錄", "title_zh": "附录"}, {"cid": "77618", "title": "第55話 指揮官與為人父", "title_zh": "第55话 指挥官与为人父"}]};
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>