- 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 ✅
26 lines
801 B
CSS
26 lines
801 B
CSS
/**
|
|
* CSS Components Index
|
|
*
|
|
* Этот файл служит единой точкой входа для всех CSS компонентов.
|
|
* Импортируйте компоненты по мере их создания.
|
|
*
|
|
* Использование в шаблонах:
|
|
* {% block extra_css %}
|
|
* <link rel="stylesheet" href="{% static 'css/components/index.css' %}">
|
|
* {% endblock %}
|
|
*/
|
|
|
|
/* Переменные */
|
|
@import '../variables.css';
|
|
|
|
/* Компоненты карточек ленты */
|
|
@import 'feed-cards.css';
|
|
|
|
/* Компонент поиска iOS-стиль */
|
|
@import 'ios-search.css';
|
|
|
|
/* Дополнительные компоненты (будут добавлены) */
|
|
/* @import 'modals.css'; */
|
|
/* @import 'badges.css'; */
|
|
/* @import 'buttons.css'; */
|