MangaParty: self-hosted manga/comic/webtoon reader
Zero-dependency Node server + plain HTML/JS frontend. - Library is a folder tree (Manga/Book/Chapter/pages), indexed in place; page roles (cover, double, extra, rotation) are file name tags - Accounts with per-user progress, reading settings, follows and new-chapter notifications (in-app + optional webhook) - Reader with Flow, Page and Book modes, pointer-anchored page zoom, tap zones, auto-hiding controls, chapter picker, page preloading - Multiple versions per chapter with community votes - Docker image and compose file - Demo library generator (tools/make-dummy.js) - Docs: architecture, library format, import, scraper guide
This commit is contained in:
commit
8dd776b7f4
29 files changed
+3499
No files matched your search
+175
@@ -0,0 +1,175 @@
|
||||
:root {
|
||||
--bg: #121214; --fg: #e9e9ec; --muted: #9b9ba4; --card: #1d1d22; --card2: #26262c; --line: #2d2d34; --accent: #e0566a;
|
||||
color-scheme: dark;
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
html { -webkit-text-size-adjust: 100%; }
|
||||
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
|
||||
a { color: inherit; }
|
||||
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 6px; }
|
||||
[hidden] { display: none !important; }
|
||||
.muted { color: var(--muted); }
|
||||
.small { font-size: 13px; }
|
||||
.error { color: #ff8a8a; }
|
||||
.grow { flex: 1; min-width: 0; }
|
||||
|
||||
.btn {
|
||||
display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 12px;
|
||||
border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font: inherit;
|
||||
text-decoration: none; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
.btn:hover { background: var(--card2); }
|
||||
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
|
||||
.btn.on { border-color: var(--accent); color: #ffb3bd; }
|
||||
.btn.small { min-height: 28px; padding: 2px 9px; font-size: 13px; }
|
||||
.btn.icon { padding: 6px 9px; }
|
||||
.btn[disabled], .btn.disabled { opacity: .4; pointer-events: none; }
|
||||
input, select, textarea { font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-height: 36px; max-width: 100%; }
|
||||
label { display: block; }
|
||||
|
||||
/* navigation */
|
||||
.nav {
|
||||
position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px;
|
||||
padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); background: rgba(18, 18, 20, .94); border-bottom: 1px solid var(--line);
|
||||
}
|
||||
.brand { font-weight: 800; text-decoration: none; font-size: 17px; letter-spacing: .2px; }
|
||||
.bell-wrap { position: relative; }
|
||||
.bell .count { background: var(--accent); color: #fff; border-radius: 9px; font-size: 12px; font-weight: 700; padding: 0 6px; }
|
||||
.panel {
|
||||
position: absolute; right: 0; top: 44px; width: min(360px, 92vw); max-height: 70vh; overflow: auto; z-index: 20;
|
||||
background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
|
||||
}
|
||||
.panel p { margin: 8px; }
|
||||
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 8px; }
|
||||
.note { display: block; padding: 8px; border-radius: 8px; text-decoration: none; }
|
||||
.note:hover { background: var(--card2); }
|
||||
.note.unread { border-left: 3px solid var(--accent); }
|
||||
|
||||
main { max-width: 1200px; margin: 0 auto; padding: 16px; }
|
||||
|
||||
/* library */
|
||||
.toolbar { display: flex; gap: 8px; margin-bottom: 16px; }
|
||||
.toolbar input { flex: 1; min-width: 0; }
|
||||
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 22px 16px; }
|
||||
.tile { position: relative; display: block; text-decoration: none; }
|
||||
.tile .cv { aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--card); box-shadow: 0 3px 14px rgba(0, 0, 0, .45); }
|
||||
.tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
|
||||
.tile:hover img { transform: scale(1.03); }
|
||||
.tile .t { margin-top: 7px; font-weight: 650; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
|
||||
.tile .s { color: var(--muted); font-size: 13px; }
|
||||
.prog { height: 3px; background: var(--line); border-radius: 2px; margin-top: 5px; overflow: hidden; }
|
||||
.prog i { display: block; height: 100%; background: var(--accent); }
|
||||
.badge { position: absolute; top: 7px; right: 7px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
|
||||
.empty { text-align: center; padding: 60px 10px; }
|
||||
@media (max-width: 560px) {
|
||||
main { padding: 12px; }
|
||||
.grid { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
|
||||
.nav { padding-left: 12px; padding-right: 12px; }
|
||||
}
|
||||
|
||||
/* manga page */
|
||||
.hero { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 22px; }
|
||||
.hero > img { width: 220px; flex: none; border-radius: 10px; box-shadow: 0 4px 18px rgba(0, 0, 0, .5); background: var(--card); }
|
||||
.hero .info { min-width: 0; }
|
||||
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
|
||||
.chip { background: var(--card2); border-radius: 12px; padding: 1px 9px; font-size: 13px; }
|
||||
.desc { white-space: pre-line; margin: 10px 0; }
|
||||
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
|
||||
.sources a { margin-right: 10px; }
|
||||
@media (max-width: 640px) {
|
||||
.hero { flex-direction: column; align-items: center; text-align: center; }
|
||||
.hero > img { width: 180px; }
|
||||
.chips, .actions { justify-content: center; }
|
||||
}
|
||||
.chapters { border-top: 1px solid var(--line); }
|
||||
.book-sep { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding: 16px 4px 6px; }
|
||||
.ch { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
|
||||
.ch-main { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: baseline; padding: 12px 4px; text-decoration: none; }
|
||||
.ch-main:hover .ch-title { text-decoration: underline; }
|
||||
.ch-label { font-weight: 650; flex: none; }
|
||||
.ch-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.ch.read .ch-main { color: var(--muted); }
|
||||
.tag { font-size: 11px; border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; color: var(--muted); flex: none; }
|
||||
.state { color: var(--muted); font-size: 13px; background: none; border: 0; cursor: pointer; padding: 6px; font: inherit; font-size: 13px; }
|
||||
.state.done { color: #7fd3a0; }
|
||||
.versions { background: var(--card); border-radius: 8px; margin: 4px 0 10px; padding: 4px 10px; }
|
||||
.ver { display: flex; align-items: center; gap: 10px; padding: 7px 0; flex-wrap: wrap; }
|
||||
.ver + .ver { border-top: 1px solid var(--line); }
|
||||
.ver .src { flex: 1; min-width: 140px; }
|
||||
.vote { display: inline-flex; align-items: center; gap: 4px; }
|
||||
.vote button { background: var(--card2); border: 1px solid var(--line); color: var(--fg); border-radius: 6px; width: 30px; height: 28px; cursor: pointer; }
|
||||
.vote button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
|
||||
.vote b { min-width: 22px; text-align: center; }
|
||||
|
||||
/* settings & login */
|
||||
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; max-width: 720px; }
|
||||
.card h2 { margin: 0 0 12px; font-size: 18px; }
|
||||
.field { margin-bottom: 14px; }
|
||||
.field > span { display: block; font-weight: 600; margin-bottom: 4px; }
|
||||
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
|
||||
.check input { min-height: 0; margin-top: 4px; }
|
||||
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
|
||||
.users div { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
|
||||
.login { max-width: 360px; margin: 12vh auto 0; }
|
||||
.login input { width: 100%; }
|
||||
.saved { color: #7fd3a0; font-size: 13px; }
|
||||
|
||||
/* ---------------- reader ---------------- */
|
||||
body.reader { position: fixed; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; background: #0b0b0c; overscroll-behavior: none; }
|
||||
#stage {
|
||||
position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow: auto; outline: none;
|
||||
touch-action: pan-x pan-y; /* pinch is handled by the reader so it zooms the pages, not the controls */
|
||||
-webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
|
||||
overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #3a3a40 transparent;
|
||||
}
|
||||
#stage.pan { cursor: grab; }
|
||||
#stage.drag { cursor: grabbing; }
|
||||
#canvas { position: relative; }
|
||||
.pg { position: absolute; overflow: hidden; background: #19191c; }
|
||||
.pg img { display: block; width: 100%; height: 100%; -webkit-user-drag: none; }
|
||||
.pg.rot img { position: absolute; left: 50%; top: 50%; max-width: none; }
|
||||
/* still loading: a spinner that only appears after 150 ms, so fast loads never flash it */
|
||||
.pg.loading::after {
|
||||
content: ''; position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px;
|
||||
border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--accent); border-radius: 50%;
|
||||
opacity: 0; animation: mp-spin .8s linear infinite, mp-show 0s .15s forwards;
|
||||
}
|
||||
.pg.failed::after {
|
||||
content: 'This page could not be loaded'; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
|
||||
display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; text-align: center;
|
||||
}
|
||||
.pg.failed img { visibility: hidden; }
|
||||
@keyframes mp-spin { to { transform: rotate(360deg); } }
|
||||
@keyframes mp-show { to { opacity: 1; } }
|
||||
.loading { color: var(--muted); padding: 40px; text-align: center; }
|
||||
.end { position: absolute; left: 0; right: 0; display: flex; align-items: center; justify-content: center; }
|
||||
#canvas.page .end, #canvas.book .end { top: 0; bottom: 0; }
|
||||
.endbox { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; padding: 20px; }
|
||||
|
||||
.bar {
|
||||
position: fixed; left: 0; right: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
|
||||
padding: 6px max(8px, env(safe-area-inset-right)) 6px max(8px, env(safe-area-inset-left));
|
||||
background: rgba(14, 14, 16, .9); color: var(--fg); transition: transform .2s, opacity .2s;
|
||||
}
|
||||
#top { top: 0; padding-top: max(6px, env(safe-area-inset-top)); }
|
||||
#bot { bottom: 0; padding-bottom: max(6px, env(safe-area-inset-bottom)); }
|
||||
body.nobars #top { transform: translateY(-100%); opacity: 0; pointer-events: none; }
|
||||
body.nobars #bot { transform: translateY(100%); opacity: 0; pointer-events: none; }
|
||||
#title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
|
||||
#chsel { flex: 0 1 auto; min-width: 0; max-width: min(440px, 60vw); }
|
||||
#bot .row { width: 100%; flex-wrap: nowrap; }
|
||||
#slider { flex: 1; min-width: 0; accent-color: var(--accent); padding: 0; border: 0; background: none; }
|
||||
#pageno { min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
|
||||
#tools { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 8px; }
|
||||
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
|
||||
.seg button { background: var(--card); color: var(--fg); border: 0; padding: 7px 12px; font: inherit; cursor: pointer; }
|
||||
.seg button + button { border-left: 1px solid var(--line); }
|
||||
.seg button.on { background: var(--accent); color: #fff; }
|
||||
.seg button.meh:not(.on) { color: var(--muted); }
|
||||
#ver { max-width: 170px; }
|
||||
#toast {
|
||||
position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 30; pointer-events: none;
|
||||
background: rgba(0, 0, 0, .75); color: #fff; padding: 9px 16px; border-radius: 10px; opacity: 0; transition: opacity .25s; text-align: center;
|
||||
}
|
||||
#toast.show { opacity: 1; }
|
||||
@media (max-width: 560px) { .seg button { padding: 7px 10px; } #bot .btn { padding: 6px 10px; } .wide-only { display: none; } }
|
||||
Reference in new issue
Block a user