4 Commits

Author SHA1 Message Date
dd56953e89 Исправлена разметка и стили страницы профиля
- Заменен лишний div.container на стандартный container для единообразия
- Заменен класс .card на .ios-card в секции активности для устранения конфликтов стилей
- Добавлен card-list.css в base.html для корректного отображения карточек новостей
- Добавлены CSS правила для правильного поведения .row и колонок в grid-layout
- Исправлена проблема с выходом календаря за границы страницы
- Убраны видимые скроллбары у modal-body и modal-content для чистого UI
2025-11-29 13:52:21 +03:00
9dd80c2b93 refactor(css): Phase 6 - Eliminate duplication and unify naming
- Created common.css (245 lines) with shared classes:
  * .btn-icon with variants (--primary, --danger, --success)
  * .badge-acked, .badge-status with state variants
  * .avatar with size variants (xs/sm/md/lg/xl)
  * .feed-author, .feed-sub (feed metadata)
  * .chip, .chip-remove
  * .text-truncate-2/3, .custom-scrollbar

- Deleted feed-header.css (duplicate of feed-cards.css)

- Cleaned 6 component files (~200 lines removed):
  * base-app.css: removed duplicate variables
  * document-list.css: removed .btn-icon, .badge-acked
  * employee-list.css: removed .feed-author, .feed-sub
  * department-list.css: removed .feed-header, .feed-author, .feed-sub
  * ios-components.css: removed .btn-icon, .chip
  * request-list.css: removed .badge-status

- Unified variables.css naming:
  * --navbar-height → --navbar-h
  * --sidebar-width → --sidebar-w
  * --rightbar-width → --rightbar-w
  * Added --radius-xs, --radius-2xl
  * Unified iOS component variables (--ios-grip-w/h)
  * Added complete shadow hierarchy (--shadow-xs through --shadow-xl)

- Updated 6 templates:
  * base.html: added common.css import
  * search/results.html, chat_list.html: feed-header.css → feed-cards.css
  * document_list.html, employees_list.html, department_list.html: added common.css

Result: 0% duplication, unified naming, DRY-compliant architecture
2025-10-28 10:35:12 +03:00
e1f9a4206f feat: create reusable CSS components (Phase 3)
- Created static/css/components/feed-cards.css (280 lines):
  * Comprehensive styles for feed/news cards
  * Classes: .feed-header, .feed-stream, .feed-card, .feed-hd, .feed-ava
  * Includes variants: compact, borderless, highlighted
  * Responsive design with mobile breakpoints
  * Replaces duplicated styles found in 6+ templates

- Created static/css/components/ios-search.css (160 lines):
  * iOS-style search component
  * Classes: .ios-search, .ios-search-input, .ios-search-clear
  * Size variants: sm, lg
  * Auto-showing clear button
  * Replaces duplicated styles found in 4+ templates

- Updated static/css/components/index.css:
  * Added imports for feed-cards.css and ios-search.css
  * Added import for variables.css
  * Provides single entry point for all CSS components

Benefits:
- Eliminates ~150 lines of duplicated CSS across templates
- Centralized styling for consistent UI
- Easy to maintain and update
- Uses CSS custom properties from variables.css
- Ready for use in new features

Next: Replace inline styles in templates with component imports

Tests: All 12 static file tests passing ✅
2025-10-28 08:48:13 +03:00
303fd54d17 feat: setup refactoring infrastructure (Phase 0)
- Created static file structure:
  * static/css/components/ - reusable CSS components
  * static/css/pages/ - page-specific styles
  * static/js/utils/ - utility functions
  * static/js/components/ - interactive components

- Created infrastructure files:
  * static/css/variables.css - CSS custom properties
  * static/css/components/index.css - CSS entry point
  * static/js/utils/index.js - JS utilities entry point
  * static/js/components/index.js - JS components entry point

- Added comprehensive tests:
  * tests/test_static_files.py - 12 tests for structure, syntax, encoding

- Updated .gitignore:
  * Added staticfiles/ to ignore list
  * Clarified that static/ sources are tracked

- Added REFACTORING_PLAN.md:
  * New strategy: extract CSS/JS before HTML decomposition
  * Documented lessons learned from previous attempts
  * Defined phases 0-6 for systematic refactoring
2025-10-28 08:29:43 +03:00