Corp/backend/static/scss/layout/_navbar.scss
Игорь Надеин 9df9f78666 refactor: Complete SCSS architecture reorganization
SCSS Architecture 2.0 - Feature-based structure

### Major Changes:
- ✅ Reorganized 51 SCSS files into logical categories
- ✅ Created feature-based structure: core/, layout/, features/, utilities/
- ✅ Merged duplicate components: badges (2→1), modals (3→1), lists (2→1), spacing (2→1)
- ✅ Renamed files: ios-search→search, team-wheel→team-viz, recipientPicker→recipient-picker
- ✅ Cleaned custom-bootstrap.scss from all app components
- ✅ Moved chat components from custom-bootstrap to main.scss

### Results:
- Files: 51 → 38 (-13 files, -25%)
- bootstrap-custom.css: 301 KB → 229 KB (-72 KB, -24%)
- app.css: 95 KB → 137 KB (+42 KB, expected)
- Total CSS: 396 KB → 366 KB (-30 KB, -7.5%)

### New Structure:
scss/
├── abstracts/           # Variables, mixins (4 files)
├── core/               # UI Kit - reusable components (9 files)
│   ├── buttons, badges, cards, lists, modals, etc.
├── layout/             # App structure (6 files)
│   ├── grid, navbar, sidebar, rightbar, etc.
├── utilities/          # Utility classes (1 file)
│   └── spacing
└── features/           # Feature-specific styles (18 files in 6 folders)
    ├── feed/          (3 files)
    ├── requests/      (3 files)
    ├── documents/     (1 file)
    ├── employees/     (2 files)
    ├── notifications/ (1 file)
    └── chat/          (10 files)

### Benefits:
- Clear categorization
- No duplicate imports (removed 8 duplicates)
- Logical feature grouping
- Easier maintenance
- Clean architecture
- Better naming conventions

### Documentation:
- scss/README.md - full architecture documentation
- scss/MIGRATION_MATRIX.md - file migration matrix
- docs/reports/SCSS_REORGANIZATION_COMPLETE.md - completion report

Bootstrap remains as base UI framework.
2026-01-15 14:11:14 +03:00

263 lines
5.7 KiB
SCSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* navbar.scss
* Стили навбара: меню-тогглер, поиск, уведомления
*/
/* =====================================
NAVBAR BASE
===================================== */
// Navbar overflow visible для dropdown
.app-navbar {
overflow: visible !important;
.container-fluid {
overflow: visible !important;
}
}
/* =====================================
MOBILE NAVBAR HEIGHT
===================================== */
// Увеличенная высота navbar для мобильных устройств
@media (max-width: 767.98px) {
.app-navbar {
min-height: 90px;
.container-fluid {
min-height: 64px;
padding-top: 0.75rem;
padding-bottom: 0.75rem;
}
}
}
/* =====================================
MENU TOGGLE (гамбургер)
===================================== */
// Кнопка «гамбургера» — без круга/рамки
.menu-toggle {
padding: 0;
border: 0;
background: transparent;
line-height: 1;
color: #fff;
&:focus {
outline: none;
box-shadow: none;
}
}
/* =====================================
DROPDOWN AVATAR
===================================== */
// Спрятать стрелочку у dropdown-аватара
.dropdown-toggle.no-caret::after {
display: none !important;
}
/* =====================================
MOBILE SEARCH OVERLAY
===================================== */
.mobile-search-overlay {
position: fixed;
top: var(--navbar-h);
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 1030;
opacity: 0;
pointer-events: none;
transition: opacity 0.3s ease;
&.active {
opacity: 1;
pointer-events: auto;
}
}
// Светлая тема - забеливание
[data-bs-theme="light"] .mobile-search-overlay {
background-color: rgba(255, 255, 255, 0.85);
}
// Темная тема - затемнение
[data-bs-theme="dark"] .mobile-search-overlay {
background-color: rgba(0, 0, 0, 0.7);
}
/* =====================================
BOTTOM NAVBAR (только для мобильных)
===================================== */
.bottom-navbar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background-color: var(--bs-primary);
border-top: 0.5px solid var(--bs-border-color);
z-index: 1040;
padding: 0;
box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.08);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
}
// Темная тема
[data-bs-theme="dark"] .bottom-navbar {
background-color: var(--bs-tertiary-bg);
border-top-color: var(--bs-border-color);
box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.3);
}
.bottom-navbar-container {
display: flex;
justify-content: space-around;
align-items: center;
height: 60px;
padding: 0 8px;
max-width: 100%;
}
.bottom-nav-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex: 1;
height: 100%;
color: rgba(255, 255, 255, 0.7);
text-decoration: none;
border: none;
background: transparent;
padding: 4px 8px;
transition: all 0.2s ease;
position: relative;
cursor: pointer;
&:hover,
&:focus,
&:active {
color: #fff;
background: rgba(255, 255, 255, 0.1);
outline: none;
}
i {
font-size: 1.4rem;
margin-bottom: 2px;
line-height: 1;
}
}
// Темная тема - другой цвет кнопок
[data-bs-theme="dark"] .bottom-nav-item {
color: var(--bs-secondary-color);
&:hover,
&:focus,
&:active {
color: var(--bs-emphasis-color);
background: var(--bs-secondary-bg);
}
}
.bottom-nav-label {
font-size: 0.65rem;
font-weight: 500;
text-align: center;
line-height: 1;
margin-top: 2px;
}
/* =====================================
BOTTOM NAV BADGE
===================================== */
// Иконка с бейджем для уведомлений
.bottom-nav-icon-wrapper {
position: relative;
display: inline-block;
}
.bottom-nav-badge {
position: absolute;
top: -6px;
right: -10px;
background: var(--bs-danger);
color: #fff;
border-radius: 10px; // Telegram использует фиксированный radius для круглых бэйджей
padding: 0 6px;
font-size: 11px;
font-weight: 600;
min-width: 20px;
height: 20px;
display: inline-flex;
align-items: center;
justify-content: center;
text-align: center;
line-height: 1;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); // Более заметная тень
transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
background-color 0.2s ease;
z-index: 10;
// Мигание при новом сообщении
&.pulse {
animation: badge-pulse 0.6s ease-out;
}
// Серый для замьюченных чатов
&.badge-muted {
background: var(--bs-secondary);
}
&:empty {
display: none;
}
}
@keyframes badge-pulse {
0% {
transform: scale(1);
}
50% {
transform: scale(1.15);
}
100% {
transform: scale(1);
}
}
/* =====================================
MOBILE LAYOUT
===================================== */
// Padding для body, чтобы контент не перекрывался нижней панелью
@media (max-width: 767.98px) {
body {
padding-bottom: 60px;
}
// Скрыть bottom navbar на странице чата - композер заменяет навигацию
.chat-container ~ .bottom-navbar,
.chat-page ~ .bottom-navbar,
body:has(.chat-container) .bottom-navbar,
body:has(.chat-page) .bottom-navbar {
display: none;
}
// Убрать padding, когда navbar скрыт
body:has(.chat-container),
body:has(.chat-page) {
padding-bottom: 0;
}
}