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>麻辣教师GTO 爱藏版 - 在线漫画阅读器</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-1690", "mangaid": "1690", "zh_title": "麻辣教师GTO 爱藏版", "hant_title": "麻辣教師GTO 愛藏版", "en_title": "麻辣教师GTO 爱藏版 (Bilimanga #1690)", "author": "藤沢亨", "tags": ["校园", "青春", "欢乐", "励志", "战斗", "校园青春", "日本漫画", "漫画"], "zh_desc": "立志当一个名留青史伟大老师的鬼冢英吉现身了!原本目标年收入千万的演艺传播事业,在街头遇上一个师生恋的少女后,大受刺激从此目标老师为终生职志...而鬼冢流的痞子作风会给日本教育界带来什么样的改革呢?\n\n📚 作品信息:作者 藤沢亨 · 评分 10 · 共收录 12 卷 / 199 话章节目录与高清彩页/条漫预览。", "hant_desc": "立志當一個名留青史偉大老師的鬼塚英吉現身了!原本目標年收入千萬的演藝傳播事業,在街頭遇上一個師生戀的少女後,大受刺激從此目標老師為終生職志...而鬼塚流的痞子作風會給日本教育界帶來什麼樣的改革呢?\n\n📚 作品資訊:作者 藤沢亨 · 評分 10 · 共收錄 12 卷 / 199 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '麻辣教师GTO 爱藏版' (麻辣教師GTO 愛藏版) by 藤沢亨. Includes 12 volumes and 199 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1690/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1690/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1690/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1690/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1690/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1690/page_06.jpg"], "volumes": [{"title_hant": "麻辣教師GTO 愛藏版 1", "title_zh": "麻辣教师GTO 爱藏版 1", "cover_id": 3024422, "first_chap_id": 137709, "cover_url": "https://i.motiezw.com/cover/1690/3024422.jpg"}, {"title_hant": "麻辣教師GTO 愛藏版 2", "title_zh": "麻辣教师GTO 爱藏版 2", "cover_id": 3024789, "first_chap_id": 137725, "cover_url": "https://i.motiezw.com/cover/1690/3024789.jpg"}, {"title_hant": "麻辣教師GTO 愛藏版 3", "title_zh": "麻辣教师GTO 爱藏版 3", "cover_id": 3025173, "first_chap_id": 137745, "cover_url": "https://i.motiezw.com/cover/1690/3025173.jpg"}, {"title_hant": "麻辣教師GTO 愛藏版 4", "title_zh": "麻辣教师GTO 爱藏版 4", "cover_id": 3026553, "first_chap_id": 137786, "cover_url": "https://i.motiezw.com/cover/1690/3026553.jpg"}, {"title_hant": "麻辣教師GTO 愛藏版 5", "title_zh": "麻辣教师GTO 爱藏版 5", "cover_id": 3026924, "first_chap_id": 137806, "cover_url": "https://i.motiezw.com/cover/1690/3026924.jpg"}, {"title_hant": "麻辣教師GTO 愛藏版 6", "title_zh": "麻辣教师GTO 爱藏版 6", "cover_id": 3027287, "first_chap_id": 137825, "cover_url": "https://i.motiezw.com/cover/1690/3027287.jpg"}, {"title_hant": "麻辣教師GTO 愛藏版 7", "title_zh": "麻辣教师GTO 爱藏版 7", "cover_id": 3027660, "first_chap_id": 137844, "cover_url": "https://i.motiezw.com/cover/1690/3027660.jpg"}, {"title_hant": "麻辣教師GTO 愛藏版 8", "title_zh": "麻辣教师GTO 爱藏版 8", "cover_id": 3028025, "first_chap_id": 137862, "cover_url": "https://i.motiezw.com/cover/1690/3028025.jpg"}, {"title_hant": "麻辣教師GTO 愛藏版 9", "title_zh": "麻辣教师GTO 爱藏版 9", "cover_id": 3028378, "first_chap_id": 137881, "cover_url": "https://i.motiezw.com/cover/1690/3028378.jpg"}, {"title_hant": "麻辣教師GTO 愛藏版 10", "title_zh": "麻辣教师GTO 爱藏版 10", "cover_id": 3028744, "first_chap_id": 137901, "cover_url": "https://i.motiezw.com/cover/1690/3028744.jpg"}, {"title_hant": "麻辣教師GTO 愛藏版 11", "title_zh": "麻辣教师GTO 爱藏版 11", "cover_id": 3029112, "first_chap_id": 137918, "cover_url": "https://i.motiezw.com/cover/1690/3029112.jpg"}, {"title_hant": "麻辣教師GTO 愛藏版 12", "title_zh": "麻辣教师GTO 爱藏版 12", "cover_id": 3029498, "first_chap_id": 137936, "cover_url": "https://i.motiezw.com/cover/1690/3029498.jpg"}], "chapters": [{"cid": "137709", "title": "Lesson1 鬼塚英吉現身", "title_zh": "Lesson1 鬼冢英吉现身"}, {"cid": "137710", "title": "Lesson2 通往教師之路", "title_zh": "Lesson2 通往教师之路"}, {"cid": "137711", "title": "Lesson3 老師萬歲!", "title_zh": "Lesson3 老师万岁!"}, {"cid": "137712", "title": "Lesson4 6榻榻米大的幸福", "title_zh": "Lesson4 6榻榻米大的幸福"}, {"cid": "137713", "title": "Lesson5 想變成一匹狼", "title_zh": "Lesson5 想变成一匹狼"}, {"cid": "137714", "title": "Lesson6 霹靂教師鬼塚", "title_zh": "Lesson6 霹雳教师鬼冢"}, {"cid": "137715", "title": "Lesson7 教師任用考試?", "title_zh": "Lesson7 教师任用考试?"}, {"cid": "137716", "title": "Lesson8 公車之狼⋯?", "title_zh": "Lesson8 公车之狼⋯?"}, {"cid": "137717", "title": "Lesson9 憤怒的德國式後橋背摔", "title_zh": "Lesson9 愤怒的德国式后桥背摔"}, {"cid": "137718", "title": "Lesson10 GTO變GDO?", "title_zh": "Lesson10 GTO变GDO?"}, {"cid": "137719", "title": "Lesson11 憑著後橋背摔的威力⋯", "title_zh": "Lesson11 凭著后桥背摔的威力⋯"}, {"cid": "137720", "title": "Lesson12 鬼塚老師誕生!", "title_zh": "Lesson12 鬼冢老师诞生!"}, {"cid": "137721", "title": "Lesson13 Dancing Floor", "title_zh": "Lesson13 Dancing Floor"}, {"cid": "137722", "title": "Lesson14 像國際小霸王一樣⋯", "title_zh": "Lesson14 像国际小霸王一样⋯"}, {"cid": "137723", "title": "Lesson15 前2年4班", "title_zh": "Lesson15 前2年4班"}, {"cid": "137725", "title": "Lesson16 欺負老師", "title_zh": "Lesson16 欺负老师"}, {"cid": "137726", "title": "Lesson17 欺負導師", "title_zh": "Lesson17 欺负导师"}, {"cid": "137727", "title": "Lesson18 殺害鬼塚計劃", "title_zh": "Lesson18 杀害鬼冢计划"}, {"cid": "137728", "title": "Lesson19 電玩龍虎門", "title_zh": "Lesson19 电玩龙虎门"}, {"cid": "137729", "title": "Lesson20 跟學生的媽同樂", "title_zh": "Lesson20 跟学生的妈同乐"}, {"cid": "137730", "title": "Lesson21 恐怖的燒賣", "title_zh": "Lesson21 恐怖的烧卖"}, {"cid": "137731", "title": "Lesson22 心愛的CRESTA", "title_zh": "Lesson22 心爱的CRESTA"}, {"cid": "137733", "title": "Lesson24 I am a student!", "title_zh": "Lesson24 I am a student!"}, {"cid": "137734", "title": "Lesson25 誰是班上最有戀母Q結的人?", "title_zh": "Lesson25 谁是班上最有恋母Q结的人?"}, {"cid": "137735", "title": "Lesson26 吉祥寺保齡球大戰", "title_zh": "Lesson26 吉祥寺保龄球大战"}, {"cid": "137736", "title": "Lesson27 跨海大橋上的高空彈跳", "title_zh": "Lesson27 跨海大桥上的高空弹跳"}, {"cid": "137737", "title": "Lesson28 教師失格", "title_zh": "Lesson28 教师失格"}, {"cid": "137738", "title": "Lesson29 體育老師,人外有人天外有天", "title_zh": "Lesson29 体育老师,人外有人天外有天"}, {"cid": "137739", "title": "Lesson30 匈大無腦的朋子", "title_zh": "Lesson30 匈大无脑的朋子"}, {"cid": "137740", "title": "Lesson31 茄子和小黃瓜", "title_zh": "Lesson31 茄子和小黄瓜"}, {"cid": "137741", "title": "Lesson32 一個人玩家家酒", "title_zh": "Lesson32 一个人玩家家酒"}, {"cid": "137742", "title": "Lesson33 愛的才能", "title_zh": "Lesson33 爱的才能"}, {"cid": "137743", "title": "Lesson34 徵選會", "title_zh": "Lesson34 征选会"}, {"cid": "137745", "title": "Lesson35 明星誕生", "title_zh": "Lesson35 明星诞生"}, {"cid": "137746", "title": "Lesson36 退職勸告", "title_zh": "Lesson36 退职劝告"}, {"cid": "137747", "title": "Lesson37 內山田廣志51歲的春天", "title_zh": "Lesson37 内山田广志51岁的春天"}, {"cid": "137748", "title": "Lesson38 那小子全都曉得!", "title_zh": "Lesson38 那小子全都晓得!"}, {"cid": "137749", "title": "Lesson39 I LOVE YOU", "title_zh": "Lesson39 I LOVE YOU"}, {"cid": "137750", "title": "Lesson40 第一次拜訪", "title_zh": "Lesson40 第一次拜访"}, {"cid": "137751", "title": "Lesson41 妳比蝴蝶更M麗", "title_zh": "Lesson41 妳比蝴蝶更M丽"}, {"cid": "137752", "title": "Lesson42 昏倒,昏倒,再昏倒!", "title_zh": "Lesson42 昏倒,昏倒,再昏倒!"}, {"cid": "137753", "title": "Lesson43 ONIZUKA'S IQ", "title_zh": "Lesson43 ONIZUKA'S IQ"}, {"cid": "137754", "title": "Lesson44 夢一般的兩人生活", "title_zh": "Lesson44 梦一般的两人生活"}, {"cid": "137755", "title": "Lesson45 通往稱霸全國之路", "title_zh": "Lesson45 通往称霸全国之路"}, {"cid": "137756", "title": "Lesson46 第二個駑隸", "title_zh": "Lesson46 第二个驽隶"}, {"cid": "137758", "title": "Lesson48 考試.黑道分子.高中N生", "title_zh": "Lesson48 考试.黑道分子.高中N生"}, {"cid": "137759", "title": "Lesson49 教育指導?", "title_zh": "Lesson49 教育指导?"}, {"cid": "137760", "title": "Lesson50 學苑最大危機", "title_zh": "Lesson50 学苑最大危机"}, {"cid": "137761", "title": "Lesson51 電視英雄", "title_zh": "Lesson51 电视英雄"}, {"cid": "137762", "title": "Lesson52 一輩子的老師", "title_zh": "Lesson52 一辈子的老师"}, {"cid": "137786", "title": "Lesson53 危險的M人魚", "title_zh": "Lesson53 危险的M人鱼"}, {"cid": "137787", "title": "Lesson54 幸福的青鳥?", "title_zh": "Lesson54 幸福的青鸟?"}, {"cid": "137788", "title": "Lesson55 天真無邪的人魚公主", "title_zh": "Lesson55 天真无邪的人鱼公主"}, {"cid": "137789", "title": "Lesson56 惡魔人魚公主", "title_zh": "Lesson56 恶魔人鱼公主"}, {"cid": "137790", "title": "Lesson57 狼少N的夢想", "title_zh": "Lesson57 狼少N的梦想"}, {"cid": "137791", "title": "Lesson58 翹屁股.判決.最後⋯", "title_zh": "Lesson58 翘屁股.判决.最后⋯"}, {"cid": "137792", "title": "Lesson59 死亡遊戲", "title_zh": "Lesson59 死亡游戏"}, {"cid": "137793", "title": "Lesson60 某天的生活記事—警察冴島俊行的場合—", "title_zh": "Lesson60 某天的生活记事—警察冴岛俊行的场合—"}, {"cid": "137794", "title": "Lesson61 上等鮪魚", "title_zh": "Lesson61 上等鲔鱼"}, {"cid": "137795", "title": "Lesson62 送給恩師的禮物", "title_zh": "Lesson62 送给恩师的礼物"}]};
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>