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>随兴旅 -That's Journey- - 在线漫画阅读器</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-1406", "mangaid": "1406", "zh_title": "随兴旅 -That's Journey-", "hant_title": "隨興旅 -That's Journey-", "en_title": "随兴旅 -That's Journey- (Bilimanga #1406)", "author": "石坂ケンタ", "tags": ["旅行", "日常", "治愈", "欢乐", "治愈温馨", "日本漫画", "漫画", "日漫"], "zh_desc": "根据主角铃森小姐在推特上举办票选活动,并且据此出发旅行的实际经验,由石坂ケンタ绘制而成的漫画版故事\n\r\n期盼成为漫画家的大学生--铃森千花,\n\r\n虽然获得新人奖,却为了迟迟无法获得连载机会而苦恼。\n\r\n于是,她萌生了「好想去旅行」的念头,\n\r\n并且在社群网站上随性地举办了旅行地点的票选活动,\n\r\n没想到投票人数多到超乎想像,搞得自己下不了台阶!\n\r\n本书乃是描述对地理和历史都茫茫然的千花,\n\r\n进行毫无计划的随性之旅,\n\r\n以及旅途中意想不到的邂逅……\n\n📚 作品信息:作者 石坂ケンタ · 评分 10 · 共收录 6 卷 / 32 话章节目录与高清彩页/条漫预览。", "hant_desc": "根據主角鈴森小姐在推特上舉辦票選活動,並且據此出發旅行的實際經驗,由石坂ケンタ繪製而成的漫畫版故事\n\r\n期盼成為漫畫家的大學生--鈴森千花,\n\r\n雖然獲得新人獎,卻為了遲遲無法獲得連載機會而苦惱。\n\r\n於是,她萌生了「好想去旅行」的念頭,\n\r\n並且在社群網站上隨性地舉辦了旅行地點的票選活動,\n\r\n沒想到投票人數多到超乎想像,搞得自己下不了台階!\n\r\n本書乃是描述對地理和歷史都茫茫然的千花,\n\r\n進行毫無計畫的隨性之旅,\n\r\n以及旅途中意想不到的邂逅……\n\n📚 作品資訊:作者 石坂ケンタ · 評分 10 · 共收錄 6 卷 / 32 話章節目錄與高清彩頁/條漫預覽。", "en_desc": "Popular serialized manga '随兴旅 -That's Journey-' (隨興旅 -That's Journey-) by 石坂ケンタ. Includes 6 volumes and 32 chapters with full online vertical/page-flip web reader.", "pages": ["https://media.huangguodrama.ai/motion/comics/bilimanga-1406/page_01.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1406/page_02.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1406/page_03.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1406/page_04.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1406/page_05.jpg", "https://media.huangguodrama.ai/motion/comics/bilimanga-1406/page_06.jpg"], "volumes": [{"title_hant": "隨興旅 -That's Journey- 1", "title_zh": "随兴旅 -That's Journey- 1", "cover_id": 2525571, "first_chap_id": 116347, "cover_url": "https://i.motiezw.com/cover/1406/2525571.jpg"}, {"title_hant": "隨興旅 -That's Journey- 2", "title_zh": "随兴旅 -That's Journey- 2", "cover_id": 2525734, "first_chap_id": 116353, "cover_url": "https://i.motiezw.com/cover/1406/2525734.jpg"}, {"title_hant": "隨興旅 -That's Journey- 3", "title_zh": "随兴旅 -That's Journey- 3", "cover_id": 2525897, "first_chap_id": 116360, "cover_url": "https://i.motiezw.com/cover/1406/2525897.jpg"}, {"title_hant": "隨興旅 -That's Journey- 4", "title_zh": "随兴旅 -That's Journey- 4", "cover_id": 2526059, "first_chap_id": 116367, "cover_url": "https://i.motiezw.com/cover/1406/2526059.jpg"}, {"title_hant": "隨興旅 -That's Journey- 5", "title_zh": "随兴旅 -That's Journey- 5", "cover_id": 2526224, "first_chap_id": 116375, "cover_url": "https://i.motiezw.com/cover/1406/2526224.jpg"}, {"title_hant": "隨興旅 -That's Journey- 6", "title_zh": "随兴旅 -That's Journey- 6", "cover_id": 2526367, "first_chap_id": 116382, "cover_url": "https://i.motiezw.com/cover/1406/2526367.jpg"}], "chapters": [{"cid": "116347", "title": "第1旅 最初的1225階", "title_zh": "第1旅 最初的1225阶"}, {"cid": "116348", "title": "第2旅 金絮其外,金絮其中", "title_zh": "第2旅 金絮其外,金絮其中"}, {"cid": "116349", "title": "第3旅 新鮮的雙人之旅", "title_zh": "第3旅 新鲜的双人之旅"}, {"cid": "116350", "title": "第4旅 就保持這樣的韌悻", "title_zh": "第4旅 就保持这样的韧悻"}, {"cid": "116351", "title": "附錄漫畫", "title_zh": "附录漫画"}, {"cid": "116353", "title": "第5旅 呼,By The Sea", "title_zh": "第5旅 呼,By The Sea"}, {"cid": "116354", "title": "第6旅 烏鴉龍與蕎麥的下一步", "title_zh": "第6旅 乌鸦龙与荞麦的下一步"}, {"cid": "116355", "title": "第7旅 第一次的離島體驗", "title_zh": "第7旅 第一次的离岛体验"}, {"cid": "116356", "title": "第8旅 能邂逅神明的城市?", "title_zh": "第8旅 能邂逅神明的城市?"}, {"cid": "116357", "title": "第9旅(前編) 三人聚首⋯⋯搭巴士?", "title_zh": "第9旅(前编) 三人聚首⋯⋯搭巴士?"}, {"cid": "116358", "title": "附錄漫畫", "title_zh": "附录漫画"}, {"cid": "116360", "title": "第9旅(後篇) 三個N人真和氣", "title_zh": "第9旅(后篇) 三个N人真和气"}, {"cid": "116361", "title": "第10旅 溫泉樂無窮", "title_zh": "第10旅 温泉乐无穷"}, {"cid": "116362", "title": "第11旅 一年的結束與開始", "title_zh": "第11旅 一年的结束与开始"}, {"cid": "116363", "title": "第12旅 心中的故鄉", "title_zh": "第12旅 心中的故乡"}, {"cid": "116364", "title": "第13旅(前篇) 與師父的半吊子參拜", "title_zh": "第13旅(前篇) 与师父的半吊子参拜"}, {"cid": "116365", "title": "附錄漫畫", "title_zh": "附录漫画"}, {"cid": "116367", "title": "第13旅(後篇) 與師傅的半吊子參拜", "title_zh": "第13旅(后篇) 与师傅的半吊子参拜"}, {"cid": "116368", "title": "番外旅 烏龍麵與學妹", "title_zh": "番外旅 乌龙面与学妹"}, {"cid": "116369", "title": "特別收錄單篇 我最討厭的學姊", "title_zh": "特别收录单篇 我最讨厌的学姊"}, {"cid": "116371", "title": "第14旅 真的在東京都內", "title_zh": "第14旅 真的在东京都内"}, {"cid": "116372", "title": "第15旅 不在身邊也親密無間", "title_zh": "第15旅 不在身边也亲密无间"}, {"cid": "116373", "title": "附錄漫畫", "title_zh": "附录漫画"}, {"cid": "116375", "title": "第16旅(前編) 新的旅程", "title_zh": "第16旅(前编) 新的旅程"}, {"cid": "116376", "title": "第16旅(後編) 今天能做的事Q!", "title_zh": "第16旅(后编) 今天能做的事Q!"}, {"cid": "116377", "title": "第17旅(前編) 第一次來到九州", "title_zh": "第17旅(前编) 第一次来到九州"}, {"cid": "116378", "title": "第17旅(後編) 直到到家前都要注意安全", "title_zh": "第17旅(后编) 直到到家前都要注意安全"}, {"cid": "116379", "title": "第18旅 偶爾像那個節目一樣", "title_zh": "第18旅 偶尔像那个节目一样"}, {"cid": "116380", "title": "附錄", "title_zh": "附录"}, {"cid": "116382", "title": "第19旅(前編) 兜風之旅即將開始⋯?", "title_zh": "第19旅(前编) 兜风之旅即将开始⋯?"}, {"cid": "116383", "title": "第19旅(後編) 讓人回憶的群馬", "title_zh": "第19旅(后编) 让人回忆的群马"}, {"cid": "116384", "title": "第20旅(前編) 為了站到前人所在之地", "title_zh": "第20旅(前编) 为了站到前人所在之地"}]};
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>