added blur for chat

This commit is contained in:
SlimusMinus
2026-10-14 02:06:20 +03:00
parent 4c27de1ca5
commit 289695a244
2 changed files with 104 additions and 4 deletions

View File

@@ -8,15 +8,95 @@
становилась шире вьюпорта, и кнопка удаления уезжала за правый край. */
min-width: 0;
height: 100vh; height: 100dvh;
background-color: var(--bg-app);
background: var(--bg-app);
}
/* Открытый чат: картинка-обои на всю страницу */
.chat-page--open {
background-color: #EAF1E1;
background-image: url('../assets/chat-bg-light.svg');
background-repeat: no-repeat;
background-size: cover;
background-position: center;
}
[data-theme="dark"] .chat-page {
[data-theme="dark"] .chat-page--open {
background-color: #0F1A26;
background-image: url('../assets/chat-bg-dark.svg');
}
/* Шапка открытого чата — «стекло» поверх ленты (как .f-topbar в MainFeed):
сообщения прокручиваются под ней и видны сквозь лёгкое размытие. */
.chat-page--open { position: relative; }
.chat-page--open .chat-header {
position: absolute;
top: 0;
left: 0;
right: 0;
z-index: 10;
border-bottom: none;
background: transparent;
}
/* Стекло вынесено в псевдоэлемент: он чуть ниже шапки, а маска плавно
гасит и размытие, и подложку к низу — резкой границы не видно. */
.chat-page--open .chat-header::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: -24px;
z-index: -1;
pointer-events: none;
background: linear-gradient(
to bottom,
rgba(var(--bg-rgb), 0.09) 0%,
rgba(var(--bg-rgb), 0.045) 55%,
rgba(var(--bg-rgb), 0) 100%
);
-webkit-backdrop-filter: blur(2px) saturate(105%);
backdrop-filter: blur(2px) saturate(105%);
-webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}
.chat-page--open .chat-messages {
padding-top: calc(var(--chat-header-height, 68px) + 20px);
}
.chat-page--open .chat-messages {
padding-bottom: calc(var(--chat-input-height, 72px) + 20px);
}
/* Поле ввода — такое же «стекло» поверх ленты, зеркально шапке:
слой выходит на 24px вверх и плавно гаснет кверху. */
.chat-page--open .chat-input-area {
position: absolute;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
/* Поле ввода теперь у самого низа страницы — отступ под «домашнюю
полоску» iPhone даём ему, а не .chat-page (см. ниже). */
padding-bottom: env(safe-area-inset-bottom);
}
.chat-page.chat-page--open { padding-bottom: 0; }
.chat-page--open .chat-input-area::before {
content: "";
position: absolute;
top: -24px;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
pointer-events: none;
background: linear-gradient(
to top,
rgba(var(--bg-rgb), 0.09) 0%,
rgba(var(--bg-rgb), 0.045) 55%,
rgba(var(--bg-rgb), 0) 100%
);
-webkit-backdrop-filter: blur(2px) saturate(105%);
backdrop-filter: blur(2px) saturate(105%);
-webkit-mask-image: linear-gradient(to top, #000 0%, #000 55%, transparent 100%);
mask-image: linear-gradient(to top, #000 0%, #000 55%, transparent 100%);
}
.chat-page--open .chat-input-row { border-top: none; }
/* Header */
.chat-header {