From 358b761eb2cc125af1c73b3d3952bfcb94f98452 Mon Sep 17 00:00:00 2001 From: Maxim Dolgolyov Date: Sun, 31 May 2026 08:54:38 +0300 Subject: [PATCH] =?UTF-8?q?fix(biochem):=20=D1=81=D1=82=D0=B0=D1=82=D0=B8?= =?UTF-8?q?=D1=87=D0=BD=D1=8B=D0=B9=20subnav=20=D0=B1=D0=B5=D0=B7=20=D0=BC?= =?UTF-8?q?=D0=B8=D0=B3=D0=B0=D0=BD=D0=B8=D1=8F=20+=20=D1=80=D0=B5=D0=B4?= =?UTF-8?q?=D0=B8=D0=B7=D0=B0=D0=B9=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Проблема: динамическая вставка через JS вызывала мигание (nav появлялся через ~100ms после первого пейнта). Решение: nav — статичный HTML в каждой странице, CSS — в . Активная вкладка проставлена в HTML (class bsn-active) — нет JS, нет мигания, работает с первого байта. Редизайн .biochem-subnav: - frosted glass (backdrop-filter blur 14px, rgba 0.92) - активная вкладка: фиолетовый фон-пилюля + нижняя линия 2.5px - hover: мягкий фиолетовый фон - mobile <560px: только иконки (bsn-label display:none) - overflow-x auto + scrollbar-width:none — горизонтальная прокрутка без полосы - biochem-nav.js сведён к no-op комментарию Co-Authored-By: Claude Sonnet 4.6 --- frontend/biochem-library.html | 42 +++++++++++++++- frontend/biochem-pathways.html | 42 +++++++++++++++- frontend/biochem-properties.html | 42 +++++++++++++++- frontend/biochem-reactions.html | 42 +++++++++++++++- frontend/biochem.html | 42 +++++++++++++++- frontend/js/biochem-nav.js | 83 ++------------------------------ 6 files changed, 208 insertions(+), 85 deletions(-) diff --git a/frontend/biochem-library.html b/frontend/biochem-library.html index 1fb1ddf..b2e3b6e 100644 --- a/frontend/biochem-library.html +++ b/frontend/biochem-library.html @@ -278,7 +278,44 @@ .page-header { padding: 10px; } .filters-row { padding: 8px 10px; } } - + + /* ── Biochem subnav ─────────────────────────────────────────────── */ + .biochem-subnav { + display: flex; align-items: center; gap: 2px; + padding: 0 16px; + background: rgba(255,255,255,0.92); + backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); + border-bottom: 1.5px solid rgba(15,23,42,0.07); + flex-shrink: 0; overflow-x: auto; + scrollbar-width: none; position: relative; + } + .biochem-subnav::-webkit-scrollbar { display: none; } + .biochem-subnav::after { + content: ''; position: absolute; bottom: -1px; left: 0; right: 0; + height: 1.5px; background: rgba(15,23,42,0.07); + } + .bsn-tab { + display: inline-flex; align-items: center; gap: 7px; + padding: 11px 14px; border-radius: 9px; margin: 5px 1px; + font-family: 'Manrope', sans-serif; font-size: 0.82rem; font-weight: 600; + color: var(--text-3, #56687A); text-decoration: none; white-space: nowrap; + transition: background .15s, color .15s; position: relative; + } + .bsn-tab svg { stroke: currentColor; width: 15px; height: 15px; flex-shrink: 0; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; } + .bsn-tab:hover { background: rgba(155,93,229,0.08); color: #9B5DE5; } + .bsn-active { + background: rgba(155,93,229,0.10); color: #7c3aed; font-weight: 700; + } + .bsn-active::after { + content: ''; position: absolute; bottom: -5px; left: 14px; right: 14px; + height: 2.5px; border-radius: 99px; background: #9B5DE5; + } + @media (max-width: 560px) { + .biochem-subnav { padding: 0 6px; } + .bsn-tab { padding: 10px 10px; gap: 0; } + .bsn-tab .bsn-label { display: none; } + } +
@@ -286,6 +323,9 @@
+