From ab817e0d31f46f44b149f6ec686215f65af87377 Mon Sep 17 00:00:00 2001 From: core Date: Mon, 1 Jun 2026 22:03:04 +0500 Subject: [PATCH] ui: restore a 50px top header with centered brand; rename to CoRE.Vizion+ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Re-add the top header as a 50px bar injected by ensureHeader() on every layout page (skipped on login), with the brand centered. The layout height now subtracts both header and footer. Rebrand the project CoRE.Vision → CoRE.Vizion+ everywhere: header + footer brand, all page s, the login card, and the FastAPI OpenAPI title (applies on next backend restart). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --- VERSION | 2 +- backend/app/main.py | 2 +- frontend/archive.html | 2 +- frontend/cams.html | 2 +- frontend/index.html | 2 +- frontend/layout.html | 2 +- frontend/login.html | 4 ++-- frontend/settings.html | 2 +- frontend/static/app.js | 11 ++++++++++- frontend/static/style.css | 14 +++++++------- 10 files changed, 26 insertions(+), 17 deletions(-) diff --git a/VERSION b/VERSION index 021629c..9f45cff 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.141 +0.0.142 diff --git a/backend/app/main.py b/backend/app/main.py index f456977..8cf2c55 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -70,7 +70,7 @@ async def lifespan(app: FastAPI): await runtime.db.close() -app = FastAPI(title="CoRE.Vision", version="1.0", lifespan=lifespan) +app = FastAPI(title="CoRE.Vizion+", version="1.0", lifespan=lifespan) # публичные пути (без авторизации) PUBLIC_PATHS = {"/login", "/api/login", "/api/health"} diff --git a/frontend/archive.html b/frontend/archive.html index 2730b93..387ec55 100644 --- a/frontend/archive.html +++ b/frontend/archive.html @@ -3,7 +3,7 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>CoRE.Vision — Архив + CoRE.Vizion+ — Архив diff --git a/frontend/cams.html b/frontend/cams.html index 0c03585..bbda8f4 100644 --- a/frontend/cams.html +++ b/frontend/cams.html @@ -3,7 +3,7 @@ - CoRE.Vision — Камеры + CoRE.Vizion+ — Камеры diff --git a/frontend/index.html b/frontend/index.html index b751067..a18eb86 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -3,7 +3,7 @@ - CoRE.Vision — Live view + CoRE.Vizion+ — Live view diff --git a/frontend/layout.html b/frontend/layout.html index e7d9e9b..8d54016 100644 --- a/frontend/layout.html +++ b/frontend/layout.html @@ -3,7 +3,7 @@ - CoRE.Vision — Раскладка + CoRE.Vizion+ — Раскладка diff --git a/frontend/login.html b/frontend/login.html index 66b7ccf..fd97cfb 100644 --- a/frontend/login.html +++ b/frontend/login.html @@ -3,12 +3,12 @@ - CoRE.Vision — Вход + CoRE.Vizion+ — Вход
- + diff --git a/frontend/settings.html b/frontend/settings.html index eee58ec..cf15d24 100644 --- a/frontend/settings.html +++ b/frontend/settings.html @@ -3,7 +3,7 @@ - CoRE.Vision — Настройки + CoRE.Vizion+ — Настройки diff --git a/frontend/static/app.js b/frontend/static/app.js index 48e11b5..37a657e 100644 --- a/frontend/static/app.js +++ b/frontend/static/app.js @@ -144,13 +144,21 @@ function ensureFooter() { if (document.querySelector("footer.app-footer") || !document.querySelector(".layout")) return; const f = document.createElement("footer"); f.className = "app-footer"; - f.innerHTML = `CoRE.Vision` + + f.innerHTML = `CoRE.Vizion+` + `` + `` + `` + ``; document.body.appendChild(f); } +function ensureHeader() { + // шапка 50px сверху с брендом по центру — на страницах с раскладкой (не на login) + if (document.querySelector("header.app-header") || !document.querySelector(".layout")) return; + const h = document.createElement("header"); + h.className = "app-header"; + h.innerHTML = `CoRE.Vizion+`; + document.body.insertBefore(h, document.body.firstChild); +} async function refreshStats() { const el = document.getElementById("sys-stats"); try { @@ -2112,6 +2120,7 @@ function initTabs() { // ── загрузка страницы ─────────────────────────────────────────── document.addEventListener("DOMContentLoaded", async () => { ensureVersionEl(); + ensureHeader(); // шапка 50px с брендом по центру ensureFooter(); // создаёт футер с #sys-stats/#clock до их заполнения startClock(); bindLogout(); diff --git a/frontend/static/style.css b/frontend/static/style.css index 1f84bec..d834edc 100644 --- a/frontend/static/style.css +++ b/frontend/static/style.css @@ -13,7 +13,7 @@ --ok: #22c55e; --warn: #f59e0b; --err: #ef4444; - --header-h: 48px; + --header-h: 50px; --footer-h: 22px; --sidebar-w: 72px; } @@ -27,12 +27,12 @@ html, body { overflow: hidden; } -/* ── Шапка ── */ -header { - height: var(--header-h); display: flex; align-items: center; +/* ── Шапка (50px, бренд по центру) ── */ +header.app-header { + height: var(--header-h); flex: none; display: flex; align-items: center; justify-content: center; padding: 0 14px; background: var(--panel); border-bottom: 1px solid var(--border); - gap: 18px; } +header.app-header .brand { font-size: 18px; } .brand { font-weight: 700; letter-spacing: .5px; color: #fff; } .brand span { color: #c0392b; } nav { display: flex; gap: 4px; } @@ -47,8 +47,8 @@ nav a.active { background: var(--accent); color: #fff; } .stats b { color: var(--text); font-weight: 600; } .clock { font-variant-numeric: tabular-nums; color: var(--text); } -/* ── Раскладка (хедер убран — контент во всю высоту минус футер) ── */ -.layout { display: flex; height: calc(100% - var(--footer-h)); } +/* ── Раскладка (между шапкой и футером) ── */ +.layout { display: flex; height: calc(100% - var(--header-h) - var(--footer-h)); } /* ── Футер (бренд + CPU/RAM/диск + часы + версия) ── */ footer.app-footer {