Skip to content

armgit / peach

Public Imported from GitHub
0

Peach: Local-first video metadata scraper and media manager.

16.7 KB
Raw Blame
/* Folia wall.css 与用户截图的独立暗色表面;数值与差异见 folia-video-wall.md。 */
html[data-wall-entry] body, body[data-wall-open] { overflow:hidden; background:#070707; }
html[data-wall-entry] :is(body>header,[data-network-banner],#drawer,#main,#catalogPageHeading,#listTitle,#catalogFilter,#count,#javLibraryHeader,#feedNew),
body[data-wall-open] :is(body>header,[data-network-banner],#drawer,#main,#catalogPageHeading,#listTitle,#catalogFilter,#count,#javLibraryHeader,#feedNew) { pointer-events:none; }
/* 藏在墙后的页面仍在文档里,`visibility` 不停动画:首页筛选条那几排占位的微光、玻璃漂移照样
   逐帧走,墙静置时主线程大半耗在这些看不见的动画上。墙开着时它们停在原处,墙收起接着走。
   隐藏连同后代与伪元素一起强制:图片等待态的微光(`.imgwait::after`)自己写了
   `visibility:visible`,会从藏起的首页里透出来,墙挂上之前那几秒露出一排圆角卡。 */
:is(html[data-wall-entry] body,body[data-wall-open]) :is(body>header,[data-network-banner],#drawer,#main,#catalogPageHeading,#listTitle,#catalogFilter,#count,#javLibraryHeader,#feedNew),
:is(html[data-wall-entry] body,body[data-wall-open]) :is(body>header,[data-network-banner],#drawer,#main,#catalogPageHeading,#listTitle,#catalogFilter,#count,#javLibraryHeader,#feedNew) *,
:is(html[data-wall-entry] body,body[data-wall-open]) :is(body>header,[data-network-banner],#drawer,#main,#catalogPageHeading,#listTitle,#catalogFilter,#count,#javLibraryHeader,#feedNew) *::before,
:is(html[data-wall-entry] body,body[data-wall-open]) :is(body>header,[data-network-banner],#drawer,#main,#catalogPageHeading,#listTitle,#catalogFilter,#count,#javLibraryHeader,#feedNew) *::after { visibility:hidden !important; animation-play-state:paused !important; }
.peach-react [data-video-wall] {
  --ground:#070707; --surface:#161419; --ink:#f7f4ee; --ink-2:#f7f4ee; --muted:#aaa7a2;
  --hover:rgba(255,255,255,.08); --line-soft:rgba(255,255,255,.22);
  --color-button-ghost-background:transparent; --color-button-ghost-foreground:#f7f4ee;
  --color-button-ghost-hover:rgba(255,255,255,.08); --color-button-ghost-active:rgba(255,255,255,.12);
  --color-background-primary-default:#070707; --color-background-secondary-default:#161419;
  --color-background-tertiary-default:rgba(255,255,255,.1);
  --color-text-primary:#f7f4ee; --color-text-secondary:#aaa7a2; --color-border-button-default:rgba(255,255,255,.22);
  --gradient-button-primary-default:linear-gradient(#f7f4ee,#f7f4ee);
  --gradient-button-primary-hover:linear-gradient(#fff,#fff);
  --gradient-button-primary-active:var(--gradient-button-primary-default);
  position:fixed; inset:0; width:100%; height:100dvh; overflow:hidden;
  z-index:calc(var(--layer-miniplayer) - 1); isolation:isolate; background:var(--ground); color:var(--ink);
}
.peach-react [data-video-wall][hidden] { display:none; }
.peach-react [data-video-wall]::after {
  content:''; position:absolute; inset:0; z-index:4; pointer-events:none;
  background:radial-gradient(ellipse at center,transparent 78%,rgba(0,0,0,.52) 100%);
}
.peach-react [data-wall-viewport] { position:absolute; inset:0; overflow:hidden; touch-action:none; cursor:grab; }
.peach-react [data-wall-viewport]:active { cursor:grabbing; }
.peach-react [data-wall-viewport]:focus-visible { outline:2px solid var(--ink); outline-offset:-2px; }
.peach-react [data-wall-world] { position:absolute; inset:0; transform-origin:0 0; }
.peach-react [data-video-wall][data-refreshing] [data-wall-viewport] { filter:blur(8px) grayscale(1); pointer-events:none; }
.peach-react [data-wall-skeleton] { position:absolute; display:block; left:var(--wall-left); top:var(--wall-top); width:var(--wall-width); height:var(--wall-height); background:rgba(247,244,238,.06); }
.peach-react :is([data-wall-error],[data-wall-empty]) { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:min(420px,calc(100% - 48px)); z-index:7; }
.peach-react [data-wall-error] { display:flex; flex-direction:column; gap:12px; }
.peach-react [data-wall-tile] {
  left:var(--wall-left); top:var(--wall-top); width:var(--wall-width); height:var(--wall-height);
  position:absolute; display:block; overflow:hidden; border:0; padding:0; border-radius:0;
  background:var(--surface); color:var(--ink); text-align:left; cursor:inherit; user-select:none;
  contain:layout paint; transition:filter 600ms ease,box-shadow 600ms ease;
}
@media (hover:hover) and (pointer:fine) {
  .peach-react [data-wall-tile]:not([data-wall-focus]):hover { z-index:3; filter:saturate(1.08) brightness(1.05); }
}
.peach-react [data-wall-tile]:focus-visible { z-index:4; outline:2px solid var(--ink); outline-offset:-2px; }
.peach-react [data-video-wall] :is([data-media-pic],[data-media-art]) { position:absolute; inset:0; display:block; overflow:hidden; }
.peach-react [data-video-wall] [data-media-pic] { --pic-radius:0; clip-path:inset(0); }
.peach-react [data-video-wall] [data-media-pic]::before {
  content:''; position:absolute; inset:-20px; background:var(--cover-blur) center/cover no-repeat;
  filter:blur(20px); opacity:.7; pointer-events:none;
}
.peach-react [data-wall-tile] img { pointer-events:none; border-radius:0; }
.peach-react [data-wall-tile] img[class~="whole"] { object-fit:cover; object-position:var(--cover-x,50%) var(--cover-y,22%); }
.peach-react [data-wall-tile] [data-media-art="thumb"] img { display:block; width:100%; height:100%; object-fit:cover; object-position:50% 22%; }
.peach-react [data-wall-tile-shade] { position:absolute; inset:0; pointer-events:none; background:linear-gradient(180deg,rgba(0,0,0,.05) 34%,rgba(0,0,0,.24) 56%,rgba(0,0,0,.92) 100%); }
.peach-react [data-wall-dim] { position:absolute; inset:0; background:#000; pointer-events:none; }
.peach-react [data-wall-copy] {
  position:absolute; inset:auto 0 0; padding:13px; display:flex; flex-direction:column; gap:4px;
  color:var(--ink); pointer-events:none;
}
.peach-react [data-wall-copy] b {
  font-size:calc(clamp(22px,2vw,36px) * .76); font-weight:600; line-height:.96; letter-spacing:-.045em;
  margin-block:-.14em; padding-block:.14em; text-wrap:balance;
  overflow:hidden; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow-wrap:anywhere;
}
.peach-react [data-wall-copy] > span { font-size:10px; font-weight:600; opacity:.78; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.peach-react [data-wall-number], .peach-react [data-wall-duration] {
  position:absolute; top:12px; background:rgba(0,0,0,.66); color:var(--ink); border-radius:0; padding:3px 6px;
  font-size:11px; font-weight:600; font-variant-numeric:tabular-nums;
}
.peach-react [data-wall-number] { left:12px; }
.peach-react [data-wall-duration] { right:12px; }
.peach-react [data-wall-progress] { position:absolute; bottom:0; left:0; height:2px; width:var(--wall-progress); background:var(--ink); }
.peach-react [data-wall-no-art] { position:absolute; inset:0; display:grid; place-items:center; color:var(--muted); font-size:var(--fs-sm); }
/* 左上角一排:返回、换一批、图片切换、搜索,筛选提示接在后面,一行放不下就换行。
   整条横跨顶部,自己不接指针,免得挡住下面那一排磁贴。 */
.peach-react [data-wall-bar] {
  position:absolute; z-index:30; left:24px; right:24px; top:calc(24px + env(safe-area-inset-top));
  display:flex; flex-wrap:wrap; align-items:center; gap:8px; pointer-events:none;
}
.peach-react [data-wall-bar] > * { flex:none; pointer-events:auto; }
.peach-react :is([data-wall-back],[data-wall-round],[data-wall-refresh] button) {
  display:grid; place-items:center; width:44px; height:44px; padding:0;
  border:0; border-radius:50%; background:rgba(40,40,40,.78); color:var(--ink); backdrop-filter:blur(14px); cursor:pointer;
}
.peach-react :is([data-wall-back],[data-wall-round],[data-wall-refresh] button):hover { background:rgba(70,70,70,.88); }
.peach-react :is([data-wall-back],[data-wall-round],[data-wall-refresh] button):focus-visible { outline:2px solid var(--ink); outline-offset:3px; }
.peach-react :is([data-wall-back],[data-wall-round],[data-wall-refresh] button) svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.peach-react [data-wall-bar] > [data-wall-filter-notice] { flex:1 1 260px; min-width:0; }
.peach-react [data-wall-image][aria-pressed="true"] { background:var(--ink); color:var(--ground); }
.peach-react [data-wall-image][aria-pressed="true"]:hover { background:#fff; }
/* 搜索点开后在本行内向右伸成输入框(最宽 320px,窄屏占满剩余),放大镜留在原位变成提交键。
   宽度靠 `max-width` 过渡:Chrome 不给从 0 起的 `flex-grow` 插值,那样写会一下子跳开。
   基准宽度为 0、常驻伸展,换行判断只按 44px 算,窄屏不会被挤到第二行。 */
.peach-react [data-wall-bar] > [data-wall-search] {
  display:flex; flex:1 1 0; min-width:44px; max-width:44px; height:44px; overflow:hidden;
  border-radius:22px; background:rgba(40,40,40,.78); color:var(--ink); backdrop-filter:blur(14px);
  transition:max-width 260ms cubic-bezier(.22,1,.36,1);
}
.peach-react [data-wall-bar] > [data-wall-search][data-open] { max-width:320px; }
.peach-react [data-wall-search] [data-wall-round] { flex:none; background:transparent; backdrop-filter:none; }
.peach-react [data-wall-search] input {
  flex:1; min-width:0; height:100%; padding:0 18px 0 2px; border:0; border-radius:0; outline:0; background:transparent; color:var(--ink); font:inherit; font-size:14px;
}
.peach-react [data-wall-search] input::placeholder { color:var(--muted); }
.peach-react [data-wall-search] input::-webkit-search-cancel-button { appearance:none; }
.peach-react [data-wall-search]:has(input:focus-visible) { outline:2px solid var(--ink); outline-offset:3px; }
@media (prefers-reduced-motion:reduce) { .peach-react [data-wall-bar] > [data-wall-search] { transition:none; } }
.peach-react [data-wall-footer] { position:absolute; left:24px; bottom:calc(24px + env(safe-area-inset-bottom)); z-index:5; }
.peach-react [data-wall-focus] {
  display:flex; flex-direction:column; z-index:20; cursor:default;
  background:var(--surface); border:1px solid rgba(247,244,238,.72); border-radius:0;
  box-shadow:0 42px 110px rgba(0,0,0,.74); isolation:isolate;
}
.peach-react [data-wall-focus]::before {
  content:''; position:absolute; inset:0; z-index:6; pointer-events:none; border:2px solid var(--ink);
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.52),inset 0 0 0 3px transparent,inset 0 0 15px -7px color-mix(in srgb,var(--ink) 46%,transparent);
}
.peach-react [data-wall-focus]:focus-within::before {
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.62),inset 0 0 0 3px transparent,inset 0 0 26px -6px color-mix(in srgb,var(--ink) 62%,transparent);
}
.peach-react [data-wall-focus-backdrop] { position:absolute; inset:-30px; z-index:-1; opacity:.46; filter:blur(36px) saturate(.3); }
.peach-react [data-wall-focus-backdrop] img { width:100%; height:100%; object-fit:cover; }
.peach-react [data-wall-scene] { position:absolute; inset:0; }
.peach-react [data-wall-focus][data-playing] [data-wall-scene] { filter:blur(36px); transform:scale(1.1); }
.peach-react [data-wall-expanded-shade] { position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(0deg,rgba(0,0,0,.86) 0%,rgba(0,0,0,.62) 14%,rgba(0,0,0,.26) 30%,transparent 46%),linear-gradient(90deg,rgba(0,0,0,.88),rgba(0,0,0,.5) 52%,rgba(0,0,0,.08)); }
.peach-react [data-wall-focus-head] { position:absolute; left:24px; right:24px; bottom:116px; display:flex; flex-direction:column; gap:7px; pointer-events:none; }
.peach-react [data-wall-focus-head] b { --wall-code-size:calc(clamp(48px,6vw,82px) * .76); max-width:76%; font-size:var(--wall-code-fit,var(--wall-code-size)); font-weight:600; line-height:.95; letter-spacing:-.045em; display:block; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.peach-react [data-wall-focus-head] strong { max-width:90%; font-size:16px; font-weight:500; line-height:1.3; display:block; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.peach-react [data-wall-focus-head] :is(span,small) { font-size:13px; opacity:.8; overflow-wrap:anywhere; }
.peach-react [data-wall-focus][data-playing] [data-wall-focus-head] { top:64px; bottom:auto; gap:5px; }
.peach-react [data-wall-focus][data-playing] [data-wall-focus-head] b { --wall-code-size:22px; line-height:1.1; letter-spacing:-.025em; }
.peach-react [data-wall-focus][data-playing] [data-wall-focus-head] strong { font-size:14px; }
.peach-react [data-wall-focus-close] { position:absolute; top:16px; right:16px; z-index:3; }
.peach-react [data-wall-player] { position:absolute; inset:0; width:100%; height:100%; }
.peach-react [data-wall-player][hidden] { display:none; }
.peach-react [data-wall-player] .video-js { width:100%; height:100%; background:transparent; }
.peach-react [data-wall-player] :is(.vjs-control-bar,.vjs-big-play-button,.vjs-title-bar) { display:none; }
.peach-react [data-wall-player] :is([data-player-stats-button],[data-player-net],[data-player-stats]) { display:none; }
.peach-react [data-wall-focus-actions] { position:absolute; bottom:22px; left:24px; right:18px; display:flex; flex-direction:column; gap:10px; z-index:3; }
.peach-react [data-wall-control-row] { display:flex; align-items:center; gap:6px; }
.peach-react [data-wall-time] { margin-left:auto; font-size:11px; font-variant-numeric:tabular-nums; white-space:nowrap; opacity:.78; }
.peach-react [data-wall-seek] { appearance:none; width:100%; height:2px; border:0; border-radius:0; padding:0; margin:0; cursor:pointer; background:linear-gradient(to right,var(--ink) var(--wall-seek),rgba(247,244,238,.28) var(--wall-seek)); }
.peach-react [data-wall-seek]::-webkit-slider-thumb { appearance:none; width:8px; height:8px; border-radius:50%; background:var(--ink); }
.peach-react [data-wall-seek]::-moz-range-thumb { width:8px; height:8px; border:0; border-radius:50%; background:var(--ink); }
.peach-react [data-wall-play-error] { position:absolute; bottom:85px; left:24px; right:24px; z-index:4; }
.peach-react [data-wall-queue] { position:absolute; left:24px; right:24px; bottom:88px; max-height:58%; z-index:5; display:flex; overflow:hidden; background:rgba(7,7,7,.94); backdrop-filter:blur(24px); border:1px solid var(--line-soft); }
.peach-react [data-wall-queue] [data-mix-queue] { width:100%; min-height:0; max-height:100%; height:auto; border:0; background:transparent; display:grid; grid-template-rows:auto minmax(0,1fr); }
.peach-react [data-wall-queue] [data-mix-list] { display:block; overflow:auto; overscroll-behavior:contain; }
.peach-react [data-wall-queue] [data-mix-item-text] { display:flex; flex-direction:column; align-items:flex-start; gap:4px; min-width:0; }
.peach-react [data-wall-queue] [data-mix-item-text] b { max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.peach-react [data-wall-queue] [data-mix-item-text] span { font-size:12px; opacity:.78; }
.peach-react [data-wall-queue] :is([data-mix-row],[data-mix-item]) { border-radius:0; }
.peach-react :is([data-wall-focus-actions] button,[data-wall-focus-close]) {
  display:grid; place-items:center; width:36px; height:36px; padding:6px; border:0; border-radius:0; background:transparent; color:var(--ink); cursor:pointer;
}
.peach-react :is([data-wall-focus-actions] button,[data-wall-focus-close]):hover { background:var(--hover); }
.peach-react button[data-wall-focus-close] { border-radius:50%; background:rgba(0,0,0,.66); }
.peach-react button[data-wall-focus-close]:hover { background:rgba(0,0,0,.86); }
.peach-react :is([data-wall-focus-actions] button,[data-wall-focus-close]):focus-visible { outline:2px solid var(--ink); outline-offset:2px; }
.peach-react :is([data-wall-focus-actions] button,[data-wall-focus-close]) svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.peach-react [data-wall-pause] svg { fill:currentColor; stroke:none; }
.peach-react [data-wall-focus-actions] button:disabled { opacity:.5; cursor:default; }
.peach-react [data-wall-footer] button { background:rgba(40,40,40,.78); color:var(--ink); border-color:var(--line-soft); }
@media (max-width:640px) {
  .peach-react [data-wall-bar] { left:16px; right:16px; top:calc(16px + env(safe-area-inset-top)); }
  .peach-react [data-wall-filter-notice] { padding-inline:12px; }
  .peach-react [data-wall-search] input { font-size:16px; }
  .peach-react [data-wall-focus-head] { left:16px; right:16px; bottom:104px; }
  .peach-react [data-wall-focus-head] b { --wall-code-size:34px; }
  .peach-react [data-wall-focus-head] strong { font-size:14px; }
  .peach-react [data-wall-focus-actions] { left:16px; right:16px; bottom:18px; }
  .peach-react [data-wall-control-row] { gap:2px; }
  .peach-react [data-wall-time] { font-size:10px; }
  .peach-react [data-wall-footer] { left:16px; bottom:calc(16px + env(safe-area-inset-bottom)); }
}