Files
CoRE.Vision/frontend/static/mobile.css
T
git_admin f263d84a8d player: extract branded .pjs player into shared static/player.{js,css}
One source of truth for the branded player on desktop (archive) and
mobile. The ArchivePlayer class moves out of app.js into player.js
(name kept; app.js still does `new ArchivePlayer`); the .pjs styles
move out of style.css into player.css. Both archive.html and mobile.html
load the shared module before their own script.

The shared player gains two additive, backward-compatible options:
- live: timeline hidden, only pause/play + fullscreen (mobile Live).
- autohide:false: control bar always visible (touch); desktop keeps
  autohide (default true), so desktop archive behaves exactly as before.
Fullscreen is now self-contained (no global toggleFullscreen dep) so it
works on mobile too, with an iOS <video> fallback.

mobile.js drops its duplicated Player class and uses ArchivePlayer.

Verified on .79: /archive 200 loads player.{js,css}; app.js has no
class def; mobile (Host :8443) loads the shared module.

VERSION 0.0.154 -> 0.0.155

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 00:28:04 +05:00

79 lines
4.2 KiB
CSS

/* CoRE.Vizion+ — мобильный dashboard (отдельный порт). Тёмная тема, бутерброд-меню, фирменный плеер. */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
margin: 0; height: 100%; background: #0f1115; color: #e6e9ef;
font: 15px/1.4 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
overflow: hidden;
}
.m-app { display: flex; flex-direction: column; height: 100%; }
/* ── шапка с бутербродом ── */
.m-head {
height: 48px; flex: none; display: flex; align-items: center; gap: 10px;
padding: 0 8px; background: #161a22; border-bottom: 1px solid #272d3a;
position: relative; z-index: 30;
}
.m-burger { background: none; border: 0; color: #e6e9ef; font-size: 22px; line-height: 1; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.m-burger:active { background: #1d2230; }
.m-title { font-weight: 600; font-size: 16px; letter-spacing: .3px; }
.m-brand { font-weight: 700; font-size: 17px; letter-spacing: .3px; }
.m-brand span { color: #c0392b; }
/* ── бутерброд-меню: боковая шторка + затемнение ── */
.m-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 40; }
.m-scrim[hidden] { display: none; }
.m-drawer {
position: fixed; top: 0; left: 0; bottom: 0; width: 240px; max-width: 80vw; z-index: 50;
background: #161a22; border-right: 1px solid #272d3a;
display: flex; flex-direction: column;
transform: translateX(-100%); transition: transform .22s ease;
}
.m-drawer.open { transform: translateX(0); }
.m-drawer-head { height: 56px; flex: none; display: flex; align-items: center; padding: 0 18px; border-bottom: 1px solid #272d3a; }
.m-nav {
display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
background: none; border: 0; border-left: 3px solid transparent; color: #cdd3e0;
padding: 16px 18px; font: 600 16px/1 inherit; cursor: pointer;
}
.m-nav .i { font-size: 20px; width: 24px; text-align: center; }
.m-nav:active { background: #1d2230; }
.m-nav.active { color: #fff; background: #1d2230; border-left-color: #c0392b; }
/* ── режимы ── */
.m-view { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.m-view[hidden] { display: none; } /* hidden должен реально скрывать (иначе display:flex перебивает) */
.m-bar { flex: none; display: flex; gap: 8px; padding: 8px; background: #161a22; border-bottom: 1px solid #272d3a; }
.m-sel, .m-date {
flex: 1; min-width: 0; background: #1d2230; color: #e6e9ef; border: 1px solid #272d3a;
border-radius: 8px; padding: 10px 12px; font-size: 15px; -webkit-appearance: none; appearance: none;
}
.m-date { flex: 0 0 auto; }
/* сцена плеера: live — на всё доступное место, архив — 16:9 (ниже список записей) */
.m-stage { background: #000; position: relative; min-height: 0; }
#view-live .m-stage { flex: 1; }
#view-arch .m-stage { flex: none; aspect-ratio: 16 / 9; }
.player-wrap { width: 100%; height: 100%; }
/* список записей архива */
.m-seglist { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; -webkit-overflow-scrolling: touch; }
.m-seg {
display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left;
background: #161a22; color: #e6e9ef; border: 1px solid #272d3a; border-radius: 8px;
padding: 13px 14px; margin-bottom: 6px; font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer;
}
.m-seg:active { background: #1d2230; }
.m-seg.active { background: #c0392b; border-color: #c0392b; color: #fff; }
.m-dur { color: #8b93a7; font-size: 13px; }
.m-seg.active .m-dur { color: #fff; }
.m-empty { color: #8b93a7; text-align: center; padding: 28px 16px; font-size: 14px; }
/* фирменный плеер (.pjs) — общий static/player.css; ниже только тач-подгонка размеров */
.pjs-btn { font-size: 20px; padding: 6px 8px; }
.pjs-seek { height: 6px; }
.pjs-seek:hover { height: 6px; }
.pjs-knob { width: 16px; height: 16px; margin-left: -8px; }
.pjs-bar { gap: 12px; padding-bottom: calc(11px + env(safe-area-inset-bottom, 0)); }
.pjs.live .pjs-bar { justify-content: center; gap: 30px; }