Оптимизирована высота и компактность календарного фильтра
- Уменьшены все отступы и padding для экономии вертикального пространства - Уменьшены размеры кнопок навигации (36px → 30px) - Уменьшены размеры кнопок дней (70px → 60px) - Уменьшены все шрифты внутри календаря - Обновлен расчет количества отображаемых дней (минимум 7) - Календарь теперь занимает всю доступную ширину и показывает больше дат 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -66,14 +66,14 @@ class DateCarousel {
|
||||
*/
|
||||
calculateDaysCount() {
|
||||
const containerWidth = this.container.offsetWidth;
|
||||
const dayButtonWidth = 78; // 70px min-width + 8px gap
|
||||
const dayButtonWidth = 68; // 60px min-width + 8px gap
|
||||
const maxDays = Math.floor(containerWidth / dayButtonWidth);
|
||||
|
||||
// Гарантируем нечётное количество дней для центрирования
|
||||
this.daysCount = maxDays % 2 === 0 ? maxDays - 1 : maxDays;
|
||||
|
||||
// Минимум 5 дней, максимум 31 день
|
||||
this.daysCount = Math.max(5, Math.min(31, this.daysCount));
|
||||
// Минимум 7 дней, максимум 31 день
|
||||
this.daysCount = Math.max(7, Math.min(31, this.daysCount));
|
||||
|
||||
console.log(`Calculated days count: ${this.daysCount} (container width: ${containerWidth}px)`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user