/
bytevalue
/
optimal
Обзор
Документация
Войти
/
bytevalue
/
optimal
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/main/resources/static/css/sidebar.css
600 строк
13 KB
bytevalue
chat history compactisation
07 дек 2025, 19:53
07 дек 2025, 19:53
188d0b2
Код
Авторство
О чём код?
/* ===== БОКОВАЯ ПАНЕЛЬ ===== */ .sidebar { width: 280px; height: 100vh; position: fixed; left: 0; top: 0; display: flex; flex-direction: column; background: rgba(18, 18, 24, 0.98); backdrop-filter: blur(10px); border-right: 1px solid rgba(255, 255, 255, 0.08); z-index: 1000; box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3); transition: width var(--transition-normal), transform var(--transition-normal); overflow: hidden; } /* ===== ШАПКА САЙДБАРА ===== */ .sidebar-header { padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); min-height: 72px; background: rgba(255, 255, 255, 0.02); flex-shrink: 0; } .logo-container { display: flex; align-items: center; gap: 12px; flex: 1; cursor: pointer; } .logo-icon { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: white; font-size: 16px; flex-shrink: 0; box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); } .app-title { font-size: 17px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.3px; white-space: nowrap; } .logo-accent { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-weight: 800; } .sidebar-toggle-btn { width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); color: var(--text-secondary); cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .sidebar-toggle-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.12); color: var(--text-primary); transform: translateY(-1px); } /* ===== ОСНОВНОЙ КОНТЕНТ САЙДБАРА ===== */ .sidebar-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 16px 20px; } /* КНОПКА СОЗДАНИЯ ЧАТА */ .btn-new-chat { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 20px; margin-bottom: 20px; background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%); border: 1px solid rgba(102, 126, 234, 0.2); color: #667eea; font-weight: 600; border-radius: 12px; transition: all 0.3s ease; font-size: 14px; box-shadow: 0 2px 12px rgba(102, 126, 234, 0.15); } .btn-new-chat:hover { background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.25) 100%); border-color: rgba(102, 126, 234, 0.3); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25); color: #5a6fd8; } .btn-new-chat:active { transform: translateY(0); } /* ===== КОНТЕНТ САЙДБАРА ===== */ .sidebar-content { flex: 1; overflow-y: auto; display: flex; flex-direction: column; padding-right: 4px; /* Отступ для скроллбара */ } .chats-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding: 0 4px; } .section-title { font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.6); text-transform: uppercase; letter-spacing: 0.5px; margin: 0; } .chats-count { background: rgba(255, 255, 255, 0.05); border-radius: 12px; padding: 2px 8px; font-size: 10px; font-weight: 600; color: rgba(255, 255, 255, 0.5); } /* ===== СПИСОК ЧАТОВ ===== */ .chat-list { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; } .chat-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; position: relative; overflow: hidden; background: rgba(255, 255, 255, 0.02); border: 1px solid transparent; } .chat-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, #667eea 0%, #764ba2 100%); transform: translateX(-100%); transition: transform 0.3s ease; } .chat-item:hover { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.06); } .chat-item:hover::before { transform: translateX(0); } .chat-item.active { background: rgba(102, 126, 234, 0.15); border: 1px solid rgba(102, 126, 234, 0.3); box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15), inset 0 0 0 1px rgba(102, 126, 234, 0.2); } .chat-item.active::before { transform: translateX(0); } .chat-item.active .chat-icon { background: rgba(102, 126, 234, 0.2); color: #667eea; box-shadow: 0 0 12px rgba(102, 126, 234, 0.3); } .chat-item.active .chat-title { color: white; font-weight: 600; } /* ===== ИКОНКА ЧАТА (увеличим до 24px) ===== */ .chat-icon { width: 24px; height: 24px; border-radius: 6px; background: rgba(255, 255, 255, 0.04); display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.5); font-size: 12px; flex-shrink: 0; transition: all 0.2s ease; } .chat-info { flex: 1; min-width: 0; } /* ===== НАЗВАНИЕ ЧАТА (уменьшим до 10px) ===== */ .chat-title { font-size: 10px; font-weight: 500; color: rgba(255, 255, 255, 0.9); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; } .chat-preview { display: none; } .chat-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; } .chat-time { font-size: 9px; color: rgba(255, 255, 255, 0.4); } .unread-badge { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); margin-left: auto; box-shadow: 0 0 8px rgba(102, 126, 234, 0.5); } /* ===== СВЕРНУТОЕ СОСТОЯНИЕ ===== */ .sidebar.sidebar-collapsed { width: 80px; } .sidebar-collapsed .sidebar-header { flex-direction: column; padding: 20px 0; gap: 24px; align-items: center; justify-content: flex-start; } .sidebar-collapsed .logo-container { flex-direction: column; align-items: center; gap: 16px; } .sidebar-collapsed .app-title { display: none; } .sidebar-collapsed .sidebar-toggle-btn { transform: rotate(180deg); order: 2; margin-top: 8px; } .sidebar-collapsed .section-title, .sidebar-collapsed .chats-count, .sidebar-collapsed .btn-new-chat span { display: none; } .sidebar-collapsed .btn-new-chat { width: 48px; height: 48px; padding: 0; border-radius: 12px; justify-content: center; } .sidebar-collapsed .btn-new-chat i { margin: 0; } .sidebar-collapsed .chat-item { padding: 8px; justify-content: center; } .sidebar-collapsed .chat-info { display: none; } .sidebar-collapsed .chat-icon { margin: 0; width: 32px; height: 32px; border-radius: 8px; font-size: 14px; } .sidebar-collapsed .sidebar-footer { flex-direction: column; padding: 20px 0; gap: 16px; align-items: center; justify-content: flex-start; } .sidebar-collapsed .user-profile { flex-direction: column; align-items: center; gap: 12px; } .sidebar-collapsed .user-info { display: none; } .sidebar-collapsed .btn-settings { margin-top: 8px; order: 2; } /* ===== ФУТЕР САЙДБАРА ===== */ .sidebar-footer { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(255, 255, 255, 0.06); background: rgba(255, 255, 255, 0.02); flex-shrink: 0; margin-top: auto; } .user-profile { display: flex; align-items: center; gap: 12px; flex: 1; } .user-avatar { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); display: flex; align-items: center; justify-content: center; color: white; font-size: 15px; flex-shrink: 0; box-shadow: 0 4px 12px rgba(240, 147, 251, 0.3); } .user-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .user-name { font-size: 13px; font-weight: 500; color: white; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .user-id { font-size: 11px; color: rgba(255, 255, 255, 0.5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .btn-settings { width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.7); cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .btn-settings:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.12); color: white; transform: translateY(-1px); } /* ===== СКРОЛЛБАР ДЛЯ САЙДБАРА ===== */ .sidebar-content::-webkit-scrollbar { width: 4px; } .sidebar-content::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); border-radius: 2px; } .sidebar-content::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 2px; } .sidebar-content::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); } /* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */ @media (max-width: 768px) { .sidebar { width: 280px !important; transform: translateX(-100%); z-index: 1000; box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4); } .sidebar.sidebar-mobile-active { transform: translateX(0); } .sidebar.sidebar-collapsed { width: 280px !important; } .sidebar-collapsed .app-title, .sidebar-collapsed .section-title, .sidebar-collapsed .chats-count, .sidebar-collapsed .chat-info, .sidebar-collapsed .user-info { display: block; } .sidebar-collapsed .sidebar-header, .sidebar-collapsed .sidebar-footer { flex-direction: row !important; padding: 20px !important; align-items: center !important; justify-content: space-between !important; } .sidebar-collapsed .logo-container { flex-direction: row !important; } .sidebar-collapsed .user-profile { flex-direction: row !important; } .sidebar-collapsed .sidebar-toggle-btn, .sidebar-collapsed .btn-settings { order: 0 !important; margin-top: 0 !important; transform: none !important; } .sidebar-collapsed .chat-item { padding: 8px 12px !important; justify-content: flex-start !important; } .sidebar-collapsed .btn-new-chat { width: 100% !important; padding: 14px 20px !important; justify-content: flex-start !important; } .sidebar-collapsed .btn-new-chat span { display: inline !important; } /* Бэкдроп для мобильного меню */ .sidebar-backdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); z-index: 999; display: none; } .sidebar-backdrop.active { display: block; } } /* Эффект при наведении */ .chat-item:hover { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.06); } /* Эффект для выбранного чата - более яркий и заметный */ .chat-item.active { background: rgba(102, 126, 234, 0.15); border: 1px solid rgba(102, 126, 234, 0.3); box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15), inset 0 0 0 1px rgba(102, 126, 234, 0.2); } /* Усилим эффект для выбранного чата при наведении */ .chat-item.active:hover { background: rgba(102, 126, 234, 0.2); border-color: rgba(102, 126, 234, 0.4); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2), inset 0 0 0 1px rgba(102, 126, 234, 0.3); } /* Усилим иконку выбранного чата */ .chat-item.active .chat-icon { background: rgba(102, 126, 234, 0.2); color: #667eea; box-shadow: 0 0 12px rgba(102, 126, 234, 0.3); } /* Усилим цвет текста выбранного чата */ .chat-item.active .chat-title { color: white; font-weight: 600; } /* Усилим красную линию слева для выбранного чата */ .chat-item.active::before { width: 4px; background: linear-gradient(180deg, #667eea 0%, #5a6fd8 100%); box-shadow: 0 0 10px rgba(102, 126, 234, 0.5); }