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-1176", "mangaid": "1176", "zh_title": "双星之阴阳师", "hant_title": "雙星之陰陽師", "en_title": "双星之阴阳师 (Bilimanga #1176)", "author": "助野嘉昭", "tags": ["奇幻", "战斗", "热血", "恋爱", "东方", "神鬼", "奇幻冒险", "日本漫画"], "zh_desc": "「污秽」是自异世界「祸野」现身,危害人世的怪物。而「阴阳师」长年以来则与污秽战斗至今。国中生少年˙焰魔堂辘轳曾以成为能祓除所有污秽的最强阴阳师为目标,但自从遭遇了「雏月之悲剧」后,他便放弃成为阴阳师。此时,在这样的辘轳面前,出现了一名少女˙化野红绪,这名来自京都的少女,同样以祓除污秽为理想,并展现了惊人的实力……\n\n📚 作品信息:作者 助野嘉昭 · 评分 10 · 共收录 35 卷 / 159 话章节目录与高清彩页/条漫预览。", "hant_desc": "「汙穢」是自異世界「禍野」現身,危害人世的怪物。而「陰陽師」長年以來則與汙穢戰鬥至今。國中生少年˙焰魔堂轆轤曾以成為能祓除所有汙穢的最強陰陽師為目標,但自從遭遇了「雛月之悲劇」後,他便放棄成為陰陽師。此時,在這樣的轆轤面前,出現了一名少女˙化野紅緒,這名來自京都的少女,同樣以祓除汙穢為理想,並展現了驚人的實力……\n\n📚 作品資訊:作者 助野嘉昭 · 評分 10 · 共收錄 35 卷 / 159 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '双星之阴阳师' (雙星之陰陽師) by 助野嘉昭. Includes 35 volumes and 159 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1176/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1176/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1176/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1176/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1176/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1176/page_06.jpg"], "volumes": [{"title_hant": "雙星之陰陽師 1", "title_zh": "双星之阴阳师 1", "cover_id": 2118042, "first_chap_id": 98495, "cover_url": "https://i.motiezw.com/cover/1176/2118042.jpg"}, {"title_hant": "雙星之陰陽師 2", "title_zh": "双星之阴阳师 2", "cover_id": 2118242, "first_chap_id": 98501, "cover_url": "https://i.motiezw.com/cover/1176/2118242.jpg"}, {"title_hant": "雙星之陰陽師 3", "title_zh": "双星之阴阳师 3", "cover_id": 2118440, "first_chap_id": 98507, "cover_url": "https://i.motiezw.com/cover/1176/2118440.jpg"}, {"title_hant": "雙星之陰陽師 4", "title_zh": "双星之阴阳师 4", "cover_id": 2118627, "first_chap_id": 98513, "cover_url": "https://i.motiezw.com/cover/1176/2118627.jpg"}, {"title_hant": "雙星之陰陽師 5", "title_zh": "双星之阴阳师 5", "cover_id": 2118812, "first_chap_id": 98520, "cover_url": "https://i.motiezw.com/cover/1176/2118812.jpg"}, {"title_hant": "雙星之陰陽師 6", "title_zh": "双星之阴阳师 6", "cover_id": 2119007, "first_chap_id": 98526, "cover_url": "https://i.motiezw.com/cover/1176/2119007.jpg"}, {"title_hant": "雙星之陰陽師 7", "title_zh": "双星之阴阳师 7", "cover_id": 2119215, "first_chap_id": 98533, "cover_url": "https://i.motiezw.com/cover/1176/2119215.jpg"}, {"title_hant": "雙星之陰陽師 8", "title_zh": "双星之阴阳师 8", "cover_id": 2119820, "first_chap_id": 98555, "cover_url": "https://i.motiezw.com/cover/1176/2119820.jpg"}, {"title_hant": "雙星之陰陽師 9", "title_zh": "双星之阴阳师 9", "cover_id": 2120003, "first_chap_id": 98561, "cover_url": "https://i.motiezw.com/cover/1176/2120003.jpg"}, {"title_hant": "雙星之陰陽師 10", "title_zh": "双星之阴阳师 10", "cover_id": 2120191, "first_chap_id": 98565, "cover_url": "https://i.motiezw.com/cover/1176/2120191.jpg"}, {"title_hant": "雙星之陰陽師 11", "title_zh": "双星之阴阳师 11", "cover_id": 2120383, "first_chap_id": 98571, "cover_url": "https://i.motiezw.com/cover/1176/2120383.jpg"}, {"title_hant": "雙星之陰陽師 12", "title_zh": "双星之阴阳师 12", "cover_id": 2120575, "first_chap_id": 98577, "cover_url": "https://i.motiezw.com/cover/1176/2120575.jpg"}], "chapters": [{"cid": "98495", "title": "#1「轆轤與紅緒」", "title_zh": "#1「辘轳与红绪」"}, {"cid": "98496", "title": "#2「雙星交叉」", "title_zh": "#2「双星交叉」"}, {"cid": "98497", "title": "#3「禍野之聲」", "title_zh": "#3「祸野之声」"}, {"cid": "98498", "title": "番外篇「京都的紅緒」", "title_zh": "番外篇「京都的红绪」"}, {"cid": "98499", "title": "附錄", "title_zh": "附录"}, {"cid": "98501", "title": "#4「彼為何人」", "title_zh": "#4「彼为何人」"}, {"cid": "98502", "title": "#5「你的勇氣,我的勇氣」", "title_zh": "#5「你的勇气,我的勇气」"}, {"cid": "98503", "title": "#6「轆轤的心Q」", "title_zh": "#6「辘轳的心Q」"}, {"cid": "98504", "title": "#7「錯綜複雜的悲劇」", "title_zh": "#7「错综复杂的悲剧」"}, {"cid": "98505", "title": "附錄", "title_zh": "附录"}, {"cid": "98507", "title": "#8「邪惡的一鱗半爪」", "title_zh": "#8「邪恶的一鳞半爪」"}, {"cid": "98508", "title": "#9「以陰陽師的身分」", "title_zh": "#9「以阴阳师的身分」"}, {"cid": "98509", "title": "#10「邪惡」", "title_zh": "#10「邪恶」"}, {"cid": "98510", "title": "#11「宛如新星誕生」", "title_zh": "#11「宛如新星诞生」"}, {"cid": "98511", "title": "附錄", "title_zh": "附录"}, {"cid": "98513", "title": "#12「某對夫妻的初陣", "title_zh": "#12「某对夫妻的初阵"}, {"cid": "98514", "title": "#13.0「雙星昇」", "title_zh": "#13.0「双星升」"}, {"cid": "98515", "title": "#13.5「破」", "title_zh": "#13.5「破」"}, {"cid": "98516", "title": "#14「我的獠牙」", "title_zh": "#14「我的獠牙」"}, {"cid": "98517", "title": "番外篇「紅緒,奮鬥」", "title_zh": "番外篇「红绪,奋斗」"}, {"cid": "98520", "title": "#15「星之奏者」", "title_zh": "#15「星之奏者」"}, {"cid": "98521", "title": "#16「轆轤來到之日」", "title_zh": "#16「辘轳来到之日」"}, {"cid": "98522", "title": "#17「兩條路,兩個人的路」", "title_zh": "#17「两条路,两个人的路」"}, {"cid": "98523", "title": "#18「夢的後續」", "title_zh": "#18「梦的后续」"}, {"cid": "98524", "title": "附錄", "title_zh": "附录"}, {"cid": "98526", "title": "#19「眾星的躍動」", "title_zh": "#19「众星的跃动」"}, {"cid": "98527", "title": "#20「虛空的霸者」!", "title_zh": "#20「虚空的霸者」!"}, {"cid": "98528", "title": "#21「Perfect Linker」", "title_zh": "#21「Perfect Linker」"}, {"cid": "98529", "title": "番外篇「繭良七變化」", "title_zh": "番外篇「茧良七变化」"}, {"cid": "98530", "title": "番外篇「轆轤沸騰」", "title_zh": "番外篇「辘轳沸腾」"}, {"cid": "98531", "title": "番外篇「十二神將『朱雀』繼承典禮」", "title_zh": "番外篇「十二神将『朱雀』继承典礼」"}, {"cid": "98533", "title": "#22「咒縛」", "title_zh": "#22「咒缚」"}, {"cid": "98534", "title": "#23「沒有咒縛的天空」", "title_zh": "#23「没有咒缚的天空」"}, {"cid": "98535", "title": "#24「敗北的歷史」", "title_zh": "#24「败北的历史」"}, {"cid": "98536", "title": "#25「Turn Over」", "title_zh": "#25「Turn Over」"}, {"cid": "98555", "title": "#26「不求之人」", "title_zh": "#26「不求之人」"}, {"cid": "98556", "title": "#27「繭良的戰鬥」", "title_zh": "#27「茧良的战斗」"}, {"cid": "98557", "title": "#28「黑S的誕生哭聲」", "title_zh": "#28「黑S的诞生哭声」"}, {"cid": "98558", "title": "#29「陰溝鼠之夢」", "title_zh": "#29「阴沟鼠之梦」"}, {"cid": "98561", "title": "#31「我害怕的東西」", "title_zh": "#31「我害怕的东西」"}, {"cid": "98562", "title": "#32「兩人要前進的明日⋯」", "title_zh": "#32「两人要前进的明日⋯」"}, {"cid": "98563", "title": "#33「雙星分離」", "title_zh": "#33「双星分离」"}, {"cid": "98565", "title": "#34「眾星聚集之島」", "title_zh": "#34「众星聚集之岛」"}, {"cid": "98566", "title": "#35「最前線」", "title_zh": "#35「最前线」"}, {"cid": "98567", "title": "#36「起始的場所,幽遠難測的彼方」", "title_zh": "#36「起始的场所,幽远难测的彼方」"}, {"cid": "98568", "title": "#37「化野家的小巨人」", "title_zh": "#37「化野家的小巨人」"}, {"cid": "98569", "title": "附錄", "title_zh": "附录"}, {"cid": "98571", "title": "#38「醜陋的心願」", "title_zh": "#38「丑陋的心愿」"}, {"cid": "98572", "title": "#39「土御門的繼承人」", "title_zh": "#39「土御门的继承人」"}, {"cid": "98573", "title": "#40「各自的3個月」", "title_zh": "#40「各自的3个月」"}, {"cid": "98574", "title": "番外篇「雙星回歸」", "title_zh": "番外篇「双星回归」"}, {"cid": "98575", "title": "附錄", "title_zh": "附录"}, {"cid": "98577", "title": "#41「N生之戰鬥①」", "title_zh": "#41「N生之战斗①」"}, {"cid": "98578", "title": "#42「N生之戰鬥②」", "title_zh": "#42「N生之战斗②」"}, {"cid": "98579", "title": "#43「理想與夢想與僮憬」", "title_zh": "#43「理想与梦想与僮憬」"}, {"cid": "98580", "title": "#44「爆燃烈火的波達羅盈城!」", "title_zh": "#44「爆燃烈火的波达罗盈城!」"}, {"cid": "98581", "title": "附錄", "title_zh": "附录"}, {"cid": "98583", "title": "#45「歡迎回來,小勘老師」", "title_zh": "#45「欢迎回来,小勘老师」"}, {"cid": "98584", "title": "#46「無限之力」", "title_zh": "#46「无限之力」"}, {"cid": "98586", "title": "#48「孤獨之王」", "title_zh": "#48「孤独之王」"}]};
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>