Дайджест: переключатель вида список / карточки
This commit is contained in:
+38
-1
@@ -96,7 +96,38 @@
|
||||
.digest-empty .btn-primary { margin-top: 10px; }
|
||||
.digest-none { color: var(--muted); font-size: .85rem; font-style: italic; }
|
||||
.digest-highlight { outline: 2px solid #f59e0b; outline-offset: 3px; }
|
||||
.digest-new-btn { margin-left: auto; }
|
||||
.digest-new-btn { margin-left: 0; }
|
||||
.digest-view-toggle { margin-left: auto; align-self: center; padding: 6px 10px; gap: 8px; }
|
||||
.digest-view-toggle .toggle-text small { font-size: .8rem; }
|
||||
|
||||
.digest-list.digest-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
|
||||
.digest-list.digest-cards .digest-empty { grid-column: 1 / -1; }
|
||||
.digest-cards .digest-card { border-radius: var(--radius); animation: entryEnter .4s cubic-bezier(.22,1,.36,1) both; }
|
||||
.digest-cards .digest-card-top { padding: 16px 16px 0; gap: 8px; }
|
||||
.digest-cards .digest-title { font-size: .95rem; font-weight: 600; }
|
||||
.digest-cards .digest-badge { font-size: .62rem; padding: 3px 8px; }
|
||||
.digest-cards .digest-avatar { display: none; }
|
||||
.digest-cards .digest-meta { gap: 0; min-width: 0; }
|
||||
.digest-cards .digest-meta-text { flex-direction: row; align-items: center; justify-content: space-between; gap: 6px; width: 100%; min-width: 0; }
|
||||
.digest-cards .digest-author,
|
||||
.digest-cards .digest-date { display: inline-flex; align-items: center; max-width: calc(50% - 3px); min-width: 0; background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); color: #fff; font-size: .72rem; font-weight: 600; line-height: 1.3; padding: 3px 9px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.digest-cards .digest-date svg { width: 11px; height: 11px; opacity: .85; }
|
||||
.digest-cards .digest-main { flex: 1 1 auto; flex-direction: column; gap: 0; padding: 0; }
|
||||
.digest-cards .digest-cover { flex: 0 0 auto; position: relative; width: 100%; max-width: none; min-width: 0; aspect-ratio: 4/3; border-radius: 0; border-left: none; border-right: none; border-bottom: 1px solid var(--border); }
|
||||
.digest-cards .digest-cover .digest-meta { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 2; pointer-events: none; }
|
||||
.digest-cards .digest-content { padding: 12px 16px 0; gap: 8px; }
|
||||
.digest-cards .digest-body { font-size: .9rem; line-height: 1.62; }
|
||||
.digest-cards .digest-body.clamp { max-height: 168px; }
|
||||
.digest-cards .digest-shot { width: 46px; }
|
||||
.digest-cards .digest-foot { margin-top: auto; padding: 10px 14px; gap: 8px; }
|
||||
.digest-cards .digest-act { padding: 6px; font-size: 0; gap: 0; }
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.digest-list.digest-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.digest-cards .digest-card { animation: none; }
|
||||
}
|
||||
|
||||
.field-hint { font-size: .78rem; color: var(--muted); margin-top: 4px; display: block; }
|
||||
.digest-file-hidden { display: none; }
|
||||
@@ -128,6 +159,7 @@
|
||||
.digest-side { position: static; max-height: 260px; }
|
||||
}
|
||||
@media (max-width: 720px) {
|
||||
.digest-list.digest-cards { grid-template-columns: 1fr; }
|
||||
.digest-card-top { padding: 20px 18px 0; }
|
||||
.digest-main { flex-direction: column; gap: 16px; padding: 16px 18px 0; }
|
||||
.digest-cover { flex: none; width: 100%; max-width: none; }
|
||||
@@ -144,6 +176,11 @@
|
||||
<div class="page-head">
|
||||
<h2>Дайджест</h2>
|
||||
<p class="page-sub">Важные сообщения для команды</p>
|
||||
<label class="toggle digest-view-toggle" title="Показывать сообщения карточками">
|
||||
<input type="checkbox" id="digestCardsView">
|
||||
<span class="toggle-track"><span class="toggle-thumb"></span></span>
|
||||
<span class="toggle-text"><small>Карточки</small></span>
|
||||
</label>
|
||||
<button type="button" class="btn-primary digest-new-btn" id="digestNewBtn"><i data-lucide="plus"></i> Новое сообщение</button>
|
||||
</div>
|
||||
<div class="digest-layout">
|
||||
|
||||
Reference in New Issue
Block a user