SHA256
UI: редактор ответа и записи – поле сразу под именем, «прикрепить» в нижней панели, миниатюры
Текст пишется в колонке справа от аватара сразу под именем (и строкой «В канал …»), без пустого места; «прикрепить» – слева в нижней панели, «Очистить» – в шапке, пока есть текст или вложения; счётчик символов показывается только с 1500 знаков. Картинки и видео во вложениях – миниатюрами с крестиком (видео со значком воспроизведения), прочие файлы – строкой. Нижняя панель на flex: на 320 px ничего не выходит за край, выбор типа записи сжимается.
This commit is contained in:
@@ -166,9 +166,8 @@
|
||||
|
||||
.channel-editor__footer {
|
||||
min-height: calc(68px + env(safe-area-inset-bottom));
|
||||
padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
|
||||
padding: 12px 16px calc(12px + env(safe-area-inset-bottom)) 8px;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
border-top: 1px solid var(--border-subtle);
|
||||
@@ -192,7 +191,6 @@
|
||||
background: var(--surface-selected);
|
||||
}
|
||||
|
||||
.channel-editor__footer.has-extra { grid-template-columns: auto minmax(0, 1fr) auto; }
|
||||
.channel-editor__type { display: block; min-width: 0; }
|
||||
.channel-editor__type-select { min-height: 44px; width: auto; max-width: 9.5rem; padding-left: 12px; border-radius: 12px; font-size: .875rem; }
|
||||
|
||||
@@ -216,7 +214,6 @@
|
||||
}
|
||||
|
||||
@media (max-width: 400px) {
|
||||
.channel-editor__footer.has-extra .channel-editor__counter { display: none; }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
@@ -227,12 +224,35 @@
|
||||
.channel-editor__draft { justify-self: end; color: var(--text-secondary); font-size: .75rem; }
|
||||
.channel-editor__close svg { width: 24px; height: 24px; }
|
||||
|
||||
/* Поле ввода как в Threads: без рамки, под именем автора, с отступом под аватар; вложения и «прикрепить» – ниже текста. */
|
||||
.channel-editor__compose { display: grid; gap: 8px; margin: -8px 0 0 52px; }
|
||||
.channel-editor__compose .channel-editor__input { min-height: 48px; padding: 0; border: 0; border-radius: 0; background: transparent; }
|
||||
/* Поле ввода как в Threads: без рамки, в колонке справа от аватара – под именем (и строкой «В канал …»); вложения – ниже текста. */
|
||||
.channel-editor__author { align-items: flex-start; }
|
||||
.channel-editor__author-text { flex: 1; padding-top: 1px; }
|
||||
.channel-editor__compose { display: grid; gap: 8px; margin-top: 4px; }
|
||||
.channel-editor__compose .channel-editor__input { flex: none; min-height: 24px; padding: 0; border: 0; border-radius: 0; background: transparent; line-height: 24px; }
|
||||
.channel-editor__compose .channel-editor__input:focus-visible { border: 0; }
|
||||
.channel-editor__tools { display: flex; align-items: center; gap: 4px; margin-left: -10px; }
|
||||
.channel-editor__tools .channel-editor__attach { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text-secondary); }
|
||||
.channel-editor__tools .channel-editor__attach:hover { color: var(--text-primary); }
|
||||
.channel-editor__tools .channel-editor__clear { margin-left: auto; }
|
||||
.channel-editor__tools .channel-editor__attach svg { width: 22px; height: 22px; }
|
||||
.channel-editor__compose .channel-editor__error:empty { display: none; }
|
||||
/* Нижняя панель: «прикрепить» и тип записи слева, счётчик (только у предела) и отправка – справа; ничего не вылезает за край. */
|
||||
.channel-editor__footer { display: flex; align-items: center; gap: 8px; }
|
||||
.channel-editor__footer .channel-editor__attach { flex: none; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--accent); }
|
||||
.channel-editor__footer .channel-editor__attach:hover { background: var(--surface-selected); }
|
||||
.channel-editor__footer .channel-editor__attach svg { width: 24px; height: 24px; }
|
||||
.channel-editor__footer .channel-editor__type { flex: 0 1 auto; min-width: 0; }
|
||||
.channel-editor__footer .channel-editor__type-select { width: 100%; max-width: 9.5rem; min-width: 0; text-overflow: ellipsis; }
|
||||
/* Колонка редактора не должна раздуваться содержимым шире экрана. */
|
||||
.channel-editor { grid-template-columns: minmax(0, 1fr); }
|
||||
.channel-editor__footer, .channel-editor__body { min-width: 0; }
|
||||
.channel-editor__footer .channel-editor__counter { margin-left: auto; }
|
||||
.channel-editor__footer .channel-editor__counter.is-hidden { display: none; }
|
||||
.channel-editor__footer .channel-editor__counter.is-hidden + .channel-editor__submit { margin-left: auto; }
|
||||
.channel-editor__footer .channel-editor__submit { flex: none; }
|
||||
/* Миниатюры картинок и видео – лентой, крестик в углу. */
|
||||
.channel-editor__compose .channel-editor__attachments { display: flex; flex-wrap: wrap; gap: 8px; }
|
||||
.channel-editor__compose .channel-editor__attachment { flex: 1 1 100%; }
|
||||
.channel-editor__thumb { position: relative; width: 120px; height: 150px; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--surface-selected); }
|
||||
.channel-editor__thumb img, .channel-editor__thumb video { display: block; width: 100%; height: 100%; object-fit: cover; }
|
||||
.channel-editor__thumb-remove { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgb(0 0 0 / .6); color: #fff; cursor: pointer; }
|
||||
.channel-editor__thumb-remove svg { width: 16px; height: 16px; }
|
||||
.channel-editor__thumb--video::after { content: ''; position: absolute; left: 8px; bottom: 8px; width: 24px; height: 24px; border-radius: 50%; background: rgb(0 0 0 / .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7v10l8-5z' fill='white'/%3E%3C/svg%3E") center / 18px no-repeat; pointer-events: none; }
|
||||
.channel-editor__header-end { justify-self: end; display: flex; align-items: center; }
|
||||
.channel-editor__header-end .channel-editor__clear { min-height: 44px; padding: 0 4px; }
|
||||
.channel-editor__header-end [hidden] { display: none; }
|
||||
|
||||
Reference in New Issue
Block a user