diff --git a/src/components/layout/AppTopBar.jsx b/src/components/layout/AppTopBar.jsx index d4a1d96..c1eb7bc 100644 --- a/src/components/layout/AppTopBar.jsx +++ b/src/components/layout/AppTopBar.jsx @@ -19,7 +19,9 @@ export default function AppTopBar({ }) { const { t } = useTranslation(); return ( -
+ // Без названия сервиса — заголовок строго по центру экрана (см. .f-topbar-centered), + // иначе он центрировался бы между кнопками разной ширины и уезжал влево +
diff --git a/src/styles/layout.css b/src/styles/layout.css index befd64b..05e6c73 100644 --- a/src/styles/layout.css +++ b/src/styles/layout.css @@ -150,6 +150,14 @@ .f-menu-btn svg { width: 45%; height: 45%; } .f-topbar-center { flex: 1; display: flex; justify-content: center; min-width: 0; } +/* Заголовок по центру экрана: боковые колонки равной ширины (1fr), поэтому + разная ширина бургера и кнопки «Войти»/аватара центр не смещает */ +.f-topbar.f-topbar-centered { + display: grid; + grid-template-columns: 1fr minmax(0, auto) 1fr; +} +.f-topbar-centered > :first-child { justify-self: start; } +.f-topbar-centered > :last-child { justify-self: end; } .f-topbar-wordmark { color: var(--text-primary); font-weight: 900; font-size: 1.05rem; letter-spacing: -.4px; white-space: nowrap; margin-left: 2px;